Browse Source

tagging version 1.0.123

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEtg6/KYRFPHDXTPR4/5FK8MKzVSAFAl5sLlIACgkQ/5FK8MKz
 VSAyOA/+Pceqxf2YwRHzAc8m9bJCPPZz+wTPFkodnCu/B/PHr+uJRTBV8T/HGalk
 mpZDrcUEwRnGaj8IcaMYdNZMzkVXVU86LK3wALzWE1dw/Ju8Rdq02+RMFfauuOB6
 6m9/dEy3aYX9EAgSfpR2KhBnD/w/hAyHf7UR+nR/LsGmbXRVypJMLqhMfcUyBW3j
 2drEXrLjw+xvyTkomiVOw0QB7oK4eTPPQnYZMIBzoySFHae93rAqnTvZfj0ynhH9
 1ZnCIprJhwuab8DpA7q6COT4HyNqkIyjgAjZ49WlQ2PbKISokIURz9sjYTKLyn6h
 krWPgq+wde4atKGrFqsECfaJJtUDUoX7lassy9AG3xiyQKKR9jYzla/UlrBex7Jq
 5dFsA7+uZkH372QJm+5M02o8gCDs6PdknGJpkawBjKGPd4l6PKyfP8Aq4Fu59nXQ
 vBoVTkg5/3x343Ir8GhMcrYxokHunp+MjJnENQa/Mb9xxPX+1EGsv3wJo8AZd7if
 AWUnQ+X4UdRPmsVvnHjMrPgrl4rIWi46wNfQ9rHHqlw6r+f6Fv+CjPTy9SSVf9BM
 23w3MMB3p4ihYxVipMwpYpU0hBwie23X3H6XdgOzDl43xzq6IvzMzfxj5sIFbNgx
 uIrw9ENv4NSuy/E1BGkxwdiL2FUnuMwGvs3ty0AhJ4FgEtMb4Io=
 =7yn7
 -----END PGP SIGNATURE-----

Merge tag '1.0.123' into suites/unstable

tagging version 1.0.123
tags/devuan/1.0.123+devuan1
Mark Hindley 1 year ago
parent
commit
21e2895753
12 changed files with 567 additions and 199 deletions
  1. +92
    -14
      debian/changelog
  2. +0
    -1
      debian/compat
  3. +2
    -2
      debian/control
  4. +0
    -1
      debian/salsa-ci.yml
  5. +3
    -3
      debian/tests/debian-testing
  6. +23
    -1
      debootstrap
  7. +3
    -0
      debootstrap.8
  8. +201
    -175
      functions
  9. +225
    -0
      scripts/amber
  10. +9
    -1
      scripts/debian-common
  11. +1
    -0
      scripts/focal
  12. +8
    -1
      scripts/gutsy

+ 92
- 14
debian/changelog View File

@@ -1,3 +1,81 @@
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 <kibi@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 <kibi@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 <henrich@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 <henrich@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 <cela@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 <henrich@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 <henrich@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 <henrich@debian.org> Tue, 11 Feb 2020 21:15:26 +0900

debootstrap (1.0.116+devuan1) unstable; urgency=medium

* Merge 1.0.116.
@@ -8,7 +86,7 @@ debootstrap (1.0.116) unstable; urgency=medium

[ Hideki Yamane ]
* use salsa-pipeline for CI, instead of custom rule
* disalbe unnecessary blhc and test-build-any CI test
* disable unnecessary blhc and test-build-any CI test

[ Philip Hands ]
* disable the failing autopkgtest job
@@ -144,12 +222,12 @@ debootstrap (1.0.107) unstable; urgency=medium
* 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 <henrich@debian.org> Thu, 26 Jul 2018 19:12:20 +0900
@@ -370,7 +448,7 @@ debootstrap (1.0.96) unstable; urgency=medium

debootstrap (1.0.95) unstable; urgency=medium

* Really fix #894415 (Closes: #894415)
* Really fix #894415 (Closes: #894415)

-- Hideki Yamane <henrich@debian.org> Sat, 31 Mar 2018 13:28:26 +0900

@@ -969,7 +1047,7 @@ debootstrap (1.0.40) unstable; urgency=low

[ 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 ]
@@ -990,7 +1068,7 @@ debootstrap (1.0.39) unstable; urgency=low
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

@@ -1124,7 +1202,7 @@ debootstrap (1.0.28) unstable; urgency=low
[ 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
@@ -1138,7 +1216,7 @@ debootstrap (1.0.27) unstable; urgency=low

[ Miguel Figueiredo ]
* Fix bug and typo on --private-key
Patch by Jonathan Klee.
Patch by Jonathan Klee.

[ Jeremie Koenig ]
* Hurd support:
@@ -1174,7 +1252,7 @@ debootstrap (1.0.25) unstable; urgency=low
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 ]
@@ -1260,7 +1338,7 @@ debootstrap (1.0.19) unstable; urgency=low

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 <aurel32@debian.org> Wed, 23 Sep 2009 11:37:01 +0200
@@ -1846,7 +1924,7 @@ debootstrap (0.2.43) unstable; urgency=high
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)
@@ -1885,7 +1963,7 @@ debootstrap (0.2.41) unstable; urgency=high
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)
@@ -1928,7 +2006,7 @@ debootstrap (0.2.39) unstable; urgency=medium
* [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 <brederlo@informatik.uni-tuebingen.de>
* Copy script for sarge to sid
* Add handling for amd64 to sarge/sid scripts
@@ -2032,7 +2110,7 @@ debootstrap (0.2.29) unstable; urgency=low
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


+ 0
- 1
debian/compat View File

@@ -1 +0,0 @@
10

+ 2
- 2
debian/control View File

@@ -7,8 +7,8 @@ Uploaders: Daniel Reurich <daniel@centurion.net.nz>,
Jaromil <jaromil@dyne.org>,
Ivan J. <parazyd@dyne.org>,
Vincenzo (KatolaZ) Nicosia <katolaz@freaknet.org>
Build-Depends: debhelper (>= 10)
Standards-Version: 4.3.0
Build-Depends: debhelper-compat (= 12)
Standards-Version: 4.5.0
Vcs-Browser: https://git.devuan.org/devuan-packages/debootstrap
Vcs-Git: https://git.devuan.org/devuan-packages/debootstrap.git



debian/.gitlab-ci.yml → debian/salsa-ci.yml View File

@@ -4,6 +4,5 @@ include:
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml

variables:
SALSA_CI_DISABLE_AUTOPKGTEST: 1
SALSA_CI_DISABLE_BLHC: 1
SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 1

+ 3
- 3
debian/tests/debian-testing View File

@@ -179,7 +179,7 @@ sub check_chroot {
# 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: $!";

@@ -285,7 +285,7 @@ elsif (! -d '/run/systemd/system') {
}
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',
'--',
@@ -294,7 +294,7 @@ else {
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");
}



+ 23
- 1
debootstrap View File

@@ -22,6 +22,7 @@ fi
exec 4>&1

LANG=C
EXTRA_SUITES=""
USE_COMPONENTS=main
KEYRING=""
DISABLE_KEYRING=""
@@ -99,6 +100,8 @@ usage()

--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 @@ if [ $# != 0 ] ; then
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 @@ fi

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 @@ if ! in_path "sha${SHA_SIZE}sum" && ! in_path "sha${SHA_SIZE}"; then
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 @@ if am_doing_phase save_variables; then
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 @@ if am_doing_phase first_stage; then
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"


+ 3
- 0
debootstrap.8 View File

@@ -60,6 +60,9 @@ extract lists.
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


+ 201
- 175
functions View File

@@ -93,7 +93,7 @@ wgetprogress () {
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 @@ detect_container () {
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 @@ variants () {

########################################################### 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 @@ just_get () {
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 @@ validate_suite () {
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 @@ split_inline_sig () {
}

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 @@ download_release_indices () {
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")"

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
download_release_sig "$m1" "$s" "$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

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 @@ download_release () {
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 @@ download_release () {
:>"$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 @@ download_main_indices () {

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 @@ download_main () {

:>"$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 @@ get_debs () {
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 @@ conditional_cp () {
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 @@ setup_proc () {
# 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 @@ resolve_deps () {
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 @@ setup_available () {
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


+ 225
- 0
scripts/amber View File

@@ -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."
}

+ 9
- 1
scripts/debian-common View File

@@ -29,7 +29,15 @@ work_out_debs () {

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
}


+ 1
- 0
scripts/focal View File

@@ -0,0 +1 @@
gutsy

+ 8
- 1
scripts/gutsy View File

@@ -60,7 +60,14 @@ work_out_debs () {

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
}


Loading…
Cancel
Save