summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatharina Drexel <katharina.drexel@bfh.ch>2021-04-12 12:35:24 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-05-01 16:17:45 +0000
commit9f8a2994c35e6ac6ce5ec0d43eb07effc86ffa2c (patch)
tree64176cd78b70dee10bee043845001dc747f6bdc0
parentPrefering mmdebstrap to debootstrap in debconf script. (diff)
downloadcompute-tools-9f8a2994c35e6ac6ce5ec0d43eb07effc86ffa2c.tar.xz
compute-tools-9f8a2994c35e6ac6ce5ec0d43eb07effc86ffa2c.zip
Replacing debian.list with debian.sources in debconf script based on a patch from Katharina Drexel <katharina.drexel@bfh.ch>.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
-rwxr-xr-xshare/scripts/debconf156
1 files changed, 141 insertions, 15 deletions
diff --git a/share/scripts/debconf b/share/scripts/debconf
index e8640fa..a9ddda1 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -420,16 +420,94 @@ Configure_apt ()
# Configure apt
rm -f "${DIRECTORY}/etc/apt/sources.list"
+ rm -f "${DIRECTORY}"/etc/apt/sources.list.d/[0-9]*debian.sources
PARENT_AREA="$(echo ${PARENT_ARCHIVE_AREAS} | sed -e 's|,| |g')"
PARENT_DIST="$(echo ${PARENT_DISTRIBUTION} | sed -e 's|-backports||')"
-cat > "${DIRECTORY}/etc/apt/sources.list.d/debian.list" << EOF
-# /etc/apt/sources.list.d/debian.list
+ for PARENT_REPO in ${PARENT_ARCHIVES}
+ do
+ case "${PARENT_REPO}" in
+ buster-security)
+ if [ -z "${SECURITY_SUITES}" ]
+ then
+ SECURITY_SUITES="${PARENT_DIST}/updates"
+ else
+ SECURITY_SUITES="${SECURITY_SUITES} ${PARENT_DIST}/updates"
+ fi
+ ;;
+
+ ${PARENT_DIST}-security)
+ if [ -z "${SECURITY_SUITES}" ]
+ then
+ SECURITY_SUITES="${PARENT_DIST}-security"
+ else
+ SECURITY_SUITES="${SECURITY_SUITES} ${PARENT_DIST}-security"
+ fi
+ ;;
+
+ ${PARENT_DIST}-updates)
+ if [ -z "${SUITES}" ]
+ then
+ SUITES="${PARENT_DIST}-updates"
+ else
+ SUITES="${SUITES} ${PARENT_DIST}-updates"
+ fi
+ ;;
+
+ ${PARENT_DIST}-backports)
+ if [ -z "${SUITES}" ]
+ then
+ SUITES="${PARENT_DIST}-backports"
+ else
+ SUITES="${SUITES} ${PARENT_DIST}-backports"
+ fi
+ ;;
+
+ ${PARENT_DIST}-proposed-updates)
+ if [ -z "${SUITES}" ]
+ then
+ SUITES="${PARENT_DIST}/-proposed-updates"
+ else
+ SUITES="${SUITES} ${PARENT_DIST}-proposed-updates"
+ fi
+ ;;
+
+ experimental)
+ if [ -z "${SUITES}" ]
+ then
+ SUITES="experimental"
+ else
+ SUITES="${SUITES} experimental"
+ fi
+ ;;
+ esac
+ done
-deb ${PARENT_MIRROR} ${PARENT_DIST} ${PARENT_AREA}
+cat > "${DIRECTORY}/etc/apt/sources.list.d/debian.sources" << EOF
+# /etc/apt/sources.list.d/debian.sources
+
+Types: deb
+URIs: ${PARENT_MIRROR}
+Suites: ${SUITES}
+Components: ${PARENT_AREA}
+PDiffs: no
EOF
+if [ -n "${SECURITY_SUITES}" ]
+then
+
+cat >> "${DIRECTORY}/etc/apt/sources.list.d/debian.sources" << EOF
+
+Types: deb
+URIs: ${PARENT_MIRROR_SECURITY}
+Suites: ${SECURITY_SUITES}
+Components: ${PARENT_AREA}
+PDiffs: no
+EOF
+
+fi
+
case "${MODE}" in
progress-linux)
@@ -498,41 +576,89 @@ Configure_system ()
PARENT_AREA="$(echo ${PARENT_ARCHIVE_AREAS} | sed -e 's|,| |g')"
PARENT_DIST="$(echo ${PARENT_DISTRIBUTION} | sed -e 's|-backports||')"
-cat > "${DIRECTORY}/etc/apt/sources.list.d/debian.list" << EOF
-# /etc/apt/sources.list.d/debian.list
-
-deb ${PARENT_MIRROR} ${PARENT_DIST} ${PARENT_AREA}
-EOF
-
for PARENT_REPO in ${PARENT_ARCHIVES}
do
case "${PARENT_REPO}" in
buster-security)
- echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DIST}/updates ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list"
+ if [ -z "${SECURITY_SUITES}" ]
+ then
+ SECURITY_SUITES="${PARENT_DIST}/updates"
+ else
+ SECURITY_SUITES="${SECURITY_SUITES} ${PARENT_DIST}/updates"
+ fi
;;
${PARENT_DIST}-security)
- echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DIST}-security ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list"
+ if [ -z "${SECURITY_SUITES}" ]
+ then
+ SECURITY_SUITES="${PARENT_DIST}-security"
+ else
+ SECURITY_SUITES="${SECURITY_SUITES} ${PARENT_DIST}-security"
+ fi
;;
${PARENT_DIST}-updates)
- echo "deb ${PARENT_MIRROR} ${PARENT_DIST}-updates ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list"
+ if [ -z "${SUITES}" ]
+ then
+ SUITES="${PARENT_DIST}-updates"
+ else
+ SUITES="${SUITES} ${PARENT_DIST}-updates"
+ fi
;;
${PARENT_DIST}-backports)
- echo "deb ${PARENT_MIRROR} ${PARENT_DIST}-backports ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list"
+ if [ -z "${SUITES}" ]
+ then
+ SUITES="${PARENT_DIST}-backports"
+ else
+ SUITES="${SUITES} ${PARENT_DIST}-backports"
+ fi
;;
${PARENT_DIST}-proposed-updates)
- echo "deb ${PARENT_MIRROR} ${PARENT_DIST}-proposed-updates ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list"
+ if [ -z "${SUITES}" ]
+ then
+ SUITES="${PARENT_DIST}/-proposed-updates"
+ else
+ SUITES="${SUITES} ${PARENT_DIST}-proposed-updates"
+ fi
;;
experimental)
- echo "deb ${PARENT_MIRROR} experimental ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list"
+ if [ -z "${SUITES}" ]
+ then
+ SUITES="experimental"
+ else
+ SUITES="${SUITES} experimental"
+ fi
;;
esac
done
+cat > "${DIRECTORY}/etc/apt/sources.list.d/debian.sources" << EOF
+# /etc/apt/sources.list.d/debian.sources
+
+Types: deb
+URIs: ${PARENT_MIRROR}
+Suites: ${SUITES}
+Components: ${PARENT_AREA}
+PDiffs: no
+EOF
+
+if [ -n "${SECURITY_SUITES}" ]
+then
+
+cat >> "${DIRECTORY}/etc/apt/sources.list.d/debian.sources" << EOF
+
+Types: deb
+URIs: ${PARENT_MIRROR_SECURITY}
+Suites: ${SECURITY_SUITES}
+Components: ${PARENT_AREA}
+PDiffs: no
+EOF
+
+fi
+
case "${MODE}" in
progress-linux)