NixOS / infra

NixOS configurations for nixos.org and its servers
MIT License
208 stars 91 forks source link

Release tarballs now contain hardlinks #438

Closed infinisil closed 3 weeks ago

infinisil commented 3 weeks ago

Since around 2024-05-31, Nixpkgs tarballs contain encoded hardlinks.

Older tarball:

$ curl https://releases.nixos.org/nixpkgs/nixpkgs-24.11pre632986.aa61b27554a5/nixexprs.tar.xz \
  | tar -Jxvv | grep 'link to'
[no result]

Newer tarball:

$ curl https://releases.nixos.org/nixpkgs/nixpkgs-24.11pre633168.6132b0f6e344/nixexprs.tar.xz \
  | tar -Jxvv | grep 'link to'
nixpkgs-24.11pre633168.6132b0f6e344/lib/tests/modules/declare-bare-submodule-deep-option.nix
  link to nixpkgs-24.11pre633168.6132b0f6e344/lib/tests/modules/declare-bare-submodule-deep-option-duplicate.nix
nixpkgs-24.11pre633168.6132b0f6e344/lib/tests/modules/disable-recursive/foo.nix
  link to nixpkgs-24.11pre633168.6132b0f6e344/lib/tests/modules/disable-recursive/bar.nix
nixpkgs-24.11pre633168.6132b0f6e344/lib/tests/packages-from-directory/c/support-definitions.nix
  link to nixpkgs-24.11pre633168.6132b0f6e344/lib/tests/packages-from-directory/c/not-a-namespace/not-a-package.nix
nixpkgs-24.11pre633168.6132b0f6e344/nixos/modules/hardware/video/radeon.nix
  link to nixpkgs-24.11pre633168.6132b0f6e344/nixos/modules/hardware/network/broadcom-43xx.nix
nixpkgs-24.11pre633168.6132b0f6e344/pkgs/applications/networking/cluster/k3s/1_28/chart-versions.nix
  link to nixpkgs-24.11pre633168.6132b0f6e344/pkgs/applications/networking/cluster/k3s/1_27/chart-versions.nix
[...]

Because of a new Nix bug, this causes problems when fetching these tarballs with builtins.fetchTarball, which happens CI of a project I maintain. While the bug should ultimately be fixed, this will take a while, and it would be best if we could revert to not generating hardlinks in these tarfiles.

Unfortunately I don't know what causes this. I suspect it's due to an optimised store now being enabled somewhere. It might also be related to @mweinelt updating all builders on 2024-05-29. It might also be related to the nixos-channel-scripts code that repacks the archive.

This was briefly discussed on Matrix

infinisil commented 3 weeks ago

Should become more reproducible now thanks to https://github.com/NixOS/nixpkgs/pull/317122!