[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#991625: debootstrap: extra-suites= broken; attempts Package.* fetches from primary suite

Package: debootstrap
Version: 1.0.123
Severity: important
X-Debbugs-Cc: debian@iam.tj

Dear Maintainer,

   * What led up to the situation?

Attempting to reproduce another bug reported on IRC about Ubuntu and

   * What exactly did you do (or not do) that was effective (or

/usr/sbin/debootstrap --verbose --arch=amd64
--extra-suites=focal-updates focal ./focal-chroot

   * What was the outcome of this action?

I: Checking Release signature
I: Valid Release signature (key id
I: Validating Packages I: Retrieving Packages I: Validating Packages W:
Retrying failed download of
I: Retrieving Packages

   * What outcome did you expect instead?

File to be fetched correctly

I inserted debug code and used set -x to narrow down the bug and found
that when EXTRA_SUITES is set, in function download_release_indices(),
in the loop "for s in $SUITE $EXTRA_SUITES; do" that the value of 's' is
being changed in the call to validate_suite() where it does "for s in
$SUITE $EXTRA_SUITES; do" and the first test is successful "if [ "$s" =
"$suite" ] || [ "$s" = "$CODENAME" ]; then return 0".

In the example case this resets the suite being processed from
'focal-updates' to 'focal' and so files are downloaded from the focal
suite but the hashes tested against are from the focal-updates
Releases file, causing the validation to fail.

Patch to fix the issue at the end of this email.

-- System Information:
Debian Release: 11.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.13.0-soggy-02736-g7f1d227e86a3 (SMP w/4 CPU threads;
Kernel taint flags: TAINT_WARN
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE
not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages debootstrap depends on:
ii  wget  1.21-1+b1

Versions of packages debootstrap recommends:
ii  arch-test               0.17-1
ii  debian-archive-keyring  2021.1.1
ii  gnupg                   2.2.27-2

Versions of packages debootstrap suggests:
pn  squid-deb-proxy-client  <none>
pn  ubuntu-archive-keyring  <none>

-- no debconf information

commit 23bb0a9f3c39b1f23f6c27bd7e8e85f43d7a0316 (HEAD -> master)
Author: Tj <debian@iam.tj>
Date:   Wed Jul 28 21:27:01 2021 +0100

    fix: download correct extra-suites Packages files

diff --git a/functions b/functions
index 09d93f4..ec34d84 100644
--- a/functions
+++ b/functions
@@ -551,7 +551,7 @@ extract_release_components () {
 validate_suite () {
-       local reldest suite
+       local reldest suite s
         CODENAME=$(sed -n "s/^Codename: *//p" "$reldest")

Reply to: