summaryrefslogtreecommitdiffstats
path: root/share/build-scripts/debconf.d/0003-debconf
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-29 16:25:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-29 16:25:16 +0000
commit05396fc59ee97ace1186077ffedf075ca33149bc (patch)
tree431fcf68a19b2c7de7d71759a71af34273254502 /share/build-scripts/debconf.d/0003-debconf
parentReleasing progress-linux version 20221223-6~progress7.99u1. (diff)
downloadopen-infrastructure-compute-tools-05396fc59ee97ace1186077ffedf075ca33149bc.tar.xz
open-infrastructure-compute-tools-05396fc59ee97ace1186077ffedf075ca33149bc.zip
Merging upstream version 20240829.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/build-scripts/debconf.d/0003-debconf')
-rwxr-xr-xshare/build-scripts/debconf.d/0003-debconf58
1 files changed, 48 insertions, 10 deletions
diff --git a/share/build-scripts/debconf.d/0003-debconf b/share/build-scripts/debconf.d/0003-debconf
index e12e25e..b5b252b 100755
--- a/share/build-scripts/debconf.d/0003-debconf
+++ b/share/build-scripts/debconf.d/0003-debconf
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2024 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -664,12 +664,16 @@ Local_archives ()
do
mkdir -p "${DEBCONF_TMPDIR}/apt"
- REPOSITORY="${RET#deb }"
+ REPOSITORY="$(echo "${RET}" | sed -e 's|^deb ||')"
- LIST="archive${NUMBER}.list"
+ MIRROR="$(echo ${REPOSITORY} | cut -d' ' -f1)"
+ SUITES="$(echo ${REPOSITORY} | cut -d' ' -f2)"
+ AREAS="$(echo ${REPOSITORY} | cut -d' ' -f3-)"
+
+ LIST="archive${NUMBER}.sources"
if db_get container/archive${NUMBER}/list
then
- LIST="$(basename ${RET} .list).list"
+ LIST="$(basename ${RET} .sources).sources"
fi
COMMENT=""
@@ -677,14 +681,18 @@ Local_archives ()
then
COMMENT="${RET}"
- echo "# ${COMMENT}" > "${DEBCONF_TMPDIR}/apt/${LIST}"
- fi
+cat > "${DEBCONF_TMPDIR}/apt/${LIST}" << EOF
+# ${COMMENT}
- echo "deb ${REPOSITORY}" >> "${DEBCONF_TMPDIR}/apt/${LIST}"
+EOF
+
+ fi
if db_get container/archive${NUMBER}/source && [ "$RET" = true ]
then
- echo "deb-src ${REPOSITORY}" >> "${DEBCONF_TMPDIR}/apt/${LIST}"
+ TYPES="deb deb-src"
+ else
+ TYPES="deb"
fi
KEY=""
@@ -692,7 +700,28 @@ Local_archives ()
then
KEY="${RET}"
- wget -q "${KEY}" -O "${DEBCONF_TMPDIR}/apt/$(basename ${LIST} .list).key"
+ wget -q "${KEY}" -O "${DEBCONF_TMPDIR}/apt/$(basename ${LIST} .sources).key"
+
+ SIGNED="/etc/apt/keyrings/$(basename ${LIST} .sources).key"
+ else
+ SIGNED=""
+ fi
+
+cat > "${DEBCONF_TMPDIR}/apt/${LIST}" << EOF
+Types: deb
+URIs: ${MIRROR}
+Suites: ${SUITES}
+Components: ${AREAS}
+PDiffs: no
+EOF
+
+ if [ -n "${SIGNED}" ]
+ then
+
+cat >> "${DEBCONF_TMPDIR}/apt/${LIST}" << EOF
+Signed-By: ${SIGNED}
+EOF
+
fi
PREFERENCES_PACKAGE=""
@@ -714,8 +743,17 @@ Local_archives ()
if [ -n "${PREFERENCES_PACKAGE}" ] || [ -n "${PREFERENCES_PIN}" ] || [ -n "${PREFERENCES_PIN_PRIORITY}" ]
then
+ if [ -n "${COMMENT}" ]
+ then
+
+cat > "${DEBCONF_TMPDIR}/apt/$(basename ${LIST} .sources).pref" << EOF
+# ${COMMENT}
+
+EOF
+
+ fi
-cat > "${DEBCONF_TMPDIR}/apt/$(basename ${LIST} .list).pref" << EOF
+cat >> "${DEBCONF_TMPDIR}/apt/$(basename ${LIST} .sources).pref" << EOF
Package: ${PREFERENCES_PACKAGE}
Pin: ${PREFERENCES_PIN}
Pin-Priority: ${PREFERENCES_PIN_PRIORITY}