Subject: gtk-doc-tools: Support for SOURCE_DATE_EPOCH

From: nicoo <[email-masked]>
Date: Thu, 14 Jan 2021 13:43:40 +0100

Package: gtk-doc-tools
Severity: normal
User: [email-masked]
Usertags: timestamps toolchain
X-Debbugs-Cc: [email-masked]
Control: affects -1 + libu2f-host-doc

Dear maintainers,

gtkdoc-pdf, and possibly other gtk-doc tools, seems to embed the build day in
their output.  This makes all packages that use it for generating documentation,
build unreproducibly.

	$ diffoscope control experiment-1
	--- control
	+++ experiment-1
	│   --- control/source-root
	├── +++ experiment-1/source-root
	│ │ │ [┄]
	│ │ ├── data.tar.xz
	│ │ │ ├── data.tar
	│ │ │ │ ├── ./usr/share/doc/libu2f-host-dev/u2f-host.pdf
	│ │ │ │ │┄ Installing the 'PyPDF2' package may produce a better output.
	│ │ │ │ │ ├── pdftotext {} -
	│ │ │ │ │ │ @@ -13,15 +13,15 @@
	│ │ │ │ │ │  
	│ │ │ │ │ │  WRITTEN BY
	│ │ │ │ │ │  
	│ │ │ │ │ │  DATE
	│ │ │ │ │ │  
	│ │ │ │ │ │  SIGNATURE
	│ │ │ │ │ │  
	│ │ │ │ │ │ -January 13, 2021
	│ │ │ │ │ │ +January 15, 2021
	│ │ │ │ │ │  
	│ │ │ │ │ │  REVISION HISTORY
	│ │ │ │ │ │  NUMBER
	│ │ │ │ │ │  
	│ │ │ │ │ │  DATE
	│ │ │ │ │ │  
	│ │ │ │ │ │  DESCRIPTION

This happens despite the package not doing anything date-related in its gtk-doc/
and gtkdoc-mkpdf seems not to provide any CLI parameter to override the date.

Please consider adding such a parameter, *and* default to honouring the
environment variable SOURCE_DATE_EPOCH if it is defined:

  https://reproducible-builds.org/docs/source-date-epoch/

Best,

  nicoo

- -- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-1-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gtk-doc-tools depends on:
pn  docbook-to-man        <none>
pn  docbook-xml           <none>
pn  docbook-xsl           <none>
ii  pkgconf [pkg-config]  1.7.3-2
ii  python3               3.9.1-1
ii  python3-lxml          4.6.2-1
ii  python3-pygments      2.7.1+dfsg-1
pn  xsltproc              <none>

gtk-doc-tools recommends no packages.

Versions of packages gtk-doc-tools suggests:
pn  dblatex  <none>