Skip to content
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

pango: devdoc target is not reproducible #118910

Closed
raboof opened this issue Apr 9, 2021 · 5 comments
Closed

pango: devdoc target is not reproducible #118910

raboof opened this issue Apr 9, 2021 · 5 comments

Comments

@raboof
Copy link
Member

raboof commented Apr 9, 2021

Describe the bug

Building the devdoc output of pango does not produce the exact same output each time it is build.

Having bit-by-bit reproducible derivations makes auditing build processes easier. This package is especially interesting since it is part of the milestone tracked by https://r13y.com

To Reproduce
Steps to reproduce the behavior:

nix-build "<nixpkgs>" -A pango.devdoc --check

Expected behavior

Success!

Additional context

There is an upstream patch to gi-docgen at https://gitlab.gnome.org/GNOME/gi-docgen/-/merge_requests/53/diffs.patch that might help, but doesn't seem to completely fix the issue yet. Starting point:

diff --git a/pkgs/development/tools/documentation/gi-docgen/default.nix b/pkgs/development/tools/documentation/gi-docgen/default.nix
index 72b5364eb45..57dbe62a667 100644
--- a/pkgs/development/tools/documentation/gi-docgen/default.nix
+++ b/pkgs/development/tools/documentation/gi-docgen/default.nix
@@ -61,6 +61,11 @@ python3.pkgs.buildPythonApplication rec {
       url = "https://gitlab.gnome.org/jtojnar/gi-docgen/commit/08dcc31f62be1a5af9bd9f8f702f321f4b5cffde.patch";
       sha256 = "vAT8s7zQ9zCoZWK+6PsxcD5/48ZAfIOl4RSNljRCGWQ=";
     })
+    # make DevHelp sections & index.json have stable ordering
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/gi-docgen/-/merge_requests/53/diffs.patch";
+      sha256 = "sha256-nG0Dt///w7agXAvWNtGdBQSaKMXNHraGO1svmn9FynI=";
+    })
   ];
 
   nativeBuildInputs = [
@zopieux
Copy link
Contributor

zopieux commented Apr 9, 2021

The latest commit should address all issues, but I need help reproducing the (lack of) reproducibility. Can anyone check compiling pango before/after patching, to confirm the devhelp and index.json diffs are now gone? Thanks.

@zopieux
Copy link
Contributor

zopieux commented Apr 9, 2021

OK managed to reproduce pango not being reproducible at HEAD. With the patch, I cannot get it to fail after multiple attempts, even under stress(1) load.

@zopieux
Copy link
Contributor

zopieux commented Apr 9, 2021

Now waiting for upstream to merge.

It's merged!

@raboof
Copy link
Member Author

raboof commented Apr 10, 2021

Can confirm this fixes it here as well!

PR'ed as #118978 to get the patch in for 21.05

@oxalica
Copy link
Contributor

oxalica commented Apr 26, 2021

Maybe this can be closed now?

@raboof raboof closed this as completed Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants