Skip to content

GnuTests: use coreutils-from-gnu - #15007

Open
oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:gnu
Open

oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:gnu

Conversation

@oech3

@oech3 oech3 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Closes #15005 Closes #14998

@xtqqczze

xtqqczze commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

We should explicitly remove uutils and document why:

sudo apt-get remove -y coreutils-from-uutils --allow-remove-essential

@oech3

oech3 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Conflicting packages are automatically removed. No?

@xtqqczze

xtqqczze commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

@BAMF0 Any advice on the best way to completely remove uutils from Ubuntu in CI?

@oech3

oech3 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Actually, we don't need to avoid all of uutils as system coreutils. We just need to manually symlink id at a moment.

@xtqqczze

xtqqczze commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

I think it would be preferable not to have uutils in the runner environment for consistency and predictability.

@oech3
oech3 force-pushed the gnu branch 2 times, most recently from 01e05c1 to 272b32b Compare October 1, 2026 12:31
@oech3 oech3 changed the title GnuTests.yml: use coreutils-from-gnu to avoid trouble with uutils GnuTests.yml: use GNU id as system coreutils Oct 1, 2026
@BAMF0

BAMF0 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

@BAMF0 Any advice on the best way to completely remove uutils from Ubuntu in CI?

I recommend explicitly installing coreutils-from-gnu with the following command:

 apt install coreutils-from-gnu coreutils-from-uutils- --allow-remove-essential

where coreutils-from-uutils- means "remove uutils" essentially

@BAMF0

BAMF0 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

To make sure it's really gone, you can also subsequently run:

apt remove rust-coreutils

@oech3 oech3 changed the title GnuTests.yml: use GNU id as system coreutils GnuTests: use coreutils-from-gnu Oct 1, 2026
@oech3
oech3 marked this pull request as ready for review October 1, 2026 13:30
@oech3

oech3 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Thanks. We only need to care about binaries on $PATH. So rust-coreutils is OK.

sudo apt-get update
## Check that build-gnu.sh works on the non SELinux system by installing libselinux only on lima
sudo apt-get install -y gperf gdb python3-pyinotify valgrind libexpect-perl libacl1-dev libattr1-dev libcap-dev attr quilt
## Use GNU as system coreutils to avoid trouble e.g. <https://github.com/uutils/coreutils/issues/14998>

@xtqqczze xtqqczze Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for clarity and to isolate --allow-remove-essential, could you write this as as separate command, something like:

Suggested change
## Use GNU as system coreutils to avoid trouble e.g. <https://github.com/uutils/coreutils/issues/14998>
# Use GNU coreutils instead of uutils coreutils, matching the system
# environment expected by the tests.
sudo apt-get install -y coreutils-from-gnu coreutils-from-uutils- --allow-remove-essential

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One command has less network access. I would symlink loop from coreutils --list if I separate it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I don't think "environment expected by the tests" is right.

@oech3

oech3 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

I don't think using coreutils-from-uutils at our CI is problem since it is generally comatible with GNU (expect for fuzzing).
We just met an expection at here.

@xtqqczze

xtqqczze commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

In general, I’d prefer using a different coreutils implementation in CI, as using the same implementation seems likely to cause more issues going forward.

@xtqqczze

xtqqczze commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Congrats! The gnu test tests/id/setgid is no longer failing!
Congrats! The gnu test tests/touch/now-owned-by-other is no longer failing!

@abendrothj

abendrothj commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Installing GNU fixes the flake, but these tests still won't check our build: nobody can't reach it under /home/runner (0750), so the chroot tests now run GNU's binaries instead of the image's uutils. This PR's own run shows it: id/setgid prints gid=65535 groups=65535, which is GNU's format, and touch/now-owned-by-other passes only because GNU's touch ran. With our build reachable it fails, touch: setting times of 'root-owned': Permission denied (fork run; that's #15019). The two changes combine fine: GNU as the system coreutils plus the chmod o+x from #15005.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: GNU test tests/id/setgid fails intermittently on unrelated PRs

4 participants