Commit graph

689 commits

Author SHA1 Message Date
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
Sylvestre Ledru
038ad04ca9 github/action: add jobs to verify that l10n works 2025-08-01 13:55:27 +02:00
Nicolas Boichat
b4c6ad1b33
CI: GnuTests: Split native and selinux tests to 2 different jobs (#8388)
Some checks are pending
CICD / Build (push) Blocked by required conditions
CICD / Test all features separately (push) Blocked by required conditions
CICD / Style/deps (push) Waiting to run
CICD / Style/cargo-deny (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 / 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/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
* .github/workflows/GnuTests.yml: Move variables to env

Will make it easier to split the work into 2 jobs.

* .github/workflows/GnuTests.yml: Move all Selinux steps to a separate job

* .github/workflows/GnuTests.yml: Create a new summary job

That aggregates between native and selinux results.

* .github/workflows/GnuTests.yml: Fix log uploading

This... didn't work, even in the previous version.

(found by Gemini...)

* .github/workflows/GnuTests.yml: Improve aggregate

Variables don't always help make things clearer.

* .github/workflows/GnuTests.yml: Make selinux and native flow identical

Also add some headers to make things easier to follow.

* .github/workflows/GnuTests.yml: More misc cleanup

In particular, SELinux flow is simplified, and fixed.

Also fix artifact download name.

* .github/workflows/GnuTests.yml: Fix aggregate job
2025-07-27 21:06:50 +02:00
Nicolas Boichat
f327174539 .github/workflows: Check that target/CACHEDIR.TAG is created
There was a small bug in `Makefile` that caused the `target`
directory to be created by `install`, not `cargo`, which
lead to a missing `target/CACHEDIR.TAG`.

Test for that in CI, so that the issue does not recur.
2025-07-26 23:40:13 +08:00
Nicolas Boichat
e0eda096a1 .github/workflows/CICD.yml: Speed up Build/SELinux
We can at least use 4 cores instead of 1.
2025-07-25 01:04:27 +08:00
Sylvestre Ledru
cc296d8e14 gh/action: add missing locales for tests/fmt/non-space.sh 2025-06-30 00:06:52 +02:00
Sylvestre Ledru
eaa6d228b1 Use mozilla fluent linter (and remove mine) 2025-06-28 19:01:33 +02:00
Sylvestre Ledru
aa4a85a4ff add a job to verify that pre-commit works 2025-06-21 21:15:15 +02:00
renovate[bot]
812955893d
chore(deps): update vmactions/freebsd-vm action to v1.2.1 2025-06-15 13:01:29 +00:00
renovate[bot]
a23106c7b1
chore(deps): update dawidd6/action-download-artifact action to v11 2025-06-14 22:00:41 +00:00
Daniel Hofstetter
3f22053f72 ci: add missing braces 2025-06-08 14:02:43 +02:00
Daniel Hofstetter
d23bbc1329 ci: adapt ARTIFACTS_SUFFIX if "features" not set 2025-06-08 13:44:55 +02:00
Sylvestre Ledru
858db601aa
Merge pull request #7964 from kevinburke/no-selinux-mac
GNUMakefile: fix compilation on Macs
2025-06-06 11:58:26 +02:00
Sylvestre Ledru
e39037c699 GNU CI: also build selinux with --release-build 2025-06-03 21:41:01 +02:00
Daniel Hofstetter
dfc2e249ef
Merge pull request #7894 from drinkcat/jiff-date-ls
date/ls: Switch from chrono to jiff
2025-06-02 09:36:27 +02:00
renovate[bot]
ee9e91a77c
chore(deps): update dawidd6/action-download-artifact action to v10 2025-05-31 18:30:55 +00:00
Sylvestre Ledru
94132060b6
Merge pull request #8030 from drinkcat/clippy-better
Some checks are pending
CICD / Build (push) Blocked by required conditions
CICD / Style/cargo-deny (push) Waiting to run
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
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 (push) Waiting to run
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
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
clippy pre-commit/CI improvements
2025-05-29 15:05:15 +02:00
Nicolas Boichat
eb5fc4c4cb Cross.toml: Install tzdata in container
Linux tests require that now, as we now assume /usr/share/zoneinfo
is present.
2025-05-29 14:00:25 +02:00
Nicolas Boichat
7854efc802 code-quality.yml: Clippy with --all-features and --workspace on ubuntu
Without this, some uucore packages are not properly tested.
2025-05-29 13:55:32 +02:00
Sylvestre Ledru
075cdcf21f CI: also install the spanish locale 2025-05-28 23:45:58 +02:00
Kevin Burke
24ff36ee88
.github: add additional combination to CI 2025-05-27 15:09:40 -07:00
Daniel Hofstetter
a57bb7f084 ci: reduce timeout of freebsd jobs
from 90 min to 45 min
2025-05-26 09:45:50 +02:00
Nicolas Boichat
aa3947a1cc .github/workflows/CICD.yml: Do not update gcc
The issue referenced has been long fixed, and for reasons not
totally clear to me, blake3 fails after the GCC update (I tried
to dig into this, but couldn't really figure out if this is really
a problem with GCC 15, or with the version provided by MSYS, or
some other side effect of the exact sequence in CI).

Since blake3 CI doesn't do that gcc update (it uses the default gcc ~12
in the github windows image), let's _also_ not do that, and if there's a
real problem with gcc 15+, that'll presumably fail their CI as well.

Fixes #7977.
2025-05-25 15:12:05 +02:00
Nicolas Boichat
c6473e1bbd Revert "CICD: Disable windows-latest/x86_64-pc-windows-gnu for now"
This reverts commit deef8cbfd6.

A new onig release has happened, this should fix the issue.
2025-05-25 15:05:57 +02:00
Sylvestre Ledru
263ba63203
Merge pull request #7959 from cakebaker/ci_install_libselinux1_dev
ci: install `libselinux1-dev` for coverage job
2025-05-20 09:56:25 +02:00
Daniel Hofstetter
3c406b877b ci: fix "unexpected input 'file'" warning
in code coverage job
2025-05-19 17:00:16 +02:00
Daniel Hofstetter
baa70d8e2c ci: install libselinux1-dev for coverage job 2025-05-19 16:32:46 +02:00
Daniel Hofstetter
04ca61dce4 ci: run "cargo fmt --check" in fuzz folder 2025-05-19 14:38:07 +02:00
Daniel Hofstetter
aec2eeac05 ci: bump markdownlint-cli2-action from v19 to v20 2025-05-18 21:08:27 +02:00
Daniel Hofstetter
1e476d9749 ci: remove trailing spaces at line end 2025-05-18 21:08:27 +02:00