Source: ninja-build Version: 1.9.0-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: environment X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0], we noticed that ninja-build could not be built reproducibly. This is because the output from the --help/--usage command includes the number of CPUs on the current system and, when persisted to the manpage, means that the package contents will change depending on the number of CPUs on the build system. Patch attached. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/reproducible-build.patch 1969-12-31 21:00:00.000000000 -0300 --- b/debian/patches/reproducible-build.patch 2019-07-15 09:24:48.818456297 -0300 @@ -0,0 +1,24 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2019-07-15 + +--- ninja-build-1.9.0.orig/src/ninja.cc ++++ ninja-build-1.9.0/src/ninja.cc +@@ -211,7 +211,7 @@ void Usage(const BuildConfig& config) { + " -C DIR change to DIR before doing anything else\n" + " -f FILE specify input build file [default=build.ninja]\n" + "\n" +-" -j N run N jobs in parallel (0 means infinity) [default=%d on this system]\n" ++" -j N run N jobs in parallel (0 means infinity) [default=#CPUs]\n" + " -k N keep going until N jobs fail (0 means infinity) [default=1]\n" + " -l N do not start new jobs if the load average is greater than N\n" + " -n dry run (don't run commands but act like they succeeded)\n" +@@ -220,7 +220,7 @@ void Usage(const BuildConfig& config) { + " -t TOOL run a subtool (use '-t list' to list subtools)\n" + " terminates toplevel options; further flags are passed to the tool\n" + " -w FLAG adjust warnings (use '-w list' to list warnings)\n", +- kNinjaVersion, config.parallelism); ++ kNinjaVersion); + } + + /// Choose a default value for the -j (parallelism) flag. --- a/debian/patches/series 1969-12-31 21:00:00.000000000 -0300 --- b/debian/patches/series 2019-07-15 09:24:47.482498635 -0300 @@ -0,0 +1 @@ +reproducible-build.patch