[Python-modules-team] Bug#854342: cloud-sptheme: please make the build reproducible (timestamps)
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/changelog2016-12-13 13:15:35.0 +0100 +++ cloud-sptheme-1.8.0/debian/changelog2017-02-06 09:44:13.0 +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.0 +0100 +++ cloud-sptheme-1.8.0/debian/patches/reproducible-version-name.patch 2017-02-06 09:44:13.0 +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.0 +0100 +++ cloud-sptheme-1.8.0/debian/patches/series 2017-02-06 09:44:13.0 +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 ___ Python-modules-team mailing list Python-modules-team@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team
[Python-modules-team] Bug#852289: python-passlib: please make the build reproducible (timestamps)
Source: python-passlib Version: 1.7.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 python-passlib 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, python-passlib can be built reproducibly in our current experimental framework. [1]: https://wiki.debian.org/ReproducibleBuilds Regards, -- Dhole diff -Nru python-passlib-1.7.0/debian/changelog python-passlib-1.7.0/debian/changelog --- python-passlib-1.7.0/debian/changelog 2016-11-28 17:31:28.0 +0100 +++ python-passlib-1.7.0/debian/changelog 2017-01-23 10:36:30.0 +0100 @@ -1,3 +1,11 @@ +python-passlib (1.7.0-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Use date from SOURCE_DATE_EPOCH for version number to make the build +reproducible. + + -- red <red@repro> Mon, 23 Jan 2017 10:36:30 +0100 + python-passlib (1.7.0-1) unstable; urgency=medium * Team upload. diff -Nru python-passlib-1.7.0/debian/patches/reproducible-version-name.patch python-passlib-1.7.0/debian/patches/reproducible-version-name.patch --- python-passlib-1.7.0/debian/patches/reproducible-version-name.patch 1970-01-01 01:00:00.0 +0100 +++ python-passlib-1.7.0/debian/patches/reproducible-version-name.patch 2017-01-23 10:36:30.0 +0100 @@ -0,0 +1,20 @@ +Description: Generate a reproducible version name + Use date from SOURCE_DATE_EPOCH for version number to make the build + reproducible. +Author: red <red@repro> + + +Index: python-passlib-1.7.0/setup.py +=== +--- python-passlib-1.7.0.orig/setup.py python-passlib-1.7.0/setup.py +@@ -58,7 +58,8 @@ if os.environ.get("PASSLIB_SETUP_TAG_REL + stamp = stamp.decode("ascii") + except (OSError, subprocess.CalledProcessError): + # fallback - just use build date +-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)) + + # modify version + if version.endswith((".dev0", ".post0")): diff -Nru python-passlib-1.7.0/debian/patches/series python-passlib-1.7.0/debian/patches/series --- python-passlib-1.7.0/debian/patches/series 2016-11-28 17:31:28.0 +0100 +++ python-passlib-1.7.0/debian/patches/series 2017-01-23 10:36:30.0 +0100 @@ -1 +1,2 @@ 0001-Disable-Django-support.patch +reproducible-version-name.patch ___ Python-modules-team mailing list Python-modules-team@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team