Bug#877855: debootstrap does not carry --components across --foreign/--second-stage
Hi, On Wed, 21 Mar 2018 18:58:27 +0900 Hideki Yamane wrote: > Since in debootstrap, $TARGET/etc/apt/sources.list is deleted at > starting for second stage. And also it was removed in debootstrap script. > . "$SCRIPT" > > if [ "$SECOND_STAGE_ONLY" = "true" ]; then > MIRRORS=null: > else > MIRRORS="$DEF_MIRROR" > if [ "$USER_MIRROR" != "" ]; then > MIRRORS="$USER_MIRROR" > MIRRORS="${MIRRORS%/}" > fi > fi > > export MIRRORS -- Regards, Hideki Yamane henrich @ debian.org/iijmio-mail.jp
Bug#877855: debootstrap does not carry --components across --foreign/--second-stage
control: tags -1 +confirmed On Fri, 06 Oct 2017 09:40:39 +0200 Michael Stapelbergwrote: > This debootstrap invocation’s sources.list lacks the extra components: > > % sudo debootstrap --foreign --components main,contrib,non-free \ > --variant - testing bootstr http://deb.debian.org/debian > % sudo chroot /tmp/bootstr /debootstrap/debootstrap --second-stage > % sudo cat /tmp/bootstr/etc/apt/sources.list > deb http://deb.debian.org/debian testing main > > Looking at /tmp/bootstr/debootstrap/debootstrap before the chroot command > shows > “USE_COMPONENTS=main”, which I believe should include contrib and non-free. And it lucks mirror URL that was specified by user. > $ sudo debootstrap --foreign --components main,contrib,non-free \ > --variant - testing bootstr http://debian-mirror.sakura.ne.jp/debian > $ sudo chroot /tmp/bootstr /debootstrap/debootstrap --second-stage > $ sudo cat /tmp/bootstr/etc/apt/sources.list > deb http://deb.debian.org/debian testing main Since in debootstrap, $TARGET/etc/apt/sources.list is deleted at starting for second stage. > if am_doing_phase second_stage; then > if [ "$SECOND_STAGE_ONLY" = true ]; then > required="$(cat $DEBOOTSTRAP_DIR/required)" > base="$(cat $DEBOOTSTRAP_DIR/base)" > all_debs="$required $base" > fi > > # second stage uses the chroot to clean itself up -- has to be able to > # work from entirely within the chroot (in case we've booted into it, > # possibly over NFS eg) > > second_stage_install > > # create sources.list > # first, kill debootstrap.invalid sources.list > if [ -e "$TARGET/etc/apt/sources.list" ]; then > rm -f "$TARGET/etc/apt/sources.list" > fi > if [ "${MIRRORS#http://}; != "$MIRRORS" ]; then > setup_apt_sources "${MIRRORS%% *}" > mv_invalid_to "${MIRRORS%% *}" > else > setup_apt_sources "$DEF_MIRROR" > mv_invalid_to "$DEF_MIRROR" > fi -- Regards, Hideki Yamane henrich @ debian.org/iijmio-mail.jp
Bug#877855: debootstrap does not carry --components across --foreign/--second-stage
Package: debootstrap Version: 1.0.91 Severity: normal This debootstrap invocation generates the expected sources.list: % sudo debootstrap --components main,contrib,non-free \ --variant - testing /tmp/bootstr http://deb.debian.org/debian % cat /tmp/bootstr/etc/apt/sources.list deb http://deb.debian.org/debian testing main contrib non-free This debootstrap invocation’s sources.list lacks the extra components: % sudo debootstrap --foreign --components main,contrib,non-free \ --variant - testing bootstr http://deb.debian.org/debian % sudo chroot /tmp/bootstr /debootstrap/debootstrap --second-stage % sudo cat /tmp/bootstr/etc/apt/sources.list deb http://deb.debian.org/debian testing main Looking at /tmp/bootstr/debootstrap/debootstrap before the chroot command shows “USE_COMPONENTS=main”, which I believe should include contrib and non-free. -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386, armel, mipsel, arm64 Kernel: Linux 4.12.0-1-amd64 (SMP w/8 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages debootstrap depends on: ii wget 1.19.1-4 Versions of packages debootstrap recommends: ii debian-archive-keyring 2017.6 ii gnupg 2.1.23-2 debootstrap suggests no packages. -- no debconf information