summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-07-26 03:57:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-07-26 03:57:11 +0000
commitf277567cc45fc61cfca8ba30d89813855440eb93 (patch)
tree2268932e0e1cb4bdd65cc17b1c3b0070d6db10d7
parentAdding upstream version 20210725. (diff)
downloadopen-infrastructure-compute-tools-upstream/20210726.tar.xz
open-infrastructure-compute-tools-upstream/20210726.zip
Adding upstream version 20210726.upstream/20210726
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--CHANGELOG.txt29
-rw-r--r--Makefile31
-rw-r--r--VERSION.txt2
-rwxr-xr-xbin/container4
-rwxr-xr-xlibexec/container/build284
-rwxr-xr-xlibexec/container/get (renamed from libexec/container/create)10
-rwxr-xr-xlibexec/container/key26
-rwxr-xr-xlibexec/container/list11
-rw-r--r--share/bash-completion/container66
-rwxr-xr-xshare/build-scripts/debconf (renamed from share/scripts/debconf)12
-rwxr-xr-xshare/build-scripts/debconf.d/0001-preseed-file (renamed from share/scripts/debconf.d/0001-preseed-file)0
-rw-r--r--share/build-scripts/debconf.d/0001-preseed-file.templates (renamed from share/scripts/debconf.d/0001-preseed-file.templates)2
-rwxr-xr-xshare/build-scripts/debconf.d/0002-preseed-debconf (renamed from share/scripts/debconf.d/0002-preseed-debconf)0
-rwxr-xr-xshare/build-scripts/debconf.d/0003-debconf (renamed from share/scripts/debconf.d/0003-debconf)0
-rw-r--r--share/build-scripts/debconf.d/0003-debconf.templates (renamed from share/scripts/debconf.d/0003-debconf.templates)0
-rwxr-xr-xshare/build-scripts/debootstrap (renamed from share/scripts/debootstrap)2
-rw-r--r--share/doc/examples/bullseye.cfg4
-rwxr-xr-xshare/doc/examples/container-images.sh26
-rw-r--r--share/doc/examples/fuchur-backports.cfg4
-rwxr-xr-xshare/get-scripts/curl (renamed from share/scripts/curl)24
-rwxr-xr-xshare/get-scripts/curl.d/0001-debconf (renamed from share/scripts/curl.d/0001-debconf)0
-rw-r--r--share/get-scripts/curl.d/0001-debconf.templates (renamed from share/scripts/curl.d/0001-debconf.templates)2
-rwxr-xr-xshare/hooks/pre-build.git-pull.sh (renamed from share/hooks/pre-create.git-pull.sh)0
-rwxr-xr-xshare/hooks/pre-get.git-pull.sh50
-rw-r--r--share/keys/daniel.baumann@open-infrastructure.net.pub14
-rw-r--r--share/keys/daniel@debian.org.pub52
-rw-r--r--share/man/compute-tools.7.rst4
-rw-r--r--share/man/container-auto.1.rst2
-rw-r--r--share/man/container-build-debconf.1.rst (renamed from share/man/container-create-debconf.1.rst)48
-rw-r--r--share/man/container-build-debootstrap.1.rst (renamed from share/man/container-create-debootstrap.1.rst)40
-rw-r--r--share/man/container-build.1.rst139
-rw-r--r--share/man/container-console.1.rst2
-rw-r--r--share/man/container-enter.1.rst2
-rw-r--r--share/man/container-get-curl.1.rst (renamed from share/man/container-create-curl.1.rst)38
-rw-r--r--share/man/container-get.1.rst (renamed from share/man/container-create.1.rst)54
-rw-r--r--share/man/container-info.1.rst6
-rw-r--r--share/man/container-key.1.rst31
-rw-r--r--share/man/container-limit.1.rst10
-rw-r--r--share/man/container-list.1.rst2
-rw-r--r--share/man/container-log.1.rst2
-rw-r--r--share/man/container-move.1.rst2
-rw-r--r--share/man/container-remove.1.rst2
-rw-r--r--share/man/container-restart.1.rst2
-rw-r--r--share/man/container-run.1.rst2
-rw-r--r--share/man/container-shell.1.rst2
-rw-r--r--share/man/container-start.1.rst2
-rw-r--r--share/man/container-status.1.rst2
-rw-r--r--share/man/container-stop.1.rst2
-rw-r--r--share/man/container-top.1.rst4
-rw-r--r--share/man/container-version.1.rst2
-rw-r--r--share/man/container.1.rst8
51 files changed, 851 insertions, 214 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 707ae56..9885e5a 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,28 @@
+2021-07-26 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20210726.
+
+ [ Daniel Baumann ]
+ * Harmonizing formating of default values in manpages.
+ * Harmonizing formating of URL in homepage section in manpages.
+ * Correcting spelling typos in documentation files.
+ * Adding reference to manpage in 'no such container command' error message.
+ * Adding check for writable gpg directory in container key command.
+ * Updating container-image example build script for current debian releases.
+ * Renaming container create command to container build.
+ * Making previous container curl create script a container get script.
+ * Adding container get command.
+ * Creating empty keyring directory in Makefile.
+ * Adding example public keys.
+ * Updating default keyserver for container key command.
+ * Updating example key in container key manpage examples.
+ * Adding sensible default lookups for container key bash-completion.
+ * Speeding up container list command by not gathering IP addresses for output format that don't need it.
+ * Speeding up container list command by optimizing IP address gathering.
+ * Support fetching remote keys from keyserver in container key command.
+ * Support fetching local keys from keyring library in container key command.
+ * Using sig instead of sign as gpg signature extension for container images.
+
2021-07-25 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20210725.
@@ -682,7 +707,7 @@
* Updating contact section in manpages.
* Harmonizing manpage markup.
* Adding --clean option to curl container create script to remove
- downloaded tarball from cache after successfull container creation.
+ downloaded tarball from cache after successful container creation.
* Changing cache directory in curl create script from
/var/cache/container-tools/curl to /var/cache/container-tools/images.
* Using https by default in container-images.sh example script.
@@ -879,7 +904,7 @@
* Silencing error message in container list command if machine directory
is not readable.
* Excluding container-tools and .container-tools in /var/lib/machines as
- special directories to allow all container-tools ressources to be
+ special directories to allow all container-tools resources to be
places on shared storage.
[ Andreas Kreuzer ]
diff --git a/Makefile b/Makefile
index 0cb6291..98dc791 100644
--- a/Makefile
+++ b/Makefile
@@ -72,6 +72,7 @@ install: build
mkdir -p $(DESTDIR)/etc/$(SOFTWARE)/config
mkdir -p $(DESTDIR)/etc/$(SOFTWARE)/debconf
mkdir -p $(DESTDIR)/etc/$(SOFTWARE)/hooks
+ mkdir -p $(DESTDIR)/etc/$(SOFTWARE)/keys
mkdir -p $(DESTDIR)/usr/bin
cp -r bin/* $(DESTDIR)/usr/bin
@@ -81,7 +82,7 @@ install: build
mkdir -p $(DESTDIR)/usr/share/$(SOFTWARE)
cp -r VERSION.txt $(DESTDIR)/usr/share/$(SOFTWARE)
- cp -r share/config share/hooks share/scripts $(DESTDIR)/usr/share/$(SOFTWARE)
+ cp -r share/config share/hooks share/keys share/build-scripts share/get-scripts $(DESTDIR)/usr/share/$(SOFTWARE)
mkdir -p $(DESTDIR)/usr/share/bash-completion/completions
cp -r share/bash-completion/* $(DESTDIR)/usr/share/bash-completion/completions
@@ -114,16 +115,17 @@ install: build
ln -sf container-shell.1 $(DESTDIR)/usr/share/man/man1/cntsh.1
ln -sf container $(DESTDIR)/usr/share/bash-completion/completions/cnt
- ln -sf debconf $(DESTDIR)/usr/share/$(SOFTWARE)/scripts/debian
- ln -sf debconf.d $(DESTDIR)/usr/share/$(SOFTWARE)/scripts/debian.d
- ln -sf container-create-debconf.1 $(DESTDIR)/usr/share/man/man1/container-create-debian.1
- ln -sf debconf $(DESTDIR)/usr/share/$(SOFTWARE)/scripts/progress-linux
- ln -sf debconf.d $(DESTDIR)/usr/share/$(SOFTWARE)/scripts/progress-linux.d
- ln -sf container-create-debconf.1 $(DESTDIR)/usr/share/man/man1/container-create-progress-linux.1
- ln -sf debootstrap $(DESTDIR)/usr/share/$(SOFTWARE)/scripts/mmdebstrap
- ln -sf container-create-debootstrap.1 $(DESTDIR)/usr/share/man/man1/container-create-mmdebstrap.1
-
- ln -sf create $(DESTDIR)/usr/libexec/$(PROGRAM)/cr
+ ln -sf debconf $(DESTDIR)/usr/share/$(SOFTWARE)/build-scripts/debian
+ ln -sf debconf.d $(DESTDIR)/usr/share/$(SOFTWARE)/build-scripts/debian.d
+ ln -sf container-build-debconf.1 $(DESTDIR)/usr/share/man/man1/container-build-debian.1
+ ln -sf debconf $(DESTDIR)/usr/share/$(SOFTWARE)/build-scripts/progress-linux
+ ln -sf debconf.d $(DESTDIR)/usr/share/$(SOFTWARE)/build-scripts/progress-linux.d
+ ln -sf container-build-debconf.1 $(DESTDIR)/usr/share/man/man1/container-build-progress-linux.1
+ ln -sf debootstrap $(DESTDIR)/usr/share/$(SOFTWARE)/build-scripts/mmdebstrap
+ ln -sf container-build-debootstrap.1 $(DESTDIR)/usr/share/man/man1/container-build-mmdebstrap.1
+
+ ln -sf build $(DESTDIR)/usr/libexec/$(PROGRAM)/b
+ ln -sf get $(DESTDIR)/usr/libexec/$(PROGRAM)/g
ln -sf list $(DESTDIR)/usr/libexec/$(PROGRAM)/ls
ln -sf move $(DESTDIR)/usr/libexec/$(PROGRAM)/mv
ln -sf remove $(DESTDIR)/usr/libexec/$(PROGRAM)/rm
@@ -159,9 +161,9 @@ uninstall:
rm -f $(DESTDIR)/usr/bin/cntsh
rm -f $(DESTDIR)/usr/share/man/man1/cntsh.1
rm -f $(DESTDIR)/usr/share/bash-completion/completions/cnt
- rm -f $(DESTDIR)/usr/share/man/man1/container-create-debian.1
- rm -f $(DESTDIR)/usr/share/man/man1/container-create-progress-linux.1
- rm -f $(DESTDIR)/usr/share/man/man1/container-create-mmdebstrap.1
+ rm -f $(DESTDIR)/usr/share/man/man1/container-build-debian.1
+ rm -f $(DESTDIR)/usr/share/man/man1/container-build-progress-linux.1
+ rm -f $(DESTDIR)/usr/share/man/man1/container-build-mmdebstrap.1
for FILE in share/sudo/*; \
do \
@@ -201,6 +203,7 @@ uninstall:
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(SOFTWARE)/config || true
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(SOFTWARE)/debconf || true
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(SOFTWARE)/hooks || true
+ rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(SOFTWARE)/keys || true
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(SOFTWARE) || true
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc || true
diff --git a/VERSION.txt b/VERSION.txt
index 16113c0..e8d397b 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-20210725
+20210726
diff --git a/bin/container b/bin/container
index 3e329c9..e284c23 100755
--- a/bin/container
+++ b/bin/container
@@ -46,7 +46,7 @@ for COMMAND in $(echo ${COMMANDS} | sed -e 's|,| |g')
do
if [ ! -e "/usr/libexec/${PROGRAM}/${COMMAND}" ]
then
- echo "'${COMMAND}': no such ${PROGRAM} command" >&2
+ echo "'${COMMAND}': no such ${PROGRAM} command, see container(1)." >&2
exit 1
fi
@@ -65,7 +65,7 @@ do
OPTIONS="$(echo "${OPTIONS}" | sed -e 's|--no-notification||')"
else
case "${COMMAND}" in
- create|cr|move|mv|remove|rm|restart|rt|start|s|stop|t)
+ build|b|move|mv|remove|rm|restart|rt|start|s|stop|t)
if [ -z "${CONTAINER_USER}" ]
then
CONTAINER_USER="${SUDO_USER:-${USER}}"
diff --git a/libexec/container/build b/libexec/container/build
new file mode 100755
index 0000000..b64af48
--- /dev/null
+++ b/libexec/container/build
@@ -0,0 +1,284 @@
+#!/bin/sh
+
+# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+#
+# SPDX-License-Identifier: GPL-3.0+
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# 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 <https://www.gnu.org/licenses/>.
+
+set -e
+
+PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
+PROGRAM="container"
+COMMAND="$(basename ${0})"
+
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
+MACHINES="/var/lib/machines"
+SCRIPTS="/usr/share/${SOFTWARE}/build-scripts"
+CONFIG_TEMPLATE="/usr/share/${SOFTWARE}/config/container.conf.in"
+
+Parameters ()
+{
+ GETOPT_LONGOPTIONS="name:,cnt.container-server:,cnt.overlay:,cnt.overlay-options:,start:,bind:,bind-ro:,capability:,drop-capability:,script:,verbose,"
+ GETOPT_OPTIONS="n:,b:,c:,d:,s:,v,"
+
+ PARAMETERS="$(getopt --longoptions ${GETOPT_LONGOPTIONS} --name=${COMMAND} --options ${GETOPT_OPTIONS} --shell sh -- ${@})"
+
+ if [ "${?}" != "0" ]
+ then
+ echo "'${COMMAND}': getopt exit" >&2
+ exit 1
+ fi
+
+ eval set -- "${PARAMETERS}"
+
+ while true
+ do
+ case "${1}" in
+ -n|--name)
+ NAME="${2}"
+ shift 2
+ ;;
+
+ --cnt.auto)
+ CNT_AUTO="${2}"
+ shift 2
+ ;;
+
+ --cnt.container-server)
+ CNT_CONTAINER_SERVER="${2}"
+ shift 2
+ ;;
+
+ --cnt.overlay)
+ CNT_OVERLAY="${2}"
+ shift 2
+ ;;
+
+ --cnt.overlay-options)
+ CNT_OVERLAY_OPTIONS="${2}"
+ shift 2
+ ;;
+
+ --cnt.start)
+ CNT_START="${2}"
+ shift 2
+ ;;
+
+ -b|--bind)
+ BIND="${2}"
+ shift 2
+ ;;
+
+ --bind-ro)
+ BIND_RO="${2}"
+ shift 2
+ ;;
+
+ -c|--capability)
+ CAPABILITY="${2}"
+ shift 2
+ ;;
+
+ -d|--drop-capability)
+ DROP_CAPABILITY="${2}"
+ shift 2
+ ;;
+
+ -s|--script)
+ SCRIPT="${2}"
+ shift 2
+ ;;
+
+ -v|--verbose)
+ VERBOSE="true"
+ shift 1
+ ;;
+
+ --)
+ shift 1
+ break
+ ;;
+
+ *)
+ echo "'${COMMAND}': getopt error" >&2
+ exit 1
+ ;;
+ esac
+ done
+}
+
+Usage ()
+{
+ echo "Usage: ${PROGRAM} ${COMMAND} -n|--name NAME [--cnt.container-server=true|false|FQDN] [--cnt.overlay=DIRECTORY_LOWER:DIRECTORY_UPPER:DIRECTORY_WORK:DIRECTORY_MERGED] [--cnt.overlay-options=OPTION[,OPTION]] [--cnt.start=OPTION[,OPTION]] [-b|--bind DIRECTORY:DIRECTORY[:OPTIONS]] [--bind-ro DIRECTORY:DIRECTORY[:OPTIONS]] [-c|--capability CAPABILITY[,CAPABILITY]] [-d|--drop-capability DROP_CAPABILITY[,DROP_CAPABILITY]] [-s|--script SCRIPT] [-v|--verbose] [-- SCRIPT_OPTIONS]" >&2
+ exit 1
+}
+
+Parameters "${@}"
+
+if [ -z "${NAME}" ]
+then
+ Usage
+fi
+
+case "${NAME}" in
+ ALL)
+ echo "'${NAME}': name 'ALL' is reserved to expand to all available container" >&2
+ exit 1
+ ;;
+esac
+
+if [ -e "${CONFIG}/${NAME}.conf" ]
+then
+ echo "'${NAME}': container already exists or ${CONFIG}/${NAME}.conf has not been removed" >&2
+ exit 1
+fi
+
+if [ -z "${SCRIPT}" ]
+then
+ if [ -e "${SCRIPTS}/default" ]
+ then
+ TARGET="$(basename $(readlink ${SCRIPTS}/default))"
+
+ case "${TARGET}" in
+ container_build-script)
+ TARGET="$(basename $(readlink /etc/alternatives/container_build-script))"
+ ;;
+ esac
+
+ if [ -e "${SCRIPTS}/${TARGET}" ]
+ then
+ SCRIPT="${TARGET}"
+ else
+ echo "default -> '${TARGET}': no such script" >&2
+ exit 1
+ fi
+ else
+ SCRIPT="debian"
+ fi
+else
+ if [ ! -e "${SCRIPTS}/${SCRIPT}" ]
+ then
+ echo "'${SCRIPT}': no such script" >&2
+ exit 1
+ fi
+fi
+
+case "${VERBOSE}" in
+ true)
+
+cat << EOF
+################################################################################
+Building container: ${NAME}
+################################################################################
+EOF
+
+ ;;
+esac
+
+CNT_CONTAINER_SERVER="${CNT_CONTAINER_SERVER:-$(hostname -f 2> /dev/null || hostname)}"
+
+# Pre hooks
+for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
+
+# Creating rw bind mounts
+if [ -n "${BIND}" ]
+then
+ BINDS="$(echo ${BIND} | sed -e 's|;| |g')"
+
+ for ENTRY in ${BINDS}
+ do
+ DIRECTORY="$(echo ${ENTRY} | awk -F: '{ print $1 }')"
+
+ mkdir -p "${DIRECTORY}"
+ done
+fi
+
+# Creating ro bind mounts
+if [ -n "${BIND_RO}" ]
+then
+ BINDS_RO="$(echo ${BIND_RO} | sed -e 's|;| |g')"
+
+ for ENTRY in ${BINDS_RO}
+ do
+ DIRECTORY="$(echo ${ENTRY} | awk -F: '{ print $1 }')"
+
+ mkdir -p "${DIRECTORY}"
+ done
+fi
+
+# Creating overlay mounts
+if [ -n "${CNT_OVERLAY}" ]
+then
+ CNT_OVERLAYS="$(echo ${CNT_OVERLAY} | sed -e 's|;| |g')"
+
+ for ENTRY in ${CNT_OVERLAYS}
+ do
+ DIRECTORY_LOWER="$(echo ${ENTRY} | awk -F: '{ print $1 }')"
+ DIRECTORY_UPPER="$(echo ${ENTRY} | awk -F: '{ print $2 }')"
+ DIRECTORY_WORK="$(echo ${ENTRY} | awk -F: '{ print $3 }')"
+ DIRECTORY_MERGED="$(echo ${ENTRY} | awk -F: '{ print $4 }')"
+
+ for DIRECTORY in "${DIRECTORY_LOWER}" "${DIRECTORY_UPPER}" "${DIRECTORY_WORK}" "${DIRECTORY_MERGED}"
+ do
+ mkdir -p "${DIRECTORY}"
+ done
+ done
+fi
+
+# config
+mkdir -p "${CONFIG}"
+
+sed -e "s|@CNT_AUTO@|${CNT_AUTO}|g" \
+ -e "s|@CNT_CONTAINER_SERVER@|${CNT_CONTAINER_SERVER}|g" \
+ -e "s|@CNT_NETWORK_BRIDGE@|${CNT_NETWORK_BRIDGE}|g" \
+ -e "s|@CNT_OVERLAY@|${CNT_OVERLAY}|g" \
+ -e "s|@CNT_OVERLAY_OPTIONS@|${CNT_OVERLAY_OPTIONS}|g" \
+ -e "s|@CNT_START@|${CNT_START}|g" \
+ -e "s|@NAME@|${NAME}|g" \
+ -e "s|@BIND@|${BIND}|g" \
+ -e "s|@BIND_RO@|${BIND_RO}|g" \
+ -e "s|@BOOT@|yes|g" \
+ -e "s|@CAPABILITY@|${CAPABILITY}|g" \
+ -e "s|@DIRECTORY@|${MACHINES}/${NAME}|g" \
+ -e "s|@DROP_CAPABILITY@|${DROP_CAPABILITY}|g" \
+ -e "s|@LINK_JOURNAL@|no|g" \
+ -e "s|@MACHINE@|${NAME}|g" \
+ -e "s|@NETWORK_VETH_EXTRA@|${NETWORK_VETH_EXTRA}|g" \
+ -e "s|@PRIVATE_USERS@|no|g" \
+ -e "s|@REGISTER@|yes|g" \
+"${CONFIG_TEMPLATE}" > "${CONFIG}/${NAME}.conf"
+
+# Run
+"${SCRIPTS}/${SCRIPT}" $(echo "${@}" | sed -e 's| -- | |')
+
+# Post hooks
+for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
+
+# done
+echo "'${NAME}': container built."
diff --git a/libexec/container/create b/libexec/container/get
index af85007..1005f89 100755
--- a/libexec/container/create
+++ b/libexec/container/get
@@ -27,7 +27,7 @@ COMMAND="$(basename ${0})"
CONFIG="/etc/${SOFTWARE}/config"
HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
-SCRIPTS="/usr/share/${SOFTWARE}/scripts"
+SCRIPTS="/usr/share/${SOFTWARE}/get-scripts"
CONFIG_TEMPLATE="/usr/share/${SOFTWARE}/config/container.conf.in"
Parameters ()
@@ -154,8 +154,8 @@ then
TARGET="$(basename $(readlink ${SCRIPTS}/default))"
case "${TARGET}" in
- container_script)
- TARGET="$(basename $(readlink /etc/alternatives/container_script))"
+ container_get-script)
+ TARGET="$(basename $(readlink /etc/alternatives/container_get-script))"
;;
esac
@@ -167,7 +167,7 @@ then
exit 1
fi
else
- SCRIPT="debian"
+ SCRIPT="curl"
fi
else
if [ ! -e "${SCRIPTS}/${SCRIPT}" ]
@@ -182,7 +182,7 @@ case "${VERBOSE}" in
cat << EOF
################################################################################
-Creating container: ${NAME}
+Building container: ${NAME}
################################################################################
EOF
diff --git a/libexec/container/key b/libexec/container/key
index 5f76fb2..19b7fa9 100755
--- a/libexec/container/key
+++ b/libexec/container/key
@@ -76,7 +76,7 @@ Parameters ()
Usage ()
{
- echo "Usage: ${PROGRAM} ${COMMAND} [-a|--add KEY] [-l|--list] [-r|--remove KEY]" >&2
+ echo "Usage: ${PROGRAM} ${COMMAND} [-a|--add KEY_FILE|KEY_ID] [-l|--list] [-r|--remove KEY|KEY_ID]" >&2
exit 1
}
@@ -87,6 +87,15 @@ then
Usage
fi
+if [ ! -w "${KEYS}" ]
+then
+ if [ "$(id -u)" -ne 0 ]
+ then
+ echo "'${COMMAND}': need root privileges (or write permissions to '${KEYS}')" >&2
+ exit 1
+ fi
+fi
+
# Pre hooks
for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"
do
@@ -105,7 +114,7 @@ then
chmod 0700 "${KEYS}"
cat > "${KEYS}/gnupg.conf" << EOF
-keyserver hkps://hkps.pool.sks-keyservers.net
+keyserver hkps://keys.openpgp.org
keyserver-options include-revoked
keyserver-options no-honor-keyserver-url
@@ -131,7 +140,18 @@ fi
case "${ACTION}" in
add)
- gpg --homedir "${KEYS}" --import "${ADD}"
+ if [ -e "${ADD}" ]
+ then
+ gpg --homedir "${KEYS}" --import "${ADD}"
+ elif [ -e "/usr/share/compute-tools/keys/${ADD}" ]
+ then
+ gpg --homedir "${KEYS}" --import "/usr/share/compute-tools/keys/${ADD}"
+ elif [ -e "/usr/share/compute-tools/keys/${ADD}.pub" ]
+ then
+ gpg --homedir "${KEYS}" --import "/usr/share/compute-tools/keys/${ADD}.pub"
+ else
+ gpg --homedir "${KEYS}" --recv "${ADD}"
+ fi
;;
list)
diff --git a/libexec/container/list b/libexec/container/list
index 3ef6e49..6567afb 100755
--- a/libexec/container/list
+++ b/libexec/container/list
@@ -368,7 +368,16 @@ do
case "${STATE}" in
started)
- ADDRESS="$(cnt run -n ${CONTAINER} -- hostname -I | sed -e 's|\r$||' | awk '{ print $1 }')"
+ case "${FORMAT}" in
+ shell|sh)
+ ;;
+
+ *)
+ LEADER="$(machinectl status ${CONTAINER} | awk '/Leader: / { print $2 }')"
+ ADDRESS="$(nsenter --all --target "${LEADER}" /bin/hostname -I | sed -e 's|\r$||' | awk '{ print $1 }')"
+ ;;
+ esac
+
ADDRESS="${ADDRESS:-none}"
;;
diff --git a/share/bash-completion/container b/share/bash-completion/container
index 2fb49aa..bb3eb41 100644
--- a/share/bash-completion/container
+++ b/share/bash-completion/container
@@ -43,54 +43,76 @@ _container()
return 0
;;
- console)
+ build|b)
case "${prev}" in
-n|--name)
- opts="$(container list -s -f shell)"
+ opts="$(cd /etc/compute-tools/debconf 2>/dev/null && ls *.cfg */*.cfg 2>/dev/null | sed -e 's|.*/||g' -e 's|.cfg$||g')"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+
+ -s|--script)
+ opts="$(cd /usr/share/compute-tools/build-scripts && find -maxdepth 1 -not -type d -and -not -name 'default' -and -not -name 'debconf' -and -not -name '*.d' -printf '%P\n' | sort)"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
*)
- opts="-n --name"
+ opts="-n --name -c --capability -d --drop-capability -s --script -v --verbose -b --bind --bind-ro"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
esac
;;
- create|cr)
+ console)
case "${prev}" in
-n|--name)
- opts="$(cd /etc/compute-tools/debconf 2>/dev/null && ls *.cfg */*.cfg 2>/dev/null | sed -e 's|.*/||g' -e 's|.cfg$||g')"
+ opts="$(container list -s -f shell)"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
- -s|--script)
- opts="$(cd /usr/share/compute-tools/scripts && find -maxdepth 1 -not -type d -and -not -name 'default' -and -not -name 'debconf' -and -not -name '*.d' -printf '%P\n' | sort)"
+ *)
+ opts="-n --name"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+ esac
+ ;;
+
+ enter|run)
+ case "${prev}" in
+ -n|--name)
+ opts="$(container list -s -f shell)"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
*)
- opts="-n --name -c --capability -d --drop-capability -s --script -v --verbose -b --bind --bind-ro"
+ opts="-n --name"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
esac
;;
- enter|run)
+ get|g)
case "${prev}" in
-n|--name)
- opts="$(container list -s -f shell)"
+ opts="$(cd /etc/compute-tools/debconf 2>/dev/null && ls *.cfg */*.cfg 2>/dev/null | sed -e 's|.*/||g' -e 's|.cfg$||g')"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+
+ -s|--script)
+ opts="$(cd /usr/share/compute-tools/get-scripts && find -maxdepth 1 -not -type d -and -not -name 'default' -and -not -name 'debconf' -and -not -name '*.d' -printf '%P\n' | sort)"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
*)
- opts="-n --name"
+ opts="-n --name -c --capability -d --drop-capability -s --script -v --verbose -b --bind --bind-ro"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
@@ -114,9 +136,25 @@ _container()
;;
key)
- opts="-a --add -l --list -r --remove"
- COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
- return 0
+ case "${prev}" in
+ -a|--add)
+ opts="$(cd /usr/share/compute-tools/keys 2>/dev/null && ls *.pub 2>/dev/null | sed -e 's|.*/||g' -e 's|.pub$||g')"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+
+ -r|--remove)
+ opts="$(gpg --homedir /etc/compute-tools/keys --list-keys | grep ^uid | sed -e 's|.*<||' -e 's|>||')"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+
+ *)
+ opts="-a --add -r --remove -l --list"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+ esac
;;
limit)
diff --git a/share/scripts/debconf b/share/build-scripts/debconf
index 86c871f..39856ae 100755
--- a/share/scripts/debconf
+++ b/share/build-scripts/debconf
@@ -23,13 +23,14 @@ PROJECT="open-infrastructure"
SOFTWARE="compute-tools"
PROGRAM="container"
+SCRIPT="${0}"
+export SCRIPT
+
+CACHE="/var/cache/${PROGRAM}/build-$(basename ${SCRIPT})"
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:"
@@ -98,7 +99,7 @@ Parameters ()
Usage ()
{
- echo "Usage: container create -n|--name NAME -s|--script ${SCRIPT} -- [-p|--preseed-file FILE]" >&2
+ echo "Usage: container build -n|--name NAME -s|--script ${SCRIPT} -- [-p|--preseed-file FILE]" >&2
exit 1
}
@@ -1105,7 +1106,7 @@ do
done
# Run debconf parts
-for DEBCONF_SCRIPT in "/usr/share/${SOFTWARE}/scripts/debconf.d"/*
+for DEBCONF_SCRIPT in "/usr/share/${SOFTWARE}/build-scripts/debconf.d"/*
do
if [ -x "${DEBCONF_SCRIPT}" ]
then
@@ -1116,7 +1117,6 @@ done
# Read-in configuration from debconf
. "${DEBCONF_TMPDIR}/debconf.default"
-CACHE="/var/cache/${PROGRAM}/${MODE}"
SYSTEM="${MACHINES}/${NAME}"
## Generic parts
diff --git a/share/scripts/debconf.d/0001-preseed-file b/share/build-scripts/debconf.d/0001-preseed-file
index d70e4e1..d70e4e1 100755
--- a/share/scripts/debconf.d/0001-preseed-file
+++ b/share/build-scripts/debconf.d/0001-preseed-file
diff --git a/share/scripts/debconf.d/0001-preseed-file.templates b/share/build-scripts/debconf.d/0001-preseed-file.templates
index 7e12e0d..9be825d 100644
--- a/share/scripts/debconf.d/0001-preseed-file.templates
+++ b/share/build-scripts/debconf.d/0001-preseed-file.templates
@@ -13,6 +13,6 @@ Type: string
Default:
Description: Enter (optional) preseed file to use:
A preseed file can be used to automatically answer questions to this
- container create script.
+ container build script.
.
If you do not want to use a preseed file, leave this question empty.
diff --git a/share/scripts/debconf.d/0002-preseed-debconf b/share/build-scripts/debconf.d/0002-preseed-debconf
index 4bc4da6..4bc4da6 100755
--- a/share/scripts/debconf.d/0002-preseed-debconf
+++ b/share/build-scripts/debconf.d/0002-preseed-debconf
diff --git a/share/scripts/debconf.d/0003-debconf b/share/build-scripts/debconf.d/0003-debconf
index c1c4e79..c1c4e79 100755
--- a/share/scripts/debconf.d/0003-debconf
+++ b/share/build-scripts/debconf.d/0003-debconf
diff --git a/share/scripts/debconf.d/0003-debconf.templates b/share/build-scripts/debconf.d/0003-debconf.templates
index 73952a8..73952a8 100644
--- a/share/scripts/debconf.d/0003-debconf.templates
+++ b/share/build-scripts/debconf.d/0003-debconf.templates
diff --git a/share/scripts/debootstrap b/share/build-scripts/debootstrap
index 9f5b6eb..4c047ee 100755
--- a/share/scripts/debootstrap
+++ b/share/build-scripts/debootstrap
@@ -111,7 +111,7 @@ Parameters ()
Usage ()
{
- echo "Usage: container create -n|--name NAME -s|--script ${SCRIPT} -- [-a|--architecture ARCHITECTURE] [-d|--distribution DISTRIBUTION] [-m|--mirror MIRROR] [-p|--password PASSWORD}" >&2
+ echo "Usage: container build -n|--name NAME -s|--script ${SCRIPT} -- [-a|--architecture ARCHITECTURE] [-d|--distribution DISTRIBUTION] [-m|--mirror MIRROR] [-p|--password PASSWORD}" >&2
exit 1
}
diff --git a/share/doc/examples/bullseye.cfg b/share/doc/examples/bullseye.cfg
index 044504e..4582c9f 100644
--- a/share/doc/examples/bullseye.cfg
+++ b/share/doc/examples/bullseye.cfg
@@ -1,5 +1,5 @@
-# example for automated Debian 11 (bullseye) based container creation
-# using: sudo container create -s debian
+# example for automated Debian 11 (bullseye) based container building
+# using: sudo container build -s debian
debconf debconf/priority select critical
debconf debconf/frontend select Noninteractive
diff --git a/share/doc/examples/container-images.sh b/share/doc/examples/container-images.sh
index ede68b5..e6947e3 100755
--- a/share/doc/examples/container-images.sh
+++ b/share/doc/examples/container-images.sh
@@ -17,14 +17,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# Description: example for automated Debian base system container image creation
-# Requires: debootstrap plzip xz-utils
-# Usage: sudo ./container-images.sh
+# Description: example for automated Debian base system container image builds
+# Requires: debootstrap plzip xz-utils sudo
+# Usage: ./container-images.sh
set -e
ARCHITECTURES="amd64 i386"
-DISTRIBUTIONS="jessie stretch buster sid"
+DISTRIBUTIONS="stretch buster bullseye sid"
MIRROR="https://deb.debian.org/debian"
INCLUDE="dbus"
@@ -77,29 +77,29 @@ do
;;
esac
- echo "Creating ${SYSTEM}.system.tar.${COMPRESSION}"
+ echo "Building ${SYSTEM}.system.tar.${COMPRESSION}"
sudo tar ${TAR_OPTIONS} -cf "${SYSTEM}.system.tar.${COMPRESSION}" "${SYSTEM}"
- echo "Creating ${SYSTEM}.system.tar.${COMPRESSION}.sha512"
+ echo "Building ${SYSTEM}.system.tar.${COMPRESSION}.sha512"
sha512sum "${SYSTEM}.system.tar.${COMPRESSION}" > "${SYSTEM}.system.tar.${COMPRESSION}.sha512"
if [ -n "${KEY}" ]
then
- echo "Creating ${SYSTEM}.system.tar.${COMPRESSION}.sign"
+ echo "Building ${SYSTEM}.system.tar.${COMPRESSION}.sig"
gpg -a -b --default-key ${KEY} ${SYSTEM}.system.tar.${COMPRESSION}
- mv "${SYSTEM}.system.tar.${COMPRESSION}.asc" "${SYSTEM}.system.tar.${COMPRESSION}.sign"
+ mv "${SYSTEM}.system.tar.${COMPRESSION}.asc" "${SYSTEM}.system.tar.${COMPRESSION}.sig"
fi
- echo "Creating ${SYSTEM}.system.tar.${COMPRESSION} symlink"
+ echo "Building ${SYSTEM}.system.tar.${COMPRESSION} symlink"
ln -sf "${SYSTEM}.system.tar.${COMPRESSION}" "$(echo ${SYSTEM}.system.tar.${COMPRESSION} | sed -e "s|${DATE}|current|")"
- echo "Creating ${SYSTEM}.system.tar.${COMPRESSION}.sha512 copy"
+ echo "Building ${SYSTEM}.system.tar.${COMPRESSION}.sha512 copy"
sed -e "s|${DATE}|current|" "${SYSTEM}.system.tar.${COMPRESSION}.sha512" > "$(echo ${SYSTEM}.system.tar.${COMPRESSION}.sha512 | sed -e "s|${DATE}|current|")"
- if [ -e "${SYSTEM}.system.tar.${COMPRESSION}.sign" ]
+ if [ -e "${SYSTEM}.system.tar.${COMPRESSION}.sig" ]
then
- echo "Creating ${SYSTEM}.system.tar.${COMPRESSION}.sign copy"
- cp "${SYSTEM}.system.tar.${COMPRESSION}.sign" "$(echo ${SYSTEM}.system.tar.${COMPRESSION}.sign | sed -e "s|${DATE}|current|")"
+ echo "Building ${SYSTEM}.system.tar.${COMPRESSION}.sig copy"
+ cp "${SYSTEM}.system.tar.${COMPRESSION}.sig" "$(echo ${SYSTEM}.system.tar.${COMPRESSION}.sig | sed -e "s|${DATE}|current|")"
fi
done
diff --git a/share/doc/examples/fuchur-backports.cfg b/share/doc/examples/fuchur-backports.cfg
index 20cd127..c02e776 100644
--- a/share/doc/examples/fuchur-backports.cfg
+++ b/share/doc/examples/fuchur-backports.cfg
@@ -1,5 +1,5 @@
-# example for automated Progress Linux 6.99 (fuchur-backports) container creation
-# using: sudo container create -s progress-linux
+# example for automated Progress Linux 6.99 (fuchur-backports) container building
+# using: sudo container build -s progress-linux
debconf debconf/priority select critical
debconf debconf/frontend select Noninteractive
diff --git a/share/scripts/curl b/share/get-scripts/curl
index 98c2b82..4accea2 100755
--- a/share/scripts/curl
+++ b/share/get-scripts/curl
@@ -23,13 +23,12 @@ PROJECT="open-infrastructure"
SOFTWARE="compute-tools"
PROGRAM="container"
+SCRIPT="${0}"
+export SCRIPT
+
HOOKS="/etc/${SOFTWARE}/hooks"
KEYS="/etc/${SOFTWARE}/keys"
MACHINES="/var/lib/machines"
-CACHE="/var/cache/${PROGRAM}/system"
-
-SCRIPT="${0}"
-export SCRIPT
Parameters ()
{
@@ -124,7 +123,7 @@ Parameters ()
Usage ()
{
- echo "Usage: container create -n|--name NAME -s|--script ${SCRIPT} -- [--clean] [-p|--password PASSWORD] [--server SERVER] [--setup SETUP] [--system SYSTEM]" >&2
+ echo "Usage: container get -n|--name NAME -s|--script ${SCRIPT} -- [--clean] [-p|--password PASSWORD] [--server SERVER] [--setup SETUP] [--system SYSTEM]" >&2
exit 1
}
@@ -178,11 +177,10 @@ fi
SERVER="${SERVER:-https://get.open-infrastructure.net/system/container/debian}"
PASSWORD="${PASSWORD:-$(dd if=/dev/urandom bs=12 count=1 2> /dev/null | base64)}"
+CACHE="/var/cache/${PROGRAM}/get-$(basename ${SCRIPT})/$(echo ${SERVER} | sed -e 's|.*//||' -e 's|/|_|g')"
VERSION="$(container version)"
-export SERVER
-
Debconf ()
{
# Configure local debconf
@@ -269,7 +267,7 @@ then
Debconf
# Run debconf parts
- for DEBCONF_SCRIPT in /usr/share/${SOFTWARE}/scripts/curl.d/*
+ for DEBCONF_SCRIPT in /usr/share/${SOFTWARE}/get-scripts/curl.d/*
do
if [ -x "${DEBCONF_SCRIPT}" ]
then
@@ -300,14 +298,14 @@ mkdir -p "${CACHE}"
SETUP="${SETUP:-$(echo ${SYSTEM} | sed -e 's|.system.tar.|.setup.tar.|')}"
-for FILE in "${SYSTEM}" "${SYSTEM}.sign" "${SYSTEM}.sha512" \
- "${SETUP}" "${SETUP}.sign" "${SETUP}.sha512"
+for FILE in "${SYSTEM}" "${SYSTEM}.sig" "${SYSTEM}.sha512" \
+ "${SETUP}" "${SETUP}.sig" "${SETUP}.sha512"
do
if curl --fail --head --output /dev/null --silent "${SERVER}/${FILE}"
then
case "${FILE}" in
*.sha512)
- if [ -e "${CACHE}/$(basename ${FILE} .sha512).sign" ]
+ if [ -e "${CACHE}/$(basename ${FILE} .sha512).sig" ]
then
continue
fi
@@ -336,12 +334,12 @@ do
continue
fi
- if [ -e "${FILE}.sign" ]
+ if [ -e "${FILE}.sig" ]
then
echo -n "Verifying ${FILE}:"
set +e
- gpg --homedir "${KEYS}" --verify "${FILE}.sign" "${FILE}" > /dev/null 2>&1
+ gpg --homedir "${KEYS}" --verify "${FILE}.sig" "${FILE}" > /dev/null 2>&1
GNUPG="${?}"
set -e
diff --git a/share/scripts/curl.d/0001-debconf b/share/get-scripts/curl.d/0001-debconf
index 083d469..083d469 100755
--- a/share/scripts/curl.d/0001-debconf
+++ b/share/get-scripts/curl.d/0001-debconf
diff --git a/share/scripts/curl.d/0001-debconf.templates b/share/get-scripts/curl.d/0001-debconf.templates
index c87e47e..c63994d 100644
--- a/share/scripts/curl.d/0001-debconf.templates
+++ b/share/get-scripts/curl.d/0001-debconf.templates
@@ -8,4 +8,4 @@ Default:
Choices-C: ${CHOICES_C}
Choices: ${CHOICES}
Description: Container list:
- Select the system to use for creating the container.
+ Select the system to use for downloading the container.
diff --git a/share/hooks/pre-create.git-pull.sh b/share/hooks/pre-build.git-pull.sh
index 744f955..744f955 100755
--- a/share/hooks/pre-create.git-pull.sh
+++ b/share/hooks/pre-build.git-pull.sh
diff --git a/share/hooks/pre-get.git-pull.sh b/share/hooks/pre-get.git-pull.sh
new file mode 100755
index 0000000..744f955
--- /dev/null
+++ b/share/hooks/pre-get.git-pull.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+#
+# SPDX-License-Identifier: GPL-3.0+
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# 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 <https://www.gnu.org/licenses/>.
+
+set -e
+
+PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
+PROGRAM="container"
+
+DIRECTORIES="$(for DIRECTORY in $(find /etc/${SOFTWARE}/debconf/ -type d -name ".git"); do echo $(dirname ${DIRECTORY}); done | sort -uV)"
+
+for DIRECTORY in ${DIRECTORIES}
+do
+ if [ -e "${DIRECTORY}/.git" ] && [ -e /usr/bin/git ]
+ then
+ echo "Updating ${DIRECTORY}..."
+
+ if [ -e "/etc/${SOFTWARE}.conf" ]
+ then
+ . "/etc/${SOFTWARE}.conf"
+ fi
+
+ DEBCONF_ID="${DEBCONF_ID:-HEAD}"
+
+ cd "${DIRECTORY}"
+
+ git clean -dfx
+ git checkout -f ${DEBCONF_ID}
+ git pull --rebase
+ echo
+
+ cd "${OLDPWD}"
+ fi
+done
diff --git a/share/keys/daniel.baumann@open-infrastructure.net.pub b/share/keys/daniel.baumann@open-infrastructure.net.pub
new file mode 100644
index 0000000..1e1884d
--- /dev/null
+++ b/share/keys/daniel.baumann@open-infrastructure.net.pub
@@ -0,0 +1,14 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mDMEXAKTMBYJKwYBBAHaRw8BAQdAqmmCJDP5dgZLR8JflHZa4QF86ahh9gW7/5bd
+HUkkrsS0N0RhbmllbCBCYXVtYW5uIDxkYW5pZWwuYmF1bWFubkBvcGVuLWluZnJh
+c3RydWN0dXJlLm5ldD6IkAQTFggAOBYhBIrjR8Yn591RIGv9hLYsYaELkxlfBQJc
+ApMwAhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJELYsYaELkxlf2NUBAPyZ
+GPLameJQ0qqdYhLW9fXqZgsnEEjndBJJWcCgpPolAQDfovZ1AsjVssTV9vcajOWw
+dNa6PGI/gWqoCCqsbK4GC7g4BFwCkzASCisGAQQBl1UBBQEBB0C0e0KJyQVQE8de
+THs48MotPKrefjhM0a22iziA8jWkXQMBCAeIeAQYFggAIBYhBIrjR8Yn591RIGv9
+hLYsYaELkxlfBQJcApMwAhsMAAoJELYsYaELkxlfMIwA/1JQ/fItM3rCfXb/yKIL
+5CNQ4UhrEY0YPHjhAAJAQ8bFAQDlQbUiVlqDVatOh+BIK6cPGjE+FYvuRArIuZHv
+rlmxCA==
+=Tn5F
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/share/keys/daniel@debian.org.pub b/share/keys/daniel@debian.org.pub
new file mode 100644
index 0000000..910f870
--- /dev/null
+++ b/share/keys/daniel@debian.org.pub
@@ -0,0 +1,52 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+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
+=aSin
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/share/man/compute-tools.7.rst b/share/man/compute-tools.7.rst
index b6405b2..3252f05 100644
--- a/share/man/compute-tools.7.rst
+++ b/share/man/compute-tools.7.rst
@@ -96,8 +96,8 @@ Linux' overlay filesystem
Usage
=====
-Create a new container:
- sudo container create -n NAME
+Build a new container:
+ sudo container build -n NAME
Start a container:
sudo container start -n NAME
diff --git a/share/man/container-auto.1.rst b/share/man/container-auto.1.rst
index fc588de..530d64c 100644
--- a/share/man/container-auto.1.rst
+++ b/share/man/container-auto.1.rst
@@ -73,7 +73,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-create-debconf.1.rst b/share/man/container-build-debconf.1.rst
index b135b46..1649071 100644
--- a/share/man/container-create-debconf.1.rst
+++ b/share/man/container-build-debconf.1.rst
@@ -17,13 +17,13 @@
.. You should have received a copy of the GNU General Public License
.. along with this program. If not, see <https://www.gnu.org/licenses/>.
-========================
-container-create-debconf
-========================
+=======================
+container-build-debconf
+=======================
-------------------------------------------------------
-Create an advanced Debian based container with debconf
-------------------------------------------------------
+-----------------------------------------------------
+Build an advanced Debian based container with debconf
+-----------------------------------------------------
:manual section: 1
:manual group: Open Infrastructure
@@ -31,32 +31,32 @@ Create an advanced Debian based container with debconf
Synopsis
========
-| **container create -s debconf** ['OPTIONS']
-| **cnt cr -s debconf** ['OPTIONS']
+| **container build -s debconf** ['OPTIONS']
+| **cnt b -s debconf** ['OPTIONS']
-| **container create -s debian** ['OPTIONS']
-| **cnt cr -s debian** ['OPTIONS']
+| **container build -s debian** ['OPTIONS']
+| **cnt b -s debian** ['OPTIONS']
-| **container create -s progress-linux** ['OPTIONS']
-| **cnt cr -s progress-linux** ['OPTIONS']
+| **container build -s progress-linux** ['OPTIONS']
+| **cnt b -s progress-linux** ['OPTIONS']
Description
===========
-The debconf container creation script uses debconf(1) to automatically create a
+The debconf container build script uses debconf(1) to automatically build a
Debian based container.
Scope
-----
-Note that this container creation script can do a few things more than just
+Note that this container build script can do a few things more than just
automatically debootstrap based on a preseed file. It also allows you to set a
root password, configure the network, install certain packages and execute
hooks.
But: this is *not* a replacement for a configuration management system (like
-ansible, puppet, etc.). The intenion of this script is to create the initial
-container to that extend that a configuration managment system can take over.
+ansible, puppet, etc.). The intenion of this script is to build the initial
+container to that extend that a configuration management system can take over.
As an analogy, think of debian-installer: d-i sets up your system to make it
ready to boot and connect to the network. Everything after that is out of scope.
@@ -76,7 +76,7 @@ system:
Modes
-----
-This container creation script can be used under two different names: debian and
+This container build script can be used under two different names: debian and
progress-linux.
Alternative, calling it under the debconf name is equal to the debian mode.
@@ -113,13 +113,13 @@ The following script options are available:
Examples
========
-Create a Debian based container:
+Build a Debian based container:
- sudo container create -s debian -n debian.example.net
+ sudo container build -s debian -n debian.example.net
-Create a Progress Linux container:
+Build a Progress Linux container:
- sudo container create -s progress-linux -n progress.example.net
+ sudo container build -s progress-linux -n progress.example.net
Files
=====
@@ -129,8 +129,8 @@ The following files are used:
/etc/compute-tools/config:
Container configuration files.
-/usr/share/compute-tools/scripts:
- Container creation scripts.
+/usr/share/compute-tools/build-scripts:
+ Container build scripts.
/usr/share/doc/compute-tools:
Container documentation.
@@ -154,7 +154,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-create-debootstrap.1.rst b/share/man/container-build-debootstrap.1.rst
index 29ef1b6..853b4dc 100644
--- a/share/man/container-create-debootstrap.1.rst
+++ b/share/man/container-build-debootstrap.1.rst
@@ -17,13 +17,13 @@
.. You should have received a copy of the GNU General Public License
.. along with this program. If not, see <https://www.gnu.org/licenses/>.
-============================
-container-create-debootstrap
-============================
+===========================
+container-build-debootstrap
+===========================
---------------------------------------------------------------------
-Create a basic Debian based container with debootstrap or mmdebstrap
---------------------------------------------------------------------
+-------------------------------------------------------------------
+Build a basic Debian based container with debootstrap or mmdebstrap
+-------------------------------------------------------------------
:manual section: 1
:manual group: Open Infrastructure
@@ -31,19 +31,19 @@ Create a basic Debian based container with debootstrap or mmdebstrap
Synopsis
========
-| **container create -s debootstrap** ['OPTIONS']
-| **cnt cr -s debootstrap** ['OPTIONS']
+| **container build -s debootstrap** ['OPTIONS']
+| **cnt b -s debootstrap** ['OPTIONS']
-| **container create -s mmdebstrap** ['OPTIONS']
-| **cnt cr -s mmdebstrap** ['OPTIONS']
+| **container build -s mmdebstrap** ['OPTIONS']
+| **cnt b -s mmdebstrap** ['OPTIONS']
Description
===========
-The debootstrap container creation script uses debootstrap(8) or mmdebstrap(1)
-to create a Debian based container.
+The debootstrap container build script uses debootstrap(8) or mmdebstrap(1)
+to build a Debian based container.
-This script creates a pure Debian system with three modificiations:
+This script builds a pure Debian system with three modificiations:
* apt cache of packages downloaded during debootstrap is cleaned
* hostname is set (container name) in /etc/hostname
@@ -61,10 +61,10 @@ The following script options are available:
Specify the Debian architecture, defaults to the host systems architecture.
-d, --distribution='DISTRIBUTION':
- Specify the Debian distribution, defaults to bullseye.
+ Specify the Debian distribution, defaults to 'bullseye'.
-m, --mirror='MIRROR':
- Specify the Debian mirror, defaults to https://deb.debian.org/debian.
+ Specify the Debian mirror, defaults to 'https://deb.debian.org/debian'.
-p, --root-password='PASSWORD':
Specify the root password, defaults to a random 16 character password.
@@ -72,15 +72,15 @@ The following script options are available:
Examples
========
-Create a Debian 11 (bullseye) based container with same architecture as the host
+Build a Debian 11 (bullseye) based container with same architecture as the host
system using debootstrap:
- sudo container create -s debootstrap -n bullseye.example.net
+ sudo container build -s debootstrap -n bullseye.example.net
-Create a Debian 11 (bullseye) based container with different architecture as the
+Build a Debian 11 (bullseye) based container with different architecture as the
host system using mmdebstrap:
- sudo container create -s mmdebstrap -n bullseye-i386.example.net -- -a i386
+ sudo container build -s mmdebstrap -n bullseye-i386.example.net -- -a i386
See also
========
@@ -92,7 +92,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-build.1.rst b/share/man/container-build.1.rst
new file mode 100644
index 0000000..38a4aed
--- /dev/null
+++ b/share/man/container-build.1.rst
@@ -0,0 +1,139 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+..
+.. SPDX-License-Identifier: GPL-3.0+
+..
+.. This program is free software: you can redistribute it and/or modify
+.. it under the terms of the GNU General Public License as published by
+.. the Free Software Foundation, either version 3 of the License, or
+.. (at your option) any later version.
+..
+.. This program is distributed in the hope that it will be useful,
+.. but WITHOUT ANY WARRANTY; without even the implied warranty of
+.. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.. 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 <https://www.gnu.org/licenses/>.
+
+===============
+container-build
+===============
+
+-----------------
+Build a container
+-----------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container build** ['OPTIONS']
+| **cnt b** ['OPTIONS']
+
+Description
+===========
+
+The **container build** command builds a container based on a script.
+
+Scripts
+-------
+
+The following build scripts are available:
+
+debootstrap:
+ Basic script to build Debian based container, see
+ container-build-debootstrap(1).
+
+debconf:
+ Advanced script to automatically build Debian based container, see
+ container-build-debconf(1).
+
+default:
+ Symlink (if existing) to a build script which is used if no script was
+ specified. On Debian based system this can be managed through
+ update-alternatives(1), i.e. 'sudo update-alternatives --config
+ container_build-script'.
+
+Options
+=======
+
+The following **container build** options are available:
+
+-n, --name='NAME':
+ Specify container name.
+
+-c, --capability='CAPABILITY':
+ Specify capabilities to grant, see capabilities(7).
+
+-d, --drop-capability='DROP_CAPABILITY':
+ Specify capabilities to drop, see capabilities(7).
+
+-s, --script='SCRIPT':
+ Specify container build script, defaults to 'debootstrap'.
+
+-v, --verbose:
+ Explain what is being done.
+
+-b, --bind='DIRECTORY:DIRECTORY[:OPTIONS][;DIRECTORY:DIRECTORY[:OPTIONS]]':
+ Specify container read-write bind mounts, see systemd-nspawn(1) --bind option.
+
+--bind-ro='DIRECTORY:DIRECTORY[:OPTIONS][;DIRECTORY:DIRECTORY[:OPTIONS]]':
+ Specify container read-only bind mounts, see systemd-nspawn(1) --bind-ro
+ option.
+
+--cnt-overlay='DIRECTORY_LOWER:DIRECTORY_UPPER:DIRECTORY_WORK:DIRECTORY_MERGED[;DIRECTORY_UPPER:DIRECTORY_LOWER:DIRECTORY_WORK:DIRECTORY_MERGED]':
+ Specify container overlay mounts, see Documentation/filesystems/overlayfs.txt.
+
+--cnt.overlay-options='OPTION1,OPTION2[;OPTION3,OPTION4]':
+ Specify container overlay mount options, see
+ Documentation/filesystems/overlayfs.txt.
+
+--cnt.start='OPTION1[,OPTION2,...]':
+ Specify container start options, see container-start(1).
+
+Examples
+========
+
+Build example.net container using debootstrap script:
+
+ sudo container build -n example.net -s debootstrap
+
+Build example.net container using debconf script:
+
+ sudo container build -n example.net -s debconf
+
+Build example.net container with the default build script and start it:
+
+ sudo container build,start -n example.net
+
+See also
+========
+
+| compute-tools(7),
+| container(1).
+
+Homepage
+========
+
+More information about compute-tools and the Open Infrastructure project can be
+found on the homepage (https://open-infrastructure.net).
+
+Contact
+=======
+
+Bug reports, feature requests, help, patches, support and everything else are
+welcome on the Open Infrastructure Software Mailing List
+<software@lists.open-infrastructure.net>.
+
+Debian specific bugs can also be reported in the Debian Bug Tracking System
+(https://bugs.debian.org).
+
+Authors
+=======
+
+compute-tools were written by Daniel Baumann
+<daniel.baumann@open-infrastructure.net> and others.
diff --git a/share/man/container-console.1.rst b/share/man/container-console.1.rst
index 3571bc5..b07ba95 100644
--- a/share/man/container-console.1.rst
+++ b/share/man/container-console.1.rst
@@ -67,7 +67,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-enter.1.rst b/share/man/container-enter.1.rst
index c2f89c6..4948e3a 100644
--- a/share/man/container-enter.1.rst
+++ b/share/man/container-enter.1.rst
@@ -67,7 +67,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-create-curl.1.rst b/share/man/container-get-curl.1.rst
index ce11006..ba44ba0 100644
--- a/share/man/container-create-curl.1.rst
+++ b/share/man/container-get-curl.1.rst
@@ -17,13 +17,13 @@
.. You should have received a copy of the GNU General Public License
.. along with this program. If not, see <https://www.gnu.org/licenses/>.
-=====================
-container-create-curl
-=====================
+==================
+container-get-curl
+==================
--------------------------------------------------------------------------
-Create a Debian based container by downloading a tarball over the network
--------------------------------------------------------------------------
+---------------------------------------------------------------------------
+Download a Debian based container by downloading a tarball over the network
+---------------------------------------------------------------------------
:manual section: 1
:manual group: Open Infrastructure
@@ -31,12 +31,12 @@ Create a Debian based container by downloading a tarball over the network
Synopsis
========
-| **container create -s curl** ['OPTIONS']
+| **container get -s curl** ['OPTIONS']
Description
===========
-The curl container creation script uses curl(1) to download a tarball over the
+The curl container download script uses curl(1) to download a tarball over the
network to create a Debian based container.
Depending on the tarball this script otherwise creates a pure Debian system
@@ -65,18 +65,20 @@ The following script options are available:
Specify container architecture.
--clean:
- Remove downloaded tarball after successfull container creation.
+ Remove container tarball after successful download.
-p, --root-password='PASSWORD':
Specify the root password, defaults to a random 16 character password.
--server='SERVER':
Specify the image server to download from, defaults to
- https://get.open-infrastructure.net/system/container/debian.
+ 'https://get.open-infrastructure.net/system/container/debian'.
--setup='SETUP':
Specify the setup image name to download, defaults to the value specified
- through --system using the setup.tar.${COMPRESSION} suffix.
+ through --system using the setup.tar.${COMPRESSION} suffix (where
+ ${COMPRESSION} is either lz, xz, or gz depending on compressor availability on
+ the host system).
--system='SYSTEM':
Specify the system image name to download, defaults to
@@ -87,15 +89,15 @@ The following script options are available:
Examples
========
-Create a Debian 11 (bullseye) based container with same architecture as the host
+Download a Debian 11 (bullseye) based container with same architecture as the host
system:
- sudo container create -s curl -n bullseye.example.net
+ sudo container get -s curl -n bullseye.example.net
-Create a Debian 11 (bullseye) based container with different architecture as the
+Download a Debian 11 (bullseye) based container with different architecture as the
host system:
- sudo container create -s curl -n bullseye-i386.example.net -- --system debian-bullseye-current_i386.system.tar.xz
+ sudo container get -s curl -n bullseye-i386.example.net -- --system debian-bullseye-current_i386.system.tar.xz
Files
=====
@@ -105,8 +107,8 @@ The following files are used:
/etc/compute-tools/config:
Container configuration files.
-/usr/share/compute-tools/scripts:
- Container creation scripts.
+/usr/share/compute-tools/get-scripts:
+ Container download scripts.
/usr/share/doc/compute-tools:
Container documentation.
@@ -127,7 +129,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-create.1.rst b/share/man/container-get.1.rst
index ada6c72..edcb1de 100644
--- a/share/man/container-create.1.rst
+++ b/share/man/container-get.1.rst
@@ -17,13 +17,13 @@
.. You should have received a copy of the GNU General Public License
.. along with this program. If not, see <https://www.gnu.org/licenses/>.
-================
-container-create
-================
+=============
+container-get
+=============
-------------------
-Create a container
-------------------
+--------------------
+Download a container
+--------------------
:manual section: 1
:manual group: Open Infrastructure
@@ -31,40 +31,32 @@ Create a container
Synopsis
========
-| **container create** ['OPTIONS']
-| **cnt cr** ['OPTIONS']
+| **container get** ['OPTIONS']
+| **cnt g** ['OPTIONS']
Description
===========
-The **container create** command creates a container based on a script.
+The **container get** command downloads a container based on a script.
Scripts
-------
-The following container scripts are available:
+The following download scripts are available:
curl:
- Basic script to create Debian based container, see container-create-curl(1).
-
-debootstrap:
- Basic script to create Debian based container, see
- container-create-debootstrap(1).
-
-debconf:
- Advanced script to automatically create Debian based container, see
- container-create-debconf(1).
+ Basic script to build Debian based container, see container-create-curl(1).
default:
- Symlink (if existing) to a container script which is used if no script was
+ Symlink (if existing) to a download script which is used if no script was
specified. On Debian based system this can be managed through
update-alternatives(1), i.e. 'sudo update-alternatives --config
- container_script'.
+ container_get-script'.
Options
=======
-The following **container create** options are available:
+The following **container get** options are available:
-n, --name='NAME':
Specify container name.
@@ -76,7 +68,7 @@ The following **container create** options are available:
Specify capabilities to drop, see capabilities(7).
-s, --script='SCRIPT':
- Specify container creation script, defaults to debootstrap.
+ Specify container build script, defaults to 'debootstrap'.
-v, --verbose:
Explain what is being done.
@@ -103,19 +95,11 @@ Examples
Create example.net container using curl script:
- sudo container create -n example.net -s curl
-
-Create example.net container using debootstrap script:
-
- sudo container create -n example.net -s debootstrap
-
-Create example.net container using debconf script:
-
- sudo container create -n example.net -s debconf
+ sudo container get -n example.net -s curl
-Create example.net container with the default create script and start it:
+Create example.net container with the default download script and start it:
- sudo container create,start -n example.net
+ sudo container get,start -n example.net
See also
========
@@ -127,7 +111,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-info.1.rst b/share/man/container-info.1.rst
index 3b4d4c1..c3c8e7d 100644
--- a/share/man/container-info.1.rst
+++ b/share/man/container-info.1.rst
@@ -41,8 +41,8 @@ The **container info** command shows specific information of a container.
Options
=======
-The following **container info** options are available, defaults to *--status
---os --ip*:
+The following **container info** options are available, defaults to '--status
+--os --ip':
--status:
Show container status (started|stopped|other).
@@ -78,7 +78,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-key.1.rst b/share/man/container-key.1.rst
index 0ae508a..d21956a 100644
--- a/share/man/container-key.1.rst
+++ b/share/man/container-key.1.rst
@@ -44,7 +44,7 @@ Options
The following **container key** options are available:
--a, --add='KEY':
+-a, --add='KEY_FILE|KEY_ID':
Add a key to the keyring.
-l, --list':
@@ -56,14 +56,33 @@ The following **container key** options are available:
Examples
========
-Add a key to the keyring:
+Add a key to the keyring manually:
- gpg --keyserver hkps://hkps.pool.sks-keyservers.net --recv 0x1E9B3AED2D9FA8F6
- gpg --armor --export 0x1E9B3AED2D9FA8F6 | sudo container key --add -
+ gpg --keyserver hkps://keys.openpgp.org --recv 0x55CF1BF986ABB9C7
+ gpg --armor --export 0x55CF1BF986ABB9C7 | sudo container key --add -
+
+Assisted adding of the same key:
+
+ sudo container key --add 0x55CF1BF986ABB9C7
Remove a key from the keyring:
- sudo container key --remove 0x1E9B3AED2D9FA8F6
+ sudo container key --remove 0x55CF1BF986ABB9C7
+
+List keys in the keyring:
+
+ sudo container key --list
+
+Files
+=====
+
+The following files are used:
+
+/etc/compute-tools/keys:
+ Active container keyring.
+
+/usr/share/compute-tools/keys:
+ Inactive container keyring library.
See also
========
@@ -75,7 +94,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-limit.1.rst b/share/man/container-limit.1.rst
index 0fcfea5..67fad3d 100644
--- a/share/man/container-limit.1.rst
+++ b/share/man/container-limit.1.rst
@@ -21,9 +21,9 @@
container-limit
===============
--------------------------------
-Limit ressources of a container
--------------------------------
+------------------------------
+Limit resources of a container
+------------------------------
:manual section: 1
:manual group: Open Infrastructure
@@ -36,7 +36,7 @@ Synopsis
Description
===========
-The **container limit** command limits ressources available to a container at
+The **container limit** command limits resources available to a container at
runtime.
Options
@@ -102,7 +102,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-list.1.rst b/share/man/container-list.1.rst
index 265ae50..6cd516f 100644
--- a/share/man/container-list.1.rst
+++ b/share/man/container-list.1.rst
@@ -126,7 +126,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-log.1.rst b/share/man/container-log.1.rst
index 2d26a37..7984aa0 100644
--- a/share/man/container-log.1.rst
+++ b/share/man/container-log.1.rst
@@ -82,7 +82,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-move.1.rst b/share/man/container-move.1.rst
index f77662f..550f1db 100644
--- a/share/man/container-move.1.rst
+++ b/share/man/container-move.1.rst
@@ -74,7 +74,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-remove.1.rst b/share/man/container-remove.1.rst
index f1b1df0..d62f527 100644
--- a/share/man/container-remove.1.rst
+++ b/share/man/container-remove.1.rst
@@ -85,7 +85,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-restart.1.rst b/share/man/container-restart.1.rst
index ee13d00..fb98a78 100644
--- a/share/man/container-restart.1.rst
+++ b/share/man/container-restart.1.rst
@@ -71,7 +71,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-run.1.rst b/share/man/container-run.1.rst
index f2ad4c6..890c95d 100644
--- a/share/man/container-run.1.rst
+++ b/share/man/container-run.1.rst
@@ -69,7 +69,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-shell.1.rst b/share/man/container-shell.1.rst
index 2aa1b91..a41bd2a 100644
--- a/share/man/container-shell.1.rst
+++ b/share/man/container-shell.1.rst
@@ -122,7 +122,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-start.1.rst b/share/man/container-start.1.rst
index a1478f6..b444c6e 100644
--- a/share/man/container-start.1.rst
+++ b/share/man/container-start.1.rst
@@ -74,7 +74,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-status.1.rst b/share/man/container-status.1.rst
index b60ceeb..79675be 100644
--- a/share/man/container-status.1.rst
+++ b/share/man/container-status.1.rst
@@ -64,7 +64,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-stop.1.rst b/share/man/container-stop.1.rst
index ca2a73b..29bfa3d 100644
--- a/share/man/container-stop.1.rst
+++ b/share/man/container-stop.1.rst
@@ -79,7 +79,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-top.1.rst b/share/man/container-top.1.rst
index 24b1050..8d1493c 100644
--- a/share/man/container-top.1.rst
+++ b/share/man/container-top.1.rst
@@ -44,7 +44,7 @@ Options
The following **container top** options are available, defaults to '--delay 1':
-d, --delay='SECONDS[.TENTHS]':
- Specifies the delay between screen updates, defaults to 1.
+ Specifies the delay between screen updates, defaults to '1'.
Examples
========
@@ -62,7 +62,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container-version.1.rst b/share/man/container-version.1.rst
index 12bc9bb..3a57999 100644
--- a/share/man/container-version.1.rst
+++ b/share/man/container-version.1.rst
@@ -60,7 +60,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======
diff --git a/share/man/container.1.rst b/share/man/container.1.rst
index 895e558..cce283b 100644
--- a/share/man/container.1.rst
+++ b/share/man/container.1.rst
@@ -53,8 +53,8 @@ Commands
The following **container** commands are available:
-create:
- Create a new container, see container-create(1).
+build:
+ Build a new container, see container-build(1).
start:
Start a container, see container-start(1).
@@ -87,7 +87,7 @@ key:
Manage GnuPG keyring for container operations, see container-key(1).
limit:
- Limit ressources of a container, see container-limit(1).
+ Limit resources of a container, see container-limit(1).
list:
List container on the system, see container-list(1).
@@ -146,7 +146,7 @@ Homepage
========
More information about compute-tools and the Open Infrastructure project can be
-found on the homepage at https://open-infrastructure.net.
+found on the homepage (https://open-infrastructure.net).
Contact
=======