From 4ce5a92123754024ffd046fcb54fa7ddd4b277cc Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Mon, 7 Mar 2022 23:41:12 +0100 Subject: [PATCH] coverage.sh: now that the _apt user is created as a system user by adduser, we also need to change /etc/shadow --- coverage.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/coverage.sh b/coverage.sh index f8e7a37..deb233a 100755 --- a/coverage.sh +++ b/coverage.sh @@ -304,6 +304,15 @@ for f in "/tmp/debian-$dist-debootstrap/etc/shells" "/tmp/debian-$dist-mm/etc/sh sort -o "\$f" "\$f" done +# Because of unreproducible uids (#969631) we created the _apt user ourselves +# and because passwd is not Essential:yes we didn't use useradd. But newer +# versions of adduser and shadow will create a different /etc/shadow +for f in shadow shadow-; do + if grep -q '^_apt:!:' /tmp/debian-$dist-debootstrap/etc/\$f; then + sed -i 's/^_apt:\*:\([^:]\+\):0:99999:7:::$/_apt:!:\1::::::/' /tmp/debian-$dist-mm/etc/\$f + fi +done + # workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=917773 if ! cmp /tmp/debian-$dist-debootstrap/etc/shadow /tmp/debian-$dist-mm/etc/shadow; then echo patching /etc/shadow on $dist $variant >&2