Skip to content

coreutils: 9.3 -> 9.4#264215

Merged
Artturin merged 2 commits intoNixOS:stagingfrom
trofi:coreutils-update
Nov 19, 2023
Merged

coreutils: 9.3 -> 9.4#264215
Artturin merged 2 commits intoNixOS:stagingfrom
trofi:coreutils-update

Conversation

@trofi
Copy link
Contributor

@trofi trofi commented Oct 29, 2023

Changes: https://lists.gnu.org/archive/html/info-gnu/2023-08/msg00007.html

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch. labels Oct 29, 2023
@ofborg ofborg bot requested a review from dasJ October 29, 2023 20:40
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Oct 29, 2023
@dasJ
Copy link
Member

dasJ commented Oct 30, 2023

See also #252165 which also drops some patches. Can you drop them here as well?

@trofi
Copy link
Contributor Author

trofi commented Nov 1, 2023

See also #252165 which also drops some patches. Can you drop them here as well?

AFAIU those were dropped around 9.0 -> 9.1 update (and a bit pater). coreutils does not apply any patches in 9.3. I dropped aarch64-specific sed '2i print "Skipping tail assert test"; exit 77' -i ./tests/tail-2/assert.sh from there.

@delroth delroth added the 12.approvals: 1 This PR was reviewed and approved by one person. label Nov 12, 2023
@Artturin Artturin mentioned this pull request Nov 19, 2023
12 tasks
@Artturin Artturin merged commit c2c20bb into NixOS:staging Nov 19, 2023
@Artturin
Copy link
Member

Fedora has added only one new patch for 9.4 which is related to --enable-systemd which we don't do so not relevant for us
https://src.fedoraproject.org/rpms/coreutils/blob/rawhide/f/coreutils-9.4-systemd-coredump.patch

@trofi trofi deleted the coreutils-update branch November 19, 2023 21:39
@teto teto mentioned this pull request Dec 2, 2023
@minijackson
Copy link
Member

minijackson commented Apr 4, 2024

I am getting some errors with coreutils 9.4 when using stdenv.mkDerivation with src = ./some/local/dir, during unpackPhase.

# With 9.3 (tried it manually outside the Nix sandbox)
/nix/store/59mv7mybz16jjvnkz4z5shqgaqm4k009-coreutils-full-9.3/bin/cp -pr --reflink=auto -- /nix/store/...-vim vim
# Success!

# With 9.4 (tried both inside and outside the Nix sandbox)
/nix/store/ifzwv2xqwdnv1gz87rxkizi67py5p3vj-coreutils-9.4/bin/cp -pr --reflink=auto -- /nix/store/...-vim vim
# Error:
# /nix/store/ifzwv2xqwdnv1gz87rxkizi67py5p3vj-coreutils-9.4/bin/cp: setting permissions for 'vim': Invalid argument

Can anyone confirm? I tried it on an ext4 filesystem.

@minijackson
Copy link
Member

After a running both under strace, I can see this from 9.3:

mkdirat(AT_FDCWD, "vim", 0555)          = 0
newfstatat(AT_FDCWD, "vim", {st_mode=S_IFDIR|0555, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
openat(AT_FDCWD, "vim", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = 3
newfstatat(3, "", {st_mode=S_IFDIR|0555, st_size=4096, ...}, AT_EMPTY_PATH) = 0
chmod("/proc/self/fd/3", 040755)        = 0
close(3)                                = 0

And this from 9.4:

mkdirat(AT_FDCWD, "vim", 0555)          = 0
newfstatat(AT_FDCWD, "vim", {st_mode=S_IFDIR|0555, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
fchmodat2(AT_FDCWD, "vim", 040755, AT_SYMLINK_NOFOLLOW) = -1 EINVAL (Invalid argument)

It seems they changed the way they chmod directories. According to the fchmodat manpage, EINVAL is returned when "Invalid flag specified in flags", which here is AT_SYMLINK_NOFOLLOW.

Above we can see:

AT_SYMLINK_NOFOLLOW: If pathname is a symbolic link, do not dereference it: instead operate on the link itself. This flag is not currently implemented.

This makes me confused…

@minijackson
Copy link
Member

Made a separate issue here #302046

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

Labels

10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants