[pacman-dev] [Git][pacman/pacman][master] doc: use localdate instead of pacman_date to improve reproducibility

Allan McRae (@allan) allan at archlinux.org
Thu Jul 1 01:26:16 UTC 2021



Allan McRae pushed to branch master at Pacman / Pacman


Commits:
b4383b8d by Jonas Witschel at 2021-07-01T11:19:18+10:00
doc: use localdate instead of pacman_date to improve reproducibility

pacman_date is set to the current date during build without respecting
SOURCE_DATE_EPOCH. As a result, a build cannot be fully reproduced on a later
date because the date embedded into the man pages does not match.

In contrast, the built-in asciidoc attribute "localdate" respects
SOURCE_DATE_EPOCH and has the desired ISO 8601 format, so simply use that
instead of the custom "pacman_date" attribute.

Fixes: FS#71154

Signed-off-by: Jonas Witschel <diabonas at archlinux.org>
Signed-off-by: Allan McRae <allan at archlinux.org>

- - - - -


2 changed files:

- doc/asciidoc.conf
- doc/meson.build


Changes:

=====================================
doc/asciidoc.conf
=====================================
@@ -50,7 +50,7 @@ ifdef::backend-docbook[]
 template::[header-declarations]
 <refentry>
 <refentryinfo>
-<date>{pacman_date}</date>
+<date>{localdate}</date>
 </refentryinfo>
 <refmeta>
 <refentrytitle>{mantitle}</refentrytitle>


=====================================
doc/meson.build
=====================================
@@ -25,7 +25,6 @@ asciidoc_conf = join_paths(meson.current_source_dir(), 'asciidoc.conf')
 asciidoc_opts = [
  '-f', asciidoc_conf,
  '-a', 'pacman_version="@0@"'.format(PACKAGE_VERSION),
- '-a', 'pacman_date=@0@'.format(run_command('date', '+%Y-%m-%d').stdout().strip()),
  '-a', 'srcext=@0@'.format(get_option('src-ext')),
  '-a', 'pkgext=@0@'.format(get_option('pkg-ext')),
  '-a', 'pkgdatadir=@0@'.format(PKGDATADIR),



View it on GitLab: https://gitlab.archlinux.org/pacman/pacman/-/commit/b4383b8d007e28aa76324f45ad19e7878975074a

-- 
View it on GitLab: https://gitlab.archlinux.org/pacman/pacman/-/commit/b4383b8d007e28aa76324f45ad19e7878975074a
You're receiving this email because of your account on gitlab.archlinux.org.




More information about the pacman-dev mailing list