Source: iproute2
Version: 3.16.0-2
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-CC: reproducible-builds@lists.alioth.debian.org

Hi!

While working on Debian's “reproducible builds” effort [1], we have
noticed that iproute2 doesn't build reproducibly.
Documentation files (.dvi and .ps) contain timestamps of the build time.

The attached patch prevents that the timestamps get embedded, which
allows building iproute2 reproducibly.

Regards,
 Reiner

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

diff --git a/debian/patches/0004-reproducible-docs.patch b/debian/patches/0004-reproducible-docs.patch
new file mode 100644
index 0000000..26df0e7
--- /dev/null
+++ b/debian/patches/0004-reproducible-docs.patch
@@ -0,0 +1,42 @@
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Description: Generate reproducible documentation
+ By default latex embeds a comment with a timestamp into the header of
+ dvi files. This is unnecessary and can be removed.
+ When converting the dvi to ps, dvips also embeds a CreationDate comment
+ into the file, which is also removed.
+ .
+ As it is not possible with sgml2latex to pass it latex arguments, the
+ sgml -> dvi section is removed, so that latex can be called directly
+ to convert tex into dvi files.
+
+Index: iproute2-3.16.0/doc/Makefile
+===================================================================
+--- iproute2-3.16.0.orig/doc/Makefile
++++ iproute2-3.16.0/doc/Makefile
+@@ -4,8 +4,8 @@ PSFILES=ip-cref.ps ip-tunnels.ps api-ip6
+ # iki-netdev.ps iki-neighdst.ps
+ 
+ 
+-LATEX=latex
+-DVIPS=dvips
++LATEX=latex --output-comment=""
++DVIPS=dvips -N
+ SGML2DVI=sgml2latex
+ SGML2HTML=sgml2html -s 0
+ LPR=lpr -Zsduplex
+@@ -37,9 +37,6 @@ print: $(PSFILES)
+ %.tex: %.sgml
+ 	$(SGML2DVI) --output=tex $<
+ 
+-%.dvi: %.sgml
+-	$(SGML2DVI) --output=dvi $<
+-
+ %.dvi: %.tex
+ 	@set -e; pass=2; echo "Running LaTeX $<"; \
+ 	while [ `$(LATEX) $< </dev/null 2>&1 | \
+@@ -77,4 +74,4 @@ install:
+ 	install -m 0644 $(shell echo *.sgml) $(DESTDIR)$(DOCDIR)
+ 
+ clean:
+-	rm -f *.aux *.log *.toc $(PSFILES) $(DVIFILES) *.html $(TXTFILES)
++	rm -f *.out *.aux *.log *.toc $(PSFILES) $(DVIFILES) *.html $(TXTFILES)
diff --git a/debian/patches/series b/debian/patches/series
index ab78e31..65a8df1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 0001-Add-moo-feature.patch
 0002-txtdocs.patch
 0003-ip-link-Remove-unnecessary-device-checking.patch
+0004-reproducible-docs.patch

Attachment: signature.asc
Description: OpenPGP 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