diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-04-11 13:52:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-04-11 13:53:02 +0000 |
commit | 9c47a33c9a0896eda85b22a1c0f16e96a27b6450 (patch) | |
tree | d91e6ec682020627be5653c4f3996f37b10da543 /share/scripts/debconf | |
parent | Releasing debian version 20210101-1. (diff) | |
download | open-infrastructure-compute-tools-9c47a33c9a0896eda85b22a1c0f16e96a27b6450.tar.xz open-infrastructure-compute-tools-9c47a33c9a0896eda85b22a1c0f16e96a27b6450.zip |
Merging upstream version 20210411.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | share/scripts/debconf | 60 | ||||
-rwxr-xr-x | share/scripts/debconf.d/0001-preseed-file | 7 | ||||
-rwxr-xr-x | share/scripts/debconf.d/0002-preseed-debconf | 2 | ||||
-rwxr-xr-x | share/scripts/debconf.d/0003-debconf | 16 |
4 files changed, 23 insertions, 62 deletions
diff --git a/share/scripts/debconf b/share/scripts/debconf index 7f2bf3d..1994926 100755 --- a/share/scripts/debconf +++ b/share/scripts/debconf @@ -15,20 +15,21 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" SOFTWARE="compute-tools" PROGRAM="container" -SCRIPT="${0}" -export SCRIPT -CONFIG="/etc/${PROJECT}/${PROGRAM}/config" -HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks" +CONFIG="/etc/${SOFTWARE}/config" +HOOKS="/etc/${SOFTWARE}/hooks" MACHINES="/var/lib/machines" +SCRIPT="${0}" +export SCRIPT + Parameters () { GETOPT_LONGOPTIONS="bind:,bind-ro:,script:,name:,preseed-file:" @@ -448,37 +449,6 @@ EOF rm -f "${DIRECTORY}/etc/mtab" ln -s /proc/self/mounts "${DIRECTORY}/etc/mtab" - # Temporary hack for dpkg - if [ -e "${DIRECTORY}/etc/dpkg/origins/default" ] - then - rm -f "${DIRECTORY}/etc/dpkg/origins/default" - Chroot "${DIRECTORY}" "dpkg-reconfigure base-files" - fi - - # Temporary hack for base-files - for FILE in motd.tail motd profile - do - if [ -e "${DIRECTORY}/usr/share/base-files/${FILE}" ] - then - rm -f "${DIRECTORY}/etc/${FILE}" - cp "${DIRECTORY}/usr/share/base-files/${FILE}" "${DIRECTORY}/etc" - fi - done - - # Temporary hack for readline - if [ -e "${DIRECTORY}/etc/inputrc" ] - then - rm -f "${DIRECTORY}/etc/inputrc" - cp "${DIRECTORY}/usr/share/readline/inputrc" "${DIRECTORY}/etc" - fi - - # Temporary hack for sysvinit - if [ -e "${DIRECTORY}/etc/inittab" ] - then - rm -f "${DIRECTORY}/etc/inittab" - cp "${DIRECTORY}/usr/share/sysvinit/inittab" "${DIRECTORY}/etc/inittab" - fi - # Removing resolv.conf rm -f "${DIRECTORY}/etc/resolv.conf" cp /etc/resolv.conf "${DIRECTORY}/etc" @@ -521,7 +491,7 @@ EOF echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DIST}/updates ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list" ;; - bullseye-security) + ${PARENT_DIST}-security) echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DIST}-security ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list" ;; @@ -674,16 +644,6 @@ EOF done fi - # Temporary hack for base-files (base-files gets upgraded, so run it second time) - for FILE in motd.tail motd profile - do - if [ -e "${DIRECTORY}/usr/share/base-files/${FILE}" ] - then - rm -f "${DIRECTORY}/etc/${FILE}" - cp "${DIRECTORY}/usr/share/base-files/${FILE}" "${DIRECTORY}/etc" - fi - done - if [ -n "${PACKAGES}" ] then Chroot "${DIRECTORY}" "apt --option Dpkg::Options::=--force-confnew --yes install ${PACKAGES}" @@ -1121,7 +1081,7 @@ do done # Run debconf parts -for DEBCONF_SCRIPT in "/usr/share/${PROJECT}/${PROGRAM}/scripts/debconf.d"/* +for DEBCONF_SCRIPT in "/usr/share/${SOFTWARE}/scripts/debconf.d"/* do if [ -x "${DEBCONF_SCRIPT}" ] then @@ -1132,7 +1092,7 @@ done # Read-in configuration from debconf . "${DEBCONF_TMPDIR}/debconf.default" -CACHE="/var/cache/${PROJECT}/${PROGRAM}/${MODE}" +CACHE="/var/cache/${PROGRAM}/${MODE}" SYSTEM="${MACHINES}/${NAME}" ## Generic parts @@ -1145,7 +1105,7 @@ then mv "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}.tmp" "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" fi -Upgrade_system "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" || echo "W: If upgrading the system failed, try removing the cache for your distribution in /var/cache/${PROJECT}/${PROGRAM}" +Upgrade_system "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" || echo "W: If upgrading the system failed, try removing the cache for your distribution in /var/cache/${PROGRAM}" Cleanup_system "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" ## Specific parts diff --git a/share/scripts/debconf.d/0001-preseed-file b/share/scripts/debconf.d/0001-preseed-file index 4fec6b0..d70e4e1 100755 --- a/share/scripts/debconf.d/0001-preseed-file +++ b/share/scripts/debconf.d/0001-preseed-file @@ -15,14 +15,15 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" -CONFIG="/etc/${PROJECT}/${PROGRAM}/debconf" +CONFIG="/etc/${SOFTWARE}/debconf" DEBCONF_NOWARNINGS="true" export DEBCONF_NOWARNINGS @@ -43,7 +44,7 @@ then elif [ "$(ls ${CONFIG}/*/${NAME}.cfg 2>/dev/null | wc -l)" -eq 1 ] then # user did not specify a pressed file, but there is 1 (and only 1) - # matching in a sub-directory of /etc/${PROJECT}/${PROGRAM}/debconf + # matching in a sub-directory of /etc/${SOFTWARE}/debconf FILE="$(ls ${CONFIG}/*/${NAME}.cfg)" diff --git a/share/scripts/debconf.d/0002-preseed-debconf b/share/scripts/debconf.d/0002-preseed-debconf index 9bc9fcf..4bc4da6 100755 --- a/share/scripts/debconf.d/0002-preseed-debconf +++ b/share/scripts/debconf.d/0002-preseed-debconf @@ -15,7 +15,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e diff --git a/share/scripts/debconf.d/0003-debconf b/share/scripts/debconf.d/0003-debconf index dda3821..c1c4e79 100755 --- a/share/scripts/debconf.d/0003-debconf +++ b/share/scripts/debconf.d/0003-debconf @@ -15,7 +15,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e @@ -53,15 +53,15 @@ Distribution () then case "${MODE}" in debian) - db_subst container/distribution CHOICES "Debian GNU/Linux 9 \"stretch\", Debian GNU/Linux 10 \"buster\", Debian GNU/Linux 11 \"bullseye\", Debian GNU/Linux unstable/sid" - db_subst container/distribution CHOICES_C "stretch, buster, bullseye, sid" + db_subst container/distribution CHOICES "Debian GNU/Linux 10 \"buster\", Debian GNU/Linux 11 \"bullseye\", Debian GNU/Linux testing/bookworm, Debian GNU/Linux unstable/sid" + db_subst container/distribution CHOICES_C "buster, bullseye, bookworm, sid" db_set container/distribution bullseye db_fset container/distribution seen false ;; progress-linux) - db_subst container/distribution CHOICES "Progress Linux 5 (engywuck), Progress Linux 5+ (engywuck-backports), Progress Linux 6 (fuchur), Progress Linux 6+ (fuchur-backports)" + db_subst container/distribution CHOICES "Progress Linux 5 (engywuck), Progress Linux 5.99 (engywuck-backports), Progress Linux 6 (fuchur), Progress Linux 6.99 (fuchur-backports)" db_subst container/distribution CHOICES_C "engywuck, engywuck-backports, fuchur, fuchur-backports" db_set container/distribution fuchur-backports @@ -352,7 +352,7 @@ Mirror_security () then case "${MODE}" in debian) - db_set container/mirror-security http://security.debian.org + db_set container/mirror-security https://security.debian.org db_fset container/mirror-security seen false ;; @@ -373,7 +373,7 @@ Mirror_security () then case "${MODE}" in debian) - MIRROR_SECURITY="http://security.debian.org" + MIRROR_SECURITY="https://security.debian.org" ;; *) @@ -445,7 +445,7 @@ Parent_mirror_security () then case "${MODE}" in progress-linux) - db_set container/parent-mirror-security http://security.debian.org + db_set container/parent-mirror-security https://security.debian.org db_fset container/parent-mirror-security seen false db_settitle container/title @@ -466,7 +466,7 @@ Parent_mirror_security () then case "${MODE}" in progress-linux) - PARENT_MIRROR_SECURITY="http://security.debian.org" + PARENT_MIRROR_SECURITY="https://security.debian.org" ;; *) |