diff options
Diffstat (limited to '')
-rwxr-xr-x | share/build-scripts/debconf.d/0001-preseed-file | 2 | ||||
-rwxr-xr-x | share/build-scripts/debconf.d/0002-preseed-debconf | 3 | ||||
-rwxr-xr-x | share/build-scripts/debconf.d/0003-debconf | 58 |
3 files changed, 51 insertions, 12 deletions
diff --git a/share/build-scripts/debconf.d/0001-preseed-file b/share/build-scripts/debconf.d/0001-preseed-file index aa2c3c7..f2877c3 100755 --- a/share/build-scripts/debconf.d/0001-preseed-file +++ b/share/build-scripts/debconf.d/0001-preseed-file @@ -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+ # diff --git a/share/build-scripts/debconf.d/0002-preseed-debconf b/share/build-scripts/debconf.d/0002-preseed-debconf index fcb9006..3313173 100755 --- a/share/build-scripts/debconf.d/0002-preseed-debconf +++ b/share/build-scripts/debconf.d/0002-preseed-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+ # @@ -93,6 +93,7 @@ do fi sed -e "s|@NAME@|${NAME}|g" \ + -e "s|@HOST@|${HOST}|g" \ -e "s|@IPV4_ADDRESS1@|${IPV4_ADDRESS1}|g" \ -e "s|@IPV4_ADDRESS1_PART1@|${IPV4_ADDRESS1_PART1}|g" \ -e "s|@IPV4_ADDRESS1_PART2@|${IPV4_ADDRESS1_PART2}|g" \ 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} |