Bug#857632: apt: ignore the currently running kernel if attempting a reproducible build
Package: apt
Severity: wishlist
Version: 1.4~rc2
Tags: patch
Hi,
Attached is the following:
commit bf005711cb06380fa32c93f32bb4a2563b952b65
Author: Chris Lamb <lamby@debian.org>
Date: Mon Mar 13 11:02:49 2017 +0100
apt-auto-removal: Ignore the currently running kernel if attempting a reproducible build.
If one is attempting to create a reproducible ISO image we do not want to
include the build system's kernel version, not only due to it breaking
reproducibility, but it could be somewhat misleading and/or the wrong thing
to put in this file anyway.
debian/apt.auto-removal.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby@debian.org / chris-lamb.co.uk
`-
>From bf005711cb06380fa32c93f32bb4a2563b952b65 Mon Sep 17 00:00:00 2001
From: Chris Lamb <lamby@debian.org>
Date: Mon, 13 Mar 2017 11:02:49 +0100
Subject: [PATCH] apt-auto-removal: Ignore the currently running kernel if
attempting a reproducible build.
If one is attempting to create a reproducible ISO image we do not want to
include the build system's kernel version, not only due to it breaking
reproducibility, but it could be somewhat misleading and/or the wrong thing
to put in this file anyway.
---
debian/apt.auto-removal.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/debian/apt.auto-removal.sh b/debian/apt.auto-removal.sh
index df9048cd6..2c32b0c9d 100644
--- a/debian/apt.auto-removal.sh
+++ b/debian/apt.auto-removal.sh
@@ -29,6 +29,11 @@ unamer="$(uname -r | tr '[A-Z]' '[a-z]')"
if [ -n "$unamer" ]; then
running_version="$(echo "$list" | awk "\$1 == \"$unamer\" { print \$2;exit; }")"
fi
+# ignore the currently running version if attempting a reproducible build
+if [ -n "${SOURCE_DATE_EPOCH}" ]; then
+ unamer=""
+ running_version=""
+fi
latest_version="$(echo "$debverlist" | sed -n 1p)"
previous_version="$(echo "$debverlist" | sed -n 2p)"
@@ -62,7 +67,7 @@ $list
# list of different kernel versions:
$debverlist
# Installing kernel: $installed_version ($1)
-# Running kernel: $running_version ($unamer)
+# Running kernel: ${running_version:-ignored} (${unamer:-ignored})
# Last kernel: $latest_version
# Previous kernel: $previous_version
# Kernel versions list to keep:
--
2.11.0
Reply to: