Jérémy Bobbio:
> Tags: patch

For real.

-- 
Lunar                                .''`. 
lu...@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
diff -Nru python3.5-3.5.0~b1/debian/changelog python3.5-3.5.0~b1/debian/changelog
--- python3.5-3.5.0~b1/debian/changelog	2015-05-26 02:08:27.000000000 +0200
+++ python3.5-3.5.0~b1/debian/changelog	2015-05-27 09:29:22.000000000 +0200
@@ -1,3 +1,12 @@
+python3.5 (3.5.0~b1-1.0~reproducible1) UNRELEASED; urgency=low
+
+  * Make the build reproducible:
+    - Set -DDATE and -DTIME 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 <lu...@debian.org>  Tue, 26 May 2015 20:46:30 +0200
+
 python3.5 (3.5.0~b1-1) unstable; urgency=medium
 
   * Python 3.5.0 beta 1.
diff -Nru python3.5-3.5.0~b1/debian/rules python3.5-3.5.0~b1/debian/rules
--- python3.5-3.5.0~b1/debian/rules	2015-05-26 02:07:36.000000000 +0200
+++ python3.5-3.5.0~b1/debian/rules	2015-05-27 09:28:58.000000000 +0200
@@ -23,6 +23,17 @@
 PKGSOURCE  := $(call vafilt,$(CHANGELOG_VARS),Source)
 PKGVERSION := $(call vafilt,$(CHANGELOG_VARS),Version)
 
+LAST_CHANGE = $(shell dpkg-parsechangelog -S Date)
+
+BUILD_DATE := $(shell LC_ALL=C date -u +'"%H:%M:%S"' -d "$(LAST_CHANGE)")
+BUILD_TIME := $(shell LC_ALL=C date -u +'"%b %e %Y"' -d "$(LAST_CHANGE)")
+export BUILD_DATE BUILD_TIME
+BUILD_TIME_CCPFLAGS := -DDATE="$$$$BUILD_DATE" -DTIME="$$$$BUILD_TIME"
+
+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)))
@@ -339,7 +350,7 @@
 	mkdir -p $(buildd_shared)
 	cd $(buildd_shared) && \
 	  CC="$(CC)" CXX="$(CXX)" AR="$(AR)" RANLIB="$(RANLIB)" CFLAGS="$(OPT_CFLAGS)" \
-	  CPPFLAGS="$(DPKG_CPPFLAGS)" LDFLAGS="$(DPKG_LDFLAGS)" \
+	  CPPFLAGS='$(DPKG_CPPFLAGS) $(BUILD_TIME_CCPFLAGS)' LDFLAGS="$(DPKG_LDFLAGS)" \
 	    $(config_site) \
 	    ../configure \
 		--enable-shared \
@@ -357,7 +368,7 @@
 	mkdir -p $(buildd_static)
 	cd $(buildd_static) && \
 	  CC="$(CC)" CXX="$(CXX)" AR="$(AR)" RANLIB="$(RANLIB)" CFLAGS="$(OPT_CFLAGS)" \
-	  CPPFLAGS="$(DPKG_CPPFLAGS)" LDFLAGS="$(DPKG_LDFLAGS)" \
+	  CPPFLAGS='$(DPKG_CPPFLAGS) $(BUILD_TIME_CCPFLAGS)' LDFLAGS="$(DPKG_LDFLAGS)" \
 	    $(config_site) \
 	    ../configure \
 		$(common_configure_args)
@@ -370,7 +381,7 @@
 	mkdir -p $(buildd_debug)
 	cd $(buildd_debug) && \
 	  CC="$(CC)" CXX="$(CXX)" AR="$(AR)" RANLIB="$(RANLIB)" CFLAGS="$(DEBUG_CFLAGS)" \
-	  CPPFLAGS="$(DPKG_CPPFLAGS)" LDFLAGS="$(DPKG_LDFLAGS)" \
+	  CPPFLAGS='$(DPKG_CPPFLAGS) $(BUILD_TIME_CCPFLAGS)' LDFLAGS="$(DPKG_LDFLAGS)" \
 	    $(config_site) \
 	    ../configure \
 		$(common_configure_args) \
@@ -384,7 +395,7 @@
 	mkdir -p $(buildd_shdebug)
 	cd $(buildd_shdebug) && \
 	  CC="$(CC)" CXX="$(CXX)" AR="$(AR)" RANLIB="$(RANLIB)" CFLAGS="$(DEBUG_CFLAGS)" \
-	  CPPFLAGS="$(DPKG_CPPFLAGS)" LDFLAGS="$(DPKG_LDFLAGS)" \
+	  CPPFLAGS='$(DPKG_CPPFLAGS) $(BUILD_TIME_CCPFLAGS)' LDFLAGS="$(DPKG_LDFLAGS)" \
 	    $(config_site) \
 	    ../configure \
 		$(common_configure_args) \
@@ -1284,7 +1295,7 @@
 	cd $(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)

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to