Commit graph

12374 commits

Author SHA1 Message Date
Ulrich Hornung
a2a375d0dd
using other than TERM/KILL signal to see if --preserve-status works 2024-03-12 19:05:51 +01:00
Ulrich Hornung
38b15c9736
wait for child to stop after sending signal 2024-03-12 19:04:46 +01:00
Ulrich Hornung
abfd000367
avoid sending twice same signal to child process 2024-03-12 19:04:15 +01:00
Sylvestre Ledru
1725479c06
hashsum: also escape/unescape files with checks (#5868)
* hashsum: make tag conflicts with --text and --check

* hashsum: change the case in one of the gnu test

* build-gnu.sh: use symlink instead of copy

Plus: it won't cp new md5

* hashsum: also escape/unescape files with checks

Should fix tests/cksum/md5sum-bsd.sh

* improve the variable name

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

* Improve test

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

* Improve test

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

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-03-12 14:56:27 +01:00
Sylvestre Ledru
cc1142cee6
Merge pull request #6057 from uutils/renovate/blake3-1.x
chore(deps): update rust crate blake3 to 1.5.1
2024-03-12 11:14:38 +01:00
renovate[bot]
3515cd44e7
chore(deps): update rust crate blake3 to 1.5.1 2024-03-12 09:35:22 +00:00
Sylvestre Ledru
9de409de97
Merge pull request #6055 from cakebaker/bump_nix
Bump nix from 0.27 to 0.28 & fix issues due to API changes
2024-03-12 10:33:57 +01:00
Daniel Hofstetter
14ac1e160f cat: adapt to type change of unistd::write()
nix 0.28 changed "write(fd: RawFd, buf: &[u8]) -> Result<usize>" to "write<Fd: AsFd>(fd: Fd, buf: &[u8]) -> Result<usize>"
2024-03-12 08:31:15 +01:00
Daniel Hofstetter
6fd37da3e2 stty: remove ofill output flag
flag was removed from nix::sys::termios::OutputFlags in nix 0.28
2024-03-12 08:31:15 +01:00
Daniel Hofstetter
1413054c53 tty: unistd::ttyname takes AsFd instead of RawFd
change introduced by nix 0.28
2024-03-12 08:31:15 +01:00
Daniel Hofstetter
15cb0242ea uucore/pipes: adapt to new return type of nix fn
nix 0.28 changed the return type of unistd::pipe() from Result<(RawFd, RawFd), Error> to Result<(OwnedFd, OwnedFd), Error>
2024-03-12 08:31:15 +01:00
Daniel Hofstetter
ae7bc7d2e3 Bump nix from 0.27 to 0.28 2024-03-12 08:31:15 +01:00
Sylvestre Ledru
ffb70592ec
Merge pull request #5851 from cre4ture/fix/install_invalid_link_at_destination
Fix install: invalid link at destination
2024-03-12 08:02:18 +01:00
Ulrich Hornung
7cd754eb1f
Fix install: invalid link at destination
also remove some FixMEs for FreeBsd
2024-03-11 23:31:26 +01:00
Sylvestre Ledru
93b1abff39
Merge pull request #6036 from cj-zoltan-kiss/zoltankiss/globfix
parser: if closing square bracket not found, stop looking for it again
2024-03-11 19:51:18 +01:00
Zoltan Kiss
be24742282 parser: if closing square bracket not found, stop looking for it again
This solves #5584, where the fuzzing would take hours without this.
2024-03-11 17:24:01 +01:00
Daniel Hofstetter
0da5a7885b
Merge pull request #6056 from sylvestre/refactor-copy-function
cp: Split the copy_file function a bit
2024-03-11 15:49:27 +01:00
Sylvestre Ledru
df585edff9 cp: Split the copy_file function a bit 2024-03-11 14:55:22 +01:00
Sylvestre Ledru
89b326fe1e
cp: improve the support of --attributes-only (#6051)
* cp: improve the support of --attributes-only

* remove useless comments

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

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-03-11 08:35:27 +01:00
Sylvestre Ledru
80702d5391
Merge pull request #6014 from BenWiederhake/dev-shuf-range-off-by-one
shuf: Fix off-by-one errors in range handling
2024-03-10 22:44:12 +01:00
Sylvestre Ledru
fe0c814bd5
Merge pull request #6012 from BenWiederhake/dev-tr-stream
tr: Stream output instead of buffering
2024-03-10 22:38:13 +01:00
Sylvestre Ledru
2e8f0e501c
Merge pull request #6039 from BenWiederhake/dev-chcon-repeat-args
chcon: Handle repeated flags and overrides between --no-XXX and --XXX
2024-03-10 22:36:57 +01:00
Yury Zhytkou
156d3f7ee7
cut: allow non utf8 characters for delimiters (#6037) 2024-03-10 22:36:17 +01:00
Sylvestre Ledru
da9682da7a
Merge pull request #6054 from cakebaker/pr_chgrp_fix_warnings
pr/chgrp: fix warnings
2024-03-10 22:34:49 +01:00
Daniel Hofstetter
0579233b2d chgrp: fix clippy warning 2024-03-10 13:56:31 +01:00
Daniel Hofstetter
9054a24fb7 pr: fix deprecation warnings & remove comment 2024-03-10 13:55:49 +01:00
Daniel Hofstetter
1eaa87cd62
Merge pull request #6052 from sylvestre/clippy43
Fix clippy warnings
2024-03-10 13:31:08 +01:00
Terts Diepraam
a578fe9e55
Merge pull request #6050 from matrixhead/main
dd : treat arg as bytes if it contains a 'B'
2024-03-10 12:52:29 +01:00
Yash Thakur
d11d595fda
touch: Respect -h when getting metadata (#5951)
* Add tests that stat symlinks

* Check follow first in stat

* Don't run tests on FreeBSD

It would be possible to get them to run on FreeBSD by avoiding
get_symlink_times, but the behavior we're testing is not
platform-specific, so it's fine to not test it on FreeBSD.

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2024-03-10 08:05:59 +01:00
Sylvestre Ledru
8c7940260b
Merge pull request #6047 from cakebaker/bump_chrono
Bump chrono to 0.4.35 & replace usage of deprecated functions
2024-03-10 07:51:50 +01:00
Ben Wiederhake
8be5f7a89d chcon: allow repeated flags and arguments 2024-03-09 22:52:55 +01:00
Ben Wiederhake
dbfd4d80ee chcon: allow overriding between --dereference and --no-dereference 2024-03-09 22:52:55 +01:00
Ben Wiederhake
b233569b9c shuf: fix error message text on negative-sized ranges
Found by @cakebaker:
https://github.com/uutils/coreutils/pull/6011#discussion_r1501838317
2024-03-09 22:51:13 +01:00
Ben Wiederhake
4ee3f68e6a shuf: fix and test off-by-one errors around ranges 2024-03-09 22:51:13 +01:00
Ben Wiederhake
9cbe6055fa tr: stream output instead of buffering
This should lower memory consumption, and fixes OOM in some scenarios.
2024-03-09 22:51:04 +01:00
Sylvestre Ledru
6c29ed037b
Merge pull request #6042 from BenWiederhake/dev-chown-preserve-root
chown+chgrp+chmod: Fix handling of preserve root flag and error messages
2024-03-09 22:44:59 +01:00
Sylvestre Ledru
991d71856f
Merge pull request #6043 from cre4ture/fix/flaky_split_round_robin_limited_fds
Fix/flaky `split` round robin limited fds
2024-03-09 22:43:41 +01:00
Sylvestre Ledru
dcfb03aad6 Fix clippy warnings 2024-03-09 22:31:33 +01:00
mhead
1819cdee3b dd: treat arg as bytes if it contains 'B' 2024-03-10 01:38:50 +05:30
Daniel Hofstetter
b34d410ade
Merge pull request #6049 from uutils/renovate/softprops-action-gh-release-2.x
chore(deps): update softprops/action-gh-release action to v2
2024-03-09 07:11:28 +01:00
renovate[bot]
cd010add8c
chore(deps): update softprops/action-gh-release action to v2 2024-03-08 22:30:33 +00:00
Ulrich Hornung
db142f9449
use std::command::pre_exec() to set limits on child before exec 2024-03-08 20:30:34 +01:00
Ulrich Hornung
dab02d005d
split: close as much fds as needed for opening new one 2024-03-07 23:49:27 +01:00
Ben Wiederhake
d25d994125 uucore: drop unused function resolve_relative_path
This function is by necessity ill-defined: Depending on the context,
'..' is either the logical parent directory, sometimes the physical
parent directory. This function can only work for the latter case,
in which case `Path::canonicalize` is often a better approach.
2024-03-07 14:58:02 +01:00
Ben Wiederhake
5c2c38c31e chgrp+chown: also trigger preserve-root during dirwalking, fix error message
This is explicitly tested in the GNU tests.
2024-03-07 14:58:02 +01:00
Ben Wiederhake
bf5d7f786b chmod: slightly adjust error message when preserve-root is triggered
One of the GNU tests checks for the exact error message.
2024-03-07 14:49:41 +01:00
Daniel Hofstetter
aad8f7d8b5 touch: replace use of deprecated chrono functions 2024-03-06 18:16:49 +01:00
Daniel Hofstetter
c45c00eed4 ls: use chrono::TimeDelta::try_seconds instead of
deprecated chrono::TimeDelta::seconds
2024-03-06 17:51:19 +01:00
Daniel Hofstetter
a1c14fb550 Bump chrono from 0.4.34 to 0.4.35 2024-03-06 17:48:46 +01:00
Ulrich Hornung
294c9de3ae extend error message for case when writer instanciation fails second time 2024-03-05 20:43:25 +01:00