From: Janneke Nieuwenhuizen <janneke@gnu.org>
To: 70380@debbugs.gnu.org
Subject: [bug#70380] [PATCH v4 2/6] maint: Support `make doc-po-update' from tarball.
Date: Wed, 17 Apr 2024 21:08:46 +0200 [thread overview]
Message-ID: <8c9f63715e8d7613c4a23fcccf828ccb5b323dae.1713379858.git.janneke@gnu.org> (raw)
In-Reply-To: <cover.1713379858.git.janneke@gnu.org>
* build-aux/xgettext.scm: Move setting of environment variables to shell
header.
(main): Use SOURCE_DATE_EPOCH as fallback for timestamp. This fixes running
from a tarball.
* Makefile.am (EXTRA_DIST): Add it.
Change-Id: Ic487587b22495868fd2a21545a13dc9e3458299c
---
Makefile.am | 1 +
build-aux/xgettext.scm | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 98008c528d..ca3fa0a693 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -727,6 +727,7 @@ EXTRA_DIST += \
build-aux/test-driver.scm \
build-aux/update-NEWS.scm \
build-aux/update-guix-package.scm \
+ build-aux/xgettext.scm \
doc/build.scm \
etc/disarchive-manifest.scm \
etc/guix-install.sh \
diff --git a/build-aux/xgettext.scm b/build-aux/xgettext.scm
index 44d30b8149..7142336a9d 100755
--- a/build-aux/xgettext.scm
+++ b/build-aux/xgettext.scm
@@ -2,6 +2,8 @@
# -*-scheme-*-
build_aux=$(dirname $0)
srcdir=$build_aux/..
+export LC_ALL=en_US.UTF-8
+export TZ=UTC0
exec guile --no-auto-compile -L $srcdir -C $srcdir -e main -s "$0" "$@"
!#
@@ -59,9 +61,6 @@ (define (pipe-command command)
;;; Entry point.
;;;
(define (main args)
- ;; Cater for being run in a container.
- (setenv "LC_ALL" "en_US.UTF-8")
- (setenv "TZ" "UTC0")
(fluid-set! %default-port-encoding #f)
(let* ((files-from (get-option args "--files-from="))
(default-domain (get-option args "--default-domain="))
@@ -82,9 +81,10 @@ (define (main args)
(files (map (cute string-append directory "/" <>) files))
(git-command `("git" "log" "--pretty=format:%ci" "-n1" ,@files))
(timestamp (pipe-command git-command))
+ (source-date-epoch (or (getenv "SOURCE_DATE_EPOCH") "1"))
+ (timestamp (if (string-null? timestamp) source-date-epoch
+ timestamp))
(po-file (string-append default-domain ".po")))
- (when (string-null? timestamp)
- (exit 1))
(substitute* po-file
(("(\"POT-Creation-Date: )[^\\]*" all header)
(string-append header timestamp)))))))
--
2.41.0
next prev parent reply other threads:[~2024-04-17 19:10 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-14 9:56 [bug#70380] [PATCH 0/3] Reproducible `make dist' tarball: Avoid override stamp-N warnings Janneke Nieuwenhuizen
2024-04-14 9:59 ` [bug#70380] [PATCH 1/3] maint: Generate doc/version[-LANG].texi using `mdate-from-git.scm' Janneke Nieuwenhuizen
2024-04-14 9:59 ` [bug#70380] [PATCH 2/3] Revert "maint: Generate 'doc/version-LANG.texi' reproducibly." Janneke Nieuwenhuizen
2024-04-14 9:59 ` [bug#70380] [PATCH 3/3] Revert "maint: Generate 'doc/version.texi' reproducibly." Janneke Nieuwenhuizen
2024-04-15 14:27 ` [bug#70380] [PATCH v2 0/3] Reproducible `make dist' tarball: Avoid override stamp-N warnings Janneke Nieuwenhuizen
2024-04-15 14:27 ` [bug#70380] [PATCH v2 1/3] maint: Generate doc/version[-LANG].texi using `mdate-from-git.scm' Janneke Nieuwenhuizen
2024-04-15 14:27 ` [bug#70380] [PATCH v2 2/3] Revert "maint: Generate 'doc/version-LANG.texi' reproducibly." Janneke Nieuwenhuizen
2024-04-15 14:27 ` [bug#70380] [PATCH v2 3/3] Revert "maint: Generate 'doc/version.texi' reproducibly." Janneke Nieuwenhuizen
2024-04-16 7:33 ` [bug#70380] [PATCH v2 0/3] Reproducible `make dist' tarball: Avoid override stamp-N warnings pelzflorian (Florian Pelz)
2024-04-16 7:38 ` pelzflorian (Florian Pelz)
2024-04-17 8:10 ` Janneke Nieuwenhuizen
2024-04-17 9:53 ` [bug#70380] [PATCH v3 0/4] " Janneke Nieuwenhuizen
2024-04-17 9:53 ` [bug#70380] [PATCH v3 1/4] maint: Cater for running `make dist' from tarball Janneke Nieuwenhuizen
2024-04-17 15:37 ` pelzflorian (Florian Pelz)
2024-04-17 19:02 ` Janneke Nieuwenhuizen
2024-04-17 9:53 ` [bug#70380] [PATCH v3 2/4] maint: Generate doc/version[-LANG].texi using `mdate-from-git.scm' Janneke Nieuwenhuizen
2024-04-17 9:53 ` [bug#70380] [PATCH v3 3/4] Revert "maint: Generate 'doc/version-LANG.texi' reproducibly." Janneke Nieuwenhuizen
2024-04-17 9:53 ` [bug#70380] [PATCH v3 4/4] Revert "maint: Generate 'doc/version.texi' reproducibly." Janneke Nieuwenhuizen
2024-04-17 19:08 ` [bug#70380] [PATCH v4 0/6] Reproducible `make dist' tarball: Avoid override stamp-N warnings Janneke Nieuwenhuizen
2024-04-17 19:08 ` [bug#70380] [PATCH v4 1/6] maint: Resurrect running `make' from a tarball Janneke Nieuwenhuizen
2024-04-17 19:08 ` Janneke Nieuwenhuizen [this message]
2024-04-18 12:01 ` [bug#70380] [PATCH v4 2/6] maint: Support `make doc-po-update' from tarball pelzflorian (Florian Pelz)
2024-04-18 18:50 ` Janneke Nieuwenhuizen
2024-04-19 11:34 ` pelzflorian (Florian Pelz)
2024-04-19 14:47 ` bug#70380: " Janneke Nieuwenhuizen
2024-04-17 19:08 ` [bug#70380] [PATCH v4 3/6] maint: Cater for running `make dist' " Janneke Nieuwenhuizen
2024-04-17 19:08 ` [bug#70380] [PATCH v4 4/6] maint: Generate doc/version[-LANG].texi using `mdate-from-git.scm' Janneke Nieuwenhuizen
2024-04-17 19:08 ` [bug#70380] [PATCH v4 5/6] Revert "maint: Generate 'doc/version-LANG.texi' reproducibly." Janneke Nieuwenhuizen
2024-04-17 19:08 ` [bug#70380] [PATCH v4 6/6] Revert "maint: Generate 'doc/version.texi' reproducibly." Janneke Nieuwenhuizen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8c9f63715e8d7613c4a23fcccf828ccb5b323dae.1713379858.git.janneke@gnu.org \
--to=janneke@gnu.org \
--cc=70380@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.