doc: make timestamps in man pages reproducible

Message ID 20200712113322.146492-1-diabonas@archlinux.org
State Changes Requested, archived
Headers show
Series doc: make timestamps in man pages reproducible | expand

Commit Message

Jonas Witschel July 12, 2020, 11:33 a.m. UTC
Replace the custom "pacman_contrib_date" attribute by the built-in "localtime"
since both have the same format, but the latter respects the SOURCE_DATE_EPOCH
specification for reproducible builds.
---
 doc/Makefile.am   | 1 -
 doc/asciidoc.conf | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

Comments

Daniel M. Capella July 27, 2020, 11:16 p.m. UTC | #1
On Sun Jul 12, 2020 at 7:33 AM EDT, Jonas Witschel wrote:
> Replace the custom "pacman_contrib_date" attribute by the built-in
> "localtime"
> since both have the same format, but the latter respects the
> SOURCE_DATE_EPOCH
> specification for reproducible builds.
> ---
> doc/Makefile.am | 1 -
> doc/asciidoc.conf | 2 +-
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/doc/Makefile.am b/doc/Makefile.am
> index 52f2bf7..374b1b5 100644
> --- a/doc/Makefile.am
> +++ b/doc/Makefile.am
> @@ -78,7 +78,6 @@ pkgdatadir = ${datadir}/${PACKAGE}
> ASCIIDOC_OPTS = \
> -f $(srcdir)/asciidoc.conf \
> -a pacman_contrib_version="$(REAL_PACKAGE_VERSION)" \
> - -a pacman_contrib_date="`date +%Y-%m-%d`" \
> -a pkgdatadir=$(pkgdatadir) \
> -a localstatedir=$(localstatedir) \
> -a sysconfdir=$(sysconfdir)
> diff --git a/doc/asciidoc.conf b/doc/asciidoc.conf
> index 0d2ea98..9314ea8 100644
> --- a/doc/asciidoc.conf
> +++ b/doc/asciidoc.conf
> @@ -50,7 +50,7 @@ ifdef::backend-docbook[]
> template::[header-declarations]
> <refentry>
> <refentryinfo>
> -<date>{pacman_contrib_date}</date>
> +<date>{localdate}</date>
> </refentryinfo>
> <refmeta>
> <refentrytitle>{mantitle}</refentrytitle>
> --
> 2.27.0

Thanks for taking care of this! Please resubmit the patch with a
Signed-off-by line.

--
Best,
Daniel <https://danielcapella.com>

Patch

diff --git a/doc/Makefile.am b/doc/Makefile.am
index 52f2bf7..374b1b5 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -78,7 +78,6 @@  pkgdatadir = ${datadir}/${PACKAGE}
 ASCIIDOC_OPTS = \
 	-f $(srcdir)/asciidoc.conf \
 	-a pacman_contrib_version="$(REAL_PACKAGE_VERSION)" \
-	-a pacman_contrib_date="`date +%Y-%m-%d`" \
 	-a pkgdatadir=$(pkgdatadir) \
 	-a localstatedir=$(localstatedir) \
 	-a sysconfdir=$(sysconfdir)
diff --git a/doc/asciidoc.conf b/doc/asciidoc.conf
index 0d2ea98..9314ea8 100644
--- a/doc/asciidoc.conf
+++ b/doc/asciidoc.conf
@@ -50,7 +50,7 @@  ifdef::backend-docbook[]
 template::[header-declarations]
 <refentry>
 <refentryinfo>
-<date>{pacman_contrib_date}</date>
+<date>{localdate}</date>
 </refentryinfo>
 <refmeta>
 <refentrytitle>{mantitle}</refentrytitle>