Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package debootstrap for openSUSE:Factory 
checked in at 2023-10-08 12:19:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/debootstrap (Old)
 and      /work/SRC/openSUSE:Factory/.debootstrap.new.28202 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "debootstrap"

Sun Oct  8 12:19:15 2023 rev:26 rq:1116231 version:1.0.132

Changes:
--------
--- /work/SRC/openSUSE:Factory/debootstrap/debootstrap.changes  2023-07-27 
16:53:41.382791005 +0200
+++ /work/SRC/openSUSE:Factory/.debootstrap.new.28202/debootstrap.changes       
2023-10-08 12:23:08.668568950 +0200
@@ -1,0 +2,15 @@
+Sat Oct  7 02:51:56 UTC 2023 - Richard Rahl <rra...@proton.me>
+
+- update to 1.0.132:
+  * improve various tests
+
+- update to 1.0.131:
+  * Reinstate setup_merged_usr
+
+- update to 1.0.130:
+  * add --preserve-env option
+  * add Trisquel distribution
+  * add Pardus distribution
+  * fix debootstrap --second-stage on native runs
+
+-------------------------------------------------------------------

Old:
----
  debootstrap-1.0.128+nmu5.tar.bz2

New:
----
  debootstrap-1.0.132.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ debootstrap.spec ++++++
--- /var/tmp/diff_new_pack.r6bF6Y/_old  2023-10-08 12:23:09.804609842 +0200
+++ /var/tmp/diff_new_pack.r6bF6Y/_new  2023-10-08 12:23:09.804609842 +0200
@@ -18,12 +18,12 @@
 
 
 Name:           debootstrap
-Version:        1.0.128
+Version:        1.0.132
 Release:        0
 Summary:        Bootstrap a basic Debian system
 License:        MIT
 URL:            https://salsa.debian.org/installer-team/debootstrap
-Source:         
%{url}/-/archive/%{version}+nmu5/%{name}-%{version}+nmu5.tar.bz2
+Source:         %{url}/-/archive/%{version}/%{name}-%{version}.tar.bz2
 Patch0:         %{name}-norootforbuild.patch
 Requires:       binutils
 Requires:       wget
@@ -38,7 +38,7 @@
 into.
 
 %prep
-%autosetup -p1 -n %{name}-%{version}+nmu5
+%autosetup -p1 -n %{name}-%{version}
 
 %build
 # Nothing to build.

++++++ debootstrap-1.0.128+nmu5.tar.bz2 -> debootstrap-1.0.132.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/README 
new/debootstrap-1.0.132/README
--- old/debootstrap-1.0.128+nmu5/README 2023-07-16 13:46:05.000000000 +0200
+++ new/debootstrap-1.0.132/README      2023-08-28 15:18:21.000000000 +0200
@@ -21,7 +21,7 @@
 Then in the debootstrap source directory:
 
     export DEBOOTSTRAP_DIR=`pwd`
-    sudo ./debootstrap stable my-stable-dir
+    sudo --preserve-env=DEBOOTSTRAP_DIR ./debootstrap stable my-stable-dir
 
 If you are running a multi-stage boot strap (for example for a QEMU
 rootfs) you don't even need root:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/debian/changelog 
new/debootstrap-1.0.132/debian/changelog
--- old/debootstrap-1.0.128+nmu5/debian/changelog       2023-07-16 
13:46:05.000000000 +0200
+++ new/debootstrap-1.0.132/debian/changelog    2023-08-28 15:18:21.000000000 
+0200
@@ -1,3 +1,63 @@
+debootstrap (1.0.132) unstable; urgency=medium
+
+  * Team upload.
+
+  [ Johannes Schauer Marin Rodrigues ]
+  * debian/tests/control: run debootstrap with unshared namespaces
+
+  [ Simon McVittie ]
+  * d/tests/debian-testing:
+    - More accurately emulate the behaviour of pbuilder 0.231
+    - 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
+    - Resync fake/schroot-proposed with the patch proposed on #983423
+    - Improve debug logging
+    - Expand doc-comments
+    - With these changes, the autopkgtest is confirmed to pass in
+      autopkgtest-virt-qemu (Closes: #983197)
+    - Skip systemd-nspawn phase when $container is set
+
+ -- Luca Boccassi <bl...@debian.org>  Mon, 28 Aug 2023 14:16:37 +0100
+
+debootstrap (1.0.131) unstable; urgency=medium
+
+  * Team upload.
+
+  [ Simon McVittie ]
+  * functions: Reinstate setup_merged_usr() as it existed prior to !96
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sun, 20 Aug 2023 14:11:43 +0200
+
+debootstrap (1.0.130) unstable; urgency=medium
+
+  * Team upload.
+
+  [ Fatih Altun ]
+  * Add Pardus support
+
+  [ Denis 'GNUtoo' Carikli ]
+  * Add Trisquel to scripts dir
+
+  [ Helmut Grohne ]
+  * implement merged-/usr by post-merging. Closes: #1049898
+
+  [ Luca Boccassi ]
+  * Add myself to Uploaders
+
+  [ Michael Chen ]
+  * README: add --preserve-env option to sudo command
+
+ -- Luca Boccassi <bl...@debian.org>  Fri, 18 Aug 2023 16:02:59 +0100
+
+debootstrap (1.0.129) UNRELEASED; urgency=medium
+
+  * hurd: Fix debootstrap --second-stage on native runs.
+
+ -- Samuel Thibault <sthiba...@debian.org>  Sat, 20 May 2023 22:56:36 +0200
+
 debootstrap (1.0.128+nmu5) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/debian/control 
new/debootstrap-1.0.132/debian/control
--- old/debootstrap-1.0.128+nmu5/debian/control 2023-07-16 13:46:05.000000000 
+0200
+++ new/debootstrap-1.0.132/debian/control      2023-08-28 15:18:21.000000000 
+0200
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian Install System Team <debian-b...@lists.debian.org>
 Uploaders: Colin Watson <cjwat...@debian.org>, Steve McIntyre 
<93...@debian.org>,
-           Hideki Yamane <henr...@debian.org>,
+           Hideki Yamane <henr...@debian.org>, Luca Boccassi 
<bl...@debian.org>,
 Build-Depends: debhelper-compat (= 13)
 Standards-Version: 4.6.2
 Vcs-Browser: https://salsa.debian.org/installer-team/debootstrap
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/debian/rules 
new/debootstrap-1.0.132/debian/rules
--- old/debootstrap-1.0.128+nmu5/debian/rules   2023-07-16 13:46:05.000000000 
+0200
+++ new/debootstrap-1.0.132/debian/rules        2023-08-28 15:18:21.000000000 
+0200
@@ -9,6 +9,9 @@
 else ifeq (0,$(shell dpkg-vendor --derives-from Kali; echo $$?))
   RECOMMENDS := kali-archive-keyring, arch-test (>= 0.11~),
   SUGGESTS   := debian-archive-keyring, ubuntu-archive-keyring, binutils, 
xz-utils, zstd
+else ifeq (0,$(shell dpkg-vendor --derives-from Pardus; echo $$?))
+  RECOMMENDS := pardus-archive-keyring, arch-test (>= 0.11~),
+  SUGGESTS   := debian-archive-keyring, ubuntu-archive-keyring, binutils, 
xz-utils, zstd
 else
   RECOMMENDS := debian-archive-keyring, arch-test (>= 0.11~),
   SUGGESTS   := ubuntu-archive-keyring, binutils, xz-utils, zstd
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/debian/tests/control 
new/debootstrap-1.0.132/debian/tests/control
--- old/debootstrap-1.0.128+nmu5/debian/tests/control   2023-07-16 
13:46:05.000000000 +0200
+++ new/debootstrap-1.0.132/debian/tests/control        2023-08-28 
15:18:21.000000000 +0200
@@ -17,3 +17,24 @@
  python3-flask,
  python3-requests,
 Restrictions: allow-stderr
+
+# This tests running debootstrap inside an unshared user namespace.
+# Inside that namespace, mknod is not available and 
container=mmdebstrap-unshare
+# is used to let debootstrap bind-mount entries in /dev instead of using mknod
+# In such an environment "mount -t proc proc /proc" will not work (see
+# #1031222) so this also tests whether the fallback to bind-mounting
+# proc works as systemd-tmpfiles will otherwise not create several files.
+Test-Command: mmdebstrap --variant=custom --mode=unshare --setup-hook='env 
container=mmdebstrap-unshare ./debian/tests/debian-testing' 
--skip=update,setup,cleanup - "$AUTOPKGTEST_TMP/chroot.d"
+Features: test-name=unshared
+Depends:
+ debootstrap,
+ libdistro-info-perl,
+ libdpkg-perl,
+ libipc-run-perl,
+ perl,
+ systemd [linux-any],
+ systemd-container [linux-any],
+ ca-certificates,
+ mmdebstrap,
+ uidmap,
+Restrictions: allow-stderr
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/debian/tests/debian-testing 
new/debootstrap-1.0.132/debian/tests/debian-testing
--- old/debootstrap-1.0.128+nmu5/debian/tests/debian-testing    2023-07-16 
13:46:05.000000000 +0200
+++ new/debootstrap-1.0.132/debian/tests/debian-testing 2023-08-28 
15:18:21.000000000 +0200
@@ -92,17 +92,48 @@
         'chroot should have /etc/debian_version');
     ok(-x "$chroot/usr/bin/env",
         'chroot should have /usr/bin/env which is Essential');
+
+    if ($params{has_systemd}) {
+        for my $p (
+            "root/.ssh",                "run/lock/subsys",
+            "var/cache/private",        "var/lib/private",
+            "var/lib/systemd/coredump", "var/lib/systemd/pstore",
+            "var/log/README",           "var/log/private"
+          )
+        {
+            ok( -e "$chroot/$p",
+                "chroot should have /$p created by systemd-tmpfiles" );
+        }
+    }
+
     ok(-x "$chroot/usr/bin/hello", 'chroot should have /usr/bin/hello due to 
--include');
     ok(-d "$chroot/usr/share/doc", 'chroot should have /usr/share/doc');
 
-    ok(-c "$chroot/dev/full", '/dev/full should be a character device');
-    is(capture(['/usr/bin/stat', '--printf=%t %T %a', "$chroot/dev/full"]),
-        '1 7 666', '/dev/full should be device 1,7 with 0666 permissions');
-    ok(-c "$chroot/dev/null");
-    is(capture(['/usr/bin/stat', '--printf=%t %T %a', "$chroot/dev/null"]),
-        '1 3 666', '/dev/null should be device 1,3 with 0666 permissions');
+    if (!defined $ENV{container} || $ENV{container} ne "mmdebstrap-unshare") {
+        diag("not running with container=mmdebstrap-unshare");
+        ok(-c "$chroot/dev/full", '/dev/full should be a character device');
+        is(capture(['/usr/bin/stat', '--printf=%t %T %a', "$chroot/dev/full"]),
+            '1 7 666', '/dev/full should be device 1,7 with 0666 permissions');
+        ok(-c "$chroot/dev/null");
+        is(capture(['/usr/bin/stat', '--printf=%t %T %a', "$chroot/dev/null"]),
+            '1 3 666', '/dev/null should be device 1,3 with 0666 permissions');
+    }
 
     my $did_mknod_ptmx;
+    my $output;
+
+    if (verbose_run([qw(ls -l), "$chroot/dev/ptmx"], '>', \$output)) {
+        diag("$chroot/dev/ptmx: $output");
+    }
+    else {
+        diag("Unable to list $chroot/dev/ptmx");
+    }
+    if (verbose_run([qw(ls -l), "$chroot/dev/pts/ptmx"], '>', \$output)) {
+        diag("$chroot/dev/pts/ptmx: $output");
+    }
+    else {
+        diag("Unable to list $chroot/dev/pts/ptmx");
+    }
 
     if (-l "$chroot/dev/ptmx") {
         # Necessary if debootstrap is run inside some containers, see
@@ -115,10 +146,10 @@
     else {
         diag("/dev/ptmx is not a symbolic link");
         ok(-c "$chroot/dev/ptmx",
-            'if /dev/pts is not a symlink it should be a character device');
+            'if /dev/ptmx is not a symlink it should be a character device');
         is(capture(['/usr/bin/stat', '--printf=%t %T %a',
                     "$chroot/dev/ptmx"]), '5 2 666',
-            'if /dev/pts is a device node it should be 5,2 with 0666 
permissions');
+            'if /dev/ptmx is a device node it should be 5,2 with 0666 
permissions');
         $did_mknod_ptmx = 1;
     }
 
@@ -132,12 +163,39 @@
                 cat /etc/debian_version)]),
         $reference);
 
-    check_fake_schroot(%params, reference => $reference);
+    # The remaining tests rely on device nodes to either exist or already
+    # being bind-mounted. Their setups are not prepared to deal with the
+    # conditions in an environment with an unshared user namespace as
+    # used in mmdebstrap.
+    if (defined $ENV{container} && $ENV{container} eq "mmdebstrap-unshare") {
+        return;
+    }
+
+    # 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,26 +218,30 @@
             extra_argv => ['--sbuild']);
     }
 
+    # pbuilder >= 0.228.6 works fine
     check_fake_pbuilder(%params, reference => $reference,
-        version => 'proposed');
+        version => '0.231');
 
-    # 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 ".
+            local $TODO = "pbuilder 0.228.4-1 doesn't work when /dev/ptmx is ".
                 "a symlink to /dev/pts/ptmx";
-            check_fake_pbuilder(%params, reference => $reference);
+            check_fake_pbuilder(%params, reference => $reference,
+                version => '0.228.4-1');
         }
     }
     else {
-        check_fake_pbuilder(%params, reference => $reference);
+        check_fake_pbuilder(%params, reference => $reference,
+            version => '0.228.4-1');
     }
 }
 
 # Specify https mirror to check https mirror specific problem
 # https://bugs.debian.org/896071
 my $mirror = 'https://deb.debian.org/debian';
-my $tmp = $ENV{AUTOPKGTEST_TMP} || $ENV{AUTOPKGTEST_TMP};
+my $tmp = $ENV{AUTOPKGTEST_TMP};
 die "no autopkgtest temporary directory specified" unless $tmp;
 chdir $tmp or die "chdir $tmp: $!";
 
@@ -243,6 +305,20 @@
 }
 close $fh;
 
+my $output;
+if (verbose_run([qw(ls -l /dev/ptmx)], '>', \$output)) {
+    diag("/dev/ptmx: $output");
+}
+else {
+    diag("Unable to list /dev/ptmx");
+}
+if (verbose_run([qw(ls -l /dev/pts/ptmx)], '>', \$output)) {
+    diag("/dev/pts/ptmx: $output");
+}
+else {
+    diag("Unable to list /dev/pts/ptmx");
+}
+
 my $can_mknod_ptmx;
 if (run([qw(mknod -m000 ptmx c 5 2)], '&>', '/dev/null')) {
     diag("mknod ptmx succeeded");
@@ -258,23 +334,31 @@
 
 # Should specify multiple components for checking (see Bug#898738)
 if (!verbose_run(['debootstrap',
-            '--include=debootstrap,debian-archive-keyring,gnupg,hello',
+            '--include=debootstrap,debian-archive-keyring,gnupg,hello,systemd',
             '--variant=minbase',
             '--components=main,contrib,non-free',
             $testing, 'chroot.d', $mirror], '>&2')) {
     BAIL_OUT("debootstrap failed: $?");
 }
 
+if (!verbose_run([qw(find chroot.d/dev -ls)], '>&2')) {
+    BAIL_OUT("Unable to list contents of chroot's /dev: $?");
+}
+
 if ($check_non_docker_env) {
     check_chroot(chroot => 'chroot.d', can_mknod_ptmx => $can_mknod_ptmx,
-        kernel => $kernel, container => $container);
+        kernel => $kernel, container => $container, has_systemd => 1);
 }
 
 if ($^O ne 'linux') {
     diag("Cannot use systemd-nspawn on non-Linux");
 }
 elsif ($in_container) {
-    diag('in a container according to systemd --container, not trying to '.
+    diag('in a container according to systemd-detect-virt, not trying to '.
+        'use systemd-nspawn');
+}
+elsif (defined $ENV{container} && length $ENV{container}) {
+    diag('in a container according to $container, not trying to '.
         'use systemd-nspawn');
 }
 elsif (! -d '/run/systemd/system') {
@@ -295,8 +379,14 @@
         kernel => $kernel, container => "nspawn");
 }
 
-if (!run([qw(rm -fr --one-file-system chroot.d)], '>&2')) {
-    BAIL_OUT('Unable to remove chroot.d');
+if (!defined $ENV{container} || $ENV{container} ne "mmdebstrap-unshare") {
+    if (!run([qw(rm -fr --one-file-system chroot.d)], '>&2')) {
+        BAIL_OUT('Unable to remove chroot.d');
+    }
+} else {
+    if (!run([qw(env --chdir=chroot.d find . -mount -mindepth 1 -delete)], 
'>&2')) {
+        BAIL_OUT('Unable to remove contents of chroot.d');
+    }
 }
 
 done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/debootstrap-1.0.128+nmu5/debian/tests/fake/pbuilder-0.228.4-1 
new/debootstrap-1.0.132/debian/tests/fake/pbuilder-0.228.4-1
--- old/debootstrap-1.0.128+nmu5/debian/tests/fake/pbuilder-0.228.4-1   
2023-07-16 13:46:05.000000000 +0200
+++ new/debootstrap-1.0.132/debian/tests/fake/pbuilder-0.228.4-1        
2023-08-28 15:18:21.000000000 +0200
@@ -1,10 +1,16 @@
 #!/bin/sh
 # fake/pbuilder-0.228.4-1 -- emulate how pbuilder/0.228.4-1 would chroot.
-# It mounts /dev/pts, without explicitly requesting a new instance or a
-# usable /dev/pts/ptmx.
+#
+# Please do not modify this script without verifying that its behaviour
+# is still equivalent to the stated versions of pbuilder.
+#
+# This version has #841935 unfixed. It mounts /dev/pts, without explicitly
+# requesting a new instance or a usable /dev/pts/ptmx.
 # (There is of course a lot more that it does, but these are the parts that
 # affect pty users like script(1).)
 #
+# Reference: pbuilder/pbuilder-modules, search for dev/pts.
+#
 # Copyright © 2017 Simon McVittie
 # SPDX-License-Identifier: MIT
 # (see debian/copyright)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/debootstrap-1.0.128+nmu5/debian/tests/fake/pbuilder-0.231 
new/debootstrap-1.0.132/debian/tests/fake/pbuilder-0.231
--- old/debootstrap-1.0.128+nmu5/debian/tests/fake/pbuilder-0.231       
1970-01-01 01:00:00.000000000 +0100
+++ new/debootstrap-1.0.132/debian/tests/fake/pbuilder-0.231    2023-08-28 
15:18:21.000000000 +0200
@@ -0,0 +1,64 @@
+#!/bin/sh
+# fake/pbuilder-0.231 -- emulate how pbuilder >= 0.228.6 sets up its chroot
+#
+# Please do not modify this script without verifying that its behaviour
+# is still equivalent to the stated versions of pbuilder. If a future
+# version of pbuilder changes its behaviour, please copy this script and
+# modify the copy instead.
+#
+# This has #841935 fixed (commit 4a4134dd). It was checked for equivalence
+# to pbuilder 0.231, which is the version included in Debian 11 and 12,
+# but the versions in Debian 10 and 9 have equivalent code here.
+#
+# Reference: pbuilder/pbuilder-modules, search for dev/pts.
+#
+# Copyright © 2017-2021 Simon McVittie
+# SPDX-License-Identifier: MIT
+# (see debian/copyright)
+
+set -e
+
+BUILDPLACE="$1"
+shift
+if test -z "$BUILDPLACE" || test -z "$1"; then
+       echo "Usage: $0 CHROOT COMMAND...">&2
+       exit 2
+fi
+
+mkdir -p "$BUILDPLACE/dev/pts"
+TTYGRP=5
+TTYMODE=620
+mount -t devpts devpts "$BUILDPLACE/dev/pts" -o 
"newinstance,noexec,nosuid,gid=$TTYGRP,mode=$TTYMODE,ptmxmode=0666"
+
+mounted_ptmx=no
+
+if ! [ -L "$BUILDPLACE/dev/ptmx" ]; then
+    echo "# fake-pbuilder: redirecting /dev/ptmx to /dev/pts/ptmx" >&2
+    mount --bind "$BUILDPLACE/dev/pts/ptmx" "$BUILDPLACE/dev/ptmx"
+    mounted_ptmx=yes
+fi
+
+mounted_console=no
+
+if stdin_tty="$(tty)"; then
+    if [ ! -e "$BUILDPLACE/dev/console" ]; then
+        echo "# fake-pbuilder: creating /dev/console" >&2
+        mknod -m600 "$BUILDPLACE/dev/console" c 5 1
+    fi
+
+    echo "# fake-pbuilder: mounting $stdin_tty over /dev/console" >&2
+    mount --bind "$stdin_tty" "$BUILDPLACE/dev/console"
+    mounted_console=yes
+fi
+
+ls -l "$BUILDPLACE/dev/console" | sed -e 's/^/# fake-pbuilder: /' >&2
+ls -l "$BUILDPLACE/dev/ptmx" | sed -e 's/^/# fake-pbuilder: /' >&2
+ls -l "$BUILDPLACE/dev/pts/ptmx" | sed -e 's/^/# fake-pbuilder: /' >&2
+
+e=0
+chroot "$BUILDPLACE" "$@" || e=$?
+
+[ "$mounted_console" = no ] || umount "$BUILDPLACE/dev/console"
+[ "$mounted_ptmx" = no ] || umount "$BUILDPLACE/dev/ptmx"
+umount "$BUILDPLACE/dev/pts"
+exit "$e"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/debootstrap-1.0.128+nmu5/debian/tests/fake/pbuilder-proposed 
new/debootstrap-1.0.132/debian/tests/fake/pbuilder-proposed
--- old/debootstrap-1.0.128+nmu5/debian/tests/fake/pbuilder-proposed    
2023-07-16 13:46:05.000000000 +0200
+++ new/debootstrap-1.0.132/debian/tests/fake/pbuilder-proposed 1970-01-01 
01:00:00.000000000 +0100
@@ -1,54 +0,0 @@
-#!/bin/sh
-# fake/pbuilder-proposed -- emulate how pbuilder is proposed to chroot in
-# future.
-#
-# Copyright © 2017 Simon McVittie
-# SPDX-License-Identifier: MIT
-# (see debian/copyright)
-
-set -e
-
-BUILDPLACE="$1"
-shift
-if test -z "$BUILDPLACE" || test -z "$1"; then
-       echo "Usage: $0 CHROOT COMMAND...">&2
-       exit 2
-fi
-
-devpts_options="noexec,nosuid,gid=5,mode=620"
-
-mkdir -p "$BUILDPLACE/dev/pts"
-if ! mount -t devpts none "$BUILDPLACE/dev/pts" -o 
"$devpts_options,newinstance,ptmxmode=666"; then
-    mount -t devpts none "$BUILDPLACE/dev/pts" -o "$devpts_options"
-fi
-
-mounted_ptmx=no
-
-if [ -e "$BUILDPLACE/dev/pts/ptmx" ] && \
-        ! [ -L "$BUILDPLACE/dev/ptmx" ]; then
-    chmod 666 "$BUILDPLACE/dev/pts/ptmx"
-    mount --bind "$BUILDPLACE/dev/pts/ptmx" "$BUILDPLACE/dev/ptmx"
-    mounted_ptmx=yes
-fi
-
-mounted_console=no
-
-if stdin_tty="$(tty)"; then
-    if [ ! -e "$BUILDPLACE/dev/console" ]; then
-        mknod -m700 "$BUILDPLACE/dev/console" c 5 1
-    fi
-
-    mount --bind "$stdin_tty" "$BUILDPLACE/dev/console"
-    mounted_console=yes
-fi
-
-ls -l "$BUILDPLACE/dev/ptmx" | sed -e 's/^/# fake-pbuilder: /' >&2
-ls -l "$BUILDPLACE/dev/pts/ptmx" | sed -e 's/^/# fake-pbuilder: /' >&2
-
-e=0
-chroot "$BUILDPLACE" "$@" || e=$?
-
-[ "$mounted_console" = no ] || umount "$BUILDPLACE/dev/console"
-[ "$mounted_ptmx" = no ] || umount "$BUILDPLACE/dev/ptmx"
-umount "$BUILDPLACE/dev/pts"
-exit "$e"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/debootstrap-1.0.128+nmu5/debian/tests/fake/schroot-1.6.10-3 
new/debootstrap-1.0.132/debian/tests/fake/schroot-1.6.10-3
--- old/debootstrap-1.0.128+nmu5/debian/tests/fake/schroot-1.6.10-3     
2023-07-16 13:46:05.000000000 +0200
+++ new/debootstrap-1.0.132/debian/tests/fake/schroot-1.6.10-3  2023-08-28 
15:18:21.000000000 +0200
@@ -1,23 +1,32 @@
 #!/bin/sh
 # fake/schroot-1.6.10-3 -- emulate how schroot/1.6.10-3 would chroot.
-# It bind-mounts /dev/pts and maybe /dev from the host system.
+#
+# Please do not modify this script without verifying that its behaviour
+# is still equivalent to the stated versions of schroot. If a future
+# version of schroot changes its behaviour, please copy this script and
+# modify the copy instead.
+#
+# This version has #856877 unfixed. It bind-mounts /dev/pts and maybe
+# /dev from the host system, rather than creating a new instance of /dev/pts.
 # (There is of course a lot more that it does, but these are the parts that
 # affect pty users like script(1).)
 #
-# Copyright © 2017 Simon McVittie
+# Copyright © 2017-2023 Simon McVittie
 # SPDX-License-Identifier: MIT
 # (see debian/copyright)
 
 set -e
 
-# /etc/schroot/default/fstab
+# Reference: /etc/schroot/default/fstab
+# (in schroot source tree: etc/profile-templates/default/linux/fstab)
 bind_dev=yes
 
 while true; do
        case "$1" in
                (--sbuild)
                        shift
-                       # /etc/schroot/sbuild/fstab
+                       # Reference: /etc/schroot/sbuild/fstab
+                       # (source: etc/profile-templates/sbuild/linux/fstab)
                        bind_dev=no
                        ;;
                (*)
@@ -34,8 +43,9 @@
 
 [ "$bind_dev" = no ] || mount --bind /dev "$chroot/dev"
 mount --bind /dev/pts "$chroot/dev/pts"
-mount --bind /dev/ptmx "$chroot/dev/ptmx"
 
+ls -l "/dev/ptmx" | sed -e 's/^/# fake-schroot: outside chroot: /' >&2
+ls -l "/dev/pts/ptmx" | sed -e 's/^/# fake-schroot: outside chroot: /' >&2
 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 +53,6 @@
 chroot "$chroot" "$@" || e=$?
 
 umount "$chroot/dev/pts"
-umount "$chroot/dev/ptmx"
 [ "$bind_dev" = no ] || umount "$chroot/dev"
 
 exit "$e"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/debootstrap-1.0.128+nmu5/debian/tests/fake/schroot-proposed 
new/debootstrap-1.0.132/debian/tests/fake/schroot-proposed
--- old/debootstrap-1.0.128+nmu5/debian/tests/fake/schroot-proposed     
2023-07-16 13:46:05.000000000 +0200
+++ new/debootstrap-1.0.132/debian/tests/fake/schroot-proposed  2023-08-28 
15:18:21.000000000 +0200
@@ -1,20 +1,25 @@
 #!/bin/sh
 # fake/schroot-proposed -- emulate proposed mount behaviour for schroot
 #
-# Copyright © 2017 Simon McVittie
+# This version emulates the behaviour proposed on #856877. If it needs
+# changing, please update the proposed patch on #856877 too.
+#
+# Copyright © 2017-2023 Simon McVittie
 # SPDX-License-Identifier: MIT
 # (see debian/copyright)
 
 set -e
 
-# /etc/schroot/default/fstab
+# Reference: /etc/schroot/default/fstab
+# (in schroot source tree: etc/profile-templates/default/linux/fstab)
 bind_dev=yes
 
 while true; do
        case "$1" in
                (--sbuild)
                        shift
-                       # /etc/schroot/sbuild/fstab
+                       # Reference: /etc/schroot/sbuild/fstab
+                       # (source: etc/profile-templates/sbuild/linux/fstab)
                        bind_dev=no
                        ;;
                (*)
@@ -32,21 +37,34 @@
 [ "$bind_dev" = no ] || mount --bind /dev "$CHROOT_PATH/dev"
 mount -t devpts -o rw,newinstance,ptmxmode=666,mode=620,gid=5 /dev/pts 
"$CHROOT_PATH/dev/pts"
 
-ls -l "$CHROOT_PATH/dev/ptmx" | sed -e 's/^/# fake-schroot: /' >&2
-ls -l "$CHROOT_PATH/dev/pts/ptmx" | sed -e 's/^/# fake-schroot: /' >&2
+ls -l "/dev/ptmx" | sed -e 's/^/# fake-schroot: outside chroot: /' >&2
+ls -l "/dev/pts/ptmx" | sed -e 's/^/# fake-schroot: outside chroot: /' >&2
+
+ls -l "$CHROOT_PATH/dev/ptmx" | sed -e 's/^/# fake-schroot: after first step: 
/' >&2
+ls -l "$CHROOT_PATH/dev/pts/ptmx" | sed -e 's/^/# fake-schroot: after first 
step: /' >&2
 
 mounted_ptmx=no
 
+# Depending on how /dev was set up, /dev/ptmx might either be
+# character device (5,2), or a symbolic link to pts/ptmx.
+# Either way we want it to be equivalent to /dev/pts/ptmx, assuming
+# both exist.
 if [ -e "$CHROOT_PATH/dev/pts/ptmx" ] && \
-        ! [ -L "$CHROOT_PATH/dev/ptmx" ]; then
+        [ -e "$CHROOT_PATH/dev/ptmx" ] && \
+        ! [ "$CHROOT_PATH/dev/pts/ptmx" -ef "$CHROOT_PATH/dev/ptmx" ]; then
     mount --bind "$CHROOT_PATH/dev/pts/ptmx" "$CHROOT_PATH/dev/ptmx"
     mounted_ptmx=yes
 fi
 
 mounted_console=no
 
+# If schroot was invoked from a terminal, we still want to be able to
+# access that terminal. lxc and systemd-nspawn achieve this by
+# binding it onto /dev/console; so can we.
 if stdin_tty="$(tty)"; then
     if [ ! -e "$CHROOT_PATH/dev/console" ]; then
+        # We need something to mount onto, and it might as well be
+        # the correctly-numbered device node.
         mknod -m700 "$CHROOT_PATH/dev/console" c 5 1
     fi
 
@@ -54,8 +72,9 @@
     mounted_console=yes
 fi
 
-ls -l "$CHROOT_PATH/dev/ptmx" | sed -e 's/^/# fake-schroot: /' >&2
-ls -l "$CHROOT_PATH/dev/pts/ptmx" | sed -e 's/^/# fake-schroot: /' >&2
+ls -l "$CHROOT_PATH/dev/console" | sed -e 's/^/# fake-schroot: after fixing 
mounts: /' >&2
+ls -l "$CHROOT_PATH/dev/ptmx" | sed -e 's/^/# fake-schroot: after fixing 
mounts: /' >&2
+ls -l "$CHROOT_PATH/dev/pts/ptmx" | sed -e 's/^/# fake-schroot: after fixing 
mounts: /' >&2
 
 e=0
 chroot "$CHROOT_PATH" "$@" || e=$?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/functions 
new/debootstrap-1.0.132/functions
--- old/debootstrap-1.0.128+nmu5/functions      2023-07-16 13:46:05.000000000 
+0200
+++ new/debootstrap-1.0.132/functions   2023-08-28 15:18:21.000000000 +0200
@@ -233,6 +233,8 @@
 detect_container () {
        if [ "$container" = lxc ]; then
                CONTAINER="lxc"
+       elif [ "$container" = mmdebstrap-unshare ]; then
+               CONTAINER="mmdebstrap-unshare"
        elif grep -qs container=lxc-libvirt /proc/1/environ; then
                CONTAINER="lxc-libvirt"
        elif grep -qs ^systemd-nspawn$ /run/systemd/container || grep -qs 
systemd-nspawn /proc/1/environ || [ "$container" = "systemd-nspawn" ]; then
@@ -242,6 +244,7 @@
        else
                CONTAINER=""
        fi
+       # TODO: detect sub-hurds
 }
 
 ########################################################## variant handling
@@ -1156,7 +1159,15 @@
        for dir in $UMOUNT_DIRS; do
                realdir="$(in_target_nofail readlink -f "$dir")"
                [ "$realdir" ] || continue
-               ( cd / ; umount "$TARGET/${realdir#/}" ) || true
+               # if /proc was recursively bind-mounted, because we are running
+               # inside an unshared user namespace inside docker for example,
+               # then it cannot be recursively unmounted (even when mounted
+               # with rslave) so we do it lazily instead
+               if [ "$dir" = "/proc" ]; then
+                       ( cd / ; umount --lazy "$TARGET/${realdir#/}" ) || true
+               else
+                       ( cd / ; umount "$TARGET/${realdir#/}" ) || true
+               fi
        done
 }
 
@@ -1189,10 +1200,9 @@
                fi
                ;;
            hurd*)
-               # firmlink $TARGET/{dev,servers,proc} to the system ones.
-               settrans -a "$TARGET/dev" /hurd/firmlink /dev
-               settrans -a "$TARGET/servers" /hurd/firmlink /servers
-               settrans -a "$TARGET/proc" /hurd/firmlink /proc
+               if [ "$TARGET" != / ]; then
+                       settrans -a "$TARGET/proc" /hurd/firmlink /proc
+               fi
                ;;
            *)
                umount_on_exit /dev/pts
@@ -1246,14 +1256,19 @@
            freebsd)
                ;;
            hurd*)
+               touch "$TARGET/servers/exec"
+               touch "$TARGET/servers/startup"
+               touch "$TARGET/dev/console"
                ;;
            *)
-               if [ "$CONTAINER" = "lxc" ] || [ "$CONTAINER" = "lxc-libvirt" 
]; then
+               case "$CONTAINER" in
+                   (lxc | lxc-libvirt | mmdebstrap-unshare)
                        if ! setup_devices_simple; then
                                setup_devices_bind
                        fi
                        return 0
-               fi
+                       ;;
+               esac
 
                setup_devices_simple
                ;;
@@ -1273,8 +1288,14 @@
                mount -t devfs devfs "$TARGET/dev"
                mount -t fdescfs -o linrdlnk fdescfs "$TARGET/dev/fd" ;;
            hurd*)
-               # Use the setup-translators of the hurd package
-               in_target /usr/lib/hurd/setup-translators -k ;;
+               # Use the setup-translators of the hurd package
+               in_target /usr/lib/hurd/setup-translators -k
+               # firmlink $TARGET/{dev,servers} to the system ones.
+               if [ "$TARGET" != / ]; then
+                       settrans -a "$TARGET/dev" /hurd/firmlink /dev
+                       settrans -a "$TARGET/servers" /hurd/firmlink /servers
+               fi
+               ;;
        esac
 }
 
@@ -1358,14 +1379,109 @@
        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
            case "$CODENAME" in
@@ -1662,7 +1778,7 @@
            *)
                if ! doing_variant fakechroot; then
                case "$CONTAINER" in
-                 lxc|lxc-libvirt)
+                 lxc|lxc-libvirt|mmdebstrap-unshare)
                    ;;
                  *)
                    mknod "$1/test-dev-null" c 1 3 || return 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/amber 
new/debootstrap-1.0.132/scripts/amber
--- old/debootstrap-1.0.128+nmu5/scripts/amber  2023-07-16 13:46:05.000000000 
+0200
+++ new/debootstrap-1.0.132/scripts/amber       2023-08-28 15:18:21.000000000 
+0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/aramo 
new/debootstrap-1.0.132/scripts/aramo
--- old/debootstrap-1.0.128+nmu5/scripts/aramo  1970-01-01 01:00:00.000000000 
+0100
+++ new/debootstrap-1.0.132/scripts/aramo       2023-10-08 12:23:10.368630144 
+0200
@@ -0,0 +1 @@
+symbolic link to robur
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/awen 
new/debootstrap-1.0.132/scripts/awen
--- old/debootstrap-1.0.128+nmu5/scripts/awen   1970-01-01 01:00:00.000000000 
+0100
+++ new/debootstrap-1.0.132/scripts/awen        2023-10-08 12:23:10.480634175 
+0200
@@ -0,0 +1 @@
+symbolic link to robur
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/belenos 
new/debootstrap-1.0.132/scripts/belenos
--- old/debootstrap-1.0.128+nmu5/scripts/belenos        1970-01-01 
01:00:00.000000000 +0100
+++ new/debootstrap-1.0.132/scripts/belenos     2023-10-08 12:23:10.612638927 
+0200
@@ -0,0 +1 @@
+symbolic link to robur
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/brigantia 
new/debootstrap-1.0.132/scripts/brigantia
--- old/debootstrap-1.0.128+nmu5/scripts/brigantia      1970-01-01 
01:00:00.000000000 +0100
+++ new/debootstrap-1.0.132/scripts/brigantia   2023-10-08 12:23:10.864647998 
+0200
@@ -0,0 +1 @@
+symbolic link to robur
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/dagda 
new/debootstrap-1.0.132/scripts/dagda
--- old/debootstrap-1.0.128+nmu5/scripts/dagda  1970-01-01 01:00:00.000000000 
+0100
+++ new/debootstrap-1.0.132/scripts/dagda       2023-10-08 12:23:10.784645118 
+0200
@@ -0,0 +1 @@
+symbolic link to robur
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/debian-common 
new/debootstrap-1.0.132/scripts/debian-common
--- old/debootstrap-1.0.128+nmu5/scripts/debian-common  2023-07-16 
13:46:05.000000000 +0200
+++ new/debootstrap-1.0.132/scripts/debian-common       2023-08-28 
15:18:21.000000000 +0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/dwyn 
new/debootstrap-1.0.132/scripts/dwyn
--- old/debootstrap-1.0.128+nmu5/scripts/dwyn   1970-01-01 01:00:00.000000000 
+0100
+++ new/debootstrap-1.0.132/scripts/dwyn        2023-10-08 12:23:10.544636479 
+0200
@@ -0,0 +1 @@
+symbolic link to robur
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/etiona 
new/debootstrap-1.0.132/scripts/etiona
--- old/debootstrap-1.0.128+nmu5/scripts/etiona 1970-01-01 01:00:00.000000000 
+0100
+++ new/debootstrap-1.0.132/scripts/etiona      2023-10-08 12:23:10.680641375 
+0200
@@ -0,0 +1 @@
+symbolic link to robur
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/flidas 
new/debootstrap-1.0.132/scripts/flidas
--- old/debootstrap-1.0.128+nmu5/scripts/flidas 1970-01-01 01:00:00.000000000 
+0100
+++ new/debootstrap-1.0.132/scripts/flidas      2023-10-08 12:23:10.552636767 
+0200
@@ -0,0 +1 @@
+symbolic link to robur
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/gutsy 
new/debootstrap-1.0.132/scripts/gutsy
--- old/debootstrap-1.0.128+nmu5/scripts/gutsy  2023-07-16 13:46:05.000000000 
+0200
+++ new/debootstrap-1.0.132/scripts/gutsy       2023-08-28 15:18:21.000000000 
+0200
@@ -138,8 +138,8 @@
                        ;;
        esac
 
-       setup_merged_usr
        extract $required
+       merge_usr
 
        mkdir -p "$TARGET/var/lib/dpkg"
        : >"$TARGET/var/lib/dpkg/status"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/nabia 
new/debootstrap-1.0.132/scripts/nabia
--- old/debootstrap-1.0.128+nmu5/scripts/nabia  1970-01-01 01:00:00.000000000 
+0100
+++ new/debootstrap-1.0.132/scripts/nabia       2023-10-08 12:23:10.648640223 
+0200
@@ -0,0 +1 @@
+symbolic link to robur
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/ondokuz 
new/debootstrap-1.0.132/scripts/ondokuz
--- old/debootstrap-1.0.128+nmu5/scripts/ondokuz        1970-01-01 
01:00:00.000000000 +0100
+++ new/debootstrap-1.0.132/scripts/ondokuz     2023-10-08 12:23:10.516635472 
+0200
@@ -0,0 +1 @@
+symbolic link to pardus
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/onyedi 
new/debootstrap-1.0.132/scripts/onyedi
--- old/debootstrap-1.0.128+nmu5/scripts/onyedi 1970-01-01 01:00:00.000000000 
+0100
+++ new/debootstrap-1.0.132/scripts/onyedi      2023-10-08 12:23:10.400631296 
+0200
@@ -0,0 +1 @@
+symbolic link to pardus
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/pardus 
new/debootstrap-1.0.132/scripts/pardus
--- old/debootstrap-1.0.128+nmu5/scripts/pardus 1970-01-01 01:00:00.000000000 
+0100
+++ new/debootstrap-1.0.132/scripts/pardus      2023-08-28 15:18:21.000000000 
+0200
@@ -0,0 +1,17 @@
+mirror_style release
+download_style apt
+finddebs_style from-indices
+variants - buildd fakechroot minbase
+keyring /usr/share/keyrings/pardus-archive-keyring.gpg
+default_mirror http://depo.pardus.org.tr/pardus
+
+# include common settings
+if [ -e "$DEBOOTSTRAP_DIR/scripts/debian-common" ]; then
+ . "$DEBOOTSTRAP_DIR/scripts/debian-common"
+elif [ -e /debootstrap/debian-common ]; then
+ . /debootstrap/debian-common
+elif [ -e "$DEBOOTSTRAP_DIR/debian-common" ]; then
+ . "$DEBOOTSTRAP_DIR/debian-common"
+else
+ error 1 NOCOMMON "File not found: debian-common"
+fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/robur 
new/debootstrap-1.0.132/scripts/robur
--- old/debootstrap-1.0.128+nmu5/scripts/robur  1970-01-01 01:00:00.000000000 
+0100
+++ new/debootstrap-1.0.132/scripts/robur       2023-08-28 15:18:21.000000000 
+0200
@@ -0,0 +1,218 @@
+case $ARCH in
+  amd64|i386)
+       default_mirror http://archive.trisquel.info/trisquel
+       ;;
+  *)
+       default_mirror http://ports.trisquel.info/trisquel
+       ;;
+esac
+mirror_style release
+download_style apt
+finddebs_style from-indices
+variants - buildd fakechroot minbase
+keyring /usr/share/keyrings/trisquel-archive-keyring.gpg
+
+if doing_variant fakechroot; then
+       test "$FAKECHROOT" = "true" || error 1 FAKECHROOTREQ "This variant 
requires fakechroot environment to be started"
+fi
+
+case $ARCH in
+       alpha|ia64) LIBC="libc6.1" ;;
+       *)          LIBC="libc6" ;;
+esac
+
+work_out_debs () {
+       required="$(get_debs Priority: required)"
+
+       if doing_variant -; then
+               #required="$required $(get_debs Priority: important)"
+               #  ^^ should be getting debconf here somehow maybe
+               base="$(get_debs Priority: important)"
+       elif doing_variant buildd; then
+               base="$(get_debs Build-Essential: yes)"
+       elif doing_variant fakechroot || doing_variant minbase; then
+               base="apt"
+       fi
+
+       case $MIRRORS in
+           https://*)
+               base="$base apt-transport-https ca-certificates"
+               ;;
+       esac
+}
+
+first_stage_install () {
+       extract $required
+
+       mkdir -p "$TARGET/var/lib/dpkg"
+       : >"$TARGET/var/lib/dpkg/status"
+       : >"$TARGET/var/lib/dpkg/available"
+
+       setup_etc
+       if [ ! -e "$TARGET/etc/fstab" ]; then
+               echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > 
"$TARGET/etc/fstab"
+               chown 0:0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
+       fi
+
+       setup_devices
+
+       x_feign_install () {
+               local pkg="$1"
+               local deb="$(debfor $pkg)"
+               local ver="$(extract_deb_field "$TARGET/$deb" Version)"
+
+               mkdir -p "$TARGET/var/lib/dpkg/info"
+
+               echo \
+"Package: $pkg
+Version: $ver
+Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
+
+               touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
+       }
+
+       x_feign_install dpkg
+}
+
+second_stage_install () {
+       x_core_install () {
+               smallyes '' | in_target dpkg --force-depends --install $(debfor 
"$@")
+       }
+
+       p () {
+               baseprog="$(($baseprog + ${1:-1}))"
+       }
+
+       if doing_variant fakechroot; then
+               setup_proc_fakechroot
+       else
+               setup_proc
+               in_target /sbin/ldconfig
+       fi
+
+       DEBIAN_FRONTEND=noninteractive
+       DEBCONF_NONINTERACTIVE_SEEN=true
+       export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN
+
+       baseprog=0
+       bases=7
+
+       p; progress $baseprog $bases INSTCORE "Installing core packages" #1
+       info INSTCORE "Installing core packages..."
+
+       p; progress $baseprog $bases INSTCORE "Installing core packages" #2
+       ln -sf mawk "$TARGET/usr/bin/awk"
+       x_core_install base-passwd
+       x_core_install base-files
+       p; progress $baseprog $bases INSTCORE "Installing core packages" #3
+       x_core_install dpkg
+
+       if [ ! -e "$TARGET/etc/localtime" ]; then
+               ln -sf /usr/share/zoneinfo/Etc/UTC "$TARGET/etc/localtime"
+       fi
+
+       if doing_variant fakechroot; then
+               install_fakechroot_tools
+       fi
+
+       p; progress $baseprog $bases INSTCORE "Installing core packages" #4
+       x_core_install $LIBC
+
+       p; progress $baseprog $bases INSTCORE "Installing core packages" #5
+       x_core_install perl-base
+
+       p; progress $baseprog $bases INSTCORE "Installing core packages" #6
+       rm "$TARGET/usr/bin/awk"
+       x_core_install mawk
+
+       p; progress $baseprog $bases INSTCORE "Installing core packages" #7
+       if doing_variant -; then
+               x_core_install debconf
+       fi
+
+       baseprog=0
+       bases=$(set -- $required; echo $#)
+
+       info UNPACKREQ "Unpacking required packages..."
+
+       smallyes '' |
+               (repeatn 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure 
while unpacking required packages.  This will be attempted up to five times." 
"" \
+               dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 
8>&1 1>&7 |
+               dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required 
packages" UNPACKING) 7>&1
+
+       info CONFREQ "Configuring required packages..."
+
+       if doing_variant fakechroot; then
+       # fix initscripts postinst (no mounting possible, and wrong if 
condition)
+       sed -i '/dpkg.*--compare-versions/ s/\<lt\>/lt-nl/' 
"$TARGET/var/lib/dpkg/info/initscripts.postinst"
+       fi
+
+       echo \
+"#!/bin/sh
+exit 101" > "$TARGET/usr/sbin/policy-rc.d"
+       chmod 755 "$TARGET/usr/sbin/policy-rc.d"
+
+       mv "$TARGET/sbin/start-stop-daemon" 
"$TARGET/sbin/start-stop-daemon.REAL"
+       echo \
+"#!/bin/sh
+echo
+echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > 
"$TARGET/sbin/start-stop-daemon"
+       chmod 755 "$TARGET/sbin/start-stop-daemon"
+
+       if [ -x "$TARGET/sbin/initctl" ]; then
+         mv "$TARGET/sbin/initctl" "$TARGET/sbin/initctl.REAL"
+         echo \
+"#!/bin/sh
+if [ \"\$1\" = version ]; then exec /sbin/initctl.REAL \"\$@\"; fi
+echo
+echo \"Warning: Fake initctl called, doing nothing\"" > "$TARGET/sbin/initctl"
+         chmod 755 "$TARGET/sbin/initctl"
+       fi
+
+       setup_dselect_method apt
+
+       smallyes '' |
+               (in_target_failmsg CONF_REQ_FAIL "Failure while configuring 
required packages." "" \
+               dpkg --status-fd 8 --configure --pending --force-configure-any 
--force-depends 8>&1 1>&7 |
+               dpkg_progress $baseprog $bases CONFREQ "Configuring required 
packages" CONFIGURING) 7>&1
+
+       baseprog=0
+       bases="$(set -- $base; echo $#)"
+
+       info UNPACKBASE "Unpacking the base system..."
+
+       setup_available $required $base
+       done_predeps=
+       while predep=$(get_next_predep); do
+               # We have to resolve dependencies of pre-dependencies manually 
because
+               # dpkg --predep-package doesn't handle this.
+               predep=$(without "$(without "$(resolve_deps $predep)" 
"$required")" "$done_predeps")
+               # XXX: progress is tricky due to how dpkg_progress works
+               # -- cjwatson 2009-07-29
+               p; smallyes '' |
+               in_target dpkg --force-overwrite --force-confold 
--skip-same-version --install $(debfor $predep)
+               base=$(without "$base" "$predep")
+               done_predeps="$done_predeps $predep"
+       done
+
+       smallyes '' |
+               (repeatn 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while 
installing base packages.  This will be re-attempted up to five times." "" \
+               dpkg --status-fd 8 --force-overwrite --force-confold 
--skip-same-version --unpack $(debfor $base) 8>&1 1>&7 |
+               dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base 
system" UNPACKING) 7>&1
+
+       info CONFBASE "Configuring the base system..."
+
+       smallyes '' |
+               (repeatn 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while 
configuring base packages.  This will be re-attempted up to five times." "" \
+               dpkg --status-fd 8 --force-confold --skip-same-version 
--configure -a 8>&1 1>&7 |
+               dpkg_progress $baseprog $bases CONFBASE "Configuring base 
system" CONFIGURING) 7>&1
+
+       if [ -x "$TARGET/sbin/initctl.REAL" ]; then
+               mv "$TARGET/sbin/initctl.REAL" "$TARGET/sbin/initctl"
+       fi
+       mv "$TARGET/sbin/start-stop-daemon.REAL" 
"$TARGET/sbin/start-stop-daemon"
+       rm -f "$TARGET/usr/sbin/policy-rc.d"
+
+       progress $bases $bases CONFBASE "Configuring base system"
+       info BASESUCCESS "Base system installed successfully."
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/slaine 
new/debootstrap-1.0.132/scripts/slaine
--- old/debootstrap-1.0.128+nmu5/scripts/slaine 1970-01-01 01:00:00.000000000 
+0100
+++ new/debootstrap-1.0.132/scripts/slaine      2023-10-08 12:23:10.532636047 
+0200
@@ -0,0 +1 @@
+symbolic link to robur
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/taranis 
new/debootstrap-1.0.132/scripts/taranis
--- old/debootstrap-1.0.128+nmu5/scripts/taranis        1970-01-01 
01:00:00.000000000 +0100
+++ new/debootstrap-1.0.132/scripts/taranis     2023-10-08 12:23:10.744643678 
+0200
@@ -0,0 +1 @@
+symbolic link to robur
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/toutatis 
new/debootstrap-1.0.132/scripts/toutatis
--- old/debootstrap-1.0.128+nmu5/scripts/toutatis       1970-01-01 
01:00:00.000000000 +0100
+++ new/debootstrap-1.0.132/scripts/toutatis    2023-10-08 12:23:10.560637055 
+0200
@@ -0,0 +1 @@
+symbolic link to robur
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/yirmibir 
new/debootstrap-1.0.132/scripts/yirmibir
--- old/debootstrap-1.0.128+nmu5/scripts/yirmibir       1970-01-01 
01:00:00.000000000 +0100
+++ new/debootstrap-1.0.132/scripts/yirmibir    2023-10-08 12:23:10.760644254 
+0200
@@ -0,0 +1 @@
+symbolic link to pardus
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.128+nmu5/scripts/yirmiuc 
new/debootstrap-1.0.132/scripts/yirmiuc
--- old/debootstrap-1.0.128+nmu5/scripts/yirmiuc        1970-01-01 
01:00:00.000000000 +0100
+++ new/debootstrap-1.0.132/scripts/yirmiuc     2023-10-08 12:23:10.656640511 
+0200
@@ -0,0 +1 @@
+symbolic link to pardus

Reply via email to