diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-29 16:25:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-29 16:25:16 +0000 |
commit | da4eedf2d372740f05ce8311df89858c6bc3211b (patch) | |
tree | 6d279dc067214075ed6f103c0873f4fc6400fbca | |
parent | Adding upstream version 20221223. (diff) | |
download | open-infrastructure-compute-tools-da4eedf2d372740f05ce8311df89858c6bc3211b.tar.xz open-infrastructure-compute-tools-da4eedf2d372740f05ce8311df89858c6bc3211b.zip |
Adding upstream version 20240829.upstream/20240829upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
63 files changed, 223 insertions, 103 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8dd6e3d..d6a189e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,22 @@ +2024-08-29 Daniel Baumann <daniel.baumann@open-infrastructure.net> + + * Releasing version 2024-08-29. + + [ Daniel Baumann ] + * Adding host variable for preseed files. + * Using versioned sort in container list. + * Completing container actions in container-rebuild manpage description, thanks to Hugo Hugo <hugo.klein@bfh.ch>. + * Workarounding issue with linebreaks and rst conversion in manpage example sections, thanks to Tom Jampen <tom@cryptography.ch>. + * Installing systemd unit files in /usr, thanks to Helmut Grohne <helmut@subdivi.de>. + * Avoid failing on networkctl reload with systemd >= 256 in container-start command. + * Correcting wrong systemd unit filename in host-setup, thanks to Jani Heikkinen <jani.heikkinen@bfh.ch>. + * Adding example preseeding for local archives. + * Switching from apt list files to sources files. + * Using signed-by for debian apt sources. + * Using signed-by for local apt sources. + * Also adding comment from local archives apt sources in apt preferences for consistency. + * Updating year in copyright notices for 2024. + 2022-12-23 Daniel Baumann <daniel.baumann@open-infrastructure.net> * Releasing version 20221023. @@ -142,8 +142,8 @@ install: build ln -sf stop $(DESTDIR)/usr/libexec/$(PROGRAM)/t ln -sf update $(DESTDIR)/usr/libexec/$(PROGRAM)/u - mkdir -p $(DESTDIR)/lib/systemd/system - cp -r share/systemd/* $(DESTDIR)/lib/systemd/system + mkdir -p $(DESTDIR)/usr/lib/systemd/system + cp -r share/systemd/* $(DESTDIR)/usr/lib/systemd/system mkdir -p $(DESTDIR)/var/log/$(SOFTWARE) diff --git a/VERSION.txt b/VERSION.txt index 7a58b9c..0b8bcef 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -20221223 +20240829 diff --git a/bin/container b/bin/container index fb52687..a8c9b9e 100755 --- a/bin/container +++ b/bin/container @@ -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/bin/container-shell b/bin/container-shell index d63c3c0..686720a 100755 --- a/bin/container-shell +++ b/bin/container-shell @@ -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/libexec/container/auto b/libexec/container/auto index 83c5c50..c1014dc 100755 --- a/libexec/container/auto +++ b/libexec/container/auto @@ -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/libexec/container/build b/libexec/container/build index 2c29730..d98d97e 100755 --- a/libexec/container/build +++ b/libexec/container/build @@ -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/libexec/container/console b/libexec/container/console index be2b897..534482a 100755 --- a/libexec/container/console +++ b/libexec/container/console @@ -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/libexec/container/enter b/libexec/container/enter index b366ba6..2220e5c 100755 --- a/libexec/container/enter +++ b/libexec/container/enter @@ -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/libexec/container/get b/libexec/container/get index 0d0f420..f25cbae 100755 --- a/libexec/container/get +++ b/libexec/container/get @@ -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/libexec/container/info b/libexec/container/info index b713e7a..7b968ae 100755 --- a/libexec/container/info +++ b/libexec/container/info @@ -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/libexec/container/key b/libexec/container/key index efd214e..3a73249 100755 --- a/libexec/container/key +++ b/libexec/container/key @@ -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/libexec/container/limit b/libexec/container/limit index b7f6e9b..2c9c77e 100755 --- a/libexec/container/limit +++ b/libexec/container/limit @@ -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/libexec/container/list b/libexec/container/list index a56c1f8..25dd7e0 100755 --- a/libexec/container/list +++ b/libexec/container/list @@ -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+ # @@ -327,7 +327,7 @@ esac if ls "${MACHINES}"/* > /dev/null 2>&1 then - CONTAINERS="$(cd "${MACHINES}" 2>/dev/null && find -maxdepth 1 \( -type d -or -type l \) -and -not -name 'lost+found' -printf '%P\n' | sort)" + CONTAINERS="$(cd "${MACHINES}" 2>/dev/null && find -maxdepth 1 \( -type d -or -type l \) -and -not -name 'lost+found' -printf '%P\n' | sort -V)" fi for CONTAINER in ${CONTAINERS} diff --git a/libexec/container/log b/libexec/container/log index b7a000d..e165cb0 100755 --- a/libexec/container/log +++ b/libexec/container/log @@ -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/libexec/container/move b/libexec/container/move index fdc19e6..b11d6a9 100755 --- a/libexec/container/move +++ b/libexec/container/move @@ -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/libexec/container/rebuild b/libexec/container/rebuild index e526520..0e7aa6b 100755 --- a/libexec/container/rebuild +++ b/libexec/container/rebuild @@ -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/libexec/container/remove b/libexec/container/remove index 4cb5d48..ae6ec1f 100755 --- a/libexec/container/remove +++ b/libexec/container/remove @@ -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/libexec/container/restart b/libexec/container/restart index 0eb753c..a671a40 100755 --- a/libexec/container/restart +++ b/libexec/container/restart @@ -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/libexec/container/run b/libexec/container/run index 4daeaa2..7cb7758 100755 --- a/libexec/container/run +++ b/libexec/container/run @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2014-2019 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/libexec/container/start b/libexec/container/start index 1f22325..5891485 100755 --- a/libexec/container/start +++ b/libexec/container/start @@ -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+ # @@ -422,7 +422,7 @@ Name=${INTERFACE} Bridge=${BRIDGE} EOF - networkctl reload + networkctl reload || true ;; esac else diff --git a/libexec/container/stop b/libexec/container/stop index 8ca98ce..b9751a0 100755 --- a/libexec/container/stop +++ b/libexec/container/stop @@ -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/libexec/container/top b/libexec/container/top index 268da9a..1d89a82 100755 --- a/libexec/container/top +++ b/libexec/container/top @@ -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/libexec/container/update b/libexec/container/update index e2d9c80..74e1cb4 100755 --- a/libexec/container/update +++ b/libexec/container/update @@ -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/libexec/container/version b/libexec/container/version index e580688..6f39418 100755 --- a/libexec/container/version +++ b/libexec/container/version @@ -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/bash-completion/container b/share/bash-completion/container index 5b57193..870e699 100644 --- a/share/bash-completion/container +++ b/share/bash-completion/container @@ -1,6 +1,6 @@ # Open Infrastructure: compute-tools -# 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 b/share/build-scripts/debconf index 900242d..2dd8cb7 100755 --- a/share/build-scripts/debconf +++ b/share/build-scripts/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+ # @@ -123,6 +123,8 @@ then exit 1 fi +HOST="$(echo ${NAME} | cut -d. -f1)" + Mount () { # Mounting rw bind mounts @@ -371,7 +373,7 @@ Bootstrap () INCLUDE="dbus" # apt repositories - INCLUDE="${INCLUDE},gnupg" + INCLUDE="${INCLUDE},gnupg,debian-archive-keyring" if ( echo "${MIRROR}" | grep -qs '^https' ) || \ ( echo "${PARENT_MIRROR}" | grep -qs '^https' ) @@ -488,15 +490,20 @@ Configure_apt () DIRECTORY="${1}" # Configure apt - rm -f "${DIRECTORY}/etc/apt/sources.list" + rm -f "${DIRECTORY}/etc/apt/sources.list" "${DIRECTORY}/etc/apt/sources.list.d/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 +cat > "${DIRECTORY}/etc/apt/sources.list.d/debian.sources" << EOF +# /etc/apt/sources.list.d/debian.sources -deb ${PARENT_MIRROR} ${PARENT_DIST} ${PARENT_AREA} +Types: deb +URIs: ${PARENT_MIRROR} +Suites: ${PARENT_DIST} +Components: ${PARENT_AREA} +PDiffs: no +Signed-By: /usr/share/keyrings/debian-archive-${PARENT_DIST}-stable.gpg EOF case "${MODE}" in @@ -569,46 +576,92 @@ Configure_system () echo "${NAME}" > "${DIRECTORY}/etc/hostname" # Configure apt - rm -f "${DIRECTORY}/etc/apt/sources.list" + rm -f "${DIRECTORY}/etc/apt/sources.list" "${DIRECTORY}/etc/apt/sources.list.d/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 +cat > "${DIRECTORY}/etc/apt/sources.list.d/debian.sources" << EOF +# /etc/apt/sources.list.d/debian.sources -deb ${PARENT_MIRROR} ${PARENT_DIST} ${PARENT_AREA} +Types: deb +URIs: ${PARENT_MIRROR} +Suites: ${PARENT_DIST} +Components: ${PARENT_AREA} +PDiffs: no +Signed-By: /usr/share/keyrings/debian-archive-${PARENT_DIST}-stable.gpg EOF + AUTOMATIC_SUITES="" + 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" + ${PARENT_DIST}-updates) + AUTOMATIC_SUITES="${AUTOMATIC_SUITES} ${PARENT_DIST}-updates" ;; - ${PARENT_DIST}-security) - echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DIST}-security ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list" + ${PARENT_DIST}-proposed-updates) + AUTOMATIC_SUITES="${AUTOMATIC_SUITES} ${PARENT_DIST}-proposed-updates" ;; - ${PARENT_DIST}-updates) - echo "deb ${PARENT_MIRROR} ${PARENT_DIST}-updates ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list" + ${PARENT_DIST}-backports) + AUTOMATIC_SUITES="${AUTOMATIC_SUITES} ${PARENT_DIST}-backports" ;; - ${PARENT_DIST}-backports) - echo "deb ${PARENT_MIRROR} ${PARENT_DIST}-backports ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list" + ${PARENT_DIST}-experimental) + AUTOMATIC_SUITES="${AUTOMATIC_SUITES} experimental" ;; + esac + done - ${PARENT_DIST}-proposed-updates) - echo "deb ${PARENT_MIRROR} ${PARENT_DIST}-proposed-updates ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list" + if [ -n "${AUTOMATIC_SUITES}" ] + then + AUTOMATIC_SUITES="$(echo ${AUTOMATIC_SUITES} | sed -e 's|^ ||')" + +cat >> "${DIRECTORY}/etc/apt/sources.list.d/debian.sources" << EOF + +Types: deb +URIs: ${PARENT_MIRROR} +Suites: ${AUTOMATIC_SUITES} +Components: ${PARENT_AREA} +PDiffs: no +Signed-By: /usr/share/keyrings/debian-archive-${PARENT_DIST}-automatic.gpg +EOF + + fi + + SECURITY_SUITES="" + + for PARENT_REPO in ${PARENT_ARCHIVES} + do + case "${PARENT_REPO}" in + buster-security) + SECURITY_SUITES="${SECURITY_SUITES} ${PARENT_DIST}/updates" ;; - experimental) - echo "deb ${PARENT_MIRROR} experimental ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list" + ${PARENT_DIST}-security) + SECURITY_SUITES="${SECURITY_SUITES} ${PARENT_DIST}-security" ;; esac done + if [ -n "${SECURITY_SUITES}" ] + then + SECURITY_SUITES="$(echo ${SECURITY_SUITES} | sed -e 's|^ ||')" + +cat >> "${DIRECTORY}/etc/apt/sources.list.d/debian.sources" << EOF + +Types: deb +URIs: ${PARENT_MIRROR_SECURITY} +Suites: ${PARENT_DIST}-security +Components: ${PARENT_AREA} +PDiffs: no +Signed-By: /usr/share/keyrings/debian-archive-${PARENT_DIST}-security-automatic.gpg +EOF + + fi + case "${MODE}" in progress-linux) @@ -634,18 +687,13 @@ EOF fi # Add local archives configured from preseed file - if ls "${DEBCONF_TMPDIR}/apt"/*.list > /dev/null 2>&1 + if ls "${DEBCONF_TMPDIR}/apt"/*.sources > /dev/null 2>&1 then - cp "${DEBCONF_TMPDIR}/apt"/*.list "${DIRECTORY}/etc/apt/sources.list.d" + cp "${DEBCONF_TMPDIR}/apt"/*.sources "${DIRECTORY}/etc/apt/sources.list.d" if ls "${DEBCONF_TMPDIR}/apt"/*.key > /dev/null 2>&1 then - for KEY in "${DEBCONF_TMPDIR}/apt"/*.key - do - cp "${KEY}" "${DIRECTORY}" - Chroot "${DIRECTORY}" "apt-key add $(basename ${KEY})" - rm -f "${DIRECTORY}/$(basename ${KEY})" - done + cp "${DEBCONF_TMPDIR}/apt"/*.key "${DIRECTORY}/etc/apt/keyrings" fi if ls "${DEBCONF_TMPDIR}/apt"/*.pref > /dev/null 2>&1 @@ -686,6 +734,7 @@ EOF sed -e "s|@FILE@|${FILE}|g" \ -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" \ @@ -1185,6 +1234,7 @@ trap 'Umount' EXIT HUP INT QUIT TERM umask 0022 export NAME +export HOST Debconf 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} diff --git a/share/build-scripts/debootstrap b/share/build-scripts/debootstrap index 5ab5db2..696c7b4 100755 --- a/share/build-scripts/debootstrap +++ b/share/build-scripts/debootstrap @@ -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/doc/examples/bookworm.cfg b/share/doc/examples/bookworm.cfg index 1f878f4..a618928 100644 --- a/share/doc/examples/bookworm.cfg +++ b/share/doc/examples/bookworm.cfg @@ -33,3 +33,12 @@ compute-tools container/root-password string debian compute-tools container/network1/bridge string bridge0 #compute-tools container/network-mac string + +#compute-tools container/archive1/repository string deb https://example.org/debian stable main +#compute-tools container/archive1/list string example +#compute-tools container/archive1/comment string This is the sources.list entry for the example repository +#compute-tools container/archive1/source boolean false +#compute-tools container/archive1/key string https://example.org/debian/key.txt +#compute-tools container/archive1/preferences-package string * +#compute-tools container/archive1/preferences-pin string release o=example, n=stable +#compute-tools container/archive1/preferences-pin-priority string 999 diff --git a/share/doc/examples/container-images.sh b/share/doc/examples/container-images.sh index b711048..50463bb 100755 --- a/share/doc/examples/container-images.sh +++ b/share/doc/examples/container-images.sh @@ -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/doc/host-setup.txt b/share/doc/host-setup.txt index 083e1aa..bf2963f 100644 --- a/share/doc/host-setup.txt +++ b/share/doc/host-setup.txt @@ -131,7 +131,7 @@ Kind=vlan Id=100 EOF -cat > /etc/systemd/network/vlan-100.netdev << EOF +cat > /etc/systemd/network/vlan-100.network << EOF [Match] Name=vlan-100 diff --git a/share/get-scripts/curl.d/0001-debconf b/share/get-scripts/curl.d/0001-debconf index 5c5936e..8cffb57 100755 --- a/share/get-scripts/curl.d/0001-debconf +++ b/share/get-scripts/curl.d/0001-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+ # diff --git a/share/man/Makefile b/share/man/Makefile index a878dbd..b55510e 100644 --- a/share/man/Makefile +++ b/share/man/Makefile @@ -1,6 +1,6 @@ # Open Infrastructure: compute-tools -# 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/man/container-auto.1.rst b/share/man/container-auto.1.rst index 68836eb..dd5d395 100644 --- a/share/man/container-auto.1.rst +++ b/share/man/container-auto.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-build-debconf.1.rst b/share/man/container-build-debconf.1.rst index 6543140..cc58f05 100644 --- a/share/man/container-build-debconf.1.rst +++ b/share/man/container-build-debconf.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-build-debootstrap.1.rst b/share/man/container-build-debootstrap.1.rst index 10538c5..c7568fa 100644 --- a/share/man/container-build-debootstrap.1.rst +++ b/share/man/container-build-debootstrap.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-build.1.rst b/share/man/container-build.1.rst index faa0e16..19e9359 100644 --- a/share/man/container-build.1.rst +++ b/share/man/container-build.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-console.1.rst b/share/man/container-console.1.rst index a3afd51..d07c6e3 100644 --- a/share/man/container-console.1.rst +++ b/share/man/container-console.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-enter.1.rst b/share/man/container-enter.1.rst index 65961f5..3da5ebb 100644 --- a/share/man/container-enter.1.rst +++ b/share/man/container-enter.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-get-curl.1.rst b/share/man/container-get-curl.1.rst index 01ae592..70a1e08 100644 --- a/share/man/container-get-curl.1.rst +++ b/share/man/container-get-curl.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-get.1.rst b/share/man/container-get.1.rst index 8ec61de..c93b728 100644 --- a/share/man/container-get.1.rst +++ b/share/man/container-get.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-info.1.rst b/share/man/container-info.1.rst index 99ccb55..1ec6ff5 100644 --- a/share/man/container-info.1.rst +++ b/share/man/container-info.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-key.1.rst b/share/man/container-key.1.rst index ff2b93f..5dce6a2 100644 --- a/share/man/container-key.1.rst +++ b/share/man/container-key.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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+ .. @@ -59,6 +59,7 @@ Examples Add a key to the keyring manually: gpg --keyserver hkps://keys.openpgp.org --recv 0x55CF1BF986ABB9C7 + gpg --armor --export 0x55CF1BF986ABB9C7 | sudo container key --add - Assisted adding of the same key: diff --git a/share/man/container-limit.1.rst b/share/man/container-limit.1.rst index 715314e..43001f1 100644 --- a/share/man/container-limit.1.rst +++ b/share/man/container-limit.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-list.1.rst b/share/man/container-list.1.rst index 81a394b..4195bbb 100644 --- a/share/man/container-list.1.rst +++ b/share/man/container-list.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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+ .. @@ -106,6 +106,7 @@ Create a SVG image via nwdiag of all started and stopped containers: Create a shell export of all started and stopped containers: sudo container list -f shell + sudo container list -f sh Create a YAML export of all started and stopped containers: diff --git a/share/man/container-log.1.rst b/share/man/container-log.1.rst index 5e72184..6218b93 100644 --- a/share/man/container-log.1.rst +++ b/share/man/container-log.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-move.1.rst b/share/man/container-move.1.rst index ecbea6b..50b146e 100644 --- a/share/man/container-move.1.rst +++ b/share/man/container-move.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-rebuild.1.rst b/share/man/container-rebuild.1.rst index 345ec01..4269e08 100644 --- a/share/man/container-rebuild.1.rst +++ b/share/man/container-rebuild.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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+ .. @@ -37,7 +37,7 @@ Synopsis Description =========== -The **container rebuild** command rebuilds a container by stopping, building, starting an existing container. +The **container rebuild** command rebuilds a container by stopping, removing, building, and starting an existing container. Options ======= diff --git a/share/man/container-remove.1.rst b/share/man/container-remove.1.rst index 00f1ad1..8cde6eb 100644 --- a/share/man/container-remove.1.rst +++ b/share/man/container-remove.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-restart.1.rst b/share/man/container-restart.1.rst index c52353d..4d9d17f 100644 --- a/share/man/container-restart.1.rst +++ b/share/man/container-restart.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-run.1.rst b/share/man/container-run.1.rst index 0fb923d..1165709 100644 --- a/share/man/container-run.1.rst +++ b/share/man/container-run.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-shell.1.rst b/share/man/container-shell.1.rst index b12958f..34497ea 100644 --- a/share/man/container-shell.1.rst +++ b/share/man/container-shell.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-start.1.rst b/share/man/container-start.1.rst index 65d4af7..bd2fbf0 100644 --- a/share/man/container-start.1.rst +++ b/share/man/container-start.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-status.1.rst b/share/man/container-status.1.rst index ad51ba7..30856bd 100644 --- a/share/man/container-status.1.rst +++ b/share/man/container-status.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-stop.1.rst b/share/man/container-stop.1.rst index bf668be..b9114b9 100644 --- a/share/man/container-stop.1.rst +++ b/share/man/container-stop.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-top.1.rst b/share/man/container-top.1.rst index 85b3627..4e97b15 100644 --- a/share/man/container-top.1.rst +++ b/share/man/container-top.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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+ .. @@ -50,6 +50,7 @@ Examples ======== Dynamically list containers of the local system: + sudo container top See also diff --git a/share/man/container-update.1.rst b/share/man/container-update.1.rst index ec64f6b..dc84316 100644 --- a/share/man/container-update.1.rst +++ b/share/man/container-update.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container-version.1.rst b/share/man/container-version.1.rst index 3f0266d..e7c3089 100644 --- a/share/man/container-version.1.rst +++ b/share/man/container-version.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/container.1.rst b/share/man/container.1.rst index c08cbd9..7b41f8e 100644 --- a/share/man/container.1.rst +++ b/share/man/container.1.rst @@ -1,6 +1,6 @@ .. Open Infrastructure: compute-tools -.. 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/man/man.in b/share/man/man.in index 45a5f40..5ac14df 100644 --- a/share/man/man.in +++ b/share/man/man.in @@ -1,6 +1,6 @@ .\" Open Infrastructure: compute-tools .\" -.\" 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+ .\" |