From 230dd6cae574a5d75e1100e3de2b71eb491822f4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 26 Dec 2013 22:19:48 -0400 Subject: Avoid writing https urls into sources.list, as apt does not support https. When a https url is used, fall back to the default mirror for sources.list. --- debian/changelog | 1 + debootstrap | 2 +- debootstrap.8 | 2 +- functions | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 83a9634..07da6d7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ debootstrap (1.0.56) UNRELEASED; urgency=low least the CA level of security is available even for users who have no way to check gpg keys in the WoT. The https mirror is currently https://mirrors.kernel.org/debian. + * Avoid writing https urls into sources.list, as apt does not support https. -- Tollef Fog Heen Thu, 19 Dec 2013 13:41:37 +0100 diff --git a/debootstrap b/debootstrap index f7ee5d1..fef1ab5 100755 --- a/debootstrap +++ b/debootstrap @@ -652,7 +652,7 @@ if am_doing_phase second_stage; then if [ -e "$TARGET/etc/apt/sources.list" ]; then rm -f "$TARGET/etc/apt/sources.list" fi - if [ "${MIRRORS#http*://}" != "$MIRRORS" ]; then + if [ "${MIRRORS#http://}" != "$MIRRORS" ]; then setup_apt_sources "${MIRRORS%% *}" mv_invalid_to "${MIRRORS%% *}" else diff --git a/debootstrap.8 b/debootstrap.8 index bb58e4a..2cf44ca 100644 --- a/debootstrap.8 +++ b/debootstrap.8 @@ -22,7 +22,7 @@ from by running .IR SCRIPT . .I MIRROR -can be an http:// URL, a file:/// URL, or an ssh:/// URL. +can be an http:// or https:// URL, a file:/// URL, or an ssh:/// URL. .PP The .I SUITE diff --git a/functions b/functions index 572a50d..0619261 100644 --- a/functions +++ b/functions @@ -202,7 +202,7 @@ keyring () { elif [ -z "$DISABLE_KEYRING" ]; then if [ -n "$DEF_HTTPS_MIRROR" ] && [ -z "$USER_MIRROR" ] ; then info KEYRING "Keyring file not available at %s; switching to https mirror %s" "$1" "$DEF_HTTPS_MIRROR" - DEF_MIRROR="$DEF_HTTPS_MIRROR" + USER_MIRROR="$DEF_HTTPS_MIRROR" else warning KEYRING "Cannot check Release signature; keyring file not available %s" "$1" fi -- cgit v0.12