Skip to content

Instantly share code, notes, and snippets.

@lamby
Created July 30, 2016 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lamby/9ab0be90c8ba20438ccfac1b97d16181 to your computer and use it in GitHub Desktop.
Save lamby/9ab0be90c8ba20438ccfac1b97d16181 to your computer and use it in GitHub Desktop.
--- a/debian/patches/0002-reproducible-build.patch 1969-12-31 19:00:00.000000000 -0500
--- b/debian/patches/0002-reproducible-build.patch 2016-07-30 09:25:48.272066945 -0400
@@ -0,0 +1,31 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby@debian.org>
+Last-Update: 2016-07-30
+
+--- python-fabio-0.4.0+dfsg.orig/fabio/compression.py
++++ python-fabio-0.4.0+dfsg/fabio/compression.py
+@@ -96,9 +96,9 @@ def endianness():
+
+ class ExternalCompressors(object):
+ """Class to handle lazy discovery of external compression programs"""
+- COMMANDS = {".bz2": ["bzip2" "-dcf"],
+- ".gz": ["gzip", "-dcf"]
+- }
++ COMMANDS = ((".bz2", ["bzip2" "-dcf"]),
++ (".gz", ["gzip", "-dcf"]),
++ )
+
+ def __init__(self):
+ """Empty constructor"""
+@@ -107,8 +107,9 @@ class ExternalCompressors(object):
+ def __getitem__(self, key):
+ """Implement the dict-like behavior"""
+ if key not in self.compressors:
+- if key in self.COMMANDS:
+- commandline = self.COMMANDS[key]
++ for candidate, commandline in self.COMMANDS:
++ if key != candidate:
++ continue
+ testline = [commandline[0], "-h"]
+ try:
+ lines = subprocess.check_output(testline,
--- a/debian/patches/series 2016-07-30 09:15:39.681560611 -0400
--- b/debian/patches/series 2016-07-30 09:25:42.804080365 -0400
@@ -1 +1,2 @@
0001-fix-upstream-wrong-six-import.patch
+0002-reproducible-build.patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment