Source: virulencefinder Version: 0.0+git20190402.4812325-1 Severity: wishlist Tags: patch User: [email protected] Usertags: timestamps X-Debbugs-Cc: [email protected]
Hi, Whilst working on the Reproducible Builds effort [0] we noticed that virulencefinder could not be built reproducibly. This is because it embedded the build time into a .json file in the package. Patch attached that sets this recorded time to the value exported in the SOURCE_DATE_EPOCH[1] environment variable if it exists. [0] https://reproducible-builds.org/ [1] https://reproducible-builds.org/specs/source-date-epoch/ Regards, -- ,''`. : :' : Chris Lamb `. `'` [email protected] / chris-lamb.co.uk `-
--- a/debian/patches/reproducible_build.patch 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/reproducible_build.patch 2019-08-03 14:36:57.318059723 +0100 @@ -0,0 +1,17 @@ +Description: Make the build reproducible +Author: Chris Lamb <[email protected]> +Last-Update: 2019-08-03 + +--- virulencefinder-0.0+git20190402.4812325.orig/virulencefinder.py ++++ virulencefinder-0.0+git20190402.4812325/virulencefinder.py +@@ -473,8 +473,8 @@ for db in results: + + # Get run info for JSON file + service = os.path.basename(__file__).replace(".py", "") +-date = time.strftime("%d.%m.%Y") +-time = time.strftime("%H:%M:%S") ++date = time.strftime("%d.%m.%Y", time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))) ++time = time.strftime("%H:%M:%S", time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))) + + # Make JSON output file + data = {service: {}} --- a/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/series 2019-08-03 14:36:56.134042719 +0100 @@ -0,0 +1 @@ +reproducible_build.patch

