1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2026-01-20 12:11:08 +00:00
Commit graph

14340 commits

Author SHA1 Message Date
Brandon Maier
9082f9ba57 GNUmakefile: support skipping manpages and completions
When packaging uutils for Conda-Forge and a cross-compiled architecture,
the install of completion scripts and manpages fails with the following
error.

> .../coreutils manpage arch > .../man/arch.1
> /bin/sh: .../coreutils: Bad CPU type in executable
> make: *** [GNUmakefile:349: manpages] Error 126

When cross-compiling, the `coreutils` tool will be for a different
architecture then the build platform. So we won't be able to extract the
manpages and completions.

Provide build arguments that let us skip the build and install of
manpages and completions.
2025-02-22 13:53:42 -06:00
Daniel Hofstetter
b186f1f00f
Merge pull request #7339 from jfinkels/clippy-fixes-3
Style fixes from cargo +nightly clippy
2025-02-22 16:37:06 +01:00
Jeffrey Finkelstein
faf3412019 Style fixes from cargo +nightly clippy 2025-02-22 10:11:01 -05:00
Sylvestre Ledru
693d2c4258
Merge pull request #7330 from cakebaker/fuzz_add_new_test_operators
fuzz: use new `<`/`>` operators in `fuzz_test.rs`
2025-02-21 22:47:05 +01:00
Daniel Hofstetter
41f1c6b2da fuzz: use new "<"/">" operators in fuzz_test 2025-02-21 14:58:54 +01:00
Daniel Hofstetter
34fb0dd197 fuzz: bump parse_datetime from 0.7 to 0.8 2025-02-21 14:58:11 +01:00
jfinkels
4acc59d075
test: add < and > operators for string comparison (#7315)
* test: add < and > operators for string comparison

Fixes #7254.

* Add more tests for string inequality

* Use match in place of if/elseif block

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* Change test name to specify lt/gt operator

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2025-02-21 14:41:15 +01:00
Sylvestre Ledru
d065e172f7
Merge pull request #7329 from cakebaker/clippy_fix_warnings_rust_1_85
clippy: fix/disable warnings introduced with Rust `1.85`
2025-02-21 11:22:16 +01:00
Daniel Hofstetter
9074f3fe8f clippy: disable warnings from unnecessary_map_or
because fix requires an MSRV of 1.82
2025-02-21 07:54:57 +01:00
Daniel Hofstetter
6c47989186 clippy: fix warning from precedence lint 2025-02-21 07:37:48 +01:00
Daniel Hofstetter
bc11211f6c
Merge pull request #7328 from uutils/renovate/serde-monorepo
chore(deps): update rust crate serde to v1.0.218
2025-02-20 13:28:48 +01:00
Sylvestre Ledru
12bb82fac0
Merge pull request #7294 from karlmcdowall/head_read_but_last_n_bug
head: Fix bug printing large non-seekable files
2025-02-20 12:09:57 +01:00
Bluemangoo
047ec995f2
uptime: refactor, move some codes to uucore (#7289) 2025-02-20 12:09:06 +01:00
renovate[bot]
2c84dac0b4
chore(deps): update rust crate serde to v1.0.218 2025-02-20 11:08:50 +00:00
Sylvestre Ledru
9aa872327b
Merge pull request #7321 from blmaier/conda-forge-fix-argument-list
GNUmakefile: fix install error "argument list too long"
2025-02-20 12:08:35 +01:00
Sylvestre Ledru
aaa2ebdb67
Merge pull request #7327 from cakebaker/test_remove_sleep
test: remove `sleep` from tests
2025-02-20 12:07:22 +01:00
Daniel Hofstetter
1910da5869 test: remove sleep from tests 2025-02-20 10:48:01 +01:00
Daniel Hofstetter
a2af5d60b5
Merge pull request #7320 from RenjiSann/peron/tr-fix-multiple-chars-in-eq
tr: Fix GNU behavior deviation
2025-02-19 16:40:50 +01:00
Dorian Peron
989b6ba2a0 tr: raise an error when there are two chars or more in an equivalence class 2025-02-19 16:15:40 +01:00
Daniel Hofstetter
99d4fbdd85
Merge pull request #7325 from jfinkels/rm-prompt-message-inaccessible
rm: correct prompt for removing inaccessible dir
2025-02-19 10:36:30 +01:00
Sylvestre Ledru
447b087ec4
Merge pull request #7323 from alexsnaps/issue-7219
numfmt: fix from iec-i without suffix are bytes
2025-02-19 09:41:20 +01:00
Jeffrey Finkelstein
2b531b78ef rm: correct prompt for removing inaccessible dir
Change the prompt when attempting to remove an inaccessible
directory. Before this commit, the prompt was

    rm: remove write-protected directory 'dir'?

After this commit, the prompt is

    rm: attempt removal of inaccessible directory 'dir'?

This required slightly adjusting the logic for which prompt messages to
display under which circumstances.

Fixes #7309.
2025-02-18 18:39:45 -05:00
Alex Snaps
17a409532f
Fix #7219: from iec-i without suffix are bytes
Signed-off-by: Alex Snaps <alex@wcgw.dev>
2025-02-18 17:17:29 -05:00
Brandon Maier
22db84fed0
Update GNUmakefile
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2025-02-18 14:13:31 -06:00
Brandon Maier
7628dc2299 GNUmakefile: fix install error "argument list too long"
When packaging uutils for Conda-Forge, the install of completion scripts
fails with the following error.

  make: /bin/sh: Argument list too long

The completion scripts are installed with a `foreach` loop that expands
into a single long command. That command hits the maximum argument
length on the build platform used by Conda-Forge.

To fix, we change the Make command to split each install into a seperate
command. This is done by embedding a newline in the command. See the
following for an example of how this works.

https://www.extrema.is/blog/2021/12/17/makefile-foreach-commands
2025-02-18 11:42:34 -06:00
Sylvestre Ledru
bc995283c4
Merge pull request #7304 from jfinkels/rm-recursive
rm: use recursive directory traversal with --recursive
2025-02-18 08:23:05 +01:00
Daniel Hofstetter
fb88d9d559
Merge pull request #7319 from uutils/renovate/blake3-1.x-lockfile
chore(deps): update rust crate blake3 to v1.6.0
2025-02-18 07:17:28 +01:00
Daniel Hofstetter
ffe3778c33
Merge pull request #7318 from uutils/renovate/clap_complete-4.x-lockfile
chore(deps): update rust crate clap_complete to v4.5.45
2025-02-18 07:12:13 +01:00
Daniel Hofstetter
dd85eff36f
Merge pull request #7317 from uutils/renovate/clap-4.x-lockfile
chore(deps): update rust crate clap to v4.5.30
2025-02-18 07:11:58 +01:00
renovate[bot]
7f0e678290
chore(deps): update rust crate blake3 to v1.6.0 2025-02-18 02:09:38 +00:00
Dorian Péron
ea1562b5fe
Merge pull request #7316 from jfinkels/echo-parse-escape-only
echo: use uucore::format::parse_escape_only()
2025-02-18 00:42:36 +01:00
renovate[bot]
88f296c4c6
chore(deps): update rust crate clap_complete to v4.5.45 2025-02-17 22:32:42 +00:00
renovate[bot]
d415b4c3d3
chore(deps): update rust crate clap to v4.5.30 2025-02-17 22:32:36 +00:00
Jeffrey Finkelstein
f979f97214 echo: use uucore::format::parse_escape_only()
Remove some duplicate code in favor of just calling
`uucore::format::parse_escape_only()`.

Fixes #7258.
2025-02-17 17:24:18 -05:00
Daniel Hofstetter
80fb4f3764
Merge pull request #7313 from uutils/renovate/tempfile-3.x-lockfile
fix(deps): update rust crate tempfile to v3.17.1
2025-02-17 18:02:03 +01:00
Daniel Hofstetter
883a5ede55
Merge pull request #7314 from uutils/renovate/parse_datetime-0.x
chore(deps): update rust crate parse_datetime to 0.8.0
2025-02-17 18:01:17 +01:00
renovate[bot]
ef4f32bbd0
chore(deps): update rust crate parse_datetime to 0.8.0 2025-02-17 16:36:23 +00:00
renovate[bot]
e5a2f7f942
fix(deps): update rust crate tempfile to v3.17.1 2025-02-17 16:36:16 +00:00
Jeffrey Finkelstein
1606968bf2 rm: recursive implementation of -r option
Change the implementation of `rm -r` so that it is explicitly recursive
so that (1) there is one code path regardless of whether `--verbose` is
given and (2) it is easier to be compatible with GNU `rm`.

This change eliminates a dependency on the `walkdir` crate.

Fixes #7033, fixes #7305, fixes #7307.
2025-02-17 11:18:24 -05:00
Jeffrey Finkelstein
efbc78b8ae rm: add is_dir_empty() helper function 2025-02-17 11:16:55 -05:00
Jeffrey Finkelstein
78b51cb939 rm: check write permissions instead of readonly()
Check the user write permission directly from the mode instead of using
the `Permissions::readonly()` method. This seems to more closely match
the behavior of GNU `rm`.
2025-02-17 11:16:55 -05:00
Sylvestre Ledru
58c336d5c3
Merge pull request #6040 from hamflx/main
Make mv command fallback to copy only if the src and dst are on different device
2025-02-17 08:47:06 +01:00
Sylvestre Ledru
91784d0bff
Merge pull request #7306 from jfinkels/rm-add-tests-interactive
rm: add two passing tests for -i option
2025-02-17 08:44:51 +01:00
Jeffrey Finkelstein
ba67469c9c rm: add two passing tests for -i option 2025-02-16 18:40:14 -05:00
hamflx
b96f825503 mv: Make mv command fallback to copy only if the src and dst are on different device 2025-02-17 00:22:28 +01:00
Sylvestre Ledru
511590ad44
Merge pull request #7303 from rwdj/fix-5692-usage-strings
Fix usage strings for #5692
2025-02-17 00:14:17 +01:00
Sylvestre Ledru
ab5abb9f13
Merge pull request #7308 from jfinkels/rm-simplify-remove-dir
rm: simplify remove_dir() helper function
2025-02-17 00:13:37 +01:00
Sylvestre Ledru
c53dc91279
Merge pull request #7310 from uutils/renovate/rand_core-0.x-lockfile
chore(deps): update rust crate rand_core to v0.9.1
2025-02-17 00:12:35 +01:00
Sylvestre Ledru
7c4d045a56
Merge pull request #7311 from uutils/renovate/tempfile-3.x-lockfile
fix(deps): update rust crate tempfile to v3.17.0
2025-02-17 00:12:17 +01:00
renovate[bot]
6ae81ed3c4
fix(deps): update rust crate tempfile to v3.17.0 2025-02-16 21:47:05 +00:00