Source: pbuilder
Version: 0.219
Severity: wishlist
Tags: patch
Usertags: randomness


While working on the "reproducible builds" effort [1], we have noticed
that pbuilder could not be built reproducibly.
The PDF documentation is varying in the /ID field (but not the 
time fields). After some debugging I found out that dblatex (which generates
the tex file that is used to build the pdf), is building the documentation
in a random directory.
Since our pdflatex honours SOURCE_DATE_EPOCH, the Creation/Modification times
did not differ. But the absolute source file path (which is random) is also
part of the /ID calculation.

The attached patch fixes the unreproducibility by telling dblatex to build in
a deterministic path.



diff --git a/Documentation/Makefile b/Documentation/Makefile
index 4fc2513..f6ac106 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -26,7 +26,7 @@ pbuilder-doc.%.po: $(MASTERXML)
 %.pdf: %.xml
 	# requires dblatex package.
-	dblatex $<
+	dblatex --tmpdir=docbuild $<
 install: $(HTMLDOCS) pbuilder-doc.pdf
 	install -d -m 755 -o root -g root $(DESTDIR)/usr/share/doc/pbuilder/

Attachment: signature.asc
Description: OpenPGP digital signature

Reproducible-builds mailing list

Reply via email to