Your message dated Mon, 01 Jun 2015 19:20:38 +0000
with message-id <[email protected]>
and subject line Bug#786978: fixed in python2.7 2.7.10-2
has caused the Debian Bug report #786978,
regarding python2.7: please make the build reproducible
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
786978: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786978
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: python2.7
Version: 2.7.10-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: timestamps

Hi!

While working on the “reproducible builds” effort [1], we have noticed
that python2.7 could not be built reproducibly.

The attached patch fixes several timestamps related issues:

 * A C header is generated defining the `DATE` and `TIME` macros using
   the time of the latest debian/changelog entry. The header is further
   given through `-imacros` in CPPFLAGS.
 * The time of the latest debian/changelog entry is given to sphinx via
   `SPHINXOPTS`. This will fix variations in the documentation.
 * `-n` is given to gzip when compressing devhelp to avoid a timestamp.

How DATE and TIME is set is slightly different from how it's done in
#786959 and #786965 for python 3.{5,4} as the configure script had
different quoting rules.

Unfortunately, this only makes python2.7 reproducible when
`noopt` is in `DEB_BUILD_OPTIONS`. Otherwise, objects contain random
names due to `-ffat-lto-objects`, but this ought to be fixed in GCC.

Having `nobench` in `DEB_BUILD_OPTIONS` is also required, as otherwise
`pybench.log` will contain uname output and time measurements depending
on the system work load. I'm not sure what's best for this last issue.

 [1]: https://wiki.debian.org/ReproducibleBuilds

-- 
Lunar                                .''`. 
[email protected]                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
diff -u python2.7-2.7.10/debian/changelog python2.7-2.7.10/debian/changelog
--- python2.7-2.7.10/debian/changelog
+++ python2.7-2.7.10/debian/changelog
@@ -1,3 +1,13 @@
+python2.7 (2.7.10-1.0~reproducible1) UNRELEASED; urgency=low
+
+  * Make the build reproducible:
+    - Create a datetime.h header with DATE and TIME macros set to match the
+      latest debian/changelog entry.
+    - Pass time of latest debian/changelog entry to sphinx via SPHINXOPTS.
+    - Do not store a timestamps when compressing devhelp.
+
+ -- Jérémy Bobbio <[email protected]>  Wed, 27 May 2015 11:19:39 +0200
+
 python2.7 (2.7.10-1) unstable; urgency=medium
 
   * Python 2.7.10 release.
diff -u python2.7-2.7.10/debian/rules python2.7-2.7.10/debian/rules
--- python2.7-2.7.10/debian/rules
+++ python2.7-2.7.10/debian/rules
@@ -25,6 +25,16 @@
 PKGSOURCE  := $(word 1, $(changelog_values))
 PKGVERSION := $(word 2, $(changelog_values))
 
+LAST_CHANGE = $(shell dpkg-parsechangelog -S Date)
+
+BUILD_DATE := $(shell LC_ALL=C date -u +'"%b %e %Y"' -d "$(LAST_CHANGE)")
+BUILD_TIME := $(shell LC_ALL=C date -u +'"%H:%M:%S"' -d "$(LAST_CHANGE)")
+BUILD_TIME_CCPFLAGS := -imacros $(shell pwd)/datetime.h
+
+SPHINXOPTS := -D today="$(shell LC_ALL=C date -u +"%B %d, %Y" -d "$(LAST_CHANGE)")"
+SPHINXOPTS += -D html_last_updated_fmt="$(shell LC_ALL=C date -u +"%B %d, %Y" -d "$(LAST_CHANGE)")"
+export SPHINXOPTS
+
 on_buildd := $(shell [ -f /CurrentlyBuilding -o "$$LOGNAME" = buildd -o "$$USER" = buildd ] && echo yes)
 
 ifneq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
@@ -324,7 +334,8 @@
 	mkdir -p $(buildd_shared)
 	cd $(buildd_shared) && \
 	  CC="$(CC)" AR="$(AR)" RANLIB="$(RANLIB)" \
-	  CFLAGS="$(OPT_CFLAGS)" LDFLAGS="$(DPKG_LDFLAGS)" \
+	  CFLAGS="$(OPT_CFLAGS)" CPPFLAGS="$(BUILD_TIME_CCPFLAGS)" \
+	  LDFLAGS="$(DPKG_LDFLAGS)" \
 	    $(config_site) \
 	    ../configure \
 		--enable-shared \
@@ -339,7 +350,8 @@
 	mkdir -p $(buildd_static)
 	cd $(buildd_static) && \
 	  CC="$(CC)" AR="$(AR)" RANLIB="$(RANLIB)" \
-	  CFLAGS="$(OPT_CFLAGS)" LDFLAGS="$(DPKG_LDFLAGS)" \
+	  CFLAGS="$(OPT_CFLAGS)" CPPFLAGS="$(BUILD_TIME_CCPFLAGS)" \
+	  LDFLAGS="$(DPKG_LDFLAGS)" \
 	    $(config_site) \
 	    ../configure \
 		$(common_configure_args)
@@ -353,7 +365,8 @@
 	mkdir -p $(buildd_debug)
 	cd $(buildd_debug) && \
 	  CC="$(CC)" AR="$(AR)" RANLIB="$(RANLIB)" \
-	  CFLAGS="$(DEBUG_CFLAGS)" LDFLAGS="$(DPKG_LDFLAGS)" \
+	  CFLAGS="$(DEBUG_CFLAGS)" CPPFLAGS="$(BUILD_TIME_CCPFLAGS)" \
+	  LDFLAGS="$(DPKG_LDFLAGS)" \
 	    $(config_site) \
 	    ../configure \
 		$(common_configure_args) \
@@ -368,7 +381,8 @@
 	mkdir -p $(buildd_shdebug)
 	cd $(buildd_shdebug) && \
 	  CC="$(CC)" AR="$(AR)" RANLIB="$(RANLIB)" \
-	  CFLAGS="$(DEBUG_CFLAGS)" LDFLAGS="$(DPKG_LDFLAGS)" \
+	  CFLAGS="$(DEBUG_CFLAGS)" CPPFLAGS="$(BUILD_TIME_CCPFLAGS)" \
+	  LDFLAGS="$(DPKG_LDFLAGS)" \
 	    $(config_site) \
 	    ../configure \
 		$(common_configure_args) \
@@ -661,6 +675,9 @@
 clean: control-file
 	dh_testdir
 	dh_testroot
+
+	rm -f datetime.h
+
 	$(MAKE) -f debian/rules unpatch
 	rm -rf stamps .pc
 	rm -f debian/test_results
@@ -1232,7 +1249,7 @@
 	$(buildd_static)/python debian/pyhtml2devhelp.py \
 		$(d_doc)/usr/share/doc/$(p_base)/html index.html $(VER) \
 		> $(d_doc)/usr/share/doc/$(p_base)/html/$(PVER).devhelp
-	gzip -9v $(d_doc)/usr/share/doc/$(p_base)/html/$(PVER).devhelp
+	gzip -9nv $(d_doc)/usr/share/doc/$(p_base)/html/$(PVER).devhelp
 	dh_link -p$(p_doc) \
 		/usr/share/doc/$(p_base)/html /usr/share/devhelp/books/$(PVER)
 
@@ -1383,6 +1400,10 @@
 	touch Python/graminit.c
 	ln -sf site-packages Lib/dist-packages
 
+	: # create deterministic header for date and time
+	echo '#define DATE $(BUILD_DATE)' > datetime.h
+	echo '#define TIME $(BUILD_TIME)' >> datetime.h
+
 reverse-patches: unpatch
 unpatch:
 	QUILT_PATCHES=$(patchdir) quilt pop -a -R || test $$? = 2

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Source: python2.7
Source-Version: 2.7.10-2

We believe that the bug you reported is fixed in the latest version of
python2.7, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Matthias Klose <[email protected]> (supplier of updated python2.7 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 01 Jun 2015 18:21:46 +0200
Source: python2.7
Binary: python2.7 libpython2.7-stdlib python2.7-minimal libpython2.7-minimal 
libpython2.7 python2.7-examples python2.7-dev libpython2.7-dev 
libpython2.7-testsuite idle-python2.7 python2.7-doc python2.7-dbg 
libpython2.7-dbg
Architecture: source all ppc64el
Version: 2.7.10-2
Distribution: unstable
Urgency: medium
Maintainer: Matthias Klose <[email protected]>
Changed-By: Matthias Klose <[email protected]>
Description:
 idle-python2.7 - IDE for Python (v2.7) using Tkinter
 libpython2.7 - Shared Python runtime library (version 2.7)
 libpython2.7-dbg - Debug Build of the Python Interpreter (version 2.7)
 libpython2.7-dev - Header files and a static library for Python (v2.7)
 libpython2.7-minimal - Minimal subset of the Python language (version 2.7)
 libpython2.7-stdlib - Interactive high-level object-oriented language 
(standard library
 libpython2.7-testsuite - Testsuite for the Python standard library (v2.7)
 python2.7  - Interactive high-level object-oriented language (version 2.7)
 python2.7-dbg - Debug Build of the Python Interpreter (version 2.7)
 python2.7-dev - Header files and a static library for Python (v2.7)
 python2.7-doc - Documentation for the high-level object-oriented language 
Python
 python2.7-examples - Examples for the Python language (v2.7)
 python2.7-minimal - Minimal subset of the Python language (version 2.7)
Closes: 786978
Changes:
 python2.7 (2.7.10-2) unstable; urgency=medium
 .
   * Cherry-pick some changes from the 2.7 branch:
     - Issue #24264: Fixed buffer overflow in the imageop module.
     - Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),
       PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
       to check for and handle errors correctly.
     - Issue #22095: Fixed HTTPConnection.set_tunnel with default port.  The 
port
       value in the host header was set to "None".
     - Issue #4753, backport computed gotos.
   * Configure --with-computed-gotos.
   * Make the build reproducible (Jérémy Bobbio). Closes: #786978.
     - Pass time of latest debian/changelog entry to sphinx via SPHINXOPTS.
     - Do not store a timestamps when compressing devhelp.
   * Pass DATE and TIME macros matching the current debian/changelog entry
     when building getbuildinfo.o.
   * Don't run the test_io test on sparc.
Checksums-Sha1:
 70985dc5d6c3ea4bba8c5c8921b6907e01111773 3250 python2.7_2.7.10-2.dsc
 b02a8a024d76813bfd0b97c6a49a7158240a2ed5 282003 python2.7_2.7.10-2.diff.gz
 ebe4387ed622d2b6f7d1fcfd9a1f96bac1dab3ab 309018 idle-python2.7_2.7.10-2_all.deb
 f8d2d90a8bccc25d546fbdd8bc109e4cac0abcd2 3954554 
libpython2.7-dbg_2.7.10-2_ppc64el.deb
 0b6f00c20368558d066d443965f2682fa3719154 1658220 
libpython2.7-dev_2.7.10-2_ppc64el.deb
 4d4fdc01d036dbf53ba1ffebb9604be70d90c6d1 381528 
libpython2.7-minimal_2.7.10-2_ppc64el.deb
 db4a19fad0b5817d5d48e1c7852f57808c26618a 1758366 
libpython2.7-stdlib_2.7.10-2_ppc64el.deb
 4976329a40a820c2cd3417986585c524e80c6dcd 2706304 
libpython2.7-testsuite_2.7.10-2_all.deb
 c97d00f1354d40c0de7ba666b99236f0e700047d 970034 
libpython2.7_2.7.10-2_ppc64el.deb
 6633b2cbd6eedd3051deae57b0b6f4220921062e 5969022 
python2.7-dbg_2.7.10-2_ppc64el.deb
 6e1a60ec015ccbe88f4d32742e759db6309060b6 278966 
python2.7-dev_2.7.10-2_ppc64el.deb
 b434f360c5418d6b1263312eedfeebdfdc84dde8 4293738 python2.7-doc_2.7.10-2_all.deb
 9e200a87a92ad2525fde72d7f6055945ea6245c5 594440 
python2.7-examples_2.7.10-2_all.deb
 028ae52b15b629e32b78b1e379c7c0db575e21fd 1019182 
python2.7-minimal_2.7.10-2_ppc64el.deb
 270f28f0ab955e0445ad6006aa46ae9c2ac68829 258320 python2.7_2.7.10-2_ppc64el.deb
Checksums-Sha256:
 4c92bd002493b301ff6e16e3a4e59c3e9f56ded41e7e0d0602f214c40dcd6062 3250 
python2.7_2.7.10-2.dsc
 e6079e74d6e04a521678390673ec14e583da8b368649b80df74fd832bea777d9 282003 
python2.7_2.7.10-2.diff.gz
 67193bbc48a3629499c9867833349b5edf011fbaaca94c3b779e884b1c040c5c 309018 
idle-python2.7_2.7.10-2_all.deb
 eca229358edbeed9f94ef28619b0f347704ad82e77bd498cb7ba9a00ff75d3a6 3954554 
libpython2.7-dbg_2.7.10-2_ppc64el.deb
 4a01d6ca111296c2f61706b5754a856ea8cc77a1ebdeb1cd96cf070769c3b7dc 1658220 
libpython2.7-dev_2.7.10-2_ppc64el.deb
 d80ef1ce001e6b6199a978b5e1c0236ac90f52a9a9328fe54bc98996c1850253 381528 
libpython2.7-minimal_2.7.10-2_ppc64el.deb
 44a3e10d5badb65e8772dbcb9f4cb7a07c035097b60b67674e51d5a6c20972c2 1758366 
libpython2.7-stdlib_2.7.10-2_ppc64el.deb
 530782f05b8182724ffcc9a3c81af8849565a550c83a214f627788130e4083e7 2706304 
libpython2.7-testsuite_2.7.10-2_all.deb
 f533544da01b53b4836d401c71dbab7bb76b809168590992a95c8ab5fa165447 970034 
libpython2.7_2.7.10-2_ppc64el.deb
 4eb80d78f64670f4b7d6e1e7ff1c374aa42cc33c2a6cfc5cda545b7ecc781387 5969022 
python2.7-dbg_2.7.10-2_ppc64el.deb
 36bdc3590ee01d5a418dfd8a226feef52b1aa707b2f3bf7bdc4638fff78372f6 278966 
python2.7-dev_2.7.10-2_ppc64el.deb
 baf3f1a50a6e7bd1fbb3dcd2846009598dc868e2b1f16b17e7fbcb8e2255a941 4293738 
python2.7-doc_2.7.10-2_all.deb
 fbc3c803864bf5cff3c068f5560431561c7917fff6745e7ae93bf9dc0ff6e942 594440 
python2.7-examples_2.7.10-2_all.deb
 8ade55153f0dbe42b534855e57a629a8e2ba0867b80fba7d7b377f42ef1247cf 1019182 
python2.7-minimal_2.7.10-2_ppc64el.deb
 8e8ff3da309ba36474bc51dbd08b5742cdfa56f17dbdf34d3f9a690bcf801844 258320 
python2.7_2.7.10-2_ppc64el.deb
Files:
 ad0fca38bf426b82468222b4b7cd222a 3250 python optional python2.7_2.7.10-2.dsc
 0dd1dd56feaae2bcf1eaa6b23f5bcb13 282003 python optional 
python2.7_2.7.10-2.diff.gz
 e1c51ddeac17d15b29acf876dbe79942 309018 python optional 
idle-python2.7_2.7.10-2_all.deb
 3c072dded1324c0f39f8d8f2d2a6f593 3954554 debug extra 
libpython2.7-dbg_2.7.10-2_ppc64el.deb
 158c534849695e71ee1d00e53b18a78f 1658220 libdevel optional 
libpython2.7-dev_2.7.10-2_ppc64el.deb
 1af805dd0ba5a0ed42e14448db889178 381528 python standard 
libpython2.7-minimal_2.7.10-2_ppc64el.deb
 51076d43b7c81e411704a087cec32692 1758366 python standard 
libpython2.7-stdlib_2.7.10-2_ppc64el.deb
 e8627d12b9da1f064ca15c4e00cf4b98 2706304 libdevel optional 
libpython2.7-testsuite_2.7.10-2_all.deb
 e72fd054e1538347ce54e964d633abe4 970034 libs standard 
libpython2.7_2.7.10-2_ppc64el.deb
 bf57031f1db919a94964529522d77e48 5969022 debug extra 
python2.7-dbg_2.7.10-2_ppc64el.deb
 20e10ca442bea4a689189131d795ac3a 278966 python optional 
python2.7-dev_2.7.10-2_ppc64el.deb
 2905741328372858e7cac7d4f7c8c61b 4293738 doc optional 
python2.7-doc_2.7.10-2_all.deb
 3abd8142634cc02feb851e017dd04427 594440 python optional 
python2.7-examples_2.7.10-2_all.deb
 798687d748a49d3d5696248a7761f57a 1019182 python standard 
python2.7-minimal_2.7.10-2_ppc64el.deb
 d0d28285a4f7e296713d42723da46a4b 258320 python standard 
python2.7_2.7.10-2_ppc64el.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJVbKslAAoJEL1+qmB3j6b1wGoP/jX6uu+YGu0w3EcFKtW2JLNh
Pvo2qX7EmfflFXi4acA0LpPv2FJfaZ4hZ+9YcFFkkrBT0nguBGrg0r2BBC8r0iOZ
+WmxUNmB/bTIs83glFOqXcCDFwkcxcVzchpKkSET/tHTub1xpTuFErSy+2AZPOc5
mEE8jgkyqJRQjfdjxF1UHdnJy5GvpXS25ivhH9AVuXqHCU9MqgDP+Gca8ZcKGXpE
1hxPSOjNeYgSQuaqPJPIZuCCuGkke6XlIYdAORRUBP1RjN5if56Gyri49xHVzjZ3
XSjKq24XWyZ3Xxcnzpows40I7wEgXK9an2OdUQEuHQHEDXaLyMTSvEpRS76hkGaD
es5AJ8pFu6TiPXpy9iw5lCOpA9WBGJ3J+D8z0JrsTiIoODqn6xioCX4rItlaQIRr
FiGVBzFZdNYLOm6K7OETk7iyNHj1TR5T5SEDZVf8LzPW2FeuD/BaqFl9TkZD9TAC
4u86ZawiPbO2zy1iVwcvi+LSN8GgOZQ+zFO26qdWhLoy1eFf62GpKAOJBvpRitQL
eJkaL4YDs0L1sqHoW9ZyTAe+KvVhoGSXkGR/8lH3KYT74RweQk3tHrrUyK0ovHJB
ArxgORJA8n/tprfhxGmSS0tThJgbQScdLq4D+JsMwCI5a0ASrgkjR4SmTqxhGttu
Bwm/in+ab119t9LLVxB4
=wxU0
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to