Source: cloud-sptheme Version: 1.8.0-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, While working on the "reproducible builds" effort [1], we have noticed that cloud-sptheme could not be built reproducibly. The version string of the package includes a timestamp that is generated at build time. The attached patch fixes this by using SOURCE_DATE_EPOCH as the timestamp for the version string. Once applied, cloud-sptheme can be built reproducibly in our current experimental framework. [1]: https://wiki.debian.org/ReproducibleBuilds Regards, -- Dhole
diff -Nru cloud-sptheme-1.8.0/debian/changelog cloud-sptheme-1.8.0/debian/changelog --- cloud-sptheme-1.8.0/debian/changelog 2016-12-13 13:15:35.000000000 +0100 +++ cloud-sptheme-1.8.0/debian/changelog 2017-02-06 09:44:13.000000000 +0100 @@ -1,3 +1,11 @@ +cloud-sptheme (1.8.0-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Use date from SOURCE_DATE_EPOCH for version number to make the build + reproducible. + + -- Eduard Sanou <dh...@openmailbox.org> Mon, 06 Feb 2017 09:44:13 +0100 + cloud-sptheme (1.8.0-1) unstable; urgency=medium [ Ondřej Nový ] diff -Nru cloud-sptheme-1.8.0/debian/patches/reproducible-version-name.patch cloud-sptheme-1.8.0/debian/patches/reproducible-version-name.patch --- cloud-sptheme-1.8.0/debian/patches/reproducible-version-name.patch 1970-01-01 01:00:00.000000000 +0100 +++ cloud-sptheme-1.8.0/debian/patches/reproducible-version-name.patch 2017-02-06 09:44:13.000000000 +0100 @@ -0,0 +1,17 @@ +Description: Generate a reproducible version name + Use date from SOURCE_DATE_EPOCH for version number to make the build + reproducible. +Author: Eduard Sanou <dh...@openmailbox.org> + +--- cloud-sptheme-1.8.0.orig/setup.py ++++ cloud-sptheme-1.8.0/setup.py +@@ -31,7 +31,8 @@ if os.environ.get("CLOUD_SETUP_TAG_RELEA + raise subprocess.CalledProcessError(1, []) + stamp = stamp.decode("ascii") + except (OSError, subprocess.CalledProcessError): +- stamp = time.strftime("%Y%m%d%H%M%S") ++ build_date = int(os.environ.get('SOURCE_DATE_EPOCH', time.time())) ++ stamp = time.strftime("%Y%m%d%H%M%S", time.gmtime(build_date)) + version += ".post" + stamp + + #========================================================= diff -Nru cloud-sptheme-1.8.0/debian/patches/series cloud-sptheme-1.8.0/debian/patches/series --- cloud-sptheme-1.8.0/debian/patches/series 2016-12-13 13:15:35.000000000 +0100 +++ cloud-sptheme-1.8.0/debian/patches/series 2017-02-06 09:44:13.000000000 +0100 @@ -1,3 +1,4 @@ 0001-move-themes-to-usr-share.patch 0002-add-missing-table_styling.css.patch 0003-Remove-cookies-and-tracking.patch +reproducible-version-name.patch