NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.06k stars 14.11k forks source link

gtk2: not reproducible #230277

Open raboof opened 1 year ago

raboof commented 1 year ago

Building this package twice does not produce the bit-by-bit identical result each time, making it harder to detect CI breaches. You can read more about this at https://reproducible-builds.org/ .

Fixing bit-by-bit reproducibility also has additional advantages, such as avoiding hard-to-reproduce bugs, making content-addressed storage more effective and reducing rebuilds in such systems.

Steps To Reproduce

nix-build '<nixpkgs>' -A gtk2 --check --keep-failed

You can use diffoscope to analyze the differences in the output of the two builds.

To view the build log of the build that produced the artifact in the binary cache:

nix-store --read-log $(nix-instantiate '<nixpkgs>' -A gtk2)

Additional context

https://reproducible.nixos.org/nixos-iso-gnome-runtime/diff/4253e83195b26d33cafd908507d2aea8a8c88a4f289a6c26644263525d2d95bc-e4df370b5f127ad224c9b22073efe50a89aed8cd0df0b020fd6730cf8156d45f.html

vcunat commented 1 year ago

I wonder if gtk2 might instead get removed from important closures (e.g. gnome ISO in this case).

raboof commented 1 year ago

I wonder if gtk2 might instead get removed from important closures (e.g. gnome ISO in this case).

That's a great point. It looks like the dependency comes in via gnome-shell, gdm and ibus:

/nix/store/rjxg4g44r06c62akmqyg21ssqa7agr2y-gnome-shell-44.1.drv
  /nix/store/dq9iakxlpr5mklqbal418s4r19jdzgsi-gdm-44.0.drv
    /nix/store/kfd8hj3qq0jwgx3vc0751s46k2vagnaf-ibus-1.5.28.drv
      /nix/store/k91mii00hays5hzybdwwmgbcihgdrj15-gtk+-2.24.33.drv

and also gnome-themes-extra:

/nix/store/ydmj7681xzy79v6a3idjwh4nby1akphv-gnome-themes-extra-3.28.drv
  /nix/store/k91mii00hays5hzybdwwmgbcihgdrj15-gtk+-2.24.33.drv
SuperSandro2000 commented 10 months ago

I wonder if gtk2 might instead get removed from important closures (e.g. gnome ISO in this case).

started in #270266

raboof commented 10 months ago

and also gnome-themes-extra:

/nix/store/ydmj7681xzy79v6a3idjwh4nby1akphv-gnome-themes-extra-3.28.drv
  /nix/store/k91mii00hays5hzybdwwmgbcihgdrj15-gtk+-2.24.33.drv

Filed #277944 for this