1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 12:07:46 +00:00
Commit graph

828 commits

Author SHA1 Message Date
Sylvestre Ledru
785ae3c954
Merge pull request #7767 from cakebaker/bump_bincode
Bump `bincode` & adapt test code to API changes
2025-04-17 17:58:39 +02:00
Daniel Hofstetter
219e87d57c
Merge pull request #7752 from sylvestre/stat-C
stat: add support for selinux
2025-04-16 11:06:36 +02:00
Daniel Hofstetter
8590f51f85 uptime: adapt test to API changes in bincode 2025-04-16 11:02:52 +02:00
Daniel Hofstetter
e263ff3167 Bump bincode from 1.3.3 to 2.0.1 2025-04-16 10:21:42 +02:00
Sylvestre Ledru
c7d39dded6 stat: add support for selinux 2025-04-16 10:21:37 +02:00
Etienne Cordonnier
21d5cef153 remove feat_os_unix_musl
After the addition of utmpx, feat_os_unix_musl is now identical to feat_os_unix and is thus not needed any more.

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
2025-04-15 12:51:55 +02:00
Etienne Cordonnier
f0440ae85f enable utmpx feature for musl
bump libc to 0.2.172

musl provides stubs of utmpx functions, and those stubs are available in the
libc crate version 0.2.172. Thus let's enable the feature so that it can
compile with musl.  Note that those stubs always return a success exit value,
and commands such as "users" will report an empty list of users, when calling
those stubs.

This is consistent with the behavior of GNU coreutils which does the same thing.

The coreutils utillities using utmpx are "pinky", "uptime", "users", "who".
This is the expected behavior when using those utilities compiled with those musl utmpx stubs:
```
root@qemuarm64:~# users
root@qemuarm64:~# echo $?
0
root@qemuarm64:~# pinky
Login    Name                 TTY      Idle   When         Where
root@qemuarm64:~# echo $?
0
root@qemuarm64:~# uptime
 12:58:47 up 0 min,  0 users,  load average: 0.07, 0.02, 0.00
root@qemuarm64:~# echo $?
0
root@qemuarm64:~# who
root@qemuarm64:~# echo $?
0
```

Closes #1361

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
2025-04-15 12:51:55 +02:00
Yuri Astrakhan
6e22b69e9c fix a low-count lints in all crates
Running this command showed a list of all lints across all crates:

```shell
cargo clippy --all-targets --workspace --message-format=json --quiet | jq -r '.message.code.code | select(. != null and startswith("clippy::"))' | sort | uniq -c | sort -h -r
```

This resulted in a list that I added to the `[workspace.lints.clippy]` in the root Cargo.toml. Afterwards, I commented out a few simpler lints. Subsequentely, I will go through this list, trying to address items in smaller batches.
2025-04-14 13:41:48 -04:00
Sylvestre Ledru
efb09204a2
Merge pull request #7748 from cakebaker/clippy_move_lints_from_ci_to_cargo_toml
Move clippy lints from CI to `Cargo.toml`
2025-04-13 18:51:53 +02:00
Daniel Hofstetter
32dcaeef32 Move clippy lints from CI to Cargo.toml 2025-04-13 17:35:05 +02:00
Daniel Hofstetter
80b6a2155c
Merge pull request #7635 from sylvestre/temp-selinux-impl
mkdir: add the selinux support
2025-04-13 14:49:52 +02:00
Sylvestre Ledru
e4c7bd0641
Merge pull request #7724 from nyurik/ref-option
chore: fix `ref_option` lint
2025-04-12 23:37:57 +02:00
Etienne Cordonnier
bd53e904d7 enable feature_require_crate_cpp for musl
I am not sure what the original issue was, but it seems to work:

```
cargo build --target=x86_64-unknown-linux-musl --features feat_os_unix_musl
...
coreutils$ ./target/x86_64-unknown-linux-musl/debug/coreutils stdbuf -o L echo "foobar"
foobar
```
2025-04-12 19:57:29 +02:00
Sylvestre Ledru
842f47b372 uucore: move the selinux function 2025-04-12 18:43:02 +02:00
Yuri Astrakhan
ac5a913996 chore: fix ref_option lint
Resolve [ref_option](https://rust-lang.github.io/rust-clippy/master/index.html#ref_option) lint.  Also, I optimized `is_first_filename_timestamp` a bit to make it faster and more streamlined.

p.s. disclaimer: I'm the author of that lint
2025-04-11 12:12:54 -04:00
Sylvestre Ledru
5bfbc30fba
Merge pull request #7715 from nyurik/unused_qualifications
Enable and fix `unused_qualifications` lint
2025-04-10 18:11:08 -04:00
Yuri Astrakhan
9f56bf5f07 Enable and fix unused_qualifications lint
Improve code readability
2025-04-10 16:54:18 -04:00
Yuri Astrakhan
895b208391 Consolidate crate config in workspace
Make all common data like version, edition, license, ... be managed in one central workspace. This makes management much simpler
2025-04-10 16:52:01 -04:00
renovate[bot]
9e98b79930
chore(deps): update rust crate uutils_term_grid to 0.7 2025-04-10 16:38:54 +00:00
Yuri Astrakhan
2413dc9168 Consolidate lint management with workspaces
At the moment, most crates rely on build scripts and other methods to keep lint-consistency. As of recent, Rust can use workspaces to globally set all the lint configurations.

This PR only adds lint configuration to each crate, but it does not introduce any changes to the code or lint configuration. In the subsequent PRs, I plan to gradually move lints from `uucore` to workspace, making all code consistent.

Note that `seq` relies on a custom lint config - which means its configuration may need to be managed by hand until Cargo introduces per-crate overrides.
2025-04-09 03:58:46 -04:00
renovate[bot]
d5258d2800
chore(deps): update rust crate crossterm to 0.29.0 2025-04-05 18:00:15 +00:00
Dorian Péron
61b7f4b54b
Merge pull request #7598 from sylvestre/uutests2
Move our tests infra into a dedicated crate
2025-03-28 22:32:49 +01:00
Sylvestre Ledru
50fe623447 Create the uutest crate + adjust the code
+ move some of the tests into the program test
2025-03-28 21:40:31 +01:00
Nicolas Boichat
2555fd4039 Cargo.toml: We moved to edition 2024, drop = from fts-sys 2025-03-27 10:29:46 +01:00
Daniel Hofstetter
5a0988c28d
Merge pull request #7420 from uutils/renovate/fts-sys-0.x
chore(deps): update rust crate fts-sys to v0.2.16
2025-03-25 16:25:01 +01:00
renovate[bot]
611a320396
chore(deps): update rust crate fts-sys to v0.2.16 2025-03-25 13:25:38 +00:00
renovate[bot]
bde8165f7f
chore(deps): update rust crate selinux to v0.5.1 2025-03-25 12:39:47 +00:00
renovate[bot]
4a3b034457
chore(deps): update rust crate selinux-sys to v0.6.14 2025-03-25 09:55:08 +00:00
renovate[bot]
944cd4f72c
chore(deps): update rust crate hex-literal to v1 2025-03-25 08:37:05 +00:00
Sylvestre Ledru
e0fbced116 rust edition 2021 => 2024 2025-03-24 21:00:35 +01:00
Sylvestre Ledru
f5eff9517f Bump MSRV to 1.85.0 2025-03-24 21:00:16 +01:00
Tuomas Tynkkynen
cacb1a4fcb cp: Use FICLONE ioctl constant from linux-raw-sys
The current ioctl operation code for FICLONE is fully open-coded instead
of using the ioctl macros, which makes it non-portable to other
architectures including mips, arm & powerpc. Get the constant from the
linux-raw-sys crate instead, which is already a transitive dependency.
2025-03-13 18:23:48 +02:00
Sylvestre Ledru
7747c41549 Force specific version of selinux and fts which doesn't require rust 2024 edition
$ cargo +1.82.0 update --package selinux-sys --precise 0.6.13 && cargo fetch --locked --quiet
2025-03-08 11:43:09 +01:00
Sylvestre Ledru
105a90c9df prepare version 0.0.30 2025-03-08 11:04:08 +01:00
Daniel Hofstetter
e177f7a6b0 Remove once_cell dependency & use LazyLock 2025-03-05 11:02:56 +01:00
Nicolas Boichat
a43fd11266 Bump MSRV to 1.82.0
Fixes #7393.
2025-03-04 09:46:55 +01:00
renovate[bot]
cef8d35f07
chore(deps): update rust crate rstest to 0.25.0 2025-03-02 17:49:56 +00: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]
7bb2bb2f30
chore(deps): update rust crate selinux to 0.5.0 2025-02-07 05:22:35 +00:00
Daniel Hofstetter
02cd31a4d9 Cargo.toml: fix incorrect lint name 2025-02-04 16:09:58 +01:00
Daniel Hofstetter
05ae1704ab Bump rand & rand_core to 0.9.0
rand from 0.8.5, rand_core from 0.6.4
2025-01-30 08:52:42 +01:00
Daniel Hofstetter
019da22964 Remove rand_pcg 2025-01-28 09:12:55 +01:00
Daniel Hofstetter
fa0eb3dd15 Bump nom from 7.1.3 to 8.0.0 2025-01-27 09:43:24 +01:00
danieleades
5d6a04ab71
Fix clippy warning manual_if_else (#7177)
and enable the rule
2025-01-23 22:49:13 +01:00
Dorian Peron
ed4edb4b8a cksum: Add crc32b algorithm 2025-01-20 12:08:36 +01:00
renovate[bot]
fb3637439f
chore(deps): update rust crate parse_datetime to 0.7.0 2025-01-19 21:39:48 +00:00
Daniel Hofstetter
6bedec53ad Bump chrono-tz from 0.8.6 to 0.10.0 2025-01-16 11:44:45 +01:00
Jeffrey Finkelstein
dac35129d2 date: add dependencies for managing time zones
Add dependencies on third-party packages `chrono-tz` and
`iana-time-zone` to our `date` package. Together, these two packages
allow us to produce time zone abbreviations (like `UTC`) from numeric
timezone offsets.
2025-01-14 17:49:11 -05:00
Sylvestre Ledru
aef4234fb5 New release 2025-01-11 14:01:27 +01:00
renovate[bot]
5770414424
chore(deps): update rust crate notify to v8 2025-01-11 06:59:02 +00:00