Browse Source

auto-removal: Ignore 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.

Closes: #857632
tags/devuan/2.0.1+devuan1
Chris Lamb Julian Andres Klode 3 years ago
parent
commit
a9b56a0101
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      debian/apt.auto-removal.sh

+ 6
- 1
debian/apt.auto-removal.sh View File

@@ -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:


Loading…
Cancel
Save