summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2018-08-30 13:04:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2018-08-30 13:05:23 +0000
commit4eb8ddfe43f70976d7934a108527124d080b3f4e (patch)
treed2b599d5b03e4a343bacf7565ae035a099549adc
parentReleasing debian version 20180527-1. (diff)
downloadopen-infrastructure-compute-tools-4eb8ddfe43f70976d7934a108527124d080b3f4e.tar.xz
open-infrastructure-compute-tools-4eb8ddfe43f70976d7934a108527124d080b3f4e.zip
Merging upstream version 20180825.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--CHANGELOG.txt11
-rw-r--r--VERSION.txt2
-rwxr-xr-xlib/container/list2
-rwxr-xr-xlib/container/start12
-rw-r--r--share/man/container.1.txt3
-rwxr-xr-xshare/scripts/debconf31
-rwxr-xr-xshare/scripts/debconf.d/0003-debconf44
7 files changed, 85 insertions, 20 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index e18df83..f05dd24 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,14 @@
+2018-08-25 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20180825.
+
+ [ Daniel Baumann ]
+ * Dropping untested arm64 specific settings in container start command.
+ * Also allowing symlinks for containers, requires systemd 233 or newer (see #805785).
+ * Adding reference to /var/cache/container-tools to container manpage.
+ * Adding support for multiple container and host commands in debconf container create script.
+ * Removing bind mounting of /var/cache/apt/archives during creation of the container, not really usefull anymore these days.
+
2018-05-27 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20180527.
diff --git a/VERSION.txt b/VERSION.txt
index 3d0e1cf..c6c53c0 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-20180527
+20180825
diff --git a/lib/container/list b/lib/container/list
index 6fa9eed..816d521 100755
--- a/lib/container/list
+++ b/lib/container/list
@@ -322,7 +322,7 @@ esac
if ls "${MACHINES}"/* > /dev/null 2>&1
then
- CONTAINERS="$(cd "${MACHINES}" 2>/dev/null && find -maxdepth 1 -type d -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)"
fi
for CONTAINER in ${CONTAINERS}
diff --git a/lib/container/start b/lib/container/start
index 62fb926..ac0275e 100755
--- a/lib/container/start
+++ b/lib/container/start
@@ -161,18 +161,6 @@ case "${HOST_ARCHITECTURE}" in
;;
esac
;;
-
- arm64)
- case "${MACHINE_ARCHITECTURE}" in
- armel|armhf)
- SETARCH="setarch armv7l"
- ;;
-
- *)
- SETARCH=""
- ;;
- esac
- ;;
esac
case "${START}" in
diff --git a/share/man/container.1.txt b/share/man/container.1.txt
index 5cc83f2..0473958 100644
--- a/share/man/container.1.txt
+++ b/share/man/container.1.txt
@@ -117,6 +117,9 @@ The following files are used:
*/usr/share/doc/container-tools*::
Container documentation files.
+*/var/cache/container-tools*::
+ Container cache directory.
+
*/var/lib/machines*::
Container root directory.
diff --git a/share/scripts/debconf b/share/scripts/debconf
index 77a974a..5325c11 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -155,9 +155,6 @@ Upgrade_system ()
mount -o bind /proc "${DIRECTORY}/proc"
mount -o bind /sys "${DIRECTORY}/sys"
- # Bind mount systems apt cache
- mount -o bind /var/cache/apt/archives "${DIRECTORY}/var/cache/apt/archives"
-
# Disable dpkg syncing
cat > "${DIRECTORY}/etc/dpkg/dpkg.cfg.d/container-tools" << EOF
@@ -182,9 +179,6 @@ EOF
# Install systemd support packages
Chroot "${DIRECTORY}" "apt-get --yes install dbus libpam-systemd systemd-sysv"
- # Unmount systems apt cache
- umount "${DIRECTORY}/var/cache/apt/archives"
-
Chroot "${DIRECTORY}" "apt-get clean"
}
@@ -740,6 +734,18 @@ EOF
rm -f "${DIRECTORY}/.container-command"
fi
+
+ for NUMBER in $(seq 1 ${CONTAINER_COMMAND_NUMBER})
+ do
+ eval COMMAND="$`echo CONTAINER_COMMAND${NUMBER}`"
+
+ echo "${COMMAND}" > "${DIRECTORY}/.container-command"
+
+ chmod 0755 "${DIRECTORY}/.container-command"
+ Chroot "${DIRECTORY}" "sh /.container-command"
+
+ rm -f "${DIRECTORY}/.container-command"
+ done
}
Configure_network ()
@@ -988,6 +994,19 @@ Commands ()
rm -f "${DIRECTORY}/.host-command"
fi
+ for NUMBER in $(seq 1 ${HOST_COMMAND_NUMBER})
+ do
+ eval COMMAND="$`echo HOST_COMMAND${NUMBER}`"
+
+ echo "${COMMAND}" > "${DIRECTORY}/.host-command"
+
+ cd "${DIRECTORY}"
+ sh "${DIRECTORY}/.host-command"
+ cd "${OLDPWD}"
+
+ rm -f "${DIRECTORY}/.host-command"
+ done
+
# Show root password in case its automatically set
case "${ROOT_RANDOM_PASSWORD}" in
true)
diff --git a/share/scripts/debconf.d/0003-debconf b/share/scripts/debconf.d/0003-debconf
index cb9ae2a..1d04adc 100755
--- a/share/scripts/debconf.d/0003-debconf
+++ b/share/scripts/debconf.d/0003-debconf
@@ -1025,6 +1025,28 @@ Internal_options ()
echo "CONTAINER_COMMAND=\"${CONTAINER_COMMAND}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ NUMBER="1"
+
+ while db_get cnt-debconf/container-command${NUMBER} && [ "${RET}" ]
+ do
+ if db_get cnt-debconf/container-command${NUMBER}
+ then
+ eval CONTAINER_COMMAND${NUMBER}="\"${RET}\"" # string (w/o empty)
+ fi
+
+ NUMBER="$((${NUMBER} + 1))"
+ done
+
+ CONTAINER_COMMAND_NUMBER="$((${NUMBER} - 1))"
+
+ echo "CONTAINER_COMMAND_NUMBER=\"${CONTAINER_COMMAND_NUMBER}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+
+ for NUMBER in $(seq 1 ${CONTAINER_COMMAND_NUMBER})
+ do
+ eval COMMAND="$`echo CONTAINER_COMMAND${NUMBER}`"
+ echo "CONTAINER_COMMAND${NUMBER}=\"${COMMAND}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ done
+
if db_get cnt-debconf/host-command
then
HOST_COMMAND="${RET}" # string (w/ empty)
@@ -1032,6 +1054,28 @@ Internal_options ()
echo "HOST_COMMAND=\"${HOST_COMMAND}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ NUMBER="1"
+
+ while db_get cnt-debconf/host-command${NUMBER} && [ "${RET}" ]
+ do
+ if db_get cnt-debconf/host-command${NUMBER}
+ then
+ eval HOST_COMMAND${NUMBER}="\"${RET}\"" # string (w/o empty)
+ fi
+
+ NUMBER="$((${NUMBER} + 1))"
+ done
+
+ HOST_COMMAND_NUMBER="$((${NUMBER} - 1))"
+
+ echo "HOST_COMMAND_NUMBER=\"${HOST_COMMAND_NUMBER}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+
+ for NUMBER in $(seq 1 ${HOST_COMMAND_NUMBER})
+ do
+ eval COMMAND="$`echo HOST_COMMAND${NUMBER}`"
+ echo "HOST_COMMAND${NUMBER}=\"${COMMAND}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ done
+
if db_get cnt-debconf/auto
then
CNT_AUTO="${RET:-true}" # string (w/o empty)