summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2019-02-26 03:02:54 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2019-02-26 03:12:31 +0000
commitdbec03e01fede945f9c339dcad47742508bb5a36 (patch)
tree77596e1ec4209171137e425f9f5f0a6a063a3f24
parentUsing apt instead of apt-get in container debconf create script. (diff)
downloadcompute-tools-dbec03e01fede945f9c339dcad47742508bb5a36.tar.xz
compute-tools-dbec03e01fede945f9c339dcad47742508bb5a36.zip
Removing progress-linux apt sources.list handling in container debconf create script by using the progress-linux package instead.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
-rwxr-xr-xshare/scripts/debconf107
1 files changed, 14 insertions, 93 deletions
diff --git a/share/scripts/debconf b/share/scripts/debconf
index 31f5bf2..ac59b75 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -280,67 +280,17 @@ Configure_apt ()
case "${MODE}" in
progress-linux)
- AREA="$(echo ${ARCHIVE_AREAS} | sed -e 's|,| |g')"
- DIST="$(echo ${DISTRIBUTION} | sed -e 's|-backports||')"
- echo "deb ${MIRROR} ${DIST} ${AREA}" > "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
-
- case "${DISTRIBUTION}" in
- *-backports)
- echo "deb ${MIRROR} ${DIST}-backports ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
- ;;
- esac
-
-cat > "${DIRECTORY}/etc/apt/preferences.d/progress-linux.pref" << EOF
-Package: *
-Pin: release n=${DIST}
-Pin-Priority: 999
-
-Package: *
-Pin: release n=${DIST}-security
-Pin-Priority: 999
-
-Package: *
-Pin: release n=${DIST}-updates
-Pin-Priority: 999
-
-Package: *
-Pin: release n=${DIST}-extras
-Pin-Priority: 999
-EOF
- case "${DISTRIBUTION}" in
- *-backports)
-
-cat >> "${DIRECTORY}/etc/apt/preferences.d/progress-linux.pref" << EOF
-
-Package: *
-Pin: release n=${DIST}-backports
-Pin-Priority: 999
-
-Package: *
-Pin: release n=${DIST}-backports-extras
-Pin-Priority: 999
+cat > "${DIRECTORY}/progress-linux.cfg" << EOF
+progress-linux progress-linux/archives multiselect ${ARCHIVES}
+progress-linux progress-linux/archive-areas multiselect $(echo ${ARCHIVE_AREAS} | sed -e 's|,| |g')
EOF
- ;;
+ Chroot "${DIRECTORY}" "debconf-set-selections progress-linux.cfg"
+ Chroot "${DIRECTORY}" "DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=criticial dpkg-reconfigure progress-linux"
- *)
+ rm -f "${DIRECTORY}/progress-linux.cfg"
-cat >> "${DIRECTORY}/etc/apt/preferences.d/progress-linux.pref" << EOF
-
-#Package: *
-#Pin: release n=${DIST}-backports
-#Pin-Priority: 999
-
-#Package: *
-#Pin: release n=${DIST}-backports-extras
-#Pin-Priority: 999
-EOF
-
- ;;
- esac
-
- Chroot "${DIRECTORY}" "apt-key add /usr/share/progress-linux/pgp-keys/apt.progress-linux.org.gpg"
Chroot "${DIRECTORY}" "apt update"
;;
esac
@@ -458,45 +408,16 @@ Configure_system ()
case "${MODE}" in
progress-linux)
- AREA="$(echo ${ARCHIVE_AREAS} | sed -e 's|,| |g')"
- DIST="$(echo ${DISTRIBUTION} | sed -e 's|-backports||')"
- echo "deb ${MIRROR} ${DIST} ${AREA}" > "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
+cat > "${DIRECTORY}/progress-linux.cfg" << EOF
+progress-linux progress-linux/archives multiselect ${ARCHIVES}
+progress-linux progress-linux/archive-areas multiselect $(echo ${ARCHIVE_AREAS} | sed -e 's|,| |g')
+EOF
- for REPO in ${ARCHIVES}
- do
- case "${REPO}" in
- ${DIST}-security)
- echo "deb ${MIRROR_SECURITY} ${DIST}-security ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
- ;;
-
- ${DIST}-updates)
- echo "deb ${MIRROR} ${DIST}-updates ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
- ;;
-
- ${DIST}-extras)
- if echo "${AREA}" | grep -qs non-free
- then
- echo "deb ${MIRROR} ${DIST}-extras ${AREA} restricted" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
- else
- echo "deb ${MIRROR} ${DIST}-extras ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
- fi
- ;;
-
- ${DIST}-backports)
- echo "deb ${MIRROR} ${DIST}-backports ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
- ;;
-
- ${DIST}-backports-extras)
- if echo "${AREA}" | grep -qs non-free
- then
- echo "deb ${MIRROR} ${DIST}-backports-extras ${AREA} restricted" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
- else
- echo "deb ${MIRROR} ${DIST}-backports-extras ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
- fi
- ;;
- esac
- done
+ Chroot "${DIRECTORY}" "debconf-set-selections progress-linux.cfg"
+ Chroot "${DIRECTORY}" "DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=criticial dpkg-reconfigure progress-linux"
+
+ rm -f "${DIRECTORY}/progress-linux.cfg"
;;
esac