New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
squashfs: use -no-hardlinks for reproducible squashfs images #114454
Conversation
|
Result of 1 package marked as broken and skipped:
12 packages built:Result of 18 packages failed to build:38 packages built:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
|
This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch). Result of 1 package blacklisted:
56 packages built:
The following issues got detected with the above build packages.
_1password-gui:
warning: missing-phase-hooks Near pkgs/applications/misc/1password-gui/default.nix:29:3: See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/missing-phase-hooks.md warning: maintainers-missing Near pkgs/tools/package-management/appimagekit/default.nix:112:3: See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/maintainers-missing.md See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/missing-patch-comment.md See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/missing-patch-comment.md See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/missing-patch-comment.md warning: unused-argument warning: unused-argument warning: missing-patch-comment See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/missing-patch-comment.md warning: unused-argument error: no-flags-spaces Near pkgs/tools/admin/lxd/default.nix:43:3: See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/no-flags-spaces.md warning: missing-phase-hooks Near pkgs/applications/networking/pcloud/default.nix:65:3: See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/missing-phase-hooks.md warning: license-missing Near pkgs/development/python-modules/binwalk/default.nix:53:3: See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/license-missing.md warning: license-missing Near pkgs/development/python-modules/binwalk/default.nix:53:3: See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/license-missing.md warning: license-missing Near pkgs/development/python-modules/binwalk/default.nix:53:3: See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/license-missing.md warning: license-missing Near pkgs/development/python-modules/binwalk/default.nix:53:3: See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/license-missing.md warning: license-missing Near pkgs/development/python-modules/binwalk/default.nix:53:3: See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/license-missing.md warning: license-missing Near pkgs/development/python-modules/binwalk/default.nix:53:3: See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/license-missing.md warning: unused-argument warning: unused-argument warning: unused-argument warning: maintainers-missing Near pkgs/applications/networking/p2p/soulseekqt/default.nix:56:5: See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/maintainers-missing.md Near pkgs/applications/networking/p2p/soulseekqt/default.nix:30:3: See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/missing-phase-hooks.md warning: missing-phase-hooks Near pkgs/applications/audio/spotifywm/default.nix:17:3: See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/missing-phase-hooks.md warning: unused-argument warning: no-uri-literals See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/no-uri-literals.md |
pkgs/tools/filesystems/squashfs/0001-Mksquashfs-add-no-hardlinks-option.patch
Outdated
Show resolved
Hide resolved
the nix store may contain hardlinks: derivations may output them directly, or users may be using store optimization which automatically hardlinks identical files in the nix store. The presence of these links are intended to be a 'transparent' optimization. However, when creating a squashfs image, the image will be different depending on whether hard links were present on the filesystem, leading to reproducibility problems. By passing '-no-hardlinks' to mksquashfs the files are stored as duplicates in the squashfs image. Since squashfs has support for duplicate files this does not lead to a larger image. For more details see NixOS#114331
9b8bfab
to
1521c83
Compare
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/what-are-your-goals-for-21-05/11559/4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, LGTM!
Motivation for this change
the nix store may contain hardlinks: derivations may output them
directly, or users may be using store optimization which automatically
hardlinks identical files in the nix store.
The presence of these links are intended to be a 'transparent'
optimization. However, when creating a squashfs image, the image
will be different depending on whether hard links were present
on the filesystem, leading to reproducibility problems.
By passing '-no-hardlinks' to mksquashfs the files are stored
as duplicates in the squashfs image. Since squashfs has support
for duplicate files this does not lead to a larger image.
For more details see
#114331
Things done
Tested by manually creating a squashfs image with jfsutils both with
hard links and with duplicate files. Verified this now leads to
identical squashfs images.
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)