Hello community,

here is the log from the commit of package debootstrap for openSUSE:Factory 
checked in at 2017-06-30 18:42:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/debootstrap (Old)
 and      /work/SRC/openSUSE:Factory/.debootstrap.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "debootstrap"

Fri Jun 30 18:42:23 2017 rev:19 rq:506978 version:1.0.90

Changes:
--------
--- /work/SRC/openSUSE:Factory/debootstrap/debootstrap.changes  2016-03-07 
13:29:45.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.debootstrap.new/debootstrap.changes     
2017-06-30 18:43:35.523750940 +0200
@@ -1,0 +2,39 @@
+Wed Jun 28 13:38:35 UTC 2017 - [email protected]
+
+- Version bump to 1.0.90
+  * Add (Ubuntu) artful as a symlink to gutsy.
+  * Improve /dev/ptmx handling (deb#817236)
+  * Add autopkgtest support to test various scenarios.
+  * Uniformize COMPONENTS/USE_COMPONENTS handling.
+  * Strip the arch-qualifier (deb#836525)
+  * Default to split /usr again, as merged-/usr breaks dpkg-shlibdeps 
(deb#844221)
+  * remove scratchbox2 support (deb#796189)
+  * Reword split_inline_sig (deb#842591)
+  * Add support for downloading and validating InRelease files, by splitting
+    up detached signature from signed data.
+  * Switch default mirror to deb.debian.org.
+  * Add (Ubuntu) zesty as a symlink to gutsy.
+  * Add jessie-kfreebsd to merged-/usr blacklist.
+  * No longer Build-Depend on makedev. The code using it was already
+    removed in debootstrap 1.0.82.
+  * Do not use `tar -k` for older releases which might have file
+    conflicts between the packages to be installed. (deb#838388)
+  * Error out when seeing short options. (deb#548880)
+  * Add oldoldstable -> sid script symlink. (deb#792734)
+  * Add buster -> sid and bullseye -> sid script symlinks.
+  * Only unpack and configure the base system when there are actually
+    packages to install. (deb#825034)
+  * debootstrap.8: Use stretch instead of wheezy in examples.
+  * Enable merged-/usr by default. (deb#839046)
+  * Add support for xz-compressed Packages indices. (deb#837649)
+  * functions: Validate that the requested suite is listed in the
+    Release file's Suite or Codename field. (deb#837075)
+  * Add support for merged-/usr, enabled by a new --merged-usr option 
(deb#810301)
+    Feign install of dpkg in second stage. This avoids problems when
+    using dpkg-deb together with busybox' tar. (deb#837185)
+  * Excise all devices.tar.gz code. (deb#830869)
+  * Add (Ubuntu) yakkety as a symlink to gutsy.
+  * scripts/gutsy: Support kfreebsd & hurd arches on Ubuntu targets 
(deb#818748)
+- Remove obsolete devices.tar.gz file
+
+-------------------------------------------------------------------

Old:
----
  debootstrap_1.0.79.tar.gz
  devices.tar.gz

New:
----
  debootstrap_1.0.90.tar.gz

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

Other differences:
------------------
++++++ debootstrap.spec ++++++
--- /var/tmp/diff_new_pack.RYeQ5j/_old  2017-06-30 18:43:36.095670497 +0200
+++ /var/tmp/diff_new_pack.RYeQ5j/_new  2017-06-30 18:43:36.095670497 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package debootstrap
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 # Copyright (c) 2012 Frank Lichtenheld <[email protected]>
 #
 # All modifications and additions to the file contributed by third parties
@@ -18,14 +18,13 @@
 
 
 Name:           debootstrap
-Version:        1.0.79
+Version:        1.0.90
 Release:        0
 Summary:        Bootstrap a basic Debian system
 License:        MIT
 Group:          Development/Tools/Other
 Url:            https://packages.debian.org/debootstrap
 Source0:        
http://httpredir.debian.org/debian/pool/main/d/%{name}/%{name}_%{version}.tar.gz
-Source1:        devices.tar.gz
 Patch0:         %{name}-norootforbuild.patch
 %if 0%{?suse_version} >= 1120
 BuildArch:      noarch
@@ -43,7 +42,6 @@
 %prep
 %setup -q
 %patch0 -p1
-cp -f %{SOURCE1} .
 
 %build
 # Nothing to build.

++++++ debootstrap-norootforbuild.patch ++++++
--- /var/tmp/diff_new_pack.RYeQ5j/_old  2017-06-30 18:43:36.119667122 +0200
+++ /var/tmp/diff_new_pack.RYeQ5j/_new  2017-06-30 18:43:36.119667122 +0200
@@ -1,7 +1,8 @@
-diff -ur debootstrap.orig/Makefile debootstrap/Makefile
---- debootstrap.orig/Makefile  2011-08-10 13:59:34.000000000 +0200
-+++ debootstrap/Makefile       2011-08-12 21:57:41.329074862 +0200
-@@ -19,14 +19,13 @@
+diff --git a/Makefile b/Makefile
+index 8516803..21a9a39 100644
+--- a/Makefile
++++ b/Makefile
+@@ -11,8 +11,7 @@ install:
        mkdir -p $(DESTDIR)/usr/sbin
  
        cp -a scripts/* $(DSDIR)/scripts/
@@ -11,10 +12,3 @@
        sed 's/@VERSION@/$(VERSION)/g' debootstrap 
>$(DESTDIR)/usr/sbin/debootstrap
 -      chown root:root $(DESTDIR)/usr/sbin/debootstrap
        chmod 0755 $(DESTDIR)/usr/sbin/debootstrap
- 
- ifeq ($(shell uname),Linux)
--      install -o root -g root -m 0644 devices.tar.gz $(DSDIR)/
-+      install -m 0644 devices.tar.gz $(DSDIR)/
- endif
- 
- devices.tar.gz:

++++++ debootstrap_1.0.79.tar.gz -> debootstrap_1.0.90.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.79/Makefile 
new/debootstrap-1.0.90/Makefile
--- old/debootstrap-1.0.79/Makefile     2015-07-10 05:01:20.000000000 +0200
+++ new/debootstrap-1.0.90/Makefile     2016-10-21 05:01:55.000000000 +0200
@@ -1,18 +1,9 @@
 # avoid dpkg-dev dependency; fish out the version with sed
 VERSION := $(shell sed 's/.*(\(.*\)).*/\1/; q' debian/changelog)
-DATE := $(shell sed -n '/^ -- /{s/.*> \(.*\)/\1/p;q;}' debian/changelog)
 
-MAKEDEV ?= /sbin/MAKEDEV
-
-ifeq ($(shell uname),Linux)
-all: devices.tar.gz
-else
 all:
-endif
 
 clean:
-       rm -f devices.tar.gz
-       rm -rf dev
 
 DSDIR=$(DESTDIR)/usr/share/debootstrap
 install:
@@ -25,20 +16,3 @@
        sed 's/@VERSION@/$(VERSION)/g' debootstrap 
>$(DESTDIR)/usr/sbin/debootstrap
        chown root:root $(DESTDIR)/usr/sbin/debootstrap
        chmod 0755 $(DESTDIR)/usr/sbin/debootstrap
-
-ifeq ($(shell uname),Linux)
-       install -o root -g root -m 0644 devices.tar.gz $(DSDIR)/
-endif
-
-devices.tar.gz:
-       rm -rf dev
-       mkdir -p dev
-       chown 0:0 dev
-       chmod 755 dev
-       (cd dev && $(MAKEDEV) std ptmx fd consoleonly)
-       tar --mtime="$(DATE)" -cf - dev | gzip -9n >devices.tar.gz
-       @if [ "$$(tar tvf devices.tar.gz | wc -l)" -lt 2 ]; then \
-               echo " ** devices.tar.gz is empty!" >&2; \
-               exit 1; \
-       fi
-       rm -rf dev
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.79/README 
new/debootstrap-1.0.90/README
--- old/debootstrap-1.0.79/README       2011-01-19 05:36:02.000000000 +0100
+++ new/debootstrap-1.0.90/README       2016-10-21 05:01:55.000000000 +0200
@@ -10,19 +10,29 @@
 can be useful if you want a quick way to make a Debian chroot on another
 system, or if you are testing modifications to debootstrap.
 
-First, get the source. 
+First, get the source.
 
 * Either by using git
-  git clone git://git.debian.org/d-i/debootstrap.git
+  git clone https://anonscm.debian.org/git/d-i/debootstrap.git
 
-* Or by visiting <http://packages.debian.org/source/sid/debootstrap>
+* Or by visiting <https://packages.debian.org/source/sid/debootstrap>
   and downloading the tar.gz file
 
-Then as root, in the debootstrap source directory:
+Then in the debootstrap source directory:
 
-make devices.tar.gz
-export DEBOOTSTRAP_DIR=`pwd`
-debootstrap sid sid
+    export DEBOOTSTRAP_DIR=`pwd`
+    sudo ./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:
+
+    export DEBOOTSTRAP_DIR=`pwd`
+    fakeroot ./debootstrap --foreign --arch=armhf testing my-testing-dir 
http://deb.debian.org/debian
+
+Of course you will need to execute the second stage as root to finish the 
bootstrap:
+
+   (on foreign hardware)
+   /debootstrap/debootstrap --second-stage
 
 
 Future
@@ -31,7 +41,7 @@
   * Cross-strap support - so you can bootstrap a filesystem to the
     point where it will successfully boot, and finish installing itself
     without having to be running the target architecture or OS yourself.
-    This means you should be able to run 
+    This means you should be able to run
 
        debootstrap --arch powerpc sarge ./sarge-ppc-chroot ...
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.79/TODO new/debootstrap-1.0.90/TODO
--- old/debootstrap-1.0.79/TODO 2011-04-09 03:00:31.000000000 +0200
+++ new/debootstrap-1.0.90/TODO 2016-10-21 05:01:55.000000000 +0200
@@ -7,5 +7,3 @@
       -- versus command line
       -- support for sources (vs mirrors)
       -- faux-pinning for packages 
-
-  ++ makedev in second stage
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.79/debian/changelog 
new/debootstrap-1.0.90/debian/changelog
--- old/debootstrap-1.0.79/debian/changelog     2016-02-19 07:23:59.000000000 
+0100
+++ new/debootstrap-1.0.90/debian/changelog     2017-04-24 06:49:33.000000000 
+0200
@@ -1,3 +1,124 @@
+debootstrap (1.0.90) unstable; urgency=medium
+
+  [ Mattia Rizzolo ]
+  * Add (Ubuntu) artful as a symlink to gutsy.
+
+ -- Christian Perrier <[email protected]>  Mon, 24 Apr 2017 06:49:33 +0200
+
+debootstrap (1.0.89) unstable; urgency=medium
+
+  [ Simon McVittie ]
+  * Instead of creating a /dev/ptmx → pts/ptmx symlink unconditionally,
+    try mknod with “c 5 2” parameters first, and fall back to a symlink
+    only if it fails. This should help with various tools like pbuilder,
+    sbuild, and schroot (Closes: #817236).
+  * Add autopkgtest support to test various scenarios.
+
+  [ Cyril Brulebois ]
+  * Uniformize COMPONENTS/USE_COMPONENTS handling.
+
+ -- Cyril Brulebois <[email protected]>  Fri, 10 Mar 2017 13:10:56 +0100
+
+debootstrap (1.0.88) unstable; urgency=high
+
+  [ Sven Joachim ]
+  * Strip the arch-qualifier (Closes: #836525)
+
+ -- Steve McIntyre <[email protected]>  Wed, 08 Feb 2017 23:53:10 +0000
+
+debootstrap (1.0.87) unstable; urgency=high
+
+  [ Julien Cristau ]
+  * Default to split /usr again, as merged-/usr breaks dpkg-shlibdeps
+    (closes: #844221).
+
+  [ Riku Voipio ]
+  * remove scratchbox2 support (closes: #796189)
+
+ -- Christian Perrier <[email protected]>  Wed, 16 Nov 2016 06:47:27 +0100
+
+debootstrap (1.0.86) unstable; urgency=high
+
+  * Rework split_inline_sig by using shell built-ins instead of trying to
+    mix sed and tr together, which might work on regular systems but not
+    from inside the Debian Installer (Closes: #842591). Thanks to Ansgar
+    Burchardt for the proof of concept!
+
+ -- Cyril Brulebois <[email protected]>  Sun, 30 Oct 2016 23:35:45 +0100
+
+debootstrap (1.0.85) unstable; urgency=medium
+
+  [ Julien Cristau ]
+  * Add support for downloading and validating InRelease files, by splitting
+    up detached signature from signed data.
+  * Switch default mirror to deb.debian.org.
+
+  [ Colin Watson ]
+  * Add (Ubuntu) zesty as a symlink to gutsy.
+
+  [ Ansgar Burchardt ]
+  * Add jessie-kfreebsd to merged-/usr blacklist.
+  * No longer Build-Depend on makedev. The code using it was already
+    removed in debootstrap 1.0.82.
+  * Do not use `tar -k` for older releases which might have file
+    conflicts between the packages to be installed. (Closes: #838388)
+  * Error out when seeing short options. (Closes: #548880)
+  * Add oldoldstable -> sid script symlink. (Closes: #792734)
+  * Add buster -> sid and bullseye -> sid script symlinks.
+  * Only unpack and configure the base system when there are actually
+    packages to install. (Closes: #825034)
+  * debootstrap.8: Use stretch instead of wheezy in examples.
+
+  [ Marco d'Itri ]
+  * Enable merged-/usr by default. (Closes: #839046)
+
+ -- Julien Cristau <[email protected]>  Fri, 21 Oct 2016 20:22:49 +0200
+
+debootstrap (1.0.84) unstable; urgency=medium
+
+  [ Ansgar Burchardt ]
+  * Add support for xz-compressed Packages indices. (Closes: #837649)
+
+ -- Christian Perrier <[email protected]>  Thu, 06 Oct 2016 06:59:38 +0200
+
+debootstrap (1.0.83) unstable; urgency=medium
+
+  [ Ansgar Burchardt ]
+  * functions: Validate that the requested suite is listed in the
+    Release file's Suite or Codename field. (Closes: #837075)
+  * Add support for merged-/usr, enabled by a new --merged-usr option.
+    (Closes: #810301)
+  * Feign install of dpkg in second stage. This avoids problems when
+    using dpkg-deb together with busybox' tar. (Closes: #837185)
+  * README: Use https://.
+
+  [ Steve McIntyre ]
+  * Update Standards-Version to 3.9.8 (no changes needed)
+
+ -- Steve McIntyre <[email protected]>  Tue, 13 Sep 2016 13:16:41 +0100
+
+debootstrap (1.0.82) unstable; urgency=medium
+
+  [ Alex Bennée ]
+  * Excise all devices.tar.gz code. Closes: #830869
+
+ -- Christian Perrier <[email protected]>  Thu, 08 Sep 2016 07:09:56 +0200
+
+debootstrap (1.0.81) unstable; urgency=medium
+
+  [ Luca Falavigna ]
+  * Add (Ubuntu) yakkety as a symlink to gutsy.
+
+ -- Christian Perrier <[email protected]>  Tue, 03 May 2016 06:51:57 +0200
+
+debootstrap (1.0.80) unstable; urgency=medium
+
+  [ Jon Boden ]
+  * scripts/gutsy: Support kfreebsd & hurd arches on Ubuntu targets
+    (closes: #818748)
+
+ -- Christian Perrier <[email protected]>  Tue, 22 Mar 2016 19:27:45 +0100
+
 debootstrap (1.0.79) unstable; urgency=medium
 
   [ Samuel Thibault ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.79/debian/control 
new/debootstrap-1.0.90/debian/control
--- old/debootstrap-1.0.79/debian/control       2016-01-30 05:03:04.000000000 
+0100
+++ new/debootstrap-1.0.90/debian/control       2016-10-21 05:01:55.000000000 
+0200
@@ -3,8 +3,8 @@
 Priority: extra
 Maintainer: Debian Install System Team <[email protected]>
 Uploaders: Junichi Uekawa <[email protected]>, Colin Watson 
<[email protected]>, Christian Perrier <[email protected]>, Steve McIntyre 
<[email protected]>
-Build-Depends: debhelper (>= 9), makedev (>= 2.3.1-69) [linux-any]
-Standards-Version: 3.9.6
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.8
 Vcs-Browser: https://anonscm.debian.org/cgit/d-i/debootstrap.git
 Vcs-Git: https://anonscm.debian.org/git/d-i/debootstrap.git
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.79/debian/tests/control 
new/debootstrap-1.0.90/debian/tests/control
--- old/debootstrap-1.0.79/debian/tests/control 1970-01-01 01:00:00.000000000 
+0100
+++ new/debootstrap-1.0.90/debian/tests/control 2017-03-11 05:01:25.000000000 
+0100
@@ -0,0 +1,10 @@
+Tests: debian-testing
+Depends:
+ debootstrap,
+ libdistro-info-perl,
+ libdpkg-perl,
+ libipc-run-perl,
+ perl,
+ systemd [linux-any],
+ systemd-container [linux-any],
+Restrictions: allow-stderr, needs-root
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.79/debian/tests/debian-testing 
new/debootstrap-1.0.90/debian/tests/debian-testing
--- old/debootstrap-1.0.79/debian/tests/debian-testing  1970-01-01 
01:00:00.000000000 +0100
+++ new/debootstrap-1.0.90/debian/tests/debian-testing  2017-03-11 
05:01:25.000000000 +0100
@@ -0,0 +1,278 @@
+#!/usr/bin/perl
+# Verify that debootstrap'ing Debian testing produces a usable chroot,
+# and in particular that using it with early 2017 versions of schroot and
+# pbuilder results in working pseudo-terminals (#817236)
+#
+# Copyright © 2017 Simon McVittie
+# SPDX-License-Identifier: MIT
+# (see debian/copyright)
+
+use strict;
+use warnings;
+
+use Cwd qw(getcwd);
+use Debian::DistroInfo;
+use Dpkg::Version;
+use IPC::Run qw(run);
+use Test::More;
+
+my $srcdir = getcwd;
+
+sub verbose_run {
+    my $argv = shift;
+    diag("Running: @{$argv}");
+    return run($argv, @_);
+}
+
+sub capture {
+    my $output;
+    my $argv = shift;
+    ok(verbose_run($argv, '>', \$output), "@{$argv}");
+    chomp $output;
+    return $output;
+}
+
+sub check_fake_schroot {
+    my %params = @_;
+    my $reference = $params{reference};
+    my $version = $params{version} || '1.6.10-3';
+    my $extra_argv = $params{extra_argv} || [];
+
+    # Use unshare -m to make sure the /dev mount gets cleaned up on exit, even
+    # on failures
+    my $response = capture([qw(unshare -m),
+        "$srcdir/debian/tests/fake/schroot-$version", @{$extra_argv},
+            $params{chroot},
+        qw(runuser -u nobody --),
+        qw(script -q -c), 'cat /etc/debian_version', '/dev/null']);
+    $response =~ s/\r//g;
+    is($response, $reference, 'script(1) should work under (fake) schroot');
+}
+
+sub check_fake_pbuilder {
+    my %params = @_;
+    my $reference = $params{reference};
+    my $version = $params{version} || '0.228.4-1';
+
+    my $response = capture([qw(unshare -m),
+        "$srcdir/debian/tests/fake/pbuilder-$version", $params{chroot},
+        qw(runuser -u nobody --),
+        qw(script -q -c), 'cat /etc/debian_version', '/dev/null']);
+    $response =~ s/\r//g;
+    is($response, $reference,
+        'script(1) should work under (fake) pbuilder');
+}
+
+sub check_chroot {
+    my %params = @_;
+    my $chroot = $params{chroot};
+    my $response;
+
+    ok(-f "$chroot/etc/debian_version",
+        'chroot should have /etc/debian_version');
+    ok(-x "$chroot/usr/bin/env",
+        'chroot should have /usr/bin/env which is Essential');
+    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');
+
+    my $did_mknod_ptmx;
+
+    if (-l "$chroot/dev/ptmx") {
+        # Necessary if debootstrap is run inside some containers, see
+        # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817236#77
+        diag("/dev/ptmx is a symbolic link");
+        like(readlink("$chroot/dev/ptmx"), qr{(?:/dev/)?pts/ptmx},
+            'if /dev/ptmx is a symlink it should be to /dev/pts/ptmx');
+        $did_mknod_ptmx = 0;
+    }
+    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');
+        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');
+        $did_mknod_ptmx = 1;
+    }
+
+    if ($params{can_mknod_ptmx}) {
+        ok($did_mknod_ptmx, 'able to mknod ptmx so should have done so');
+    }
+
+    my $reference = capture(['cat', "$chroot/etc/debian_version"]);
+
+    is(capture([qw(chroot chroot.d runuser -u nobody --
+                cat /etc/debian_version)]),
+        $reference);
+
+    check_fake_schroot(%params, reference => $reference);
+    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
+    if (Dpkg::Version->new($params{kernel}) < Dpkg::Version->new('4.7') &&
+            defined $params{container} && $params{container} eq 'lxc') {
+        TODO: {
+            local $TODO = "schroot --sbuild doesn't work in lxc on older ".
+                "kernels";
+            check_fake_schroot(%params, reference => $reference,
+                extra_argv => ['--sbuild']);
+        }
+    }
+    elsif (! $params{can_mknod_ptmx}) {
+        TODO: {
+            local $TODO = "schroot --sbuild doesn't work when /dev/ptmx is ".
+                "a symlink to /dev/pts/ptmx";
+            check_fake_schroot(%params, reference => $reference,
+                extra_argv => ['--sbuild']);
+        }
+    }
+    else {
+        check_fake_schroot(%params, reference => $reference,
+            extra_argv => ['--sbuild']);
+    }
+
+    check_fake_pbuilder(%params, reference => $reference,
+        version => 'proposed');
+
+    # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817236
+    if (! $params{can_mknod_ptmx}) {
+        TODO: {
+            local $TODO = "schroot --sbuild doesn't work when /dev/ptmx is ".
+                "a symlink to /dev/pts/ptmx";
+            check_fake_pbuilder(%params, reference => $reference);
+        }
+    }
+    else {
+        check_fake_pbuilder(%params, reference => $reference);
+    }
+}
+
+my $mirror = 'http://deb.debian.org/debian';
+my $tmp = $ENV{AUTOPKGTEST_TMP} || $ENV{ADTTMP};
+die "no autopkgtest temporary directory specified" unless $tmp;
+chdir $tmp or die "chdir $tmp: $!";
+
+$ENV{LC_ALL} = 'C.UTF-8';
+
+# Try to inherit a Debian mirror from the host
+foreach my $file ('/etc/apt/sources.list',
+        glob('/etc/apt/sources.list.d/*.list')) {
+    open(my $fh, '<', $file);
+    while (<$fh>) {
+        if (m{^deb\s+(http://[-a-zA-Z0-9.:]+/debian)\s}) {
+            $mirror = $1;
+            last;
+        }
+    }
+    close $fh;
+}
+
+if (run(['ischroot'], '>&2')) {
+    diag("In a chroot according to ischroot(1)");
+}
+else {
+    diag("Not in a chroot according to ischroot(1)");
+}
+
+my $virtualization;
+if ($^O ne 'linux') {
+    diag("Cannot use systemd-detect-virt on non-Linux");
+}
+elsif (run(['systemd-detect-virt', '--vm'], '>', \$virtualization)) {
+    chomp $virtualization;
+    diag("Virtualization: $virtualization");
+}
+else {
+    $virtualization = undef;
+    diag("Virtualization: (not in a virtual machine)");
+}
+
+my $in_container = 0;
+my $container;
+if ($^O ne 'linux') {
+    diag("Cannot use systemd-detect-virt on non-Linux");
+}
+elsif (run(['systemd-detect-virt', '--container'], '>', \$container)) {
+    $in_container = 1;
+    chomp $container;
+    diag("Container: $container");
+}
+else {
+    $container = undef;
+    diag("Container: (not in a container)");
+}
+
+my $kernel = capture([qw(uname -r)]);
+chomp $kernel;
+
+open(my $fh, '<', '/proc/self/mountinfo');
+while (<$fh>) {
+    chomp;
+    diag("mountinfo: $_");
+}
+close $fh;
+
+my $can_mknod_ptmx;
+if (run([qw(mknod -m000 ptmx c 5 2)], '&>', '/dev/null')) {
+    diag("mknod ptmx succeeded");
+    $can_mknod_ptmx = 1;
+}
+else {
+    diag("mknod ptmx failed, are we in a container?");
+    $can_mknod_ptmx = 0;
+}
+
+my $distro_info = DebianDistroInfo->new;
+my $testing = $distro_info->testing;
+
+if (!verbose_run(['debootstrap',
+            '--include=debootstrap,debian-archive-keyring,gnupg,hello',
+            '--variant=minbase',
+            $testing, 'chroot.d', $mirror], '>&2')) {
+    BAIL_OUT("debootstrap failed: $?");
+}
+
+check_chroot(chroot => 'chroot.d', can_mknod_ptmx => $can_mknod_ptmx,
+    kernel => $kernel, container => $container);
+
+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 '.
+        'use systemd-nspawn');
+}
+elsif (! -d '/run/systemd/system') {
+    diag('systemd not booted, not trying to use systemd-nspawn');
+}
+else {
+    if (!verbose_run(['systemd-nspawn', '-D', 'chroot.d',
+            "--bind=$ENV{ADTTMP}:/mnt",
+            '--bind-ro=/usr/sbin/debootstrap',
+            '--bind-ro=/usr/share/debootstrap',
+            '--',
+            'debootstrap', '--include=hello', '--variant=minbase',
+            $testing, '/mnt/from-nspawn.d', $mirror], '>&2')) {
+        BAIL_OUT("debootstrap wrapped in systemd-nspawn failed: $?");
+    }
+
+    check_chroot(chroot => 'from-nspawn.d', can_mknod_ptmx => 0,
+        kernel => $kernel, container => "nspawn");
+}
+
+if (!run([qw(rm -fr --one-file-system chroot.d)], '>&2')) {
+    BAIL_OUT('Unable to remove chroot.d');
+}
+
+done_testing;
+
+# vim:set sw=4 sts=4 et:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/debootstrap-1.0.79/debian/tests/fake/pbuilder-0.228.4-1 
new/debootstrap-1.0.90/debian/tests/fake/pbuilder-0.228.4-1
--- old/debootstrap-1.0.79/debian/tests/fake/pbuilder-0.228.4-1 1970-01-01 
01:00:00.000000000 +0100
+++ new/debootstrap-1.0.90/debian/tests/fake/pbuilder-0.228.4-1 2017-03-11 
05:01:25.000000000 +0100
@@ -0,0 +1,31 @@
+#!/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.
+# (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
+# SPDX-License-Identifier: MIT
+# (see debian/copyright)
+
+set -e
+
+chroot="$1"
+shift
+if test -z "$chroot" || test -z "$1"; then
+       echo "Usage: $0 CHROOT COMMAND...">&2
+       exit 2
+fi
+
+mkdir -p "$chroot/dev/pts"
+mount -t devpts none "$chroot/dev/pts" -onoexec,nosuid,gid=5,mode=620
+
+ls -l "$chroot/dev/ptmx" | sed -e 's/^/# fake-pbuilder: /' >&2
+ls -l "$chroot/dev/pts/ptmx" | sed -e 's/^/# fake-pbuilder: /' >&2
+
+e=0
+chroot "$chroot" "$@" || e=$?
+
+umount "$chroot/dev/pts"
+exit "$e"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/debootstrap-1.0.79/debian/tests/fake/pbuilder-proposed 
new/debootstrap-1.0.90/debian/tests/fake/pbuilder-proposed
--- old/debootstrap-1.0.79/debian/tests/fake/pbuilder-proposed  1970-01-01 
01:00:00.000000000 +0100
+++ new/debootstrap-1.0.90/debian/tests/fake/pbuilder-proposed  2017-03-11 
05:01:25.000000000 +0100
@@ -0,0 +1,54 @@
+#!/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.79/debian/tests/fake/schroot-1.6.10-3 
new/debootstrap-1.0.90/debian/tests/fake/schroot-1.6.10-3
--- old/debootstrap-1.0.79/debian/tests/fake/schroot-1.6.10-3   1970-01-01 
01:00:00.000000000 +0100
+++ new/debootstrap-1.0.90/debian/tests/fake/schroot-1.6.10-3   2017-03-11 
05:01:25.000000000 +0100
@@ -0,0 +1,47 @@
+#!/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.
+# (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
+# SPDX-License-Identifier: MIT
+# (see debian/copyright)
+
+set -e
+
+# /etc/schroot/default/fstab
+bind_dev=yes
+
+while true; do
+       case "$1" in
+               (--sbuild)
+                       shift
+                       # /etc/schroot/sbuild/fstab
+                       bind_dev=no
+                       ;;
+               (*)
+                       break
+       esac
+done
+
+chroot="$1"
+shift
+if test -z "$chroot" || test -z "$1"; then
+       echo "Usage: $0 CHROOT COMMAND...">&2
+       exit 2
+fi
+
+[ "$bind_dev" = no ] || mount --bind /dev "$chroot/dev"
+mount --bind /dev/pts "$chroot/dev/pts"
+
+ls -l "$chroot/dev/ptmx" | sed -e 's/^/# fake-schroot: /' >&2
+ls -l "$chroot/dev/pts/ptmx" | sed -e 's/^/# fake-schroot: /' >&2
+
+e=0
+chroot "$chroot" "$@" || e=$?
+
+umount "$chroot/dev/pts"
+[ "$bind_dev" = no ] || umount "$chroot/dev"
+
+exit "$e"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/debootstrap-1.0.79/debian/tests/fake/schroot-proposed 
new/debootstrap-1.0.90/debian/tests/fake/schroot-proposed
--- old/debootstrap-1.0.79/debian/tests/fake/schroot-proposed   1970-01-01 
01:00:00.000000000 +0100
+++ new/debootstrap-1.0.90/debian/tests/fake/schroot-proposed   2017-03-11 
05:01:25.000000000 +0100
@@ -0,0 +1,68 @@
+#!/bin/sh
+# fake/schroot-proposed -- emulate proposed mount behaviour for schroot
+#
+# Copyright © 2017 Simon McVittie
+# SPDX-License-Identifier: MIT
+# (see debian/copyright)
+
+set -e
+
+# /etc/schroot/default/fstab
+bind_dev=yes
+
+while true; do
+       case "$1" in
+               (--sbuild)
+                       shift
+                       # /etc/schroot/sbuild/fstab
+                       bind_dev=no
+                       ;;
+               (*)
+                       break
+       esac
+done
+
+CHROOT_PATH="$1"
+shift
+if test -z "$CHROOT_PATH" || test -z "$1"; then
+       echo "Usage: $0 CHROOT COMMAND...">&2
+       exit 2
+fi
+
+[ "$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
+
+mounted_ptmx=no
+
+if [ -e "$CHROOT_PATH/dev/pts/ptmx" ] && \
+        ! [ -L "$CHROOT_PATH/dev/ptmx" ]; then
+    mount --bind "$CHROOT_PATH/dev/pts/ptmx" "$CHROOT_PATH/dev/ptmx"
+    mounted_ptmx=yes
+fi
+
+mounted_console=no
+
+if stdin_tty="$(tty)"; then
+    if [ ! -e "$CHROOT_PATH/dev/console" ]; then
+        mknod -m700 "$CHROOT_PATH/dev/console" c 5 1
+    fi
+
+    mount --bind "$stdin_tty" "$CHROOT_PATH/dev/console"
+    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
+
+e=0
+chroot "$CHROOT_PATH" "$@" || e=$?
+
+[ "$mounted_console" = no ] || umount "$CHROOT_PATH/dev/console"
+[ "$mounted_ptmx" = no ] || umount "$CHROOT_PATH/dev/ptmx"
+umount "$CHROOT_PATH/dev/pts"
+[ "$bind_dev" = no ] || umount "$CHROOT_PATH/dev"
+
+exit "$e"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.79/debootstrap 
new/debootstrap-1.0.90/debootstrap
--- old/debootstrap-1.0.79/debootstrap  2015-11-09 05:01:25.000000000 +0100
+++ new/debootstrap-1.0.90/debootstrap  2016-11-14 05:01:52.000000000 +0100
@@ -18,8 +18,6 @@
        fi
 fi
 
-DEVICES_TARGZ=$DEBOOTSTRAP_DIR/devices.tar.gz
-
 . $DEBOOTSTRAP_DIR/functions
 exec 4>&1
 
@@ -29,6 +27,7 @@
 DISABLE_KEYRING=""
 FORCE_KEYRING=""
 VARIANT=""
+MERGED_USR="no"
 ARCH=""
 HOST_ARCH=""
 HOST_OS=""
@@ -47,8 +46,8 @@
 CHECKCERTIF=""
 PRIVATEKEY=""
 
-DEF_MIRROR="http://httpredir.debian.org/debian";
-DEF_HTTPS_MIRROR="https://mirrors.kernel.org/debian";
+DEF_MIRROR="http://deb.debian.org/debian";
+DEF_HTTPS_MIRROR="https://deb.debian.org/debian";
 
 export LANG USE_COMPONENTS
 umask 022
@@ -101,7 +100,8 @@
                              archive
       --variant=X            use variant X of the bootstrap scripts
                              (currently supported variants: buildd, fakechroot,
-                              scratchbox, minbase)
+                              minbase)
+      --merged-usr           make /{bin,sbin,lib}/ symlinks to /usr/
       --keyring=K            check Release files against keyring K
       --no-check-gpg         avoid checking Release file signatures
       --force-check-gpg      force checking Release file signatures
@@ -304,6 +304,14 @@
                        error 1 NEEDARG "option requires an argument %s" "$1"
                fi
                ;;
+            --merged-usr)
+               MERGED_USR=yes
+               shift
+               ;;
+           --no-merged-usr)
+               MERGED_USR=no
+               shift
+               ;;
            --keyring|--keyring=?*)
                if ! gpgv --version >/dev/null 2>&1; then
                        error 1 NEEDGPGV "gpgv not installed, but required for 
Release verification"
@@ -352,7 +360,7 @@
                CHECKCERTIF="--no-check-certificate"
                shift
                ;;
-           --*)
+           -*)
                error 1 BADARG "unrecognized or invalid option %s" "$1"
                ;;
            *)
@@ -456,16 +464,6 @@
 
 if [ "$TARGET" = "/" ]; then
        CHROOT_CMD=""
-elif doing_variant scratchbox; then
-       for config in ~/.scratchbox2/*/sb2.config;
-       do
-               export `grep ^SBOX_TARGET_ROOT= $config`
-               if [ "x$SBOX_TARGET_ROOT" = "x$TARGET" ]; then
-                       SB2_TARGET=$(basename $(dirname $config))
-               fi
-       done
-       [ "x$SB2_TARGET" != "x" ] || error 1 SBOXTARGETREQ "No scratchbox 
target configured for $TARGET"
-       CHROOT_CMD="sb2 -eR -t $SB2_TARGET"
 else
        CHROOT_CMD="chroot $TARGET"
 fi
@@ -635,7 +633,6 @@
        if ! am_doing_phase second_stage; then
                cp "$0"                          
"$TARGET/debootstrap/debootstrap"
                cp $DEBOOTSTRAP_DIR/functions    "$TARGET/debootstrap/functions"
-               cp $DEBOOTSTRAP_DIR/devices.tar.gz       
"$TARGET/debootstrap/devices.tar.gz"
                cp $SCRIPT                       
"$TARGET/debootstrap/suite-script"
                echo "$ARCH"                    >"$TARGET/debootstrap/arch"
                echo "$SUITE"                   >"$TARGET/debootstrap/suite"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.79/debootstrap.8 
new/debootstrap-1.0.90/debootstrap.8
--- old/debootstrap-1.0.79/debootstrap.8        2015-05-15 05:01:24.000000000 
+0200
+++ new/debootstrap-1.0.90/debootstrap.8        2016-11-14 05:01:52.000000000 
+0100
@@ -26,7 +26,7 @@
 .PP
 The
 .I SUITE
-may be a release code name (eg, sid, jessie, wheezy)
+may be a release code name (eg, sid, stretch, jessie)
 or a symbolic name (eg, unstable, testing, stable, oldstable)
 .PP
 Notice that file:/ URLs are translated to file:/// (correct scheme as
@@ -71,19 +71,24 @@
 rely on this option.
 With this option set, this behaviour is disabled.
 .IP
-.IP "\fB\-\-variant=minbase|buildd|fakechroot|scratchbox\fP"
+.IP "\fB\-\-variant=minbase|buildd|fakechroot\fP"
 Name of the bootstrap script variant to use.
 Currently, the variants supported are minbase, which only includes
 essential packages and apt; buildd, which installs the build-essential
 packages into
 .IR TARGET ;
 and fakechroot, which installs the packages without root privileges.
-Finally there is variant scratchbox, which is for creating targets
-for scratchbox usage.
 The default, with no \fB\-\-variant=X\fP argument, is to create a base
 Debian installation in
 .IR TARGET .
 .IP
+.IP "\fB\-\-merged-usr\fP"
+Create /{bin,sbin,lib}/ symlinks pointing to their counterparts in /usr/.
+.IP
+.IP "\fB\-\-no-merged-usr\fP"
+Do not create /{bin,sbin,lib}/ symlinks pointing to their counterparts in 
/usr/.
+(Default.)
+.IP
 .IP "\fB\-\-keyring=KEYRING\fP"
 Override the default keyring for the distribution being bootstrapped,
 and use
@@ -160,16 +165,16 @@
 .SH EXAMPLES
 .
 .PP 
-To setup a \fIwheezy\fR system:
+To setup a \fIstretch\fR system:
 .PP 
-     debootstrap wheezy ./wheezy-chroot http://httpredir.debian.org/debian
+     debootstrap stretch ./stretch-chroot http://deb.debian.org/debian
 .PP
-     debootstrap wheezy ./wheezy-chroot file:///LOCAL_MIRROR/debian
+     debootstrap stretch ./stretch-chroot file:///LOCAL_MIRROR/debian
 .PP
 Full process to create a complete Debian installation of \fIsid\fR (unstable)
 in a chroot:
 .PP
-     main # debootstrap sid sid-root http://httpredir.debian.org/debian/
+     main # debootstrap sid sid-root http://deb.debian.org/debian/
      [ ... watch it download the whole system ]
      main # echo "proc sid-root/proc proc defaults 0 0" >> /etc/fstab
      main # mount proc sid-root/proc -t proc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.79/functions 
new/debootstrap-1.0.90/functions
--- old/debootstrap-1.0.79/functions    2016-02-18 05:01:23.000000000 +0100
+++ new/debootstrap-1.0.90/functions    2017-03-11 05:01:25.000000000 +0100
@@ -331,6 +331,7 @@
                local iters=0
 
                case "$typ" in
+                   xz)  from="$1.xz"; dest="$2.xz" ;;
                    bz2) from="$1.bz2"; dest="$2.bz2" ;;
                    gz)  from="$1.gz"; dest="$2.gz" ;;
                    *)   from="$1"; dest="$2" ;;
@@ -358,6 +359,7 @@
                                case "$typ" in
                                    gz)  gunzip "$dest" ;;
                                    bz2) bunzip2 "$dest" ;;
+                                   xz)  unxz "$dest" ;;
                                esac
                                return 0
                        else
@@ -512,18 +514,86 @@
        fi
 }
 
-download_release_sig () {
-       local m1="$1"
+CODENAME=""
+validate_suite () {
+       local reldest="$1"
+
+       CODENAME=$(sed -n "s/^Codename: *//p" "$reldest")
+       local suite=$(sed -n "s/^Suite: *//p" "$reldest")
+
+       if [ "$SUITE" != "$suite" ] && [ "$SUITE" != "$CODENAME" ]; then
+               error 1 WRONGSUITE "Asked to install suite %s, but got %s 
(codename: %s) from mirror" "$SUITE" "$suite" "$CODENAME"
+       fi
+}
+
+split_inline_sig () {
+       local inreldest="$1"
        local reldest="$2"
        local relsigdest="$3"
 
+       # Note: InRelease files are fun since one needs to remove the
+       # last newline from the PGP SIGNED MESSAGE part, while keeping
+       # the PGP SIGNATURE part intact. This shell implementation
+       # should work on most if not all systems, instead of trying to
+       # sed/tr/head, etc.
+       rm -f "$reldest" "$relsigdest"
+       nl=""
+       state=pre-begin
+       while IFS= read -r line; do
+               case "${state}" in
+                   pre-begin)
+                       if [ "x${line}" = "x-----BEGIN PGP SIGNED MESSAGE-----" 
]; then
+                               state=begin
+                       fi
+                       ;;
+                   begin)
+                       if [ "x${line}" = "x" ]; then
+                               state=data
+                       fi
+                       ;;
+                   data)
+                       if [ "x${line}" = "x-----BEGIN PGP SIGNATURE-----" ]; 
then
+                               printf "%s\n" "${line}" > "$relsigdest"
+                               state=signature
+                       else
+                               printf "${nl}%s" "${line}" >> "$reldest"
+                               nl="\n"
+                       fi
+                       ;;
+                   signature)
+                       printf "%s\n" "${line}" >> "$relsigdest"
+                       if [ "x${line}" = "x-----END PGP SIGNATURE-----" ]; then
+                               break
+                       fi
+               esac
+       done < "$inreldest"
+}
+
+download_release_sig () {
+       local m1="$1"
+       local inreldest="$2"
+       local reldest="$3"
+       local relsigdest="$4"
+
+       progress 0 100 DOWNREL "Downloading Release file"
+       progress_next 100
+       if get "$m1/dists/$SUITE/InRelease" "$inreldest" nocache; then
+               split_inline_sig "$inreldest" "$reldest" "$relsigdest"
+               progress 100 100 DOWNREL "Downloading Release file"
+       else
+               get "$m1/dists/$SUITE/Release" "$reldest" nocache ||
+                       error 1 NOGETREL "Failed getting release file %s" 
"$m1/dists/$SUITE/Release"
+               progress 100 100 DOWNREL "Downloading Release file"
+       fi
        if [ -n "$KEYRING" ] && [ -z "$DISABLE_KEYRING" ]; then
                progress 0 100 DOWNRELSIG "Downloading Release file signature"
-               progress_next 50
-               get "$m1/dists/$SUITE/Release.gpg" "$relsigdest" nocache ||
-                       error 1 NOGETRELSIG "Failed getting release signature 
file %s" \
-                       "$m1/dists/$SUITE/Release.gpg"
-               progress 50 100 DOWNRELSIG "Downloading Release file signature"
+               if ! [ -f "$relsigdest" ]; then
+                       progress_next 50
+                       get "$m1/dists/$SUITE/Release.gpg" "$relsigdest" 
nocache ||
+                               error 1 NOGETRELSIG "Failed getting release 
signature file %s" \
+                               "$m1/dists/$SUITE/Release.gpg"
+                       progress 50 100 DOWNRELSIG "Downloading Release file 
signature"
+               fi
 
                info RELEASESIG "Checking Release signature"
                # Don't worry about the exit status from gpgv; parsing the 
output will
@@ -536,22 +606,20 @@
 
 download_release_indices () {
        local m1="${MIRRORS%% *}"
+       local inreldest="$TARGET/$($DLDEST rel "$SUITE" "$m1" 
"dists/$SUITE/InRelease")"
        local reldest="$TARGET/$($DLDEST rel "$SUITE" "$m1" 
"dists/$SUITE/Release")"
-       local relsigdest
-       progress 0 100 DOWNREL "Downloading Release file"
-       progress_next 100
-       get "$m1/dists/$SUITE/Release" "$reldest" nocache ||
-               error 1 NOGETREL "Failed getting release file %s" 
"$m1/dists/$SUITE/Release"
-       relsigdest="$TARGET/$($DLDEST rel "$SUITE" "$m1" 
"dists/$SUITE/Release.gpg")"
-       progress 100 100 DOWNREL "Downloading Release file"
+       local relsigdest="$TARGET/$($DLDEST rel "$SUITE" "$m1" 
"dists/$SUITE/Release.gpg")"
 
-       download_release_sig "$m1" "$reldest" "$relsigdest"
+       download_release_sig "$m1" "$inreldest" "$reldest" "$relsigdest"
+
+       validate_suite "$reldest"
 
        extract_release_components $reldest
 
        local totalpkgs=0
        for c in $COMPONENTS; do
                local subpath="$c/binary-$ARCH/Packages"
+               local xzi="`get_release_checksum "$reldest" "$subpath.xz"`"
                local bz2i="`get_release_checksum "$reldest" "$subpath.bz2"`"
                local gzi="`get_release_checksum "$reldest" "$subpath.gz"`"
                local normi="`get_release_checksum "$reldest" "$subpath"`"
@@ -560,6 +628,8 @@
                        i="$normi"
                elif in_path bunzip2 && [ "$bz2i" != "" ]; then
                        i="$bz2i"
+               elif in_path unxz && [ "$xzi" != "" ]; then
+                       i="$xzi"
                elif in_path gunzip && [ "$gzi" != "" ]; then
                        i="$gzi"
                fi
@@ -577,6 +647,7 @@
        for c in $COMPONENTS; do
                local subpath="$c/binary-$ARCH/Packages"
                local path="dists/$SUITE/$subpath"
+               local xzi="`get_release_checksum "$reldest" "$subpath.xz"`"
                local bz2i="`get_release_checksum "$reldest" "$subpath.bz2"`"
                local gzi="`get_release_checksum "$reldest" "$subpath.gz"`"
                local normi="`get_release_checksum "$reldest" "$subpath"`"
@@ -586,6 +657,10 @@
                        ext="$ext $normi ."
                        i="$normi"
                fi
+               if in_path unxz && [ "$xzi" != "" ]; then
+                       ext="$ext $xzi xz"
+                       i="${i:-$xzi}"
+               fi
                if in_path bunzip2 && [ "$bz2i" != "" ]; then
                        ext="$ext $bz2i bz2"
                        i="${i:-$bz2i}"
@@ -795,6 +870,7 @@
 ################################################################ extraction
 
 EXTRACTORS_SUPPORTED="dpkg-deb ar"
+EXTRACT_DEB_TAR_OPTIONS=
 
 # Native dpkg-deb based extractors
 extract_dpkg_deb_field () {
@@ -807,7 +883,7 @@
 extract_dpkg_deb_data () {
        local pkg="$1"
 
-       dpkg-deb --fsys-tarfile "$pkg" | tar -xf -
+       dpkg-deb --fsys-tarfile "$pkg" | tar $EXTRACT_DEB_TAR_OPTIONS -xf -
 }
 
 # Raw .deb extractors
@@ -845,7 +921,7 @@
        esac
 
        if type $cat_cmd >/dev/null 2>&1; then
-               ar -p "$pkg" "$tarball" | $cat_cmd | tar -xf -
+               ar -p "$pkg" "$tarball" | $cat_cmd | tar 
$EXTRACT_DEB_TAR_OPTIONS -xf -
        else
                error 1 UNPACKCMDUNVL "Extracting %s requires the %s command, 
which is not available" "$pkg" "$cat_cmd"
        fi
@@ -958,11 +1034,9 @@
 
 setup_apt_sources () {
        mkdir -p "$TARGET/etc/apt"
-       # Cope with the foreign case where COMPONENTS would be empty:
-       sources_components="${COMPONENTS:-$USE_COMPONENTS}"
        for m in "$@"; do
                local cs=""
-               for c in $sources_components; do
+               for c in ${COMPONENTS:-$USE_COMPONENTS}; do
                        local path="dists/$SUITE/$c/binary-$ARCH/Packages"
                        local pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" 
"$ARCH" "$m" "$path")"
                        if [ -e "$pkgdest" ]; then cs="$cs $c"; fi
@@ -1065,13 +1139,7 @@
            hurd*)
                ;;
            *)
-               if true; then
-                       setup_devices_simple
-               elif [ -e "$DEVICES_TARGZ" ]; then
-                       zcat "$DEVICES_TARGZ" | (cd "$TARGET"; tar -xf -)
-               else
-                       error 1 NODEVTGZ "no %s. cannot create devices" 
"$DEVICES_TARGZ"
-               fi
+               setup_devices_simple
                ;;
        esac
 }
@@ -1103,7 +1171,12 @@
        mknod -m 666 $TARGET/dev/urandom        c 1 9
        mknod -m 666 $TARGET/dev/tty    c 5 0
        mkdir $TARGET/dev/pts/ $TARGET/dev/shm/
-       ln -s pts/ptmx $TARGET/dev/ptmx
+       # Inside a container, we might not be allowed to create /dev/ptmx.
+       # If not, do the next best thing.
+       if ! mknod -m 666 $TARGET/dev/ptmx c 5 2; then
+               warning MKNOD "Could not create /dev/ptmx, falling back to 
symlink. This chroot will require /dev/pts mounted with ptmxmode=666"
+               ln -s pts/ptmx $TARGET/dev/ptmx
+       fi
        ln -s /proc/self/fd   $TARGET/dev/fd
        ln -s /proc/self/fd/0 $TARGET/dev/stdin
        ln -s /proc/self/fd/1 $TARGET/dev/stdout
@@ -1128,6 +1201,43 @@
        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.
+setup_merged_usr() {
+       if [ "$MERGED_USR" = "no" ]; then return 0; fi
+
+       local link_dir
+       case $ARCH in
+           hurd-*)     return 0 ;;
+           amd64)      link_dir="lib32 lib64 libx32" ;;
+           i386)       link_dir="lib64 libx32" ;;
+           mips|mipsel)
+                       link_dir="lib32 lib64" ;;
+           mips64*|mipsn32*)
+                       link_dir="lib32 lib64 libo32" ;;
+           powerpc)    link_dir="lib64" ;;
+           ppc64)      link_dir="lib32 lib64" ;;
+           ppc64el)    link_dir="lib64" ;;
+           s390x)      link_dir="lib32" ;;
+           sparc)      link_dir="lib64" ;;
+           sparc64)    link_dir="lib32 lib64" ;;
+           x32)        link_dir="lib32 lib64 libx32" ;;
+       esac
+       link_dir="bin sbin lib $link_dir"
+
+       local dir
+       for dir in $link_dir; do
+               ln -s usr/$dir $TARGET/$dir
+               mkdir -p $TARGET/usr/$dir
+       done
+}
+
 ################################################################ pkgdetails
 
 # NOTE
@@ -1229,6 +1339,7 @@
                for $d (split /\s*,\s*/, $1) {
                        $d =~ s/\s*[|].*$//;
                        $d =~ s/\s*[(].*[)]\s*//;
+                       $d =~ s/:.*//;
                        push @d, $d;
                }
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.79/scripts/aequorea 
new/debootstrap-1.0.90/scripts/aequorea
--- old/debootstrap-1.0.79/scripts/aequorea     2016-02-18 05:01:23.000000000 
+0100
+++ new/debootstrap-1.0.90/scripts/aequorea     2016-11-14 05:01:52.000000000 
+0100
@@ -1,7 +1,7 @@
 mirror_style release
 download_style apt
 finddebs_style from-indices
-variants - buildd fakechroot minbase scratchbox
+variants - buildd fakechroot minbase
 keyring /usr/share/keyrings/tanglu-archive-keyring.gpg
 default_mirror http://archive.tanglu.org/tanglu
 
@@ -26,7 +26,7 @@
 
                # we want the Tanglu minimal dependency set to be installed
                base="$base tanglu-minimal"
-       elif doing_variant buildd || doing_variant scratchbox; then
+       elif doing_variant buildd; then
                base="apt build-essential"
        elif doing_variant minbase; then
                base="apt"
@@ -91,8 +91,6 @@
 
        if doing_variant fakechroot; then
                setup_proc_fakechroot
-       elif doing_variant scratchbox; then
-               true
        else
                setup_proc
                in_target /sbin/ldconfig
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.79/scripts/artful 
new/debootstrap-1.0.90/scripts/artful
--- old/debootstrap-1.0.79/scripts/artful       1970-01-01 01:00:00.000000000 
+0100
+++ new/debootstrap-1.0.90/scripts/artful       2017-06-30 18:43:36.419624930 
+0200
@@ -0,0 +1 @@
+symbolic link to gutsy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.79/scripts/bullseye 
new/debootstrap-1.0.90/scripts/bullseye
--- old/debootstrap-1.0.79/scripts/bullseye     1970-01-01 01:00:00.000000000 
+0100
+++ new/debootstrap-1.0.90/scripts/bullseye     2017-06-30 18:43:36.395628306 
+0200
@@ -0,0 +1 @@
+symbolic link to sid
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.79/scripts/buster 
new/debootstrap-1.0.90/scripts/buster
--- old/debootstrap-1.0.79/scripts/buster       1970-01-01 01:00:00.000000000 
+0100
+++ new/debootstrap-1.0.90/scripts/buster       2017-06-30 18:43:36.515611430 
+0200
@@ -0,0 +1 @@
+symbolic link to sid
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.79/scripts/gutsy 
new/debootstrap-1.0.90/scripts/gutsy
--- old/debootstrap-1.0.79/scripts/gutsy        2016-02-18 05:01:23.000000000 
+0100
+++ new/debootstrap-1.0.90/scripts/gutsy        2016-03-21 05:01:24.000000000 
+0100
@@ -28,6 +28,8 @@
 
 case $ARCH in
        alpha|ia64) LIBC="libc6.1" ;;
+       kfreebsd-*) LIBC="libc0.1" ;;
+       hurd-*)     LIBC="libc0.3" ;;
        *)          LIBC="libc6" ;;
 esac
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.79/scripts/oldoldstable 
new/debootstrap-1.0.90/scripts/oldoldstable
--- old/debootstrap-1.0.79/scripts/oldoldstable 1970-01-01 01:00:00.000000000 
+0100
+++ new/debootstrap-1.0.90/scripts/oldoldstable 2017-06-30 18:43:36.363632807 
+0200
@@ -0,0 +1 @@
+symbolic link to sid
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.79/scripts/sid 
new/debootstrap-1.0.90/scripts/sid
--- old/debootstrap-1.0.79/scripts/sid  2016-02-18 05:01:23.000000000 +0100
+++ new/debootstrap-1.0.90/scripts/sid  2016-11-14 05:01:52.000000000 +0100
@@ -1,7 +1,7 @@
 mirror_style release
 download_style apt
 finddebs_style from-indices
-variants - buildd fakechroot minbase scratchbox
+variants - buildd fakechroot minbase
 keyring /usr/share/keyrings/debian-archive-keyring.gpg
 
 if doing_variant fakechroot; then
@@ -22,7 +22,7 @@
                #required="$required $(get_debs Priority: important)"
                #  ^^ should be getting debconf here somehow maybe
                base="$(get_debs Priority: important)"
-       elif doing_variant buildd || doing_variant scratchbox; then
+       elif doing_variant buildd; then
                base="apt build-essential"
        elif doing_variant minbase; then
                base="apt"
@@ -41,6 +41,14 @@
 }
 
 first_stage_install () {
+       case "$CODENAME" in
+               etch|etch-m68k|jessie|jessie-kfreebsd|lenny|squeeze|wheezy) ;;
+               *)
+                       EXTRACT_DEB_TAR_OPTIONS="$EXTRACT_DEB_TAR_OPTIONS -k"
+                       setup_merged_usr
+                       ;;
+       esac
+
        extract $required
 
        mkdir -p "$TARGET/var/lib/dpkg"
@@ -54,11 +62,15 @@
        fi
 
        setup_devices
+}
+
+second_stage_install () {
+       setup_dynamic_devices
 
        x_feign_install () {
                local pkg="$1"
                local deb="$(debfor $pkg)"
-               local ver="$(extract_deb_field "$TARGET/$deb" Version)"
+               local ver="$(in_target dpkg-deb -f "$deb" Version)"
 
                mkdir -p "$TARGET/var/lib/dpkg/info"
 
@@ -72,10 +84,6 @@
        }
 
        x_feign_install dpkg
-}
-
-second_stage_install () {
-       setup_dynamic_devices
 
        x_core_install () {
                smallyes '' | in_target dpkg --force-depends --install $(debfor 
"$@")
@@ -87,8 +95,6 @@
 
        if doing_variant fakechroot; then
                setup_proc_fakechroot
-       elif doing_variant scratchbox; then
-               true
        else
                setup_proc
                in_target /sbin/ldconfig
@@ -186,17 +192,19 @@
                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 || echo EXITCODE $?) |
-               dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base 
system" UNPACKING
-
-       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 || echo EXITCODE $?) |
-               dpkg_progress $baseprog $bases CONFBASE "Configuring base 
system" CONFIGURING
+       if [ -n "$base" ]; then
+               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 || echo EXITCODE $?) |
+                       dpkg_progress $baseprog $bases UNPACKBASE "Unpacking 
base system" UNPACKING
+
+               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 || echo EXITCODE $?) |
+                       dpkg_progress $baseprog $bases CONFBASE "Configuring 
base system" CONFIGURING
+       fi
 
        mv "$TARGET/sbin/start-stop-daemon.REAL" 
"$TARGET/sbin/start-stop-daemon"
        rm -f "$TARGET/usr/sbin/policy-rc.d"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.79/scripts/yakkety 
new/debootstrap-1.0.90/scripts/yakkety
--- old/debootstrap-1.0.79/scripts/yakkety      1970-01-01 01:00:00.000000000 
+0100
+++ new/debootstrap-1.0.90/scripts/yakkety      2017-06-30 18:43:36.359633370 
+0200
@@ -0,0 +1 @@
+symbolic link to gutsy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debootstrap-1.0.79/scripts/zesty 
new/debootstrap-1.0.90/scripts/zesty
--- old/debootstrap-1.0.79/scripts/zesty        1970-01-01 01:00:00.000000000 
+0100
+++ new/debootstrap-1.0.90/scripts/zesty        2017-06-30 18:43:36.371631681 
+0200
@@ -0,0 +1 @@
+symbolic link to gutsy


Reply via email to