From 38b64fe09c27757109f126d91b9a5f4244e01f78 Mon Sep 17 00:00:00 2001 From: Kitlith Date: Mon, 26 May 2025 20:46:41 -0700 Subject: [PATCH 1/2] Make patch commit timestamps reproducible. This forces commit timestamps to match authorship timestamps, meaning that the only remaining avenue of variability is the committing person. --- patches/apply.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/apply.sh b/patches/apply.sh index cd1cb078..0aae3c60 100755 --- a/patches/apply.sh +++ b/patches/apply.sh @@ -6,7 +6,7 @@ if [ -d ".git" ] ; then git config --local commit.gpgsign false git am --abort 2> /dev/null git checkout . - exec git am "$@" + exec git am --committer-date-is-author-date "$@" fi # There is no reliable way to apply a patch and succeed if it was From 5130bdeda51c52137f11e0536273f3bfbb2f7f71 Mon Sep 17 00:00:00 2001 From: Kitlith Date: Mon, 26 May 2025 20:58:00 -0700 Subject: [PATCH 2/2] Make patch commit committer reproducible. Just makes setting the git config unconditional. We should probably drop this commit if this script is also intended to be used with repositories outside of the build deps. --- patches/apply.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patches/apply.sh b/patches/apply.sh index 0aae3c60..272a2e54 100755 --- a/patches/apply.sh +++ b/patches/apply.sh @@ -1,9 +1,9 @@ #!/bin/sh if [ -d ".git" ] ; then - git config user.email > /dev/null || git config user.email "git-am@invalid" - git config user.name > /dev/null || git config user.name "no name" - git config --local commit.gpgsign false + git config --worktree user.email "git-am@invalid" + git config --worktree user.name "no name" + git config --worktree commit.gpgsign false git am --abort 2> /dev/null git checkout . exec git am --committer-date-is-author-date "$@"