Commit graph

16104 commits

Author SHA1 Message Date
Dorian Péron
2307a353ea
Merge pull request #8406 from amirhosseinghanipour/refactor-mkdir-mode-parsing
Some checks are pending
CICD / Style/cargo-deny (push) Waiting to run
CICD / Build/nightly (push) Blocked by required conditions
CICD / Style/deps (push) Waiting to run
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Build/SELinux (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
refactor(mkdir): Simplify mode argument parsing
2025-07-29 22:02:34 +02:00
Dorian Péron
614531d13c
Merge branch 'main' into refactor-mkdir-mode-parsing 2025-07-29 22:01:53 +02:00
Sylvestre Ledru
35610ba146
Merge pull request #8413 from cakebaker/mv_improve_is_empty_dir
Some checks are pending
CICD / Style/cargo-deny (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Style/deps (push) Waiting to run
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Build/SELinux (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
mv: use `next()` instead of `peekable().peek()` in `is_empty_dir()`
2025-07-29 17:25:47 +02:00
Sylvestre Ledru
3a214f2842
Merge branch 'main' into refactor-mkdir-mode-parsing 2025-07-29 16:54:15 +02:00
Daniel Hofstetter
000be5b73a mv: use next() instead of peekable().peek()
in is_empty_dir()
2025-07-29 16:52:06 +02:00
Amirhossein Ghanipour
8c9e739694 refactor(mkdir): Simplify mode argument parsing 2025-07-29 15:11:35 +03:30
Daniel Hofstetter
790852ff9a
Merge pull request #8403 from sylvestre/ls-others
ls: improve the test when running selinux
2025-07-29 12:51:54 +02:00
Sylvestre Ledru
386acd00d6
Merge pull request #8412 from julian-klode/fix-install-no-target-existing-target
install: Fix --no-target-directory with existing file
2025-07-29 12:46:40 +02:00
Julian Andres Klode
190ddd105c install: Fix --no-target-directory with existing file
install should silently override existing target files, but it
inadvertently checked whether the target exists rather than
for the target being a directory, hence the overwrite failed,
saying it cannot overwrite the directory with non-directory.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/2118785
2025-07-29 12:24:31 +02:00
Jonas Jelten
79bbf52a21
Merge pull request #8343 from TheJJ/fix-mknod-mode
mknod: set cli specified file mode even when it's 0o666
2025-07-29 11:53:21 +02:00
Sylvestre Ledru
33a3f734a7
Merge pull request #8405 from sylvestre/tz-deprecated
date: update deprecated TZ
2025-07-29 11:35:05 +02:00
Dorian Péron
0fac1cd00b
Merge pull request #8411 from cakebaker/who_rename_var
who: rename var, cleanup spell-checker:ignore
2025-07-29 11:15:43 +02:00
Daniel Hofstetter
361f1b9ce5 who: rename var, cleanup spell-checker:ignore 2025-07-29 10:19:09 +02:00
Daniel Hofstetter
78d3845844
Merge pull request #8410 from uutils/renovate/clap_mangen-0.x-lockfile
Some checks are pending
CICD / Style/deps (push) Waiting to run
CICD / Style/cargo-deny (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
chore(deps): update rust crate clap_mangen to v0.2.29
2025-07-29 09:49:55 +02:00
Daniel Hofstetter
294e29deb2
Merge pull request #8392 from sylvestre/l10n-macros
Create macros for l10n translations
2025-07-29 09:46:20 +02:00
renovate[bot]
435ac9438f
chore(deps): update rust crate clap_mangen to v0.2.29 2025-07-29 07:26:46 +00:00
Sylvestre Ledru
9c01ef53d2
Merge pull request #8409 from amirhosseinghanipour/style/simplify-physical-path
style(pwd): simplify physical_path implementation
2025-07-29 09:24:30 +02:00
Amirhossein Ghanipour
aff71abdc4 style(pwd): simplify physical_path implementation 2025-07-29 07:14:28 +03:30
Sylvestre Ledru
a73ecd95e6 uucore: adjust it too to use the translate macro 2025-07-28 22:04:40 +02:00
Sylvestre Ledru
50fc84136f l10n: Use FluentArgs instead of HashMap directly 2025-07-28 22:04:40 +02:00
Sylvestre Ledru
d045f50622 l10n: adjust the documentation 2025-07-28 22:04:40 +02:00
Sylvestre Ledru
862a7a705c use the new translate! macro for translation
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2025-07-28 22:04:40 +02:00
Sylvestre Ledru
bd005d12b9 uucore/locale: create a macro to simplify the translation calls 2025-07-28 21:32:54 +02:00
Sylvestre Ledru
7e320a75d9 ls: improve the test when running selinux 2025-07-28 21:17:09 +02:00
Sylvestre Ledru
582c619b7e date: update deprecated TZ
See:
https://data.iana.org/time-zones/tzdb/backward
2025-07-28 21:13:54 +02:00
Sylvestre Ledru
fb4d611445
Merge pull request #8404 from drinkcat/stat-fluent
Some checks are pending
CICD / Build (push) Blocked by required conditions
CICD / Test all features separately (push) Blocked by required conditions
CICD / Style/cargo-deny (push) Waiting to run
CICD / Style/deps (push) Waiting to run
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Build/SELinux (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
stat/locales: Fix fluent_linter errors
2025-07-28 14:07:46 +02:00
Nicolas Boichat
2c106609cc stat/locales: Fix fluent_linter errors
Arguably this should be part of the CI, but I'm not sure how
to run it outside of precommit.
2025-07-28 17:22:53 +08:00
Sylvestre Ledru
809e75cf39
Merge pull request #8401 from drinkcat/selinux-fifo-symlinks
Some checks are pending
CICD / Style/cargo-deny (push) Waiting to run
CICD / Build/nightly (push) Blocked by required conditions
CICD / Style/deps (push) Waiting to run
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Build/SELinux (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
selinux: Fix get_context on fifos (and symlinks)
2025-07-28 09:40:05 +02:00
Nicolas Boichat
49b2466a9c uucore: selinux: Add tests for symlinks and fifo
Check that we can follow (or not) symlinks to get their SElinux context.

Also, check that we can get context from a fifo (we used to hang).
2025-07-28 15:08:21 +08:00
Nicolas Boichat
8752c0c098 uucore: selinux: Use of_path instead of open+of_file
Opening a pipe may just hang forever, and is not needed to get
selinux context.

Also, pass around follow_symbolic_links parameter from stat to of_path.
2025-07-28 15:08:05 +08:00
Daniel Hofstetter
8236bcff28
Merge pull request #8400 from uutils/renovate/ctor-0.x-lockfile
chore(deps): update rust crate ctor to v0.4.3
2025-07-28 07:09:38 +02:00
renovate[bot]
f71450a0fd
chore(deps): update rust crate ctor to v0.4.3 2025-07-27 19:08:49 +00:00
Nicolas Boichat
b4c6ad1b33
CI: GnuTests: Split native and selinux tests to 2 different jobs (#8388)
Some checks are pending
CICD / Build (push) Blocked by required conditions
CICD / Test all features separately (push) Blocked by required conditions
CICD / Style/deps (push) Waiting to run
CICD / Style/cargo-deny (push) Waiting to run
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Build/SELinux (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
* .github/workflows/GnuTests.yml: Move variables to env

Will make it easier to split the work into 2 jobs.

* .github/workflows/GnuTests.yml: Move all Selinux steps to a separate job

* .github/workflows/GnuTests.yml: Create a new summary job

That aggregates between native and selinux results.

* .github/workflows/GnuTests.yml: Fix log uploading

This... didn't work, even in the previous version.

(found by Gemini...)

* .github/workflows/GnuTests.yml: Improve aggregate

Variables don't always help make things clearer.

* .github/workflows/GnuTests.yml: Make selinux and native flow identical

Also add some headers to make things easier to follow.

* .github/workflows/GnuTests.yml: More misc cleanup

In particular, SELinux flow is simplified, and fixed.

Also fix artifact download name.

* .github/workflows/GnuTests.yml: Fix aggregate job
2025-07-27 21:06:50 +02:00
Sylvestre Ledru
0f403021b0
Merge pull request #8399 from cakebaker/uucore_fs_create_single_string
uucore/fs: call `to_string_lossy` only once in `dir_strip_dot_for_creation`
2025-07-28 00:34:43 +09:00
Daniel Hofstetter
69f671466f uucore/fs: call to_string_lossy only once
in dir_strip_dot_for_creation
2025-07-27 16:27:43 +02:00
Daniel Hofstetter
64ba35b7f7
Merge pull request #8396 from drinkcat/du-bigtime
Some checks are pending
CICD / Style/cargo-deny (push) Waiting to run
CICD / Style/deps (push) Waiting to run
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Build/SELinux (push) Blocked by required conditions
GnuTests / Run GNU tests (push) Waiting to run
Android / Test builds (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
`du`/`ls`: Unify file metadata time handling
2025-07-27 14:34:55 +02:00
Daniel Hofstetter
5244b5e0f5
Merge pull request #8397 from uutils/renovate/rstest-0.x-lockfile
chore(deps): update rust crate rstest to v0.26.1
2025-07-27 13:35:41 +02:00
renovate[bot]
2371542b01
chore(deps): update rust crate rstest to v0.26.1 2025-07-27 10:31:27 +00:00
Nicolas Boichat
b8d81adcff du/test_du: Fix ctime fallback on Windows, and test 2025-07-27 12:57:28 +08:00
Nicolas Boichat
96438f2086 test_du: Fix --time=ctime test
It turns out `du` used to test for the wrong thing, `ctime` is
the change timestamp, not creation time.

We have to rely on a regex again, as the change timestamp is the
current time.
2025-07-27 10:57:07 +08:00
Nicolas Boichat
8913108dba uucore: fsext: Deduplicate metadata_get_time
Easier to just move the change time logic to another function.
2025-07-27 10:36:59 +08:00
Nicolas Boichat
47aff05375 uucore: fsext: Provide From<&str> helper for MetadataTimeField
We assume that the string has been validated by clap ahead of
time (just like the current code does).
2025-07-27 10:36:59 +08:00
Nicolas Boichat
8985afa284 du: Simplify Stat creation further
No need to have separate struct creation code for Windows and Unix.

Also remove is_dir, we can get it from metadata.
2025-07-27 09:19:51 +08:00
Nicolas Boichat
51dbe090a0 du: Keep metadata in Stat, and make use of uucore::fsext::metadata_get_time
Removes some duplicated code, with slight, but incorrect, differences.
2025-07-27 09:19:51 +08:00
Nicolas Boichat
b1efa05d59 uucore: fsext: Move metadata_get_time from ls
This function is useful for more than `ls` (`du` can use it too).
2025-07-27 09:19:51 +08:00
Sylvestre Ledru
d4034047a5
Merge pull request #8393 from cakebaker/od_improve_file_names
Some checks are pending
CICD / Style/cargo-deny (push) Waiting to run
CICD / Style/deps (push) Waiting to run
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Build/nightly (push) Blocked by required conditions
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
GnuTests / Run GNU tests (push) Waiting to run
Android / Test builds (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
od: use underscores in filenames, adapt modules
2025-07-27 08:49:48 +09:00
Sylvestre Ledru
06a422338e
Merge pull request #8394 from uutils/renovate/rstest-0.x
chore(deps): update rust crate rstest to 0.26.0
2025-07-27 08:49:00 +09:00
Sylvestre Ledru
0eecc5f379
Merge pull request #8379 from drinkcat/makefiles-locales-after
Makefile: Copy locales _after_ build
2025-07-27 08:48:50 +09:00
Sylvestre Ledru
ded761d334
Merge pull request #8390 from drinkcat/ls-bigtime
Some checks are pending
CICD / Style/cargo-deny (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Style/deps (push) Waiting to run
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Build (push) Blocked by required conditions
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Build/SELinux (push) Blocked by required conditions
GnuTests / Run GNU tests (push) Waiting to run
Android / Test builds (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
du/ls: Merge date formatting code, and handle timestamps far in the future/past by just printing them
2025-07-27 08:01:29 +09:00
renovate[bot]
001a91fbe6
chore(deps): update rust crate rstest to 0.26.0 2025-07-26 22:00:01 +00:00