On 2019-10-08, Chris Lamb wrote: > Whilst working on the Reproducible Builds effort [0] we noticed > that stgit could not be built reproducibly. > > This is because the contents of the dynamically-compiled Bash > completion script was not being generated in a deterministic manner, > as well as the cmdlist.py module. > > Patch attached.
Uploaded an NMU fixing this: diff -Nru stgit-0.19/debian/changelog stgit-0.19/debian/changelog --- stgit-0.19/debian/changelog 2019-10-03 05:38:18.000000000 -0700 +++ stgit-0.19/debian/changelog 2022-12-01 11:53:31.000000000 -0800 @@ -1,3 +1,12 @@ +stgit (0.19-1.1) unstable; urgency=medium + + * Non-maintainer upload. + + [ Chris Lamb ] + * Make the build reproducible. (Closes: #942009) + + -- Vagrant Cascadian <vagr...@reproducible-builds.org> Thu, 01 Dec 2022 11:53:31 -0800 + stgit (0.19-1) unstable; urgency=medium [ Maximiliano Curia ] diff -Nru stgit-0.19/debian/patches/reproducible_build stgit-0.19/debian/patches/reproducible_build --- stgit-0.19/debian/patches/reproducible_build 1969-12-31 16:00:00.000000000 -0800 +++ stgit-0.19/debian/patches/reproducible_build 2022-12-01 11:53:00.000000000 -0800 @@ -0,0 +1,33 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2019-10-08 + +--- stgit-0.19.orig/stgit/argparse.py ++++ stgit-0.19/stgit/argparse.py +@@ -260,7 +260,7 @@ class CompgenBase(object): + cmd += ['-A', act] + words = self.words(var) + if words: +- cmd += ['-W', '"%s"' % ' '.join(words)] ++ cmd += ['-W', '"%s"' % ' '.join(sorted(words))] + cmd += ['--', '"%s"' % var] + return ' '.join(cmd) + +@@ -310,4 +310,4 @@ class patch_range(CompgenBase): + for e in self.__endpoints: + assert not e.actions(var) + words |= e.words(var) +- return set(['$(_patch_range "%s" "%s")' % (' '.join(words), var)]) ++ return set(['$(_patch_range "%s" "%s")' % (' '.join(sorted(words)), var)]) + +--- stgit-0.19.orig/stgit/commands/__init__.py ++++ stgit-0.19/stgit/commands/__init__.py +@@ -63,7 +63,7 @@ + def py_commands(commands, f): + f.write('from __future__ import unicode_literals\n\n') + f.write('command_list = {\n') +- for name, (mod, kind, help) in commands.items(): ++ for name, (mod, kind, help) in sorted(commands.items()): + f.write(' %r: (\n' % name) + f.write(' %r,\n' % mod) + f.write(' %r,\n' % kind) diff -Nru stgit-0.19/debian/patches/series stgit-0.19/debian/patches/series --- stgit-0.19/debian/patches/series 2019-10-03 05:38:18.000000000 -0700 +++ stgit-0.19/debian/patches/series 2022-12-01 11:53:00.000000000 -0800 @@ -2,3 +2,4 @@ stg-gitk_bashism disable_interactive_test Avoid-the-git-error-messages-when-running-stg-outside-of-.patch +reproducible_build
signature.asc
Description: PGP signature