passwd since 1:4.11.1+dfsg1-1 creates an empty /var/mail/_apt
This commit is contained in:
parent
e3a7b7d013
commit
88b9eaaad9
1 changed files with 14 additions and 0 deletions
14
coverage.sh
14
coverage.sh
|
@ -180,6 +180,7 @@ export SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH
|
||||||
# compared to the one chosen in debootstrap because of different installation
|
# compared to the one chosen in debootstrap because of different installation
|
||||||
# order in comparison to the systemd users
|
# order in comparison to the systemd users
|
||||||
# https://bugs.debian.org/969631
|
# https://bugs.debian.org/969631
|
||||||
|
# we cannot use useradd because passwd is not Essential:yes
|
||||||
$CMD --variant=$variant --mode=$defaultmode \
|
$CMD --variant=$variant --mode=$defaultmode \
|
||||||
--essential-hook='if [ $variant = - ]; then echo _apt:*:100:65534::/nonexistent:/usr/sbin/nologin >> "\$1"/etc/passwd; fi' \
|
--essential-hook='if [ $variant = - ]; then echo _apt:*:100:65534::/nonexistent:/usr/sbin/nologin >> "\$1"/etc/passwd; fi' \
|
||||||
$dist /tmp/debian-$dist-mm.tar $mirror
|
$dist /tmp/debian-$dist-mm.tar $mirror
|
||||||
|
@ -321,6 +322,18 @@ else
|
||||||
echo no difference for /etc/shadow- on $dist $variant >&2
|
echo no difference for /etc/shadow- on $dist $variant >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Because of unreproducible uids (#969631) we created the _apt user ourselves
|
||||||
|
# and because passwd is not Essential:yes we didn't use useradd. But passwd
|
||||||
|
# since 1:4.11.1+dfsg1-1 will create empty mail files, so we create it too.
|
||||||
|
# https://bugs.debian.org/1004710
|
||||||
|
if [ $variant = - ]; then
|
||||||
|
if [ -e /tmp/debian-$dist-debootstrap/var/mail/_apt ]; then
|
||||||
|
touch /tmp/debian-$dist-mm/var/mail/_apt
|
||||||
|
chmod 660 /tmp/debian-$dist-mm/var/mail/_apt
|
||||||
|
chown 100:8 /tmp/debian-$dist-mm/var/mail/_apt
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# check if the file content differs
|
# check if the file content differs
|
||||||
diff --unified --no-dereference --recursive /tmp/debian-$dist-debootstrap /tmp/debian-$dist-mm
|
diff --unified --no-dereference --recursive /tmp/debian-$dist-debootstrap /tmp/debian-$dist-mm
|
||||||
|
|
||||||
|
@ -846,6 +859,7 @@ cmp /tmp/debian-chroot.tar /tmp/debian-chroot-shiftedback.tar
|
||||||
# manually adjust uid/gid and compare "tar -t" output
|
# manually adjust uid/gid and compare "tar -t" output
|
||||||
tar --numeric-owner -tvf /tmp/debian-chroot.tar \
|
tar --numeric-owner -tvf /tmp/debian-chroot.tar \
|
||||||
| sed 's# 100/0 # 100100/100000 #' \
|
| sed 's# 100/0 # 100100/100000 #' \
|
||||||
|
| sed 's# 100/8 # 100100/100008 #' \
|
||||||
| sed 's# 0/0 # 100000/100000 #' \
|
| sed 's# 0/0 # 100000/100000 #' \
|
||||||
| sed 's# 0/5 # 100000/100005 #' \
|
| sed 's# 0/5 # 100000/100005 #' \
|
||||||
| sed 's# 0/8 # 100000/100008 #' \
|
| sed 's# 0/8 # 100000/100008 #' \
|
||||||
|
|
Loading…
Reference in a new issue