Package: ns3
Version: 3.22+dfsg-1
Severity: wishlist
Template taken from https://wiki.debian.org/ReproducibleBuilds/Contribute
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that ns3 could not be built reproducibly.

The attached patch removes extra timestamps from the build system.
Once applied, ns3 can be built reproducibly in our current experimental
framework.

 [1]: https://wiki.debian.org/ReproducibleBuilds
diff -urNp ns3-3.22+dfsg.old/debian/rules ns3-3.22+dfsg/debian/rules
--- ns3-3.22+dfsg.old/debian/rules	2015-05-14 02:08:16.000000000 -0300
+++ ns3-3.22+dfsg/debian/rules	2015-06-11 10:05:28.687943994 -0300
@@ -14,15 +14,20 @@ BUILD_OPTION=$(shell if [ $(MEMORY) -lt
 CPU_CORES=$(shell nproc)
 BUILD_OPTION_OPTIPNG=$(shell echo "-j$(CPU_CORES)")
 
+LAST_CHANGE = $(shell dpkg-parsechangelog -S Date)
+BUILD_DATE  = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
+SPHINXOPTS := -D today=\"$(BUILD_DATE)\"
+SPHINXOPTS += -D html_last_updated_fmt=\"$(BUILD_DATE)\"
+
 %:
 	dh $@ --with python2
 
 build-indep: build-doc-stamp
 
 build-doc-stamp:
-	make html man -C ./$(NS3_DIR)/doc/manual/
-	make html man -C ./$(NS3_DIR)/doc/models/
-	make html man -C ./$(NS3_DIR)/doc/tutorial/
+	make html man -C ./$(NS3_DIR)/doc/manual/ SPHINXOPTS="$(SPHINXOPTS)"
+	make html man -C ./$(NS3_DIR)/doc/models/ SPHINXOPTS="$(SPHINXOPTS)"
+	make html man -C ./$(NS3_DIR)/doc/tutorial/ SPHINXOPTS="$(SPHINXOPTS)"
 	rm ns-3.*/doc/*/build/*/_static/jquery.js
 	rm ns-3.*/doc/*/build/*/_static/underscore.js
 	touch $@
_______________________________________________
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