Hello community, here is the log from the commit of package debootstrap for openSUSE:Leap:15.2 checked in at 2020-05-07 19:28:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/debootstrap (Old) and /work/SRC/openSUSE:Leap:15.2/.debootstrap.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "debootstrap" Thu May 7 19:28:15 2020 rev:15 rq:800823 version:1.0.123 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/debootstrap/debootstrap.changes 2020-05-06 20:40:06.912610971 +0200 +++ /work/SRC/openSUSE:Leap:15.2/.debootstrap.new.2738/debootstrap.changes 2020-05-07 19:33:50.338270207 +0200 @@ -1,0 +2,6 @@ +Sun May 3 19:48:24 UTC 2020 - Alexei Sorokin <sor.ale...@meowr.ru> + +- Update version to 1.0.123: + * See /usr/share/doc/packages/debootstrap/changelog + +------------------------------------------------------------------- Old: ---- debootstrap-1.0.115.tar.bz2 New: ---- debootstrap-1.0.123.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ debootstrap.spec ++++++ --- /var/tmp/diff_new_pack.qpJgwv/_old 2020-05-07 19:33:50.690270912 +0200 +++ /var/tmp/diff_new_pack.qpJgwv/_new 2020-05-07 19:33:50.690270912 +0200 @@ -1,7 +1,7 @@ # # spec file for package debootstrap # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2012 Frank Lichtenheld <fr...@lichtenheld.de> # # All modifications and additions to the file contributed by third parties @@ -18,11 +18,10 @@ Name: debootstrap -Version: 1.0.115 +Version: 1.0.123 Release: 0 Summary: Bootstrap a basic Debian system License: MIT -Group: Development/Tools/Other URL: https://salsa.debian.org/installer-team/debootstrap Source: https://salsa.debian.org/installer-team/debootstrap/-/archive/%{version}/%{name}-%{version}.tar.bz2 Patch0: %{name}-norootforbuild.patch @@ -38,8 +37,7 @@ into. %prep -%setup -q -%patch0 -p1 +%autosetup -p1 %build # Nothing to build. ++++++ debootstrap-1.0.115.tar.bz2 -> debootstrap-1.0.123.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debootstrap-1.0.115/debian/.gitlab-ci.yml new/debootstrap-1.0.123/debian/.gitlab-ci.yml --- old/debootstrap-1.0.115/debian/.gitlab-ci.yml 2019-07-06 13:22:33.000000000 +0200 +++ new/debootstrap-1.0.123/debian/.gitlab-ci.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,29 +0,0 @@ -image: debian:sid - -variables: - PKG: debootstrap - -stages: - - build -# - autopkgtest - -package_build: - stage: build - script: - - apt update -qq - - apt build-dep ./ -y -qq - - apt install -y -qq dpkg-dev devscripts - - dpkg-buildpackage -us -uc - - mkdir build && cd ../ && ls -al && dcmd ./${PKG}_*.changes mv ${PKG}/build/ - artifacts: - paths: - - build/* - -#autopkgtest: -# stage: autopkgtest -# script: -# - apt update -qq -# - apt install -y -qq autopkgtest -# - autopkgtest build/*.changes -- null -# dependencies: -# - package_build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debootstrap-1.0.115/debian/changelog new/debootstrap-1.0.123/debian/changelog --- old/debootstrap-1.0.115/debian/changelog 2019-07-06 13:22:33.000000000 +0200 +++ new/debootstrap-1.0.123/debian/changelog 2020-03-14 02:07:25.000000000 +0100 @@ -1,3 +1,93 @@ +debootstrap (1.0.123) unstable; urgency=medium + + * Reinstate safeguard removed in 1.0.121, which is absolutely needed + to avoid unmounting target entirely, as seen when running in d-i + with default parameters (Closes: #953849). Vielen Dank, Johannes! + + -- Cyril Brulebois <k...@debian.org> Sat, 14 Mar 2020 02:07:20 +0100 + +debootstrap (1.0.122) unstable; urgency=medium + + * Revert the addition of (mandatory) security support as debootstrap's + goal is to provide with a basic Debian system that many provisioning + systems are built upon. Changing behaviour now seems to be doing a + disservice to all those tools that would need adapting. In addition to + not seeming to be a good idea, that triggers regressions for a number + of use cases (Closes: #953759, #953588, #953593, #953594, #953617). + + -- Cyril Brulebois <k...@debian.org> Fri, 13 Mar 2020 05:43:24 +0100 + +debootstrap (1.0.121) unstable; urgency=medium + + * Fix "debootstrapping testing and stable results in exit 100", + use CODENAME for check properly (Closes: #953404) + + -- Hideki Yamane <henr...@debian.org> Tue, 10 Mar 2020 21:42:03 +0900 + +debootstrap (1.0.120) unstable; urgency=medium + + * Check codename for apt-transport-https (Closes: #920255, #879755) + * Add security mirror setting (Closes: #939852, #543819) + + -- Hideki Yamane <henr...@debian.org> Sun, 08 Mar 2020 02:01:59 +0900 + +debootstrap (1.0.119) unstable; urgency=medium + + [ Hideki Yamane ] + * Fix: specify --foreign and --unpack-tarball at the same time + Thanks to Cel Skeggs <c...@mit.edu> for the patch (Closes: #946783) + * Add check rule for systemd-nspawn + + [ Jeremiah C. Foster ] + * Adding PureOS 'amber' to scripts dir (Closes: #946476) + + -- Hideki Yamane <henr...@debian.org> Thu, 27 Feb 2020 21:16:24 +0900 + +debootstrap (1.0.118) unstable; urgency=medium + + * rename .gitlab-ci.yml to salsa-ci.yml + * debian/control + - use debhelper-compat (= 12) and drop debian/compat + - set Standards-Version 4.5.0 + * debian/tests/debian-testing + - use AUTOPKGTEST_TMP instead of obsolete ADTTMP + * fix /dev/ptmx mount on chroot and re-enable autopkgtest + * fix: don't pass an empty arg to wget when --verbose is applied + (Closes: #951367) + + -- Hideki Yamane <henr...@debian.org> Fri, 21 Feb 2020 21:16:39 +0900 + +debootstrap (1.0.117) unstable; urgency=medium + + [ Simon Quigley ] + * Add (Ubuntu) focal as a symlink to gutsy. (Closes: #944976, #946815) + + [ Holger Wansing ] + * Remove trailing whitespaces from changelog file, to fix lintian tag. + + [ James Clarke ] + * Add a new --extra-suites option to support debootstrapping Debian Ports + architectures with essential/required packages in its unreleased suite. + + [ Hideki Yamane ] + * Fix "Fails when run from path containing space character" (Closes: #947173) + * Remove some quote for variables since somehow wget fails with "" + (double quote with no value) + + -- Hideki Yamane <henr...@debian.org> Tue, 11 Feb 2020 21:15:26 +0900 + +debootstrap (1.0.116) unstable; urgency=medium + + [ Hideki Yamane ] + * use salsa-pipeline for CI, instead of custom rule + * disable unnecessary blhc and test-build-any CI test + + [ Philip Hands ] + * disable the failing autopkgtest job + * provide support for Devuan release names + + -- Hideki Yamane <henr...@debian.org> Sun, 29 Sep 2019 10:56:48 +0900 + debootstrap (1.0.115) unstable; urgency=medium [ Cyril Brulebois ] @@ -99,12 +189,12 @@ * Strip URL scheme from apt lists (Closes: #903481) [ Hideki Yamane ] - * Fix docker detection breaks QEMU's binfmt_misc bootstraping + * Fix docker detection breaks QEMU's binfmt_misc bootstraping (Closes: #903657) - Avoid removing host's /proc on some environment - Add workaround for second-stage inside docker * Align scripts/gutsy to scripts/debian-common - * Remove unnecessary script files from udeb package + * Remove unnecessary script files from udeb package (Closes: #618839, #893713) -- Hideki Yamane <henr...@debian.org> Thu, 26 Jul 2018 19:12:20 +0900 @@ -307,7 +397,7 @@ debootstrap (1.0.95) unstable; urgency=medium - * Really fix #894415 (Closes: #894415) + * Really fix #894415 (Closes: #894415) -- Hideki Yamane <henr...@debian.org> Sat, 31 Mar 2018 13:28:26 +0900 @@ -356,7 +446,7 @@ * Change repository URI for old Ubuntu releases (Closes: #676370, #839073) Archived Ubuntu releases are at old-releases.ubuntu.com/ubuntu * Set correct keyring and default mirror for old debian releases. - Now you can fetch popato/woody/sarge/etch/lenny/squeeze if you want. + Now you can fetch potato/woody/sarge/etch/lenny/squeeze if you want. (Closes: #891404, #600647, #792729) -- Hideki Yamane <henr...@debian.org> Mon, 05 Mar 2018 22:28:22 +0900 @@ -900,7 +990,7 @@ [ Joey Hess ] * When installation or configuration of a package fails, output a message - that points the user to the log file. Attempt to grep out the first + that points the user to the log file. Attempt to grep out the first package that dpkg failed on and show its name too. Closes: #472704 [ Colin Watson ] @@ -921,7 +1011,7 @@ debootstrap (1.0.38) unstable; urgency=low [ Joey Hess ] - * Improve error message when a decompressor is not available, + * Improve error message when a decompressor is not available, to indicate which package has been built with bzip today. Closes: #644719 @@ -1055,7 +1145,7 @@ [ Joey Hess ] * Remove 5 second sleeps when debootstrap finds additional required dependencies. d-i just got that much faster. - * Use SHA checksums. Defaulting to SHA256, and configurable by + * Use SHA checksums. Defaulting to SHA256, and configurable by SHA_SIZE environment variable. Closes: #614315 * If a sha256sum program is not available, fall back to sha1sum. This is to support debootstrap use on embedded systems, which are more @@ -1069,7 +1159,7 @@ [ Miguel Figueiredo ] * Fix bug and typo on --private-key - Patch by Jonathan Klee. + Patch by Jonathan Klee. [ Jeremie Koenig ] * Hurd support: @@ -1105,7 +1195,7 @@ debootstrap (1.0.24) unstable; urgency=low [ Miguel Figueiredo ] - * Apply patches from by Jonathan Klee and Guillaume Chauvel + * Apply patches from by Jonathan Klee and Guillaume Chauvel to add support to https (closes: #521196). [ Colin Watson ] @@ -1191,7 +1281,7 @@ debootstrap (1.0.18) unstable; urgency=low - * Only use dpkg from the chroot, as there is no guarantee dpkg is + * Only use dpkg from the chroot, as there is no guarantee dpkg is available outside of the chroot (d-i installation for example). -- Aurelien Jarno <aure...@debian.org> Wed, 23 Sep 2009 11:37:01 +0200 @@ -1777,7 +1867,7 @@ debootstrap (0.2.42) unstable; urgency=high * Acknowledge NMUs. (Closes: #262137, #262165, #262178, #262375) - * [sarge] Switch to libgnutls11 so exim4 can switch. (Closes: #268325) + * [sarge] Switch to libgnutls11 so exim4 can switch. (Closes: #268325) * [sid] Removed "gcc-3.0-base" and "libstdc++3" for HPPA as they have been removed from sid. (Closes: #268049) * [Makefile] Make the regular video devices on all archs. (Closes: #265081) @@ -1816,7 +1906,7 @@ systems (e.g. #212646) and there is a consensus it is no longer needed in a base environment. * [sarge, sid] Removed aboot, aboot-base, elilo, efibootmgr, silo, dvhtool, - delo, palo, vmelilo. As per the consensus reached in the thread starting + delo, palo, vmelilo. As per the consensus reached in the thread starting with http://lists.debian.org/debian-boot/2004/04/msg00634.html, the installation of boot loaders is now debian-installer's responsibility. (Closes: #247906) @@ -1859,7 +1949,7 @@ * [woody.buildd] Install libperl5.6. Thanks Rene Engelhard. (Closes: #251702) * [sarge.buildd] Install libc6.1 rather than libc6 on alpha. Thanks Rene Engelhard. (Closes: #251703) - + Goswin von Brederlow <brede...@informatik.uni-tuebingen.de> * Copy script for sarge to sid * Add handling for amd64 to sarge/sid scripts @@ -1963,7 +2053,7 @@ debootstrap (0.2.28) unstable; urgency=medium * [sid] Exim has changed GnuTLS dependencies. Added libgnutls10, libgcrypt7, - libgpg-error0, libopencdk8, libtasn1-2; dropped libgnutls7, libgcrypt1, + libgpg-error0, libopencdk8, libtasn1-2; dropped libgnutls7, libgcrypt1, libtasn1-0. * [sarge,sid] Dropped lilo, mbr, modconf, libdevmapper1.00 as debian-installer handles the bootloader installation and modules diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debootstrap-1.0.115/debian/compat new/debootstrap-1.0.123/debian/compat --- old/debootstrap-1.0.115/debian/compat 2019-07-06 13:22:33.000000000 +0200 +++ new/debootstrap-1.0.123/debian/compat 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -9 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debootstrap-1.0.115/debian/control new/debootstrap-1.0.123/debian/control --- old/debootstrap-1.0.115/debian/control 2019-07-06 13:22:33.000000000 +0200 +++ new/debootstrap-1.0.123/debian/control 2020-03-14 02:07:25.000000000 +0100 @@ -4,8 +4,8 @@ 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>, -Build-Depends: debhelper (>= 9) -Standards-Version: 4.3.0 +Build-Depends: debhelper-compat (= 12) +Standards-Version: 4.5.0 Vcs-Browser: https://salsa.debian.org/installer-team/debootstrap Vcs-Git: https://salsa.debian.org/installer-team/debootstrap.git diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debootstrap-1.0.115/debian/salsa-ci.yml new/debootstrap-1.0.123/debian/salsa-ci.yml --- old/debootstrap-1.0.115/debian/salsa-ci.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/debootstrap-1.0.123/debian/salsa-ci.yml 2020-03-14 02:07:25.000000000 +0100 @@ -0,0 +1,8 @@ +--- +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml + +variables: + SALSA_CI_DISABLE_BLHC: 1 + SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debootstrap-1.0.115/debian/tests/debian-testing new/debootstrap-1.0.123/debian/tests/debian-testing --- old/debootstrap-1.0.115/debian/tests/debian-testing 2019-07-06 13:22:33.000000000 +0200 +++ new/debootstrap-1.0.123/debian/tests/debian-testing 2020-03-14 02:07:25.000000000 +0100 @@ -179,7 +179,7 @@ # 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{ADTTMP}; +my $tmp = $ENV{AUTOPKGTEST_TMP} || $ENV{AUTOPKGTEST_TMP}; die "no autopkgtest temporary directory specified" unless $tmp; chdir $tmp or die "chdir $tmp: $!"; @@ -282,7 +282,7 @@ } else { if (!verbose_run(['systemd-nspawn', '-D', 'chroot.d', - "--bind=$ENV{ADTTMP}:/mnt", + "--bind=$ENV{AUTOPKGTEST_TMP}:/mnt", '--bind-ro=/usr/sbin/debootstrap', '--bind-ro=/usr/share/debootstrap', '--', @@ -291,7 +291,7 @@ BAIL_OUT("debootstrap wrapped in systemd-nspawn failed: $?"); } - check_chroot(chroot => "$ENV{ADTTMP}/from-nspawn.d", can_mknod_ptmx => 0, + check_chroot(chroot => "$ENV{AUTOPKGTEST_TMP}/from-nspawn.d", can_mknod_ptmx => 0, kernel => $kernel, container => "nspawn"); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debootstrap-1.0.115/debian/tests/fake/schroot-1.6.10-3 new/debootstrap-1.0.123/debian/tests/fake/schroot-1.6.10-3 --- old/debootstrap-1.0.115/debian/tests/fake/schroot-1.6.10-3 2019-07-06 13:22:33.000000000 +0200 +++ new/debootstrap-1.0.123/debian/tests/fake/schroot-1.6.10-3 2020-03-14 02:07:25.000000000 +0100 @@ -34,6 +34,7 @@ [ "$bind_dev" = no ] || mount --bind /dev "$chroot/dev" mount --bind /dev/pts "$chroot/dev/pts" +mount --bind /dev/ptmx "$chroot/dev/ptmx" ls -l "$chroot/dev/ptmx" | sed -e 's/^/# fake-schroot: /' >&2 ls -l "$chroot/dev/pts/ptmx" | sed -e 's/^/# fake-schroot: /' >&2 @@ -42,6 +43,7 @@ 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.115/debootstrap new/debootstrap-1.0.123/debootstrap --- old/debootstrap-1.0.115/debootstrap 2019-07-06 13:22:33.000000000 +0200 +++ new/debootstrap-1.0.123/debootstrap 2020-03-14 02:07:25.000000000 +0100 @@ -22,6 +22,7 @@ exec 4>&1 LANG=C +EXTRA_SUITES="" USE_COMPONENTS=main KEYRING="" DISABLE_KEYRING="" @@ -99,6 +100,8 @@ --include=A,B,C adds specified names to the list of base packages --exclude=A,B,C removes specified packages from the list + --extra-suites=A,B,C also use packages from the listed suites of the + archive --components=A,B,C use packages from the listed components of the archive --variant=X use variant X of the bootstrap scripts @@ -308,6 +311,18 @@ export VERBOSE shift 1 ;; + --extra-suites|--extra-suites=?*) + if [ "$1" = "--extra-suites" ] && [ -n "$2" ]; then + EXTRA_SUITES="$2" + shift 2 + elif [ "$1" != "${1#--extra-suites=}" ]; then + EXTRA_SUITES="${1#--extra-suites=}" + shift 1 + else + error 1 NEEDARG "option requires an argument %s" "$1" + fi + EXTRA_SUITES="$(echo "$EXTRA_SUITES" | tr , " ")" + ;; --components|--components=?*) if [ "$1" = "--components" ] && [ -n "$2" ]; then USE_COMPONENTS="$2" @@ -441,6 +456,9 @@ if [ "$SECOND_STAGE_ONLY" = "true" ]; then SUITE=$(cat "$DEBOOTSTRAP_DIR/suite") + if [ -e "$DEBOOTSTRAP_DIR/extra-suites" ]; then + EXTRA_SUITES=$(cat "$DEBOOTSTRAP_DIR/extra-suites") + fi ARCH=$(cat "$DEBOOTSTRAP_DIR/arch") USER_MIRROR=$(cat "$DEBOOTSTRAP_DIR/mirror") if [ -e "$DEBOOTSTRAP_DIR/variant" ]; then @@ -561,7 +579,7 @@ fi DEBOOTSTRAP_CHECKSUM_FIELD="SHA$SHA_SIZE" -export ARCH SUITE TARGET CHROOT_CMD SHA_SIZE DEBOOTSTRAP_CHECKSUM_FIELD +export ARCH SUITE EXTRA_SUITES TARGET CHROOT_CMD SHA_SIZE DEBOOTSTRAP_CHECKSUM_FIELD if am_doing_phase first_stage second_stage; then if in_path id && [ "$(id -u)" -ne 0 ]; then @@ -731,6 +749,8 @@ cp "$DEBOOTSTRAP_DIR"/scripts/*-common "$TARGET/debootstrap/" echo "$ARCH" >"$TARGET/debootstrap/arch" echo "$SUITE" >"$TARGET/debootstrap/suite" + [ "" = "$EXTRA_SUITES" ] || + echo "$EXTRA_SUITES" >"$TARGET/debootstrap/extra-suites" [ "" = "$VARIANT" ] || echo "$VARIANT" >"$TARGET/debootstrap/variant" echo "$required" >"$TARGET/debootstrap/required" @@ -766,6 +786,8 @@ cp "$DEBOOTSTRAP_DIR"/scripts/*-common "$TARGET/debootstrap/" echo "$ARCH" >"$TARGET/debootstrap/arch" echo "$SUITE" >"$TARGET/debootstrap/suite" + [ "" = "$EXTRA_SUITES" ] || + echo "$EXTRA_SUITES" >"$TARGET/debootstrap/extra-suites" echo "$USER_MIRROR" >"$TARGET/debootstrap/mirror" [ "" = "$VARIANT" ] || echo "$VARIANT" >"$TARGET/debootstrap/variant" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debootstrap-1.0.115/debootstrap.8 new/debootstrap-1.0.123/debootstrap.8 --- old/debootstrap-1.0.115/debootstrap.8 2019-07-06 13:22:33.000000000 +0200 +++ new/debootstrap-1.0.123/debootstrap.8 2020-03-14 02:07:25.000000000 +0100 @@ -60,6 +60,9 @@ WARNING: you can and probably will exclude essential packages, be careful using this option. .IP +.IP "\fB\-\-extra-suites=alpha,beta\fP" +Also use packages from the listed suites of the archive. +.IP .IP "\fB\-\-components=alpha,beta\fP" Use packages from the listed components of the archive. .IP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debootstrap-1.0.115/functions new/debootstrap-1.0.123/functions --- old/debootstrap-1.0.115/functions 2019-07-06 13:22:33.000000000 +0200 +++ new/debootstrap-1.0.123/functions 2020-03-14 02:07:25.000000000 +0100 @@ -93,7 +93,7 @@ ret=$({ { wget $@ 2>&1 >/dev/null || echo $? >&2; } | "$PKGDETAILS" "WGET%" "$PROGRESS_NOW" "$PROGRESS_NEXT" "$PROGRESS_END" >&3; } 2>&1) : ${ret:=0} else - wget $NVSWITCH $@ + wget ${NVSWITCH:+"$NVSWITCH"} "$@" ret=$? fi return $ret @@ -234,7 +234,7 @@ CONTAINER="lxc" elif grep -qs container=lxc-libvirt /proc/1/environ; then CONTAINER="lxc-libvirt" - elif grep -qs ^systemd-nspawn$ /run/systemd/container || [ "$container" = "systemd-nspawn" ]; then + elif grep -qs ^systemd-nspawn$ /run/systemd/container || grep -qs systemd-nspawn /proc/1/environ || [ "$container" = "systemd-nspawn" ]; then CONTAINER="systemd-nspawn" elif grep -qs '[[:space:]]/docker/.*/sys/fs/cgroup' /proc/1/mountinfo; then CONTAINER="docker" @@ -262,8 +262,8 @@ ########################################################### option handling check_conflicting_option () { - if [ "$set_what_to_do" = --foreign ] && [ "${1%%=*}" = --unpack-tarball ] || \ - [ "${set_what_to_do%%=*}" = "--unpack-tarball" ] && [ "$1" == --foreign ]; then + if ( [ "$set_what_to_do" = --foreign ] && [ "${1%%=*}" = --unpack-tarball ] ) || \ + ( [ "${set_what_to_do%%=*}" = "--unpack-tarball" ] && [ "$1" = --foreign ] ); then LOOSEN_CONFLICTING_RESTRICTION="true" elif [ -n "$set_what_to_do" ]; then error 1 ARG_CONFLICTING "$set_what_to_do is specified with $1, please use only one of those options." @@ -439,17 +439,9 @@ mkdir -p "${dest%/*}" if [ "${from#null:}" != "$from" ]; then error 1 NOTPREDL "%s was not pre-downloaded" "${from#null:}" - elif [ "${from#http://}" != "$from" ] || [ "${from#ftp://}" != "$from" ]; then - # http/ftp mirror - if wgetprogress -O "$dest" "$from"; then - return 0 - else - rm -f "$dest" - return 1 - fi - elif [ "${from#https://}" != "$from" ] ; then - # http/ftp mirror - if wgetprogress "$CHECKCERTIF" "$CERTIFICATE" "$PRIVATEKEY" -O "$dest" "$from"; then + elif [ "${from#http://}" != "$from" ] || [ "${from#https://}" != "$from" ] || [ "${from#ftp://}" != "$from" ]; then + # http/https/ftp mirror + if wgetprogress ${CHECKCERTIF:+"$CHECKCERTIF"} ${CERTIFICATE:+"$CERTIFICATE"} ${PRIVATEKEY:+"$PRIVATEKEY"} -O "$dest" "$from"; then return 0 else rm -f "$dest" @@ -565,8 +557,15 @@ CODENAME=$(sed -n "s/^Codename: *//p" "$reldest") suite=$(sed -n "s/^Suite: *//p" "$reldest") - if [ "$SUITE" != "$suite" ] && [ "$SUITE" != "$CODENAME" ]; then + for s in $SUITE $EXTRA_SUITES; do + if [ "$s" = "$suite" ] || [ "$s" = "$CODENAME" ]; then + return 0 + fi + done + if [ "$EXTRA_SUITES" = "" ]; then error 1 WRONGSUITE "Asked to install suite %s, but got %s (codename: %s) from mirror" "$SUITE" "$suite" "$CODENAME" + else + error 1 WRONGSUITE "Asked to install suites %s %s, but got %s (codename: %s) from mirror" "$SUITE" "$EXTRA_SUITES" "$suite" "$CODENAME" fi } @@ -615,29 +614,30 @@ } download_release_sig () { - local m1 inreldest reldest relsigdest + local m1 suite inreldest reldest relsigdest m1="$1" - inreldest="$2" - reldest="$3" - relsigdest="$4" + suite="$2" + inreldest="$3" + reldest="$4" + relsigdest="$5" progress 0 100 DOWNREL "Downloading Release file" progress_next 100 - if get "$m1/dists/$SUITE/InRelease" "$inreldest" nocache; then + 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" + 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" if ! [ -f "$relsigdest" ]; then progress_next 50 - get "$m1/dists/$SUITE/Release.gpg" "$relsigdest" nocache || + get "$m1/dists/$suite/Release.gpg" "$relsigdest" nocache || error 1 NOGETRELSIG "Failed getting release signature file %s" \ - "$m1/dists/$SUITE/Release.gpg" + "$m1/dists/$suite/Release.gpg" progress 50 100 DOWNRELSIG "Downloading Release file signature" fi @@ -655,80 +655,82 @@ subpath xzi bz2i gzi normi i ext \ donepkgs pkgdest acquirebyhash m1="${MIRRORS%% *}" - inreldest="$TARGET/$($DLDEST rel "$SUITE" "$m1" "dists/$SUITE/InRelease")" - reldest="$TARGET/$($DLDEST rel "$SUITE" "$m1" "dists/$SUITE/Release")" - relsigdest="$TARGET/$($DLDEST rel "$SUITE" "$m1" "dists/$SUITE/Release.gpg")" - - download_release_sig "$m1" "$inreldest" "$reldest" "$relsigdest" - - validate_suite "$reldest" - - extract_release_components "$reldest" - - acquirebyhash=$(grep "^Acquire-By-Hash: yes$" "$reldest" || true) - totalpkgs=0 - for c in $COMPONENTS; do - subpath="$c/binary-$ARCH/Packages" - xzi="$(get_release_checksum "$reldest" "$subpath.xz")" - bz2i="$(get_release_checksum "$reldest" "$subpath.bz2")" - gzi="$(get_release_checksum "$reldest" "$subpath.gz")" - normi="$(get_release_checksum "$reldest" "$subpath")" - if [ "$normi" != "" ]; then - 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 - if [ "$i" != "" ]; then - totalpkgs=$(( $totalpkgs + ${i#* } )) - else - mv "$reldest" "$reldest.malformed" - error 1 MISSINGRELENTRY "Invalid Release file, no entry for %s" "$subpath" - fi - done + for s in $SUITE $EXTRA_SUITES; do + inreldest="$TARGET/$($DLDEST rel "$s" "$m1" "dists/$s/InRelease")" + reldest="$TARGET/$($DLDEST rel "$s" "$m1" "dists/$s/Release")" + relsigdest="$TARGET/$($DLDEST rel "$s" "$m1" "dists/$s/Release.gpg")" + + download_release_sig "$m1" "$s" "$inreldest" "$reldest" "$relsigdest" + + validate_suite "$reldest" - donepkgs=0 - progress 0 $totalpkgs DOWNPKGS "Downloading Packages files" - for c in $COMPONENTS; do - subpath="$c/binary-$ARCH/Packages" - path="dists/$SUITE/$subpath" - xzi="$(get_release_checksum "$reldest" "$subpath.xz")" - bz2i="$(get_release_checksum "$reldest" "$subpath.bz2")" - gzi="$(get_release_checksum "$reldest" "$subpath.gz")" - normi="$(get_release_checksum "$reldest" "$subpath")" - ext="" - if [ "$acquirebyhash" != "" ]; then - ext="$ext byhash" - fi - if [ "$normi" != "" ]; then - 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}" - fi - if in_path gunzip && [ "$gzi" != "" ]; then - ext="$ext $gzi gz" - i="${i:-$gzi}" - fi - progress_next $(($donepkgs + ${i#* })) - for m in $MIRRORS; do - pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" "$ARCH" "$m" "$path")" - if get "$m/$path" "$pkgdest" $ext; then break; fi + extract_release_components "$reldest" + + acquirebyhash=$(grep "^Acquire-By-Hash: yes$" "$reldest" || true) + totalpkgs=0 + for c in $COMPONENTS; do + subpath="$c/binary-$ARCH/Packages" + xzi="$(get_release_checksum "$reldest" "$subpath.xz")" + bz2i="$(get_release_checksum "$reldest" "$subpath.bz2")" + gzi="$(get_release_checksum "$reldest" "$subpath.gz")" + normi="$(get_release_checksum "$reldest" "$subpath")" + if [ "$normi" != "" ]; then + 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 + if [ "$i" != "" ]; then + totalpkgs=$(( $totalpkgs + ${i#* } )) + else + mv "$reldest" "$reldest.malformed" + error 1 MISSINGRELENTRY "Invalid Release file, no entry for %s" "$subpath" + fi + done + + donepkgs=0 + progress 0 $totalpkgs DOWNPKGS "Downloading Packages files" + for c in $COMPONENTS; do + subpath="$c/binary-$ARCH/Packages" + path="dists/$s/$subpath" + xzi="$(get_release_checksum "$reldest" "$subpath.xz")" + bz2i="$(get_release_checksum "$reldest" "$subpath.bz2")" + gzi="$(get_release_checksum "$reldest" "$subpath.gz")" + normi="$(get_release_checksum "$reldest" "$subpath")" + ext="" + if [ "$acquirebyhash" != "" ]; then + ext="$ext byhash" + fi + if [ "$normi" != "" ]; then + 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}" + fi + if in_path gunzip && [ "$gzi" != "" ]; then + ext="$ext $gzi gz" + i="${i:-$gzi}" + fi + progress_next $(($donepkgs + ${i#* })) + for m in $MIRRORS; do + pkgdest="$TARGET/$($DLDEST pkg "$s" "$c" "$ARCH" "$m" "$path")" + if get "$m/$path" "$pkgdest" $ext; then break; fi + done + if [ ! -f "$pkgdest" ]; then + error 1 COULDNTDL "Couldn't download %s" "$m/$path" + fi + donepkgs=$(($donepkgs + ${i#* })) + progress $donepkgs $totalpkgs DOWNPKGS "Downloading Packages files" done - if [ ! -f "$pkgdest" ]; then - error 1 COULDNTDL "Couldn't download %s" "$m/$path" - fi - donepkgs=$(($donepkgs + ${i#* })) - progress $donepkgs $totalpkgs DOWNPKGS "Downloading Packages files" done } @@ -805,24 +807,26 @@ leftoverdebs=$(printf "$leftoverdebs"|tr ' ' '\n'|sort -u|tr '\n' ' ') numdebs=$(printf "$leftoverdebs"|wc -w) - for c in $COMPONENTS; do - if [ "$countdebs" -ge "$numdebs" ]; then break; fi + for s in $SUITE $EXTRA_SUITES; do + for c in $COMPONENTS; do + if [ "$countdebs" -ge "$numdebs" ]; then break; fi - path="dists/$SUITE/$c/binary-$ARCH/Packages" - pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" "$ARCH" "$m1" "$path")" - if [ ! -e "$pkgdest" ]; then continue; fi + path="dists/$s/$c/binary-$ARCH/Packages" + pkgdest="$TARGET/$($DLDEST pkg "$s" "$c" "$ARCH" "$m1" "$path")" + if [ ! -e "$pkgdest" ]; then continue; fi - info CHECKINGSIZES "Checking component %s on %s..." "$c" "$m1" + info CHECKINGSIZES "Checking component %s on %s..." "$c" "$m1" - leftoverdebs="$(get_package_sizes "$m1" "$pkgdest" $leftoverdebs)" + leftoverdebs="$(get_package_sizes "$m1" "$pkgdest" $leftoverdebs)" - countdebs=$(($countdebs + ${leftoverdebs%% *})) - leftoverdebs=${leftoverdebs#* } + countdebs=$(($countdebs + ${leftoverdebs%% *})) + leftoverdebs=${leftoverdebs#* } - totaldebs=${leftoverdebs%% *} - leftoverdebs=${leftoverdebs#* } + totaldebs=${leftoverdebs%% *} + leftoverdebs=${leftoverdebs#* } - progress "$countdebs" "$numdebs" SIZEDEBS "Finding package sizes" + progress "$countdebs" "$numdebs" SIZEDEBS "Finding package sizes" + done done if [ "$countdebs" -ne "$numdebs" ]; then @@ -835,15 +839,18 @@ :>"$TARGET/debootstrap/debpaths" pkgs_to_get="$*" - for c in $COMPONENTS; do - path="dists/$SUITE/$c/binary-$ARCH/Packages" - for m in $MIRRORS; do - pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" "$ARCH" "$m" "$path")" - if [ ! -e "$pkgdest" ]; then continue; fi - pkgs_to_get="$(download_debs "$m" "$pkgdest" $pkgs_to_get 5>&1 1>&6)" + for s in $SUITE $EXTRA_SUITES; do + for c in $COMPONENTS; do + path="dists/$s/$c/binary-$ARCH/Packages" + for m in $MIRRORS; do + pkgdest="$TARGET/$($DLDEST pkg "$s" "$c" "$ARCH" "$m" "$path")" + if [ ! -e "$pkgdest" ]; then continue; fi + pkgs_to_get="$(download_debs "$m" "$pkgdest" $pkgs_to_get 5>&1 1>&6)" + if [ -z "$pkgs_to_get" ]; then break; fi + done 6>&1 + if [ -z "$pkgs_to_get" ]; then break; fi + done if [ -z "$pkgs_to_get" ]; then break; fi - done 6>&1 - if [ -z "$pkgs_to_get" ]; then break; fi done progress "$dloaddebs" "$totaldebs" DOWNDEBS "Downloading packages" if [ "$pkgs_to_get" != "" ]; then @@ -863,16 +870,18 @@ export COMPONENTS for m in $MIRRORS; do - for c in $COMPONENTS; do - path="dists/$SUITE/$c/binary-$ARCH/Packages" - pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" "$ARCH" "$m" "$path")" - if in_path gunzip && get "$m/${path}.gz" "${pkgdest}.gz"; then - rm -f "$pkgdest" - gunzip "$pkgdest.gz" - elif get "$m/$path" "$pkgdest"; then - true - fi - done + for s in $SUITE $EXTRA_SUITES; do + for c in $COMPONENTS; do + path="dists/$s/$c/binary-$ARCH/Packages" + pkgdest="$TARGET/$($DLDEST pkg "$s" "$c" "$ARCH" "$m" "$path")" + if in_path gunzip && get "$m/${path}.gz" "${pkgdest}.gz"; then + rm -f "$pkgdest" + gunzip "$pkgdest.gz" + elif get "$m/$path" "$pkgdest"; then + true + fi + done + done done progress 100 100 DOWNMAINPKGS "Downloading Packages file" } @@ -883,33 +892,38 @@ :>"$TARGET/debootstrap/debpaths" for p in "$@"; do - for c in $COMPONENTS; do - local details="" - for m in $MIRRORS; do - path="dists/$SUITE/$c/binary-$ARCH/Packages" - pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" "$ARCH" "$m" "$path")" - if [ ! -e "$pkgdest" ]; then continue; fi - details="$($PKGDETAILS PKGS "$m" "$pkgdest" "$p")" - if [ "$details" = "$p -" ]; then - details="" - continue - fi - size="${details##* }"; details="${details% *}" - checksum="${details##* }"; details="${details% *}" - debdest="$($DLDEST deb $details)" - if get "$m/${details##* }" "$TARGET/$debdest" "$checksum" "$size"; then - echo >>"$TARGET/debootstrap/debpaths" "$p $debdest" - details="done" + for s in $SUITE $EXTRA_SUITES; do + for c in $COMPONENTS; do + local details="" + for m in $MIRRORS; do + path="dists/$s/$c/binary-$ARCH/Packages" + pkgdest="$TARGET/$($DLDEST pkg "$s" "$c" "$ARCH" "$m" "$path")" + if [ ! -e "$pkgdest" ]; then continue; fi + details="$($PKGDETAILS PKGS "$m" "$pkgdest" "$p")" + if [ "$details" = "$p -" ]; then + details="" + continue + fi + size="${details##* }"; details="${details% *}" + checksum="${details##* }"; details="${details% *}" + debdest="$($DLDEST deb $details)" + if get "$m/${details##* }" "$TARGET/$debdest" "$checksum" "$size"; then + echo >>"$TARGET/debootstrap/debpaths" "$p $debdest" + details="done" + break + fi + done + if [ "$details" != "" ]; then + break + fi + done + if [ "$details" != "" ]; then break fi done - if [ "$details" != "" ]; then - break + if [ "$details" != "done" ]; then + error 1 COULDNTDL "Couldn't download %s" "$p" fi - done - if [ "$details" != "done" ]; then - error 1 COULDNTDL "Couldn't download %s" "$p" - fi done } @@ -920,10 +934,12 @@ field="$1" shift for m1 in $MIRRORS; do - for c in $COMPONENTS; do - path="dists/$SUITE/$c/binary-$ARCH/Packages" - pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" "$ARCH" "$m1" "$path")" - echo "$("$PKGDETAILS" FIELD "$field" "$m1" "$pkgdest" "$@" | sed 's/ .*//')" + for s in $SUITE $EXTRA_SUITES; do + for c in $COMPONENTS; do + path="dists/$s/$c/binary-$ARCH/Packages" + pkgdest="$TARGET/$($DLDEST pkg "$s" "$c" "$ARCH" "$m1" "$path")" + echo "$("$PKGDETAILS" FIELD "$field" "$m1" "$pkgdest" "$@" | sed 's/ .*//')" + done done done } @@ -1092,13 +1108,15 @@ setup_apt_sources () { mkdir -p "$TARGET/etc/apt" for m in "$@"; do - local cs c path pkgdest - for c in ${COMPONENTS:-$USE_COMPONENTS}; do - path="dists/$SUITE/$c/binary-$ARCH/Packages" - pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" "$ARCH" "$m" "$path")" - if [ -e "$pkgdest" ]; then cs="$cs $c"; fi + for s in $SUITE $EXTRA_SUITES; do + local cs c path pkgdest + for c in ${COMPONENTS:-$USE_COMPONENTS}; do + path="dists/$s/$c/binary-$ARCH/Packages" + pkgdest="$TARGET/$($DLDEST pkg "$s" "$c" "$ARCH" "$m" "$path")" + if [ -e "$pkgdest" ]; then cs="$cs $c"; fi + done + if [ "$cs" != "" ]; then echo "deb $m $s$cs"; fi done - if [ "$cs" != "" ]; then echo "deb $m $SUITE$cs"; fi done > "$TARGET/etc/apt/sources.list" } @@ -1151,7 +1169,7 @@ # 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 + settrans -a "$TARGET/proc" /hurd/firmlink /proc ;; *) umount_on_exit /dev/pts @@ -1514,17 +1532,21 @@ local ALLPKGS2=""; while [ "$PKGS" != "" ]; do local NEWPKGS="" - for c in ${COMPONENTS:-$(echo ${USE_COMPONENTS} | tr '|' ' ')}; do - local path="dists/$SUITE/$c/binary-$ARCH/Packages" - local pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" "$ARCH" "$m1" "$path")" - NEWPKGS="$NEWPKGS $("$PKGDETAILS" GETDEPS "$pkgdest" $PKGS)" + for s in $SUITE $EXTRA_SUITES; do + for c in ${COMPONENTS:-$(echo ${USE_COMPONENTS} | tr '|' ' ')}; do + local path="dists/$s/$c/binary-$ARCH/Packages" + local pkgdest="$TARGET/$($DLDEST pkg "$s" "$c" "$ARCH" "$m1" "$path")" + NEWPKGS="$NEWPKGS $("$PKGDETAILS" GETDEPS "$pkgdest" $PKGS)" + done done PKGS=$(echo "$PKGS $NEWPKGS" | tr ' ' '\n' | sort | uniq) local REALPKGS="" - for c in ${COMPONENTS:-$(echo ${USE_COMPONENTS} | tr '|' ' ')}; do - local path="dists/$SUITE/$c/binary-$ARCH/Packages" - local pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" "$ARCH" "$m1" "$path")" - REALPKGS="$REALPKGS $("$PKGDETAILS" PKGS REAL "$pkgdest" $PKGS | sed -n 's/ .*REAL.*$//p')" + for s in $SUITE $EXTRA_SUITES; do + for c in ${COMPONENTS:-$(echo ${USE_COMPONENTS} | tr '|' ' ')}; do + local path="dists/$s/$c/binary-$ARCH/Packages" + local pkgdest="$TARGET/$($DLDEST pkg "$s" "$c" "$ARCH" "$m1" "$path")" + REALPKGS="$REALPKGS $("$PKGDETAILS" PKGS REAL "$pkgdest" $PKGS | sed -n 's/ .*REAL.*$//p')" + done done PKGS="$REALPKGS" ALLPKGS2=$(echo "$PKGS $ALLPKGS" | tr ' ' '\n' | sort | uniq) @@ -1538,12 +1560,16 @@ local m1 c path pkgdest pkg m1="${MIRRORS%% *}" - for c in ${COMPONENTS:-$(echo ${USE_COMPONENTS} | tr '|' ' ')}; do - path="dists/$SUITE/$c/binary-$ARCH/Packages" - pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" "$ARCH" "$m1" "$path")" - # XXX: What if a package is in more than one component? - # -- cjwatson 2009-07-29 - "$PKGDETAILS" STANZAS "$pkgdest" "$@" + for s in $SUITE $EXTRA_SUITES; do + for c in ${COMPONENTS:-$(echo ${USE_COMPONENTS} | tr '|' ' ')}; do + path="dists/$s/$c/binary-$ARCH/Packages" + pkgdest="$TARGET/$($DLDEST pkg "$s" "$c" "$ARCH" "$m1" "$path")" + # XXX: What if a package is in more than one component? + # -- cjwatson 2009-07-29 + # XXX: ...or suite? + # -- jrtc27 2019-06-11 + "$PKGDETAILS" STANZAS "$pkgdest" "$@" + done done >"$TARGET/var/lib/dpkg/available" for pkg; do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debootstrap-1.0.115/scripts/amber new/debootstrap-1.0.123/scripts/amber --- old/debootstrap-1.0.115/scripts/amber 1970-01-01 01:00:00.000000000 +0100 +++ new/debootstrap-1.0.123/scripts/amber 2020-03-14 02:07:25.000000000 +0100 @@ -0,0 +1,225 @@ + +# For PureOS "amber" +# PureOS: https://www.pureos.net/ +# Contact: https://tracker.pureos.net/ + +mirror_style release +download_style apt +finddebs_style from-indices +variants - buildd fakechroot minbase +keyring /usr/share/keyrings/pureos-archive-keyring.gpg +default_mirror https://repo.pureos.net/pureos/ + +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" ;; + kfreebsd-*) LIBC="libc0.1" ;; + hurd-*) LIBC="libc0.3" ;; + *) LIBC="libc6" ;; +esac + +work_out_debs () { + required="$(get_debs Priority: required)" + + if doing_variant - || doing_variant fakechroot; then + #required="$required $(get_debs Priority: important)" + # ^^ should be getting debconf here somehow maybe + base="$(get_debs Priority: important)" + + # we want the PureOS minimal dependency set to be installed + base="$base pureos-minimal" + elif doing_variant buildd; then + base="apt build-essential" + elif doing_variant minbase; then + base="apt" + fi + + if doing_variant fakechroot; then + # ldd.fake needs binutils + required="$required binutils" + fi + + case $MIRRORS in + https://*) + base="$base ca-certificates" + ;; + esac +} + +first_stage_install () { + MERGED_USR="yes" + EXTRACT_DEB_TAR_OPTIONS="$EXTRACT_DEB_TAR_OPTIONS -k" + + setup_merged_usr + 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 +} + +second_stage_install () { + setup_dynamic_devices + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$(in_target dpkg-deb -f "$deb" Version)" + + mkdir -p "$TARGET/var/lib/dpkg/info" + + echo \ +"Package: $pkg +Version: $ver +Maintainer: unknown +Status: install ok installed" >> "$TARGET/var/lib/dpkg/status" + + touch "$TARGET/var/lib/dpkg/info/${pkg}.list" + } + + x_feign_install dpkg + + 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/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..." + + exec 7>&1 + + 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 || echo EXITCODE $?) | + dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING + + info CONFREQ "Configuring required packages..." + + if doing_variant fakechroot && [ -e "$TARGET/var/lib/dpkg/info/initscripts.postinst" ] + 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" + + 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 || echo EXITCODE $?) | + dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING + + 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 + + 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" + + 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.115/scripts/ascii new/debootstrap-1.0.123/scripts/ascii --- old/debootstrap-1.0.115/scripts/ascii 1970-01-01 01:00:00.000000000 +0100 +++ new/debootstrap-1.0.123/scripts/ascii 2020-05-07 19:33:51.082271696 +0200 @@ -0,0 +1 @@ +symbolic link to sid diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debootstrap-1.0.115/scripts/beowulf new/debootstrap-1.0.123/scripts/beowulf --- old/debootstrap-1.0.115/scripts/beowulf 1970-01-01 01:00:00.000000000 +0100 +++ new/debootstrap-1.0.123/scripts/beowulf 2020-05-07 19:33:51.182271896 +0200 @@ -0,0 +1 @@ +symbolic link to sid diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debootstrap-1.0.115/scripts/ceres new/debootstrap-1.0.123/scripts/ceres --- old/debootstrap-1.0.115/scripts/ceres 1970-01-01 01:00:00.000000000 +0100 +++ new/debootstrap-1.0.123/scripts/ceres 2020-05-07 19:33:51.238272008 +0200 @@ -0,0 +1 @@ +symbolic link to sid diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debootstrap-1.0.115/scripts/debian-common new/debootstrap-1.0.123/scripts/debian-common --- old/debootstrap-1.0.115/scripts/debian-common 2019-07-06 13:22:33.000000000 +0200 +++ new/debootstrap-1.0.123/scripts/debian-common 2020-03-14 02:07:25.000000000 +0100 @@ -29,7 +29,15 @@ case $MIRRORS in https://*) - base="$base apt-transport-https ca-certificates" + case "$CODENAME" in + # apt-transport-https exists from lenny to stretch + lenny|squeeze|wheezy|jessie*|stretch) + base="$base apt-transport-https ca-certificates" + ;; + *) + base="$base ca-certificates" + ;; + esac ;; esac } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debootstrap-1.0.115/scripts/focal new/debootstrap-1.0.123/scripts/focal --- old/debootstrap-1.0.115/scripts/focal 1970-01-01 01:00:00.000000000 +0100 +++ new/debootstrap-1.0.123/scripts/focal 2020-05-07 19:33:51.278272089 +0200 @@ -0,0 +1 @@ +symbolic link to gutsy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debootstrap-1.0.115/scripts/gutsy new/debootstrap-1.0.123/scripts/gutsy --- old/debootstrap-1.0.115/scripts/gutsy 2019-07-06 13:22:33.000000000 +0200 +++ new/debootstrap-1.0.123/scripts/gutsy 2020-03-14 02:07:25.000000000 +0100 @@ -60,7 +60,14 @@ case $MIRRORS in https://*) - base="$base apt-transport-https ca-certificates" + case "$CODENAME" in + gutsy|hardy|intrepid|jaunty|karmic|lucid|maverick|natty|oneiric|precise|quantal|raring|saucy|trusty|utopic|vivid|wily|xenial|yakkety|zesty) + base="$base apt-transport-https ca-certificates" + ;; + *) + base="$base ca-certificates" + ;; + esac ;; esac }