Commit graph

702 commits

Author SHA1 Message Date
Sylvestre Ledru
d4e47861bb add a github check for programs not using traversal 2025-10-06 13:57:50 +02:00
Daniel Hofstetter
98f617a29c ci: fix "a sequence was not expected" error
in the CICD workflow
2025-10-06 11:31:44 +02:00
Sylvestre Ledru
8b6613782b
Merge pull request #8810 from oech3/ln
Allow to replace ln -fs and hardlink on Windows by default
2025-10-05 17:45:52 +02:00
Cả thế giới là Rust
02312bfffd
fix: Gate SELinux to Linux and add cross-platform CI tests (#8795)
Gate SELinux functionality to Linux-only and provide stub implementations
for chcon/runcon on non-Linux platforms to maintain cross-platform builds.

Changes:
- Gate all SELinux code with target_os = "linux" checks
- Add stub main() for chcon/runcon on non-Linux with user-friendly errors
- Add CI job to verify stubs build correctly on macOS and Windows
- Update ls to check both selinux feature AND target_os

Benefits:
- Fixes build failures on macOS/Windows (#8581, #7996, #7695, #6491)
- Maintains workspace buildability across all platforms
- Provides clear error messages instead of silent failures
- Prevents accidental SELinux usage on unsupported platforms

CI Testing:
- New 'Build/SELinux-Stubs (Non-Linux)' job tests macOS and Windows
- Verifies stub binaries are created and compilation succeeds
- Validates full workspace builds with stubs present

Addresses maintainer feedback in PR #8795
2025-10-05 14:23:59 +02:00
E
0fc825bcb9
Add test for LN=
Add test for make LN="ln -svf" and make LN="ln -vf"
2025-10-05 01:02:08 +09:00
Zhang Wen
c360af0315 id: add test for digital format username 2025-10-02 16:30:18 +08:00
Sylvestre Ledru
20c27790ff
Merge pull request #8702 from Ecordonnier/eco/makefile-stdbuf
Some checks are pending
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 / 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
CICD / Run benchmarks (CodSpeed) (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
CICD / Build (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
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/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
makefile: fix build with overriden UTILS
2025-09-26 08:42:56 +02:00
Etienne Cordonnier
873c37691d makefile: fix build with overriden UTILS
The make build was failing when the list of UTILS didn't contain stdbuf.
This fixes this issue by adding feat_externa_libstdbuf only when stdbuf is being compiled.

Fixes https://github.com/uutils/coreutils/issues/8701

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
2025-09-25 22:29:45 +02:00
Sylvestre Ledru
955b100517 github/action: improve the clippy run
freebsd was detecting issues the linux jobs were not
2025-09-25 22:05:22 +02:00
Daniel Hofstetter
189b095fd1
Merge pull request #8736 from uutils/sylvestre-patch-1
Add tests/tail/overlay-headers to the intermittent list
2025-09-25 09:29:10 +02:00
Sylvestre Ledru
b65343d18d codspeed: ignore the output 2025-09-24 21:18:50 +02:00
Sylvestre Ledru
2d64a69f3d
Add tests/tail/overlay-headers to the intermittent list 2025-09-24 21:15:34 +02:00
Daniel Hofstetter
af105d4e56
Merge pull request #8720 from sylvestre/bump-coreutils
upgrade to GNU coreutils 9.8 as ref
2025-09-24 07:26:52 +02:00
E
8cd543028f Add missing completions 2025-09-23 18:14:35 +00:00
E
ccad0882bb
Check man1/md5sum.1 present 2025-09-24 00:46:45 +09:00
Sylvestre Ledru
39f7e2846a upgrade to GNU coreutils 9.8 as ref 2025-09-23 16:03:15 +02:00
Sylvestre Ledru
59fac183bf github/action/benchmark: improve the build/run 2025-09-23 12:09:47 +02:00
Sylvestre Ledru
e3f5a23603 benchmarking: move the common functions into uucore 2025-09-23 12:09:32 +02:00
Tobias Powalowski
8ed215529f
Merge pull request #8647 from tpowa/tpowa-patch-cksum-symlinks
Add hashsum symlinks with tests
2025-09-22 23:06:21 +02:00
renovate[bot]
d9872b881d
chore(deps): update vmactions/freebsd-vm action to v1.2.4 2025-09-21 20:54:23 +00:00
Sylvestre Ledru
8ee9bc2ae6 github: improve the codspeed configuration 2025-09-21 09:30:46 +02:00
Sylvestre Ledru
913c5b36a8 evaluate codspeed for perfs 2025-09-20 18:36:08 +02:00
Sylvestre Ledru
7b0d7dc5e6 gh/action: fix a test as we changed the permissions on the files 2025-09-15 11:33:12 +02:00
renovate[bot]
00dc334621
chore(deps): update actions/checkout action to v5 2025-09-12 08:15:17 +00:00
Sylvestre Ledru
28dde64d7e github action: add a check that uudoc works 2025-09-11 22:46:12 +02:00
Sylvestre Ledru
5c33a30eec
Merge pull request #8585 from Ecordonnier/eco/musl-libc-fix
Some checks are pending
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
CheckScripts / ShellScript/Check (push) Waiting to run
CheckScripts / ShellScript/Format (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/lint (push) Waiting to run
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
Code Quality / Style/format (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
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
link musl libc statically
2025-09-09 13:27:18 +02:00
Etienne Cordonnier
e722250e7d link musl libc statically
In the context of musl, users are typically expecting statically-linked tools,
as this is one of musl's strong suits and one of the biggest reasons to use it
instead of glibc (that is not static-link-friendly for reasons).

- remove the build-flag which was causing musl libc to be linked dynamically
- re-add feat_os_unix_musl which was removed in 21d5cef153
- exclude stdbuf from feat_os_unix_musl, since libstdbuf.so can't be built with a statically linked musl libc
- add test_musl_no_dynamic_deps so that this does not regress in the future

Fixes https://github.com/uutils/coreutils/issues/8572

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
2025-09-09 12:53:32 +02:00
Sylvestre Ledru
ec37f1beca manage the locales when the program is coming from crates.io
Closes: #8569
2025-09-09 10:10:51 +02:00
Sylvestre Ledru
76755009da uufuzz: add examples and them in the CI 2025-09-06 12:19:40 +02:00
renovate[bot]
48afe94432
chore(deps): update actions/github-script action to v8 2025-09-04 17:47:37 +00:00
renovate[bot]
60f04300c6
chore(deps): update actions/setup-python action to v6 2025-09-04 05:37:26 +00:00
Sylvestre Ledru
9c29c2e98a github action: moz-fluent-l10n runs a directory, not a file 2025-08-31 12:19:59 +02:00
Etienne
bba4d99042
add support for systemd-logind (#8483)
Some checks are pending
CICD / Build/stable (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
Devcontainer / Verify devcontainer (push) Waiting to run
L10n (Localization) / L10n/Installation Test (Make & Cargo) (push) Waiting to run
L10n (Localization) / L10n/Locale Support Verification (push) Waiting to run
L10n (Localization) / L10n/Locale Embedding Regression Test (push) Waiting to run
L10n (Localization) / L10n/French Integration Test (push) Waiting to run
L10n (Localization) / L10n/Multi-call Binary Install Test (push) Waiting to run
WSL2 / Test (push) Waiting to run
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 / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Style/toml (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
L10n (Localization) / L10n/Build and Test (push) Waiting to run
L10n (Localization) / L10n/Fluent Syntax Check (push) Waiting to run
L10n (Localization) / L10n/Clap Error Localization Test (push) Waiting to run
* add support for systemd-logind

Add support for systemd-logind for systems where `/var/run/utmp` does not exist any more (e.g. Ubuntu 25.04).

Here is some context explaining the switch from utmp to systemd-logind:
https://www.thkukuk.de/blog/Y2038_glibc_utmp_64bit/

Fixes https://github.com/uutils/coreutils/issues/8376

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>

* fix duplicated boot record

When feature feat_systemd_logind is enabled and utmp is present, two boot records were printed.

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>

* improve error forwarding

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

* remove unnecessary negation in if/else block

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

* use getpwuid_r() instead of getpwuid()

getpwuid() is not thread-safe.

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>

* improve error handling

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>

* use Path instead of string

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>

* use closure to reduce the number of clones() calls

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>

* use MaybeUninit instead of mem::zeroed()

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>

* systemd-logind: add some unit-tests

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>

* use sysconf(_SC_GETPW_R_SIZE_MAX) instead of 1024

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>

* fix cspell

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>

* add auto-enablement of feat_systemd_logind in GNUmakefile

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>

* Revert "add auto-enablement of feat_systemd_logind in GNUmakefile"

This breaks "Tests/BusyBox test suite" in CI.

This reverts commit 16626d4653.

---------

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2025-08-23 19:05:40 +02:00
Sylvestre Ledru
06b14c027c
Merge pull request #8486 from martinkunkel2/devcontainer
Some checks failed
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Tests/Toybox test suite (push) Blocked by required conditions
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 / Aggregate GNU test results (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (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/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
L10n (Localization) / L10n/Installation Test (Make & Cargo) (push) Waiting to run
L10n (Localization) / L10n/Locale Support Verification (push) Waiting to run
L10n (Localization) / L10n/Locale Embedding Regression Test (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Devcontainer / Verify devcontainer (push) Waiting to run
L10n (Localization) / L10n/Build and Test (push) Waiting to run
L10n (Localization) / L10n/Fluent Syntax Check (push) Waiting to run
L10n (Localization) / L10n/French Integration Test (push) Waiting to run
WSL2 / Test (push) Waiting to run
L10n (Localization) / L10n/Clap Error Localization Test (push) Waiting to run
L10n (Localization) / L10n/Multi-call Binary Install Test (push) Waiting to run
CheckScripts / ShellScript/Format (push) Has been cancelled
CheckScripts / ShellScript/Check (push) Has been cancelled
Add devcontainer setup and small related fixes
2025-08-23 11:55:47 +02:00
renovate[bot]
8fc273ec1e
chore(deps): update mfinelli/setup-shfmt action to v4 2025-08-22 21:42:48 +00:00
Martin Kunkel
e41c1405c9 Add devcontainer setup and small related fixes
- Added devcontainer configuration based on Ubuntu 24.04
- Added GitHub Actions workflow for devcontainer testing
- Update cSpell configuration to ingore spelling in devcontainer configs
- Update pre-commit hooks to exclude cSpell.json because pre-commit
  fails for that file due to json with comments format
- Fix filename for cSpell config in vscode settings
- Two tests in `test_dd.rs` are now skipped if /dev/sda1 is not
  available, which is the case in devcontainer
- Update check for existing gnu clone in build-gnu.sh, not checking the
  existence of the directory but the presence of the .git directory.
  This allows us to have the directly as a volume mount in devcontainer
- Remove temporary file `g` after use in build-gnu.sh
2025-08-18 07:34:16 +00:00
renovate[bot]
f780a720c8
chore(deps): update vmactions/freebsd-vm action to v1.2.3 2025-08-17 08:38:25 +00:00
renovate[bot]
b10d9c803c
chore(deps): update vmactions/freebsd-vm action to v1.2.2 2025-08-16 12:56:46 +00:00
Sylvestre Ledru
82043f2ce3 run fuzz_non_utf8_paths in the ci 2025-08-14 10:52:24 +02:00
renovate[bot]
8fcd4ea579 chore(deps): update actions/checkout action to v5 2025-08-14 10:52:24 +02:00
Sylvestre Ledru
333ce0c119 l10n/github action: verify that clap localization works 2025-08-14 10:52:03 +02:00
renovate[bot]
a1de8f7bf5
chore(deps): update actions/checkout action to v5 2025-08-11 15:31:34 +00:00
Nicolas Boichat
730d7d8c7a .github/workflows/CICD.yml: Create a fully fake utmp
Looks like the "system boot" entry is not present in /var/lib/utmp
on recent ubuntu-latest images.

Not totally clear why it disappeared, but let's just create a fake
one instead.
2025-08-09 21:43:18 +08:00
Martin Kunkel
a10813cdc2
Do not build SELinux programs on FreeBSD when using make (#8443)
Some checks are pending
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 / Test all features separately (push) Blocked by required conditions
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
L10n (Localization) / L10n/Build and Test (push) Waiting to run
L10n (Localization) / L10n/Fluent Syntax Check (push) Waiting to run
L10n (Localization) / L10n/French Integration Test (push) Waiting to run
L10n (Localization) / L10n/Multi-call Binary Install Test (push) Waiting to run
L10n (Localization) / L10n/Installation Test (Make & Cargo) (push) Waiting to run
L10n (Localization) / L10n/Locale Support Verification (push) Waiting to run
L10n (Localization) / L10n/Locale Embedding Regression Test (push) Waiting to run
WSL2 / Test (push) Waiting to run
* Do not build SELinux programs on FreeBSD

* FreeBSD: test building with make
2025-08-07 23:29:57 +02:00
Nicolas Boichat
01819d021e
Merge pull request #8334 from cakebaker/ci_use_macos_latest
ci: use `macos-latest` instead of `macos-13`
2025-08-06 20:59:04 +08:00
renovate[bot]
2f48f7a653
chore(deps): update actions/download-artifact action to v5 2025-08-06 01:59:29 +00:00
Daniel Hofstetter
4e311ed89b
Merge pull request #8423 from sylvestre/en-embedded
Some checks are pending
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/Python (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/toml (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
L10n (Localization) / L10n/Locale Embedding Regression Test (push) Waiting to run
L10n (Localization) / L10n/Build and Test (push) Waiting to run
L10n (Localization) / L10n/Fluent Syntax Check (push) Waiting to run
L10n (Localization) / L10n/French Integration Test (push) Waiting to run
L10n (Localization) / L10n/Multi-call Binary Install Test (push) Waiting to run
L10n (Localization) / L10n/Installation Test (Make & Cargo) (push) Waiting to run
L10n (Localization) / L10n/Locale Support Verification (push) Waiting to run
WSL2 / Test (push) Waiting to run
l10n: embedded english strings + test the whole thing in github
2025-08-03 15:08:10 +02:00
Martin Kunkel
3b4b769976
tests: fix execution on WSL2, Ubuntu 24.04 (#8235)
* tests: fix execution on WSL2, Ubuntu 24.04

Skip incompatible parts of tests to ensure that
    cargo nextest run --features unix
executes successfully in WSL2, Ubuntu 24.04 distribution.

Changes
* Skip tests that required sys/kernel/profiling which is not
available in WSL2 default configuration.
* Use timezones in tests that are part of the standard tzdata
list and not only available in backwards list. Backwards list is
not installed by default in Ubuntu 24.04 (package tzdata-legacy).
* check that /proc/modules is not empty when expecting content,
because it is empty in WSL2 default configuration.
* Skip logname test not only in WSL1, also in WSL2.

* Add workflow for WSL2

This will setup WSL2 on windows-latest runner, install
Ubuntu-24.04, and run the feat_os_unix tests.

* wsl2: implemented review findings

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2025-08-03 14:38:49 +02:00
Sylvestre Ledru
df2fca588c l10n: when built indiv, only embed the relevant locale file 2025-08-03 10:59:38 +02:00
Daniel Hofstetter
7b75aca95a ci: use macos-latest instead of macos-13
the macos-13 image will be retired in November 2025
2025-08-02 16:18:34 +02:00