-
-
Notifications
You must be signed in to change notification settings - Fork 17.5k
Description
Nixpkgs Revision
Introduction
Noticed in #400078; darwin only.
Building libavif on darwin multiple times does not yield bit-by-bit identical
results, complicating the detection of Continuous Integration (CI) breaches. For
more information on this issue, visit 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
1. Build the package
This step will build the package. Specific arguments are passed to the command
to keep the build artifacts so we can compare them in case of differences.
Execute the following command:
nix-build '<nixpkgs>' -A libavif && nix-build '<nixpkgs>' -A libavif --check --keep-failed
Or using the new command line style:
nix build nixpkgs#libavif && nix build nixpkgs#libavif --rebuild --keep-failed
2. Compare the build artifacts
If the previous command completes successfully, no differences were found and
there's nothing to do, builds are reproducible.
If it terminates with the error message error: derivation '<X>' may not be deterministic: output '<Y>' differs from '<Z>', use diffoscope to investigate
the discrepancies between the two build outputs. You may need to add the
--exclude-directory-metadata recursive option to ignore files and directories
metadata (e.g. timestamp) differences.
nix run nixpkgs#diffoscopeMinimal -- --exclude-directory-metadata recursive <Y> <Z>
3. Examine the build log
To examine the build log, use:
nix-store --read-log $(nix-instantiate '<nixpkgs>' -A PACKAGENAME)
Or with the new command line style:
nix log $(nix path-info --derivation nixpkgs#PACKAGENAME)
Diffoscope log
--- /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1
+++ /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1.check
│ --- /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1/bin
├── +++ /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1.check/bin
│ │ --- /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1/bin/avifdec
│ ├── +++ /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1.check/bin/avifdec
│ │ ├── arm64
│ │ │┄ Format-specific differences are supported for this file format but no file-specific differences were detected; falling back to a binary diff. file(1) reports: Mach-O 64-bit arm64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|PIE>
│ │ │ @@ -6982,16 +6982,16 @@
│ │ │ 0001b450: 0000 0018 0000 0000 fade 0c02 0000 03e8 ................
│ │ │ 0001b460: 0002 0400 0002 0002 0000 0068 0000 0058 ...........h...X
│ │ │ 0001b470: 0000 0000 0000 001c 0001 b440 2002 000c ...........@ ...
│ │ │ 0001b480: 0000 0000 0000 0000 0000 0000 0000 0000 ................
│ │ │ 0001b490: 0000 0000 0000 0000 0000 0000 0000 0000 ................
│ │ │ 0001b4a0: 0000 0000 0001 0000 0000 0000 0000 0001 ................
│ │ │ 0001b4b0: 6176 6966 6465 6300 0000 0000 0000 0000 avifdec.........
│ │ │ +0001b4c0: 05bf 3fb7 cb94 0d52 e8b9 5e63 25ec 0b8f ..?....R..^c%...
│ │ │ +0001b4d0: 0031 2534 fa1e c11a ac4e 09b7 66b2 7a9d .1%4.....N..f.z.
│ │ │ -0001b4c0: 1bdd 74ca ed46 9b6a 44d9 4c72 3fef b6e1 ..t..F.jD.Lr?...
│ │ │ -0001b4d0: b9eb 192c 4b60 20a2 6bb0 6c0a c8ee f02c ...,K` .k.l....,
│ │ │ 0001b4e0: ad7f acb2 586f c6e9 66c0 04d7 d1d1 6b02 ....Xo..f.....k.
│ │ │ 0001b4f0: 4f58 05ff 7cb4 7c7a 85da bd8b 4889 2ca7 OX..|.|z....H.,.
│ │ │ 0001b500: 96a5 2ef0 fd4a c10f baae f38b 5f3a cdda .....J......_:..
│ │ │ 0001b510: 8212 a235 0830 e5a9 4498 d5c7 d157 a6e7 ...5.0..D....W..
│ │ │ 0001b520: 0fcf 2811 dc9e 7782 3b7d 2d2b 50e8 d596 ..(...w.;}-+P...
│ │ │ 0001b530: 3fe6 80e0 e762 5200 03c7 9034 ee78 d44c ?....bR....4.x.L
│ │ │ 0001b540: d2dc bfb5 948d 7079 92b1 dc9d 9281 5596 ......py......U.
│ │ --- /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1/bin/avifenc
│ ├── +++ /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1.check/bin/avifenc
│ │ ├── arm64
│ │ │┄ Format-specific differences are supported for this file format but no file-specific differences were detected; falling back to a binary diff. file(1) reports: Mach-O 64-bit arm64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|PIE>
│ │ │ @@ -9108,16 +9108,16 @@
│ │ │ 00023930: 0000 0018 0000 0000 fade 0c02 0000 04e8 ................
│ │ │ 00023940: 0002 0400 0002 0002 0000 0068 0000 0058 ...........h...X
│ │ │ 00023950: 0000 0000 0000 0024 0002 3920 2002 000c .......$..9 ...
│ │ │ 00023960: 0000 0000 0000 0000 0000 0000 0000 0000 ................
│ │ │ 00023970: 0000 0000 0000 0000 0000 0000 0000 0000 ................
│ │ │ 00023980: 0000 0000 0001 8000 0000 0000 0000 0001 ................
│ │ │ 00023990: 6176 6966 656e 6300 0000 0000 0000 0000 avifenc.........
│ │ │ +000239a0: ab50 0e2f 8bb9 76e3 a008 0515 beaa 06a4 .P./..v.........
│ │ │ +000239b0: 064a f09e 1fb2 5cb3 628d 65f9 6bb6 9b3f .J....\.b.e.k..?
│ │ │ -000239a0: 0dc5 3e76 6fb2 73bd de7b 5181 fccb e530 ..>vo.s..{Q....0
│ │ │ -000239b0: 8cbd 816a bb76 c36f 5fec 2aa7 f09c 19df ...j.v.o_.*.....
│ │ │ 000239c0: ad7f acb2 586f c6e9 66c0 04d7 d1d1 6b02 ....Xo..f.....k.
│ │ │ 000239d0: 4f58 05ff 7cb4 7c7a 85da bd8b 4889 2ca7 OX..|.|z....H.,.
│ │ │ 000239e0: ad7f acb2 586f c6e9 66c0 04d7 d1d1 6b02 ....Xo..f.....k.
│ │ │ 000239f0: 4f58 05ff 7cb4 7c7a 85da bd8b 4889 2ca7 OX..|.|z....H.,.
│ │ │ 00023a00: d469 4db7 6e0d b9ab 5de9 1be6 856b e415 .iM.n...]....k..
│ │ │ 00023a10: e326 9f8f a857 3540 b462 2327 ed45 b42b .&...W5@.b#'.E.+
│ │ │ 00023a20: 0e63 f8e9 57f2 1a2e a5c0 d89d 5d6f f4f4 .c..W.......]o..
│ │ --- /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1/bin/avifgainmaputil
│ ├── +++ /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1.check/bin/avifgainmaputil
│ │ ├── arm64
│ │ │┄ Format-specific differences are supported for this file format but no file-specific differences were detected; falling back to a binary diff. file(1) reports: Mach-O 64-bit arm64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|BINDS_TO_WEAK|PIE>
│ │ │ @@ -20289,16 +20289,16 @@
│ │ │ 0004f400: 0000 0018 0000 0000 fade 0c02 0000 0a68 ...............h
│ │ │ 0004f410: 0002 0400 0002 0002 0000 0068 0000 0058 ...........h...X
│ │ │ 0004f420: 0000 0000 0000 0050 0004 f3f0 2002 000c .......P.... ...
│ │ │ 0004f430: 0000 0000 0000 0000 0000 0000 0000 0000 ................
│ │ │ 0004f440: 0000 0000 0000 0000 0000 0000 0000 0000 ................
│ │ │ 0004f450: 0000 0000 0003 4000 0000 0000 0000 0001 ......@.........
│ │ │ 0004f460: 6176 6966 6761 696e 6d61 7075 7469 6c00 avifgainmaputil.
│ │ │ +0004f470: 2769 b799 a976 0cc1 7f8e 40e3 fd7b 3b16 'i...v....@..{;.
│ │ │ +0004f480: 10c5 cdd3 0d1d fa41 1ddf 91fd 1262 d004 .......A.....b..
│ │ │ -0004f470: bb49 14fa 5cda cfc2 9528 9a18 41e0 1007 .I..\....(..A...
│ │ │ -0004f480: 83da 2351 694c f2ef 41ba 05ab aa96 ba54 ..#QiL..A......T
│ │ │ 0004f490: ad7f acb2 586f c6e9 66c0 04d7 d1d1 6b02 ....Xo..f.....k.
│ │ │ 0004f4a0: 4f58 05ff 7cb4 7c7a 85da bd8b 4889 2ca7 OX..|.|z....H.,.
│ │ │ 0004f4b0: ad7f acb2 586f c6e9 66c0 04d7 d1d1 6b02 ....Xo..f.....k.
│ │ │ 0004f4c0: 4f58 05ff 7cb4 7c7a 85da bd8b 4889 2ca7 OX..|.|z....H.,.
│ │ │ 0004f4d0: 0195 e8fa 1bae ad8c 255e 125c ebca 4c0f ........%^.\..L.
│ │ │ 0004f4e0: df37 acdf 0732 ebfc 30b2 d7ed a419 c5ed .7...2..0.......
│ │ │ 0004f4f0: 1be8 f2cd 7783 7748 ec61 9e76 bdf3 6ee8 ....w.wH.a.v..n.
│ --- /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1/lib
├── +++ /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1.check/lib
│ │ --- /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1/lib/gdk-pixbuf-2.0
│ ├── +++ /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1.check/lib/gdk-pixbuf-2.0
│ │ │ --- /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1/lib/gdk-pixbuf-2.0/2.10.0
│ │ ├── +++ /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1.check/lib/gdk-pixbuf-2.0/2.10.0
│ │ │ │ --- /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1/lib/gdk-pixbuf-2.0/2.10.0/loaders
│ │ │ ├── +++ /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1.check/lib/gdk-pixbuf-2.0/2.10.0/loaders
│ │ │ │ │ --- /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-avif.so
│ │ │ │ ├── +++ /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1.check/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-avif.so
│ │ │ │ │ ├── arm64
│ │ │ │ │ │┄ Format-specific differences are supported for this file format but no file-specific differences were detected; falling back to a binary diff. file(1) reports: Mach-O 64-bit arm64 bundle, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL>
│ │ │ │ │ │ @@ -3328,16 +3328,16 @@
│ │ │ │ │ │ 0000cff0: 0002 0400 0002 0002 0000 0078 0000 0058 ...........x...X
│ │ │ │ │ │ 0000d000: 0000 0000 0000 000d 0000 cfd0 2002 000c ............ ...
│ │ │ │ │ │ 0000d010: 0000 0000 0000 0000 0000 0000 0000 0000 ................
│ │ │ │ │ │ 0000d020: 0000 0000 0000 0000 0000 0000 0000 0000 ................
│ │ │ │ │ │ 0000d030: 0000 0000 0000 4000 0000 0000 0000 0000 ......@.........
│ │ │ │ │ │ 0000d040: 6c69 6270 6978 6275 666c 6f61 6465 722d libpixbufloader-
│ │ │ │ │ │ 0000d050: 6176 6966 2e73 6f00 0000 0000 0000 0000 avif.so.........
│ │ │ │ │ │ -0000d060: e690 0558 e71c 2d33 12c6 3d4c 96f4 bb7c ...X..-3..=L...|
│ │ │ │ │ │ -0000d070: 83e0 e2e6 8cd3 ee67 64cd e67d 9a90 5aaa .......gd..}..Z.
│ │ │ │ │ │ +0000d060: 5da3 373c cddc 06e7 4ee0 846f 5581 e9cd ].7<....N..oU...
│ │ │ │ │ │ +0000d070: 66dc d7cc fa62 e16e 4487 beea ea8f 6c4d f....b.nD.....lM
│ │ │ │ │ │ 0000d080: ad7f acb2 586f c6e9 66c0 04d7 d1d1 6b02 ....Xo..f.....k.
│ │ │ │ │ │ 0000d090: 4f58 05ff 7cb4 7c7a 85da bd8b 4889 2ca7 OX..|.|z....H.,.
│ │ │ │ │ │ 0000d0a0: 2c41 60aa 3123 75ef 775e bbac b32a 6aca ,A`.1#u.w^...*j.
│ │ │ │ │ │ 0000d0b0: 4221 062c c169 7c87 1205 3b98 4bba ccb1 B!.,.i|...;.K...
│ │ │ │ │ │ 0000d0c0: f84b c81e 59cd 6f2f f60f 91e7 a552 b333 .K..Y.o/.....R.3
│ │ │ │ │ │ 0000d0d0: f93d 5fc9 1bd8 030d 296f 2728 7f37 cea7 .=_.....)o'(.7..
│ │ │ │ │ │ 0000d0e0: ad7f acb2 586f c6e9 66c0 04d7 d1d1 6b02 ....Xo..f.....k.
│ │ --- /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1/lib/libavif.16.2.1.dylib
│ ├── +++ /nix/store/pwr20l7ffbc9njbyivlpsx5hh4w7jlzl-libavif-1.2.1.check/lib/libavif.16.2.1.dylib
│ │ ├── arm64
│ │ │┄ Format-specific differences are supported for this file format but no file-specific differences were detected; falling back to a binary diff. file(1) reports: Mach-O 64-bit arm64 dynamically linked shared library, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|NO_REEXPORTED_DYLIBS>
│ │ │ @@ -16014,16 +16014,16 @@
│ │ │ 0003e8d0: 0002 0400 0002 0002 0000 0078 0000 0058 ...........x...X
│ │ │ 0003e8e0: 0000 0000 0000 003f 0003 e8b0 2002 000c .......?.... ...
│ │ │ 0003e8f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
│ │ │ 0003e900: 0000 0000 0000 0000 0000 0000 0000 0000 ................
│ │ │ 0003e910: 0000 0000 0003 0000 0000 0000 0000 0000 ................
│ │ │ 0003e920: 6c69 6261 7669 662e 3136 2e32 2e31 2e64 libavif.16.2.1.d
│ │ │ 0003e930: 796c 6962 0000 0000 0000 0000 0000 0000 ylib............
│ │ │ +0003e940: 0044 9e64 dabb d280 2c97 6932 5609 2e15 .D.d....,.i2V...
│ │ │ +0003e950: a414 310a 3482 46c5 3682 2019 3d83 bafd ..1.4.F.6. .=...
│ │ │ -0003e940: d4e6 0bf8 16ed e523 7c75 5336 7a20 ee56 .......#|uS6z .V
│ │ │ -0003e950: 264e c673 34fa 0481 8195 5953 0ca4 36c8 &N.s4.....YS..6.
│ │ │ 0003e960: ad7f acb2 586f c6e9 66c0 04d7 d1d1 6b02 ....Xo..f.....k.
│ │ │ 0003e970: 4f58 05ff 7cb4 7c7a 85da bd8b 4889 2ca7 OX..|.|z....H.,.
│ │ │ 0003e980: ad7f acb2 586f c6e9 66c0 04d7 d1d1 6b02 ....Xo..f.....k.
│ │ │ 0003e990: 4f58 05ff 7cb4 7c7a 85da bd8b 4889 2ca7 OX..|.|z....H.,.
│ │ │ 0003e9a0: ad7f acb2 586f c6e9 66c0 04d7 d1d1 6b02 ....Xo..f.....k.
│ │ │ 0003e9b0: 4f58 05ff 7cb4 7c7a 85da bd8b 4889 2ca7 OX..|.|z....H.,.
│ │ │ 0003e9c0: ad7f acb2 586f c6e9 66c0 04d7 d1d1 6b02 ....Xo..f.....k.Notify maintainers
Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)
I assert that this issue is relevant for Nixpkgs
- I assert that this is not a duplicate of any known issue.
- I assert that I have read the NixOS Code of Conduct and agree to abide by it.
Is this issue important to you?
Add a 👍 reaction to issues you find important.