Package: release.debian.org
Severity: normal
Tags: bookworm
User: release.debian....@packages.debian.org
Usertags: pu
X-Debbugs-Cc: debootst...@packages.debian.org, hel...@subdivi.de
Control: affects -1 + src:debootstrap
Control: block 1025708 by -1

[ Reason ]
Part of the transition to merged-/usr, and more specifically, allowing
us to stop shipping files in trixie whose physical path on disk does
not match their path in the dpkg database due to directory aliasing.

This change needs to be in bookworm (and bullseye, and maybe buster)
before that process can continue, because official buildds run debootstrap
from stable (or older).

I also took the opportunity to backport changes that make the autopkgtests
pass.

[ Impact ]
If not accepted, trixie will continue to be stuck in a
mostly-but-not-entirely merged-/usr limbo, with the moratorium from #1035831
remaining in place.

[ Tests ]
More details of testing on
<https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/102>.
A prerelease (differing only in the changelog) is available from
<https://people.debian.org/~smcv/12.2/pool/main/d/debootstrap/>.

I used this version of debootstrap to install sid, trixie, bookworm,
bullseye and buster on amd64, in the default, minbase and buildd
variants, and compared the results to corresponding pairs of reference
chroots. The reference chroots were installed with the Debian 12.1
version of debootstrap, explicitly forcing --[no-]merged-usr.

All default and minbase chroots continue to be merged-/usr by default.

The sid and trixie buildd chroots are now merged-/usr by default (this
is an intentional change).

The bookworm, bullseye and buster buildd chroots continue to be
non-merged-/usr by default.

When I used diffoscope to compare each chroot tarball to the reference
chroot tarball with the same suite, variant and (non-)merged-/usr status,
all differences were expected or ignorable:

- /lib32, /libx32 symlinks not created (an intentional change)
- empty /usr/lib32/, /usr/libx32/ not created (an intentional change)
- non-reproducible timestamps (ignorable)
- non-reproducible machine ID (ignorable)
- non-reproducible ldconfig cache (ignorable)
- non-reproducible systemd-journald message catalog in buster (ignorable)
- non-reproducible /var/log (ignorable)

Philip Hands built a d-i mini.iso with the proposed version, and it seems
to have installed GNOME successfully under openQA.

There is also an autopkgtest which bootstraps Debian testing and
inspects various subtleties of the resulting chroot. It now passes under
autopkgtest-virt-qemu (which previously failed), autopkgtest-virt-lxc
and Salsa-CI.

The changes were backported from testing/unstable, where there were
no regression reports that I've seen. The last of them migrated to
trixie today.

[ Risks ]
Packages that were relying on sid and trixie buildds to be non-merged-/usr
could break or misbehave. This is intentional: only merged-/usr is
supported, and this change is mainly to get the buildds into a supported
state for the future.

Packages that were relying on the existence of compat symlinks for
non-default multilib flavours (for example /lib32 and /libx32 on amd64)
will no longer find that they exist in all cases. I would say this is only
a minor risk. In principle it could be mitigated by creating the compat
symlinks unconditionally when bootstrapping older suites (<= bookworm)
but if that's wanted, we should do it in unstable first.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable (and trixie)

[ Changes ]

* debootstrap:
  - Add --merged-usr to the --help (#1031828). Minor documentation fix,
    no functional change.

* functions:
  - can_usrmerge_symlink(), merge_usr_entry(), merge_usr():
    Helmut Grohne's implementation of a new bootstrap protocol for
    merged-/usr, which unpacks Essential packages and then does the
    equivalent of the usrmerge package's convert-usrmerge before
    proceeding, instead of creating the compat symlinks and then unpacking
    Essential packages over the top of them.
    This is a prerequisite for lifting the moratorium imposed by #1035831.
    (#1049898)

    Unlike the old setup_merged_usr(), this does not create compat symlinks
    for non-default multilib libQUAL directories unless they are mentioned
    in an Essential package: the practical effect is that on for example
    amd64, the /lib32 and /libx32 symlinks are no longer created (but /lib64
    still is, because libc6:amd64 needs it).

  - In merge_usr() (new) and setup_merged_usr() (no longer used by
    debootstrap, but some versions of mmdebstrap rely on it),
    apply the /usr merge to trixie, sid and future buildd chroots.
    Technical Committee consensus is that we want this, and it is a
    prerequisite for lifting the moratorium imposed by #1035831.

* scripts/*:
  - As above, use functions' merge_usr() after unpacking Essential
    packages, instead of using setup_merged_usr() before. This change is
    smaller than it looks from the debdiff, because all affected Ubuntu
    and PureOS scripts are symlinks to each other, but debdiff follows
    symlinks.
    (#1049898)

* d/tests/debian-testing: Tests only.
  - Don't assert that the mockup of schroot behaves perfectly if
    debootstrap was run under a container manager: in practice it will not,
    but this is a schroot bug, not a debootstrap bug.
    This was making the autopkgtest fail when I run it in
    autopkgtest-virt-qemu. (#983197)

* d/tests/fake/: Tests only.
  - Make a mockup of schroot emulate the real thing more accurately, so
    that we are testing what we claimed to have been testing. (#983311)
    This also turns out to be necessary to make the autopkgtest
    pass under autopkgtest-virt-qemu. (#983197)

[ Other info ]
A bullseye equivalent will follow on #1025708 when I've finished testing it.
To keep bookworm >= bullseye at all times, this bookworm update should be
accepted before the bullseye equivalent is.

Review and testing took place on
<https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/102>.

    smcv
diffstat for debootstrap-1.0.128+nmu2 debootstrap-1.0.128+nmu2+deb12u1

 debian/.gitignore                  |    6 +
 debian/changelog                   |   30 +++++++++
 debian/gbp.conf                    |    1 
 debian/salsa-ci.yml                |    1 
 debian/tests/debian-testing        |   27 +++++++-
 debian/tests/fake/schroot-1.6.10-3 |    2 
 debootstrap                        |    3 
 debootstrap.8                      |    5 -
 functions                          |  117 ++++++++++++++++++++++++++++++++++---
 scripts/amber                      |    2 
 scripts/artful                     |    2 
 scripts/bionic                     |    2 
 scripts/byzantium                  |    2 
 scripts/cosmic                     |    2 
 scripts/crimson                    |    2 
 scripts/debian-common              |    8 +-
 scripts/disco                      |    2 
 scripts/eoan                       |    2 
 scripts/focal                      |    2 
 scripts/groovy                     |    2 
 scripts/gutsy                      |    2 
 scripts/hardy                      |    2 
 scripts/hirsute                    |    2 
 scripts/impish                     |    2 
 scripts/intrepid                   |    2 
 scripts/jammy                      |    2 
 scripts/jaunty                     |    2 
 scripts/karmic                     |    2 
 scripts/kinetic                    |    2 
 scripts/lucid                      |    2 
 scripts/maverick                   |    2 
 scripts/natty                      |    2 
 scripts/oneiric                    |    2 
 scripts/precise                    |    2 
 scripts/quantal                    |    2 
 scripts/raring                     |    2 
 scripts/saucy                      |    2 
 scripts/trusty                     |    2 
 scripts/utopic                     |    2 
 scripts/vivid                      |    2 
 scripts/wily                       |    2 
 scripts/xenial                     |    2 
 scripts/yakkety                    |    2 
 scripts/zesty                      |    2 
 44 files changed, 214 insertions(+), 54 deletions(-)

diff -Nru debootstrap-1.0.128+nmu2/debian/changelog debootstrap-1.0.128+nmu2+deb12u1/debian/changelog
--- debootstrap-1.0.128+nmu2/debian/changelog	2022-10-18 23:49:31.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/debian/changelog	2023-08-30 15:21:17.000000000 +0100
@@ -1,3 +1,33 @@
+debootstrap (1.0.128+nmu2+deb12u1) bookworm; urgency=medium
+
+  * Non-maintainer upload targeting Debian 12.2, with maintainer approval
+    from Luca Boccassi.
+  * Backport merged-/usr support changes from trixie:
+    - Implement merged-/usr by post-merging.
+      This changes the bootstrap order so that it will be possible for a
+      future version of base-files in trixie/sid to take responsibility for
+      creating the /bin, /sbin, /lib* symlinks, and is a prerequisite for
+      lifting the moratorium imposed by #1035831.
+      (Closes: #1049898; implementation by Helmut Grohne)
+    - functions: Reinstate setup_merged_usr() as it existed before
+      fixing #1049898, for backwards-compatibility with older versions of
+      mmdebstrap.
+    - functions: Default to merged-/usr for suites newer than bookworm,
+      even for the buildd profile. This allows packages targeting trixie
+      to assume that merged-/usr is the only layout possible, and is a
+      prerequisite for lifting the moratorium imposed by #1035831.
+    - Mention --merged-usr in --help output. (Closes: #1031828)
+  * Backport autopkgtest regression fixes from trixie:
+    - Revert fake/schroot-1.6.10-3 to an accurate emulation of the
+      behaviour of schroot 1.6.10-3 (Closes: #983311)
+    - Document schroot 1.6.10-3 with the default profile as expected to
+      fail to use /dev/pts in a lxc >= 3 or Docker container; this is a
+      schroot bug (#983423) and not a debootstrap bug
+    - With these changes, the autopkgtest is confirmed to pass in
+      autopkgtest-virt-qemu (Closes: #983197)
+
+ -- Simon McVittie <s...@debian.org>  Wed, 30 Aug 2023 15:21:17 +0100
+
 debootstrap (1.0.128+nmu2) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nru debootstrap-1.0.128+nmu2/debian/gbp.conf debootstrap-1.0.128+nmu2+deb12u1/debian/gbp.conf
--- debootstrap-1.0.128+nmu2/debian/gbp.conf	2022-10-18 23:48:32.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/debian/gbp.conf	2023-08-30 15:21:17.000000000 +0100
@@ -1,2 +1,3 @@
 [DEFAULT]
 debian-tag = %(version)s
+debian-branch = bookworm
diff -Nru debootstrap-1.0.128+nmu2/debian/.gitignore debootstrap-1.0.128+nmu2+deb12u1/debian/.gitignore
--- debootstrap-1.0.128+nmu2/debian/.gitignore	1970-01-01 01:00:00.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/debian/.gitignore	2023-08-30 15:21:17.000000000 +0100
@@ -0,0 +1,6 @@
+debootstrap
+debootstrap-udeb
+files
+*.debhelper.log
+*.substvars
+
diff -Nru debootstrap-1.0.128+nmu2/debian/salsa-ci.yml debootstrap-1.0.128+nmu2+deb12u1/debian/salsa-ci.yml
--- debootstrap-1.0.128+nmu2/debian/salsa-ci.yml	2022-08-30 20:48:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/debian/salsa-ci.yml	2023-08-30 15:21:17.000000000 +0100
@@ -6,3 +6,4 @@
 variables:
   SALSA_CI_DISABLE_BLHC: 1
   SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 1
+  RELEASE: 'bookworm'
diff -Nru debootstrap-1.0.128+nmu2/debian/tests/debian-testing debootstrap-1.0.128+nmu2+deb12u1/debian/tests/debian-testing
--- debootstrap-1.0.128+nmu2/debian/tests/debian-testing	2022-08-30 20:48:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/debian/tests/debian-testing	2023-08-30 15:21:17.000000000 +0100
@@ -132,12 +132,31 @@
                 cat /etc/debian_version)]),
         $reference);
 
-    check_fake_schroot(%params, reference => $reference);
+    # The schroot behaviour proposed to fix #856877 and #983423 works,
+    # even inside (privileged) lxc.
     check_fake_schroot(%params, reference => $reference, version => 'proposed');
     check_fake_schroot(%params, reference => $reference, version => 'proposed',
         extra_argv => ['--sbuild']);
 
-    # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817236
+    # As of 1.6.10-3, or equivalently 1.6.10-11, the default profile
+    # certainly doesn't work in lxc >= 3 or in Docker:
+    # https://bugs.debian.org/983423
+    # It probably won't work in other container managers either, for
+    # similar reasons.
+    if (defined $params{container}) {
+        TODO: {
+            local $TODO = "schroot default profile doesn't work in lxc >= 3 or Docker";
+            check_fake_schroot(%params, reference => $reference,
+                version => '1.6.10-3');
+        }
+    }
+    else {
+        check_fake_schroot(%params, reference => $reference,
+            version => '1.6.10-3');
+    }
+
+    # schroot 1.6.10-3's sbuild profile does work in lxc, but only on newer
+    # kernels: https://bugs.debian.org/856877
     if (Dpkg::Version->new($params{kernel}) < Dpkg::Version->new('4.7') &&
             defined $params{container} && $params{container} eq 'lxc') {
         TODO: {
@@ -160,10 +179,12 @@
             extra_argv => ['--sbuild']);
     }
 
+    # pbuilder >= 0.228.6 works fine
     check_fake_pbuilder(%params, reference => $reference,
         version => 'proposed');
 
-    # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817236
+    # Older pbuilder doesn't work if we are in a container where we can't
+    # create the /dev/ptmx device node: https://bugs.debian.org/841935
     if (! $params{can_mknod_ptmx}) {
         TODO: {
             local $TODO = "schroot --sbuild doesn't work when /dev/ptmx is ".
diff -Nru debootstrap-1.0.128+nmu2/debian/tests/fake/schroot-1.6.10-3 debootstrap-1.0.128+nmu2+deb12u1/debian/tests/fake/schroot-1.6.10-3
--- debootstrap-1.0.128+nmu2/debian/tests/fake/schroot-1.6.10-3	2022-08-30 20:48:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/debian/tests/fake/schroot-1.6.10-3	2023-08-30 15:21:17.000000000 +0100
@@ -34,7 +34,6 @@
 
 [ "$bind_dev" = no ] || mount --bind /dev "$chroot/dev"
 mount --bind /dev/pts "$chroot/dev/pts"
-mount --bind /dev/ptmx "$chroot/dev/ptmx"
 
 ls -l "$chroot/dev/ptmx" | sed -e 's/^/# fake-schroot: /' >&2
 ls -l "$chroot/dev/pts/ptmx" | sed -e 's/^/# fake-schroot: /' >&2
@@ -43,7 +42,6 @@
 chroot "$chroot" "$@" || e=$?
 
 umount "$chroot/dev/pts"
-umount "$chroot/dev/ptmx"
 [ "$bind_dev" = no ] || umount "$chroot/dev"
 
 exit "$e"
diff -Nru debootstrap-1.0.128+nmu2/debootstrap debootstrap-1.0.128+nmu2+deb12u1/debootstrap
--- debootstrap-1.0.128+nmu2/debootstrap	2022-10-18 23:48:32.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/debootstrap	2023-08-30 15:21:17.000000000 +0100
@@ -109,7 +109,10 @@
       --variant=X            use variant X of the bootstrap scripts
                              (currently supported variants: buildd, fakechroot,
                               minbase)
+      --merged-usr           make /{bin,sbin,lib}/ symlinks to /usr/
+                             (default for newer Debian suites)
       --no-merged-usr        do not make /{bin,sbin,lib}/ symlinks to /usr/
+                             (default for older Debian suites)
       --keyring=K            check Release files against keyring K
       --no-check-gpg         avoid checking Release file signatures
       --force-check-gpg      force checking Release file signatures
diff -Nru debootstrap-1.0.128+nmu2/debootstrap.8 debootstrap-1.0.128+nmu2+deb12u1/debootstrap.8
--- debootstrap-1.0.128+nmu2/debootstrap.8	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/debootstrap.8	2023-08-30 15:21:17.000000000 +0100
@@ -89,11 +89,12 @@
 .IP
 .IP "\fB\-\-merged-usr\fP"
 Create /{bin,sbin,lib}/ symlinks pointing to their counterparts in /usr/.
-(Default for most variants.)
+(Default for most variants and suites.)
 .IP
 .IP "\fB\-\-no-merged-usr\fP"
 Do not create /{bin,sbin,lib}/ symlinks pointing to their counterparts in /usr/.
-(Default for the buildd variant.)
+(Default for the buildd variant of Debian 12 'bookworm' or older, and all
+variants of Debian 9 'stretch' or older.)
 .IP
 .IP "\fB\-\-keyring=KEYRING\fP"
 Override the default keyring for the distribution being bootstrapped,
diff -Nru debootstrap-1.0.128+nmu2/functions debootstrap-1.0.128+nmu2+deb12u1/functions
--- debootstrap-1.0.128+nmu2/functions	2022-10-18 23:48:32.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/functions	2023-08-30 15:21:17.000000000 +0100
@@ -1358,17 +1358,116 @@
 	esac
 }
 
-# Find out where the runtime dynamic linker and the shared libraries
-# can be installed on each architecture: native, multilib and multiarch.
-# This data can be verified by checking the files in the debian/sysdeps/
-# directory of the glibc package.
-#
-# This function must be updated to support any new architecture which
-# either installs the RTLD in a directory different from /lib or builds
-# multilib library packages.
+can_usrmerge_symlink() {
+	# Absolute symlinks can be relocated without problems.
+	test "${2#/}" = "$2" || return 0
+	while :; do
+		if test "${2#/}" != "$2"; then
+			# Handle double-slashes.
+			set -- "$1" "${2#/}"
+		elif test "${2#./}" != "$2"; then
+			# Handle ./ inside a link target.
+			set -- "$1" "${2#./}"
+		elif test "$2" = ..; then
+			# A parent directory symlink is ok if it does not
+			# cross the top level directory.
+			test "${1%/*/*}" != "$1" -a -n "${1%/*/*}"
+			return $?
+		elif test "${2#../}" != "$2"; then
+			# Symbolic link crossing / cannot be moved safely.
+			# This is prohibited by Debian Policy 10.5.
+			test "${1%/*/*}" = "$1" -o -z "${1%/*/*}" && return 1
+			set -- "${1%/*}" "${2#../}"
+		else
+			# Consider the symlink ok if its target does not
+			# contain a parent directory. When we fail here,
+			# the link target is non-minimal and doesn't happen
+			# in the archive.
+			test "${2#*/../}" = "$2"
+			return $?
+		fi
+	done
+}
+
+merge_usr_entry() {
+	local entry canon
+	canon="$TARGET/usr/${1#"$TARGET/"}"
+	test -h "$canon" &&
+		error 1 USRMERGEFAIL "cannot move %s as its destination exists as a symlink" "${1#"$TARGET"}"
+	if ! test -e "$canon"; then
+		mv "$1" "$canon"
+		return 0
+	fi
+	test -d "$1" ||
+		error 1 USRMERGEFAIL "cannot move non-directory %s as its destination exists" "${1#"$TARGET"}"
+	test -d "$canon" ||
+		error 1 USRMERGEFAIL "cannot move directory %s as its destination is not a directory" "${1#"$TARGET"}"
+	for entry in "$1/"* "$1/."*; do
+		# Some shells return . and .. on dot globs.
+		test "${entry%/.}" != "${entry%/..}" && continue
+		if test -h "$entry" && ! can_usrmerge_symlink "${entry#"$TARGET"}" "$(readlink "$entry")"; then
+			error 1 USRMERGEFAIL "cannot move relative symlink crossing top-level directory" "${entry#"$TARGET"}"
+		fi
+		# Ignore glob match failures
+		if test "${entry%'/*'}" != "${entry%'/.*'}" && ! test -e "$entry"; then
+			continue
+		fi
+		merge_usr_entry "$entry"
+	done
+	rmdir "$1"
+}
+
+merge_usr() {
+	if doing_variant buildd && [ -z "$MERGED_USR" ]; then
+	    case "$CODENAME" in
+		etch*|lenny|squeeze|wheezy|jessie*|stretch|buster|bullseye|bookworm)
+		    MERGED_USR="no"
+		    ;;
+	    esac
+	fi
+
+	if [ "$MERGED_USR" = "no" ]; then
+	    # With the usrmerge becoming pseudo-essential we need to use this flag
+	    # to ensure that even if it gets installed the buildd is not converted
+	    # when debootstrap needs to create an unmerged-usr installation.
+	    case "$CODENAME" in
+		etch*|lenny|squeeze|wheezy|jessie*|stretch|buster|bullseye)
+		    ;;
+		*)
+		    mkdir -p "$TARGET/etc"
+		    echo "this system will not be supported in the future" > "$TARGET/etc/unsupported-skip-usrmerge-conversion"
+		    if ! doing_variant buildd; then
+			warning SANITYCHECK "Upgrading non-merged-/usr environments post-bookworm is unsupported. Only do this for CI/QA infrastructure that will be re-bootstrapped rather than upgraded."
+		    fi
+		    ;;
+	    esac
+	    return 0;
+	fi
+
+	local dir
+	# This is list includes all possible multilib directories. It must be
+	# updated when new multilib directories are being added. Hopefully,
+	# all new architectures use multiarch instead, so we never get to
+	# update this.
+	for dir in bin lib lib32 lib64 libo32 libx32 sbin; do
+		test -h "$TARGET/$dir" && continue
+		test -e "$TARGET/$dir" || continue
+		merge_usr_entry "$TARGET/$dir"
+		ln -s "usr/$dir" "$TARGET/$dir"
+	done
+}
+
+# Previous implementation of merged /usr: not used within debootstrap,
+# but used by mmdebstrap's hooks/merged-usr/setup00.sh, mainly to get
+# the correct per-architecture $link_dir list of non-default multilib
+# directories.
 setup_merged_usr() {
 	if doing_variant buildd && [ -z "$MERGED_USR" ]; then
-		MERGED_USR="no"
+	    case "$CODENAME" in
+		etch*|lenny|squeeze|wheezy|jessie*|stretch|buster|bullseye|bookworm)
+		    MERGED_USR="no"
+		    ;;
+	    esac
 	fi
 
 	if [ "$MERGED_USR" = "no" ]; then
diff -Nru debootstrap-1.0.128+nmu2/scripts/amber debootstrap-1.0.128+nmu2+deb12u1/scripts/amber
--- debootstrap-1.0.128+nmu2/scripts/amber	2022-10-18 23:48:42.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/amber	2023-08-30 15:21:17.000000000 +0100
@@ -54,8 +54,8 @@
 	MERGED_USR="yes"
 	EXTRACT_DEB_TAR_OPTIONS="$EXTRACT_DEB_TAR_OPTIONS -k"
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/artful debootstrap-1.0.128+nmu2+deb12u1/scripts/artful
--- debootstrap-1.0.128+nmu2/scripts/artful	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/artful	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/bionic debootstrap-1.0.128+nmu2+deb12u1/scripts/bionic
--- debootstrap-1.0.128+nmu2/scripts/bionic	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/bionic	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/byzantium debootstrap-1.0.128+nmu2+deb12u1/scripts/byzantium
--- debootstrap-1.0.128+nmu2/scripts/byzantium	2022-10-18 23:48:42.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/byzantium	2023-08-30 15:21:17.000000000 +0100
@@ -54,8 +54,8 @@
 	MERGED_USR="yes"
 	EXTRACT_DEB_TAR_OPTIONS="$EXTRACT_DEB_TAR_OPTIONS -k"
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/cosmic debootstrap-1.0.128+nmu2+deb12u1/scripts/cosmic
--- debootstrap-1.0.128+nmu2/scripts/cosmic	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/cosmic	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/crimson debootstrap-1.0.128+nmu2+deb12u1/scripts/crimson
--- debootstrap-1.0.128+nmu2/scripts/crimson	2022-10-18 23:48:42.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/crimson	2023-08-30 15:21:17.000000000 +0100
@@ -54,8 +54,8 @@
 	MERGED_USR="yes"
 	EXTRACT_DEB_TAR_OPTIONS="$EXTRACT_DEB_TAR_OPTIONS -k"
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/debian-common debootstrap-1.0.128+nmu2+deb12u1/scripts/debian-common
--- debootstrap-1.0.128+nmu2/scripts/debian-common	2022-10-17 10:44:53.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/debian-common	2023-08-30 15:21:17.000000000 +0100
@@ -42,9 +42,9 @@
 	esac
 
 	# On suites >= bookworm, either we set up a merged-/usr system
-	# via setup_merged_usr, or we deliberately avoided that migration
-	# by creating the flag file. This means there's no need for the
-	# live migration 'usrmerge' package and its extra dependencies:
+	# via merge_usr, or we deliberately avoid that migration by creating
+	# the flag file. This means there's no need for the live migration
+	# 'usrmerge' package and its extra dependencies:
 	# we can install the empty 'usr-is-merged' metapackage to indicate
 	# that the transition has been done.
 	case "$CODENAME" in
@@ -73,8 +73,8 @@
 		MERGED_USR="no"
 	fi
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/disco debootstrap-1.0.128+nmu2+deb12u1/scripts/disco
--- debootstrap-1.0.128+nmu2/scripts/disco	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/disco	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/eoan debootstrap-1.0.128+nmu2+deb12u1/scripts/eoan
--- debootstrap-1.0.128+nmu2/scripts/eoan	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/eoan	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/focal debootstrap-1.0.128+nmu2+deb12u1/scripts/focal
--- debootstrap-1.0.128+nmu2/scripts/focal	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/focal	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/groovy debootstrap-1.0.128+nmu2+deb12u1/scripts/groovy
--- debootstrap-1.0.128+nmu2/scripts/groovy	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/groovy	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/gutsy debootstrap-1.0.128+nmu2+deb12u1/scripts/gutsy
--- debootstrap-1.0.128+nmu2/scripts/gutsy	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/gutsy	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/hardy debootstrap-1.0.128+nmu2+deb12u1/scripts/hardy
--- debootstrap-1.0.128+nmu2/scripts/hardy	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/hardy	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/hirsute debootstrap-1.0.128+nmu2+deb12u1/scripts/hirsute
--- debootstrap-1.0.128+nmu2/scripts/hirsute	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/hirsute	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/impish debootstrap-1.0.128+nmu2+deb12u1/scripts/impish
--- debootstrap-1.0.128+nmu2/scripts/impish	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/impish	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/intrepid debootstrap-1.0.128+nmu2+deb12u1/scripts/intrepid
--- debootstrap-1.0.128+nmu2/scripts/intrepid	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/intrepid	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/jammy debootstrap-1.0.128+nmu2+deb12u1/scripts/jammy
--- debootstrap-1.0.128+nmu2/scripts/jammy	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/jammy	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/jaunty debootstrap-1.0.128+nmu2+deb12u1/scripts/jaunty
--- debootstrap-1.0.128+nmu2/scripts/jaunty	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/jaunty	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/karmic debootstrap-1.0.128+nmu2+deb12u1/scripts/karmic
--- debootstrap-1.0.128+nmu2/scripts/karmic	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/karmic	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/kinetic debootstrap-1.0.128+nmu2+deb12u1/scripts/kinetic
--- debootstrap-1.0.128+nmu2/scripts/kinetic	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/kinetic	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/lucid debootstrap-1.0.128+nmu2+deb12u1/scripts/lucid
--- debootstrap-1.0.128+nmu2/scripts/lucid	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/lucid	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/maverick debootstrap-1.0.128+nmu2+deb12u1/scripts/maverick
--- debootstrap-1.0.128+nmu2/scripts/maverick	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/maverick	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/natty debootstrap-1.0.128+nmu2+deb12u1/scripts/natty
--- debootstrap-1.0.128+nmu2/scripts/natty	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/natty	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/oneiric debootstrap-1.0.128+nmu2+deb12u1/scripts/oneiric
--- debootstrap-1.0.128+nmu2/scripts/oneiric	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/oneiric	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/precise debootstrap-1.0.128+nmu2+deb12u1/scripts/precise
--- debootstrap-1.0.128+nmu2/scripts/precise	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/precise	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/quantal debootstrap-1.0.128+nmu2+deb12u1/scripts/quantal
--- debootstrap-1.0.128+nmu2/scripts/quantal	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/quantal	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/raring debootstrap-1.0.128+nmu2+deb12u1/scripts/raring
--- debootstrap-1.0.128+nmu2/scripts/raring	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/raring	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/saucy debootstrap-1.0.128+nmu2+deb12u1/scripts/saucy
--- debootstrap-1.0.128+nmu2/scripts/saucy	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/saucy	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/trusty debootstrap-1.0.128+nmu2+deb12u1/scripts/trusty
--- debootstrap-1.0.128+nmu2/scripts/trusty	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/trusty	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/utopic debootstrap-1.0.128+nmu2+deb12u1/scripts/utopic
--- debootstrap-1.0.128+nmu2/scripts/utopic	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/utopic	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/vivid debootstrap-1.0.128+nmu2+deb12u1/scripts/vivid
--- debootstrap-1.0.128+nmu2/scripts/vivid	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/vivid	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/wily debootstrap-1.0.128+nmu2+deb12u1/scripts/wily
--- debootstrap-1.0.128+nmu2/scripts/wily	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/wily	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/xenial debootstrap-1.0.128+nmu2+deb12u1/scripts/xenial
--- debootstrap-1.0.128+nmu2/scripts/xenial	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/xenial	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/yakkety debootstrap-1.0.128+nmu2+deb12u1/scripts/yakkety
--- debootstrap-1.0.128+nmu2/scripts/yakkety	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/yakkety	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"
diff -Nru debootstrap-1.0.128+nmu2/scripts/zesty debootstrap-1.0.128+nmu2+deb12u1/scripts/zesty
--- debootstrap-1.0.128+nmu2/scripts/zesty	2022-09-30 18:17:37.000000000 +0100
+++ debootstrap-1.0.128+nmu2+deb12u1/scripts/zesty	2023-08-30 15:21:17.000000000 +0100
@@ -138,8 +138,8 @@
 			;;
 	esac
 
-	setup_merged_usr
 	extract $required
+	merge_usr
 
 	mkdir -p "$TARGET/var/lib/dpkg"
 	: >"$TARGET/var/lib/dpkg/status"

Reply via email to