Commit Graph
20844 Commits
Author SHA1 Message Date
Sylvestre Ledru 8fcb17af79 ln: don't leave the temp behind when the rename is a no-op
Renaming the temp onto a destination that is already a link to the same
inode does nothing and returns success, so the temp name survived:
`ln -f a b` with b already hard-linked to a left a stray Cu* file.

Unlink the temp after the rename either way; on the normal path it is
already gone.
2026-09-16 23:48:22 +02:00
Sylvestre Ledru 0ab17fc1dd generalize the mv code for ln, cp
replace links atomically instead of unlinking first

Forced replacement was unlink(dst) then create. The gap lets another user
claim dst in a directory they can write to -- including a name the sticky
bit forbids them to remove -- so a privileged ln hands them a trusted name.
2026-09-16 23:48:22 +02:00
Sylvestre Ledru be00b4c4e1 ptx: make the code more rust idiomatic 2026-09-16 11:39:33 +02:00
Sylvestre Ledru 79fffe7223 comments: rewrite these comments to describe our own code 2026-09-16 11:39:33 +02:00
Abhijeet Vichare aeb7104176 uucore: fix test_crlf_across_blocks not compiling on Windows
result() became fallible in 0d335ebad, but this Windows-only test still
compared the io::Result values directly, and io::Error is not PartialEq.
Unwrap both before comparing.
2026-09-16 11:39:04 +02:00
xtqqczze ddd25d2f20 chore(deps): update vmactions/freebsd-vm action to v1.5.6 2026-09-16 09:24:31 +02:00
xtqqczze 811c5ef0a1 chore: fix clippy unnecessary_cast lint 2026-09-16 09:01:08 +02:00
xtqqczze 8e12283a31 chore: fix clippy unnecessary_wraps lint 2026-09-16 09:01:08 +02:00
xtqqczze b54f999f89 chore(deps): update ICU derive crates
Update the ICU derive crates to their new versions using `syn` v3:

- `yoke-derive`
- `zerofrom-derive`
2026-09-16 08:54:17 +02:00
oech3 4f11d2b173 GnuTests: autoreconf for portability 2026-09-15 21:34:13 +02:00
renovate[bot] 94123a09f5 chore(deps): update rust crate clap_complete to v4.6.11 2026-09-15 21:33:43 +02:00
xtqqczze 6910e1dc09 uucore: support process feature for aix
Add AIX to the platforms supporting the `process` feature.

The feature builds successfully with Clippy:

```console
$ RUSTC_BOOTSTRAP=1 cargo clippy -q -Zbuild-std -p uucore --features process --all-targets --target powerpc64-ibm-aix >/dev/null 2>&1; echo $?
0
```
2026-09-15 20:09:34 +02:00
xtqqczze 5ff1de4dd5 uucore: support process feature for haiku
Add Haiku to the platforms supporting the `process` feature.

The feature builds successfully with Clippy:

```console
$ RUSTC_BOOTSTRAP=1 cargo clippy -q -Zbuild-std -p uucore --features process --all-targets --target x86_64-unknown-haiku >/dev/null 2>&1; echo $?
0
```
2026-09-15 20:09:34 +02:00
oech3 3850d089f5 fix cspell 2026-09-15 19:34:08 +02:00
nagendramohan c6b9e4f092 ln: keep the destination when a forced link fails
`ln -f A B` unlinked B before attempting the link, so a link that failed
for any reason other than the destination already existing (a missing
source, a directory source, a dangling symlink with -L) left B deleted.

Attempt the link first and remove an existing destination only after the
link reports EEXIST, matching GNU, so a failed link never destroys the
destination.

Fixes #14550

Signed-off-by: nagendramohan <nagendramohan1990@gmail.com>
2026-09-15 09:42:58 +02:00
oech3 e708a7c58b CICD.yml: drop unnecessay setup, simplify 2026-09-15 09:07:51 +02:00
oech3 94811cc297 cksum: use aws-lc instead of vendored openssl on MSVC to avoid perl 2026-09-15 09:06:31 +02:00
xtqqczze 9c707a8cbf fix(build): adjust check for cross-platform building 2026-09-15 09:05:10 +02:00
xtqqczze 5dbba49d50 chore: add missing newlines around spell-checker header 2026-09-15 09:04:19 +02:00
xtqqczze feebd94221 chore: add missing newlines after copyright header 2026-09-15 09:04:19 +02:00
Zhiwei Liang c3c07acf68 ls: use name sort for -u/-c in long format
Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
2026-09-15 09:02:54 +02:00
xtqqczze 93c8043321 uucore: support fs feature for haiku
Add Haiku to the platforms supporting the `fs` feature.

The feature builds successfully with Clippy:

```console
$ RUSTC_BOOTSTRAP=1 cargo clippy -q -Zbuild-std -p uucore --features fs --all-targets --target x86_64-unknown-haiku >/dev/null 2>&1; echo $?
0
```
2026-09-15 09:02:40 +02:00
xtqqczze befedccfeb mknod: use dev_t type to avoid casting
Use `nix::sys::stat::dev_t` type for the device ID to avoid unnecessary `as` conversions.
2026-09-15 08:57:45 +02:00
xtqqczze 46af446950 test(stty): gate by target support 2026-09-15 08:52:31 +02:00
Yusuf Efe bf06f912dc csplit: always create the final split, even when empty
The rest of the input only got its own split when something was left
after the patterns, or when every pattern was a line number with
--suppress-matched. GNU always ends with that split, so a suppressed
match on the last line or an offset reaching the end of the input left
one file short. A {*} regex is the exception: it has already consumed
the input by the time it stops matching.
2026-09-15 08:22:29 +02:00