[Bug 1670905] Re: qemu-debootstrap inserts debian repos into the chroot
Alistair Buxton
a.j.buxton at gmail.com
Wed Mar 8 17:41:18 UTC 2017
Yes, I expected the chroot to end up with the mirror I asked for in the
sources.list. This is the behaviour with a normal debbotstrap
invocation.
This doesn't actually have anything to do with the keyring file at all.
The reason this happens is because there is no mechanism for the first
stage to tell the second stage what mirror to use, nor any way for it to
be passed in as an argument on the command line when running the second
stage. If you try to set a mirror, debootstrap explicitly ignores it,
setting the variable to "null:".
The reason why Ubuntu does not have this problem is because they have
overridden the mirror URLs in their suite scripts, eg
/usr/share/debootstrap/scripts/trusty, the very first lines. Debian
suite scripts do not do this, and so they end up using the URL hard
coded into debootstrap since there is no other way to override it.
Since Raspbian re-uses the Debian suite scripts unmodified, it ends up
getting the Debian repositories when doing foreign bootstrap. As a
workaround you can simply fix them manually after the second stage runs,
because they aren't used for anything and sources.list only gets written
with the wrong value after the second stage has unpacked and configured
everything.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to debootstrap in Ubuntu.
https://bugs.launchpad.net/bugs/1670905
Title:
qemu-debootstrap inserts debian repos into the chroot
Status in debootstrap package in Ubuntu:
New
Status in qemu package in Ubuntu:
Confirmed
Bug description:
Log:
root at al-xfce:~# qemu-debootstrap --no-check-gpg --arch=armhf jessie test-root1 http://mirrordirector.raspbian.org/raspbian
I: Running command: debootstrap --arch armhf --foreign --no-check-gpg jessie test-root1 http://mirrordirector.raspbian.org/raspbian
I: Retrieving InRelease
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Found additional required dependencies: acl adduser cpio dmsetup init-system-helpers initramfs-tools insserv klibc-utils kmod libaudit-common libaudit1 libbz2-1.0 libcap2 libcap2-bin libcryptsetup4 libdb5.3 libdbus-1-3 libdebconfclient0 libdevmapper1.02.1 libdrm2 libgcrypt20 libgpg-error0 libklibc libkmod2 libncursesw5 libnih-dbus1 libnih1 libpcre3 libpng12-0 libprocps3 libsemanage-common libsemanage1 libslang2 libsystemd0 libudev1 libustr-1.0-1 makedev plymouth procps systemd systemd-sysv udev
I: Found additional base dependencies: libbsd0 libcwidget3 libdns-export100 libestr0 libffi6 libgmp10 libgnutls-deb0-28 libgnutls-openssl27 libhogweed2 libicu52 libidn11 libirs-export91 libisc-export95 libisccfg-export90 libjson-c2 liblogging-stdlog0 liblognorm1 libnettle4 libnfnetlink0 libp11-kit0 libpsl0 libsigc++-2.0-0c2a libsqlite3-0 libtasn1-6
I: Checking component main on http://mirrordirector.raspbian.org/raspbian...
I: Retrieving acl 2.2.52-2
I: Validating acl 2.2.52-2
< time passes... >
I: Extracting xz-utils...
I: Extracting zlib1g...
I: Running command: chroot test-root1 /debootstrap/debootstrap --second-stage
I: Keyring file not available at /usr/share/keyrings/debian-archive-keyring.gpg; switching to https mirror https://mirrors.kernel.org/debian
I: Installing core packages...
I: Unpacking required packages...
I: Unpacking acl...
< time passes... >
I: Base system installed successfully.
root at al-xfce:~# cat test-root1/etc/apt/sources.list
deb http://httpredir.debian.org/debian jessie main
The chroot's sources.list has been replaced with one pointing to
debian, which is not the result I expected or wanted. This appears to
happen when qemu-debootstrap runs the second stage.
ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: qemu-user-static 1:2.8+dfsg-3ubuntu1
ProcVersionSignature: Ubuntu 4.10.0-8.10-generic 4.10.0-rc8
Uname: Linux 4.10.0-8-generic x86_64
ApportVersion: 2.20.4-0ubuntu2
Architecture: amd64
Date: Wed Mar 8 00:40:22 2017
InstallationDate: Installed on 2017-02-18 (17 days ago)
InstallationMedia: Xubuntu 17.04 "Zesty Zapus" - Alpha amd64 (20170218)
ProcEnviron:
LANGUAGE=en_GB:en
TERM=xterm
PATH=(custom, no user)
LANG=en_GB.UTF-8
SHELL=/bin/bash
SourcePackage: qemu
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/debootstrap/+bug/1670905/+subscriptions
More information about the foundations-bugs
mailing list