[Python-apps-commits] r13283 - in packages/osc/trunk/debian (4 files)
nijel at users.alioth.debian.org
nijel at users.alioth.debian.org
Fri Jun 3 09:54:39 UTC 2016
Date: Friday, June 3, 2016 @ 09:54:38
Author: nijel
Revision: 13283
Add patch to make build reproducible (Closes: #826093).
Added:
packages/osc/trunk/debian/patches/reproducible-manpage-date.patch
Modified:
packages/osc/trunk/debian/changelog
packages/osc/trunk/debian/patches/osc-build.patch
packages/osc/trunk/debian/patches/series
Modified: packages/osc/trunk/debian/changelog
===================================================================
--- packages/osc/trunk/debian/changelog 2016-06-03 07:27:04 UTC (rev 13282)
+++ packages/osc/trunk/debian/changelog 2016-06-03 09:54:38 UTC (rev 13283)
@@ -1,3 +1,9 @@
+osc (0.154.0-3) UNRELEASED; urgency=medium
+
+ * Add patch to make build reproducible (Closes: #826093).
+
+ -- Michal ÄŒihaÅ™ <nijel at debian.org> Fri, 03 Jun 2016 11:53:53 +0200
+
osc (0.154.0-2) unstable; urgency=medium
* Install bash completion (Closes: #824583).
Modified: packages/osc/trunk/debian/patches/osc-build.patch
===================================================================
--- packages/osc/trunk/debian/patches/osc-build.patch 2016-06-03 07:27:04 UTC (rev 13282)
+++ packages/osc/trunk/debian/patches/osc-build.patch 2016-06-03 09:54:38 UTC (rev 13283)
@@ -27,7 +27,7 @@
'build-root': '/abuild/oscbuild-%(repo)s-%(arch)s',
'packagecachedir': '/var/cache/osbuild',
'su-wrapper': 'sudo',
-@@ -102,7 +102,7 @@
+@@ -103,7 +103,7 @@
'su-wrapper': 'sudo',
# build type settings
@@ -36,7 +36,7 @@
'build-type': '', # may be empty for chroot, kvm or xen
'build-root': '/var/tmp/build-root/%(repo)s-%(arch)s',
'build-uid': '', # use the default provided by build
-@@ -175,7 +175,7 @@
+@@ -178,7 +178,7 @@
'maintained_update_project_attribute': 'OBS:UpdateProject',
'show_download_progress': '0',
# path to the vc script
Added: packages/osc/trunk/debian/patches/reproducible-manpage-date.patch
===================================================================
--- packages/osc/trunk/debian/patches/reproducible-manpage-date.patch (rev 0)
+++ packages/osc/trunk/debian/patches/reproducible-manpage-date.patch 2016-06-03 09:54:38 UTC (rev 13283)
@@ -0,0 +1,33 @@
+Description: Reproducible man page date
+ Set the man page date from the environment variable SOURCE_DATE_EPOCH
+ (if set), to make the build reproducible.
+ See https://reproducible-builds.org/specs/source-date-epoch/
+Author: Alexis Bienvenüe <pado at passoire.fr>
+
+--- osc-0.154.0.orig/osc/cmdln.py
++++ osc-0.154.0/osc/cmdln.py
+@@ -45,8 +45,8 @@ import re
+ import cmd
+ import optparse
+ import sys
++import time
+ from pprint import pprint
+-from datetime import date
+
+ # this is python 2.x style
+ def introspect_handler_2(handler):
+@@ -619,9 +619,13 @@ class RawCmdln(cmd.Cmd):
+ usage:
+ ${name} man
+ """
++ if os.getenv("SOURCE_DATE_EPOCH"):
++ srcdate = time.gmtime(int(os.getenv("SOURCE_DATE_EPOCH")))
++ else:
++ srcdate = time.localtime()
+ self.stdout.write(bytes(
+ self.man_header % {
+- 'date': date.today().strftime('%b %Y'),
++ 'date': time.strftime('%b %Y',srcdate),
+ 'version': self.get_version(),
+ 'name': self.name,
+ 'ucname': self.name.upper()
Modified: packages/osc/trunk/debian/patches/series
===================================================================
--- packages/osc/trunk/debian/patches/series 2016-06-03 07:27:04 UTC (rev 13282)
+++ packages/osc/trunk/debian/patches/series 2016-06-03 09:54:38 UTC (rev 13283)
@@ -1 +1,2 @@
+reproducible-manpage-date.patch
osc-build.patch
More information about the Python-apps-commits
mailing list