Version in base suite: 5.7-0.4 Base version: debianutils_5.7-0.4 Target version: debianutils_5.7-0.5~deb12u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/d/debianutils/debianutils_5.7-0.4.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/d/debianutils/debianutils_5.7-0.5~deb12u1.dsc changelog | 16 ++++++++++++++++ patches/dpkg-root | 31 ------------------------------- patches/dpkg-root.patch | 34 ++++++++++++++++++++++++++++++++++ patches/fix-aliased-location.patch | 18 ++++++++++++++++++ patches/manage-usr-bin-sh.patch | 29 +++++++++++++++++++++++++++++ patches/no-duplicates.patch | 18 ++++++++++++++++++ patches/series | 5 ++++- 7 files changed, 119 insertions(+), 32 deletions(-) diff -Nru debianutils-5.7/debian/changelog debianutils-5.7/debian/changelog --- debianutils-5.7/debian/changelog 2022-11-02 16:31:14.000000000 +0000 +++ debianutils-5.7/debian/changelog 2023-07-28 23:46:35.000000000 +0000 @@ -1,3 +1,19 @@ +debianutils (5.7-0.5~deb12u1) bookworm; urgency=medium + + * Rebuild for bookworm. + + -- Andreas Beckmann Sat, 29 Jul 2023 01:46:35 +0200 + +debianutils (5.7-0.5) unstable; urgency=medium + + * Non-maintainer upload. + * update-shells: Do not create duplicate entries in /etc/shells. + * update-shells: Manage (/usr)/bin/sh in the state file. + * update-shells: Fix canonicalization of shells in aliased locations. + (Closes: #1035820) + + -- Andreas Beckmann Thu, 22 Jun 2023 21:59:33 +0200 + debianutils (5.7-0.4) unstable; urgency=medium * Non-maintainer upload diff -Nru debianutils-5.7/debian/patches/dpkg-root debianutils-5.7/debian/patches/dpkg-root --- debianutils-5.7/debian/patches/dpkg-root 2022-07-27 06:17:42.000000000 +0000 +++ debianutils-5.7/debian/patches/dpkg-root 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ ---- a/update-shells -+++ b/update-shells -@@ -23,7 +23,7 @@ log() { - fi - } - --ROOT= -+ROOT=${DPKG_ROOT:-} - VERBOSE=0 - NOACT=0 - -@@ -79,7 +79,7 @@ for f in "$PKG_DIR/"*; do - while IFS='#' read -r line _; do - [ -n "$line" ] || continue - PKG_SHELLS="$PKG_SHELLS$line#" -- realshell=$(dpkg-realpath --root "$ROOT" "$line") -+ realshell=$(dirname "$(dpkg-realpath --root "$ROOT" "$line")")/$(basename "$line") - if [ "$line" != "$realshell" ]; then - PKG_SHELLS="$PKG_SHELLS$realshell#" - fi ---- a/update-shells.8 -+++ b/update-shells.8 -@@ -24,6 +24,8 @@ Do not actually perform the changes to - - Operate on a chroot at - .I ROOT . -+Defaults to the value of the environment variable -+.I DPKG_ROOT . - .TP - .B \-\-verbose - Print the shells that are being added or removed. diff -Nru debianutils-5.7/debian/patches/dpkg-root.patch debianutils-5.7/debian/patches/dpkg-root.patch --- debianutils-5.7/debian/patches/dpkg-root.patch 1970-01-01 00:00:00.000000000 +0000 +++ debianutils-5.7/debian/patches/dpkg-root.patch 2023-07-28 23:46:35.000000000 +0000 @@ -0,0 +1,34 @@ +Author: Johannes Schauer Marin Rodrigues +Description: set the default for ROOT to $DPKG_ROOT + +--- a/update-shells ++++ b/update-shells +@@ -23,7 +23,7 @@ log() { + fi + } + +-ROOT= ++ROOT=${DPKG_ROOT:-} + VERBOSE=0 + NOACT=0 + +@@ -79,7 +79,7 @@ for f in "$PKG_DIR/"*; do + while IFS='#' read -r line _; do + [ -n "$line" ] || continue + PKG_SHELLS="$PKG_SHELLS$line#" +- realshell=$(dpkg-realpath --root "$ROOT" "$line") ++ realshell=$(dirname "$(dpkg-realpath --root "$ROOT" "$line")")/$(basename "$line") + if [ "$line" != "$realshell" ]; then + PKG_SHELLS="$PKG_SHELLS$realshell#" + fi +--- a/update-shells.8 ++++ b/update-shells.8 +@@ -24,6 +24,8 @@ Do not actually perform the changes to + + Operate on a chroot at + .I ROOT . ++Defaults to the value of the environment variable ++.I DPKG_ROOT . + .TP + .B \-\-verbose + Print the shells that are being added or removed. diff -Nru debianutils-5.7/debian/patches/fix-aliased-location.patch debianutils-5.7/debian/patches/fix-aliased-location.patch --- debianutils-5.7/debian/patches/fix-aliased-location.patch 1970-01-01 00:00:00.000000000 +0000 +++ debianutils-5.7/debian/patches/fix-aliased-location.patch 2023-07-28 23:46:35.000000000 +0000 @@ -0,0 +1,18 @@ +Author: Andreas Beckmann +Description: fix detection of shells in aliased locations + only canonicalize the directory where the shell resides, + not the shell itself (which may be a symlink, e.g. managed by + update-alternatives) +Bug-Debian: https://bugs.debian.org/1035820 + +--- a/update-shells ++++ b/update-shells +@@ -80,7 +80,7 @@ for f in "$TEMPLATE_ETC_FILE" "$PKG_DIR/ + while IFS='#' read -r line _; do + [ -n "$line" ] || continue + PKG_SHELLS="$PKG_SHELLS$line#" +- realshell=$(dirname "$(dpkg-realpath --root "$ROOT" "$line")")/$(basename "$line") ++ realshell=$(dpkg-realpath --root "$ROOT" "$(dirname "$line")")/$(basename "$line") + if [ "$line" != "$realshell" ]; then + PKG_SHELLS="$PKG_SHELLS$realshell#" + fi diff -Nru debianutils-5.7/debian/patches/manage-usr-bin-sh.patch debianutils-5.7/debian/patches/manage-usr-bin-sh.patch --- debianutils-5.7/debian/patches/manage-usr-bin-sh.patch 1970-01-01 00:00:00.000000000 +0000 +++ debianutils-5.7/debian/patches/manage-usr-bin-sh.patch 2023-07-28 23:46:35.000000000 +0000 @@ -0,0 +1,29 @@ +Author: Andreas Beckmann +Description: manage (/usr)/bin/sh in the state file + +--- a/update-shells ++++ b/update-shells +@@ -63,19 +63,20 @@ done + + PKG_DIR="$ROOT/usr/share/debianutils/shells.d" + STATE_FILE="$ROOT/var/lib/shells.state" ++TEMPLATE_ETC_FILE="$ROOT/usr/share/debianutils/shells" + TARGET_ETC_FILE="$ROOT/etc/shells" + SOURCE_ETC_FILE="$TARGET_ETC_FILE" + NEW_ETC_FILE="$TARGET_ETC_FILE.tmp" + NEW_STATE_FILE="$STATE_FILE.tmp" + + if ! test -e "$SOURCE_ETC_FILE"; then +- SOURCE_ETC_FILE="$ROOT/usr/share/debianutils/shells" ++ SOURCE_ETC_FILE="$TEMPLATE_ETC_FILE" + fi + + PKG_SHELLS='#' + LC_COLLATE=C.UTF-8 # glob in reproducible order +-for f in "$PKG_DIR/"*; do +- [ "$f" = "$PKG_DIR/*" ] && break ++for f in "$TEMPLATE_ETC_FILE" "$PKG_DIR/"*; do ++ test -f "$f" || continue + while IFS='#' read -r line _; do + [ -n "$line" ] || continue + PKG_SHELLS="$PKG_SHELLS$line#" diff -Nru debianutils-5.7/debian/patches/no-duplicates.patch debianutils-5.7/debian/patches/no-duplicates.patch --- debianutils-5.7/debian/patches/no-duplicates.patch 1970-01-01 00:00:00.000000000 +0000 +++ debianutils-5.7/debian/patches/no-duplicates.patch 2023-07-28 23:46:35.000000000 +0000 @@ -0,0 +1,18 @@ +Author: Andreas Beckmann +Description: do not create duplicate entries in /etc/shells + +--- a/update-shells ++++ b/update-shells +@@ -106,8 +106,10 @@ while IFS= read -r line; do + if [ -z "$shell" ] || + hashset_contains "$PKG_SHELLS" "$shell" || + ! hashset_contains "$STATE_SHELLS" "$shell"; then +- echo "$line" >> "$NEW_ETC_FILE" +- ETC_SHELLS="$ETC_SHELLS$shell#" ++ if [ -z "$shell" ] || ! hashset_contains "$ETC_SHELLS" "$shell"; then ++ echo "$line" >> "$NEW_ETC_FILE" ++ ETC_SHELLS="$ETC_SHELLS$shell#" ++ fi + else + log "removing shell $shell" + fi diff -Nru debianutils-5.7/debian/patches/series debianutils-5.7/debian/patches/series --- debianutils-5.7/debian/patches/series 2022-07-27 06:17:42.000000000 +0000 +++ debianutils-5.7/debian/patches/series 2023-07-28 23:46:35.000000000 +0000 @@ -1 +1,4 @@ -dpkg-root +dpkg-root.patch +no-duplicates.patch +manage-usr-bin-sh.patch +fix-aliased-location.patch