From: Frank Brehm Date: Fri, 29 Jan 2016 15:14:19 +0000 (+0100) Subject: Update of generation of Debian chroots X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=597a3ca93ee17b1e6d52714277de933b98ec8122;p=scripts%2Fdebian.git Update of generation of Debian chroots --- diff --git a/create-chroots b/create-chroots index 5ef2eb9..8ceab3c 100755 --- a/create-chroots +++ b/create-chroots @@ -100,15 +100,24 @@ CHROOT_INI_UBUNTU=$( cat <<-END ) SRC_LIST_DEBIAN=$( cat <<-END - deb http://repo.pb.local/debian {{distro}} main non-free contrib - deb http://repo.pb.local/debian {{distro}}-updates main non-free contrib - deb http://repo.pb.local/debian-security {{distro}}/updates main non-free contrib + deb http://ftp-stud.hs-esslingen.de/debian {{distro}} main non-free contrib + deb-src http://ftp-stud.hs-esslingen.de/debian {{distro}} main non-free contrib + + deb http://security.debian.org/ {{distro}}/updates main contrib non-free + deb-src http://security.debian.org/ {{distro}}/updates main contrib non-free + + # {{distro}}-updates, previously known as 'volatile' + deb http://ftp-stud.hs-esslingen.de/debian/ {{distro}}-updates main contrib non-free + deb-src http://ftp-stud.hs-esslingen.de/debian/ {{distro}}-updates main contrib non-free + END ) -PB_SRC_LIST_DEBIAN=$( cat <<-END - deb http://repo.pb.local/pb-debian {{distro}} main non-free contrib - deb http://repo.pb.local/pb-debian {{distro}}-proposed main non-free contrib +SRC_LIST_DEBIAN_BACKPORTS=$( cat <<-END + # jessie-backports, previously on backports.debian.org + deb http://ftp-stud.hs-esslingen.de/debian/ jessie-backports main contrib non-free + deb-src http://ftp-stud.hs-esslingen.de/debian/ jessie-backports main contrib non-free + END ) @@ -269,11 +278,10 @@ do_debian() { for distro in ${do_distros} ; do - local chroot="pb-${distro}" + local chroot="fb-${distro}" local path="${ROOT_PATH}/${chroot}" local ini_file="/etc/schroot/chroot.d/${chroot}" local sources_list="${path}/etc/apt/sources.list" - local pb_sources_list="${path}/etc/apt/sources.list.d/profitbricks.list" echo echo "--------------------------------------------------------------------------" @@ -293,25 +301,21 @@ do_debian() { -e "s/{{vendor}}/Debian/g" | \ ${SUDO} tee "${ini_file}" >/dev/null -# echo "Updating ${sources_list} ..." -# echo "${SRC_LIST_DEBIAN}" | \ -# sed -e "s/{{distro}}/${distro}/g" | \ -# ${SUDO} tee "${sources_list}" >/dev/null - -# echo "Updating ${pb_sources_list} ..." -# echo "${PB_SRC_LIST_DEBIAN}" | \ -# sed -e "s/{{distro}}/${distro}/g" | \ -# ${SUDO} tee "${pb_sources_list}" >/dev/null + echo "Updating ${sources_list} ..." + echo "${SRC_LIST_DEBIAN}" | \ + sed -e "s/{{distro}}/${distro}/g" | \ + ${SUDO} tee "${sources_list}" >/dev/null + echo "" | ${SUDO} tee -a "${sources_list}" >/dev/null + + if [[ "${distro}" != "stretch" ]] ; then + echo "Updating ${sources_list} for backports ..." + echo "${SRC_LIST_DEBIAN_BACKPORTS}" | \ + sed -e "s/{{distro}}/${distro}/g" | \ + ${SUDO} tee -a "${sources_list}" >/dev/null + echo "" | ${SUDO} tee -a "${sources_list}" >/dev/null + fi -# echo -# echo "Checking profitbricks keyring ..." -# if schroot -d / -u root -c source:${chroot} -- dpkg -s profitbricks-keyring >/dev/null 2>&1 ; then -# : -# else -# echo "Adding profitbricks keyring ..." -# schroot -d / -u root -c source:${chroot} -- apt-get update -# schroot -d / -u root -c source:${chroot} -- apt-get -y --allow-unauthenticated install profitbricks-keyring -# fi + schroot -c source:${chroot} -u root -d /root -- bash -c "apt-get update && apt-get clean" done