diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2016-10-25 12:46:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2016-10-25 12:46:12 +0000 |
commit | 287f09fde0c3bfdf7956d23a9fff9f0848fd976a (patch) | |
tree | 721d08d25f9af733c203f381c0223d79ecca78aa /share | |
parent | Setting LC_ALL in container-shell. (diff) | |
download | compute-tools-287f09fde0c3bfdf7956d23a9fff9f0848fd976a.tar.xz compute-tools-287f09fde0c3bfdf7956d23a9fff9f0848fd976a.zip |
Switching from ftp.debian.org as default debian mirror to deb.debian.org in debconf script.
deb.debian.org offers https, see
https://lists.debian.org/debian-devel/2016/10/msg00281.html
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rw-r--r-- | share/doc/examples/cairon-backports.cfg | 2 | ||||
-rw-r--r-- | share/doc/examples/jessie.cfg | 2 | ||||
-rw-r--r-- | share/man/container-create-debootstrap.1.txt | 2 | ||||
-rwxr-xr-x | share/scripts/debconf | 14 | ||||
-rwxr-xr-x | share/scripts/debconf.d/0003-debconf | 8 | ||||
-rwxr-xr-x | share/scripts/debootstrap | 12 |
6 files changed, 28 insertions, 12 deletions
diff --git a/share/doc/examples/cairon-backports.cfg b/share/doc/examples/cairon-backports.cfg index 8243bbc..107b429 100644 --- a/share/doc/examples/cairon-backports.cfg +++ b/share/doc/examples/cairon-backports.cfg @@ -17,7 +17,7 @@ container-tools cnt-debconf/archives multiselect cairon-security, cairon-updates container-tools cnt-debconf/mirror string https://cdn.archive.progress-linux.org/packages container-tools cnt-debconf/mirror-security string https://cdn.archive.progress-linux.org/packages -container-tools cnt-debconf/parent-mirror string http://ftp.debian.org/debian +container-tools cnt-debconf/parent-mirror string https://deb.debian.org/debian container-tools cnt-debconf/parent-mirror-security string http://security.debian.org container-tools cnt-debconf/archive-areas multiselect main, contrib, non-free diff --git a/share/doc/examples/jessie.cfg b/share/doc/examples/jessie.cfg index 0ec33e6..8248437 100644 --- a/share/doc/examples/jessie.cfg +++ b/share/doc/examples/jessie.cfg @@ -14,7 +14,7 @@ container-tools cnt-debconf/architecture select auto container-tools cnt-debconf/archives multiselect jessie-security, jessie-updates #container-tools cnt-debconf/parent-archives multiselect -container-tools cnt-debconf/mirror string http://ftp.debian.org/debian +container-tools cnt-debconf/mirror string https://deb.debian.org/debian container-tools cnt-debconf/mirror-security string http://security.debian.org #container-tools cnt-debconf/parent-mirror string diff --git a/share/man/container-create-debootstrap.1.txt b/share/man/container-create-debootstrap.1.txt index 3377ea0..2298be6 100644 --- a/share/man/container-create-debootstrap.1.txt +++ b/share/man/container-create-debootstrap.1.txt @@ -57,7 +57,7 @@ The following script options are available: Specify the Debian distribution, defaults to jessie. *-m, --mirror='MIRROR'*:: - Specify the Debian mirror, defaults to http://ftp.debian.org/debian. + Specify the Debian mirror, defaults to https://deb.debian.org/debian. *-p, --root-password='PASSWORD'*:: Specify the root password, defaults to a random 16 character password. diff --git a/share/scripts/debconf b/share/scripts/debconf index ba73050..2b3563c 100755 --- a/share/scripts/debconf +++ b/share/scripts/debconf @@ -227,19 +227,27 @@ Debootstrap () { DIRECTORY="${1}" + INCLUDE="dbus" + + if echo "${MIRROR}" | grep -qs '^https' || \ + echo "{PARENT_MIRROR}" | grep -qs '^https' + then + INCLUDE="${INCLUDE},apt-transport-https,ca-certificates" + fi + # FIXME: trim down, debootstrap variants? case "${MODE}" in debian) - INCLUDE="--include=ifupdown,locales,libui-dialog-perl,dialog,isc-dhcp-client,netbase,net-tools,iproute,wget" + INCLUDE="${INCLUDE},ifupdown,locales,libui-dialog-perl,dialog,isc-dhcp-client,netbase,net-tools,iproute,wget" ;; progress-linux) - INCLUDE="--include=apt-transport-https,ca-certificates,apt-utils,ifupdown,locales-all,libui-dialog-perl,dialog,isc-dhcp-client,netbase,net-tools,iproute,openssh-server,wget" + INCLUDE="${INCLUDE},apt-utils,ifupdown,locales-all,libui-dialog-perl,dialog,isc-dhcp-client,netbase,net-tools,iproute,openssh-server,wget" ;; esac mkdir -p "$(dirname ${DIRECTORY})" - debootstrap --verbose --arch=${ARCHITECTURE} --components=${PARENT_ARCHIVE_AREAS} ${INCLUDE} \ + debootstrap --verbose --arch=${ARCHITECTURE} --components=${PARENT_ARCHIVE_AREAS} --include=${INCLUDE} \ ${PARENT_DISTRIBUTION} "${DIRECTORY}" ${PARENT_MIRROR} } diff --git a/share/scripts/debconf.d/0003-debconf b/share/scripts/debconf.d/0003-debconf index 548fb07..a63eec6 100755 --- a/share/scripts/debconf.d/0003-debconf +++ b/share/scripts/debconf.d/0003-debconf @@ -298,7 +298,7 @@ Mirror () then case "${MODE}" in debian) - db_set cnt-debconf/mirror http://ftp.debian.org/debian + db_set cnt-debconf/mirror https://deb.debian.org/debian db_fset cnt-debconf/mirror seen false ;; @@ -319,7 +319,7 @@ Mirror () then case "${MODE}" in debian) - MIRROR="http://ftp.debian.org/debian" + MIRROR="https://deb.debian.org/debian" ;; progress-linux) @@ -391,7 +391,7 @@ Parent_mirror () then case "${MODE}" in progress-linux) - db_set cnt-debconf/parent-mirror http://ftp.debian.org/debian + db_set cnt-debconf/parent-mirror https://deb.debian.org/debian db_fset cnt-debconf/parent-mirror seen false db_settitle cnt-debconf/title @@ -412,7 +412,7 @@ Parent_mirror () then case "${MODE}" in progress-linux) - PARENT_MIRROR="http://ftp.debian.org/debian" + PARENT_MIRROR="https://deb.debian.org/debian" ;; *) diff --git a/share/scripts/debootstrap b/share/scripts/debootstrap index de9e501..e8ccd77 100755 --- a/share/scripts/debootstrap +++ b/share/scripts/debootstrap @@ -126,12 +126,20 @@ fi ARCHITECTURE="${ARCHITECTURE:-$(dpkg --print-architecture)}" DISTRIBUTION="${DISTRIBUTION:-jessie}" -MIRROR="${MIRROR:-http://ftp.debian.org/debian}" +MIRROR="${MIRROR:-https://deb.debian.org/debian}" PASSWORD="${PASSWORD:-$(dd if=/dev/urandom bs=12 count=1 2> /dev/null | base64)}" +INCLUDE="dbus" + +case "${MIRROR}" in + https*) + INCLUDE="${INCLUDE},apt-transport-https,ca-certificates" + ;; +esac + mkdir -p "${MACHINES}" -debootstrap --arch=${ARCHITECTURE} --include=dbus ${DISTRIBUTION} ${MACHINES}/${NAME} ${MIRROR} +debootstrap --arch=${ARCHITECTURE} --include=${INCLUDE} ${DISTRIBUTION} ${MACHINES}/${NAME} ${MIRROR} chroot "${MACHINES}/${NAME}" apt-get clean # Setting hostname |