[v2] doc: make timestamps in man pages reproducible

Message ID 20200728071159.23325-1-diabonas@archlinux.org
State New
Headers show
Series
  • [v2] doc: make timestamps in man pages reproducible
Related show

Commit Message

Jonas Witschel July 28, 2020, 7:11 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.

Signed-off-by: Jonas Witschel <diabonas@archlinux.org>
---

Add Signed-off-by line as per doc/submitting-patches.txt

 doc/Makefile.am   | 1 -
 doc/asciidoc.conf | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

Comments

Daniel M. Capella July 28, 2020, 7:16 a.m. UTC | #1
On July 28, 2020 3:11:59 AM EDT, Jonas Witschel <diabonas@archlinux.org> 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.
> 
> Signed-off-by: Jonas Witschel <diabonas@archlinux.org>
> ---
> 
> Add Signed-off-by line as per doc/submitting-patches.txt
> 
>  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>

Merged, thanks again!

--
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>