[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1035331: jackd2: reproducible-builds: Locale and timezone dependent date in manpages



Source: jackd2
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps locale
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

The manpages may contain a locale-translated month name, as well as a
different date based on the build environment timezone.

For jackd.1:

  .TH "JACKD" "1" "January 2023" "1.9.21" ""
  vs.
  .TH "JACKD" "1" "jaanuar 2023" "1.9.21" ""

  .TH "JACKD" "1" "2023-04-30" "1.9.21" ""
  vs.
  .TH "JACKD" "1" "2023-05-01" "1.9.21" ""

The attached patches fix this by using a numeric date specified with the
UTC timezone.

Thanks for maintaining jackd2!

live well,
  vagrant
From 5fe932e274c720b68aff40125f1069fde1490935 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Sun, 30 Apr 2023 15:44:21 -0700
Subject: [PATCH 1/5] man/fill_template: Use numeric year-month-date for
 manpage.

The month may be rendered for the locale of the build environment.

https://reproducible-builds.org/docs/locales/
---
 man/fill_template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/man/fill_template b/man/fill_template
index 368cb1b..d1df18d 100644
--- a/man/fill_template
+++ b/man/fill_template
@@ -4,8 +4,8 @@ d=""
 
 if [ "$2" == "True" ]; then
   for i in *.0 ; do
-    sed -e "s/!VERSION!/${1}/g" -e "s/!DATE!/`date $d '+%B %Y'`/g" < ${i} > ${i%%0}1
+    sed -e "s/!VERSION!/${1}/g" -e "s/!DATE!/`date $d '+%Y-%m-%d'`/g" < ${i} > ${i%%0}1
   done
 else
-  sed -e "s/!VERSION!/${1}/g" -e "s/!DATE!/`date $d '+%B %Y'`/g" < jackd.0 > jackd.1
+  sed -e "s/!VERSION!/${1}/g" -e "s/!DATE!/`date $d '+%Y-%m-%d'`/g" < jackd.0 > jackd.1
 fi
-- 
2.39.2

From 021e05e61bc9ae982063d666de33473e391a0602 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Sun, 30 Apr 2023 15:52:22 -0700
Subject: [PATCH 2/5] man/fill_template: Use UTC date to avoid differences
 based on timezone.

https://reproducible-builds.org/docs/timezones/
---
 man/fill_template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/fill_template b/man/fill_template
index d1df18d..641cab8 100644
--- a/man/fill_template
+++ b/man/fill_template
@@ -1,6 +1,6 @@
 #!/bin/sh
 d=""
-[ -z "$SOURCE_DATE_EPOCH" ] || d=--date=@$SOURCE_DATE_EPOCH
+[ -z "$SOURCE_DATE_EPOCH" ] || d="--utc --date=@$SOURCE_DATE_EPOCH"
 
 if [ "$2" == "True" ]; then
   for i in *.0 ; do
-- 
2.39.2

Attachment: signature.asc
Description: PGP signature


Reply to: