From b0c38d67e23c0fbbc0eb6264f81ed7594623cea5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 21 Feb 2008 20:52:37 +0100 Subject: Renaming LH_MIRROR_BOOTSTRAP* to LH_MIRROR_CHROOT and introducing dedicated LH_MIRROR_BOOTSTRAP for debootstrap/cdebootstrap only. --- functions/defaults.sh | 8 +++++--- helpers/lh_binary_debian-installer | 8 ++++---- helpers/lh_chroot_sources | 12 ++++++------ helpers/lh_config | 21 +++++++++++++++------ 4 files changed, 30 insertions(+), 19 deletions(-) diff --git a/functions/defaults.sh b/functions/defaults.sh index 177520f..2640d52 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -277,10 +277,12 @@ Set_defaults () esac fi + LH_MIRROR_CHROOT="${LH_MIRROR_CHROOT:-${LH_MIRROR_BOOTSTRAP}}" + # Setting security mirror to fetch packages from - if [ -z "${LH_MIRROR_BOOTSTRAP_SECURITY}" ] + if [ -z "${LH_MIRROR_CHROOT_SECURITY}" ] then - LH_MIRROR_BOOTSTRAP_SECURITY="http://security.debian.org/" + LH_MIRROR_CHROOT_SECURITY="http://security.debian.org/" fi # Setting mirror which ends up in the image @@ -462,7 +464,7 @@ Set_defaults () # LH_TASKS # Setting security updates option - if [ "${LH_MIRROR_BOOTSTRAP_SECURITY}" = "none" ] || [ "${LH_MIRROR_BINARY_SECURITY}" = "none" ] + if [ "${LH_MIRROR_CHROOT_SECURITY}" = "none" ] || [ "${LH_MIRROR_BINARY_SECURITY}" = "none" ] then LH_SECURITY="disabled" fi diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer index 79fe2c6..771bebe 100755 --- a/helpers/lh_binary_debian-installer +++ b/helpers/lh_binary_debian-installer @@ -212,7 +212,7 @@ then ;; esac else - URL="${LH_MIRROR_BOOTSTRAP}/dists/${LH_DISTRIBUTION}/main/installer-${LH_ARCHITECTURE}/current/images/" + URL="${LH_MIRROR_CHROOT}/dists/${LH_DISTRIBUTION}/main/installer-${LH_ARCHITECTURE}/current/images/" fi # Downloading debian-installer @@ -301,13 +301,13 @@ gzip -9 -c dists/${LH_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Packages > di cd "${OLDPWD}" # Fetching release -wget ${WGET_OPTIONS} "${LH_MIRROR_BOOTSTRAP}"/dists/"${LH_DISTRIBUTION}"/main/binary-"${LH_ARCHITECTURE}"/Release -O binary/dists/${LH_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Release +wget ${WGET_OPTIONS} "${LH_MIRROR_CHROOT}"/dists/"${LH_DISTRIBUTION}"/main/binary-"${LH_ARCHITECTURE}"/Release -O binary/dists/${LH_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Release mkdir binary.udeb cd binary.udeb # Downloading udeb indices -wget ${WGET_OPTIONS} "${LH_MIRROR_BOOTSTRAP}"/dists/"${LH_DISTRIBUTION}"/main/debian-installer/binary-"${LH_ARCHITECTURE}"/Packages.gz +wget ${WGET_OPTIONS} "${LH_MIRROR_CHROOT}"/dists/"${LH_DISTRIBUTION}"/main/debian-installer/binary-"${LH_ARCHITECTURE}"/Packages.gz gunzip -c Packages.gz > Packages # Sorting udebs @@ -322,7 +322,7 @@ do cp ../cache/packages_debian-installer.udeb/"$(basename ${UDEB})" ./ else # Downloading udebs - wget ${WGET_OPTIONS} "${LH_MIRROR_BOOTSTRAP}"/${UDEB} + wget ${WGET_OPTIONS} "${LH_MIRROR_CHROOT}"/${UDEB} fi done diff --git a/helpers/lh_chroot_sources b/helpers/lh_chroot_sources index 2b4e8a2..8e0dc98 100755 --- a/helpers/lh_chroot_sources +++ b/helpers/lh_chroot_sources @@ -50,22 +50,22 @@ case "${1}" in Create_lockfile .lock # Configure custom sources.list - echo "deb ${LH_MIRROR_BOOTSTRAP} ${LH_DISTRIBUTION} ${LH_SECTIONS}" > chroot/etc/apt/sources.list + echo "deb ${LH_MIRROR_CHROOT} ${LH_DISTRIBUTION} ${LH_SECTIONS}" > chroot/etc/apt/sources.list if [ "${LH_SOURCE}" = "enabled" ] then - echo "deb-src ${LH_MIRROR_BOOTSTRAP} ${LH_DISTRIBUTION} ${LH_SECTIONS}" >> chroot/etc/apt/sources.list + echo "deb-src ${LH_MIRROR_CHROOT} ${LH_DISTRIBUTION} ${LH_SECTIONS}" >> chroot/etc/apt/sources.list fi if [ "${LH_SECURITY}" = "enabled" ] then if [ "${LH_DISTRIBUTION}" != "sid" ] && [ "${LH_DISTRIBUTION}" != "unstable" ] then - echo "deb ${LH_MIRROR_BOOTSTRAP_SECURITY} ${LH_DISTRIBUTION}/updates ${LH_SECTIONS}" >> chroot/etc/apt/sources.list + echo "deb ${LH_MIRROR_CHROOT_SECURITY} ${LH_DISTRIBUTION}/updates ${LH_SECTIONS}" >> chroot/etc/apt/sources.list if [ "${LH_SOURCE}" = "enabled" ] then - echo "deb-src ${LH_MIRROR_BOOTSTRAP_SECURITY} ${LH_DISTRIBUTION}/updates ${LH_SECTIONS}" >> chroot/etc/apt/sources.list + echo "deb-src ${LH_MIRROR_CHROOT_SECURITY} ${LH_DISTRIBUTION}/updates ${LH_SECTIONS}" >> chroot/etc/apt/sources.list fi fi fi @@ -197,8 +197,8 @@ case "${1}" in if [ "${LH_BINARY_INDICES}" = "enabled" ] then # Don't do anything if it's not required - if [ "${LH_MIRROR_BOOTSTRAP}" = "${LH_MIRROR_BINARY}" ] && \ - [ "${LH_MIRROR_BOOTSTRAP_SECURITY}" = "${LH_MIRROR_BINARY_SECURITY}" ] + if [ "${LH_MIRROR_CHROOT}" = "${LH_MIRROR_BINARY}" ] && \ + [ "${LH_MIRROR_CHROOT_SECURITY}" = "${LH_MIRROR_BINARY_SECURITY}" ] then # Removing stage file rm -f .stage/chroot_sources diff --git a/helpers/lh_config b/helpers/lh_config index 2f2596a..bb5a7ac 100755 --- a/helpers/lh_config +++ b/helpers/lh_config @@ -317,8 +317,13 @@ Local_arguments () shift 2 ;; - --mirror-bootstrap-security) - LH_MIRROR_BOOTSTRAP_SECURITY="${2}" + --mirror-chroot) + LH_MIRROR_CHROOT="${2}" + shift 2 + ;; + + --mirror-chroot-security) + LH_MIRROR_CHROOT_SECURITY="${2}" shift 2 ;; @@ -819,13 +824,17 @@ LH_BOOTSTRAP_KEYRING="${LH_BOOTSTRAP_KEYRING}" # (Default: ${LH_DISTRIBUTION}) LH_DISTRIBUTION="${LH_DISTRIBUTION}" -# \$LH_MIRROR_BOOTSTRAP: set mirror to fetch packages from +# \$LH_MIRROR_BOOTSTRAP: set mirror to boostrap from # (Default: ${LH_MIRROR_BOOTSTRAP}) LH_MIRROR_BOOTSTRAP="${LH_MIRROR_BOOTSTRAP}" -# \$LH_MIRROR_BOOTSTRAP_SECURITY: set security mirror to fetch packages from -# (Default: ${LH_MIRROR_BOOTSTRAP_SECURITY}) -LH_MIRROR_BOOTSTRAP_SECURITY="${LH_MIRROR_BOOTSTRAP_SECURITY}" +# \$LH_MIRROR_CHROOT: set mirror to fetch packages from +# (Default: ${LH_MIRROR_CHROOT}) +LH_MIRROR_CHROOT="${LH_MIRROR_CHROOT}" + +# \$LH_MIRROR_CHROOT_SECURITY: set security mirror to fetch packages from +# (Default: ${LH_MIRROR_CHROOT_SECURITY}) +LH_MIRROR_CHROOT_SECURITY="${LH_MIRROR_CHROOT_SECURITY}" # \$LH_MIRROR_BINARY: set mirror which ends up in the image # (Default: ${LH_MIRROR_BINARY}) -- cgit v1.0