Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Feb 2025 23:58:42 GMT
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 16f334630975 - main - kernel: Print SOURCE_DATE_EPOCH in UTC
Message-ID:  <202502032358.513NwgUn040226@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by cperciva:

URL: https://cgit.FreeBSD.org/src/commit/?id=16f3346309757259b3613e43a2eb6404659cdda9

commit 16f3346309757259b3613e43a2eb6404659cdda9
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2025-02-03 04:10:08 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-02-03 23:58:32 +0000

    kernel: Print SOURCE_DATE_EPOCH in UTC
    
    If SOURCE_DATE_EPOCH is set and MK_REPRODUCIBLE_BUILD is not set, the
    kernel contains SOURCE_DATE_EPOCH, converted to a date+time string.
    In the interests of easier reproducibility convert it in UTC.
    
    Reviewed by:    imp
    Sponsored by:   Amazon
    Differential Revision:  https://reviews.freebsd.org/D48802
---
 sys/conf/newvers.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 6e5f0716c90d..9a196da5466f 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -190,7 +190,7 @@ u=${USER:-root}
 d=$(pwd)
 h=${HOSTNAME:-$(hostname)}
 if [ -n "$SOURCE_DATE_EPOCH" ]; then
-	if ! t=$(date -r $SOURCE_DATE_EPOCH 2>/dev/null); then
+	if ! t=$(date -ur $SOURCE_DATE_EPOCH 2>/dev/null); then
 		echo "Invalid SOURCE_DATE_EPOCH" >&2
 		exit 1
 	fi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502032358.513NwgUn040226>