From b16f334bf4dfd252f7b9c5f5a7b936286458ab5d Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 20 Jun 2024 16:46:06 +0200 Subject: [PATCH] Make patch file reproducible --- archiso/scripts/show-diff.sh | 19 ++++++++++++++++++- archiso/scripts/valhalla.patch | 18 ++++++++++-------- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/archiso/scripts/show-diff.sh b/archiso/scripts/show-diff.sh index be3acc8a..a37ce0da 100755 --- a/archiso/scripts/show-diff.sh +++ b/archiso/scripts/show-diff.sh @@ -2,5 +2,22 @@ # Shows the differences between Arch's original `archiso` template named `releng` and this `archiso` directory. pushd "${BASH_SOURCE%/*}" > /dev/null; . ./template-path.sh; -diff -ru --color --no-dereference -x{.git,.gitignore,README.md,scripts,LICENSE,out,valhalla.patch,work} "$(templatePath)" ..; +{ + contextRoot="$(mktemp -d)"; + rm -rf "$contextRoot"; + cp -r "$(templatePath)" "$contextRoot"; + chmod -R 755 "$contextRoot"; + git init "$contextRoot"; + + pushd "$contextRoot" > /dev/null; + git add .; + popd > /dev/null; + + sudo rsync -r --exclude={.git,.gitignore,README.md,scripts,LICENSE,out,valhalla.patch,work} .. "$contextRoot" +} 2>&1 > /dev/null; + +pushd "$contextRoot" > /dev/null; +git diff; +popd > /dev/null; + popd > /dev/null; diff --git a/archiso/scripts/valhalla.patch b/archiso/scripts/valhalla.patch index e2a7a765..b76b933b 100644 --- a/archiso/scripts/valhalla.patch +++ b/archiso/scripts/valhalla.patch @@ -1,7 +1,8 @@ -diff -ru --no-dereference -x.git -x.gitignore -xREADME.md -xscripts -xLICENSE -xout -xvalhalla.patch /usr/bin/../share/archiso/configs/releng/airootfs/root/.zlogin ../airootfs/root/.zlogin ---- /usr/bin/../share/archiso/configs/releng/airootfs/root/.zlogin 2024-05-23 23:16:11.000000000 +0200 -+++ ../airootfs/root/.zlogin 2024-06-18 22:02:32.189465802 +0200 -@@ -4,3 +4,10 @@ +diff --git a/airootfs/root/.zlogin b/airootfs/root/.zlogin +index bf6bc8f..f003a1f 100755 +--- a/airootfs/root/.zlogin ++++ b/airootfs/root/.zlogin +@@ -4,3 +4,10 @@ if grep -Fqa 'accessibility=' /proc/cmdline &> /dev/null; then fi ~/.automated_script.sh @@ -12,10 +13,11 @@ diff -ru --no-dereference -x.git -x.gitignore -xREADME.md -xscripts -xLICENSE -x +fi; + +loadkeys de_CH-latin1 -diff -ru --no-dereference -x.git -x.gitignore -xREADME.md -xscripts -xLICENSE -xout -xvalhalla.patch /usr/bin/../share/archiso/configs/releng/packages.x86_64 ../packages.x86_64 ---- /usr/bin/../share/archiso/configs/releng/packages.x86_64 2024-05-23 23:16:11.000000000 +0200 -+++ ../packages.x86_64 2024-06-18 22:18:23.338967643 +0200 -@@ -32,6 +32,7 @@ +diff --git a/packages.x86_64 b/packages.x86_64 +index 9e876e7..cb29125 100755 +--- a/packages.x86_64 ++++ b/packages.x86_64 +@@ -32,6 +32,7 @@ f2fs-tools fatresize foot-terminfo fsarchiver