summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt439
-rw-r--r--LICENSE.txt8
-rw-r--r--Makefile148
-rw-r--r--VERSION.txt2
-rwxr-xr-xbin/container41
-rwxr-xr-xbin/container-shell8
-rw-r--r--debian/changelog375
-rw-r--r--debian/control19
-rw-r--r--debian/copyright5
-rw-r--r--debian/open-infrastructure-compute-tools.NEWS (renamed from debian/open-infrastructure-container-tools.NEWS)45
-rw-r--r--debian/open-infrastructure-compute-tools.alternatives29
-rw-r--r--debian/open-infrastructure-compute-tools.config64
-rwxr-xr-xdebian/open-infrastructure-compute-tools.postinst191
-rwxr-xr-xdebian/open-infrastructure-compute-tools.postrm (renamed from debian/open-infrastructure-container-tools.postrm)13
-rw-r--r--debian/open-infrastructure-compute-tools.templates99
-rw-r--r--debian/open-infrastructure-container-tools.config73
-rwxr-xr-xdebian/open-infrastructure-container-tools.postinst129
-rwxr-xr-xdebian/open-infrastructure-container-tools.prerm26
-rw-r--r--debian/open-infrastructure-container-tools.templates86
-rw-r--r--debian/patches/series2
-rw-r--r--debian/patches/upstream/0001-host-variable.patch42
-rw-r--r--debian/patches/upstream/0002-versioned-sort.patch12
-rw-r--r--debian/po/POTFILES.in2
-rw-r--r--debian/po/de.po193
-rw-r--r--debian/po/es.po262
-rw-r--r--debian/po/fr.po195
-rw-r--r--debian/po/nl.po190
-rw-r--r--debian/po/pt.po175
-rw-r--r--debian/po/pt_BR.po185
-rw-r--r--debian/po/ru.po175
-rw-r--r--debian/po/templates.pot140
-rwxr-xr-xdebian/rules11
-rwxr-xr-xlibexec/container/auto (renamed from lib/container/auto)61
-rwxr-xr-xlibexec/container/build287
-rwxr-xr-xlibexec/container/console (renamed from lib/container/console)12
-rwxr-xr-xlibexec/container/enter (renamed from lib/container/enter)14
-rwxr-xr-xlibexec/container/get (renamed from lib/container/create)40
-rwxr-xr-xlibexec/container/info221
-rwxr-xr-xlibexec/container/key (renamed from lib/container/key)36
-rwxr-xr-xlibexec/container/limit (renamed from lib/container/limit)12
-rwxr-xr-xlibexec/container/list (renamed from lib/container/list)50
-rwxr-xr-xlibexec/container/log (renamed from lib/container/log)30
-rwxr-xr-xlibexec/container/move (renamed from lib/container/move)24
-rwxr-xr-xlibexec/container/rebuild152
-rwxr-xr-xlibexec/container/remove (renamed from lib/container/remove)40
-rwxr-xr-xlibexec/container/restart172
-rwxr-xr-xlibexec/container/run (renamed from lib/container/restart)57
-rwxr-xr-xlibexec/container/start (renamed from lib/container/start)145
-rwxr-xr-xlibexec/container/status (renamed from lib/container/status)10
-rwxr-xr-xlibexec/container/stop (renamed from lib/container/stop)128
-rwxr-xr-xlibexec/container/top (renamed from lib/container/top)8
-rwxr-xr-xlibexec/container/update270
-rwxr-xr-xlibexec/container/version (renamed from lib/container/version)10
-rw-r--r--share/bash-completion/container137
-rwxr-xr-xshare/build-scripts/debconf (renamed from share/scripts/debconf)316
-rwxr-xr-xshare/build-scripts/debconf.d/0001-preseed-file (renamed from share/scripts/debconf.d/0001-preseed-file)54
-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)4
-rwxr-xr-xshare/build-scripts/debconf.d/0003-debconf (renamed from share/scripts/debconf.d/0003-debconf)145
-rw-r--r--share/build-scripts/debconf.d/0003-debconf.templates (renamed from share/scripts/debconf.d/0003-debconf.templates)10
-rwxr-xr-xshare/build-scripts/debootstrap (renamed from share/scripts/debootstrap)16
-rw-r--r--share/config/container.conf.in4
-rw-r--r--share/doc/examples/bookworm.cfg (renamed from share/doc/examples/buster.cfg)10
-rwxr-xr-xshare/doc/examples/container-images.sh113
-rw-r--r--share/doc/examples/graograman-backports.cfg (renamed from share/doc/examples/engywuck-backports.cfg)18
-rw-r--r--share/doc/host-setup.old.txt (renamed from share/doc/HOST-SETUP.txt)84
-rw-r--r--share/doc/host-setup.txt217
-rwxr-xr-xshare/get-scripts/curl (renamed from share/scripts/curl)39
-rwxr-xr-xshare/get-scripts/curl.d/0001-debconf (renamed from share/scripts/curl.d/0001-debconf)4
-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/post-start.chown-nvidia.sh31
-rwxr-xr-xshare/hooks/pre-build.git-pull.sh (renamed from share/hooks/pre-create.git-pull.sh)18
-rwxr-xr-xshare/hooks/pre-get.git-pull.sh53
-rwxr-xr-x[-rw-r--r--]share/hooks/pre-start.unlink-console.sh26
-rw-r--r--share/keys/daniel.baumann@open-infrastructure.net_0xB62C61A10B93195F.pub14
-rw-r--r--share/keys/daniel@debian.org_0x55CF1BF986ABB9C7.pub52
-rw-r--r--share/logrotate/container4
-rw-r--r--share/man/Makefile43
-rw-r--r--share/man/compute-tools.7.rst153
-rw-r--r--share/man/compute-tools.7.txt133
-rw-r--r--share/man/container-auto.1.rst92
-rw-r--r--share/man/container-auto.1.txt85
-rw-r--r--share/man/container-build-debconf.1.rst173
-rw-r--r--share/man/container-build-debootstrap.1.rst111
-rw-r--r--share/man/container-build.1.rst139
-rw-r--r--share/man/container-console.1.rst86
-rw-r--r--share/man/container-console.1.txt79
-rw-r--r--share/man/container-create-curl.1.txt129
-rw-r--r--share/man/container-create-debconf.1.txt157
-rw-r--r--share/man/container-create-debootstrap.1.txt100
-rw-r--r--share/man/container-create.1.txt123
-rw-r--r--share/man/container-enter.1.rst86
-rw-r--r--share/man/container-enter.1.txt79
-rw-r--r--share/man/container-get-curl.1.rst148
-rw-r--r--share/man/container-get.1.rst130
-rw-r--r--share/man/container-info.1.rst100
-rw-r--r--share/man/container-key.1.rst113
-rw-r--r--share/man/container-key.1.txt86
-rw-r--r--share/man/container-limit.1.rst121
-rw-r--r--share/man/container-limit.1.txt109
-rw-r--r--share/man/container-list.1.rst145
-rw-r--r--share/man/container-list.1.txt125
-rw-r--r--share/man/container-log.1.rst101
-rw-r--r--share/man/container-log.1.txt90
-rw-r--r--share/man/container-move.1.rst93
-rw-r--r--share/man/container-move.1.txt86
-rw-r--r--share/man/container-rebuild.1.rst93
-rw-r--r--share/man/container-remove.1.rst104
-rw-r--r--share/man/container-remove.1.txt95
-rw-r--r--share/man/container-restart.1.rst96
-rw-r--r--share/man/container-restart.1.txt80
-rw-r--r--share/man/container-run.1.rst88
-rw-r--r--share/man/container-shell.1.rst141
-rw-r--r--share/man/container-shell.1.txt112
-rw-r--r--share/man/container-start.1.rst93
-rw-r--r--share/man/container-start.1.txt86
-rw-r--r--share/man/container-status.1.rst83
-rw-r--r--share/man/container-status.1.txt77
-rw-r--r--share/man/container-stop.1.rst108
-rw-r--r--share/man/container-stop.1.txt86
-rw-r--r--share/man/container-top.1.rst81
-rw-r--r--share/man/container-top.1.txt76
-rw-r--r--share/man/container-update.1.rst114
-rw-r--r--share/man/container-version.1.rst79
-rw-r--r--share/man/container-version.1.txt73
-rw-r--r--share/man/container.1.rst171
-rw-r--r--share/man/container.1.txt153
-rw-r--r--share/man/man.in19
-rw-r--r--share/needrestart/container-tools.conf6
-rw-r--r--share/procps/zz-container.conf2
-rw-r--r--share/sudo/container-shell2
-rw-r--r--share/systemd/container-auto.service6
-rw-r--r--share/systemd/container@.service3
133 files changed, 8136 insertions, 3742 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 336b9c7..8dd6e3d 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,429 @@
+2022-12-23 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20221023.
+
+ [ Daniel Baumann ]
+ * Tightening version matches for OS detection in container info command.
+ * Adding release support for Debian 12 (bookworm).
+ * Updating distribution defaults for bookworm in container build scripts.
+ * Updating references in manpages for bookworm.
+ * Updating examples for bookworm.
+ * Adding support for non-free-firmware archive-area in debconf build script.
+ * Updating arm64 description in debconf build script.
+
+2022-10-23 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20221023.
+
+ [ Daniel Baumann ]
+ * Removing curl pre-http2 option handling.
+ * Renaming internal bootstrap function to be more generic in debconf build-script.
+ * Adding initial image support in container debconf build-scripts.
+
+2022-10-15 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20221015.
+
+ [ Daniel Baumann ]
+ * Removing machine-id from cache to fix re-using it amongst all generated containers, thanks to Sakirnth Nagarasa <sakirnth@debian.org>.
+ * Correcting a few formating errors in changelog.
+
+2022-10-02 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20221002.
+
+ [ Daniel Baumann ]
+ * Adding force and interactive options to container restart command.
+ * Updating license with newer GPL-3 version containing https instead of http links.
+ * Replacing explicit container command with variable in container main wrapper.
+ * Correcting distclean target in makefile.
+ * Also passing explicit directory output-format to mmdebstrap in build scripts.
+ * Also passing root as sandbox user to mmdebstrap in build scripts.
+
+2022-07-21 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20220721.
+
+ [ Daniel Baumann ]
+ * Returning all ip addresses in cnt info command.
+ * Correcting container info command to report IP addresses of stopped container.
+ * Handling multiple IP addresses in container info command the same way for stopped containers as for started ones.
+ * Adding lazy detection in container info command for Debian 12 (booworm).
+
+2022-07-04 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20220704.
+
+ [ Daniel Baumann ]
+ * Adding release related targets in Makefile.
+ * Updating links about related articles in compute-tools manpage.
+ * Reverting adding LinkLocalAddressing=no to ipv6 interfaces as its only desirable on container bridges but breaks a few other things in normal containers.
+
+2022-06-05 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20220605.
+
+ * Backward incompatible changes:
+ - The container stop command is now interactive by default,
+ use 'container stop --force' / 'cnt stop -f' instead.
+
+ [ Daniel Baumann ]
+ * Correcting container status bash-completion to complete on all containers rather than only stopped ones.
+ * Using variables in directory paths in container key command.
+ * Adding default interactive mode for container stop command.
+ * Renaming force option in container stop command to kill in order to properly separate the three different stop modi (interactive, force, kill).
+ * Tracking container state in run files in /var/lib/compute-tools.
+ * Automatically restoring previous state after reboot by using last-on/last-off config options, thanks to Sakirnth Nagarasa <sakirnth@gmail.com> for the use-case and idea.
+ * Setting default for cnt.auto to last-on in debconf build scripts.
+
+2022-06-04 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20220604.
+
+ [ Daniel Baumann ]
+ * Adding --name option in container-info manpage.
+ * Adding missing dhcp option in select question of the debconf build script.
+ * Adding new 'stub' network interface method in debconf build-script, thanks to Sakirnth Nagarasa <sakirnth@gmail.com> for the use-case and idea.
+ * Adding LinkLocalAddressing=no to ipv6 interfaces.
+
+2022-05-22 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20220522.
+
+ [ Daniel Baumann ]
+ * Fixing copy&paste mistake in systemd-network run-files handling.
+
+2022-05-09 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20220509.
+
+ [ Daniel Baumann ]
+ * Correcting wrong preseed-file handling for new links directory in container build script.
+
+2022-05-08 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20220508.
+
+ [ Daniel Baumann ]
+ * Correcting off-by-one error when warning about too long veth interface names in container start commend.
+ * Adding comments about debconf hierarchy in debconf build script.
+ * Using versioned sort when sorting debconf templates.
+ * Excluding /etc/compute-tools/debconf/links from being shown in preseed file selection dialog to declutter automatization symlinks from real templates.
+ * Explicitly prefering links subdirectory over other locations withint debconf hierarchy in debconf build scripts.
+
+2022-05-05 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20220505.
+
+ [ Daniel Baumann ]
+ * Adding container rebuild command.
+ * Correcting wrong shortlink for container restart command (rs instead of rt).
+ * Updating copyright notices for 2022.
+ * Showing all IP address for stopped containers in container list command.
+ * Supporting both ifupdown and systemd-networkd for the time being, depending on the existence of /etc/network/interfaces.
+ * Readding old ifupdown documentation for the time being.
+
+2022-04-30 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20220430.
+
+ [ Simon Spöhel ]
+ * Updating documentation for systemd-networkd.
+
+ [ Daniel Baumann ]
+ * Actually passing through SSH_CLIENT variable to enable powerline-prompt in container enter command.
+ * Listing all IP addresses in container list command.
+
+2022-04-28 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20220428.
+
+ [ Simon Spöhel ]
+ * Using systemd-networkd to manage veth interfaces on host.
+
+2021-12-31 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20211231.
+
+ [ Daniel Baumann ]
+ * Adding interactive option to container update command to ease skipping containers.
+ * Making name argument mandatory in container update command.
+
+2021-11-17 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20211117.
+
+ [ Daniel Baumann ]
+ * Adding complete debconf envars in container update command.
+ * Passing fix-missing to apt upgrade in container update command.
+
+2021-11-16 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20211116.
+
+ [ Daniel Baumann ]
+ * Adding comment about using grep to de-colorize apt messages in container update command.
+ * Making container update command work entirely non-interactive.
+ * Updating notifications in container update command.
+ * Refactoring notification in container update command.
+ * Adding notificiations for autoremovals in container update command.
+
+2021-11-15 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20211115.
+
+ [ Daniel Baumann ]
+ * Speeding up full-upgrades in container update command by removing redundant upgrade step.
+ * Preparing update notifications handling in container update command.
+ * Adding notification handling in container update command.
+
+2021-11-13 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20211113.
+
+ [ Daniel Baumann ]
+ * Replacing individual needrestart overrides by globally blacklisting container-tools service units.
+
+2021-11-03 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20211103.
+
+ [ Daniel Baumann ]
+ * Adding needrestart restart scripts.
+ * Enabling automatic needrestart blacklisting for containers.
+
+2021-11-02 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20211102.
+
+ [ Daniel Baumann ]
+ * Adding 'exit' in debconf build script, thanks to Katharina.
+ * Sorting preseed-file options in debconf build script.
+ * Renaming internal config variable to more suitable debconf in debconf build script.
+ * Also removing config file stub when exiting debconf build script.
+
+2021-08-04 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20210804.
+
+ [ Daniel Baumann ]
+ * Updating container update options in bash-completion.
+ * Fixing full-upgrade option in container update command.
+ * Harmonizing usage messages over all container commands with manpage references.
+ * Harmonizing parameter and usage in container build command.
+
+2021-07-27 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20210727.
+
+ [ Daniel Baumann ]
+ * Adding backward incompatible changes of the previous release to changelog.
+ * Correcting synopsis in container-run manpage.
+ * Adding container update command.
+ * Also adding notifications for container get command in container main program.
+ * Suffixing keys with keyid in container keyring samples for transparency and uniqueness of the keys.
+ * Adding manpage references in usage message in main container program.
+ * Hardening quoting in container main program.
+ * Supporting /etc/compute-tools/container.conf.d.
+ * Adding boliderplate variables in post-start.chown-nvidia.sh example hook for consistency.
+
+2021-07-26 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20210726.
+
+ * Backward incompatible changes:
+ - The container create command has been renamed to 'build'.
+ - The container create script using curl is now a 'get' script
+ for the new container get command.
+
+ [ 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.
+
+ [ Daniel Baumann ]
+ * Updating build relevant stuff to move from asciidoc to rst for manpage generation.
+ * Migrationg manpages from asciidoc to rst.
+ * Updating ssh public-key references in container-shell manpage examples.
+ * Updating references to the current Debian release in manpages for Debian 11 (bullseye).
+ * Updating build-depends listed in compute-tools manpage.
+ * Prefixing generated manpages with boiler-plate header.
+ * Injecting compute-tools version into manpage headers.
+
+2021-07-24 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20210724.
+
+ [ Daniel Baumann ]
+ * Removing note about ipv4 forwarding, this is not actually required (anymore).
+ * Correcting wording in host setup documentation.
+ * Adding @FILE@ replacement variables in preseed files.
+ * Also removing lock file when force-stopping a container.
+ * Exporting IP variables to be used in host commands.
+ * Using lower-case filename for host-setup documentation.
+ * Improving section titles in host-setup documentation.
+ * Harmonizing first line in comments of non-shebang files.
+ * Using fixme rather than todo in source files.
+ * Improving comments in debootstrap script.
+
+2021-06-30 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20210630.
+
+ [ Daniel Baumann ]
+ * Reverting openvswitch, not really ready yet.
+
+2021-06-29 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20210629.
+
+ * Backward incompatible changes:
+ - The networking integration on the container host depended on
+ ifupdown. Now, to support KVM as an additional backend
+ alongside systemd-nspawn in compute-tools, we're switching
+ in this version exclusively to openvswitch.
+ - Moving from ifupdown to openvswitch to manage the bridges
+ requires manual re-configuration of the networking stack on
+ the host, otherwise no container will continue to have network
+ access.
+ - Configuration examples for systemd-networkd (recommended) on the
+ host to use openvswitch are documented in HOST-SETUP.txt.
+
+ [ Simon Spöhel ]
+ * Using openvswitch instead of linux bridges.
+ * Updating documentation for openvswitch.
+
+2021-06-28 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20210628.
+
+ [ Daniel Baumann ]
+ * Using dpkg selection to check package availability in debconf container create script, rather than to rely on dpkg internal files.
+ * Updating unit file for systemd 246 wrt/ StandardError and StandardOutput options.
+
+ [ Katharina Drexel ]
+ * Prefering mmdebstrap to debootstrap in debconf script.
+ * Integrating mmdebstrap in debconf script.
+
+ [ Daniel Baumann ]
+ * Setting TERM in systemd container service files to improve machinectl login.
+ * Removing undesirable --verbose option when calling mmdebstrap in debconf container create script.
+ * Allowing to specify cnt.start=force in container config to ease fencing with pacemaker/corosync.
+ * Using cnt run to determine IP addresses in container list.
+ * Adding initial container info command.
+ * Handling container run command aequivalent to container enter in bash-completion.
+ * Using container-specific user-variable when logging container commands before falling back to system environment.
+
+2021-04-11 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20210411.
+
+ * Backward incompatible changes:
+ - all path have been shortened in preparation for additional
+ backends alongside systemd-nspawn: The only user visible is the
+ configuration directory:
+
+ new: /etc/open-infrastructure/container
+ old: /etc/compute-tools
+
+ [ Daniel Baumann ]
+ * Moving command files from /usr/lib to /usr/libexec.
+ * Moving config files from /etc/open-infrastructure to /etc/compute-tools.
+ * Using /usr/libexec/container instead of /usr/libexec/open-infrastructure/container.
+ * Using /usr/share/compute-tools instead of /usr/share/open-infrastructure/container.
+ * Using /var/log/compute-tools instead of /var/log/open-infrastructure.
+ * Using /var/cache/container instead of /var/cache/open-infrastructure/container.
+ * Making hook to git-pull debconf files work recursively.
+ * Harmonizing initial variables in curl and debconf container create scripts for consistency.
+ * Updating copyright in bash-completion, it got re-written from scratch years ago.
+ * Adding hook support to container log command for consistency.
+ * Cosmetically improving output of test target.
+ * Adding shellcheck in test target (but not failing yet on it).
+ * Removing superfluous whitespace in changelog.
+ * Removing dpkg hack for progress-linux in debconf container create script, not needed for buster and newer anymore.
+ * Removing base-files hack for progress-linux in debconf container create script, not needed for buster and newer anymore.
+ * Removing readline hack for progress-linux in debconf container create script, not needed for buster and newer anymore.
+ * Removing sysvinit hack for progress-linux in debconf container create script, not needed for buster and newer anymore.
+ * Removing stretch support from debconf container create script.
+ * Using https for security.debian.org in container create related items.
+ * Using https instead of http in all comments.
+ * Adding support for Debian bookworm in container debconf create script.
+ * Synchronising versioning number for progress-linux releases in debconf container create script.
+ * Updating preseed examples for debconf container scripts to bullseye.
+
+2021-01-01 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20210101.
+
+ [ Daniel Baumann ]
+ * Adding container run command to execute programs within containers.
+ * Cleaning up and harmonizing verbose output for container remove, restart, start, and stop commands.
+ * Expanding host-setup documentation about ipv4/ipv6 dual-stack bridge configuration.
+ * Switching redirector address for progress-linux.
+ * Updating copyright notices for 2021.
+
+2020-10-30 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20201030.
+
+ [ Daniel Baumann ]
+ * Correcting wrong usages of new and old container names in container move command, thanks to Katharina Drexel <katharina.drexel@bfh.ch> for discovering it.
+ * Adding missing colon in container create commands '--script' option.
+ * Adding support for Debian 11 (bullseye) to debootstrap container create script.
+ * Adding support for Debian 11 (bullseye) to debconf container create script.
+ * Adding support for Progress Linux 6 (fuchur) to debconf container create script.
+
+ [ Katharina Drexel ]
+ * Adding overlay options to container configuration file.
+ * Adding overlay options to container create command.
+ * Adding overlay options to container start command.
+ * Adding overlay options to debconf script.
+ * Adding awk optimizations in configuration file handling.
+
+ [ Daniel Baumann ]
+ * Adding one more awk optimizations in container stop command.
+
+2020-08-30 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20200830.
+
+ [ Daniel Baumann ]
+ * Correcting permissions of pre-start.unlink-console.sh hook.
+ * Adding post-start hook to set nvidia device ownership.
+ * Harmonizing hooks.
+ * Correcting call of post hooks in container start program to make them actually work, thanks to Simon Spoehel <simon@spoehel.ch>.
+ * Using more common sign extension for detached gpg signatures in container curl create script.
+ * Updating host setup documentation.
+ * Adding IPv6 note in host setup documentation.
+ * Readding container-images.sh.
+ * Adding run comment in version command.
+
+ [ Katharina Drexel ]
+ * Fixing 'cnt remove' error when executed in directory /usr/lib/open-infrastructure/container.
+
+ [ Daniel Baumann ]
+ * Fixing one more occurence of wrong tr usage in container move command.
+
2020-01-21 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20200121.
@@ -447,6 +873,7 @@
2016-12-10 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20161210.
+
* Backward incompatible changes:
- container list shows now only the first IPv4 address.
- container rename command has been renamed to move.
@@ -494,7 +921,7 @@
2016-11-25 Daniel Baumann <daniel.baumann@open-infrastructure.net>
- * Releasing version 20161122.
+ * Releasing version 20161125.
[ Daniel Baumann ]
* Renaming too generic internal getopt variables to avoid possible
@@ -505,6 +932,7 @@
2016-11-22 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20161122.
+
* Backward incompatible changes:
- renaming curl cache directory from /var/cache/container-tools/curl
to /var/cache/container-tools/images.
@@ -515,7 +943,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.
@@ -526,6 +954,7 @@
2016-11-12 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20161112.
+
* Backward incompatible changes:
- removes support to create Debian 8 (jessie) container in debconf
container create script.
@@ -549,6 +978,7 @@
2016-11-05 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20161105.
+
* Backward incompatible changes:
- container use systemd-networkd instead of ifupdown.
@@ -712,7 +1142,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 ]
@@ -737,6 +1167,7 @@
2016-06-01 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20160601.
+
* Backward incompatible changes:
- for consistency reasons, instead of any file only files
with .cfg suffix are accepted as preseed files in
@@ -761,6 +1192,7 @@
2016-05-15 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20160515.
+
* Backward incompatible changes:
- container network configuration in the [start] section for
multi-interface support:
@@ -826,6 +1258,7 @@
2016-04-15 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20160415.
+
* Backward incompatible changes:
- container stop command option -k|--kill renamed to -f|--force for
consistency
diff --git a/LICENSE.txt b/LICENSE.txt
index 94a9ed0..f288702 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
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/>.
Also add information on how to contact you by electronic and paper mail.
@@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
+<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+<https://www.gnu.org/licenses/why-not-lgpl.html>.
diff --git a/Makefile b/Makefile
index 13a4661..d652f32 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Open Infrastructure: compute-tools
+
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -13,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/>.
SHELL := sh -e
@@ -21,23 +23,22 @@ PROJECT = open-infrastructure
SOFTWARE = compute-tools
PROGRAM = container
-SCRIPTS = bin/* lib/*/*
+SCRIPTS = bin/* libexec/*/*
+
+VERSION := $(shell cat VERSION.txt)
all: build
test:
- @echo -n "Checking for syntax errors"
-
+ @echo -n "Checking for syntax errors with sh... "
@for SCRIPT in $(SCRIPTS); \
do \
sh -n $${SCRIPT}; \
echo -n "."; \
done
-
@echo " done."
- @echo -n "Checking for bashisms"
-
+ @echo -n "Checking for bashisms... "
@if [ -x /usr/bin/checkbashisms ]; \
then \
for SCRIPT in $(SCRIPTS); \
@@ -48,28 +49,43 @@ test:
else \
echo "Note: devscripts not installed, skipping checkbashisms."; \
fi
+ @echo " done."
+ # FIXME: fail hard on shellcheck once all issues are fixed
+ @echo -n "Checking with shellcheck... "
+ @if [ -x /usr/bin/shellcheck ]; \
+ then \
+ for SCRIPT in $(SCRIPTS); \
+ do \
+ shellcheck $${SCRIPT} || true; \
+ echo -n "."; \
+ done; \
+ else \
+ echo "Note: shellcheck not installed, skipping shellcheck."; \
+ fi
@echo " done."
-build: share/man/*.txt
+build: share/man/*.rst
$(MAKE) -C share/man
- sed -n '/^NAME/,$$p' share/man/$(SOFTWARE).7.txt > README.txt
+ sed -n '/^===/,$$p' share/man/$(SOFTWARE).7.rst > README.txt
install: build
- mkdir -p $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM)/config
- mkdir -p $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM)/debconf
- mkdir -p $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM)/hooks
+ 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)/etc/${SOFTWARE}/container.conf.d
mkdir -p $(DESTDIR)/usr/bin
cp -r bin/* $(DESTDIR)/usr/bin
- mkdir -p $(DESTDIR)/usr/lib/$(PROJECT)
- cp -r lib/* $(DESTDIR)/usr/lib/$(PROJECT)
+ mkdir -p $(DESTDIR)/usr/libexec
+ cp -r libexec/* $(DESTDIR)/usr/libexec
- mkdir -p $(DESTDIR)/usr/share/$(PROJECT)/$(PROGRAM)
- cp -r VERSION.txt $(DESTDIR)/usr/share/$(PROJECT)/$(PROGRAM)
- cp -r share/config share/hooks share/scripts $(DESTDIR)/usr/share/$(PROJECT)/$(PROGRAM)
+ mkdir -p $(DESTDIR)/usr/share/$(SOFTWARE)
+ cp -r VERSION.txt $(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
@@ -77,6 +93,9 @@ install: build
mkdir -p $(DESTDIR)/etc/logrotate.d
cp -r share/logrotate/* $(DESTDIR)/etc/logrotate.d
+ mkdir -p $(DESTDIR)/etc/needrestart/conf.d
+ cp -r share/needrestart/* $(DESTDIR)/etc/needrestart/conf.d
+
mkdir -p $(DESTDIR)/etc/sysctl.d
cp -r share/procps/* $(DESTDIR)/etc/sysctl.d
@@ -102,31 +121,34 @@ 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/$(PROJECT)/$(PROGRAM)/scripts/debian
- ln -sf debconf.d $(DESTDIR)/usr/share/$(PROJECT)/$(PROGRAM)/scripts/debian.d
- ln -sf container-create-debconf.1 $(DESTDIR)/usr/share/man/man1/container-create-debian.1
- ln -sf debconf $(DESTDIR)/usr/share/$(PROJECT)/$(PROGRAM)/scripts/progress-linux
- ln -sf debconf.d $(DESTDIR)/usr/share/$(PROJECT)/$(PROGRAM)/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/$(PROJECT)/$(PROGRAM)/scripts/mmdebstrap
- ln -sf container-create-debootstrap.1 $(DESTDIR)/usr/share/man/man1/container-create-mmdebstrap.1
-
- ln -sf create $(DESTDIR)/usr/lib/$(PROJECT)/$(PROGRAM)/cr
- ln -sf list $(DESTDIR)/usr/lib/$(PROJECT)/$(PROGRAM)/ls
- ln -sf move $(DESTDIR)/usr/lib/$(PROJECT)/$(PROGRAM)/mv
- ln -sf remove $(DESTDIR)/usr/lib/$(PROJECT)/$(PROGRAM)/rm
- ln -sf restart $(DESTDIR)/usr/lib/$(PROJECT)/$(PROGRAM)/rs
- ln -sf start $(DESTDIR)/usr/lib/$(PROJECT)/$(PROGRAM)/s
- ln -sf status $(DESTDIR)/usr/lib/$(PROJECT)/$(PROGRAM)/st
- ln -sf stop $(DESTDIR)/usr/lib/$(PROJECT)/$(PROGRAM)/t
+ 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
+ ln -sf rebuild $(DESTDIR)/usr/libexec/$(PROGRAM)/rb
+ ln -sf restart $(DESTDIR)/usr/libexec/$(PROGRAM)/rs
+ ln -sf start $(DESTDIR)/usr/libexec/$(PROGRAM)/s
+ ln -sf status $(DESTDIR)/usr/libexec/$(PROGRAM)/st
+ 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)/var/log/$(PROJECT)
+ mkdir -p $(DESTDIR)/var/log/$(SOFTWARE)
uninstall:
- rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/var/log/$(PROJECT) || true
+ rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/var/log/$(SOFTWARE) || true
for FILE in share/systemd/*; \
do \
@@ -147,9 +169,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 \
@@ -161,6 +183,11 @@ uninstall:
rm -f $(DESTDIR)/etc/sysctl.d/$$(basename $${FILE}); \
done
+ for FILE in share/needrestart/*; \
+ do \
+ rm -f $(DESTDIR)/etc/needrestart/conf.d/$$(basename $${FILE}); \
+ done
+
for FILE in share/logrotate/*; \
do \
rm -f $(DESTDIR)/etc/logrotate.d/$$(basename $${FILE}); \
@@ -174,11 +201,11 @@ uninstall:
rm -rf $(DESTDIR)/usr/share/doc/$(SOFTWARE)
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/share/doc || true
- rm -rf $(DESTDIR)/usr/share/$(PROJECT)/$(PROGRAM)
+ rm -rf $(DESTDIR)/usr/share/$(SOFTWARE)
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/share || true
- rm -rf $(DESTDIR)/usr/lib/$(PROJECT)/$(PROGRAM)
- rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/lib || true
+ rm -rf $(DESTDIR)/usr/libexec/$(PROGRAM)
+ rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/libexec || true
for FILE in bin/*; \
do \
@@ -186,11 +213,12 @@ uninstall:
done
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/bin || true
- rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM)/config || true
- rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM)/debconf || true
- rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM)/hooks || true
- rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM) || true
- rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(PROJECT) || true
+ 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)/container.conf.d || true
+ rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(SOFTWARE) || true
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc || true
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR) || true
@@ -200,6 +228,28 @@ clean:
rm -f README.txt
-distclean:
+distclean: clean
+ rm -rf $(SOFTWARE)-$(VERSION)
reinstall: uninstall install
+
+release: distclean
+ git commit -a -s -S -m 'Releasing version $(VERSION).' || true
+ git tag -s -m 'Tagging version $(VERSION).' v$(VERSION) || true
+
+ mkdir -p $(SOFTWARE)-$(VERSION)
+ find . -mindepth 1 -maxdepth 1 -and -not -name ".git*" -and -not -name debian -and -not -name $(SOFTWARE)-$(VERSION) -exec cp \-a {} $(SOFTWARE)-$(VERSION) \;
+
+ for FORMAT in xz lzip; \
+ do \
+ EXTENSION=$$(echo $${FORMAT} | cut -b-2); \
+ tar --$${FORMAT} -cf ../$(SOFTWARE)-$(VERSION).tar.$${EXTENSION} $(SOFTWARE)-$(VERSION); \
+ sha512sum ../$(SOFTWARE)-$(VERSION).tar.$${EXTENSION} > ../$(SOFTWARE)-$(VERSION).tar.$${EXTENSION}.sha512; \
+ gpg --default-key 0xB62C61A10B93195F --armor -b ../$(SOFTWARE)-$(VERSION).tar.$${EXTENSION}; \
+ mv ../$(SOFTWARE)-$(VERSION).tar.$${EXTENSION}.asc ../$(SOFTWARE)-$(VERSION).tar.$${EXTENSION}.sig; \
+ done
+
+ rm -rf $(SOFTWARE)-$(VERSION)
+
+upload:
+ scp ../$(SOFTWARE)-$(VERSION).* get.open-infrastructure.net:/srv/get.open-infrastructure.net/software/$(SOFTWARE)/upstream
diff --git a/VERSION.txt b/VERSION.txt
index 6de2f45..7a58b9c 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-20200121
+20221223
diff --git a/bin/container b/bin/container
index 3ab1a69..fb52687 100755
--- a/bin/container
+++ b/bin/container
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -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
@@ -23,7 +23,7 @@ PROJECT="open-infrastructure"
SOFTWARE="compute-tools"
PROGRAM="container"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+HOOKS="/etc/${SOFTWARE}/hooks"
# Parameter
PARAMETER="${1}"
@@ -32,6 +32,9 @@ if [ -z "${PARAMETER}" ]
then
echo "Usage: ${PROGRAM} COMMAND [OPTIONS]" >&2
echo "Usage: ${PROGRAM} COMMAND1,COMMAND2,... [COMMON_OPTIONS]" >&2
+ echo
+ echo "See ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
exit 1
fi
@@ -40,13 +43,13 @@ COMMANDS="${1}"
# Options
shift 1
-OPTIONS="${@}"
+OPTIONS="${*}"
-for COMMAND in $(echo ${COMMANDS} | sed -e 's|,| |g')
+for COMMAND in $(echo "${COMMANDS}" | sed -e 's|,| |g')
do
- if [ ! -e "/usr/lib/${PROJECT}/${PROGRAM}/${COMMAND}" ]
+ if [ ! -e "/usr/libexec/${PROGRAM}/${COMMAND}" ]
then
- echo "'${COMMAND}': no such ${PROGRAM} command" >&2
+ echo "'${COMMAND}': no such ${PROGRAM} command, see ${PROGRAM}(1)." >&2
exit 1
fi
@@ -65,24 +68,34 @@ 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)
- USER="${SUDO_USER:-${USER}}"
+ build|b|get|g|move|mv|remove|rm|rebuild|rb|restart|rs|start|s|stop|t|update|u)
+ if [ -z "${CONTAINER_USER}" ]
+ then
+ CONTAINER_USER="${SUDO_USER:-${USER}}"
+ fi
+
DATE="$(date +%Y-%m-%d\ %H:%M:%S)"
HOST="$(hostname -f 2> /dev/null || hostname)"
# logfile
- echo "${DATE} ${HOST} ${USER} ${PROGRAM} ${COMMAND} ${OPTIONS}" >> "/var/log/${PROJECT}/${PROGRAM}.log"
+ echo "${DATE} ${HOST} ${CONTAINER_USER} ${PROGRAM} ${COMMAND} ${OPTIONS}" >> "/var/log/${SOFTWARE}/${PROGRAM}.log"
# irc
- if [ -e /usr/bin/irk ] && [ -e "/etc/${PROJECT}/${PROGRAM}.conf" ]
+ if [ -e /usr/bin/irk ]
then
- . "/etc/${PROJECT}/${PROGRAM}.conf"
+ for FILE in "/etc/${SOFTWARE}/${PROGRAM}.conf" "/etc/${SOFTWARE}/${PROGRAM}.conf.d"/*.conf
+ do
+ if [ -e "${FILE}" ]
+ then
+ . "${FILE}"
+ fi
+ done
if [ -n "${IRK_TARGETS}" ]
then
for TARGET in ${IRK_TARGETS}
do
- irk ${TARGET} "\x0300${USER}\x03@\x0312${HOST}:\x03 \x0303${PROGRAM}\x03 \x0307${COMMAND}\x03 ${OPTIONS}"
+ irk "${TARGET}" "\x0300${CONTAINER_USER}\x03@\x0312${HOST}:\x03 \x0303${PROGRAM}\x03 \x0307${COMMAND}\x03 ${OPTIONS}"
done
fi
fi
@@ -91,7 +104,7 @@ do
fi
# Run
- "/usr/lib/${PROJECT}/${PROGRAM}/${COMMAND}" "${OPTIONS}"
+ "/usr/libexec/${PROGRAM}/${COMMAND}" "${OPTIONS}"
# Post hooks
for FILE in "${HOOKS}/post-${PROGRAM}".* "${HOOKS}/${NAME}.post-${PROGRAM}"
diff --git a/bin/container-shell b/bin/container-shell
index 27bc5a2..d63c3c0 100755
--- a/bin/container-shell
+++ b/bin/container-shell
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -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
@@ -64,7 +64,7 @@ Shell ()
echo "The following ${PROGRAM} commands are available:"
echo
- cd "/usr/lib/${PROJECT}/${PROGRAM}"
+ cd "/usr/libexec/${PROGRAM}"
find . -type f -printf " %f\n" | sort
cd "${OLDPWD}"
@@ -97,7 +97,7 @@ Shell ()
;;
esac
- if [ ! -e "/usr/lib/${PROJECT}/${PROGRAM}/${COMMAND}" ]
+ if [ ! -e "/usr/libexec/${PROGRAM}/${COMMAND}" ]
then
echo "'${COMMAND}': no such ${PROGRAM} command" >&2
return
diff --git a/debian/changelog b/debian/changelog
index 9aaf269..745b02d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,378 @@
+open-infrastructure-compute-tools (20221223-5) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Cherry-picking patch to use versioned sort in container list.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 16 Apr 2023 08:05:17 +0200
+
+open-infrastructure-compute-tools (20221223-4) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Cherry-picking patch to add host variable in preseed files.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sat, 15 Apr 2023 16:57:30 +0200
+
+open-infrastructure-compute-tools (20221223-3) sid; urgency=medium
+
+ * Uploading to sid.
+ * Reuploading source-only after NEW without changes.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 05 Feb 2023 16:42:42 +0100
+
+open-infrastructure-compute-tools (20221223-2) sid; urgency=medium
+
+ * Uploading to sid.
+ * Renaming container-tools to compute-tools to avoid future NEW
+ processing when adding kvm backend.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sat, 04 Feb 2023 12:25:35 +0100
+
+open-infrastructure-compute-tools (20221223-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20221223.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Wed, 01 Feb 2023 14:44:45 +0100
+
+open-infrastructure-compute-tools (20221023-2) sid; urgency=medium
+
+ * Uploading to sid.
+ * Updating to standards version 4.6.2.
+ * Adding updated Spanish debconf translations from Camaleón
+ <noelamac@gmail.com> (Closes: #1024656).
+ * Adding Duch debconf translations from Frans Spiesschaert
+ <Frans.Spiesschaert@yucom.be> (Closes: #1023458).
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Wed, 18 Jan 2023 14:05:44 +0100
+
+open-infrastructure-compute-tools (20221023-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20221023.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 23 Oct 2022 11:50:33 +0200
+
+open-infrastructure-compute-tools (20221015-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20221015.
+ * Adding debian changelog 20221002-1.1.
+ * Adding updated German debconf translations from Markus Hiereth
+ <translation@hiereth.de> (Closes: #1021813).
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sat, 15 Oct 2022 17:23:47 +0200
+
+open-infrastructure-compute-tools (20221002-1.1) sid; urgency=medium
+
+ * Non-maintainer upload.
+ * No source change upload to rebuild with debhelper 13.10.
+
+ -- Michael Biebl <biebl@debian.org> Sat, 15 Oct 2022 12:33:03 +0200
+
+open-infrastructure-compute-tools (20221002-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20221002.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 02 Oct 2022 23:08:50 +0200
+
+open-infrastructure-compute-tools (20220721-2) sid; urgency=medium
+
+ * Uploading to sid.
+ * Adding debconf options for container directory permissions.
+ * Renaming debconf fields to fully descriptive names.
+ * Correcting mixed-up texts in debconf templates.
+ * Refreshing debconf files.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 02 Oct 2022 15:36:42 +0200
+
+open-infrastructure-compute-tools (20220721-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20220721.
+ * Updating http links to https in copyright.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Thu, 21 Jul 2022 20:00:44 +0200
+
+open-infrastructure-compute-tools (20220704-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20220704.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Mon, 04 Jul 2022 15:39:44 +0200
+
+open-infrastructure-compute-tools (20220605-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20220605.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 05 Jun 2022 10:27:53 +0200
+
+open-infrastructure-compute-tools (20220604-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20220604.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sat, 04 Jun 2022 07:23:21 +0200
+
+open-infrastructure-compute-tools (20220522-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20220522.
+ * Updating to standards version 4.6.1.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 22 May 2022 15:26:40 +0200
+
+open-infrastructure-compute-tools (20220509-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20220509.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Mon, 09 May 2022 14:32:09 +0200
+
+open-infrastructure-compute-tools (20220508-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20220508.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 08 May 2022 17:29:49 +0200
+
+open-infrastructure-compute-tools (20220505-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20220505.
+ * Removing note about using systemd-networkd exclusively, fallback
+ support for ifupdown has been added.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Thu, 05 May 2022 18:34:53 +0200
+
+open-infrastructure-compute-tools (20220430-1) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Merging upstream version 20220430.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 01 May 2022 00:11:43 +0200
+
+open-infrastructure-compute-tools (20220428-1) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Merging upstream version 20220428.
+ * Updating packaging copyright for 2022.
+ * Adding note about breaking changes (systemd-networkd instead of
+ ifupdown) in news file.
+ * Removing ifupdown from recommends.
+ * Switching preference from debootstrap to mmdebstrap.
+ * Adding updated Spanish debconf translations, thanks to Camaleón
+ <noelamac@gmail.com> (Closes: #1003296, #1008530).
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Thu, 28 Apr 2022 12:59:03 +0200
+
+open-infrastructure-compute-tools (20211231-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20211231.
+ * Moving to dh_installalternatives.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Fri, 31 Dec 2021 06:20:12 +0100
+
+open-infrastructure-compute-tools (20211117-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20211117.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Wed, 17 Nov 2021 03:12:39 +0100
+
+open-infrastructure-compute-tools (20211116-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20211116.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Tue, 16 Nov 2021 07:00:59 +0100
+
+open-infrastructure-compute-tools (20211115-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20211115.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Mon, 15 Nov 2021 22:40:57 +0100
+
+open-infrastructure-compute-tools (20211113-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20211113.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sat, 13 Nov 2021 08:01:55 +0100
+
+open-infrastructure-compute-tools (20211103-2) sid; urgency=medium
+
+ * Uploading to sid.
+ * Adding upgrade-handling for logfiles from buster to bullseye and
+ newer.
+ * Adding upgrade-handling for hooks from buster to bullseye and newer.
+ * Moving upgrade handling in postinst to its own function.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 07 Nov 2021 18:52:51 +0100
+
+open-infrastructure-compute-tools (20211103-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20211103.
+ * Removing needrestart directory on purge.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Wed, 03 Nov 2021 11:03:50 +0100
+
+open-infrastructure-compute-tools (20211102-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20211102.
+ * Replacing which with command in maintainer scripts.
+ * Adding upgrade-handling buster to bullseye and newer.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Tue, 02 Nov 2021 18:13:52 +0100
+
+open-infrastructure-compute-tools (20210804-3) sid; urgency=medium
+
+ * Uploading to sid.
+ * Updating to standards version 4.6.0.
+ * Avoiding error when trying to creating directories ontop of symlinks
+ when moving directories.
+ * Adding updated German debconf translations from Markus Hiereth
+ <translation@hiereth.de> (Closes: #993474).
+ * Adding updated Dutch debconf translations from Frans Spiesschaert
+ <Frans.Spiesschaert@yucom.be> (Closes: #994140).
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Wed, 27 Oct 2021 14:42:00 +0200
+
+open-infrastructure-compute-tools (20210804-2) sid; urgency=medium
+
+ * Uploading to sid.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Mon, 16 Aug 2021 04:33:13 +0200
+
+open-infrastructure-compute-tools (20210804-1) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Merging upstream version 20210804.
+ * Updating debconf handling to honor container.conf.d files.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Wed, 04 Aug 2021 05:26:06 +0200
+
+open-infrastructure-compute-tools (20210727-1) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Merging upstream version 20210727.
+ * Adding backward incompatible changes for the previous upstream release
+ to news file.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Tue, 27 Jul 2021 02:59:04 +0200
+
+open-infrastructure-compute-tools (20210726-1) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Merging upstream version 20210726.
+ * Updating packaging for container create to container build command
+ rename.
+ * Refreshing debconf files.
+ * Correcting 'directory-is-empty' check in postinst.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Mon, 26 Jul 2021 05:57:43 +0200
+
+open-infrastructure-compute-tools (20210725-1) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Merging upstream version 20210725.
+ * Updating build-depends for moving from asciidoc to rst for manpage
+ generation.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 25 Jul 2021 08:03:04 +0200
+
+open-infrastructure-compute-tools (20210724-1) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Merging upstream version 20210724.
+ * Updating news file for previous upload.
+ * Marking create script choices in debconf as untranslatable (as it
+ should be).
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sat, 24 Jul 2021 20:49:05 +0200
+
+open-infrastructure-compute-tools (20210630-1) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Merging upstream version 20210630.
+ * Reverting openvswitch recommends (openvswitch usage is not ready
+ here).
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Wed, 30 Jun 2021 09:02:35 +0200
+
+open-infrastructure-compute-tools (20210629-1) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Merging upstream version 20210629.
+ * Updating recommends for openvswitch migration.
+ * Updating NEWS for new upstream version.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Tue, 29 Jun 2021 14:15:52 +0200
+
+open-infrastructure-compute-tools (20210628-1) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Merging upstream version 20210628:
+ - Using dpkg selection to check package availability in debconf
+ container create script, rather than to rely on dpkg internal
+ files (Closes: #944982).
+ * Using full distributor name for progress-linux when matching
+ lsb_release output in debconf handling.
+ * Removing conditional default handling for suggest container create
+ script based on distributor, it hasn't worked anyway.
+ * Adding initial Spanish debconf translations from Camaleón
+ <noelamac@gmail.com> (Closes: #988447).
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Tue, 29 Jun 2021 13:30:47 +0200
+
+open-infrastructure-compute-tools (20210411-1) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Merging upstream version 20210411.
+ * Moving ifupdown to recommends in preparation for using systemd-network
+ and openvswitch.
+ * Updating news entry with backwarts incompatible changes for this
+ upstream version.
+ * Updating copyright file for new upstream.
+ * Updating all directory paths for new upstream version.
+ * Excluding directory paths in debconf template from translation.
+ * Refreshing debconf translation files.
+ * Improving variable usage to shorten strings in rules.
+ * Using which to check for commands in maintainer script to avoid
+ lintian 'command-with-path'-warning.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 11 Apr 2021 16:31:23 +0200
+
+open-infrastructure-compute-tools (20210101-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20210101.
+ * Updating year in copyright for 2021.
+ * Updating to standards version 4.5.1.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Tue, 09 Feb 2021 17:20:22 +0100
+
+open-infrastructure-compute-tools (20201030-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20201030.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Fri, 30 Oct 2020 05:13:55 +0100
+
+open-infrastructure-compute-tools (20200830-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 20200830.
+ * Using execute_after targets in rules to be explicit what we're doing.
+ * Updating to debhelper version 13.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 30 Aug 2020 15:48:56 +0200
+
open-infrastructure-compute-tools (20200121-1) sid; urgency=medium
* Uploading to sid.
diff --git a/debian/control b/debian/control
index 7731419..748db06 100644
--- a/debian/control
+++ b/debian/control
@@ -3,30 +3,25 @@ Section: admin
Priority: optional
Maintainer: Daniel Baumann <daniel.baumann@progress-linux.org>
Build-Depends:
- asciidoc,
- debhelper-compat (= 12),
- docbook-xml,
- docbook-xsl,
- libxml2-utils,
- xsltproc,
+ debhelper-compat (= 13),
+ python3-docutils,
Rules-Requires-Root: no
-Standards-Version: 4.5.0
+Standards-Version: 4.7.0
Homepage: https://open-infrastructure.net/software/compute-tools
Vcs-Browser: https://git.progress-linux.org/users/daniel.baumann/debian/packages/open-infrastructure-compute-tools
Vcs-Git: https://git.progress-linux.org/users/daniel.baumann/debian/packages/open-infrastructure-compute-tools
-Package: open-infrastructure-container-tools
+Package: open-infrastructure-compute-tools
Section: admin
Architecture: all
Depends:
dbus,
- ifupdown,
systemd-container,
${misc:Depends},
Recommends:
bash-completion,
curl,
- debootstrap | mmdebstrap,
+ mmdebstrap | debootstrap,
logrotate,
procps,
pv,
@@ -35,8 +30,6 @@ Suggests:
irker,
plzip,
python3-nwdiag | python-nwdiag,
-Provides:
- container-tools,
Enhances:
systemd-container,
Description: manage systemd-nspawn containers
@@ -44,5 +37,5 @@ Description: manage systemd-nspawn containers
running multiple isolated Linux systems (containers) on a single Linux control
host.
.
- container-tools provides the system integration for managing containers using
+ compute-tools provides the system integration for managing containers using
systemd-nspawn.
diff --git a/debian/copyright b/debian/copyright
index af61bd7..dc8d68e 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -4,8 +4,7 @@ Upstream-Contact: Open Infrastructure <software@lists.open-infrastructure.net>
Source: https://get.open-infrastructure.net/software/compute-tools
Files: *
-Copyright: 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
- 2016 Andreas Kreuzer <andreas.kreuzer@open-infrastructure.net>
+Copyright: 2014-2024 Daniel Baumann <daniel.baumann@open-infrastructure.net>
2016 Simon Spoehel <simon.spoehel@open-infrastructure.net>
License: GPL-3+
@@ -21,7 +20,7 @@ License: GPL-3+
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/>.
.
The full text of the GNU General Public License version 3
can be found in the file /usr/share/common-licenses/GPL-3.
diff --git a/debian/open-infrastructure-container-tools.NEWS b/debian/open-infrastructure-compute-tools.NEWS
index e938377..7927358 100644
--- a/debian/open-infrastructure-container-tools.NEWS
+++ b/debian/open-infrastructure-compute-tools.NEWS
@@ -1,3 +1,48 @@
+open-infrastructure-compute-tools (20210726-1) experimental; urgency=medium
+
+ * Backward incompatible changes:
+ - The container create command has been renamed to 'build'.
+ - The container create script using curl is now a 'get' script
+ for the new container get command.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Mon, 26 Jul 2021 06:10:41 +0200
+
+open-infrastructure-compute-tools (20210630-1) experimental; urgency=medium
+
+ * Backward incompatible changes:
+ - Reverting openvswitch, not really ready yet.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Tue, 29 Jun 2021 14:17:55 +0200
+
+open-infrastructure-compute-tools (20210629-1) experimental; urgency=medium
+
+ * Backward incompatible changes:
+ - The networking integration on the container host depended on
+ ifupdown. Now, to support KVM as an additional backend
+ alongside systemd-nspawn in compute-tools, we're switching
+ in this version exclusively to openvswitch.
+ - Moving from ifupdown to openvswitch to manage the bridges
+ requires manual re-configuration of the networking stack on
+ the host, otherwise no container will continue to have network
+ access.
+ - Configuration examples for systemd-networkd (recommended) on the
+ host to use openvswitch are documented in
+ /usr/share/doc/compute-tools/HOST-SETUP.txt.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Tue, 29 Jun 2021 14:12:57 +0200
+
+open-infrastructure-compute-tools (20210411-1) experimental; urgency=medium
+
+ * Backward incompatible changes:
+ - all path have been shortened in preparation for additional
+ backends alongside systemd-nspawn: The only user visible is the
+ configuration directory:
+
+ new: /etc/open-infrastructure/container
+ old: /etc/compute-tools
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 11 Apr 2021 15:54:06 +0200
+
open-infrastructure-compute-tools (20190319-1) experimental; urgency=medium
* Backward incompatible changes:
diff --git a/debian/open-infrastructure-compute-tools.alternatives b/debian/open-infrastructure-compute-tools.alternatives
new file mode 100644
index 0000000..5d657ca
--- /dev/null
+++ b/debian/open-infrastructure-compute-tools.alternatives
@@ -0,0 +1,29 @@
+# build: mmdebstrap
+Name: container_build-script
+Link: /usr/share/compute-tools/build-scripts/default
+Alternative: /usr/share/compute-tools/build-scripts/mmdebstrap
+Priority: 1000
+
+# build: debootstrap
+Name: container_build-script
+Link: /usr/share/compute-tools/build-scripts/default
+Alternative: /usr/share/compute-tools/build-scripts/debootstrap
+Priority: 2000
+
+# build: progress-linux
+Name: container_build-script
+Link: /usr/share/compute-tools/build-scripts/default
+Alternative: /usr/share/compute-tools/build-scripts/progress-linux
+Priority: 3000
+
+# build: debian
+Name: container_build-script
+Link: /usr/share/compute-tools/build-scripts/default
+Alternative: /usr/share/compute-tools/build-scripts/debian
+Priority: 4000
+
+# get: curl
+Name: container_get-script
+Link: /usr/share/compute-tools/get-scripts/default
+Alternative: /usr/share/compute-tools/get-scripts/curl
+Priority: 1000
diff --git a/debian/open-infrastructure-compute-tools.config b/debian/open-infrastructure-compute-tools.config
new file mode 100644
index 0000000..8771606
--- /dev/null
+++ b/debian/open-infrastructure-compute-tools.config
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+set -e
+
+CONFFILES="/etc/compute-tools/container.conf /etc/compute-tools/container.conf.d/*.conf"
+
+. /usr/share/debconf/confmodule
+
+db_settitle open-infrastructure-compute-tools/title
+db_input low open-infrastructure-compute-tools/machines-directory || true
+db_go
+
+db_settitle open-infrastructure-compute-tools/title
+db_input low open-infrastructure-compute-tools/config-directory || true
+db_go
+
+db_settitle open-infrastructure-compute-tools/title
+db_input low open-infrastructure-compute-tools/debconf-directory || true
+db_go
+
+db_settitle open-infrastructure-compute-tools/title
+db_input low open-infrastructure-compute-tools/hooks-directory || true
+db_go
+
+db_settitle open-infrastructure-compute-tools/title
+db_input low open-infrastructure-compute-tools/keys-directory || true
+db_go
+
+db_settitle open-infrastructure-compute-tools/title
+db_input low open-infrastructure-compute-tools/cache-directory || true
+db_go
+
+db_settitle open-infrastructure-compute-tools/title
+db_input low open-infrastructure-compute-tools/directory-permissions || true
+db_go
+
+if [ -e /usr/share/compute-tools/build-scripts ]
+then
+ SCRIPT_CHOICES="$(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)"
+ db_subst open-infrastructure-compute-tools/build-script SCRIPT_CHOICES "$(echo ${SCRIPT_CHOICES} | sed -e 's| |, |g')"
+
+ db_settitle open-infrastructure-compute-tools/title
+ db_input low open-infrastructure-compute-tools/build-script || true
+ db_go
+fi
+
+for CONFFILE in ${CONFFILES}
+do
+ if [ -e "${CONFFILE}" ]
+ then
+ . ${CONFFILE} || true
+ fi
+done
+
+if [ -n "${IRK_TARGETS}" ]
+then
+ db_set open-infrastructure-compute-tools/irc "${IRK_TARGETS}"
+fi
+
+db_settitle open-infrastructure-compute-tools/title
+db_input low open-infrastructure-compute-tools/irc || true
+db_go
+
+db_stop
diff --git a/debian/open-infrastructure-compute-tools.postinst b/debian/open-infrastructure-compute-tools.postinst
new file mode 100755
index 0000000..492a399
--- /dev/null
+++ b/debian/open-infrastructure-compute-tools.postinst
@@ -0,0 +1,191 @@
+#!/bin/sh
+
+set -e
+
+CONFFILE="/etc/compute-tools/container.conf"
+
+Install ()
+{
+ DEFAULT="${1}"
+ TARGET="${2}"
+
+ mkdir -p "${DEFAULT}" > /dev/null 2>&1 || true
+ mkdir -p "${TARGET}" > /dev/null 2>&1 || true
+
+ if [ "${TARGET}" != "${DEFAULT}" ]
+ then
+ if [ -h "${DEFAULT}" ]
+ then
+ rm -f "${DEFAULT}"
+ ln -s "${TARGET}" "${DEFAULT}"
+ else
+ if [ -e "${DEFAULT}" ] && [ -z "$(ls -A ${DEFAULT})" ]
+ then
+ rmdir "${DEFAULT}"
+ ln -s "${TARGET}" "${DEFAULT}"
+ fi
+ fi
+ fi
+
+ if ! dpkg-statoverride --list "${DEFAULT}" > /dev/null 2>&1 &&
+ ! dpkg-statoverride --list "${TARGET}" > /dev/null 2>&1
+ then
+ chmod ${DIRECTORY_PERMISSIONS} "${TARGET}"
+ chown root:root "${TARGET}"
+
+ chmod ${DIRECTORY_PERMISSIONS} "${DEFAULT}"
+ chown root:root "${DEFAULT}"
+ fi
+}
+
+Upgrade ()
+{
+ # upgrade from buster: conffile
+ if [ -e /etc/open-infrastructure/container.conf ] && [ ! -e "${CONFFILE}" ]
+ then
+ mv /etc/open-infrastructure/container.conf "${CONFFILE}"
+ rmdir /etc/open-infrastructure > /dev/null 2>&1 || true
+ fi
+
+ # upgrade from buster: hooks
+ for HOOK in ${HOOKS}/*
+ do
+ NAME="$(basename ${HOOK})"
+ TARGET="$(readlink -m ${HOOK})"
+
+ case "${TARGET}" in
+ /usr/share/open-infrastructure/container/hooks/pre-create.git-pull.sh)
+ rm -f "${HOOKS}/${NAME}"
+ ln -sf /usr/share/compute-tools/hooks/pre-get.git-pull.sh "${HOOKS}/pre-get.git-pull.sh"
+ ln -sf /usr/share/compute-tools/hooks/pre-build.git-pull.sh "${HOOKS}/pre-build.git-pull.sh"
+ ;;
+
+ /usr/share/open-infrastructure/container/hooks/*)
+ ln -sf "$(echo ${TARGET} | sed -e 's|/usr/share/open-infrastructure/container/hooks/|/usr/share/compute-tools/hooks/|')" "${HOOKS}/${NAME}"
+ ;;
+
+ *)
+ if [ -e "/usr/share/compute-tools/hooks/${NAME}" ]
+ then
+ rm -f "${HOOKS}/${NAME}"
+ ln -sf "/usr/share/compute-tools/hooks/${NAME}" "${HOOKS}/${NAME}"
+ fi
+ ;;
+ esac
+ done
+
+ # upgrade from buster: keys
+ if [ -e /etc/open-infrastructure/container/keys ]
+ then
+ mv /etc/open-infrastructure/container/keys/* "${KEYS}" > /dev/null 2>&1 || true
+ rmdir /etc/open-infrastructure/container/keys > /dev/null 2>&1 || true
+ rm -f /etc/open-infrastructure/container/keys > /dev/null 2>&1 || true
+ rmdir -p /etc/open-infrastructure/container > /dev/null 2>&1 || true
+ fi
+
+ # upgrade from buster: logfiles
+ if ls /var/log/open-infrastructure/container.log* > /dev/null 2>&1
+ then
+ if [ -e /var/log/compute-tools ]
+ then
+ mv /var/log/open-infrastructure/* /var/log/compute-tools 2>&1 || true
+ rmdir /var/log/open-infrastructure > /dev/null 2>&1 || true
+ else
+ mv /var/log/open-infrastructure /var/log/compute-tools
+ fi
+ fi
+}
+
+case "${1}" in
+ configure)
+ . /usr/share/debconf/confmodule
+
+ db_get open-infrastructure-compute-tools/machines-directory
+ MACHINES_DIRECTORY="${RET:-/var/lib/machines}" # string (w/o empty)
+
+ db_get open-infrastructure-compute-tools/config-directory
+ CONFIG_DIRECTORY="${RET:-/etc/compute-tools/config}" # string (w/o empty)
+
+ db_get open-infrastructure-compute-tools/debconf-directory
+ DEBCONF_DIRECTORY="${RET:-/etc/compute-tools/debconf}" # string (w/o empty)
+
+ db_get open-infrastructure-compute-tools/hooks-directory
+ HOOKS_DIRECTORY="${RET:-/etc/compute-tools/hooks}" # string (w/o empty)
+
+ db_get open-infrastructure-compute-tools/keys-directory
+ KEYS_DIRECTORY="${RET:-/etc/compute-tools/keys}" # string (w/o empty)
+
+ db_get open-infrastructure-compute-tools/cache-directory
+ CACHE_DIRECTORY="${RET:-/var/cache/container}" # string (w/o empty)
+
+ db_get open-infrastructure-compute-tools/directory-permissions
+ DIRECTORY_PERMISSIONS="${RET}" # select (w/o empty)
+
+ db_get open-infrastructure-compute-tools/build-script
+ SCRIPT="${RET:-debian}" # string (w/o empty)
+
+ db_get open-infrastructure-compute-tools/irc
+ IRK_TARGETS="${RET}" # string (w/ empty)
+
+ db_stop
+
+ Install "/var/lib/machines" "${MACHINES_DIRECTORY}"
+ Install "/etc/compute-tools/config" "${CONFIG_DIRECTORY}"
+ Install "/etc/compute-tools/debconf" "${DEBCONF_DIRECTORY}"
+ Install "/etc/compute-tools/hooks" "${HOOKS_DIRECTORY}"
+ Install "/etc/compute-tools/keys" "${KEYS_DIRECTORY}"
+ Install "/var/cache/container" "${CACHE_DIRECTORY}"
+
+ Upgrade
+
+ if [ ! -e "${CONFFILE}" ]
+ then
+
+cat > "${CONFFILE}" << EOF
+# ${CONFFILE}
+
+IRK_TARGETS="${IRK_TARGETS}"
+EOF
+
+ fi
+
+ cp -a -f "${CONFFILE}" "${CONFFILE}.tmp"
+
+ # If the admin deleted or commented some variables but then set
+ # them via debconf, (re-)add them to the config file.
+
+ test -z "${IRK_TARGETS}" || \
+ grep -Eq '^ *IRK_TARGETS=' "${CONFFILE}" || \
+ echo "IRK_TARGETS=" >> "${CONFFILE}"
+
+ sed -e "s|^ *IRK_TARGETS=.*|IRK_TARGETS=\"${IRK_TARGETS}\"|" \
+ < "${CONFFILE}" > "${CONFFILE}.tmp"
+
+ mv -f "${CONFFILE}.tmp" "${CONFFILE}"
+
+ if command -v sysctl > /dev/null 2>&1
+ then
+ sysctl -q -p /etc/sysctl.d/zz-container.conf
+ fi
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`${1}'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+case "${1}" in
+ configure)
+ # run after debhelper update-alternative scripts
+ update-alternatives --quiet --set container_build-script "/usr/share/compute-tools/build-scripts/${SCRIPT}"
+ ;;
+esac
+
+exit 0
diff --git a/debian/open-infrastructure-container-tools.postrm b/debian/open-infrastructure-compute-tools.postrm
index ab1ea41..6724b94 100755
--- a/debian/open-infrastructure-container-tools.postrm
+++ b/debian/open-infrastructure-compute-tools.postrm
@@ -29,16 +29,17 @@ Remove ()
case "${1}" in
remove)
- Remove /var/cache/open-infrastructure/container
- Remove /etc/open-infrastructure/container/debconf
- Remove /etc/open-infrastructure/container/config
- Remove /etc/open-infrastructure/container/hooks
- Remove /etc/open-infrastructure/container/keys
+ Remove /var/cache/container
+ Remove /etc/compute-tools/debconf
+ Remove /etc/compute-tools/config
+ Remove /etc/compute-tools/hooks
+ Remove /etc/compute-tools/keys
+ Remove /etc/needrestart/restart.d
Remove /var/lib/machines
;;
purge)
- rm -f /etc/open-infrastructure/container.conf
+ rm -f /etc/compute-tools/container.conf
;;
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
diff --git a/debian/open-infrastructure-compute-tools.templates b/debian/open-infrastructure-compute-tools.templates
new file mode 100644
index 0000000..be1a43e
--- /dev/null
+++ b/debian/open-infrastructure-compute-tools.templates
@@ -0,0 +1,99 @@
+Template: open-infrastructure-compute-tools/title
+Type: title
+_Description: compute-tools: Setup
+
+Template: open-infrastructure-compute-tools/machines-directory
+Type: string
+Default: /var/lib/machines
+_Description: machines directory:
+ Please specify the directory that will be used to store the containers.
+ .
+ If unsure, use /var/lib/machines (default) or /srv/container/system when
+ using shared storage.
+
+Template: open-infrastructure-compute-tools/config-directory
+Type: string
+Default: /etc/compute-tools/config
+_Description: config directory:
+ Please specify the directory that will be used to store the container
+ configuration files.
+ .
+ If unsure, use /etc/compute-tools/config (default) or
+ /srv/container/config when using shared storage.
+
+Template: open-infrastructure-compute-tools/debconf-directory
+Type: string
+Default: /etc/compute-tools/debconf
+_Description: debconf directory:
+ Please specify the directory that will be used to store the container
+ preseed files.
+ .
+ If unsure, use /etc/compute-tools/debconf (default) or
+ /srv/container/debconf when using shared storage.
+
+Template: open-infrastructure-compute-tools/hooks-directory
+Type: string
+Default: /etc/compute-tools/hooks
+_Description: hooks directory:
+ Please specify the directory that will be used to store the container
+ hooks.
+ .
+ If unsure, use /etc/compute-tools/hooks (default) or /srv/container/hooks
+ when using shared storage.
+
+Template: open-infrastructure-compute-tools/keys-directory
+Type: string
+Default: /etc/compute-tools/keys
+_Description: keys directory:
+ Please specify the directory that will be used to store the container keys
+ for verifying container image downloads.
+ .
+ If unsure, use /etc/compute-tools/keys (default) or /srv/container/keys
+ when using shared storage.
+
+Template: open-infrastructure-compute-tools/cache-directory
+Type: string
+Default: /var/cache/container
+_Description: cache directory:
+ Please specify the directory that will be used to cache files during
+ creation of containers.
+ .
+ If unsure, use /var/cache/container (default) or /srv/container/cache when
+ using shared storage.
+
+Template: open-infrastructure-compute-tools/directory-permissions
+Type: select
+Choices-C: 0700, 0755
+Choices: root-only, read-only
+Default: root-only
+_Description: Do you want system-wide readable container directories?
+ By default, the machines directory (and a few non-critical additional
+ directories such as 'cache' and 'config') is only readable by the root
+ user. If you want any user to be able to see what machines are available,
+ you can select read-only instead of root-only (default).
+ .
+ If unsure, leave at root-only (default).
+
+Template: open-infrastructure-compute-tools/build-script
+Type: select
+Choices: ${SCRIPT_CHOICES}
+Default: debian
+_Description: default build script:
+ Please select the script that will be used by default to create
+ containers.
+ .
+ If unsure, use debian (default).
+
+Template: open-infrastructure-compute-tools/irc
+Type: string
+Default:
+_Description: IRC notifications:
+ The container command can send IRC notifications via irker to one or more
+ (whitespace separated) IRC channels.
+ .
+ The following example will send IRC notifications to the
+ open-infrastructure channel on irc.oftc.net:
+ .
+ irc://irc.oftc.net:6668/open-infrastructure
+ .
+ If unsure, leave empty (default).
diff --git a/debian/open-infrastructure-container-tools.config b/debian/open-infrastructure-container-tools.config
deleted file mode 100644
index 3d6f9e5..0000000
--- a/debian/open-infrastructure-container-tools.config
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/sh
-
-set -e
-
-CONFFILE="/etc/open-infrastructure/container.conf"
-
-. /usr/share/debconf/confmodule
-
-db_settitle open-infrastructure-container-tools/title
-db_input low open-infrastructure-container-tools/machines || true
-db_go
-
-db_settitle open-infrastructure-container-tools/title
-db_input low open-infrastructure-container-tools/config || true
-db_go
-
-db_settitle open-infrastructure-container-tools/title
-db_input low open-infrastructure-container-tools/debconf || true
-db_go
-
-db_settitle open-infrastructure-container-tools/title
-db_input low open-infrastructure-container-tools/hooks || true
-db_go
-
-db_settitle open-infrastructure-container-tools/title
-db_input low open-infrastructure-container-tools/keys || true
-db_go
-
-db_settitle open-infrastructure-container-tools/title
-db_input low open-infrastructure-container-tools/cache || true
-db_go
-
-if [ -e /usr/share/open-infrastructure/container/scripts ]
-then
- SCRIPT_CHOICES="$(cd /usr/share/open-infrastructure/container/scripts && find -maxdepth 1 -not -type d -and -not -name 'default' -and -not -name 'debconf' -and -not -name '*.d' -printf '%P\n' | sort)"
- db_subst open-infrastructure-container-tools/script SCRIPT_CHOICES "$(echo ${SCRIPT_CHOICES} | sed -e 's| |, |g')"
-
- if [ -x /usr/bin/lsb_release ]
- then
- DISTRIBUTOR="$(lsb_release -is 2>/dev/null)"
- fi
-
- DISTRIBUTOR="${DISTRIBUTOR:-Debian}"
-
- case "${DISTRIBUTOR}" in
- Progress*)
- SCRIPT_DEFAULT="progress-linux"
- ;;
-
- *)
- SCRIPT_DEFAULT="debian"
- ;;
- esac
-
- db_subst open-infrastructure-container-tools/script SCRIPT_DEFAULT "${SCRIPT_DEFAULT}"
-
- db_settitle open-infrastructure-container-tools/title
- db_input low open-infrastructure-container-tools/script || true
- db_go
-fi
-
-if [ -e "${CONFFILE}" ]
-then
- . ${CONFFILE} || true
-
- db_set open-infrastructure-container-tools/irc "${IRK_TARGETS}"
-fi
-
-db_settitle open-infrastructure-container-tools/title
-db_input low open-infrastructure-container-tools/irc || true
-db_go
-
-db_stop
diff --git a/debian/open-infrastructure-container-tools.postinst b/debian/open-infrastructure-container-tools.postinst
deleted file mode 100755
index f04f12b..0000000
--- a/debian/open-infrastructure-container-tools.postinst
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/bin/sh
-
-set -e
-
-CONFFILE="/etc/open-infrastructure/container.conf"
-
-Install ()
-{
- DEFAULT="${1}"
- TARGET="${2}"
-
- mkdir -p "${DEFAULT}"
- mkdir -p "${TARGET}"
-
- if [ "${TARGET}" != "${DEFAULT}" ]
- then
- if [ -h "${DEFAULT}" ]
- then
- rm -f "${DEFAULT}"
- ln -s "${TARGET}" "${DEFAULT}"
- else
- if [ -e "${DEFAULT}" ] && find "${DEFAULT}" -maxdepth 0 -empty > /dev/null 2>&1
- then
- rmdir "${DEFAULT}"
- ln -s "${TARGET}" "${DEFAULT}"
- fi
- fi
- fi
-
- if ! dpkg-statoverride --list "${DEFAULT}" > /dev/null 2>&1 &&
- ! dpkg-statoverride --list "${TARGET}" > /dev/null 2>&1
- then
- chmod 0700 "${TARGET}"
- chown root:root "${TARGET}"
-
- chmod 0700 "${DEFAULT}"
- chown root:root "${DEFAULT}"
- fi
-}
-
-case "${1}" in
- configure)
- update-alternatives --quiet --install /usr/share/open-infrastructure/container/scripts/default container_script /usr/share/open-infrastructure/container/scripts/curl 1000
- update-alternatives --quiet --install /usr/share/open-infrastructure/container/scripts/default container_script /usr/share/open-infrastructure/container/scripts/mmdebstrap 2000
- update-alternatives --quiet --install /usr/share/open-infrastructure/container/scripts/default container_script /usr/share/open-infrastructure/container/scripts/debootstrap 3000
- update-alternatives --quiet --install /usr/share/open-infrastructure/container/scripts/default container_script /usr/share/open-infrastructure/container/scripts/progress-linux 4000
- update-alternatives --quiet --install /usr/share/open-infrastructure/container/scripts/default container_script /usr/share/open-infrastructure/container/scripts/debian 5000
-
- . /usr/share/debconf/confmodule
-
- db_get open-infrastructure-container-tools/machines
- MACHINES="${RET:-/var/lib/machines}" # string (w/o empty)
-
- db_get open-infrastructure-container-tools/config
- CONFIG="${RET:-/etc/container-tools/config}" # string (w/o empty)
-
- db_get open-infrastructure-container-tools/debconf
- DEBCONF="${RET:-/etc/container-tools/debconf}" # string (w/o empty)
-
- db_get open-infrastructure-container-tools/hooks
- HOOKS="${RET:-/etc/container-tools/hooks}" # string (w/o empty)
-
- db_get open-infrastructure-container-tools/keys
- KEYS="${RET:-/etc/container-tools/keys}" # string (w/o empty)
-
- db_get open-infrastructure-container-tools/cache
- CACHE="${RET:-/var/cache/container-tools}" # string (w/o empty)
-
- db_get open-infrastructure-container-tools/script
- SCRIPT="${RET:-debian}" # string (w/o empty)
-
- db_get open-infrastructure-container-tools/irc
- IRK_TARGETS="${RET}" # string (w/ empty)
-
- db_stop
-
- Install "/var/lib/machines" "${MACHINES}"
- Install "/etc/open-infrastructure/container/config" "${CONFIG}"
- Install "/etc/open-infrastructure/container/debconf" "${DEBCONF}"
- Install "/etc/open-infrastructure/container/hooks" "${HOOKS}"
- Install "/etc/open-infrastructure/container/keys" "${KEYS}"
- Install "/var/cache/open-infrastructure/container" "${CACHE}"
-
- update-alternatives --quiet --set container_script "/usr/share/open-infrastructure/container/scripts/${SCRIPT}"
-
- if [ ! -e "${CONFFILE}" ]
- then
-
-cat > "${CONFFILE}" << EOF
-# ${CONFFILE}
-
-IRK_TARGETS="${IRK_TARGETS}"
-EOF
-
- fi
-
- cp -a -f "${CONFFILE}" "${CONFFILE}.tmp"
-
- # If the admin deleted or commented some variables but then set
- # them via debconf, (re-)add them to the config file.
-
- test -z "${IRK_TARGETS}" || \
- grep -Eq '^ *IRK_TARGETS=' "${CONFFILE}" || \
- echo "IRK_TARGETS=" >> "${CONFFILE}"
-
- sed -e "s|^ *IRK_TARGETS=.*|IRK_TARGETS=\"${IRK_TARGETS}\"|" \
- < "${CONFFILE}" > "${CONFFILE}.tmp"
-
- mv -f "${CONFFILE}.tmp" "${CONFFILE}"
-
- if [ -x /sbin/sysctl ]
- then
- sysctl -q -p /etc/sysctl.d/zz-container.conf
- fi
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
-
- ;;
-
- *)
- echo "postinst called with unknown argument \`${1}'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/open-infrastructure-container-tools.prerm b/debian/open-infrastructure-container-tools.prerm
deleted file mode 100755
index 49a9470..0000000
--- a/debian/open-infrastructure-container-tools.prerm
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-set -e
-
-case "${1}" in
- remove|upgrade|deconfigure)
- update-alternatives --quiet --remove container_script /usr/share/open-infrastructure/container/scripts/curl
- update-alternatives --quiet --remove container_script /usr/share/open-infrastructure/container/scripts/mmdebstrap
- update-alternatives --quiet --remove container_script /usr/share/open-infrastructure/container/scripts/debootstrap
- update-alternatives --quiet --remove container_script /usr/share/open-infrastructure/container/scripts/progress-linux
- update-alternatives --quiet --remove container_script /usr/share/open-infrastructure/container/scripts/debian
- ;;
-
- failed-upgrade)
-
- ;;
-
- *)
- echo "prerm called with unknown argument \`${1}'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/open-infrastructure-container-tools.templates b/debian/open-infrastructure-container-tools.templates
deleted file mode 100644
index d251028..0000000
--- a/debian/open-infrastructure-container-tools.templates
+++ /dev/null
@@ -1,86 +0,0 @@
-Template: open-infrastructure-container-tools/title
-Type: title
-_Description: container-tools: Setup
-
-Template: open-infrastructure-container-tools/machines
-Type: string
-_Default: /var/lib/machines
-_Description: machines directory:
- Please specify the directory that will be used to store the containers.
- .
- If unsure, use /var/lib/machines (default) or /srv/container/system
- when using shared storage.
-
-Template: open-infrastructure-container-tools/config
-Type: string
-_Default: /etc/open-infrastructure/container/config
-_Description: config directory:
- Please specify the directory that will be used to store the container
- configuration files.
- .
- If unsure, use /etc/open-infrastructure/container/config (default) or
- /srv/container/config when using shared storage.
-
-Template: open-infrastructure-container-tools/debconf
-Type: string
-_Default: /etc/open-infrastructure/container/debconf
-_Description: debconf directory:
- Please specify the directory that will be used to store the container
- preseed files.
- .
- If unsure, use /etc/open-infrastructure/container/debconf (default) or
- /srv/container/debconf when using shared storage.
-
-Template: open-infrastructure-container-tools/hooks
-Type: string
-_Default: /etc/open-infrastructure/container/hooks
-_Description: debconf directory:
- Please specify the directory that will be used to store the container
- hooks.
- .
- If unsure, use /etc/open-infrastructure/container/hooks (default) or
- /srv/container/hooks when using shared storage.
-
-Template: open-infrastructure-container-tools/keys
-Type: string
-_Default: /etc/open-infrastructure/container/keys
-_Description: debconf directory:
- Please specify the directory that will be used to store the container
- keys for verifying container image downloads.
- .
- If unsure, use /etc/open-infrastructure/container/keys (default) or
- /srv/container/keys when using shared storage.
-
-Template: open-infrastructure-container-tools/cache
-Type: string
-_Default: /var/cache/open-infrastructure/container
-_Description: cache directory:
- Please specify the directory that will be used to cache files during
- creation of containers.
- .
- If unsure, use /var/cache/open-infrastructure/container (default) or
- /srv/container/cache when using shared storage.
-
-Template: open-infrastructure-container-tools/script
-Type: select
-_Choices: ${SCRIPT_CHOICES}
-Default: ${SCRIPT_DEFAULT}
-_Description: create script:
- Please select the script that will be used by default to create
- containers.
- .
- If unsure, use debian (default).
-
-Template: open-infrastructure-container-tools/irc
-Type: string
-_Default:
-_Description: IRC notifications:
- The container command can send IRC notifications via irker to one or more
- (whitespace separated) IRC channels.
- .
- The following example will send IRC notifications to the
- open-infrastructure channel on irc.oftc.net:
- .
- irc://irc.oftc.net:6668/open-infrastructure
- .
- If unsure, leave empty (default).
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e76f4e8
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+upstream/0001-host-variable.patch
+upstream/0002-versioned-sort.patch
diff --git a/debian/patches/upstream/0001-host-variable.patch b/debian/patches/upstream/0001-host-variable.patch
new file mode 100644
index 0000000..53e9e6d
--- /dev/null
+++ b/debian/patches/upstream/0001-host-variable.patch
@@ -0,0 +1,42 @@
+Author: Daniel Baumann <daniel.baumann@progress-linux.org>
+Description: Adding host variable for preseed files.
+
+diff -Naurp open-infrastructure-compute-tools.orig/share/build-scripts/debconf open-infrastructure-compute-tools/share/build-scripts/debconf
+--- open-infrastructure-compute-tools.orig/share/build-scripts/debconf
++++ open-infrastructure-compute-tools/share/build-scripts/debconf
+@@ -123,6 +123,8 @@ then
+ exit 1
+ fi
+
++HOST="$(echo ${NAME} | cut -d. -f1)"
++
+ Mount ()
+ {
+ # Mounting rw bind mounts
+@@ -686,6 +688,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 +1188,7 @@ trap 'Umount' EXIT HUP INT QUIT TERM
+ umask 0022
+
+ export NAME
++export HOST
+
+ Debconf
+
+diff -Naurp open-infrastructure-compute-tools.orig/share/build-scripts/debconf.d/0002-preseed-debconf open-infrastructure-compute-tools/share/build-scripts/debconf.d/0002-preseed-debconf
+--- open-infrastructure-compute-tools.orig/share/build-scripts/debconf.d/0002-preseed-debconf
++++ open-infrastructure-compute-tools/share/build-scripts/debconf.d/0002-preseed-debconf
+@@ -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/debian/patches/upstream/0002-versioned-sort.patch b/debian/patches/upstream/0002-versioned-sort.patch
new file mode 100644
index 0000000..1f76b90
--- /dev/null
+++ b/debian/patches/upstream/0002-versioned-sort.patch
@@ -0,0 +1,12 @@
+diff -Naurp open-infrastructure-compute-tools.orig/libexec/container/list open-infrastructure-compute-tools/libexec/container/list
+--- open-infrastructure-compute-tools.orig/libexec/container/list 2023-02-14 21:43:48.782723940 +0100
++++ open-infrastructure-compute-tools/libexec/container/list 2023-04-16 08:04:02.277215515 +0200
+@@ -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/debian/po/POTFILES.in b/debian/po/POTFILES.in
index dc34e24..425e021 100644
--- a/debian/po/POTFILES.in
+++ b/debian/po/POTFILES.in
@@ -1 +1 @@
-[type: gettext/rfc822deb] open-infrastructure-container-tools.templates
+[type: gettext/rfc822deb] open-infrastructure-compute-tools.templates
diff --git a/debian/po/de.po b/debian/po/de.po
index 7e777ba..7479291 100644
--- a/debian/po/de.po
+++ b/debian/po/de.po
@@ -1,13 +1,13 @@
-# German debconf translation of open-infrastructure-container-tools
-# Copyright (C) 2017 Markus Hiereth <markus.hiereth@freenet.de>
-# This file is distributed under the same license as the open-infrastructure-container-tools package.
+# German debconf translation of open-infrastructure-compute-tools
+# Copyright (C) 2017-2022 Markus Hiereth <translation@hiereth.de>
+# This file is distributed under the same license as the open-infrastructure-compute-tools package.
#
msgid ""
msgstr ""
-"Project-Id-Version: open-infrastructure-container-tools 20180527-1\n"
+"Project-Id-Version: open-infrastructure-compute-tools 20221002-1\n"
"Report-Msgid-Bugs-To: open-infrastructure-compute-tools@packages.debian.org\n"
-"POT-Creation-Date: 2019-02-23 16:47+0100\n"
-"PO-Revision-Date: 2018-08-06 21:31+0200\n"
+"POT-Creation-Date: 2022-10-02 15:20+0200\n"
+"PO-Revision-Date: 2022-10-13 22:10+0200\n"
"Last-Translator: Markus Hiereth <translation@hiereth.de>\n"
"Language-Team: debian-l10n-german <debian-l10n-german@lists.debian.org>\n"
"Language: de\n"
@@ -18,32 +18,26 @@ msgstr ""
#. Type: title
#. Description
-#: ../open-infrastructure-container-tools.templates:1001
-msgid "container-tools: Setup"
-msgstr "container-tools: Einrichtung"
-
-#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:2001
-msgid "/var/lib/machines"
-msgstr "/var/lib/machines"
+#: ../open-infrastructure-compute-tools.templates:1001
+msgid "compute-tools: Setup"
+msgstr "compute-tools: Einrichtung"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid "machines directory:"
-msgstr "Machines-Verzeichnis:"
+msgstr "Maschinen-Verzeichnis:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid "Please specify the directory that will be used to store the containers."
msgstr ""
"Bitte geben Sie das zum Speichern von Containern vorgesehene Verzeichnis an."
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid ""
"If unsure, use /var/lib/machines (default) or /srv/container/system when "
"using shared storage."
@@ -52,20 +46,14 @@ msgstr ""
"machines oder für gemeinsam benutzten Speicher /srv/container/system."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:3001
-msgid "/etc/open-infrastructure/container/config"
-msgstr "/etc/open-infrastructure/container/config"
-
-#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid "config directory:"
msgstr "Konfigurationsverzeichnis:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid ""
"Please specify the directory that will be used to store the container "
"configuration files."
@@ -75,35 +63,23 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/config (default) or /srv/"
-"container/config when using shared storage."
+"If unsure, use /etc/compute-tools/config (default) or /srv/container/config "
+"when using shared storage."
msgstr ""
-"Wenn Sie unsicher sind, verwenden Sie das Standardverzeichnis /etc/open-"
-"infrastructure/container/config oder für gemeinsam benutzten Speicher /srv/container/config."
-
-#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:4001
-msgid "/etc/open-infrastructure/container/debconf"
-msgstr "/etc/open-infrastructure/container/debconf"
+"Wenn Sie unsicher sind, verwenden Sie das Standardverzeichnis /etc/compute-"
+"tools/config oder für gemeinsam benutzten Speicher /srv/container/config."
#. Type: string
#. Description
-#. Type: string
-#. Description
-#. Type: string
-#. Description
-#: ../open-infrastructure-container-tools.templates:4002
-#: ../open-infrastructure-container-tools.templates:5002
-#: ../open-infrastructure-container-tools.templates:6002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid "debconf directory:"
-msgstr "Verzeichnis des Konfigurationssystems für Debian-Pakete:"
+msgstr "Debconf-Verzeichnis:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:4002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid ""
"Please specify the directory that will be used to store the container "
"preseed files."
@@ -113,23 +89,23 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:4002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/debconf (default) or /srv/"
-"container/debconf when using shared storage."
+"If unsure, use /etc/compute-tools/debconf (default) or /srv/container/"
+"debconf when using shared storage."
msgstr ""
-"Wenn Sie unsicher sind, verwenden Sie das Standardverzeichnis /etc/open-"
-"infrastructure/container/debconf oder /srv/container/debconf für gemeinsam benutzten Speicher."
+"Wenn Sie unsicher sind, verwenden Sie das Standardverzeichnis /etc/compute-"
+"tools/debconf oder /srv/container/debconf für gemeinsam benutzten Speicher."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:5001
-msgid "/etc/open-infrastructure/container/hooks"
-msgstr "/etc/open-infrastructure/container/hooks"
+#. Description
+#: ../open-infrastructure-compute-tools.templates:5001
+msgid "hooks directory:"
+msgstr "Container-Hooks-Verzeichnis:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:5002
+#: ../open-infrastructure-compute-tools.templates:5001
msgid ""
"Please specify the directory that will be used to store the container hooks."
msgstr ""
@@ -138,23 +114,23 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:5002
+#: ../open-infrastructure-compute-tools.templates:5001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/hooks (default) or /srv/"
-"container/hooks when using shared storage."
+"If unsure, use /etc/compute-tools/hooks (default) or /srv/container/hooks "
+"when using shared storage."
msgstr ""
-"Wenn Sie unsicher sind, verwenden Sie das Standardverzeichnis /etc/open-"
-"infrastructure/container/hooks oder für gemeinsam benutzten Speicher /srv/container/hooks."
+"Wenn Sie unsicher sind, verwenden Sie das Standardverzeichnis /etc/compute-"
+"tools/hooks oder für gemeinsam benutzten Speicher /srv/container/hooks."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:6001
-msgid "/etc/open-infrastructure/container/keys"
-msgstr "/etc/open-infrastructure/container/keys"
+#. Description
+#: ../open-infrastructure-compute-tools.templates:6001
+msgid "keys directory:"
+msgstr "Container-Schlüssel-Verzeichnis:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:6002
+#: ../open-infrastructure-compute-tools.templates:6001
msgid ""
"Please specify the directory that will be used to store the container keys "
"for verifying container image downloads."
@@ -164,61 +140,76 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:6002
+#: ../open-infrastructure-compute-tools.templates:6001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/keys (default) or /srv/"
-"container/keys when using shared storage."
+"If unsure, use /etc/compute-tools/keys (default) or /srv/container/keys when "
+"using shared storage."
msgstr ""
-"Wenn Sie unsicher sind, verwenden Sie das Standardverzeichnis /etc/open-"
-"infrastructure/container/keys oder /srv/container/keys für gemeinsam benutzten Speicher."
-
-#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:7001
-msgid "/var/cache/open-infrastructure/container"
-msgstr "/var/cache/open-infrastructure/container"
+"Wenn Sie unsicher sind, verwenden Sie das Standardverzeichnis /etc/compute-"
+"tools/keys oder /srv/container/keys für gemeinsam benutzten Speicher."
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
msgid "cache directory:"
msgstr "Zwischenspeicher-Verzeichnis:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
msgid ""
"Please specify the directory that will be used to cache files during "
"creation of containers."
msgstr ""
"Bitte geben Sie das Verzeichnis an, in das während der Erzeugung von "
-"Containern Dateien zwischengespeichern werden sollen."
+"Containern Dateien zwischengespeichert werden sollen."
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
msgid ""
-"If unsure, use /var/cache/open-infrastructure/container (default) or /srv/"
-"container/cache when using shared storage."
+"If unsure, use /var/cache/container (default) or /srv/container/cache when "
+"using shared storage."
msgstr ""
"Wenn Sie unsicher sind, verwenden Sie das Standardverzeichnis /var/cache/"
-"open-infrastructure/container oder für gemeinsam benutzten Speicher /srv/container/cache."
+"container oder für gemeinsam benutzten Speicher /srv/container/cache."
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
+msgid "Do you want system-wide readable container directories?"
+msgstr "Sollen die Container-Verzeichnisse systemweit lesbar sein?"
#. Type: select
-#. Choices
-#: ../open-infrastructure-container-tools.templates:8001
-msgid "${SCRIPT_CHOICES}"
-msgstr "${SCRIPT_CHOICES}"
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
+msgid ""
+"By default, the machines directory (and a few non-critical additional "
+"directories such as 'cache' and 'config') is only readable by the root user. "
+"If you want any user to be able to see what machines are available, you can "
+"select read-only instead of root-only (default)."
+msgstr ""
+"Standardmäßig sind das Verzeichnis für die Maschinen (und einige wenige, "
+"nicht kritische zusätzliche Verzeichnisse wie das zum Zwischenspeichern und "
+"für Konfigurationsdateien) nur für Systemverwalter lesbar. Wenn jeder "
+"Benutzer sehen können soll, welche Maschinen verfügbar sind, können Sie "
+"»read-only« anstelle des voreingestellten »root-only« wählen."
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
+msgid "If unsure, leave at root-only (default)."
+msgstr "Wenn Sie unsicher sind, belassen Sie es bei der Vorgabe »root-only«."
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
-msgid "create script:"
-msgstr "Erzeugungs-Skript:"
+#: ../open-infrastructure-compute-tools.templates:9001
+msgid "default build script:"
+msgstr "Standard-Erzeugungs-Skript:"
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
+#: ../open-infrastructure-compute-tools.templates:9001
msgid ""
"Please select the script that will be used by default to create containers."
msgstr ""
@@ -227,44 +218,44 @@ msgstr ""
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
+#: ../open-infrastructure-compute-tools.templates:9001
msgid "If unsure, use debian (default)."
msgstr "Wenn Sie unsicher sind, verwenden Sie das Standardskript debian."
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid "IRC notifications:"
msgstr "IRC-Benachrichtigungen:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid ""
"The container command can send IRC notifications via irker to one or more "
"(whitespace separated) IRC channels."
msgstr ""
"Der Befehl container kann mittels irker auf einem oder mehreren IRC-Kanälen "
-"(durch Leerzeichen getrennte Auflistung) Benachrichtigungen senden."
+"(durch Leerraumzeichen getrennte Auflistung) Benachrichtigungen senden."
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid ""
"The following example will send IRC notifications to the open-infrastructure "
"channel on irc.oftc.net:"
msgstr ""
-"Beispielsweise sendet folgende Eingabe IRC-Benachrichtigungen im Kanalopen-"
+"Beispielsweise sendet folgende Eingabe IRC-Benachrichtigungen im Kanal open-"
"infrastructure auf irc.oftc.net:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid " irc://irc.oftc.net:6668/open-infrastructure"
msgstr " irc://irc.oftc.net:6668/open-infrastructure"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid "If unsure, leave empty (default)."
msgstr "Wenn Sie unsicher sind, geben Sie nichts ein (Standardeinstellung)."
diff --git a/debian/po/es.po b/debian/po/es.po
new file mode 100644
index 0000000..0e10de7
--- /dev/null
+++ b/debian/po/es.po
@@ -0,0 +1,262 @@
+# Spanish debconf translation of open-infrastructure-compute-tools
+# Copyright (C) 2021-2022 Camaleón <noelamac@gmail.com>
+# This file is distributed under the same license as the open-infrastructure-compute-tools package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: open-infrastructure-compute-tools 202210023-1\n"
+"Report-Msgid-Bugs-To: open-infrastructure-compute-tools@packages.debian.org\n"
+"POT-Creation-Date: 2022-10-02 15:20+0200\n"
+"PO-Revision-Date: 2022-11-22 19:28+0100\n"
+"Last-Translator: Camaleón <noelamac@gmail.com>\n"
+"Language-Team: Debian Spanish <debian-l10n-spanish@lists.debian.org>\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: title
+#. Description
+#: ../open-infrastructure-compute-tools.templates:1001
+msgid "compute-tools: Setup"
+msgstr "compute-tools: Configuración"
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:2001
+msgid "machines directory:"
+msgstr "directorio de máquinas virtuales:"
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:2001
+msgid "Please specify the directory that will be used to store the containers."
+msgstr ""
+"Por favor, indique el directorio que se usará para almacenar los "
+"contenedores."
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:2001
+msgid ""
+"If unsure, use /var/lib/machines (default) or /srv/container/system when "
+"using shared storage."
+msgstr ""
+"Si no está seguro, utilice «/var/lib/machines» (predeterminado) o «/srv/"
+"container/system» si usa un almacenamiento compartido."
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:3001
+msgid "config directory:"
+msgstr "directorio de configuración:"
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:3001
+msgid ""
+"Please specify the directory that will be used to store the container "
+"configuration files."
+msgstr ""
+"Por favor, indique el directorio que se usará para almacenar los archivos de "
+"configuración del contenedor."
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:3001
+msgid ""
+"If unsure, use /etc/compute-tools/config (default) or /srv/container/config "
+"when using shared storage."
+msgstr ""
+"Si no está seguro, utilice «/etc/compute-tools/config/"
+"config» (predeterminado) o «/srv/container/config» si usa un almacenamiento "
+"compartido."
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:4001
+msgid "debconf directory:"
+msgstr "directorio para debconf:"
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:4001
+msgid ""
+"Please specify the directory that will be used to store the container "
+"preseed files."
+msgstr ""
+"Por favor, indique el directorio que se usará para almacenar los archivos de "
+"preconfiguración (preseed) del contenedor."
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:4001
+msgid ""
+"If unsure, use /etc/compute-tools/debconf (default) or /srv/container/"
+"debconf when using shared storage."
+msgstr ""
+"Si no está seguro, utilice «/etc/compute-tools/debconf» (predeterminado) o «/"
+"srv/container/debconf» si usa un almacenamiento compartido."
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:5001
+msgid "hooks directory:"
+msgstr "directorio de archivos de órdenes (hooks):"
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:5001
+msgid ""
+"Please specify the directory that will be used to store the container hooks."
+msgstr ""
+"Por favor, indique el directorio que se usará para almacenar los archivos de "
+"órdenes (hooks) del contenedor."
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:5001
+msgid ""
+"If unsure, use /etc/compute-tools/hooks (default) or /srv/container/hooks "
+"when using shared storage."
+msgstr ""
+"Si no está seguro, utilice «/etc/compute-tools/hooks» (predeterminado) o «/"
+"srv/container/hooks» si usa un almacenamiento compartido."
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:6001
+msgid "keys directory:"
+msgstr "directorio de claves:"
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:6001
+msgid ""
+"Please specify the directory that will be used to store the container keys "
+"for verifying container image downloads."
+msgstr ""
+"Por favor, indique el directorio que se usará para almacenar las claves del "
+"contenedor para verificar las descargas de imágenes del contenedor."
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:6001
+msgid ""
+"If unsure, use /etc/compute-tools/keys (default) or /srv/container/keys when "
+"using shared storage."
+msgstr ""
+"Si no está seguro, utilice «/etc/compute-tools/keys» (predeterminado) o «/"
+"srv/container/keys» si usa un almacenamiento compartido."
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:7001
+msgid "cache directory:"
+msgstr "directorio de caché:"
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:7001
+msgid ""
+"Please specify the directory that will be used to cache files during "
+"creation of containers."
+msgstr ""
+"Por favor, indique el directorio que se usará para almacenar en caché los "
+"archivos durante la creación de los contenedores."
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:7001
+msgid ""
+"If unsure, use /var/cache/container (default) or /srv/container/cache when "
+"using shared storage."
+msgstr ""
+"Si no está seguro, utilice «/var/cache/container» (predeterminado) o «/srv/"
+"container/cache» si usa un almacenamiento compartido."
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
+msgid "Do you want system-wide readable container directories?"
+msgstr "¿Quiere que los directorios de contenedores sean legibles por todos?"
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
+msgid ""
+"By default, the machines directory (and a few non-critical additional "
+"directories such as 'cache' and 'config') is only readable by the root user. "
+"If you want any user to be able to see what machines are available, you can "
+"select read-only instead of root-only (default)."
+msgstr ""
+"De manera predeterminada, el directorio de las máquinas (y algunos "
+"directorios adicionales no críticos como «cache» y «config») tiene permisos "
+"de lectura sólo para el súperusuario. Si quiere que cualquier usuario pueda "
+"ver las máquinas disponibles, puede seleccionar «read-only» en lugar de "
+"«root-only» (opción predeterminada)."
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
+msgid "If unsure, leave at root-only (default)."
+msgstr "Si no está seguro, déjelo en «root-only» (predeterminado)."
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:9001
+msgid "default build script:"
+msgstr "guión de creación predeterminado:"
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:9001
+msgid ""
+"Please select the script that will be used by default to create containers."
+msgstr ""
+"Por favor, indique el guión que se usará de manera predeterminada para crear "
+"los contenedores."
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:9001
+msgid "If unsure, use debian (default)."
+msgstr "Si no está seguro, use debian (predeterminado)."
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:10001
+msgid "IRC notifications:"
+msgstr "Notificaciones IRC:"
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:10001
+msgid ""
+"The container command can send IRC notifications via irker to one or more "
+"(whitespace separated) IRC channels."
+msgstr ""
+"La orden container puede enviar notificaciones IRC a través de irker a uno o "
+"más canales IRC (separados por comas)."
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:10001
+msgid ""
+"The following example will send IRC notifications to the open-infrastructure "
+"channel on irc.oftc.net:"
+msgstr ""
+"El siguiente ejemplo enviará notificaciones IRC al canal open-infrastructure "
+"en «irc.oftc.net»:"
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:10001
+msgid " irc://irc.oftc.net:6668/open-infrastructure"
+msgstr " irc://irc.oftc.net:6668/open-infrastructure"
+
+#. Type: string
+#. Description
+#: ../open-infrastructure-compute-tools.templates:10001
+msgid "If unsure, leave empty (default)."
+msgstr "Si no está seguro, déjelo en blanco (predeterminado)."
diff --git a/debian/po/fr.po b/debian/po/fr.po
index f3ef6ac..63da67c 100644
--- a/debian/po/fr.po
+++ b/debian/po/fr.po
@@ -1,12 +1,12 @@
-# French translation of open-infrastructure-container-tools debconf templates.
+# French translation of open-infrastructure-compute-tools debconf templates.
# Copyright (C) 2016-2019 Jean-Pierre Giraud <jean-pierregiraud@neuf.fr>
-# This file is distributed under the same license as the open-infrastructure-container-tools package.
+# This file is distributed under the same license as the open-infrastructure-compute-tools package.
#
msgid ""
msgstr ""
-"Project-Id-Version: open-infrastructure-container-tools\n"
+"Project-Id-Version: open-infrastructure-compute-tools\n"
"Report-Msgid-Bugs-To: open-infrastructure-compute-tools@packages.debian.org\n"
-"POT-Creation-Date: 2019-02-23 16:47+0100\n"
+"POT-Creation-Date: 2022-10-02 15:20+0200\n"
"PO-Revision-Date: 2019-06-06 23:50+0100\n"
"Last-Translator: Jean-Pierre Giraud <jean-pierregiraud@neuf.fr>\n"
"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
@@ -18,32 +18,26 @@ msgstr ""
#. Type: title
#. Description
-#: ../open-infrastructure-container-tools.templates:1001
-msgid "container-tools: Setup"
-msgstr "container-tools : configuration"
-
-#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:2001
-msgid "/var/lib/machines"
-msgstr "/var/lib/machines"
+#: ../open-infrastructure-compute-tools.templates:1001
+msgid "compute-tools: Setup"
+msgstr "compute-tools : configuration"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid "machines directory:"
msgstr "Répertoire des machines :"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid "Please specify the directory that will be used to store the containers."
msgstr ""
"Veuillez indiquer le répertoire qui sera utilisé pour stocker les conteneurs."
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid ""
"If unsure, use /var/lib/machines (default) or /srv/container/system when "
"using shared storage."
@@ -52,20 +46,14 @@ msgstr ""
"container/system si vous utilisez un stockage partagé."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:3001
-msgid "/etc/open-infrastructure/container/config"
-msgstr "/etc/open-infrastructure/container/config"
-
-#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid "config directory:"
msgstr "Répertoire de configuration :"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid ""
"Please specify the directory that will be used to store the container "
"configuration files."
@@ -75,36 +63,23 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/config (default) or /srv/"
-"container/config when using shared storage."
+"If unsure, use /etc/compute-tools/config (default) or /srv/container/config "
+"when using shared storage."
msgstr ""
-"En cas de doute, utilisez /etc/open-infrastructure/container/config "
-"(répertoire par défaut) ou /srv/container/config si vous utilisez un "
-"stockage partagé."
+"En cas de doute, utilisez /etc/compute-tools/config (répertoire par défaut) "
+"ou /srv/container/config si vous utilisez un stockage partagé."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:4001
-msgid "/etc/open-infrastructure/container/debconf"
-msgstr "/etc/open-infrastructure/container/debconf"
-
-#. Type: string
-#. Description
-#. Type: string
#. Description
-#. Type: string
-#. Description
-#: ../open-infrastructure-container-tools.templates:4002
-#: ../open-infrastructure-container-tools.templates:5002
-#: ../open-infrastructure-container-tools.templates:6002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid "debconf directory:"
msgstr "Répertoire de la configuration Debian :"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:4002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid ""
"Please specify the directory that will be used to store the container "
"preseed files."
@@ -114,24 +89,25 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:4002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/debconf (default) or /srv/"
-"container/debconf when using shared storage."
+"If unsure, use /etc/compute-tools/debconf (default) or /srv/container/"
+"debconf when using shared storage."
msgstr ""
-"En cas de doute, utilisez /etc/open-infrastructure/container/debconf "
-"(répertoire par défaut) ou /srv/container/debconf si vous utilisez un "
-"stockage partagé."
+"En cas de doute, utilisez /etc/compute-tools/debconf (répertoire par défaut) "
+"ou /srv/container/debconf si vous utilisez un stockage partagé."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:5001
-msgid "/etc/open-infrastructure/container/hooks"
-msgstr "/etc/open-infrastructure/container/hooks"
+#. Description
+#: ../open-infrastructure-compute-tools.templates:5001
+#, fuzzy
+#| msgid "cache directory:"
+msgid "hooks directory:"
+msgstr "Répertoire cache :"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:5002
+#: ../open-infrastructure-compute-tools.templates:5001
msgid ""
"Please specify the directory that will be used to store the container hooks."
msgstr ""
@@ -140,30 +116,25 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:5002
+#: ../open-infrastructure-compute-tools.templates:5001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/hooks (default) or /srv/"
-"container/hooks when using shared storage."
+"If unsure, use /etc/compute-tools/hooks (default) or /srv/container/hooks "
+"when using shared storage."
msgstr ""
-"En cas de doute, utilisez /etc/open-infrastructure/container/hooks "
-"(répertoire par défaut) ou /srv/container/hooks si vous utilisez un stockage "
-"partagé."
+"En cas de doute, utilisez /etc/compute-tools/hooks (répertoire par défaut) "
+"ou /srv/container/hooks si vous utilisez un stockage partagé."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:6001
+#. Description
+#: ../open-infrastructure-compute-tools.templates:6001
#, fuzzy
-#| msgid "/etc/open-infrastructure/container/hooks"
-msgid "/etc/open-infrastructure/container/keys"
-msgstr "/etc/open-infrastructure/container/hooks"
+#| msgid "cache directory:"
+msgid "keys directory:"
+msgstr "Répertoire cache :"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:6002
-#, fuzzy
-#| msgid ""
-#| "Please specify the directory that will be used to store the container "
-#| "configuration files."
+#: ../open-infrastructure-compute-tools.templates:6001
msgid ""
"Please specify the directory that will be used to store the container keys "
"for verifying container image downloads."
@@ -173,34 +144,23 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:6002
-#, fuzzy
-#| msgid ""
-#| "If unsure, use /etc/open-infrastructure/container/hooks (default) or /srv/"
-#| "container/hooks when using shared storage."
+#: ../open-infrastructure-compute-tools.templates:6001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/keys (default) or /srv/"
-"container/keys when using shared storage."
+"If unsure, use /etc/compute-tools/keys (default) or /srv/container/keys when "
+"using shared storage."
msgstr ""
-"En cas de doute, utilisez /etc/open-infrastructure/container/hooks "
-"(répertoire par défaut) ou /srv/container/hooks si vous utilisez un stockage "
-"partagé."
-
-#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:7001
-msgid "/var/cache/open-infrastructure/container"
-msgstr "/var/cache/open-infrastructure/container"
+"En cas de doute, utilisez /etc/compute-tools/hooks (répertoire par défaut) "
+"ou /srv/container/hooks si vous utilisez un stockage partagé."
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
msgid "cache directory:"
msgstr "Répertoire cache :"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
msgid ""
"Please specify the directory that will be used to cache files during "
"creation of containers."
@@ -210,30 +170,49 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
msgid ""
-"If unsure, use /var/cache/open-infrastructure/container (default) or /srv/"
-"container/cache when using shared storage."
+"If unsure, use /var/cache/container (default) or /srv/container/cache when "
+"using shared storage."
msgstr ""
-"En cas de doute, utilisez /var/cache/open-infrastructure/container "
-"(répertoire par défaut) ou /srv/container/cache si vous utilisez un stockage "
-"partagé."
+"En cas de doute, utilisez /var/cache/container (répertoire par défaut) ou /"
+"srv/container/cache si vous utilisez un stockage partagé."
#. Type: select
-#. Choices
-#: ../open-infrastructure-container-tools.templates:8001
-msgid "${SCRIPT_CHOICES}"
-msgstr "${SCRIPT_CHOICES}"
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
+msgid "Do you want system-wide readable container directories?"
+msgstr ""
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
-msgid "create script:"
+#: ../open-infrastructure-compute-tools.templates:8001
+msgid ""
+"By default, the machines directory (and a few non-critical additional "
+"directories such as 'cache' and 'config') is only readable by the root user. "
+"If you want any user to be able to see what machines are available, you can "
+"select read-only instead of root-only (default)."
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
+#, fuzzy
+#| msgid "If unsure, leave empty (default)."
+msgid "If unsure, leave at root-only (default)."
+msgstr "En cas de doute, laissez le champ vide (par défaut)."
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:9001
+#, fuzzy
+#| msgid "create script:"
+msgid "default build script:"
msgstr "Script à créer :"
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
+#: ../open-infrastructure-compute-tools.templates:9001
msgid ""
"Please select the script that will be used by default to create containers."
msgstr ""
@@ -242,19 +221,19 @@ msgstr ""
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
+#: ../open-infrastructure-compute-tools.templates:9001
msgid "If unsure, use debian (default)."
msgstr "En cas de doute, utilisez debian (par défaut)."
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid "IRC notifications:"
msgstr "Notifications IRC :"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid ""
"The container command can send IRC notifications via irker to one or more "
"(whitespace separated) IRC channels."
@@ -264,7 +243,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid ""
"The following example will send IRC notifications to the open-infrastructure "
"channel on irc.oftc.net:"
@@ -274,12 +253,12 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid " irc://irc.oftc.net:6668/open-infrastructure"
msgstr " irc://irc.oftc.net:6668/open-infrastructure"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid "If unsure, leave empty (default)."
msgstr "En cas de doute, laissez le champ vide (par défaut)."
diff --git a/debian/po/nl.po b/debian/po/nl.po
index 91cf2f2..498ab19 100644
--- a/debian/po/nl.po
+++ b/debian/po/nl.po
@@ -1,13 +1,13 @@
-# Dutch translation of open-infrastructure-container-tools debconf templates.
-# Copyright (C) 2016-2019 Frans Spiesschaert <Frans.Spiesschaert@yucom.be>
-# This file is distributed under the same license as the open-infrastructure-container-tools package.
+# Dutch translation of open-infrastructure-compute-tools debconf templates.
+# Copyright (C) 2016-2022 Frans Spiesschaert <Frans.Spiesschaert@yucom.be>
+# This file is distributed under the same license as the open-infrastructure-compute-tools package.
#
msgid ""
msgstr ""
-"Project-Id-Version: open-infrastructure-container-tools\n"
+"Project-Id-Version: open-infrastructure-compute-tools_20221023-1\n"
"Report-Msgid-Bugs-To: open-infrastructure-compute-tools@packages.debian.org\n"
-"POT-Creation-Date: 2019-02-23 16:47+0100\n"
-"PO-Revision-Date: 2019-02-25 20:37+0100\n"
+"POT-Creation-Date: 2022-10-02 15:20+0200\n"
+"PO-Revision-Date: 2022-10-27 22:40+0200\n"
"Last-Translator: Frans Spiesschaert <Frans.Spiesschaert@yucom.be>\n"
"Language-Team: Debian Dutch l10n Team <debian-l10n-dutch@lists.debian.org>\n"
"Language: nl\n"
@@ -18,32 +18,26 @@ msgstr ""
#. Type: title
#. Description
-#: ../open-infrastructure-container-tools.templates:1001
-msgid "container-tools: Setup"
-msgstr "container-tools: Instellingen"
-
-#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:2001
-msgid "/var/lib/machines"
-msgstr "/var/lib/machines"
+#: ../open-infrastructure-compute-tools.templates:1001
+msgid "compute-tools: Setup"
+msgstr "compute-tools: Instellingen"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid "machines directory:"
msgstr "machinemap:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid "Please specify the directory that will be used to store the containers."
msgstr ""
"Geef op welke map gebruikt zal worden om de containers in onder te brengen."
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid ""
"If unsure, use /var/lib/machines (default) or /srv/container/system when "
"using shared storage."
@@ -52,20 +46,14 @@ msgstr ""
"container/system in het geval er gebruik gemaakt wordt van gedeelde opslag."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:3001
-msgid "/etc/open-infrastructure/container/config"
-msgstr "/etc/open-infrastructure/container/config"
-
-#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid "config directory:"
msgstr "configuratiemap:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid ""
"Please specify the directory that will be used to store the container "
"configuration files."
@@ -75,36 +63,23 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/config (default) or /srv/"
-"container/config when using shared storage."
+"If unsure, use /etc/compute-tools/config (default) or /srv/container/config "
+"when using shared storage."
msgstr ""
-"Indien u twijfelt, gebruik dan /etc/open-infrastructure/container/config "
-"(standaard) of /srv/container/config in het geval er gebruik gemaakt wordt "
-"van gedeelde opslag."
-
-#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:4001
-msgid "/etc/open-infrastructure/container/debconf"
-msgstr "/etc/open-infrastructure/container/debconf"
+"Indien u twijfelt, gebruik dan /etc/compute-tools/config (standaard) of /srv/"
+"container/config in het geval er gebruik gemaakt wordt van gedeelde opslag."
#. Type: string
#. Description
-#. Type: string
-#. Description
-#. Type: string
-#. Description
-#: ../open-infrastructure-container-tools.templates:4002
-#: ../open-infrastructure-container-tools.templates:5002
-#: ../open-infrastructure-container-tools.templates:6002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid "debconf directory:"
msgstr "debconf-map:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:4002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid ""
"Please specify the directory that will be used to store the container "
"preseed files."
@@ -114,24 +89,24 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:4002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/debconf (default) or /srv/"
-"container/debconf when using shared storage."
+"If unsure, use /etc/compute-tools/debconf (default) or /srv/container/"
+"debconf when using shared storage."
msgstr ""
-"Indien u twijfelt, gebruik dan /etc/open-infrastructure/container/debconf "
-"(standaard) of /srv/container/debconf in het geval er gebruik gemaakt wordt "
-"van gedeelde opslag."
+"Indien u twijfelt, gebruik dan /etc/compute-tools/debconf (standaard) of /"
+"srv/container/debconf in het geval er gebruik gemaakt wordt van gedeelde "
+"opslag."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:5001
-msgid "/etc/open-infrastructure/container/hooks"
-msgstr "/etc/open-infrastructure/container/hooks"
+#. Description
+#: ../open-infrastructure-compute-tools.templates:5001
+msgid "hooks directory:"
+msgstr "map met uitbreidingen:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:5002
+#: ../open-infrastructure-compute-tools.templates:5001
msgid ""
"Please specify the directory that will be used to store the container hooks."
msgstr ""
@@ -140,24 +115,23 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:5002
+#: ../open-infrastructure-compute-tools.templates:5001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/hooks (default) or /srv/"
-"container/hooks when using shared storage."
+"If unsure, use /etc/compute-tools/hooks (default) or /srv/container/hooks "
+"when using shared storage."
msgstr ""
-"Indien u twijfelt, gebruik dan /etc/open-infrastructure/container/hooks "
-"(standaard) of /srv/container/hooks in het geval er gebruik gemaakt wordt "
-"van gedeelde opslag."
+"Indien u twijfelt, gebruik dan /etc/compute-tools/hooks (standaard) of /srv/"
+"container/hooks in het geval er gebruik gemaakt wordt van gedeelde opslag."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:6001
-msgid "/etc/open-infrastructure/container/keys"
-msgstr "/etc/open-infrastructure/container/keys"
+#. Description
+#: ../open-infrastructure-compute-tools.templates:6001
+msgid "keys directory:"
+msgstr "map met sleutels:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:6002
+#: ../open-infrastructure-compute-tools.templates:6001
msgid ""
"Please specify the directory that will be used to store the container keys "
"for verifying container image downloads."
@@ -167,30 +141,23 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:6002
+#: ../open-infrastructure-compute-tools.templates:6001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/keys (default) or /srv/"
-"container/keys when using shared storage."
+"If unsure, use /etc/compute-tools/keys (default) or /srv/container/keys when "
+"using shared storage."
msgstr ""
-"Indien u twijfelt, gebruik dan /etc/open-infrastructure/container/keys "
-"(standaard) of /srv/container/keys in het geval er gebruik gemaakt wordt van "
-"gedeelde opslag."
-
-#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:7001
-msgid "/var/cache/open-infrastructure/container"
-msgstr "/var/cache/open-infrastructure/container"
+"Indien u twijfelt, gebruik dan /etc/compute-tools/keys (standaard) of /srv/"
+"container/keys in het geval er gebruik gemaakt wordt van gedeelde opslag."
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
msgid "cache directory:"
msgstr "cache-map:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
msgid ""
"Please specify the directory that will be used to cache files during "
"creation of containers."
@@ -200,30 +167,49 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
+msgid ""
+"If unsure, use /var/cache/container (default) or /srv/container/cache when "
+"using shared storage."
+msgstr ""
+"Indien u twijfelt, gebruik dan /var/cache/container (standaard) of /srv/"
+"container/cache in het geval er gebruik gemaakt wordt van gedeelde opslag."
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
+msgid "Do you want system-wide readable container directories?"
+msgstr "Wilt u systeembreed leesbare containermappen?"
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
msgid ""
-"If unsure, use /var/cache/open-infrastructure/container (default) or /srv/"
-"container/cache when using shared storage."
+"By default, the machines directory (and a few non-critical additional "
+"directories such as 'cache' and 'config') is only readable by the root user. "
+"If you want any user to be able to see what machines are available, you can "
+"select read-only instead of root-only (default)."
msgstr ""
-"Indien u twijfelt, gebruik dan /var/cache/open-infrastructure/container "
-"(standaard) of /srv/container/cache in het geval er gebruik gemaakt wordt "
-"van gedeelde opslag."
+"Standaard is de map machines (en een paar niet-kritieke extra mappen zoals "
+"'cache' en 'config') alleen leesbaar voor de root-gebruiker. Als u wilt dat "
+"elke gebruiker kan zien welke machines beschikbaar zijn, kunt u kiezen voor "
+"alleen-lezen in plaats van alleen-root (standaard)."
#. Type: select
-#. Choices
-#: ../open-infrastructure-container-tools.templates:8001
-msgid "${SCRIPT_CHOICES}"
-msgstr "${SCRIPT_CHOICES}"
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
+msgid "If unsure, leave at root-only (default)."
+msgstr "Als u twijfelt, laat u dit best staan op alleen-root (standaard)."
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
-msgid "create script:"
-msgstr "aanmaakscript:"
+#: ../open-infrastructure-compute-tools.templates:9001
+msgid "default build script:"
+msgstr "standaard aanmaakscript:"
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
+#: ../open-infrastructure-compute-tools.templates:9001
msgid ""
"Please select the script that will be used by default to create containers."
msgstr ""
@@ -231,19 +217,19 @@ msgstr ""
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
+#: ../open-infrastructure-compute-tools.templates:9001
msgid "If unsure, use debian (default)."
msgstr "Indien u twijfelt, gebruik dan debian (standaard)."
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid "IRC notifications:"
msgstr "Kennisgeving via IRC:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid ""
"The container command can send IRC notifications via irker to one or more "
"(whitespace separated) IRC channels."
@@ -253,7 +239,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid ""
"The following example will send IRC notifications to the open-infrastructure "
"channel on irc.oftc.net:"
@@ -263,12 +249,12 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid " irc://irc.oftc.net:6668/open-infrastructure"
msgstr " irc://irc.oftc.net:6668/open-infrastructure"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid "If unsure, leave empty (default)."
msgstr "Als u twijfelt, laat u dit best leeg (standaard)."
diff --git a/debian/po/pt.po b/debian/po/pt.po
index 4444a38..e1620ab 100644
--- a/debian/po/pt.po
+++ b/debian/po/pt.po
@@ -1,12 +1,12 @@
-# Portuguese translation of open-infrastructure-container-tools debconf templates.
+# Portuguese translation of open-infrastructure-compute-tools debconf templates.
# Copyright (C) 2017 Rui Branco <ruipb@debianpt.org>
-# This file is distributed under the same license as the open-infrastructure-container-tools package.
+# This file is distributed under the same license as the open-infrastructure-compute-tools package.
#
msgid ""
msgstr ""
-"Project-Id-Version: open-infrastructure-container-tools 20161101-lts2-2\n"
+"Project-Id-Version: open-infrastructure-compute-tools 20161101-lts2-2\n"
"Report-Msgid-Bugs-To: open-infrastructure-compute-tools@packages.debian.org\n"
-"POT-Creation-Date: 2019-02-23 16:47+0100\n"
+"POT-Creation-Date: 2022-10-02 15:20+0200\n"
"PO-Revision-Date: 2017-08-02 21:47+0000\n"
"Last-Translator: Rui Branco - DebianPT <ruipb@debianpt.org>\n"
"Language-Team: Portuguese <traduz@debianpt.org>\n"
@@ -18,25 +18,19 @@ msgstr ""
#. Type: title
#. Description
-#: ../open-infrastructure-container-tools.templates:1001
-msgid "container-tools: Setup"
-msgstr "container-tools: Configuração"
-
-#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:2001
-msgid "/var/lib/machines"
-msgstr "/var/lib/machines"
+#: ../open-infrastructure-compute-tools.templates:1001
+msgid "compute-tools: Setup"
+msgstr "compute-tools: Configuração"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid "machines directory:"
msgstr "Directório de máquinas:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid "Please specify the directory that will be used to store the containers."
msgstr ""
"Por favor especifique um directório que será usado para guardar os "
@@ -44,7 +38,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid ""
"If unsure, use /var/lib/machines (default) or /srv/container/system when "
"using shared storage."
@@ -53,20 +47,14 @@ msgstr ""
"system quando utilizar armazenamento partilhado."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:3001
-msgid "/etc/open-infrastructure/container/config"
-msgstr "/etc/open-infrastructure/container/config"
-
-#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid "config directory:"
msgstr "Directório de configuração:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid ""
"Please specify the directory that will be used to store the container "
"configuration files."
@@ -76,35 +64,23 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/config (default) or /srv/"
-"container/config when using shared storage."
+"If unsure, use /etc/compute-tools/config (default) or /srv/container/config "
+"when using shared storage."
msgstr ""
-"Em caso de dúvida utilize /etc/open-infrastructure/container/config (predefinido) ou /srv/"
+"Em caso de dúvida utilize /etc/compute-tools/config (predefinido) ou /srv/"
"container/config quando utilizar armazenamento partilhado."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:4001
-msgid "/etc/open-infrastructure/container/debconf"
-msgstr "/etc/open-infrastructure/container/debconf"
-
-#. Type: string
-#. Description
-#. Type: string
#. Description
-#. Type: string
-#. Description
-#: ../open-infrastructure-container-tools.templates:4002
-#: ../open-infrastructure-container-tools.templates:5002
-#: ../open-infrastructure-container-tools.templates:6002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid "debconf directory:"
msgstr "Directório do debconf:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:4002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid ""
"Please specify the directory that will be used to store the container "
"preseed files."
@@ -114,23 +90,25 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:4002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/debconf (default) or /srv/"
-"container/debconf when using shared storage."
+"If unsure, use /etc/compute-tools/debconf (default) or /srv/container/"
+"debconf when using shared storage."
msgstr ""
-"Em caso de dúvida utilize /etc/open-infrastructure/container/debconf (predefinido) ou /srv/"
+"Em caso de dúvida utilize /etc/compute-tools/debconf (predefinido) ou /srv/"
"container/debconf quando utilizar armazenamento partilhado."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:5001
-msgid "/etc/open-infrastructure/container/hooks"
-msgstr "/etc/open-infrastructure/container/hooks"
+#. Description
+#: ../open-infrastructure-compute-tools.templates:5001
+#, fuzzy
+#| msgid "cache directory:"
+msgid "hooks directory:"
+msgstr "Directório de cache:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:5002
+#: ../open-infrastructure-compute-tools.templates:5001
msgid ""
"Please specify the directory that will be used to store the container hooks."
msgstr ""
@@ -139,23 +117,25 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:5002
+#: ../open-infrastructure-compute-tools.templates:5001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/hooks (default) or /srv/"
-"container/hooks when using shared storage."
+"If unsure, use /etc/compute-tools/hooks (default) or /srv/container/hooks "
+"when using shared storage."
msgstr ""
-"Em caso de dúvida utilize /etc/open-infrastructure/container/hooks (predefinido) ou /srv/"
+"Em caso de dúvida utilize /etc/compute-tools/hooks (predefinido) ou /srv/"
"container/hooks quando utilizar armazenamento partilhado."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:6001
-msgid "/etc/open-infrastructure/container/keys"
-msgstr ""
+#. Description
+#: ../open-infrastructure-compute-tools.templates:6001
+#, fuzzy
+#| msgid "cache directory:"
+msgid "keys directory:"
+msgstr "Directório de cache:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:6002
+#: ../open-infrastructure-compute-tools.templates:6001
msgid ""
"Please specify the directory that will be used to store the container keys "
"for verifying container image downloads."
@@ -165,29 +145,23 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:6002
+#: ../open-infrastructure-compute-tools.templates:6001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/keys (default) or /srv/"
-"container/keys when using shared storage."
+"If unsure, use /etc/compute-tools/keys (default) or /srv/container/keys when "
+"using shared storage."
msgstr ""
-"Em caso de dúvida utilize /etc/open-infrastructure/container/keys (predefinido) ou /srv/"
+"Em caso de dúvida utilize /etc/compute-tools/keys (predefinido) ou /srv/"
"container/keys quando utilizar armazenamento partilhado."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:7001
-msgid "/var/cache/open-infrastructure/container"
-msgstr "/var/cache/open-infrastructure/container"
-
-#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
msgid "cache directory:"
msgstr "Directório de cache:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
msgid ""
"Please specify the directory that will be used to cache files during "
"creation of containers."
@@ -197,29 +171,49 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
msgid ""
-"If unsure, use /var/cache/open-infrastructure/container (default) or /srv/"
-"container/cache when using shared storage."
+"If unsure, use /var/cache/container (default) or /srv/container/cache when "
+"using shared storage."
msgstr ""
-"Em caso de dúvida utilize /var/cache/open-infrastructure/container (predefinido) ou /srv/"
+"Em caso de dúvida utilize /var/cache/container (predefinido) ou /srv/"
"container/cache quando utilizar armazenamento partilhado."
#. Type: select
-#. Choices
-#: ../open-infrastructure-container-tools.templates:8001
-msgid "${SCRIPT_CHOICES}"
-msgstr "${SCRIPT_CHOICES}"
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
+msgid "Do you want system-wide readable container directories?"
+msgstr ""
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
-msgid "create script:"
+#: ../open-infrastructure-compute-tools.templates:8001
+msgid ""
+"By default, the machines directory (and a few non-critical additional "
+"directories such as 'cache' and 'config') is only readable by the root user. "
+"If you want any user to be able to see what machines are available, you can "
+"select read-only instead of root-only (default)."
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
+#, fuzzy
+#| msgid "If unsure, leave empty (default)."
+msgid "If unsure, leave at root-only (default)."
+msgstr "Se tem dúvidas deixe em branco (predefinição)."
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:9001
+#, fuzzy
+#| msgid "create script:"
+msgid "default build script:"
msgstr "Criar script:"
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
+#: ../open-infrastructure-compute-tools.templates:9001
msgid ""
"Please select the script that will be used by default to create containers."
msgstr ""
@@ -228,19 +222,19 @@ msgstr ""
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
+#: ../open-infrastructure-compute-tools.templates:9001
msgid "If unsure, use debian (default)."
msgstr "Em caso de dúvida utilize debian (predefinido)."
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid "IRC notifications:"
msgstr "Notificações IRC:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid ""
"The container command can send IRC notifications via irker to one or more "
"(whitespace separated) IRC channels."
@@ -250,7 +244,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid ""
"The following example will send IRC notifications to the open-infrastructure "
"channel on irc.oftc.net:"
@@ -260,15 +254,12 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid " irc://irc.oftc.net:6668/open-infrastructure"
msgstr " irc://irc.oftc.net:6668/open-infrastructure"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid "If unsure, leave empty (default)."
msgstr "Se tem dúvidas deixe em branco (predefinição)."
-
-#~ msgid "/etc/container-tools/keys"
-#~ msgstr "/etc/container-tools/keys"
diff --git a/debian/po/pt_BR.po b/debian/po/pt_BR.po
index f317fbf..ead7a9a 100644
--- a/debian/po/pt_BR.po
+++ b/debian/po/pt_BR.po
@@ -1,12 +1,12 @@
-# Brazilian Portuguese translation of open-infrastructure-container-tools debconf templates.
+# Brazilian Portuguese translation of open-infrastructure-compute-tools debconf templates.
# Copyright (C) 2016 Adriano Rafael Gomes <adrianorg@debian.org>
-# This file is distributed under the same license as the open-infrastructure-container-tools package.
+# This file is distributed under the same license as the open-infrastructure-compute-tools package.
#
msgid ""
msgstr ""
-"Project-Id-Version: open-infrastructure-container-tools\n"
+"Project-Id-Version: open-infrastructure-compute-tools\n"
"Report-Msgid-Bugs-To: open-infrastructure-compute-tools@packages.debian.org\n"
-"POT-Creation-Date: 2019-02-23 16:47+0100\n"
+"POT-Creation-Date: 2022-10-02 15:20+0200\n"
"PO-Revision-Date: 2016-08-25 22:07-0300\n"
"Last-Translator: Adriano Rafael Gomes <adrianorg@debian.org>\n"
"Language-Team: Brazilian Portuguese <debian-l10n-portuguese@lists.debian."
@@ -18,25 +18,19 @@ msgstr ""
#. Type: title
#. Description
-#: ../open-infrastructure-container-tools.templates:1001
-msgid "container-tools: Setup"
-msgstr "container-tools: Configuração"
-
-#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:2001
-msgid "/var/lib/machines"
-msgstr "/var/lib/machines"
+#: ../open-infrastructure-compute-tools.templates:1001
+msgid "compute-tools: Setup"
+msgstr "compute-tools: Configuração"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid "machines directory:"
msgstr "diretório de máquinas:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid "Please specify the directory that will be used to store the containers."
msgstr ""
"Por favor, especifique o diretório que será usado para armazenar os "
@@ -44,7 +38,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid ""
"If unsure, use /var/lib/machines (default) or /srv/container/system when "
"using shared storage."
@@ -53,20 +47,14 @@ msgstr ""
"system ao usar armazenamento compartilhado."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:3001
-msgid "/etc/open-infrastructure/container/config"
-msgstr "/etc/open-infrastructure/container/config"
-
-#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid "config directory:"
msgstr "diretório de configuração:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid ""
"Please specify the directory that will be used to store the container "
"configuration files."
@@ -76,35 +64,23 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/config (default) or /srv/"
-"container/config when using shared storage."
+"If unsure, use /etc/compute-tools/config (default) or /srv/container/config "
+"when using shared storage."
msgstr ""
-"Se não tiver certeza, use /etc/open-infrastructure/container/config (padrão) ou /srv/"
+"Se não tiver certeza, use /etc/compute-tools/config (padrão) ou /srv/"
"container/config ao usar armazenamento compartilhado."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:4001
-msgid "/etc/open-infrastructure/container/debconf"
-msgstr "/etc/open-infrastructure/container/debconf"
-
-#. Type: string
-#. Description
-#. Type: string
-#. Description
-#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:4002
-#: ../open-infrastructure-container-tools.templates:5002
-#: ../open-infrastructure-container-tools.templates:6002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid "debconf directory:"
msgstr "diretório do debconf:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:4002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid ""
"Please specify the directory that will be used to store the container "
"preseed files."
@@ -114,50 +90,50 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:4002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/debconf (default) or /srv/"
-"container/debconf when using shared storage."
+"If unsure, use /etc/compute-tools/debconf (default) or /srv/container/"
+"debconf when using shared storage."
msgstr ""
-"Se não tiver certeza, use /etc/open-infrastructure/container/debconf (padrão) ou /srv/"
+"Se não tiver certeza, use /etc/compute-tools/debconf (padrão) ou /srv/"
"container/debconf ao usar armazenamento compartilhado."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:5001
-msgid "/etc/open-infrastructure/container/hooks"
-msgstr "/etc/open-infrastructure/container/hooks"
+#. Description
+#: ../open-infrastructure-compute-tools.templates:5001
+#, fuzzy
+#| msgid "cache directory:"
+msgid "hooks directory:"
+msgstr "diretório de cache:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:5002
+#: ../open-infrastructure-compute-tools.templates:5001
msgid ""
"Please specify the directory that will be used to store the container hooks."
msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:5002
+#: ../open-infrastructure-compute-tools.templates:5001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/hooks (default) or /srv/"
-"container/hooks when using shared storage."
+"If unsure, use /etc/compute-tools/hooks (default) or /srv/container/hooks "
+"when using shared storage."
msgstr ""
-"Se não tiver certeza, use /etc/open-infrastructure/container/keys (padrão) ou /srv/"
-"container/keys ao usar armazenamento compartilhado."
+"Se não tiver certeza, use /etc/compute-tools/keys (padrão) ou /srv/container/"
+"keys ao usar armazenamento compartilhado."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:6001
-msgid "/etc/open-infrastructure/container/keys"
-msgstr ""
+#. Description
+#: ../open-infrastructure-compute-tools.templates:6001
+#, fuzzy
+#| msgid "cache directory:"
+msgid "keys directory:"
+msgstr "diretório de cache:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:6002
-#, fuzzy
-#| msgid ""
-#| "Please specify the directory that will be used to store the container "
-#| "configuration files."
+#: ../open-infrastructure-compute-tools.templates:6001
msgid ""
"Please specify the directory that will be used to store the container keys "
"for verifying container image downloads."
@@ -167,29 +143,23 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:6002
+#: ../open-infrastructure-compute-tools.templates:6001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/keys (default) or /srv/"
-"container/keys when using shared storage."
+"If unsure, use /etc/compute-tools/keys (default) or /srv/container/keys when "
+"using shared storage."
msgstr ""
-"Se não tiver certeza, use /etc/open-infrastructure/container/keys (padrão) ou /srv/"
-"container/keys ao usar armazenamento compartilhado."
-
-#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:7001
-msgid "/var/cache/open-infrastructure/container"
-msgstr "/var/cache/open-infrastructure/container"
+"Se não tiver certeza, use /etc/compute-tools/keys (padrão) ou /srv/container/"
+"keys ao usar armazenamento compartilhado."
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
msgid "cache directory:"
msgstr "diretório de cache:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
msgid ""
"Please specify the directory that will be used to cache files during "
"creation of containers."
@@ -199,29 +169,49 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
+msgid ""
+"If unsure, use /var/cache/container (default) or /srv/container/cache when "
+"using shared storage."
+msgstr ""
+"Se não tiver certeza, use /var/cache/container (padrão) ou /srv/container/"
+"cache ao usar armazenamento compartilhado."
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
+msgid "Do you want system-wide readable container directories?"
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
msgid ""
-"If unsure, use /var/cache/open-infrastructure/container (default) or /srv/"
-"container/cache when using shared storage."
+"By default, the machines directory (and a few non-critical additional "
+"directories such as 'cache' and 'config') is only readable by the root user. "
+"If you want any user to be able to see what machines are available, you can "
+"select read-only instead of root-only (default)."
msgstr ""
-"Se não tiver certeza, use /var/cache/open-infrastructure/container (padrão) ou /srv/"
-"container/cache ao usar armazenamento compartilhado."
#. Type: select
-#. Choices
-#: ../open-infrastructure-container-tools.templates:8001
-msgid "${SCRIPT_CHOICES}"
-msgstr "${SCRIPT_CHOICES}"
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
+#, fuzzy
+#| msgid "If unsure, use debian (default)."
+msgid "If unsure, leave at root-only (default)."
+msgstr "Se não tiver certeza, use debian (padrão)."
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
-msgid "create script:"
+#: ../open-infrastructure-compute-tools.templates:9001
+#, fuzzy
+#| msgid "create script:"
+msgid "default build script:"
msgstr "script de criação:"
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
+#: ../open-infrastructure-compute-tools.templates:9001
msgid ""
"Please select the script that will be used by default to create containers."
msgstr ""
@@ -230,19 +220,19 @@ msgstr ""
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
+#: ../open-infrastructure-compute-tools.templates:9001
msgid "If unsure, use debian (default)."
msgstr "Se não tiver certeza, use debian (padrão)."
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid "IRC notifications:"
msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid ""
"The container command can send IRC notifications via irker to one or more "
"(whitespace separated) IRC channels."
@@ -250,7 +240,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid ""
"The following example will send IRC notifications to the open-infrastructure "
"channel on irc.oftc.net:"
@@ -258,15 +248,12 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid " irc://irc.oftc.net:6668/open-infrastructure"
msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid "If unsure, leave empty (default)."
msgstr ""
-
-#~ msgid "/etc/container-tools/keys"
-#~ msgstr "/etc/container-tools/keys"
diff --git a/debian/po/ru.po b/debian/po/ru.po
index 3e5d5e1..95b16a5 100644
--- a/debian/po/ru.po
+++ b/debian/po/ru.po
@@ -1,11 +1,11 @@
-# Russian debconf translation of open-infrastructure-container-tools
+# Russian debconf translation of open-infrastructure-compute-tools
# Copyright (C) 2017 Lev Lamberov <dogsleg@debian.org>
-# This file is distributed under the same license as the open-infrastructure-container-tools package.
+# This file is distributed under the same license as the open-infrastructure-compute-tools package.
msgid ""
msgstr ""
-"Project-Id-Version: open-infrastructure-container-tools\n"
+"Project-Id-Version: open-infrastructure-compute-tools\n"
"Report-Msgid-Bugs-To: open-infrastructure-compute-tools@packages.debian.org\n"
-"POT-Creation-Date: 2019-02-23 16:47+0100\n"
+"POT-Creation-Date: 2022-10-02 15:20+0200\n"
"PO-Revision-Date: 2017-12-03 22:46+0500\n"
"Last-Translator: Lev Lamberov <dogsleg@debian.org>\n"
"Language-Team: \n"
@@ -18,32 +18,26 @@ msgstr ""
#. Type: title
#. Description
-#: ../open-infrastructure-container-tools.templates:1001
-msgid "container-tools: Setup"
-msgstr "container-tools: настройка"
-
-#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:2001
-msgid "/var/lib/machines"
-msgstr "/var/lib/machines"
+#: ../open-infrastructure-compute-tools.templates:1001
+msgid "compute-tools: Setup"
+msgstr "compute-tools: настройка"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid "machines directory:"
msgstr "каталог машин:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid "Please specify the directory that will be used to store the containers."
msgstr ""
"Укажите каталог, который будет использоваться для хранения контейнеров."
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid ""
"If unsure, use /var/lib/machines (default) or /srv/container/system when "
"using shared storage."
@@ -52,20 +46,14 @@ msgstr ""
"machines (по умолчанию) или /srv/container/system."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:3001
-msgid "/etc/open-infrastructure/container/config"
-msgstr "/etc/open-infrastructure/container/config"
-
-#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid "config directory:"
msgstr "каталог настроек:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid ""
"Please specify the directory that will be used to store the container "
"configuration files."
@@ -74,35 +62,23 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/config (default) or /srv/"
-"container/config when using shared storage."
+"If unsure, use /etc/compute-tools/config (default) or /srv/container/config "
+"when using shared storage."
msgstr ""
"Если вы не уверены, то при использовании общего хранилища выберите /etc/"
-"open-infrastructure/container/config (по умолчанию) или /srv/container/config."
+"compute-tools/config (по умолчанию) или /srv/container/config."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:4001
-msgid "/etc/open-infrastructure/container/debconf"
-msgstr "/etc/open-infrastructure/container/debconf"
-
-#. Type: string
-#. Description
-#. Type: string
#. Description
-#. Type: string
-#. Description
-#: ../open-infrastructure-container-tools.templates:4002
-#: ../open-infrastructure-container-tools.templates:5002
-#: ../open-infrastructure-container-tools.templates:6002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid "debconf directory:"
msgstr "каталог debconf:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:4002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid ""
"Please specify the directory that will be used to store the container "
"preseed files."
@@ -112,23 +88,25 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:4002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/debconf (default) or /srv/"
-"container/debconf when using shared storage."
+"If unsure, use /etc/compute-tools/debconf (default) or /srv/container/"
+"debconf when using shared storage."
msgstr ""
"Если вы не уверены, то при использовании общего хранилища выберите /etc/"
-"open-infrastructure/container/debconf (по умолчанию) или /srv/container/debconf."
+"compute-tools/debconf (по умолчанию) или /srv/container/debconf."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:5001
-msgid "/etc/open-infrastructure/container/hooks"
-msgstr "/etc/open-infrastructure/container/hooks"
+#. Description
+#: ../open-infrastructure-compute-tools.templates:5001
+#, fuzzy
+#| msgid "cache directory:"
+msgid "hooks directory:"
+msgstr "каталог кэша:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:5002
+#: ../open-infrastructure-compute-tools.templates:5001
msgid ""
"Please specify the directory that will be used to store the container hooks."
msgstr ""
@@ -137,23 +115,25 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:5002
+#: ../open-infrastructure-compute-tools.templates:5001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/hooks (default) or /srv/"
-"container/hooks when using shared storage."
+"If unsure, use /etc/compute-tools/hooks (default) or /srv/container/hooks "
+"when using shared storage."
msgstr ""
"Если вы не уверены, то при использовании общего хранилища выберите /etc/"
-"open-infrastructure/container/hooks (по умолчанию) или /srv/container/hooks."
+"compute-tools/hooks (по умолчанию) или /srv/container/hooks."
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:6001
-msgid "/etc/open-infrastructure/container/keys"
-msgstr ""
+#. Description
+#: ../open-infrastructure-compute-tools.templates:6001
+#, fuzzy
+#| msgid "cache directory:"
+msgid "keys directory:"
+msgstr "каталог кэша:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:6002
+#: ../open-infrastructure-compute-tools.templates:6001
msgid ""
"Please specify the directory that will be used to store the container keys "
"for verifying container image downloads."
@@ -163,29 +143,23 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:6002
+#: ../open-infrastructure-compute-tools.templates:6001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/keys (default) or /srv/"
-"container/keys when using shared storage."
+"If unsure, use /etc/compute-tools/keys (default) or /srv/container/keys when "
+"using shared storage."
msgstr ""
"Если вы не уверены, то при использовании общего хранилища выберите /etc/"
-"open-infrastructure/container/keys (по умолчанию) или /srv/container/keys."
-
-#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:7001
-msgid "/var/cache/open-infrastructure/container"
-msgstr "/var/cache/open-infrastructure/container"
+"compute-tools/keys (по умолчанию) или /srv/container/keys."
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
msgid "cache directory:"
msgstr "каталог кэша:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
msgid ""
"Please specify the directory that will be used to cache files during "
"creation of containers."
@@ -195,29 +169,49 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
msgid ""
-"If unsure, use /var/cache/open-infrastructure/container (default) or /srv/"
-"container/cache when using shared storage."
+"If unsure, use /var/cache/container (default) or /srv/container/cache when "
+"using shared storage."
msgstr ""
"Если вы не уверены, то при использовании общего хранилища выберите /var/"
-"cache/open-infrastructure/container (по умолчанию) или /srv/container/cache."
+"cache/container (по умолчанию) или /srv/container/cache."
#. Type: select
-#. Choices
-#: ../open-infrastructure-container-tools.templates:8001
-msgid "${SCRIPT_CHOICES}"
-msgstr "${SCRIPT_CHOICES}"
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
+msgid "Do you want system-wide readable container directories?"
+msgstr ""
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
-msgid "create script:"
+#: ../open-infrastructure-compute-tools.templates:8001
+msgid ""
+"By default, the machines directory (and a few non-critical additional "
+"directories such as 'cache' and 'config') is only readable by the root user. "
+"If you want any user to be able to see what machines are available, you can "
+"select read-only instead of root-only (default)."
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
+#, fuzzy
+#| msgid "If unsure, leave empty (default)."
+msgid "If unsure, leave at root-only (default)."
+msgstr "Если вы не уверены, то оставьте это поле пустым (по умолчанию)."
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:9001
+#, fuzzy
+#| msgid "create script:"
+msgid "default build script:"
msgstr "сценарий создания:"
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
+#: ../open-infrastructure-compute-tools.templates:9001
msgid ""
"Please select the script that will be used by default to create containers."
msgstr ""
@@ -225,19 +219,19 @@ msgstr ""
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
+#: ../open-infrastructure-compute-tools.templates:9001
msgid "If unsure, use debian (default)."
msgstr "Если вы не уверены, то используйте debian (по умолчанию)."
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid "IRC notifications:"
msgstr "IRC-уведомления:"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid ""
"The container command can send IRC notifications via irker to one or more "
"(whitespace separated) IRC channels."
@@ -247,7 +241,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid ""
"The following example will send IRC notifications to the open-infrastructure "
"channel on irc.oftc.net:"
@@ -257,15 +251,12 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid " irc://irc.oftc.net:6668/open-infrastructure"
msgstr " irc://irc.oftc.net:6668/open-infrastructure"
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid "If unsure, leave empty (default)."
msgstr "Если вы не уверены, то оставьте это поле пустым (по умолчанию)."
-
-#~ msgid "/etc/container-tools/keys"
-#~ msgstr "/etc/container-tools/keys"
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
index bdcc854..722dcba 100644
--- a/debian/po/templates.pot
+++ b/debian/po/templates.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: open-infrastructure-compute-tools\n"
"Report-Msgid-Bugs-To: open-infrastructure-compute-tools@packages.debian.org\n"
-"POT-Creation-Date: 2019-02-23 16:47+0100\n"
+"POT-Creation-Date: 2022-10-02 15:20+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -19,51 +19,39 @@ msgstr ""
#. Type: title
#. Description
-#: ../open-infrastructure-container-tools.templates:1001
-msgid "container-tools: Setup"
-msgstr ""
-
-#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:2001
-msgid "/var/lib/machines"
+#: ../open-infrastructure-compute-tools.templates:1001
+msgid "compute-tools: Setup"
msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid "machines directory:"
msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid "Please specify the directory that will be used to store the containers."
msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:2002
+#: ../open-infrastructure-compute-tools.templates:2001
msgid ""
"If unsure, use /var/lib/machines (default) or /srv/container/system when "
"using shared storage."
msgstr ""
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:3001
-msgid "/etc/open-infrastructure/container/config"
-msgstr ""
-
-#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid "config directory:"
msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid ""
"Please specify the directory that will be used to store the container "
"configuration files."
@@ -71,33 +59,21 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:3002
+#: ../open-infrastructure-compute-tools.templates:3001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/config (default) or /srv/"
-"container/config when using shared storage."
+"If unsure, use /etc/compute-tools/config (default) or /srv/container/config "
+"when using shared storage."
msgstr ""
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:4001
-msgid "/etc/open-infrastructure/container/debconf"
-msgstr ""
-
-#. Type: string
-#. Description
-#. Type: string
#. Description
-#. Type: string
-#. Description
-#: ../open-infrastructure-container-tools.templates:4002
-#: ../open-infrastructure-container-tools.templates:5002
-#: ../open-infrastructure-container-tools.templates:6002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid "debconf directory:"
msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:4002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid ""
"Please specify the directory that will be used to store the container "
"preseed files."
@@ -105,42 +81,42 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:4002
+#: ../open-infrastructure-compute-tools.templates:4001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/debconf (default) or /srv/"
-"container/debconf when using shared storage."
+"If unsure, use /etc/compute-tools/debconf (default) or /srv/container/"
+"debconf when using shared storage."
msgstr ""
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:5001
-msgid "/etc/open-infrastructure/container/hooks"
+#. Description
+#: ../open-infrastructure-compute-tools.templates:5001
+msgid "hooks directory:"
msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:5002
+#: ../open-infrastructure-compute-tools.templates:5001
msgid ""
"Please specify the directory that will be used to store the container hooks."
msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:5002
+#: ../open-infrastructure-compute-tools.templates:5001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/hooks (default) or /srv/"
-"container/hooks when using shared storage."
+"If unsure, use /etc/compute-tools/hooks (default) or /srv/container/hooks "
+"when using shared storage."
msgstr ""
#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:6001
-msgid "/etc/open-infrastructure/container/keys"
+#. Description
+#: ../open-infrastructure-compute-tools.templates:6001
+msgid "keys directory:"
msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:6002
+#: ../open-infrastructure-compute-tools.templates:6001
msgid ""
"Please specify the directory that will be used to store the container keys "
"for verifying container image downloads."
@@ -148,27 +124,21 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:6002
+#: ../open-infrastructure-compute-tools.templates:6001
msgid ""
-"If unsure, use /etc/open-infrastructure/container/keys (default) or /srv/"
-"container/keys when using shared storage."
-msgstr ""
-
-#. Type: string
-#. Default
-#: ../open-infrastructure-container-tools.templates:7001
-msgid "/var/cache/open-infrastructure/container"
+"If unsure, use /etc/compute-tools/keys (default) or /srv/container/keys when "
+"using shared storage."
msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
msgid "cache directory:"
msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
msgid ""
"Please specify the directory that will be used to cache files during "
"creation of containers."
@@ -176,46 +146,62 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:7002
+#: ../open-infrastructure-compute-tools.templates:7001
msgid ""
-"If unsure, use /var/cache/open-infrastructure/container (default) or /srv/"
-"container/cache when using shared storage."
+"If unsure, use /var/cache/container (default) or /srv/container/cache when "
+"using shared storage."
msgstr ""
#. Type: select
-#. Choices
-#: ../open-infrastructure-container-tools.templates:8001
-msgid "${SCRIPT_CHOICES}"
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
+msgid "Do you want system-wide readable container directories?"
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
+msgid ""
+"By default, the machines directory (and a few non-critical additional "
+"directories such as 'cache' and 'config') is only readable by the root user. "
+"If you want any user to be able to see what machines are available, you can "
+"select read-only instead of root-only (default)."
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../open-infrastructure-compute-tools.templates:8001
+msgid "If unsure, leave at root-only (default)."
msgstr ""
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
-msgid "create script:"
+#: ../open-infrastructure-compute-tools.templates:9001
+msgid "default build script:"
msgstr ""
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
+#: ../open-infrastructure-compute-tools.templates:9001
msgid ""
"Please select the script that will be used by default to create containers."
msgstr ""
#. Type: select
#. Description
-#: ../open-infrastructure-container-tools.templates:8002
+#: ../open-infrastructure-compute-tools.templates:9001
msgid "If unsure, use debian (default)."
msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid "IRC notifications:"
msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid ""
"The container command can send IRC notifications via irker to one or more "
"(whitespace separated) IRC channels."
@@ -223,7 +209,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid ""
"The following example will send IRC notifications to the open-infrastructure "
"channel on irc.oftc.net:"
@@ -231,12 +217,12 @@ msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid " irc://irc.oftc.net:6668/open-infrastructure"
msgstr ""
#. Type: string
#. Description
-#: ../open-infrastructure-container-tools.templates:9002
+#: ../open-infrastructure-compute-tools.templates:10001
msgid "If unsure, leave empty (default)."
msgstr ""
diff --git a/debian/rules b/debian/rules
index 3bb49f0..f543379 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,6 @@
#!/usr/bin/make -f
-PACKAGE := container-tools
+PACKAGE := open-infrastructure-compute-tools
%:
dh ${@}
@@ -9,12 +9,13 @@ override_dh_auto_build:
# disabled
override_dh_auto_install:
- dh_auto_install -- DESTDIR=$(CURDIR)/debian/open-infrastructure-$(PACKAGE)
+ dh_auto_install -- DESTDIR=$(CURDIR)/debian/$(PACKAGE)
- rm -f debian/open-infrastructure-$(PACKAGE)/usr/share/doc/*/CHANGELOG.txt
- rm -f debian/open-infrastructure-$(PACKAGE)/usr/share/doc/*/LICENSE.txt
+execute_after_dh_auto_install:
+ rm -f debian/$(PACKAGE)/usr/share/doc/*/CHANGELOG.txt
+ rm -f debian/$(PACKAGE)/usr/share/doc/*/LICENSE.txt
- mv debian/open-infrastructure-$(PACKAGE)/usr/share/doc/* debian/open-infrastructure-$(PACKAGE)/usr/share/doc/open-infrastructure-$(PACKAGE)
+ mv debian/$(PACKAGE)/usr/share/doc/* debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)
override_dh_installsystemd:
dh_installsystemd --no-restart-after-upgrade --no-start --no-stop-on-upgrade
diff --git a/lib/container/auto b/libexec/container/auto
index 16c2933..83c5c50 100755
--- a/lib/container/auto
+++ b/libexec/container/auto
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -15,16 +15,17 @@
# 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"
COMMAND="$(basename ${0})"
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
Parameters ()
{
@@ -75,6 +76,9 @@ Parameters ()
Usage ()
{
echo "Usage: ${PROGRAM} ${COMMAND} -f|--force -s|--start -t|--stop" >&2
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
exit 1
}
@@ -107,17 +111,50 @@ esac
for FILE in "${CONFIG}"/*.conf
do
- if grep -Eqs "^ *cnt.auto=force-true" "${FILE}"
+ if ! grep -Eqs "^ *cnt.container-server=${HOST}" "${FILE}"
then
- OPTIONS="${OPTIONS} -f"
+ continue
fi
- if grep -Eqs "^ *cnt.auto=(force-true|true)" "${FILE}" && grep -Eqs "^ *cnt.container-server=${HOST}" "${FILE}"
- then
- CONTAINER="$(basename ${FILE} .conf)"
-
- cnt ${ACTION} -n ${CONTAINER} ${OPTIONS} || true
- fi
+ CONTAINER="$(basename ${FILE} .conf)"
+ CNT_AUTO="$(grep -Es "^ *cnt.auto=" ${FILE} | awk -F= '{ print $2 }')"
+
+ case "${ACTION}" in
+ start)
+ case "${CNT_AUTO}" in
+ force-true)
+ OPTIONS="${OPTIONS} -f"
+
+ cnt ${ACTION} -n ${CONTAINER} ${OPTIONS} || true
+ ;;
+
+ last-on)
+ if grep -qs start "/var/lib/${SOFTWARE}/state/${CONTAINER}.run" || \
+ [ ! -e "/var/lib/${SOFTWARE}/state/${CONTAINER}.run" ]
+ then
+ cnt start -n ${CONTAINER} ${OPTIONS} -f || true
+ fi
+ ;;
+
+ last-off)
+ if grep -qs start "/var/lib/${SOFTWARE}/state/${CONTAINER}.run"
+ then
+ cnt start -n ${CONTAINER} ${OPTIONS} -f || true
+ fi
+ ;;
+
+ true)
+ cnt ${ACTION} -n ${CONTAINER} ${OPTIONS} || true
+ ;;
+ esac
+ ;;
+
+ stop)
+ OPTIONS="${OPTIONS} -f --stateless"
+
+ cnt ${ACTION} -n ${CONTAINER} ${OPTIONS} || true
+ ;;
+ esac
done
# Post hooks
diff --git a/libexec/container/build b/libexec/container/build
new file mode 100755
index 0000000..2c29730
--- /dev/null
+++ b/libexec/container/build
@@ -0,0 +1,287 @@
+#!/bin/sh
+
+# Copyright (C) 2014-2022 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.auto:,cnt.container-server:,cnt.overlay:,cnt.overlay-options:,cnt.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.auto=true|false|force-true|last-on|last-off] [--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
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
+ 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/lib/container/console b/libexec/container/console
index 0628a9d..be2b897 100755
--- a/lib/container/console
+++ b/libexec/container/console
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -15,15 +15,16 @@
# 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"
COMMAND="$(basename ${0})"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
Parameters ()
@@ -65,6 +66,9 @@ Parameters ()
Usage ()
{
echo "Usage: ${PROGRAM} ${COMMAND} -n|--name NAME" >&2
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
exit 1
}
@@ -81,7 +85,7 @@ then
exit 1
fi
-STATE="$(machinectl show ${NAME} 2>&1 | awk -F= '/^State=/ { print $2 }')"
+STATE="$(machinectl show ${NAME} 2>&1 | awk -FState= '/^State=/ { print $2 }')"
case "${STATE}" in
running)
diff --git a/lib/container/enter b/libexec/container/enter
index 4c7f890..b366ba6 100755
--- a/lib/container/enter
+++ b/libexec/container/enter
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -15,15 +15,16 @@
# 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"
COMMAND="$(basename ${0})"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
Parameters ()
@@ -65,6 +66,9 @@ Parameters ()
Usage ()
{
echo "Usage: ${PROGRAM} ${COMMAND} -n|--name NAME" >&2
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
exit 1
}
@@ -81,7 +85,7 @@ then
exit 1
fi
-STATE="$(machinectl show ${NAME} 2>&1 | awk -F= '/^State=/ { print $2 }')"
+STATE="$(machinectl show ${NAME} 2>&1 | awk -FState= '/^State=/ { print $2 }')"
case "${STATE}" in
running)
@@ -107,7 +111,7 @@ done
SSH_CLIENT="${SSH_CLIENT:-127.0.0.1 0 0}"
# Run
-nsenter --all --target "${LEADER}" --wd="${MACHINES}/${NAME}/root" /usr/bin/script -c "LC_ALL=C.UTF-8 /bin/bash -l" -q /dev/null
+nsenter --all --target "${LEADER}" --wd="${MACHINES}/${NAME}/root" /usr/bin/script -c "LC_ALL=C.UTF-8 SSH_CLIENT=\"${SSH_CLIENT}\" /bin/bash -l" -q /dev/null
case "${SSH_CLIENT}" in
127.0.0.1*)
diff --git a/lib/container/create b/libexec/container/get
index 46fc7ee..0d0f420 100755
--- a/lib/container/create
+++ b/libexec/container/get
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -15,23 +15,24 @@
# 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"
COMMAND="$(basename ${0})"
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
-SCRIPTS="/usr/share/${PROJECT}/${PROGRAM}/scripts"
-CONFIG_TEMPLATE="/usr/share/${PROJECT}/${PROGRAM}/config/container.conf.in"
+SCRIPTS="/usr/share/${SOFTWARE}/get-scripts"
+CONFIG_TEMPLATE="/usr/share/${SOFTWARE}/config/container.conf.in"
Parameters ()
{
- GETOPT_LONGOPTIONS="name:,cnt.container-server:,cnt.overlay:,bind:,bind-ro:,capability:,drop-capability:script:,verbose,"
+ 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 -- ${@})"
@@ -67,6 +68,16 @@ Parameters ()
shift 2
;;
+ --cnt.overlay-options)
+ CNT_OVERLAY_OPTIONS="${2}"
+ shift 2
+ ;;
+
+ --cnt.start)
+ CNT_START="${2}"
+ shift 2
+ ;;
+
-b|--bind)
BIND="${2}"
shift 2
@@ -112,7 +123,10 @@ Parameters ()
Usage ()
{
- echo "Usage: ${PROGRAM} ${COMMAND} -n|--name NAME [--cnt.container-server=true|false|FQDN] [--cnt.overlay=DIRECTORY_LOWER:DIRECTORY_UPPER:DIRECTORY_WORK:DIRECTORY_MERGED] [-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
+ 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
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
exit 1
}
@@ -143,8 +157,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
@@ -156,7 +170,7 @@ then
exit 1
fi
else
- SCRIPT="debian"
+ SCRIPT="curl"
fi
else
if [ ! -e "${SCRIPTS}/${SCRIPT}" ]
@@ -171,7 +185,7 @@ case "${VERBOSE}" in
cat << EOF
################################################################################
-Creating container: ${NAME}
+Building container: ${NAME}
################################################################################
EOF
@@ -241,6 +255,8 @@ 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" \
diff --git a/libexec/container/info b/libexec/container/info
new file mode 100755
index 0000000..b713e7a
--- /dev/null
+++ b/libexec/container/info
@@ -0,0 +1,221 @@
+#!/bin/sh
+
+# Copyright (C) 2014-2022 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"
+
+VERSION="$(${PROGRAM} version)"
+
+Parameters ()
+{
+ GETOPT_LONGOPTIONS="name:,status,os,ip,"
+ GETOPT_OPTIONS="n:,"
+
+ 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
+ ;;
+
+ --status)
+ ACTIONS="${ACTIONS} status"
+ shift 1
+ ;;
+
+ --os)
+ ACTIONS="${ACTIONS} os"
+ shift 1
+ ;;
+
+ --ip)
+ ACTIONS="${ACTIONS} ip"
+ shift 1
+ ;;
+
+ --)
+ shift 1
+ break
+ ;;
+
+ *)
+ echo "'${COMMAND}': getopt error" >&2
+ exit 1
+ ;;
+ esac
+ done
+}
+
+Usage ()
+{
+ echo "Usage: ${PROGRAM} ${COMMAND} -n|--name NAME [--status] [--os] [--ip]" >&2
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
+ exit 1
+}
+
+Parameters "${@}"
+
+# Pre hooks
+for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
+
+ACTIONS="${ACTIONS:-status os ip}"
+HOST="$(cat /etc/hostname)"
+
+# Run
+
+# Status
+STATUS="$(machinectl show ${NAME} 2>&1 | awk -FState= '/^State=/ { print $2 }')"
+
+if [ -e "${CONFIG}/${NAME}.conf" ]
+then
+ CONTAINER_SERVER="$(awk -Fcnt.container-server= '/^cnt.container-server=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ CONTAINER_SERVER="${CONTAINER_SERVER:-false}"
+
+ case "${CONTAINER_SERVER}" in
+ ${HOST}|true)
+ ;;
+
+ *)
+ STATUS="other"
+ ;;
+ esac
+else
+ STATUS="other"
+fi
+
+case "${STATUS}" in
+ running)
+ STATUS="started"
+ ;;
+
+ other)
+ ;;
+
+ *)
+ STATUS="stopped"
+ ;;
+esac
+
+# OS
+VERSION_BASH="$(chroot ${MACHINES}/${NAME} apt-cache policy bash | awk '/Installed: / { print $2 }')"
+
+case "${VERSION_BASH}" in
+ 4.1-*|4.1.[0-9]*)
+ OS="Debian 6 (squeeze)"
+ ;;
+
+ 4.2-*|4.2.[0-9]*)
+ OS="Debian 7 (wheezy)"
+ ;;
+
+ 4.3-*|4.3.[0-9]*)
+ OS="Debian 8 (jessie)"
+ ;;
+
+ 4.4-*|4.4.[0-9]*)
+ OS="Debian 9 (stretch)"
+ ;;
+
+ 5.0-*|5.0.[0-9]*)
+ OS="Debian 10 (buster)"
+ ;;
+
+ 5.1-*|5.1.[0-9]*)
+ OS="Debian 11 (bullseye)"
+ ;;
+
+ 5.2-*|5.2.[0-9]*)
+ OS="Debian 12 (bookworm)"
+ ;;
+
+ *)
+ OS="n/a"
+ ;;
+esac
+
+case "${STATUS}" in
+ started)
+ IP="$(cnt run -n ${NAME} -- hostname -I)"
+ ;;
+
+ *)
+ if ls "${MACHINES}/${NAME}/etc/systemd/network"/*.network > /dev/null 2>&1
+ then
+ IP="$(awk -FAddress= '/^Address/ { printf "%s ", $2 }' ${MACHINES}/${NAME}/etc/systemd/network/*.network)"
+ elif [ -e "${MACHINES}/${NAME}/etc/network/interfaces" ]
+ then
+ IP="$(awk '/address/ { printf "%s ", $2 }' ${MACHINES}/${NAME}/etc/network/interfaces)"
+ fi
+
+ IP="${IP:-n/a}"
+ ;;
+esac
+
+for ACTION in ${ACTIONS}
+do
+ case "${ACTION}" in
+ status)
+ echo "${STATUS}"
+ ;;
+
+ os)
+ echo "${OS}"
+ ;;
+
+ ip)
+ echo "${IP}"
+ ;;
+ esac
+done
+
+# Post hooks
+for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
diff --git a/lib/container/key b/libexec/container/key
index f4e337c..efd214e 100755
--- a/lib/container/key
+++ b/libexec/container/key
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -15,15 +15,16 @@
# 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"
COMMAND="$(basename ${0})"
-KEYS="/etc/${PROJECT}/${PROGRAM}/keys"
+KEYS="/etc/${SOFTWARE}/keys"
Parameters ()
{
@@ -75,7 +76,10 @@ 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
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
exit 1
}
@@ -86,6 +90,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
@@ -104,7 +117,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
@@ -130,7 +143,18 @@ fi
case "${ACTION}" in
add)
- gpg --homedir "${KEYS}" --import "${ADD}"
+ if [ -e "${ADD}" ]
+ then
+ gpg --homedir "${KEYS}" --import "${ADD}"
+ elif [ -e "/usr/share/${SOFTWARE}/keys/${ADD}" ]
+ then
+ gpg --homedir "${KEYS}" --import "/usr/share/${SOFTWARE}/keys/${ADD}"
+ elif [ -e "/usr/share/${SOFTWARE}/keys/${ADD}.pub" ]
+ then
+ gpg --homedir "${KEYS}" --import "/usr/share/${SOFTWARE}/keys/${ADD}.pub"
+ else
+ gpg --homedir "${KEYS}" --recv "${ADD}"
+ fi
;;
list)
diff --git a/lib/container/limit b/libexec/container/limit
index 42f36a2..b7f6e9b 100755
--- a/lib/container/limit
+++ b/libexec/container/limit
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -15,15 +15,16 @@
# 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"
COMMAND="$(basename ${0})"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
Parameters ()
@@ -105,6 +106,9 @@ Parameters ()
Usage ()
{
echo "Usage: ${PROGRAM} ${COMMAND} -n|--name NAME [--blockio-device-weight \"DEVICE WEIGHT\"] [--blockio-read-bandwidth \"DEVICE BYTES\"] [-b|--blockio-weight WEIGHT] [--blockio-write-bandwidth \"DEVICE BYTES\"] [-c|--cpu-quota QUOTA] [--cpu-shares SHARES] [-m|--memory-limit BYTES] [-t|--tasks-max NUMBER]" >&2
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
exit 1
}
@@ -121,7 +125,7 @@ then
exit 1
fi
-STATE="$(machinectl show ${NAME} 2>&1 | awk -F= '/^State=/ { print $2 }')"
+STATE="$(machinectl show ${NAME} 2>&1 | awk -FState= '/^State=/ { print $2 }')"
case "${STATE}" in
running)
diff --git a/lib/container/list b/libexec/container/list
index 24457de..a56c1f8 100755
--- a/lib/container/list
+++ b/libexec/container/list
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -15,16 +15,17 @@
# 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"
COMMAND="$(basename ${0})"
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
VERSION="$(${PROGRAM} version)"
@@ -108,6 +109,9 @@ Parameters ()
Usage ()
{
echo "Usage: ${PROGRAM} ${COMMAND} [-a|--all] [--csv-separator SEPARATOR] [--format FORMAT] [-h|--host HOSTNAME] [--nwdiag-color COLOR] [--nwdiag-label LABEL] [-o|--other] [-s|--started] [-t|--stopped]" >&2
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
exit 1
}
@@ -328,11 +332,11 @@ fi
for CONTAINER in ${CONTAINERS}
do
- STATE="$(machinectl show ${CONTAINER} 2>&1 | awk -F= '/^State=/ { print $2 }')"
+ STATE="$(machinectl show ${CONTAINER} 2>&1 | awk -FState= '/^State=/ { print $2 }')"
if [ -e "${CONFIG}/${CONTAINER}.conf" ]
then
- CONTAINER_SERVER="$(awk -F= '/^cnt.container-server=/ { print $2 }' ${CONFIG}/${CONTAINER}.conf)"
+ CONTAINER_SERVER="$(awk -Fcnt.container-server= '/^cnt.container-server=/ { print $2 }' ${CONFIG}/${CONTAINER}.conf)"
CONTAINER_SERVER="${CONTAINER_SERVER:-false}"
case "${CONTAINER_SERVER}" in
@@ -365,15 +369,33 @@ do
ADDRESS=""
- if ls "${MACHINES}/${CONTAINER}/etc/systemd/network"/*.network > /dev/null 2>&1
- then
- ADDRESS="$(awk -F= '/^Address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/systemd/network/*.network | head -n1)"
- elif [ -e "${MACHINES}/${CONTAINER}/etc/network/interfaces" ]
- then
- ADDRESS="$(awk '/address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/network/interfaces | head -n1)"
- fi
+ case "${STATE}" in
+ started)
+ case "${FORMAT}" in
+ shell|sh)
+ ;;
+
+ *)
+ LEADER="$(machinectl status ${CONTAINER} | awk '/Leader: / { print $2 }')"
+ ADDRESS="$(nsenter --all --target "${LEADER}" /bin/hostname -I)"
+ ;;
+ esac
+
+ ADDRESS="${ADDRESS:-none}"
+ ;;
- ADDRESS="${ADDRESS:-n/a}"
+ *)
+ if ls "${MACHINES}/${CONTAINER}/etc/systemd/network"/*.network > /dev/null 2>&1
+ then
+ ADDRESS="$(for IP in $(awk -FAddress= '/^Address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/systemd/network/*.network); do echo -n "${IP} "; done)"
+ elif [ -e "${MACHINES}/${CONTAINER}/etc/network/interfaces" ]
+ then
+ ADDRESS="$(for IP in $(awk '/address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/network/interfaces); do echo -n "${IP} "; done)"
+ fi
+
+ ADDRESS="${ADDRESS:-n/a}"
+ ;;
+ esac
if echo ${LIST} | grep -qs all
then
diff --git a/lib/container/log b/libexec/container/log
index 2740213..b7a000d 100755
--- a/lib/container/log
+++ b/libexec/container/log
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -15,15 +15,17 @@
# 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"
COMMAND="$(basename ${0})"
-LOG="/var/log/${PROJECT}/${PROGRAM}.log"
+HOOKS="/etc/${SOFTWARE}/hooks"
+LOG="/var/log/${SOFTWARE}/${PROGRAM}.log"
Parameters ()
{
@@ -74,11 +76,24 @@ Parameters ()
Usage ()
{
echo "Usage: ${PROGRAM} ${COMMAND} [-n|--name NAME] [-d|--date DATE|today|today-N|yesterday] [-u|--user USER]" >&2
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
exit 1
}
Parameters "${@}"
+# Pre hooks
+for FILE in "${HOOKS}/pre-${COMMAND}".*
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
+
+# Run
case "${DATE}" in
today-*)
DAYS="$(echo ${DATE} | awk -F- '{ print $2 }')"
@@ -141,3 +156,12 @@ do
;;
esac
done
+
+# Post hooks
+for FILE in "${HOOKS}/post-${COMMAND}".*
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
diff --git a/lib/container/move b/libexec/container/move
index cdabbe4..fdc19e6 100755
--- a/lib/container/move
+++ b/libexec/container/move
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -15,16 +15,17 @@
# 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"
COMMAND="$(basename ${0})"
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
Parameters ()
@@ -76,6 +77,9 @@ Parameters ()
Usage ()
{
echo "Usage: ${PROGRAM} ${COMMAND} [-f|--force] -n|--new NAME -o|--old NAME" >&2
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
exit 1
}
@@ -98,7 +102,7 @@ then
exit 1
fi
-STATE="$(machinectl show ${OLD} 2>&1 | awk -F= '/^State=/ { print $2 }')"
+STATE="$(machinectl show ${OLD} 2>&1 | awk -FState= '/^State=/ { print $2 }')"
case "${STATE}" in
running)
@@ -117,7 +121,7 @@ case "${FORCE}" in
echo -n "'${OLD}': rename container to '${NEW}' [y|N]? "
read FORCE
- FORCE="$(echo ${FORCE} | tr [A-Z] [a-z])"
+ FORCE="$(echo ${FORCE} | tr '[A-Z]' '[a-z]')"
case "${FORCE}" in
y|yes)
@@ -132,7 +136,7 @@ case "${FORCE}" in
esac
# Pre hooks
-for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"
+for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${OLD}.pre-${COMMAND}"
do
if [ -x "${FILE}" ]
then
@@ -145,7 +149,7 @@ mv "${CONFIG}/${OLD}.conf" "${CONFIG}/${NEW}.conf"
mv "${MACHINES}/${OLD}" "${MACHINES}/${NEW}"
# rw bind mounts
-BIND="$(awk -F= '/^bind=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+BIND="$(awk -Fbind= '/^bind=/ { print $2 }' ${CONFIG}/${NEW}.conf)"
if [ -n "${BIND}" ]
then
@@ -172,7 +176,7 @@ then
fi
# ro bind mounts
-BIND_RO="$(awk -F= '/^bind-ro=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+BIND_RO="$(awk -Fbind-ro= '/^bind-ro=/ { print $2 }' ${CONFIG}/${NEW}.conf)"
if [ -n "${BIND_RO}" ]
then
@@ -202,7 +206,7 @@ fi
sed -i -e "s|${OLD}|${NEW}|g" "${CONFIG}/${NEW}.conf"
# Post hooks
-for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}"
+for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NEW}.post-${COMMAND}"
do
if [ -x "${FILE}" ]
then
diff --git a/libexec/container/rebuild b/libexec/container/rebuild
new file mode 100755
index 0000000..e526520
--- /dev/null
+++ b/libexec/container/rebuild
@@ -0,0 +1,152 @@
+#!/bin/sh
+
+# Copyright (C) 2014-2022 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})"
+
+HOOKS="/etc/${SOFTWARE}/hooks"
+MACHINES="/var/lib/machines"
+
+Parameters ()
+{
+ OPTIONS_ALL=""
+
+ GETOPT_LONGOPTIONS="name:,force,verbose,"
+ GETOPT_OPTIONS="n:,f,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
+ ;;
+
+ -f|--force)
+ FORCE="true"
+ shift 1
+
+ OPTIONS_ALL="${OPTIONS_ALL} --force"
+ ;;
+
+ -v|--verbose)
+ VERBOSE="true"
+ shift 1
+
+ OPTIONS_ALL="${OPTIONS_ALL} --verbose"
+ ;;
+
+ --)
+ shift 1
+ break
+ ;;
+
+ *)
+ echo "'${COMMAND}': getopt error" >&2
+ exit 1
+ ;;
+ esac
+ done
+}
+
+Usage ()
+{
+ echo "Usage: ${PROGRAM} ${COMMAND} -n|--name NAME [-f|--force] [-v|--verbose]" >&2
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
+ exit 1
+}
+
+Parameters "${@}"
+
+if [ -z "${NAME}" ]
+then
+ Usage
+fi
+
+case "${NAME}" in
+ ALL)
+ NAMES="$(${PROGRAM} list --format shell --started)"
+
+ for NAME in ${NAMES}
+ do
+ ${PROGRAM} rebuild,start --name ${NAME} ${OPTIONS_ALL} || true
+ done
+
+ exit 0
+ ;;
+esac
+
+if [ ! -e "${MACHINES}/${NAME}" ]
+then
+ echo "'${NAME}': no such container" >&2
+ exit 1
+fi
+
+# Pre hooks
+for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
+
+# Run
+case "${VERBOSE}" in
+ true)
+ echo -n "Rebuilding container ${NAME}..."
+ ;;
+esac
+
+${PROGRAM} stop ${OPTIONS_ALL} --name ${NAME} || true
+sleep 0.5
+${PROGRAM} remove ${OPTIONS_ALL} --name ${NAME} || true
+sleep 0.5
+${PROGRAM} build --name ${NAME} || true
+
+case "${VERBOSE}" in
+ true)
+ echo " done."
+ ;;
+esac
+
+# Post hooks
+for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
diff --git a/lib/container/remove b/libexec/container/remove
index 404b80d..4cb5d48 100755
--- a/lib/container/remove
+++ b/libexec/container/remove
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -15,16 +15,17 @@
# 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"
COMMAND="$(basename ${0})"
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
Parameters ()
@@ -89,6 +90,9 @@ Parameters ()
Usage ()
{
echo "Usage: ${PROGRAM} ${COMMAND} -n|--name NAME [--allow-stop] [-f|--force] [-v|--verbose]" >&2
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
exit 1
}
@@ -126,12 +130,6 @@ case "${NAME}" in
for NAME in ${NAMES}
do
- case "${VERBOSE}" in
- true)
- echo "Removing container ${NAME}..."
- ;;
- esac
-
${PROGRAM} remove --name ${NAME} ${OPTIONS_ALL} || true
done
@@ -145,14 +143,14 @@ then
exit 1
fi
-STATE="$(machinectl show ${NAME} 2>&1 | awk -F= '/^State=/ { print $2 }')"
+STATE="$(machinectl show ${NAME} 2>&1 | awk -FState= '/^State=/ { print $2 }')"
case "${STATE}" in
running)
case "${ALLOW_STOP}" in
true)
echo "'${NAME}': container is started, stopping it now" >&2
- ${PROGRAM} stop -n ${NAME}
+ ${PROGRAM} stop -n ${NAME} -f
;;
*)
@@ -171,7 +169,7 @@ case "${FORCE}" in
echo -n "'${NAME}': remove container '${NAME}' [y|N]? "
read FORCE
- FORCE="$(echo ${FORCE} | tr [A-Z] [a-z])"
+ FORCE="$(echo ${FORCE} | tr '[A-Z]' '[a-z]')"
case "${FORCE}" in
y|yes)
@@ -207,7 +205,7 @@ done
if [ -e "${CONFIG}/${NAME}.conf" ]
then
# Removing rw bind mounts
- BIND="$(awk -F= '/^bind=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ BIND="$(awk -Fbind= '/^bind=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
if [ -n "${BIND}" ]
then
@@ -222,7 +220,7 @@ then
fi
# Removing ro bind mounts
- BIND_RO="$(awk -F= '/^bind-ro=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ BIND_RO="$(awk -Fbind-ro= '/^bind-ro=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
if [ -n "${BIND_RO}" ]
then
@@ -238,9 +236,21 @@ then
fi
# Run
+case "${VERBOSE}" in
+ true)
+ echo -n "Removing container ${NAME}..."
+ ;;
+esac
+
rm --preserve-root --one-file-system -rf ${RM_OPTIONS} "${MACHINES}/${NAME}"
rm -f ${RM_OPTIONS} "${CONFIG}/${NAME}.conf"
+case "${VERBOSE}" in
+ true)
+ echo " done."
+ ;;
+esac
+
# Post hooks
for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}"
do
diff --git a/libexec/container/restart b/libexec/container/restart
new file mode 100755
index 0000000..0eb753c
--- /dev/null
+++ b/libexec/container/restart
@@ -0,0 +1,172 @@
+#!/bin/sh
+
+# Copyright (C) 2014-2022 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})"
+
+HOOKS="/etc/${SOFTWARE}/hooks"
+MACHINES="/var/lib/machines"
+
+Parameters ()
+{
+ OPTIONS_ALL=""
+
+ GETOPT_LONGOPTIONS="name:,force,interactive,verbose,"
+ GETOPT_OPTIONS="n:,f,i,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
+ ;;
+
+ -f|--force)
+ FORCE="true"
+ shift 1
+
+ OPTIONS_ALL="${OPTIONS_ALL} --force"
+ ;;
+
+ -i|--interactive)
+ INTERACTIVE="true"
+ shift 1
+
+ OPTIONS_ALL="${OPTIONS_ALL} --interactive"
+ ;;
+
+ -v|--verbose)
+ VERBOSE="true"
+ shift 1
+
+ OPTIONS_ALL="${OPTIONS_ALL} --verbose"
+ ;;
+
+ --)
+ shift 1
+ break
+ ;;
+
+ *)
+ echo "'${COMMAND}': getopt error" >&2
+ exit 1
+ ;;
+ esac
+ done
+}
+
+Usage ()
+{
+ echo "Usage: ${PROGRAM} ${COMMAND} -n|--name NAME [-f|--force] [-i|--interactive] [-v|--verbose]" >&2
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
+ exit 1
+}
+
+Parameters "${@}"
+
+if [ -z "${NAME}" ]
+then
+ Usage
+fi
+
+case "${NAME}" in
+ ALL)
+ NAMES="$(${PROGRAM} list --format shell --started)"
+
+ for NAME in ${NAMES}
+ do
+ ${PROGRAM} restart --name ${NAME} ${OPTIONS_ALL} || true
+ done
+
+ exit 0
+ ;;
+esac
+
+if [ ! -e "${MACHINES}/${NAME}" ]
+then
+ echo "'${NAME}': no such container" >&2
+ exit 1
+fi
+
+if [ "${FORCE}" != "true" ] || [ "${INTERACTIVE}" = "true" ]
+then
+ echo -n "'${NAME}': restart container '${NAME}' [y|N]? "
+ read STOP
+
+ STOP="$(echo ${STOP} | tr '[A-Z]' '[a-z]')"
+
+ case "${STOP}" in
+ y|yes)
+ ;;
+
+ *)
+ exit 1
+ ;;
+ esac
+fi
+
+# Pre hooks
+for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
+
+# Run
+case "${VERBOSE}" in
+ true)
+ echo -n "Restarting container ${NAME}..."
+ ;;
+esac
+
+machinectl reboot ${NAME}
+
+case "${VERBOSE}" in
+ true)
+ echo " done."
+ ;;
+esac
+
+# Post hooks
+for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
diff --git a/lib/container/restart b/libexec/container/run
index f78cfff..4daeaa2 100755
--- a/lib/container/restart
+++ b/libexec/container/run
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2019 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -15,21 +15,20 @@
# 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"
COMMAND="$(basename ${0})"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
Parameters ()
{
- OPTIONS_ALL=""
-
GETOPT_LONGOPTIONS="name:,"
GETOPT_OPTIONS="n:,"
@@ -66,7 +65,10 @@ Parameters ()
Usage ()
{
- echo "Usage: ${PROGRAM} ${COMMAND} -n|--name NAME" >&2
+ echo "Usage: ${PROGRAM} ${COMMAND} -n|--name NAME -- COMMAND" >&2
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
exit 1
}
@@ -77,30 +79,25 @@ then
Usage
fi
-case "${NAME}" in
- ALL)
- NAMES="$(${PROGRAM} list --format shell --started)"
+if [ ! -e "${MACHINES}/${NAME}" ]
+then
+ echo "'${NAME}': no such container" >&2
+ exit 1
+fi
- for NAME in ${NAMES}
- do
- case "${VERBOSE}" in
- true)
- echo "Restarting container ${NAME}..."
- ;;
- esac
+STATE="$(machinectl show ${NAME} 2>&1 | awk -F= '/^State=/ { print $2 }')"
- ${PROGRAM} restart --name ${NAME} || true
- done
+case "${STATE}" in
+ running)
+ ;;
- exit 0
+ *)
+ echo "'${NAME}': container is not running" >&2
+ exit 1
;;
esac
-if [ ! -e "${MACHINES}/${NAME}" ]
-then
- echo "'${NAME}': no such container" >&2
- exit 1
-fi
+LEADER="$(machinectl status ${NAME} | awk '/Leader: / { print $2 }')"
# Pre hooks
for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"
@@ -111,8 +108,18 @@ do
fi
done
+SSH_CLIENT="${SSH_CLIENT:-127.0.0.1 0 0}"
+
+RUN="$(echo ${@} | awk -F-- '{ print $2}')"
+
# Run
-machinectl reboot ${NAME}
+nsenter --all --target "${LEADER}" --wd="${MACHINES}/${NAME}/root" /usr/bin/script -c "LC_ALL=C.UTF-8 /bin/bash -l -c \"${RUN}\"" -q /dev/null
+
+case "${SSH_CLIENT}" in
+ 127.0.0.1*)
+ unset SSH_CLIENT
+ ;;
+esac
# Post hooks
for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}"
diff --git a/lib/container/start b/libexec/container/start
index f89944d..1f22325 100755
--- a/lib/container/start
+++ b/libexec/container/start
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -15,16 +15,17 @@
# 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"
COMMAND="$(basename ${0})"
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
START="false"
@@ -77,6 +78,9 @@ Parameters ()
-v|--verbose)
VERBOSE="true"
+ shift 1
+
+ OPTIONS_ALL="${OPTIONS_ALL} --verbose"
;;
--)
@@ -95,6 +99,9 @@ Parameters ()
Usage ()
{
echo "Usage: ${PROGRAM} ${COMMAND} -n|--name NAME [-f|--force]" >&2
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
exit 1
}
@@ -114,12 +121,6 @@ case "${NAME}" in
for NAME in ${NAMES}
do
- case "${VERBOSE}" in
- true)
- echo "Starting container ${NAME}..."
- ;;
- esac
-
${PROGRAM} start --name ${NAME} ${OPTIONS_ALL} || true
done
@@ -133,9 +134,15 @@ then
exit 1
fi
+# options
+if grep -Eqs "^ *cnt.start=" "${CONFIG}/${NAME}.conf" | grep -qs force
+then
+ FORCE="true"
+fi
+
case "${START}" in
false)
- STATE="$(machinectl show ${NAME} 2>&1 | awk -F= '/^State=/ { print $2 }')"
+ STATE="$(machinectl show ${NAME} 2>&1 | awk -FState= '/^State=/ { print $2 }')"
case "${STATE}" in
running)
@@ -152,7 +159,7 @@ then
true)
rm -f "${MACHINES}/.#${NAME}.lck"
- VETHS="$(awk -F= '/^network-veth-extra=/ { print $2 }' ${CONFIG}/${NAME}.conf | awk -F: '{ print $1 }')"
+ VETHS="$(awk -Fnetwork-veth-extra= '/^network-veth-extra=/ { print $2 }' ${CONFIG}/${NAME}.conf | awk -F: '{ print $1 }')"
for VETH in ${VETHS}
do
@@ -184,6 +191,13 @@ case "${HOST_ARCHITECTURE}" in
;;
esac
+if systemctl status systemd-networkd > /dev/null 2>&1
+then
+ NETWORK_SUBSYSTEM="systemd-networkd"
+else
+ NETWORK_SUBSYSTEM="ifupdown"
+fi
+
case "${START}" in
start)
;;
@@ -203,12 +217,14 @@ esac
# config
if [ -e "${CONFIG}/${NAME}.conf" ]
then
- CNT_OVERLAY="$(awk -F= '/^cnt.overlay=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ CNT_OVERLAY="$(awk -Fcnt.overlay= '/^cnt.overlay=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ CNT_OVERLAY_OPTIONS="$(awk -Fcnt.overlay-options= '/^cnt.overlay-options=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
if [ -n "${CNT_OVERLAY}" ]
then
CNT_OVERLAYS="$(echo ${CNT_OVERLAY} | sed -e 's|;| |g')"
+ COUNT="0"
for CNT_OVERLAY in ${CNT_OVERLAYS}
do
DIRECTORY_LOWER="$(echo ${CNT_OVERLAY} | awk -F: '{ print $1 }')"
@@ -216,6 +232,9 @@ then
DIRECTORY_WORK="$(echo ${CNT_OVERLAY} | awk -F: '{ print $3 }')"
DIRECTORY_MERGED="$(echo ${CNT_OVERLAY} | awk -F: '{ print $4 }')"
+ COUNT="$((${COUNT} + 1))"
+ CNT_OVERLAY_OPTION="$(echo ${CNT_OVERLAY_OPTIONS} | awk -F ';' "{ print \$${COUNT} }")"
+
for DIRECTORY in "${DIRECTORY_LOWER}" "${DIRECTORY_UPPER}" "${DIRECTORY_WORK}" "${DIRECTORY_MERGED}"
do
mkdir -p "${DIRECTORY}"
@@ -223,12 +242,17 @@ then
if ! findmnt -n -o SOURCE "${DIRECTORY_MERGED}" | grep -qs '^cnt.overlay-'
then
- mount cnt.overlay-${NAME} -t overlay -olowerdir="${DIRECTORY_LOWER}",upperdir="${DIRECTORY_UPPER}",workdir="${DIRECTORY_WORK}",default_permissions "${DIRECTORY_MERGED}"
+ if [ -n "${CNT_OVERLAY_OPTION}" ]
+ then
+ CNT_OVERLAY_OPTION="-o ${CNT_OVERLAY_OPTION}"
+ fi
+
+ mount cnt.overlay-${NAME} -t overlay ${CNT_OVERLAY_OPTION} -olowerdir="${DIRECTORY_LOWER}",upperdir="${DIRECTORY_UPPER}",workdir="${DIRECTORY_WORK}",default_permissions "${DIRECTORY_MERGED}"
fi
done
fi
- BIND="$(awk -F= '/^bind=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ BIND="$(awk -Fbind= '/^bind=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
if [ -n "${BIND}" ]
then
@@ -253,7 +277,7 @@ then
done
fi
- BIND_RO="$(awk -F= '/^bind-ro=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ BIND_RO="$(awk -Fbind-ro= '/^bind-ro=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
if [ -n "${BIND_RO}" ]
then
@@ -278,7 +302,7 @@ then
done
fi
- BOOT="$(awk -F= '/^boot=/ { print $2 }' ${CONFIG}/${NAME}.conf || echo yes)"
+ BOOT="$(awk -Fboot= '/^boot=/ { print $2 }' ${CONFIG}/${NAME}.conf || echo yes)"
case "${BOOT}" in
yes)
@@ -290,7 +314,7 @@ then
;;
esac
- CAPABILITY="$(awk -F= '/^capability=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ CAPABILITY="$(awk -Fcapability= '/^capability=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
case "${CAPABILITY}" in
"")
@@ -302,10 +326,10 @@ then
;;
esac
- DIRECTORY="$(awk -F= '/^directory=/ { print $2 }' ${CONFIG}/${NAME}.conf || echo ${MACHINES}/${NAMES})"
+ DIRECTORY="$(awk -Fdirectory= '/^directory=/ { print $2 }' ${CONFIG}/${NAME}.conf || echo ${MACHINES}/${NAMES})"
DIRECTORY="--directory ${DIRECTORY}"
- DROP_CAPABILITY="$(awk -F= '/^drop-capability=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ DROP_CAPABILITY="$(awk -Fdrop-capability= '/^drop-capability=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
case "${DROP_CAPABILITY}" in
"")
@@ -317,7 +341,7 @@ then
;;
esac
- LINK_JOURNAL="$(awk -F= '/^link-journal=/ { print $2 }' ${CONFIG}/${NAME}.conf || echo no)"
+ LINK_JOURNAL="$(awk -Flink-journal= '/^link-journal=/ { print $2 }' ${CONFIG}/${NAME}.conf || echo no)"
case "${LINK_JOURNAL}" in
yes)
@@ -333,7 +357,7 @@ then
NETWORK_VETH_EXTRA=""
- VETHS="$(awk -F= '/^network-veth-extra=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ VETHS="$(awk -Fnetwork-veth-extra= '/^network-veth-extra=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
case "${VETHS}" in
"")
@@ -345,7 +369,7 @@ then
NETWORK_VETH_EXTRA="${NETWORK_VETH_EXTRA} --network-veth-extra=${VETH}"
INTERFACE="$(echo ${VETH} | awk -F: '{ print $1 }')"
- if [ "$(echo ${INTERFACE} | wc -c)" -gt 15 ]
+ if [ "$(echo ${INTERFACE} | wc -c)" -gt 16 ]
then
echo "'${INTERFACE}': name exceeds maximum of 15 characters, network might be not working."
fi
@@ -353,7 +377,7 @@ then
;;
esac
- NETWORK_BRIDGES="$(awk -F= '/^cnt.network-bridge=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ NETWORK_BRIDGES="$(awk -Fcnt.network-bridge= '/^cnt.network-bridge=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
case "${NETWORK_BRIDGES}" in
"")
@@ -365,7 +389,7 @@ then
INTERFACE="$(echo ${BRIDGE_DEFINITION} | awk -F: '{ print $1 }')"
BRIDGE="$(echo ${BRIDGE_DEFINITION} | awk -F: '{ print $2 }')"
- if [ "$(echo ${INTERFACE} | wc -c)" -gt 15 ]
+ if [ "$(echo ${INTERFACE} | wc -c)" -gt 16 ]
then
echo "'${INTERFACE}': name exceeds maximum of 15 characters, network might be not working."
fi
@@ -373,6 +397,9 @@ then
if [ -n "${BRIDGE}" ] && [ -n "${INTERFACE}" ]
then
+ case "${NETWORK_SUBSYSTEM}" in
+ ifupdown)
+
cat > "/etc/network/interfaces.d/${INTERFACE}" << EOF
allow-hotplug ${INTERFACE}
iface ${INTERFACE} inet manual
@@ -382,6 +409,22 @@ iface ${INTERFACE} inet manual
post-down ip link set ${INTERFACE} down
EOF
+ ;;
+
+ systemd-networkd)
+ mkdir -p /run/systemd/network
+
+cat > "/run/systemd/network/${INTERFACE}.network" << EOF
+[Match]
+Name=${INTERFACE}
+
+[Network]
+Bridge=${BRIDGE}
+EOF
+
+ networkctl reload
+ ;;
+ esac
else
echo "Warning bridge definition '${BRIDGE_DEFINITION}' not recognized (expected <bridge>:<interface>): Ignoring"
fi
@@ -389,7 +432,7 @@ EOF
;;
esac
- PRIVATE_USERS="$(awk -F= '/^private-users=/ { print $2 }' ${CONFIG}/${NAME}.conf || echo no)"
+ PRIVATE_USERS="$(awk -Fprivate-users= '/^private-users=/ { print $2 }' ${CONFIG}/${NAME}.conf || echo no)"
case "${PRIVATE_USERS}" in
yes)
@@ -401,7 +444,7 @@ EOF
;;
esac
- REGISTER="$(awk -F= '/^register=/ { print $2 }' ${CONFIG}/${NAME}.conf || echo yes)"
+ REGISTER="$(awk -Fregister= '/^register=/ { print $2 }' ${CONFIG}/${NAME}.conf || echo yes)"
case "${REGISTER}" in
yes)
@@ -413,7 +456,7 @@ EOF
;;
esac
- BLOCK_IO_DEVICE_WEIGHT="$(awk -F= '/^BlockIODeviceWeight=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ BLOCK_IO_DEVICE_WEIGHT="$(awk -FBlockIODeviceWeight= '/^BlockIODeviceWeight=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
if [ -n "${BLOCK_IO_DEVICE_WEIGHT}" ]
then
@@ -421,7 +464,7 @@ EOF
SET_PROPERTY="true"
fi
- BLOCK_IO_READ_BANDWIDTH="$(awk -F= '/^BlockIOReadBandwidth=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ BLOCK_IO_READ_BANDWIDTH="$(awk -FBlockIOReadBandwidth= '/^BlockIOReadBandwidth=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
if [ -n "${BLOCK_IO_READ_BANDWIDTH}" ]
then
@@ -429,7 +472,7 @@ EOF
SET_PROPERTY="true"
fi
- BLOCK_IO_WEIGHT="$(awk -F= '/^BlockIOWeight=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ BLOCK_IO_WEIGHT="$(awk -FBlockIOWeight= '/^BlockIOWeight=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
if [ -n "${BLOCK_IO_WEIGHT}" ]
then
@@ -437,7 +480,7 @@ EOF
SET_PROPERTY="true"
fi
- BLOCK_IO_WRITE_BANDWIDTH="$(awk -F= '/^BlockIOWriteBandwidth=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ BLOCK_IO_WRITE_BANDWIDTH="$(awk -FBlockIOWriteBandwidth=/= '/^BlockIOWriteBandwidth=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
if [ -n "${BLOCK_IO_WRITE_BANDWIDTH}" ]
then
@@ -445,7 +488,7 @@ EOF
SET_PROPERTY="true"
fi
- CPU_QUOTA="$(awk -F= '/^CPUQuota=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ CPU_QUOTA="$(awk -FCPUQuota= '/^CPUQuota=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
if [ -n "${CPU_QUOTA}" ]
then
@@ -453,7 +496,7 @@ EOF
SET_PROPERTY="true"
fi
- CPU_SHARES="$(awk -F= '/^CPUShares=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ CPU_SHARES="$(awk -FCPUShares= '/^CPUShares=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
if [ -n "${CPU_SHARES}" ]
then
@@ -461,7 +504,7 @@ EOF
SET_PROPERTY="true"
fi
- MEMORY_LIMIT="$(awk -F= '/^MemoryLimit=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ MEMORY_LIMIT="$(awk -FMemoryLimit= '/^MemoryLimit=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
if [ -n "${MEMORY_LIMIT}" ]
then
@@ -469,7 +512,7 @@ EOF
SET_PROPERTY="true"
fi
- TASKS_MAX="$(awk -F= '/^TasksMax=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ TASKS_MAX="$(awk -FTasksMax= '/^TasksMax=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
if [ -n "${TASKS_MAX}" ]
then
@@ -482,6 +525,15 @@ case "${SYSTEMCTL}" in
true)
systemctl start ${PROGRAM}@${NAME}.service
+ # Post hooks
+ for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}"
+ do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+ done
+
exit 0
;;
esac
@@ -497,15 +549,22 @@ case "${START}" in
*)
# Run
+
+ case "${VERBOSE}" in
+ true)
+ echo -n "Starting container ${NAME}..."
+ ;;
+ esac
+
+ mkdir -p "/var/lib/${SOFTWARE}/state"
+ echo "start" > "/var/lib/${SOFTWARE}/state/${NAME}.run"
+
${SETARCH} systemd-nspawn --keep-unit ${BIND} ${BIND_RO} ${BOOT} ${CAPABILITY} ${DIRECTORY} ${DROP_CAPABILITY} ${MACHINE} ${NETWORK_VETH_EXTRA} ${LINK_JOURNAL} ${REGISTER}
- # Post hooks
- for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}"
- do
- if [ -x "${FILE}" ]
- then
- "${FILE}"
- fi
- done
+ case "${VERBOSE}" in
+ true)
+ echo " done."
+ ;;
+ esac
;;
esac
diff --git a/lib/container/status b/libexec/container/status
index a4b49e1..5b930a7 100755
--- a/lib/container/status
+++ b/libexec/container/status
@@ -15,16 +15,17 @@
# 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"
COMMAND="$(basename ${0})"
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
Parameters ()
@@ -66,6 +67,9 @@ Parameters ()
Usage ()
{
echo "Usage: ${PROGRAM} ${COMMAND} -n|--name NAME" >&2
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
exit 1
}
diff --git a/lib/container/stop b/libexec/container/stop
index a6bb761..8ca98ce 100755
--- a/lib/container/stop
+++ b/libexec/container/stop
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -15,16 +15,17 @@
# 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"
COMMAND="$(basename ${0})"
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
CLEAN="false"
@@ -33,8 +34,8 @@ Parameters ()
{
OPTIONS_ALL=""
- GETOPT_LONGOPTIONS="name:,force,clean,"
- GETOPT_OPTIONS="n:,f,"
+ GETOPT_LONGOPTIONS="name:,force,interactive,kill,clean,stateless,verbose,"
+ GETOPT_OPTIONS="n:,f,i,k,v,"
PARAMETERS="$(getopt --longoptions ${GETOPT_LONGOPTIONS} --name=${COMMAND} --options ${GETOPT_OPTIONS} --shell sh -- ${@})"
@@ -61,6 +62,20 @@ Parameters ()
OPTIONS_ALL="${OPTIONS_ALL} --force"
;;
+ -i|--interactive)
+ INTERACTIVE="true"
+ shift 1
+
+ OPTIONS_ALL="${OPTIONS_ALL} --interactive"
+ ;;
+
+ -k|--kill)
+ KILL="true"
+ shift 1
+
+ OPTIONS_ALL="${OPTIONS_ALL} --kill"
+ ;;
+
--clean)
# internal option
CLEAN="true"
@@ -69,6 +84,21 @@ Parameters ()
OPTONS_ALL="${OPTIONS_ALL} --clean"
;;
+ --stateless)
+ # internal option
+ STATELESS="true"
+ shift 1
+
+ OPTIONS_ALL="${OPTIONS_ALL} --stateless"
+ ;;
+
+ -v|--verbose)
+ VERBOSE="true"
+ shift 1
+
+ OPTIONS_ALL="${OPTIONS_ALL} --verbose"
+ ;;
+
--)
shift 1
break
@@ -84,7 +114,10 @@ Parameters ()
Usage ()
{
- echo "Usage: ${PROGRAM} ${COMMAND} -n|--name NAME [-f|--force]" >&2
+ echo "Usage: ${PROGRAM} ${COMMAND} -n|--name NAME [-f|--force] [-i|--interactive] [-v|--verbose]" >&2
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
exit 1
}
@@ -122,12 +155,6 @@ case "${NAME}" in
for NAME in ${NAMES}
do
- case "${VERBOSE}" in
- true)
- echo "Stopping container ${NAME}..."
- ;;
- esac
-
${PROGRAM} stop --name ${NAME} ${OPTIONS_ALL} || true
done
@@ -141,6 +168,13 @@ then
exit 1
fi
+if systemctl status systemd-networkd > /dev/null 2>&1
+then
+ NETWORK_SUBSYSTEM="systemd-networkd"
+else
+ NETWORK_SUBSYSTEM="ifupdown"
+fi
+
# Pre hooks
for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"
do
@@ -150,12 +184,12 @@ do
fi
done
-STATE="$(machinectl show ${NAME} 2>&1 | awk -F= '/^State=/ { print $2 }')"
+STATE="$(machinectl show ${NAME} 2>&1 | awk -FState= '/^State=/ { print $2 }')"
case "${CLEAN}" in
true)
# Removing overlay mounts
- CNT_OVERLAY="$(awk -F= '/^cnt.overlay=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ CNT_OVERLAY="$(awk -Fcnt.overlay= '/^cnt.overlay=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
if [ -n "${CNT_OVERLAY}" ]
then
@@ -175,7 +209,7 @@ case "${CLEAN}" in
fi
# Removing rw bind mounts
- BIND="$(awk -F= '/^bind=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ BIND="$(awk -Fbind= '/^bind=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
if [ -n "${BIND}" ]
then
@@ -190,7 +224,7 @@ case "${CLEAN}" in
fi
# Removing ro bind mounts
- BIND_RO="$(awk -F= '/^bind-ro=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ BIND_RO="$(awk -Fbind-ro= '/^bind-ro=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
if [ -n "${BIND_RO}" ]
then
@@ -205,7 +239,7 @@ case "${CLEAN}" in
fi
# Removing network configuration
- VETHS="$(awk -F= '/^network-veth-extra=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ VETHS="$(awk -Fnetwork-veth-extra= '/^network-veth-extra=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
case "${VETHS}" in
"")
@@ -215,7 +249,16 @@ case "${CLEAN}" in
for VETH in ${VETHS}
do
INTERFACE="$(echo ${VETH} | awk -F: '{ print $1 }')"
- FILE="/etc/network/interfaces.d/${INTERFACE}"
+
+ case "${NETWORK_SUBSYSTEM}" in
+ ifupdown)
+ FILE="/etc/network/interfaces.d/${INTERFACE}"
+ ;;
+
+ systemd-networkd)
+ FILE="/run/systemd/network/${INTERFACE}.network"
+ ;;
+ esac
if [ -f "${FILE}" ]
then
@@ -242,7 +285,7 @@ case "${STATE}" in
;;
esac
-case "${FORCE}" in
+case "${KILL}" in
true)
MODE="terminate"
;;
@@ -252,17 +295,58 @@ case "${FORCE}" in
;;
esac
+if [ "${FORCE}" != "true" ] || [ "${INTERACTIVE}" = "true" ]
+then
+ echo -n "'${NAME}': stop container '${NAME}' [y|N]? "
+ read STOP
+
+ STOP="$(echo ${STOP} | tr '[A-Z]' '[a-z]')"
+
+ case "${STOP}" in
+ y|yes)
+ ;;
+
+ *)
+ exit 1
+ ;;
+ esac
+fi
+
# Run
+case "${VERBOSE}" in
+ true)
+ echo -n "Stopping container ${NAME}..."
+ ;;
+esac
+
machinectl ${MODE} ${NAME}
-case "${FORCE}" in
+case "${KILL}" in
true)
- VETHS="$(awk -F= '/^network-veth-extra=/ { print $2 }' ${CONFIG}/${NAME}.conf | awk -F: '{ print $1 }')"
+ VETHS="$(awk -Fnetwork-veth-extra= '/^network-veth-extra=/ { print $2 }' ${CONFIG}/${NAME}.conf | awk -F: '{ print $1 }')"
for VETH in ${VETHS}
do
ip link delete ${VETH} > /dev/null 2>&1 || true
done
+
+ rm -f "${MACHINES}/.#${NAME}.lck"
+ ;;
+esac
+
+case "${STATELESS}" in
+ true)
+ ;;
+
+ *)
+ mkdir -p "/var/lib/${SOFTWARE}/state"
+ echo "stop" > "/var/lib/${SOFTWARE}/state/${NAME}.run"
+ ;;
+esac
+
+case "${VERBOSE}" in
+ true)
+ echo " done."
;;
esac
diff --git a/lib/container/top b/libexec/container/top
index 81c7436..268da9a 100755
--- a/lib/container/top
+++ b/libexec/container/top
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -15,11 +15,12 @@
# 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"
COMMAND="$(basename ${0})"
@@ -62,6 +63,9 @@ Parameters ()
Usage ()
{
echo "Usage: ${PROGRAM} ${COMMAND} [-d|--delay DELAY]" >&2
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
exit 1
}
diff --git a/libexec/container/update b/libexec/container/update
new file mode 100755
index 0000000..e2d9c80
--- /dev/null
+++ b/libexec/container/update
@@ -0,0 +1,270 @@
+#!/bin/sh
+
+# Copyright (C) 2014-2022 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})"
+
+HOOKS="/etc/${SOFTWARE}/hooks"
+
+Parameters ()
+{
+ GETOPT_LONGOPTIONS="name:,full-upgrade,interactive,autoremove,purge,yes,"
+ GETOPT_OPTIONS="n:,f,i,r,p,y,"
+
+ 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
+ ;;
+
+ -f|--full-upgrade)
+ FULL_UPGRADE="true"
+ shift 1
+ ;;
+
+ -i|--interactive)
+ INTERACTIVE="true"
+ shift 1
+ ;;
+
+ -r|--autoremove)
+ AUTOREMOVE="true"
+ shift 1
+ ;;
+
+ -p|--purge)
+ PURGE="--purge"
+ shift 1
+ ;;
+
+ -y|--yes)
+ YES="-y"
+ shift 1
+ ;;
+
+ --)
+ shift 1
+ break
+ ;;
+
+ *)
+ echo "'${COMMAND}': getopt error" >&2
+ exit 1
+ ;;
+ esac
+ done
+}
+
+Usage ()
+{
+ echo "Usage: ${PROGRAM} ${COMMAND} -n|--name NAME [-f|--full-upgrade] [-i|--interactive] [-r|--autoremove] [-p|--purge] [-y|--yes]" >&2
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
+ exit 1
+}
+
+Parameters "${@}"
+
+if [ -z "${NAME}" ]
+then
+ Usage
+fi
+
+Notification ()
+{
+ TYPE="${1}"
+ NUMBER="${2}"
+ PACKAGES="${3}"
+
+ if [ -z "${PACKAGES}" ]
+ then
+ return
+ fi
+
+ CONTAINER_USER="${SUDO_USER:-${USER}}"
+
+ DATE="$(date +%Y-%m-%d\ %H:%M:%S)"
+ HOST="$(hostname -f 2> /dev/null || hostname)"
+
+ # logfile
+ echo "${DATE} ${HOST} ${CONTAINER_USER} ${NAME} ${NUMBER} ${TYPE}: ${PACKAGES}" >> "/var/log/${SOFTWARE}/${PROGRAM}.log"
+
+ # irc
+ if [ -e /usr/bin/irk ]
+ then
+ for FILE in "/etc/${SOFTWARE}/${PROGRAM}.conf" "/etc/${SOFTWARE}/${PROGRAM}.conf.d"/*.conf
+ do
+ if [ -e "${FILE}" ]
+ then
+ . "${FILE}"
+ fi
+ done
+
+ if [ -n "${IRK_TARGETS}" ]
+ then
+ for TARGET in ${IRK_TARGETS}
+ do
+ irk "${TARGET}" "\x0300${CONTAINER_USER}\x03@\x0312${HOST}:\x03 \x0303${NAME}\x03 \x0307${NUMBER} ${TYPE}\x03: ${PACKAGES}"
+ done
+ fi
+ fi
+}
+
+case "${NAME}" in
+ ALL)
+ NAMES="$(container list --started --format shell)"
+ ;;
+
+ *)
+ NAMES="${NAME}"
+ ;;
+esac
+
+# Pre hooks
+for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
+
+if [ $(echo ${NAMES} | wc -w) -gt 1 ]
+then
+ NAME_LOOP="true"
+else
+ NAME_LOOP="false"
+fi
+
+# Run
+for NAME in ${NAMES}
+do
+ case "${INTERACTIVE}" in
+ true)
+ case "${NAME_LOOP}" in
+ true)
+ echo
+ ;;
+ esac
+
+ echo -n "'${NAME}': update container '${NAME}' [y|N|a]? "
+ read UPDATE
+
+ UPDATE="$(echo ${UPDATE} | tr '[A-Z]' '[a-z]')"
+
+ case "${UPDATE}" in
+ a|all)
+ INTERACTIVE="false"
+ ;;
+
+ y|yes)
+ ;;
+
+ *)
+ case "${NAME_LOOP}" in
+ true)
+ continue
+ ;;
+
+ *)
+ exit 1
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+
+ echo "################################################################################"
+ echo "Updating ${NAME}"
+ echo "################################################################################"
+
+ container run -n ${NAME} -- "apt update"
+
+ UPDATE_NUMBER="$(container run -n ${NAME} -- "apt \-\-simulate full-upgrade" | awk '/^[0-9]* upgraded, / { print $1 }')"
+
+ case "${UPDATE_NUMBER}" in
+ 0)
+ ;;
+
+ *)
+ # usefull use of grep to de-colorize apt output
+ UPDATE_PACKAGES="$(for PACKAGE in $(container run -n ${NAME} -- "apt list \-\-upgradable 2>/dev/null | grep '\/'" | awk -F/ '{ print $1 }'); do echo -n "${PACKAGE} "; done | sed -e 's| $||'; echo)"
+
+ case "${FULL_UPGRADE}" in
+ true)
+ container run -n ${NAME} -- "DEBCONF_FRONTEND='noninteractive' DEBCONF_PRIORITY='critical' DEBCONF_NONINTERACTIVE_SEEN='true' DEBCONF_NOWARNINGS='true' apt \-o Dpkg::Options::=\-\-force-confold -f ${YES} full-upgrade"
+ ;;
+
+ *)
+ container run -n ${NAME} -- "DEBCONF_FRONTEND='noninteractive' DEBCONF_PRIORITY='critical' DEBCONF_NONINTERACTIVE_SEEN='true' DEBCONF_NOWARNINGS='true' apt \-o Dpkg::Options::=\-\-force-confold -f ${YES} upgrade"
+ ;;
+ esac
+
+ Notification "update(s)" "${UPDATE_NUMBER}" "${UPDATE_PACKAGES}"
+ ;;
+ esac
+
+ case "${AUTOREMOVE}" in
+ true)
+ REMOVE_NUMBER="$(container run -n ${NAME} -- "apt \-\-simulate autoremove" | awk '/^[0-9]* upgraded, / { print $6 }')"
+
+ case "${REMOVE_NUMBER}" in
+ 0)
+ ;;
+
+ *)
+ REMOVE_PACKAGES="$(for LINE in $(container run -n ${NAME} -- "apt \-\-simulate autoremove" | grep '^ '); do echo ${LINE}; done | sed -e 's|^ ||' -e 's| $||'; echo)"
+
+ container run -n ${NAME} -- "apt ${YES} autoremove ${PURGE}"
+
+ Notification "removal(s)" "${REMOVE_NUMBER}" "$(echo ${REMOVE_PACKAGES})"
+ ;;
+ esac
+ ;;
+ esac
+
+ echo "'${NAME}': container updated."
+done
+
+# Post hooks
+for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
diff --git a/lib/container/version b/libexec/container/version
index 8efc91c..e580688 100755
--- a/lib/container/version
+++ b/libexec/container/version
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -15,16 +15,17 @@
# 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"
COMMAND="$(basename ${0})"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
-SHARE="/usr/share/${PROJECT}/${PROGRAM}"
+HOOKS="/etc/${SOFTWARE}/hooks"
+SHARE="/usr/share/${SOFTWARE}"
# Pre hooks
for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"
@@ -35,6 +36,7 @@ do
fi
done
+# Run
cat "${SHARE}/VERSION.txt"
# Post hooks
diff --git a/share/bash-completion/container b/share/bash-completion/container
index 95199b1..5b57193 100644
--- a/share/bash-completion/container
+++ b/share/bash-completion/container
@@ -1,7 +1,6 @@
-# bash-completion
-#
-# Copyright (C) 2016 Andreas Kreuzer <andreas.kreuzer@open-infrastructure.net>
-# Copyright (C) 2016-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Open Infrastructure: compute-tools
+
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -16,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/>.
_container()
{
@@ -44,6 +43,28 @@ _container()
return 0
;;
+ build|b)
+ 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')"
+ 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 -c --capability -d --drop-capability -s --script -v --verbose -b --bind --bind-ro"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+ esac
+ ;;
+
console)
case "${prev}" in
-n|--name)
@@ -60,16 +81,32 @@ _container()
esac
;;
- create|cr)
+ enter|run)
case "${prev}" in
-n|--name)
- opts="$(cd /etc/open-infrastructure/container/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
+ ;;
+
+ *)
+ opts="-n --name"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+ esac
+ ;;
+
+ get|g)
+ 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')"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
-s|--script)
- opts="$(cd /usr/share/open-infrastructure/container/scripts && find -maxdepth 1 -not -type d -and -not -name 'default' -and -not -name 'debconf' -and -not -name '*.d' -printf '%P\n' | sort)"
+ 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
;;
@@ -82,16 +119,16 @@ _container()
esac
;;
- enter)
+ info)
case "${prev}" in
-n|--name)
- opts="$(container list -s -f shell)"
+ opts="$(container list -t -f shell)"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
*)
- opts="-n --name"
+ opts="--status --os --ip"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
@@ -99,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)
@@ -145,13 +198,13 @@ _container()
log)
case "${prev}" in
-d|--date)
- opts="$(if ls /var/log/open-infrastructure/container.log-*.gz > /dev/null 2>&1;
+ opts="$(if ls /var/log/compute-tools/container.log-*.gz > /dev/null 2>&1;
then \
- zcat /var/log/open-infrastructure/container.log-*.gz | awk '{ print $1 }' | sort -u; \
+ zcat /var/log/compute-tools/container.log-*.gz | awk '{ print $1 }' | sort -u; \
fi; \
- if [ -e /var/log/open-infrastructure/container.log ]; \
+ if [ -e /var/log/compute-tools/container.log ]; \
then \
- awk '{ print $1 }' /var/log/open-infrastructure/container.log | sort -u; \
+ awk '{ print $1 }' /var/log/compute-tools/container.log | sort -u; \
fi) \
today yesterday"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
@@ -159,13 +212,13 @@ _container()
;;
-n|--name)
- opts="$(if ls /var/log/open-infrastructure/container.log-*.gz > /dev/null 2>&1;
+ opts="$(if ls /var/log/compute-tools/container.log-*.gz > /dev/null 2>&1;
then \
- zgrep -E '(\-n|\-\-name) ' /var/log/open-infrastructure/container.log-*.gz | sed -e 's|.*-n ||' -e 's|.*--name ||' -e 's| .*$||' | sort -u; \
+ zgrep -E '(\-n|\-\-name) ' /var/log/compute-tools/container.log-*.gz | sed -e 's|.*-n ||' -e 's|.*--name ||' -e 's| .*$||' | sort -u; \
fi; \
- if [ -e /var/log/open-infrastructure/container.log ]; \
+ if [ -e /var/log/compute-tools/container.log ]; \
then \
- grep -E '(\-n|\-\-name) ' /var/log/open-infrastructure/container.log | sed -e 's|.*-n ||' -e 's|.*--name ||' -e 's| .*$||' | sort -u; \
+ grep -E '(\-n|\-\-name) ' /var/log/compute-tools/container.log | sed -e 's|.*-n ||' -e 's|.*--name ||' -e 's| .*$||' | sort -u; \
fi)"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
@@ -204,14 +257,30 @@ _container()
;;
*)
- opts="-n --name -f --force"
+ opts="-n --name -f --force -i --interactive -k --kill"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+ esac
+ ;;
+
+ rebuild|rb)
+ case "${prev}" in
+ -n|--name)
+ opts="$(container list -f shell)"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+
+ *)
+ opts="-n --name -f --force -v --verbose"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
esac
;;
- restart|rt)
+ restart|rs)
case "${prev}" in
-n|--name)
opts="$(container list -s -f shell)"
@@ -246,7 +315,7 @@ _container()
status|st)
case "${prev}" in
-n|--name)
- opts="$(container list -t -f shell)"
+ opts="$(container list -f shell)"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
@@ -281,12 +350,28 @@ _container()
return 0
;;
+ update|u)
+ case "${prev}" in
+ -n|--name)
+ opts="$(container list -s -f shell)"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+
+ *)
+ opts="-n --name -f --full-upgrade -r --autoremove -p --purge --y --yes"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+ esac
+ ;;
+
version|ver)
return 0
;;
*)
- local commands=$(cd /usr/lib/open-infrastructure/container 2>/dev/null && find * -type f -print)
+ local commands=$(cd /usr/libexec/container 2>/dev/null && find * -type f -print)
COMPREPLY=( $(compgen -W "${commands}" -- ${cur}) )
return 0
;;
diff --git a/share/scripts/debconf b/share/build-scripts/debconf
index 197791a..900242d 100755
--- a/share/scripts/debconf
+++ b/share/build-scripts/debconf
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -15,18 +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"
+VERSION="$(container version)"
+
SCRIPT="${0}"
export SCRIPT
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+CACHE="/var/cache/${PROGRAM}/build-$(basename ${SCRIPT})"
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
Parameters ()
@@ -97,7 +100,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
}
@@ -114,12 +117,6 @@ then
exit 1
fi
-if [ ! -x /usr/sbin/debootstrap ]
-then
- echo "'${NAME}': /usr/sbin/debootstrap - no such file." >&2
- exit 1
-fi
-
if [ "$(id -u)" -ne 0 ]
then
echo "'${NAME}': need root privileges" >&2
@@ -167,6 +164,7 @@ Mount ()
then
CNT_OVERLAYS="$(echo ${CNT_OVERLAY} | sed -e 's|;| |g')"
+ COUNT="0"
for CNT_OVERLAY in ${CNT_OVERLAYS}
do
DIRECTORY_LOWER="$(echo ${CNT_OVERLAY} | awk -F: '{ print $1 }')"
@@ -174,12 +172,23 @@ Mount ()
DIRECTORY_WORK="$(echo ${CNT_OVERLAY} | awk -F: '{ print $3 }')"
DIRECTORY_MERGED="$(echo ${CNT_OVERLAY} | awk -F: '{ print $4 }')"
+ COUNT="$((${COUNT} + 1))"
+ CNT_OVERLAY_OPTION="$(echo ${CNT_OVERLAY_OPTIONS} | awk -F ';' "{ print \$${COUNT} }")"
+
for DIRECTORY in "${DIRECTORY_LOWER}" "${DIRECTORY_UPPER}" "${DIRECTORY_WORK}" "${DIRECTORY_MERGED}"
do
mkdir -p "${DIRECTORY}"
done
- mount -t overlay overlay-${NAME} -olowerdir="${DIRECTORY_LOWER}",upperdir="${DIRECTORY_UPPER}",workdir="${DIRECTORY_WORK}" "${DIRECTORY_MERGED}"
+ if ! findmnt -n -o SOURCE "${DIRECTORY_MERGED}" | grep -qs '^overlay-'
+ then
+ if [ -n "${CNT_OVERLAY_OPTION}" ]
+ then
+ CNT_OVERLAY_OPTION="-o ${CNT_OVERLAY_OPTION}"
+ fi
+
+ mount -t overlay overlay-${NAME} ${CNT_OVERLAY_OPTION} -olowerdir="${DIRECTORY_LOWER}",upperdir="${DIRECTORY_UPPER}",workdir="${DIRECTORY_WORK}" "${DIRECTORY_MERGED}"
+ fi
done
fi
}
@@ -205,6 +214,12 @@ Umount ()
rmdir --ignore-fail-on-non-empty --parents ${DIRECTORY} > /dev/null 2>&1 || true
done
done
+
+ # empty workdir otherwise there might happen stale file handles
+ if [ -d "${DIRECTORY_WORK}" ]
+ then
+ rm --preserve-root --one-file-system -rf "${DIRECTORY_WORK}"/*
+ fi
fi
# Unmounting ro bind mounts
@@ -348,7 +363,7 @@ EOF
export DEBCONF_SYSTEMRC
}
-Debootstrap ()
+Bootstrap ()
{
DIRECTORY="${1}"
@@ -371,8 +386,101 @@ Debootstrap ()
esac
mkdir -p "$(dirname ${DIRECTORY})"
- debootstrap --verbose --arch=${ARCHITECTURE} --components=${PARENT_ARCHIVE_AREAS} \
- --exclude=${EXCLUDE} --include=${INCLUDE} ${PARENT_DISTRIBUTION} "${DIRECTORY}" ${PARENT_MIRROR}
+
+ case "${BOOTSTRAP}" in
+ debootstrap)
+ debootstrap --verbose --arch=${ARCHITECTURE} --components=${PARENT_ARCHIVE_AREAS} \
+ --exclude=${EXCLUDE} --include=${INCLUDE} ${PARENT_DISTRIBUTION} "${DIRECTORY}" ${PARENT_MIRROR}
+ ;;
+
+ mmdebstrap)
+ mmdebstrap --arch=${ARCHITECTURE} --components=${PARENT_ARCHIVE_AREAS} \
+ --format=directory --mode=root --aptopt='APT::Sandbox::User "root"' \
+ --include=${INCLUDE} ${PARENT_DISTRIBUTION} "${DIRECTORY}" ${PARENT_MIRROR}
+ ;;
+
+ *)
+ echo "'${NAME}': ${BOOTSTRAP} - not supported" >&2
+ exit 1
+ ;;
+ esac
+}
+
+Image ()
+{
+ DIRECTORY="${1}"
+
+ FILES="${IMAGE}"
+
+ for NUMBER in $(seq 1 ${IMAGE_NUMBER})
+ do
+ eval FILES="${FILES} $`echo IMAGE${NUMBER}`"
+ done
+
+ for FILE in ${FILES}
+ do
+ case "${FILE}" in
+ *.gz)
+ TAR_OPTIONS="--gzip"
+
+ if [ ! -e /bin/gzip ]
+ then
+ echo -en "\n"
+ echo "'${NAME}': /bin/lzip - no such file." >&2
+ exit 1
+ fi
+ ;;
+
+ *.lz)
+ TAR_OPTIONS="--lzip"
+
+ if [ ! -e /usr/bin/lzip ]
+ then
+ echo -en "\n"
+ echo "'${NAME}': /usr/bin/lzip - no such file." >&2
+ exit 1
+ fi
+ ;;
+
+ *.xz)
+ TAR_OPTIONS="--xz"
+
+ if [ ! -e /usr/bin/xz ]
+ then
+ echo -en "\n"
+ echo "'${NAME}': /usr/bin/xz - no such file." >&2
+ exit 1
+ fi
+ ;;
+
+ *)
+ TAR_OPTIONS=""
+ ;;
+ esac
+
+ mkdir -p "${DIRECTORY}"
+
+ echo "Using ${FILE}"
+
+ if [ -e /usr/bin/pv ]
+ then
+ curl --fail --location --progress-bar --user-agent ${SOFTWARE}/${VERSION} --http2 ${CURL_TIME_COND} \
+ "${FILE}" -o - | \
+ pv --format '%p' --width 77 | \
+ tar -C "${DIRECTORY}" --strip 1 ${TAR_OPTIONS} -xf -
+ #pv --format '%p' --width 77 "${CACHE}/${FILE}" | tar xf - ${TAR_OPTIONS} -C "${DIRECTORY}" --strip 1
+ else
+ curl --fail --location --progress-bar --user-agent ${SOFTWARE}/${VERSION} --http2 ${CURL_TIME_COND} \
+ "${FILE}" -o - | \
+ tar -C "${DIRECTORY}" --strip 1 ${TAR_OPTIONS} -xf -
+ fi
+
+ echo " ok."
+ done
+
+ # Writing resolv.conf
+ rm -f "${DIRECTORY}/etc/resolv.conf"
+ cp /etc/resolv.conf "${DIRECTORY}/etc"
}
Configure_apt ()
@@ -404,7 +512,11 @@ EOF
rm -f "${DIRECTORY}/progress-linux.cfg"
- Chroot "${DIRECTORY}" "apt update"
+ case "${INSTALLER}" in
+ bootstrap)
+ Chroot "${DIRECTORY}" "apt update"
+ ;;
+ esac
;;
esac
}
@@ -430,36 +542,8 @@ 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 machine-id
+ rm -f "${DIRECTORY}/etc/machine-id"
# Removing resolv.conf
rm -f "${DIRECTORY}/etc/resolv.conf"
@@ -499,10 +583,14 @@ EOF
for PARENT_REPO in ${PARENT_ARCHIVES}
do
case "${PARENT_REPO}" in
- ${PARENT_DIST}-security)
+ buster-security)
echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DIST}/updates ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list"
;;
+ ${PARENT_DIST}-security)
+ echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DIST}-security ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list"
+ ;;
+
${PARENT_DIST}-updates)
echo "deb ${PARENT_MIRROR} ${PARENT_DIST}-updates ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list"
;;
@@ -590,10 +678,14 @@ EOF
IPV4_ADDRESS1_PART4="$(echo ${IPV4_ADDRESS1} | cut -d. -f4)"
IPV6_ADDRESS1="$(${DIG} AAAA +short ${NAME} | tail -n1)"
- # TODO: address parts
+ # FIXME: address parts
+
+ export IPV4_ADDRESS1 IPV4_ADDRESS1_PART1 IPV4_ADDRESS1_PART2 IPV4_ADDRESS1_PART3 IPV4_ADDRESS1_PART4
+ export IPV6_ADDRESS1
fi
- sed -e "s|@NAME@|${NAME}|g" \
+ sed -e "s|@FILE@|${FILE}|g" \
+ -e "s|@NAME@|${NAME}|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" \
@@ -615,7 +707,7 @@ EOF
do
if grep -qs locales "${FILE}"
then
- if [ -e "${DIRECTORY}/var/lib/dpkg/info/locales.list" ]
+ if Chroot "${DIRECTORY}" dpkg --get-selections | awk '{ print $1 }' | grep -qs '^locales$'
then
rm -f "${DIRECTORY}/etc/default/locale" "${DIRECTORY}/etc/locale.gen"
Chroot "${DIRECTORY}" "DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=criticial dpkg-reconfigure locales"
@@ -652,23 +744,13 @@ 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}"
fi
# Manual hack to regenerate ssh keys
- if [ -e "${DIRECTORY}/var/lib/dpkg/info/openssh-server.postinst" ] && \
+ if Chroot "${DIRECTORY}" dpkg --get-selections | awk '{ print $1 }' | grep -qs '^openssh-server$' && \
! ls "${DIRECTORY}"/etc/ssh/ssh_host_*_key > /dev/null 2>&1
then
Chroot "${DIRECTORY}" "DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=criticial dpkg-reconfigure openssh-server"
@@ -873,6 +955,14 @@ EOF
fi
;;
+
+ stub)
+
+cat >> "${DIRECTORY}/etc/systemd/network/eno${NUMBER}.network" << EOF
+DHCP=no
+EOF
+
+ ;;
esac
if [ -n "${IPV4_POST_UP}" ]
@@ -955,6 +1045,15 @@ EOF
fi
;;
+
+ stub)
+
+cat >> "${DIRECTORY}/etc/systemd/network/eno${NUMBER}.network" << EOF
+DHCP=no
+IPv6AcceptRA=no
+EOF
+
+ ;;
esac
if [ -n "${IPV6_POST_UP}" ]
@@ -1014,6 +1113,7 @@ Commands ()
-e "s|^cnt.container-server=.*|cnt.container-server=${CNT_CONTAINER_SERVER}|g" \
-e "s|^cnt.network-bridge=.*|cnt.network-bridge=${HOST_INTERFACE_NAME}:${NETWORK1_BRIDGE:-bridge0}|g" \
-e "s|^cnt.overlay=.*|cnt.overlay=${CNT_OVERLAY}|g" \
+ -e "s|^cnt.overlay-options=.*|cnt.overlay-options=${CNT_OVERLAY_OPTIONS}|g" \
-e "s|^bind=.*|bind=${BIND}|g" \
-e "s|^bind-ro=.*|bind-ro=${BIND_RO}|g" \
-e "s|^network-veth-extra=.*|network-veth-extra=${HOST_INTERFACE_NAME}:eno1|g" \
@@ -1098,7 +1198,7 @@ do
done
# Run debconf parts
-for DEBCONF_SCRIPT in "/usr/share/${PROJECT}/${PROGRAM}/scripts/debconf.d"/*
+for DEBCONF_SCRIPT in "/usr/share/${SOFTWARE}/build-scripts/debconf.d"/*
do
if [ -x "${DEBCONF_SCRIPT}" ]
then
@@ -1109,25 +1209,91 @@ done
# Read-in configuration from debconf
. "${DEBCONF_TMPDIR}/debconf.default"
-CACHE="/var/cache/${PROJECT}/${PROGRAM}/${MODE}"
SYSTEM="${MACHINES}/${NAME}"
-## Generic parts
-if [ ! -e "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" ]
+if [ -z "${IMAGE}" ] && [ -z "${IMAGE1}" ]
then
- Debootstrap "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}.tmp"
- Configure_apt "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}.tmp"
- Deconfigure_system "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}.tmp"
-
- mv "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}.tmp" "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}"
+ INSTALLER="bootstrap"
+else
+ INSTALLER="image"
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}"
-Cleanup_system "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}"
+case "${INSTALLER}" in
+ bootstrap)
+ ## Dependencies
+ if [ -x /usr/bin/mmdebstrap ]
+ then
+ BOOTSTRAP="mmdebstrap"
+ elif [ -x /usr/sbin/debootstrap ]
+ then
+ BOOTSTRAP="debootstrap"
+ else
+ echo "'${NAME}': /usr/bin/mmdebstrap or /usr/sbin/debootstrap - no such file." >&2
+ exit 1
+ fi
+
+ ## Generic parts
+ if [ ! -e "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" ]
+ then
+ Bootstrap "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}.tmp"
+ Configure_apt "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}.tmp"
+ Deconfigure_system "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}.tmp"
+
+ 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/${PROGRAM}"
+ Cleanup_system "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}"
+
+ ## Specific parts
+ mkdir -p "${MACHINES}"
+ cp -a "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" "${MACHINES}/${NAME}"
+ ;;
+
+ image)
+ ## Dependencies
+ if [ -x /usr/bin/curl ]
+ then
+ GET="curl"
+ elif [ -x /usr/bin/wget ]
+ then
+ GET="wget"
+ else
+ echo "'${NAME}': /usr/bin/curl or /usr/bin/wget - no such file." >&2
+ exit 1
+ fi
+
+ COMPRESSIONS=""
+
+ if [ -x /usr/bin/lzip ]
+ then
+ COMPRESSIONS="${COMPRESSIONS} lz"
+ fi
+
+ if [ -x /usr/bin/xz ]
+ then
+ COMPRESSIONS="${COMPRESSIONS} xz"
+ fi
+
+ if [ -x /bin/gzip ]
+ then
+ COMPRESSIONS="${COMPRESSIONS} gz"
+ fi
+
+ if [ -z "${COMPRESSIONS}" ]
+ then
+ echo "'${NAME}': no supported compressor available (lz, xz, gz)."
+ exit 1
+ fi
+
+ ## Parts
+ mkdir -p "${MACHINES}"
+ Image "${MACHINES}/${NAME}"
-## Specific parts
-mkdir -p "${MACHINES}"
-cp -a "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" "${MACHINES}/${NAME}"
+ Configure_apt "${MACHINES}/${NAME}"
+ Deconfigure_system "${MACHINES}/${NAME}"
+ ;;
+esac
Mount
diff --git a/share/scripts/debconf.d/0001-preseed-file b/share/build-scripts/debconf.d/0001-preseed-file
index 2c83675..aa2c3c7 100755
--- a/share/scripts/debconf.d/0001-preseed-file
+++ b/share/build-scripts/debconf.d/0001-preseed-file
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -15,56 +15,75 @@
# 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}/config"
+DEBCONF="/etc/${SOFTWARE}/debconf"
DEBCONF_NOWARNINGS="true"
export DEBCONF_NOWARNINGS
. /usr/share/debconf/confmodule
+# debconf template hierarchy (first match wins):
+#
+# 1. user specified a preseed file through commandline options
+# 2. /etc/compute-tools/debconf/${NAME}.cfg exists
+# 3. /etc/compute-tools/debconf/links/${NAME}.cfg exists
+# 4. /etc/compute-tools/debconf/*/${NAME}.cfg exists (only one file!)
+# 5. /etc/compute-tools/debconf/default.cfg exists
+# 6. user chooses from list of available (if any) *.cfg files
+# (recursively) found in /etc/compute-tools/debconf,
+# /etc/compute-tools/debconf/links is excluded.
+
if [ -n "${PRESEED_FILE}" ]
then
# user specified one or more preseed files through commandline option
db_set container/preseed-file "${PRESEED_FILE}"
db_fset container/preseed-file seen true
-elif [ -e "${CONFIG}/${NAME}.cfg" ]
+elif [ -e "${DEBCONF}/${NAME}.cfg" ]
then
# user did not specify a pressed file, but there is a matching one
# available on the system matching the container name
- db_set container/preseed-file "${CONFIG}/${NAME}.cfg"
+ db_set container/preseed-file "${DEBCONF}/${NAME}.cfg"
db_fset container/preseed-file seen true
-elif [ "$(ls ${CONFIG}/*/${NAME}.cfg 2>/dev/null | wc -l)" -eq 1 ]
+elif [ -e "${DEBCONF}/links/${NAME}.cfg" ]
+then
+ # user did not specify a pressed file, but there is a matching one
+ # in /etc/${SOFTWARE}/debconf/links directory
+ db_set container/preseed-file "${DEBCONF}/links/${NAME}.cfg"
+ db_fset container/preseed-file seen true
+elif [ "$(ls ${DEBCONF}/*/${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)"
+ FILE="$(ls ${DEBCONF}/*/${NAME}.cfg)"
db_set container/preseed-file "${FILE}"
db_fset container/preseed-file seen true
-elif [ -e "${CONFIG}/default.cfg" ]
+elif [ -e "${DEBCONF}/default.cfg" ]
then
# user did not specify a pressed file, but there is a default one
- db_set container/preseed-file "${CONFIG}/default.cfg"
+ db_set container/preseed-file "${DEBCONF}/default.cfg"
db_fset container/preseed-file seen true
-elif ls "${CONFIG}"/*.cfg > /dev/null 2>&1 || ls "${CONFIG}"/*/*.cfg > /dev/null 2>&1
+elif ls "${DEBCONF}"/*.cfg > /dev/null 2>&1 || ls "${DEBCONF}"/*/*.cfg > /dev/null 2>&1
then
# user has not specified preseed files through commandline option,
# showing debconf selection dialog for global preseed file.
- FILES="$(cd ${CONFIG} && find . -type f -name '*.cfg' -printf '%P\n' | LC_ALL=C sort)"
+ FILES="$(cd ${DEBCONF} && find . -type f -name '*.cfg' -printf '%P\n' | grep -v '^links\/' | LC_ALL=C sort -V)"
PRESEED_FILES="$(for FILE in ${FILES}; do echo -n "$(echo ${FILE} | sed -e 's|.cfg$||'), "; done | sed -e 's|, $||')"
if [ -n "${PRESEED_FILES}" ]
then
- db_subst container/preseed-files CHOICES "none, custom, , ${PRESEED_FILES}"
+ db_subst container/preseed-files CHOICES "custom, exit, none, , ${PRESEED_FILES}"
db_settitle container/title
db_input high container/preseed-files || true
@@ -74,12 +93,17 @@ then
PRESEED_FILE="${RET}" # select
case "${PRESEED_FILE}" in
- none|custom)
+ custom|none)
+ ;;
+
+ exit)
+ rm -f "${CONFIG}/${NAME}.conf"
+ exit 1
;;
*)
# user specified preseed file through debconf select
- db_set container/preseed-file "${CONFIG}/${PRESEED_FILE}.cfg"
+ db_set container/preseed-file "${DEBCONF}/${PRESEED_FILE}.cfg"
db_fset container/preseed-file seen true
;;
esac
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 a9c7e77..fcb9006 100755
--- a/share/scripts/debconf.d/0002-preseed-debconf
+++ b/share/build-scripts/debconf.d/0002-preseed-debconf
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -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/build-scripts/debconf.d/0003-debconf
index c5925f2..e12e25e 100755
--- a/share/scripts/debconf.d/0003-debconf
+++ b/share/build-scripts/debconf.d/0003-debconf
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -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
@@ -44,6 +44,39 @@ Mode ()
export MODE
}
+Images ()
+{
+ if db_get container/image && [ "${RET}" ]
+ then
+ db_get container/image
+ IMAGE="${RET}" # string (w/o empty)
+
+ echo "IMAGE=\"${IMAGE}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ fi
+
+ NUMBER="1"
+
+ while db_get container/image${NUMBER} && [ "${RET}" ]
+ do
+ if db_get container/image${NUMBER}
+ then
+ eval IMAGE${NUMBER}="\"${RET}\"" # string (w/o empty)
+ fi
+
+ NUMBER="$((${NUMBER} + 1))"
+ done
+
+ IMAGE_NUMBER="$((${NUMBER} - 1))"
+
+ echo "IMAGE_NUMBER=\"${IMAGE_NUMBER}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+
+ for NUMBER in $(seq 1 ${IMAGE_NUMBER})
+ do
+ eval IMAGE="$`echo IMAGE${NUMBER}`"
+ echo "IMAGE${NUMBER}=\"${IMAGE}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ done
+}
+
Distribution ()
{
db_get container/distribution
@@ -53,18 +86,18 @@ Distribution ()
then
case "${MODE}" in
debian)
- db_subst container/distribution CHOICES "Debian GNU/Linux 9 \"stretch\", Debian GNU/Linux 10 \"buster\", Debian GNU/Linux testing/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 12 \"bookworm\", Debian GNU/Linux testing, Debian GNU/Linux unstable/sid"
+ db_subst container/distribution CHOICES_C "buster, bullseye, bookworm, testing, sid"
- db_set container/distribution buster
+ db_set container/distribution bookworm
db_fset container/distribution seen false
;;
progress-linux)
- db_subst container/distribution CHOICES "Progress Linux 5 (engywuck), Progress Linux 5+ (engywuck-backports)"
- db_subst container/distribution CHOICES_C "engywuck, engywuck-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), Progress Linux 7 (graograman), Progress Linux 7.99 (graograman-backports)"
+ db_subst container/distribution CHOICES_C "engywuck, engywuck-backports, fuchur, fuchur-backports, graograman, graograman-backports"
- db_set container/distribution engywuck-backports
+ db_set container/distribution graograman-backports
db_fset container/distribution seen false
;;
esac
@@ -94,6 +127,14 @@ Parent_distribution ()
engywuck*)
PARENT_DISTRIBUTION="buster"
;;
+
+ fuchur*)
+ PARENT_DISTRIBUTION="bullseye"
+ ;;
+
+ graograman*)
+ PARENT_DISTRIBUTION="bookworm"
+ ;;
esac
;;
@@ -118,7 +159,7 @@ Architecture ()
arm64)
DEFAULT="arm64"
- CHOICES="Automatic, RaspberryPi 3 (arm64)"
+ CHOICES="Automatic, RaspberryPi 3 and newer (arm64)"
CHOICES_C="auto, arm64"
;;
@@ -304,7 +345,7 @@ Mirror ()
;;
progress-linux)
- db_set container/mirror https://cdn.deb.progress-linux.org/packages
+ db_set container/mirror https://deb.progress-linux.org/packages
db_fset container/mirror seen false
;;
esac
@@ -324,7 +365,7 @@ Mirror ()
;;
progress-linux)
- MIRROR="https://cdn.deb.progress-linux.org/packages"
+ MIRROR="https://deb.progress-linux.org/packages"
;;
esac
fi
@@ -348,7 +389,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
;;
@@ -369,7 +410,7 @@ Mirror_security ()
then
case "${MODE}" in
debian)
- MIRROR_SECURITY="http://security.debian.org"
+ MIRROR_SECURITY="https://security.debian.org"
;;
*)
@@ -441,7 +482,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
@@ -462,7 +503,7 @@ Parent_mirror_security ()
then
case "${MODE}" in
progress-linux)
- PARENT_MIRROR_SECURITY="http://security.debian.org"
+ PARENT_MIRROR_SECURITY="https://security.debian.org"
;;
*)
@@ -481,18 +522,28 @@ Archive_areas ()
db_get container/archive-areas
ARCHIVE_AREAS="${RET}"
+ case "${PARENT_DISTRIBUTION}" in
+ bookworm|testing|sid)
+ ARCHIVE_AREAS_ALL="main, contrib, non-free, non-free-firmware"
+ ;;
+
+ *)
+ ARCHIVE_AREAS_ALL="main, contrib, non-free"
+ ;;
+ esac
+
if [ -z "${ARCHIVE_AREAS}" ]
then
case "${MODE}" in
progress-linux)
- db_subst container/archive-areas CHOICES "main, contrib, non-free"
+ db_subst container/archive-areas CHOICES "${ARCHIVE_AREAS_ALL}"
- db_set container/archive-areas "main, contrib, non-free"
+ db_set container/archive-areas "${ARCHIVE_AREAS_ALL}"
db_fset container/archive-areas seen false
;;
*)
- db_subst container/archive-areas CHOICES "main, contrib, non-free"
+ db_subst container/archive-areas CHOICES "${ARCHIVE_AREAS_ALL}"
db_set container/archive-areas "main"
db_fset container/archive-areas seen false
@@ -514,7 +565,7 @@ Archive_areas ()
;;
progress-linux)
- ARCHIVE_AREAS="main, contrib, non-free"
+ ARCHIVE_AREAS="${ARCHIVE_AREAS_ALL}"
;;
esac
fi
@@ -531,13 +582,23 @@ Parent_archive_areas ()
db_get container/parent-archive-areas
PARENT_ARCHIVE_AREAS="${RET}" # multiselect (w/o empty)
+ case "${PARENT_DISTRIBUTION}" in
+ bookworm|testing|sid)
+ PARENT_ARCHIVE_AREAS_ALL="main, contrib, non-free, non-free-firmware"
+ ;;
+
+ *)
+ PARENT_ARCHIVE_AREAS_ALL="main, contrib, non-free"
+ ;;
+ esac
+
if [ -z "${PARENT_ARCHIVE_AREAS}" ]
then
case "${MODE}" in
progress-linux)
- db_subst container/parent-archive-areas CHOICES "main, contrib, non-free"
+ db_subst container/parent-archive-areas CHOICES "${PARENT_ARCHIVE_AREAS_ALL}"
- db_set container/parent-archive-areas "main, contrib, non-free"
+ db_set container/parent-archive-areas "${PARENT_ARCHIVE_AREAS_ALL}"
db_fset container/parent-archive-areas seen false
db_settitle container/title
@@ -560,7 +621,7 @@ Parent_archive_areas ()
then
case "${MODE}" in
progress-linux)
- PARENT_ARCHIVE_AREAS="main, contrib, non-free"
+ PARENT_ARCHIVE_AREAS="${PARENT_ARCHIVE_AREAS_ALL}"
;;
*)
@@ -864,6 +925,20 @@ Network ()
db_input high container/network1/ipv4-post-down || true
db_go
;;
+
+ stub)
+ db_settitle container/title
+ db_input high container/network1/ipv4-comment || true
+ db_go
+
+ db_settitle container/title
+ db_input high container/network1/ipv4-post-up || true
+ db_go
+
+ db_settitle container/title
+ db_input high container/network1/ipv4-post-down || true
+ db_go
+ ;;
esac
db_settitle container/title
@@ -902,6 +977,20 @@ Network ()
db_input high container/network1/ipv6-post-down || true
db_go
;;
+
+ stub)
+ db_settitle container/title
+ db_input high container/network1/ipv6-comment || true
+ db_go
+
+ db_settitle container/title
+ db_input high container/network1/ipv6-post-up || true
+ db_go
+
+ db_settitle container/title
+ db_input high container/network1/ipv6-post-down || true
+ db_go
+ ;;
esac
if [ "${NETWORK1_IPV4_METHOD}" = "static" ] || [ "${NETWORK1_IPV6_METHOD}" = "static" ]
@@ -1201,10 +1290,10 @@ Internal_options ()
if db_get container/auto
then
- CNT_AUTO="${RET:-true}" # string (w/o empty)
+ CNT_AUTO="${RET:-last-on}" # string (w/o empty)
fi
- CNT_AUTO="${CNT_AUTO:-true}"
+ CNT_AUTO="${CNT_AUTO:-last-on}"
echo "CNT_AUTO=\"${CNT_AUTO}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
if db_get container/container-server
@@ -1242,9 +1331,17 @@ Internal_options ()
fi
echo "CNT_OVERLAY=\"${CNT_OVERLAY}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+
+ if db_get container/overlay-options
+ then
+ CNT_OVERLAY_OPTIONS="${RET}" # string (w/ empty)
+ fi
+
+ echo "CNT_OVERLAY_OPTIONS=\"${CNT_OVERLAY_OPTIONS}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
}
Mode
+Images
Distribution
Parent_distribution
diff --git a/share/scripts/debconf.d/0003-debconf.templates b/share/build-scripts/debconf.d/0003-debconf.templates
index 73952a8..551033a 100644
--- a/share/scripts/debconf.d/0003-debconf.templates
+++ b/share/build-scripts/debconf.d/0003-debconf.templates
@@ -10,6 +10,12 @@ Choices: ${CHOICES}
Description: Mode
Mode.
+Template: container/image
+Type: string
+Default:
+Description: Image
+ Image.
+
Template: container/distribution
Type: select
Default:
@@ -112,7 +118,7 @@ Description: Veth name
Template: container/network1/ipv4-method
Type: select
-Choices: dhcp, static, none
+Choices: dhcp, static, stub, none
Default:
Description: Ethernet Interface Method (IPv4)?
What method should be used to configure the ethernet interface?
@@ -173,7 +179,7 @@ Description: Ethernet post-down Command (IPv4)?
Template: container/network1/ipv6-method
Type: select
-Choices: static, none
+Choices: dhcp, static, stub, none
Default:
Description: Ethernet Interface Method (IPv6)?
What method should be used to configure the ethernet interface?
diff --git a/share/scripts/debootstrap b/share/build-scripts/debootstrap
index f69d006..5ab5db2 100755
--- a/share/scripts/debootstrap
+++ b/share/build-scripts/debootstrap
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -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
@@ -25,7 +25,7 @@ PROGRAM="container"
SCRIPT="$(basename ${0})"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
Parameters ()
@@ -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
}
@@ -136,7 +136,7 @@ case "${SCRIPT}" in
mmdebstrap)
BOOTSTRAP="/usr/bin/mmdebstrap"
- BOOTSTRAP_OPTIONS="--mode=root"
+ BOOTSTRAP_OPTIONS="--format=directory --mode=root --aptopt='APT::Sandbox::User \"root\"'"
;;
esac
@@ -153,7 +153,7 @@ then
fi
ARCHITECTURE="${ARCHITECTURE:-$(dpkg --print-architecture)}"
-DISTRIBUTION="${DISTRIBUTION:-buster}"
+DISTRIBUTION="${DISTRIBUTION:-bookworm}"
MIRROR="${MIRROR:-https://deb.debian.org/debian}"
PASSWORD="${PASSWORD:-$(dd if=/dev/urandom bs=12 count=1 2> /dev/null | base64)}"
@@ -174,9 +174,11 @@ do
fi
done
+# Run
mkdir -p "${MACHINES}"
-
${BOOTSTRAP} ${BOOTSTRAP_OPTIONS} --arch=${ARCHITECTURE} --include=${INCLUDE} ${DISTRIBUTION} ${MACHINES}/${NAME} ${MIRROR}
+
+# Cleaning apt cache
chroot "${MACHINES}/${NAME}" apt clean
# Setting hostname
diff --git a/share/config/container.conf.in b/share/config/container.conf.in
index ebf91b9..d3f9a48 100644
--- a/share/config/container.conf.in
+++ b/share/config/container.conf.in
@@ -1,10 +1,12 @@
-# compute-tools: @NAME@
+# Open Infrastructure: compute-tools
[start]
cnt.auto=@CNT_AUTO@
cnt.container-server=@CNT_CONTAINER_SERVER@
cnt.network-bridge=@CNT_NETWORK_BRIDGE@
cnt.overlay=@CNT_OVERLAY@
+cnt.overlay-options=@CNT_OVERLAY_OPTIONS@
+cnt.start=@CNT_START@
bind=@BIND@
bind-ro=@BIND_RO@
boot=@BOOT@
diff --git a/share/doc/examples/buster.cfg b/share/doc/examples/bookworm.cfg
index cfc8595..1f878f4 100644
--- a/share/doc/examples/buster.cfg
+++ b/share/doc/examples/bookworm.cfg
@@ -1,5 +1,5 @@
-# example for automated Debian 10 (buster) based container creation
-# using: sudo container create -s debian
+# example for automated Debian 12 (bookworm) based container building
+# using: sudo container build -s debian
debconf debconf/priority select critical
debconf debconf/frontend select Noninteractive
@@ -9,16 +9,16 @@ compute-tools container/mode select debian
#compute-tools container/preseed-files string
#compute-tools container/include-preseed-files string
-compute-tools container/distribution select buster
+compute-tools container/distribution select bookworm
#compute-tools container/parent-distribution select
compute-tools container/architecture select auto
-compute-tools container/archives multiselect buster-security, buster-updates
+compute-tools container/archives multiselect bookworm-security, bookworm-updates
#compute-tools container/parent-archives multiselect
compute-tools container/mirror string https://deb.debian.org/debian
-compute-tools container/mirror-security string http://security.debian.org
+compute-tools container/mirror-security string https://security.debian.org
#compute-tools container/parent-mirror string
#compute-tools container/parent-mirror-security string
diff --git a/share/doc/examples/container-images.sh b/share/doc/examples/container-images.sh
new file mode 100755
index 0000000..b711048
--- /dev/null
+++ b/share/doc/examples/container-images.sh
@@ -0,0 +1,113 @@
+#!/bin/sh
+
+# Copyright (C) 2014-2022 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/>.
+
+# 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="buster bullseye bookworm sid"
+MIRROR="https://deb.debian.org/debian"
+INCLUDE="dbus"
+
+KEY="0x55CF1BF986ABB9C7"
+
+COMPRESSIONS="gz lz xz"
+
+DATE="$(date +%Y%m%d)"
+
+for DISTRIBUTION in ${DISTRIBUTIONS}
+do
+ for ARCHITECTURE in ${ARCHITECTURES}
+ do
+ TITLE="Debian ${DISTRIBUTION} ${DATE}/${ARCHITECTURE}"
+ SYSTEM="debian-${DISTRIBUTION}-${DATE}_${ARCHITECTURE}"
+
+ sudo debootstrap --arch=${ARCHITECTURE} --include=${INCLUDE} ${DISTRIBUTION} ${SYSTEM} ${MIRROR}
+ sudo chroot "${SYSTEM}" apt-get clean
+
+ VERSION="$(cat ${SYSTEM}/etc/debian_version)"
+
+ case "${VERSION}" in
+ [0-9]*)
+ TITLE="Debian ${VERSION} (${DISTRIBUTION}) ${DATE}/${ARCHITECTURE}"
+ SYSTEM="debian-${VERSION}-${DATE}_${ARCHITECTURE}"
+
+ sudo mv "debian-${DISTRIBUTION}-${DATE}_${ARCHITECTURE}" "${SYSTEM}"
+ ;;
+ esac
+
+ sudo rm -f "${SYSTEM}/etc/apt/apt.conf.d/01autoremove-kernels"
+ sudo rm -f "${SYSTEM}/etc/hostname"
+ sudo rm -f "${SYSTEM}/etc/machine-id"
+ sudo rm -f "${SYSTEM}/etc/resolv.conf"
+ sudo rm -f "${SYSTEM}/var/lib/systemd/catalog/database"
+
+ for COMPRESSION in ${COMPRESSIONS}
+ do
+ case "${COMPRESSION}" in
+ gz)
+ TAR_OPTIONS="--gzip"
+ ;;
+
+ lz)
+ TAR_OPTIONS="--lzip"
+ ;;
+
+ xz)
+ TAR_OPTIONS="--xz"
+ ;;
+ esac
+
+ echo "Building ${SYSTEM}.system.tar.${COMPRESSION}"
+ sudo tar ${TAR_OPTIONS} -cf "${SYSTEM}.system.tar.${COMPRESSION}" "${SYSTEM}"
+
+ echo "Building ${SYSTEM}.system.tar.${COMPRESSION}.sha512"
+ sha512sum "${SYSTEM}.system.tar.${COMPRESSION}" > "${SYSTEM}.system.tar.${COMPRESSION}.sha512"
+
+ if [ -n "${KEY}" ]
+ then
+ 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}.sig"
+ fi
+
+ echo "Building ${SYSTEM}.system.tar.${COMPRESSION} symlink"
+ ln -sf "${SYSTEM}.system.tar.${COMPRESSION}" "$(echo ${SYSTEM}.system.tar.${COMPRESSION} | sed -e "s|${DATE}|current|")"
+
+ 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}.sig" ]
+ then
+ 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
+
+ sudo rm -rf "${SYSTEM}"
+
+cat >> container-list.txt << EOF
+${SYSTEM}.system.tar | ${TITLE}
+EOF
+
+ done
+done
diff --git a/share/doc/examples/engywuck-backports.cfg b/share/doc/examples/graograman-backports.cfg
index 392c40d..d1d2640 100644
--- a/share/doc/examples/engywuck-backports.cfg
+++ b/share/doc/examples/graograman-backports.cfg
@@ -1,5 +1,5 @@
-# example for automated Progress Linux 5+ (engywuck-backports) container creation
-# using: sudo container create -s progress-linux
+# example for automated Progress Linux 7.99 (graograman-backports) container building
+# using: sudo container build -s progress-linux
debconf debconf/priority select critical
debconf debconf/frontend select Noninteractive
@@ -9,22 +9,22 @@ compute-tools container/mode select progress-linux
#compute-tools container/preseed-files string
#compute-tools container/include-preseed-files string
-compute-tools container/distribution select engywuck-backports
+compute-tools container/distribution select graograman-backports
#compute-tools container/parent-distribution select
compute-tools container/architecture select auto
-compute-tools container/archives multiselect engywuck-security, engywuck-updates, engywuck-extras, engywuck-backports, engywuck-backports-extras
+compute-tools container/archives multiselect graograman-security, graograman-updates, graograman-extras, graograman-backports, graograman-backports-extras
#compute-tools container/parent-archives multiselect
-compute-tools container/mirror string https://cdn.deb.progress-linux.org/packages
-compute-tools container/mirror-security string https://cdn.deb.progress-linux.org/packages
+compute-tools container/mirror string https://deb.progress-linux.org/packages
+compute-tools container/mirror-security string https://deb.progress-linux.org/packages
compute-tools container/parent-mirror string https://deb.debian.org/debian
-compute-tools container/parent-mirror-security string http://security.debian.org
+compute-tools container/parent-mirror-security string https://security.debian.org
-compute-tools container/archive-areas multiselect main, contrib, non-free
-compute-tools container/parent-archive-areas multiselect main, contrib, non-free
+compute-tools container/archive-areas multiselect main, contrib, non-free, non-free-firmware
+compute-tools container/parent-archive-areas multiselect main, contrib, non-free, non-free-firmware
compute-tools container/packages string knot-resolver openssh-server
diff --git a/share/doc/HOST-SETUP.txt b/share/doc/host-setup.old.txt
index e413872..69368d1 100644
--- a/share/doc/HOST-SETUP.txt
+++ b/share/doc/host-setup.old.txt
@@ -1,5 +1,5 @@
-compute-tools: Host Setup
-=========================
+compute-tools: Host Setup (with ifupdown)
+=========================================
1. Debian Packages
@@ -11,27 +11,27 @@ apt install bridge-utils ifenslave vlan
2. Boot Parameters
------------------
-2.1 CGroup Memory Controller
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+2.1 CGroup Memory Controller (optional)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In order to enable the memory controller the following boot parameter needs to be used:
cgroup_enable=memory
-2.2 CGroup Swap Controller
-~~~~~~~~~~~~~~~~~~~~~~~~~~
+2.2 CGroup Swap Controller (optional)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In order to enable the swap controller the following boot parameter needs to be used:
swapaccount=1
-2.3 vsyscall
-~~~~~~~~~~~~
+2.3 vsyscall (legacy)
+~~~~~~~~~~~~~~~~~~~~~
In order to be able to execute binaries linked to older libc versions
-(<= wheezy) newer linux versions (>= buster), add the following boot parameter
-(see #881813 for more information):
+(<= wheezy) on newer linux versions (>= buster), add the following boot
+parameter (see #881813 for more information):
vsyscall=emulate
@@ -39,18 +39,10 @@ In order to be able to execute binaries linked to older libc versions
3. Networking
~~~~~~~~~~~~~
-3.1 Enable IPv4 Forwarding
-~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-apt install procps
-echo "net.ipv4.ip_forward = 1" > /etc/sysctl.d/ip_foward.conf
-sysctl -p
-
-
-3.2 Configure Network Bridge
+3.1 Configure Network Bridge
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-3.2.1 Bridge: 1 Interface, standalone, DHCP
+3.1.1 Bridge: 1 Interface, standalone, DHCP
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cat > /etc/network/interfaces << EOF
@@ -63,7 +55,7 @@ iface lo inet loopback
iface eno1 inet manual
-allow-hotplug bridge0
+auto bridge0
iface bridge0 inet dhcp
bridge_ports eno1
bridge_fd 0
@@ -72,7 +64,7 @@ iface bridge0 inet dhcp
EOF
-3.2.2 Bridge: 1 Interface, standalone, static
+3.1.2 Bridge: 1 Interface, standalone, static
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cat > /etc/network/interfaces << EOF
@@ -85,7 +77,7 @@ iface lo inet loopback
iface eno1 inet manual
-allow-hotplug bridge0
+auto bridge0
iface bridge0 inet static
address 10.0.0.2
gateway 10.0.0.1
@@ -101,7 +93,7 @@ iface bridge0 inet static
EOF
-3.2.3 Bridge: 2 logical Interfaces, subnet, static
+3.1.3 Bridge: 2 logical Interfaces, subnet, static
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cat > /etc/network/interfaces << EOF
@@ -115,7 +107,7 @@ iface lo inet loopback
allow-hotplug eno1
iface eno1 inet dhcp
-allow-hotplug bridge0
+auto bridge0
iface bridge0 inet static
address 10.0.0.1
netmask 24
@@ -129,7 +121,7 @@ iface bridge0 inet static
EOF
-3.2.4 Bridge: 3 physical Interfaces, vlan, bonding, static
+3.1.4 Bridge: 3 physical Interfaces, vlan, bonding, static
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cat > /etc/network/interfaces << EOF
@@ -147,7 +139,7 @@ iface eno2 inet manual
iface eno3 inet manual
-allow-hotplug bond0
+auto bond0
iface bond0 inet manual
up ip link set bond0 up
down ip link set bond0 down
@@ -164,15 +156,11 @@ iface bond0 inet manual
iface bond0.100 inet manual
vlan-raw-device bond0
-allow-hotplug br100
-iface br100 inet static
+auto bridge-100
+iface bridge-100 inet static
address 10.100.0.2
- #gateway 10.100.0.1
netmask 24
- post-up ip route add 10.100.0.0/24 via 10.100.0.1 dev br100
- post-down ip route del 10.100.0.0/24 dev br100
-
bridge_ports bond0.100
bridge_fd 0
bridge_maxwait 0
@@ -210,3 +198,33 @@ and a container user.
sudo adduser --gecos "compute-tools,,," \
--home /var/lib/open-infrastructure/container-shell \
--shell /usr/bin/container-shell
+
+
+6. IPv4 and IPv6 dual-stack
+---------------------------
+
+Examples for /etc/network/interfaces above work for IPv6 too when using correct
+IPv6 addresses and netmasks.
+
+In order to use dual-stack, bridges must have a IPv4 address assigned
+(can be a dummy one from a privacy range or 127.0.0.0/8).
+
+Let me repeat: dual-stack only works when you assign a primary IPv6 address
+(private or public, doesn't matter) *and* add an additional IPv4 address.
+Yes, the IPv4 address can be a private address, the containers can still
+have a public IPv4 address.
+
+A complete example looks like this:
+
+auto bridge0
+iface bridge0 inet6 static
+ address 2a07:6b47:4::4:1
+ netmask 48
+
+ up ip addr add 127.4.4.1 dev $IFACE
+ down ip addr del 127.4.4.1 dev $IFACE
+
+ bridge_fd 0
+ bridge_maxwait 0
+ bridge_stp 0
+ bridge-mcquerier 1
diff --git a/share/doc/host-setup.txt b/share/doc/host-setup.txt
new file mode 100644
index 0000000..083e1aa
--- /dev/null
+++ b/share/doc/host-setup.txt
@@ -0,0 +1,217 @@
+compute-tools: Host Setup (with systemd-networkd)
+=================================================
+
+
+1. Debian Packages
+-------------------
+
+apt install systemd-networkd bridge-utils
+
+Make sure to enable networkd (sudo systemctl enable systemd-networkd)
+and convert /etc/network/interfaces (see systemd-networkd documentation).
+
+
+2. Boot Parameters
+------------------
+
+2.1 CGroup Memory Controller (optional)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In order to enable the memory controller the following boot parameter needs to be used:
+
+ cgroup_enable=memory
+
+
+2.2 CGroup Swap Controller (optional)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In order to enable the swap controller the following boot parameter needs to be used:
+
+ swapaccount=1
+
+2.3 vsyscall (legacy)
+~~~~~~~~~~~~~~~~~~~~~
+
+In order to be able to execute binaries linked to older libc versions
+(<= wheezy) on newer linux versions (>= buster), add the following boot
+parameter (see #881813 for more information):
+
+ vsyscall=emulate
+
+
+3. Networking
+~~~~~~~~~~~~~
+
+3.1 Configure Network Bridge
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+3.1.1 Bridge: 1 Interface, standalone, DHCP
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+cat > /etc/systemd/network/bridge0.netdev << EOF
+[NetDev]
+Name=bridge0
+Kind=bridge
+EOF
+
+cat > /etc/systemd/network/bridge0.network << EOF
+[Match]
+Name=bridge-0
+
+[Network]
+DHCP=yes
+EOF
+
+
+3.1.2 Bridge: 1 Interface, standalone, static
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+cat > /etc/systemd/network/bridge0.netdev << EOF
+[NetDev]
+Name=bridge0
+Kind=bridge
+EOF
+
+cat > /etc/systemd/network/bridge0.network << EOF
+[Match]
+Name=bridge-0
+
+[Network]
+Address=10.0.0.2/24
+Gateway=10.0.0.1
+EOF
+
+
+3.1.3 Bridge: 3 physical Interfaces, vlan, bonding, static
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+cat > /etc/systemd/network/eno2.network<< EOF
+[Match]
+Name=eno2
+
+[Network]
+Bond=bond0
+EOF
+
+cat > /etc/systemd/network/eno3.network<< EOF
+[Match]
+Name=eno3
+
+[Network]
+Bond=bond0
+EOF
+
+cat > /etc/systemd/network/bond0.netdev << EOF
+[NetDev]
+Name=bond0
+Kind=bond
+
+[Bond]
+Mode=802.3ad
+TransmitHashPolicy=layer3+4
+MIIMonitorSec=0.1
+UpDelaySec=0.2
+DownDelaySec=0.2
+EOF
+
+cat > /etc/systemd/network/bond0.network << EOF
+[Match]
+Name=bond0
+
+[Network]
+VLAN=100
+EOF
+
+cat > /etc/systemd/network/vlan-100.netdev << EOF
+[NetDev]
+Name=vlan-100
+Kind=vlan
+
+[VLAN]
+Id=100
+EOF
+
+cat > /etc/systemd/network/vlan-100.netdev << EOF
+[Match]
+Name=vlan-100
+
+[Network]
+Bridge=bridge-100
+EOF
+
+cat > /etc/systemd/network/bridge-100.netdev << EOF
+[NetDev]
+Name=bridge-100
+Kind=bridge
+EOF
+
+cat > /etc/systemd/network/bridge-100.network << EOF
+[Match]
+Name=bridge-100
+
+[Network]
+Address=10.100.0.2/24
+Gateway=10.100.0.1
+EOF
+
+
+4. Enabling user namespace for unprivileged containers
+------------------------------------------------------
+
+Linux supports unprivileged containers with the user namespace.
+By default the user namespace is disabled on Debian systems (see #898446).
+To enable user namespace, edit the following file for a permant change:
+
+ /etc/sysctl.d/zz-compute-tools.conf
+ sysctl -p
+
+or enable it manually with:
+
+ echo 1 > /proc/sys/kernel/unprivileged_userns_clone
+
+Note that containers need to be started with the correct
+configuration in /etc/compute-tools/container/config to run unpriviled
+(private-users option).
+
+
+5. Enabling container-shell
+---------------------------
+
+Managing privileged containers requires root privileges. In order to allow
+unprivileged users to manage privileged containers without granting them
+privileges or accounts, the container-shell can be used together with sudo
+and a container user.
+
+ sudo adduser --gecos "compute-tools,,," \
+ --home /var/lib/open-infrastructure/container-shell \
+ --shell /usr/bin/container-shell
+
+
+6. IPv4 and IPv6 dual-stack
+---------------------------
+
+Examples for /etc/network/interfaces above work for IPv6 too when using correct
+IPv6 addresses and netmasks.
+
+In order to use dual-stack, bridges must have a IPv4 address assigned
+(can be a dummy one from a privacy range or 127.0.0.0/8).
+
+Let me repeat: dual-stack only works when you assign a primary IPv6 address
+(private or public, doesn't matter) *and* add an additional IPv4 address.
+Yes, the IPv4 address can be a private address, the containers can still
+have a public IPv4 address.
+
+A complete example looks like this:
+
+auto bridge0
+iface bridge0 inet6 static
+ address 2a07:6b47:4::4:1
+ netmask 48
+
+ up ip addr add 127.4.4.1 dev $IFACE
+ down ip addr del 127.4.4.1 dev $IFACE
+
+ bridge_fd 0
+ bridge_maxwait 0
+ bridge_stp 0
+ bridge-mcquerier 1
diff --git a/share/scripts/curl b/share/get-scripts/curl
index ddc624d..00a8d73 100755
--- a/share/scripts/curl
+++ b/share/get-scripts/curl
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -15,19 +15,20 @@
# 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
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
-KEYS="/etc/${PROJECT}/${PROGRAM}/keys"
+HOOKS="/etc/${SOFTWARE}/hooks"
+KEYS="/etc/${SOFTWARE}/keys"
MACHINES="/var/lib/machines"
-CACHE="/var/cache/${PROJECT}/${PROGRAM}/system"
Parameters ()
{
@@ -122,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
}
@@ -176,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
@@ -231,13 +231,6 @@ done
# FIXME: default server via configuration file
-CURL_OPTIONS=""
-
-if curl -V | grep -qs http2
-then
- CURL_OPTIONS="${CURL_OPTIONS} --http2"
-fi
-
if [ -z "${SYSTEM}" ]
then
# Downloading container list
@@ -259,7 +252,7 @@ then
GREP_PATTERN="${GREP_PATTERN:-${ARCHITECTURE}}"
echo "Downloading $(echo ${SERVER} | awk -F/ '{ print $3 }') container list"
- curl --fail --location --progress-bar --user-agent ${SOFTWARE}/${VERSION} ${CURL_OPTIONS} \
+ curl --fail --location --progress-bar --user-agent ${SOFTWARE}/${VERSION} --http2 \
"${SERVER}/container-list.txt" | grep -E "${GREP_PATTERN}" > "${DEBCONF_TMPDIR}/container-list.txt"
umask 0022
@@ -267,7 +260,7 @@ then
Debconf
# Run debconf parts
- for DEBCONF_SCRIPT in /usr/share/${PROJECT}/${PROGRAM}/scripts/curl.d/*
+ for DEBCONF_SCRIPT in /usr/share/${SOFTWARE}/get-scripts/curl.d/*
do
if [ -x "${DEBCONF_SCRIPT}" ]
then
@@ -298,14 +291,14 @@ mkdir -p "${CACHE}"
SETUP="${SETUP:-$(echo ${SYSTEM} | sed -e 's|.system.tar.|.setup.tar.|')}"
-for FILE in "${SYSTEM}" "${SYSTEM}.gpg" "${SYSTEM}.sha512" \
- "${SETUP}" "${SETUP}.gpg" "${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).gpg" ]
+ if [ -e "${CACHE}/$(basename ${FILE} .sha512).sig" ]
then
continue
fi
@@ -320,7 +313,7 @@ do
fi
echo "Downloading ${FILE}"
- curl --fail --location --progress-bar --user-agent ${SOFTWARE}/${VERSION} ${CURL_OPTIONS} ${CURL_TIME_COND} \
+ curl --fail --location --progress-bar --user-agent ${SOFTWARE}/${VERSION} --http2 ${CURL_TIME_COND} \
"${SERVER}/${FILE}" -o "${CACHE}/${FILE}"
fi
done
@@ -334,12 +327,12 @@ do
continue
fi
- if [ -e "${FILE}.gpg" ]
+ if [ -e "${FILE}.sig" ]
then
echo -n "Verifying ${FILE}:"
set +e
- gpg --homedir "${KEYS}" --verify "${FILE}.gpg" "${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 6c3699a..5c5936e 100755
--- a/share/scripts/curl.d/0001-debconf
+++ b/share/get-scripts/curl.d/0001-debconf
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -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/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/post-start.chown-nvidia.sh b/share/hooks/post-start.chown-nvidia.sh
new file mode 100755
index 0000000..225f13b
--- /dev/null
+++ b/share/hooks/post-start.chown-nvidia.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# Copyright (C) 2014-2022 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"
+
+CONTAINER="/var/lib/machines"
+
+if grep -qs nvidia "${CONTAINER}/${NAME}/etc/group"
+then
+ chroot "${CONTAINER}/${NAME}" chown root:nvidia "/dev/nvidia*"
+fi
diff --git a/share/hooks/pre-create.git-pull.sh b/share/hooks/pre-build.git-pull.sh
index 582479e..f1ae24b 100755
--- a/share/hooks/pre-create.git-pull.sh
+++ b/share/hooks/pre-build.git-pull.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -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"
-DIRECTORIES="/etc/${PROJECT}/${PROGRAM}/debconf /etc/${PROJECT}/${PROGRAM}/debconf/*/"
+DIRECTORIES="$(for DIRECTORY in $(find /etc/${SOFTWARE}/debconf/ -type d -name ".git"); do echo $(dirname ${DIRECTORY}); done | sort -uV)"
for DIRECTORY in ${DIRECTORIES}
do
@@ -30,10 +31,13 @@ do
then
echo "Updating ${DIRECTORY}..."
- if [ -e "/etc/${PROJECT}/${PROGRAM}.conf" ]
- then
- . "/etc/${PROJECT}/${PROGRAM}.conf"
- fi
+ for FILE in "/etc/${SOFTWARE}/${PROGRAM}.conf" "/etc/${SOFTWARE}/${PROGRAM}.conf.d"/*.conf
+ do
+ if [ -e "${FILE}" ]
+ then
+ . "${FILE}"
+ fi
+ done
DEBCONF_ID="${DEBCONF_ID:-HEAD}"
diff --git a/share/hooks/pre-get.git-pull.sh b/share/hooks/pre-get.git-pull.sh
new file mode 100755
index 0000000..f1ae24b
--- /dev/null
+++ b/share/hooks/pre-get.git-pull.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# Copyright (C) 2014-2022 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}..."
+
+ for FILE in "/etc/${SOFTWARE}/${PROGRAM}.conf" "/etc/${SOFTWARE}/${PROGRAM}.conf.d"/*.conf
+ do
+ if [ -e "${FILE}" ]
+ then
+ . "${FILE}"
+ fi
+ done
+
+ 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/hooks/pre-start.unlink-console.sh b/share/hooks/pre-start.unlink-console.sh
index 762ab0e..cebbe03 100644..100755
--- a/share/hooks/pre-start.unlink-console.sh
+++ b/share/hooks/pre-start.unlink-console.sh
@@ -1,8 +1,32 @@
#!/bin/sh
+# Copyright (C) 2014-2022 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
-if grep -qs 'bind=.*/dev:/dev;' "/etc/open-infrastructure/container/config/${NAME}.conf"
+PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
+PROGRAM="container"
+
+CONFIG="/etc/${SOFTWARE}/config"
+
+# Run
+if grep -qs 'bind=.*/dev:/dev;' "${CONFIG}/${NAME}.conf"
then
unlink /dev/console > /dev/null 2>&1 || true
fi
diff --git a/share/keys/daniel.baumann@open-infrastructure.net_0xB62C61A10B93195F.pub b/share/keys/daniel.baumann@open-infrastructure.net_0xB62C61A10B93195F.pub
new file mode 100644
index 0000000..1e1884d
--- /dev/null
+++ b/share/keys/daniel.baumann@open-infrastructure.net_0xB62C61A10B93195F.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_0x55CF1BF986ABB9C7.pub b/share/keys/daniel@debian.org_0x55CF1BF986ABB9C7.pub
new file mode 100644
index 0000000..910f870
--- /dev/null
+++ b/share/keys/daniel@debian.org_0x55CF1BF986ABB9C7.pub
@@ -0,0 +1,52 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQINBFPK4YgBEADflMdQSKGvLczvCmdYSeF3nWRE6zYG2DDoeHadp0sCs7jXgVS4
+ulWzuusV2ccAwb2hANmlPC2grEWSSQUs0PykQwgY9PzvYCVw4AGKKua3QPDMBc52
+MT43cOEhCXdcJcuMaovMVkke7YvVqwWVzM2QBXbGsqXtWMuFSFB6JhIqe4pdyyrX
+zIFIwFsU/MuS0K5Wbf4HBkw4JYgM2RUare/9awn/yKsQCQ3jeF5g9IRPz+zhagvT
+6dReJcAZCunCkktwS8Pi7mXk0O9k0C4BV+T6Dw81rsMXwVQF5SWkBCul4evnnUpT
+NUHmZYlht6WAflrd+fyGBHRMsq04GqHze0GeyAQ8DcGhBaHHku2BixSATqrnhud5
+mPL4xQQxOS4/ojBBDxVNNS7sX+2ivYLtdD1pTCQT1Xd869b8eIVCczq/+9GJnL1f
+XHIZuZrjxss1Hb+38LK5fCaKbTSpM0dkSlzHnZKx1BfOXCJp/KAfBTZwxMEh95SK
+IzcbKYzzo1vFUZHOkspW1qo3r4mq8wboAljilJjdyBSVUQKpTYel/p6NCmEmAozH
+CzSV/xiHaf2cfpQau1YEmShD73VTt2b4CVn4sGLrAQNp3S9dCAKpz6u3wXMa8vWI
+3sDq1RtXAX/YV5+VMeTH4LiMuzd3KUUnCb5O+GspBZymoCnCwd266g8eSwARAQAB
+tCdEYW5pZWwgQmF1bWFubiA8bWFpbEBkYW5pZWwtYmF1bWFubi5jaD6JAj0EEwEK
+ACcFAlPK4YgCGwMFCROq0IAFCwkIBwMFFQoJCAsFFgMCAQACHgECF4AACgkQVc8b
++YaruceN+A/+N+2A1Tt11fJ/iyP3hS+3Eaj6oE6bIQLiD9nAJeg9uLMII6lOOEkh
+7Irs+IE8MsiG7DY4wWKahtdci3Vhad71chNXnLOrMKWOk/1VFm+mjMil2oauU3fi
+6mwzb/gNyB3JLCe3oNX7TsqNAJjdPwbrVpwhJXOKKEjFitNoJMAg6m8vtNtIk2yE
+YRTU2VJG7sKaMzvHg7KxlIGsarsamFpLRx7ZnnrcA8ewsvNn6fYF8Zp8W2puScsK
+O26aHfZxrTzzBfxZ/anrPlXkFEvyVI3+qLYbDuLfPEEHQX9zh91++yKu1pYcTb/U
+KZrQIthoJ0RCdHs65uTidTtM+4/jtlUFr07LAZaQr0i8uc2HstNfqIijszvlkPOb
+lobplBB0a+saFI5CeronCzfL6uXMDe57luT6rkd+lxKC0SZ2Ai1Pon4uRbLsiAWW
+SX/DqlOaq0Zmg0vLYo64/rtw5/gbVFdBTidzEUkiX7xjxBahRLH95knPlUyaFXct
+AWERYH9brMoNl9WoPUlo4j8UrItJWXlHTw+LPCPPGNdAwchv4naozGau6xuVyVN7
+UVBXO8YMiWXXHhGQz7pX46R1OpfdoSe2nKOOJkvTL8jUCnTMl8/dFCsm2KwZMDdQ
+IvvQ19ok5QijWZyPJhEUMAb8y++p2KSwclRWHng10jQMBP+o3C8Lpt6IRgQTEQoA
+BgUCU8r6OgAKCRD4LlzASysrnmVZAKCMqPcLD1k/hgkBpZQXcYgryna01QCfV7KM
+hALFW3G/ySPEPv/THC7P2QO5Ag0EU8rhiAEQANVpq7tDaynnl+SJQYf3QX8NuV7T
+tAV/ct+Ehw2IGdv43Sv3fBYUkh16UJyBK9Qx1NP7Dljj/sGlAa3kyOiZsAGagrXU
+B55nrN3LWFJLfph0VGqsJYP9t4eu5RLRD+uathcLwHEWeINoqIb8TKTxJOvvvsvw
+VP2+QaVYKsfvn12jmrjAj1/loBjlwuPMTrwB/U2049LqbTbz+CurLwKPAuRim66r
+7wO4yeZMMlYMwnXljHO0/3WR7n6H5wO16v1QrKCYmg2rheGLeh+SUCrCzNzygP78
+gD1OqH395JQhsJQJxw2apG1dLQETWAaVBpQ+3+3aJrjhyZ4XxfyCRYntpxIhY5GA
+CcGrHkY7/EMNw1dZEMisDFaKfRxgduFjqMNTfwlGHmgnfuEvyVpeZ1zL5nzV8Wgq
+KR5xUcCB0a2UjN2UficpMIsD00R51NlxDgUGT9t+ehLWU56RX8k6O9HXnsyLF0Xo
+ahncubKPg5txU+9MI0i4Mib5pm1gGqgPGHweuUOoL21hljJIfldtbfGwApoQ7jbd
++8mOX5UAXxJDX4IVTd9HX70suhJraIpIVf2qSafJwth1ZM21PET27tGn4xmuA3vW
+sNLLRBKeeQ584n0sKPUMrS/+sRLPYlGwVO7tU1okRdP6SGndVI8xv8nOxheKXqaO
+QxYz2vFMbuWP/1CfABEBAAGJAiUEGAEKAA8FAlPK4YgCGwwFCROq0IAACgkQVc8b
++YaruceOTQ/8C6ZZme6wT6ccw42XHsv8yKFh05TPSWXR3acV1FXzncDMjIMrU097
+Y6+I8xp5y1DULziH177666SOehk3AkHSo7GUIzxLYksOx3RFskBZpQatwThr1x2S
+0YVlxMAi/juZny0rarxTrvk2YAkDC7QCaSXScrn3K03QPjnYSlv73cj2lPAurfgs
+eXL0N4xOmgbwDFnTXnuxLajA8SyuaDclIeHOp5izPQg24AzlMr0iGBZDcRyov1AH
+bkD7NqjX8vZmTEcloYZKM8m8GAx/S52rFTc0V9t+wyNq7ZHAmzu/jqgzGyAeGbnX
+mnCVW4JkrV64wFMJODAOwuJ4crZjnyHqaBAUeukpfeJj0BijskuJfj570Zq+qNHQ
+6JHiHir6kedL/Xg4onNDJyTDMWmg8cRd2vrxclUXk6AfFLb9Wp/8Lf1YmzFnLg4u
+GH3BcO4CJNBS0Z92JQD+Xdvgr7E7P3VbOSVDzJzFsilYhJgCxNkRWU5YbqBRQyG2
+4uVpTF2gu5nkjNJ+HYUWsTjgOP3Avr7KlLWJr3NfQLKhjG4AyKPGvNPgzQpUBE9O
+ADEfyz7xVsngvIcYLT3sN6/qDpFW3QWGfBBhzWGe2ekpIDNHP4lao3oRS/+LGK8j
+gHpGR2pddZzWSsAZIGqHxQEgo9ZpnfBCqub9N5ATiimma5Ot44pBkEw=
+=aSin
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/share/logrotate/container b/share/logrotate/container
index 14599be..d1783de 100644
--- a/share/logrotate/container
+++ b/share/logrotate/container
@@ -1,4 +1,6 @@
-/var/log/open-infrastructure/container.log {
+# Open Infrastructure: compute-tools
+
+/var/log/compute-tools/container.log {
compress
create 0640 root adm
dateext
diff --git a/share/man/Makefile b/share/man/Makefile
index 535b2b1..a878dbd 100644
--- a/share/man/Makefile
+++ b/share/man/Makefile
@@ -1,6 +1,6 @@
-# Makefile
+# Open Infrastructure: compute-tools
-# Copyright (C) 2014-2020 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -15,30 +15,45 @@
# 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/>.
-# Depends: asciidoc dblatex docbook-xsl libxml2-utils source-highlight
+# Depends: python3-docutils
-A2X = a2x \
- --asciidoc-opts="-a revdate=$(shell cat ../../VERSION.txt)" \
- --doctype=manpage
+RST2MAN = rst2man \
+ --no-datestamp \
+ --no-generator \
+ --strict \
+ --strip-comments \
+ --tab-width=4 \
+ --verbose
+
+VERSION := $(shell cat ../../VERSION.txt)
SHELL := sh -e
all: build
-clean:
- rm -f *.[0-9]
- rm -f *.xml
-
build: man
rebuild: clean build
-man: *.txt
- for FILE in *.txt; \
+man: man.in *.rst
+ @echo -n "Creating manpages... "
+
+ @for FILE in *.rst; \
do \
- $(A2X) --format=manpage $${FILE}; \
+ cp man.in $$(basename $${FILE} .rst); \
+ $(RST2MAN) $${FILE} | \
+ sed -e '/^.\\" Man page generated/d' \
+ -e '/^.\\" Generated by/d' \
+ -e "s|^\(.TH .*\) \(\"\" \"\"\) |\1 $${VERSION} compute-tools |" \
+ >> $$(basename $${FILE} .rst); \
+ echo -n "."; \
done
+ @echo " done."
+
+clean:
+ rm -f *.[0-9]
+
.PHONY: all clean build rebuild man
diff --git a/share/man/compute-tools.7.rst b/share/man/compute-tools.7.rst
new file mode 100644
index 0000000..33e6aea
--- /dev/null
+++ b/share/man/compute-tools.7.rst
@@ -0,0 +1,153 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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/>.
+
+=============
+compute-tools
+=============
+
+--------------------------------
+Manage systemd-nspawn containers
+--------------------------------
+
+:manual section: 7
+:manual group: Open Infrastructure
+
+Description
+===========
+
+[A Linux container] is an operating-system-level virtualization environment for
+running multiple isolated Linux systems (containers) on a single Linux control
+host.
+
+ -- Wikipedia (https://en.wikipedia.org/wiki/LXC)
+
+**compute-tools** provides the system integration for managing containers using
+systemd-nspawn(1).
+
+Download
+========
+
+| Upstream Releases:
+| https://get.open-infrastructure.net/software/compute-tools/upstream
+
+| Upstream Sources:
+| https://git.open-infrastructure.net/software/compute-tools
+
+| Debian Releases:
+| https://get.open-infrastructure.net/software/compute-tools/debian
+
+| Debian Sources:
+| https://git.progress-linux.org/users/daniel/debian/packages/open-infrastructure-compute-tools
+
+Installation
+============
+
+Source
+------
+
+| $ sudo apt install git make python3-docutils dbus systemd-container
+| $ git clone https://git.open-infrastructure.net/software/compute-tools
+| $ cd compute-tools && sudo make install
+
+Debian 9 (stretch) and newer
+----------------------------
+
+| $ sudo apt install compute-tools
+
+Development
+===========
+
+Bug reports, feature requests, help, patches, support and everything else are
+welcome on the Open Infrastructure Software Mailing List
+(https://lists.open-infrastructure.net/listinfo/software).
+
+Please base patches against the 'next' Git branch using common sense
+(https://www.kernel.org/doc/Documentation/SubmittingPatches).
+
+Debian specific bugs can also be reported in the Debian Bug Tracking System
+(https://bugs.debian.org).
+
+Known limitations
+=================
+
+This version of compute-tools currently do not work with systemd-networkd and
+depend on ifupdown.
+
+Using overlay, the upper directory can not be an NFS mount due to limitations in
+Linux' overlay filesystem
+(https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/filesystems/overlayfs.txt).
+
+Usage
+=====
+
+Build a new container:
+ sudo container build -n NAME
+
+Start a container:
+ sudo container start -n NAME
+
+Stop a container:
+ sudo container stop -n NAME
+
+Remove a container:
+ sudo container remove -n NAME
+
+List container on the system:
+ sudo container list
+
+Show container version:
+ container version
+
+See container(1) for a list of all container commands.
+
+Links
+=====
+
+| * Linux Weekly News: Kernel / Containers
+| (https://lwn.net/Kernel/Index/#Containers)
+
+| * Linux Weekly News: Security / Containers
+| (https://lwn.net/Security/Index/#Containers)
+
+| * 2016-02-24: Systemd vs. Docker
+| (https://lwn.net/Articles/676831/)
+
+| * 2015-06-10: Systemd and containers
+| (https://lwn.net/Articles/647634/)
+
+| * 2014-07-07: Control groups
+| (https://lwn.net/Articles/604609/)
+
+| * 2013-11-13: Systemd-Nspawn is Chroot on Steroids [LinuxCon Europe]
+| (https://www.youtube.com/watch?v=s7LlUs5D9p4)
+
+| * 2013-11-03: Creating containers with systemd-nspawn
+| (https://lwn.net/Articles/572957/)
+
+| * 2013-02-06: Systemd lightweight containers
+| (https://lwn.net/Articles/536033/)
+
+| * 2013-01-04: Namespaces in operation
+| (https://lwn.net/Articles/531114/)
+
+Authors
+=======
+
+compute-tools were written by Daniel Baumann
+<daniel.baumann@open-infrastructure.net> and others.
diff --git a/share/man/compute-tools.7.txt b/share/man/compute-tools.7.txt
deleted file mode 100644
index bcd234f..0000000
--- a/share/man/compute-tools.7.txt
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-TOOLS(7)
-==================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-compute-tools - Manage systemd-nspawn containers
-
-
-DESCRIPTION
------------
-"[A Linux container] is an operating-system-level virtualization environment for running multiple isolated Linux systems (containers) on a single Linux control host."::
- -- Wikipedia (https://en.wikipedia.org/wiki/LXC)
-
-compute-tools provides the system integration for managing containers using systemd-nspawn.
-
-
-DOWNLOAD
---------
- * Upstream Releases: https://get.open-infrastructure.net/software/compute-tools/upstream
- * Upstream Sources: https://git.open-infrastructure.net/software/compute-tools
- * Debian Releases: https://get.open-infrastructure.net/software/compute-tools/debian
- * Debian Sources: https://git.progress-linux.org/users/daniel/debian/packages/open-infrastructure-compute-tools
-
-
-INSTALLATION
-------------
-
-SOURCE
-~~~~~~
- 1. sudo apt install asciidoc git docbook-xml docbook-xsl libxml2-utils make xsltproc dbus systemd-container
- 2. git clone https://git.open-infrastructure.net/software/compute-tools
- 3. cd compute-tools && sudo make install
-
-DEBIAN 9 (STRETCH) AND NEWER
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- * sudo apt install container-tools
-
-
-DEVELOPMENT
------------
-Bug reports, feature requests, help, patches, support and everything else
-are welcome on the Open Infrastructure Software Mailing List:
-
- * https://lists.open-infrastructure.net/listinfo/software
-
-Please base patches against the 'next' Git branch using common sense:
-
- * https://www.kernel.org/doc/Documentation/SubmittingPatches
-
-Debian specific bugs can also be reported in the Debian Bug Tracking System:
-
- * https://bugs.debian.org
-
-
-KNOWN LIMITATIONS
------------------
- * This version of compute-tools currently do not work with systemd-networkd and depend on ifupdown.
- * Using overlay, the upper directory can not be an NFS mount due to limitations in Linux' overlay filesystem,
- see https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/filesystems/overlayfs.txt
-
-
-USAGE
------
-*Create a new container:*::
- sudo container create -n NAME
-
-*Start a container:*::
- sudo container start -n NAME
-
-*Stop a container:*::
- sudo container stop -n NAME
-
-*Remove a container:*::
- sudo container remove -n NAME
-
-*List container on the system:*::
- sudo container list
-
-*Show container version:*::
- container version
-
-See container(1) for a list of all container commands.
-
-
-LINKS
------
-*2016-02-24: Systemd vs. Docker*::
- https://lwn.net/Articles/676831/
-
-*2015-06-10: Systemd and containers*::
- https://lwn.net/Articles/647634/
-
-*2014-07-07: Control groups*::
- https://lwn.net/Articles/604609/
-
-*2013-11-13: Systemd-Nspawn is Chroot on Steroids [LinuxCon Europe]*::
- https://www.youtube.com/watch?v=s7LlUs5D9p4
-
-*2013-11-03: Creating containers with systemd-nspawn*::
- https://lwn.net/Articles/572957/
-
-*2013-02-06: Systemd lightweight containers*::
- https://lwn.net/Articles/536033/
-
-*2013-01-04: Namespaces in operation*::
- https://lwn.net/Articles/531114/
-
-
-AUTHORS
--------
-compute-tools were written by Daniel Baumann <daniel.baumann@open-infrastructure.net> and others.
diff --git a/share/man/container-auto.1.rst b/share/man/container-auto.1.rst
new file mode 100644
index 0000000..68836eb
--- /dev/null
+++ b/share/man/container-auto.1.rst
@@ -0,0 +1,92 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-auto
+==============
+
+-------------------------------------------------------
+Start/stop all container automatically at boot/shutdown
+-------------------------------------------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container auto** ['OPTIONS']
+
+Description
+===========
+
+The **container auto** command starts or stops all container on the host system.
+
+Options
+=======
+
+The following **container auto** options are available:
+
+-f, --force:
+ Removing stray lock file if existing.
+
+-s, --start:
+ Start all container on the host system.
+
+-t, --stop:
+ Stop all container on the host system.
+
+Examples
+========
+
+Start all container on the host system:
+
+ sudo container auto --start
+
+Stop all container on the host system:
+
+ sudo container auto --stop
+
+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-auto.1.txt b/share/man/container-auto.1.txt
deleted file mode 100644
index b1aa550..0000000
--- a/share/man/container-auto.1.txt
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-START(1)
-==================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-auto - Start/stop all container automatically at boot/shutdown
-
-
-SYNOPSIS
---------
-*container auto* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The container auto command starts or stops all container on the host system.
-
-
-OPTIONS
--------
-The following container options are available:
-
-*-f, --force*::
- Removing stray lock file if existing.
-
-*-s, --start*::
- Start all container on the host system.
-
-*-t, --stop*::
- Stop all container on the host system.
-
-
-EXAMPLES
---------
-*Start all container on the host system:*::
- sudo container auto --start
-
-*Stop all container on the host system:*::
- sudo container auto --stop
-
-
-SEE ALSO
---------
-compute-tools(7),
-container(1).
-
-
-HOMEPAGE
---------
-More information about compute-tools and the Open Infrastructure project can be found on the homepage at 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 at 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-build-debconf.1.rst b/share/man/container-build-debconf.1.rst
new file mode 100644
index 0000000..6543140
--- /dev/null
+++ b/share/man/container-build-debconf.1.rst
@@ -0,0 +1,173 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-debconf
+=======================
+
+-----------------------------------------------------
+Build an advanced Debian based container with debconf
+-----------------------------------------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container build -s debconf** ['OPTIONS']
+| **cnt b -s debconf** ['OPTIONS']
+
+| **container build -s debian** ['OPTIONS']
+| **cnt b -s debian** ['OPTIONS']
+
+| **container build -s progress-linux** ['OPTIONS']
+| **cnt b -s progress-linux** ['OPTIONS']
+
+Description
+===========
+
+The debconf container build script uses debconf(1) to automatically build a
+Debian based container.
+
+Scope
+-----
+
+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 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.
+Same goes for this script.
+
+Functions
+---------
+
+This script performs the following configuration on top of a Debian based
+system:
+
+ * network
+ * root password
+ * apt repositories
+ * \.\.\.
+
+Modes
+-----
+
+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.
+
+Preseeding
+----------
+
+Hierarchy of Preseed Files:
+
+ * The debconf script can be fully preseeded. Such preseed files can include
+ one or more preseed files themselfs (currently, only one layer of includes
+ is supported, no nested or recursive includes).
+
+ * The general rule of 'the later preseed file overwrites the earlier' applies.
+ The debconf script reads the main preseed file (specified either on command
+ line or by debconf selection/input dialog) after any included preseed files
+ in there.
+
+ * That means that debconf values after the include statement in the main
+ preseed file can overwrite any values specified in the included preseed
+ files.
+
+Options
+=======
+
+The following script options are available:
+
+-n, --name='NAME':
+ Specify container name.
+
+-p, --preseed-file='FILE':
+ Specify the preseed file.
+
+Examples
+========
+
+Build a Debian based container:
+
+ sudo container build -s debian -n debian.example.net
+
+Build a Progress Linux container:
+
+ sudo container build -s progress-linux -n progress.example.net
+
+Files
+=====
+
+The following files are used:
+
+/etc/compute-tools/config:
+ Container configuration files.
+
+/usr/share/compute-tools/build-scripts:
+ Container build scripts.
+
+/usr/share/doc/compute-tools:
+ Container documentation.
+
+/var/lib/machines:
+ Container directory.
+
+/var/cache/container:
+ Container cache directory.
+
+/tmp/compute-tools:
+ Container temporary directory.
+
+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-build-debootstrap.1.rst b/share/man/container-build-debootstrap.1.rst
new file mode 100644
index 0000000..10538c5
--- /dev/null
+++ b/share/man/container-build-debootstrap.1.rst
@@ -0,0 +1,111 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-debootstrap
+===========================
+
+-------------------------------------------------------------------
+Build a basic Debian based container with debootstrap or mmdebstrap
+-------------------------------------------------------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container build -s debootstrap** ['OPTIONS']
+| **cnt b -s debootstrap** ['OPTIONS']
+
+| **container build -s mmdebstrap** ['OPTIONS']
+| **cnt b -s mmdebstrap** ['OPTIONS']
+
+Description
+===========
+
+The debootstrap container build script uses debootstrap(8) or mmdebstrap(1)
+to build a Debian based container.
+
+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
+ * root password is set (user specified or 16 random characters)
+
+Options
+=======
+
+The following script options are available:
+
+-n, --name='NAME':
+ Specify container name.
+
+-a, --architecture='ARCHITECTURE':
+ Specify the Debian architecture, defaults to the host systems architecture.
+
+-d, --distribution='DISTRIBUTION':
+ Specify the Debian distribution, defaults to 'bookworm'.
+
+-m, --mirror='MIRROR':
+ 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.
+
+Examples
+========
+
+Build a Debian 12 (bookworm) based container with same architecture as the host
+system using debootstrap:
+
+ sudo container build -s debootstrap -n bookworm.example.net
+
+Build a Debian 12 (bookworm) based container with different architecture as the
+host system using mmdebstrap:
+
+ sudo container build -s mmdebstrap -n bookworm-i386.example.net -- -a i386
+
+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-build.1.rst b/share/man/container-build.1.rst
new file mode 100644
index 0000000..faa0e16
--- /dev/null
+++ b/share/man/container-build.1.rst
@@ -0,0 +1,139 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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
new file mode 100644
index 0000000..a3afd51
--- /dev/null
+++ b/share/man/container-console.1.rst
@@ -0,0 +1,86 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-console
+=================
+
+-------------------------------
+Attach a console to a container
+-------------------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container console** ['OPTIONS']
+
+Description
+===========
+
+The **container console** command attaches a console to a container.
+
+While 'container enter' bypasses the login prompt and drops to a root shell, the
+'container console' command shows a full login prompt where any valid user and
+password combination can be used.
+
+Options
+=======
+
+The following **container console** options are available:
+
+-n, --name='NAME':
+ Specify container name.
+
+Examples
+========
+
+Attach console to example.net container:
+
+ sudo container console -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.txt b/share/man/container-console.1.txt
deleted file mode 100644
index 7f4fb03..0000000
--- a/share/man/container-console.1.txt
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-CONSOLE(1)
-====================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-console - Attach a console to a container
-
-
-SYNOPSIS
---------
-*container console* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The container console command attaches a console to a container.
-
-While 'container enter' bypasses the login prompt and drops to a root shell,
-the 'container console' command shows a full login prompt where any valid user and password combination can be used.
-
-
-OPTIONS
--------
-The following container options are available:
-
-*-n, --name='NAME'*::
- Specify container name.
-
-
-EXAMPLES
---------
-*Attach console to example.net container:*::
- sudo container console -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 at 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 at 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-create-curl.1.txt b/share/man/container-create-curl.1.txt
deleted file mode 100644
index c15ee4e..0000000
--- a/share/man/container-create-curl.1.txt
+++ /dev/null
@@ -1,129 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-CREATE-CURL(1)
-========================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-create-curl - Create a Debian based container by downloading a tarball over the network
-
-
-SYNOPSIS
---------
-*container create -s curl* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The curl container creation 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 with three modificiations:
-
- * hostname is set (container name) in /etc/hostname
- * systemd machine-id is generated in /etc/machine-id
- * root password is set (user specified or 16 random characters)
-
-
-OPTIONS
--------
-The following script options are available:
-
-*-n, --name='NAME'*::
- Specify container name.
-
-*-a, --architecture='ARCHITECTURE'*::
- Specify container architecture.
-
-"--clean*::
- Remove downloaded tarball after successfull container creation.
-
-*-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.
-
-*--setup='SETUP'*::
- Specify the setup image name to download, defaults to the value specified through --system using the setup.tar.${COMPRESSION} suffix.
-
-*--system='SYSTEM'*::
- Specify the system image name to download, defaults to debian-stretch-current_${ARCHITECTURE}.system.tar.${COMPRESSION} (where ${ARCHITECTURE} is the host systems architecture and ${COMPRESSION} either lz, xz, or gz depending on compressor availability on the host system).
-
-
-EXAMPLES
---------
-*Create a Debian 9 (stretch) based container with same architecture as the host system:*::
- sudo container create -s curl -n stretch.example.net
-
-*Create a Debian 9 (stretch) based container with different architecture as the host system:*::
- sudo container create -s curl -n stretch-i386.example.net -- --system debian-stretch-current_i386.system.tar.xz
-
-FILES
------
-The following files are used:
-
-*/etc/open-infrastructure/container/config*::
- Container configuration files.
-
-*/usr/share/open-infrastructure/container/scripts*::
- Container creation scripts.
-
-*/usr/share/doc/compute-tools*::
- Container documentation.
-
-*/var/lib/machines*::
- Container directory.
-
-*/var/cache/open-infrastructure/container*::
- Container cache directory.
-
-
-CONTAINER IMAGES
-----------------
-
-compute-tools will download tarballs from a server expecting that the images are tarballs with either gzip, lzip, xz, or no compression. See container-images.sh as an example on how to create your own container images.
-
-
-SEE ALSO
---------
-compute-tools(7),
-container(1).
-
-
-HOMEPAGE
---------
-More information about compute-tools and the Open Infrastructure project can be found on the homepage at 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 at 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-create-debconf.1.txt b/share/man/container-create-debconf.1.txt
deleted file mode 100644
index 0381cae..0000000
--- a/share/man/container-create-debconf.1.txt
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-CREATE-DEBOOTSTRAP(1)
-===============================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-create-debconf - Create an advanced Debian based container with debconf
-
-
-SYNOPSIS
---------
-*container create -s debconf* ['OPTIONS']
-*cnt cr -s debconf* ['OPTIONS']
-
-*container create -s debian* ['OPTIONS']
-*cnt cr -s debian* ['OPTIONS']
-
-*container create -s progress-linux* ['OPTIONS']
-*cnt cr -s progress-linux* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The debconf container creation script uses debconf(1) to automatically create a Debian based container.
-
-SCOPE
-~~~~~
-Note that this container creation 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.
-
-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. Same goes for this script.
-
-FUNCTIONS
-~~~~~~~~~
-
-This script performs the following configuration on top of a Debian based system:
-
- * network
- * root password
- * apt repositories
- * ...
-
-MODES
-~~~~~
-This container creation 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.
-
-
-PRESEEDING
-~~~~~~~~~~
-
-Hierarchy of Preseed Files
-
-The debconf script can be fully preseeded. Such preseed files
-can include one or more preseed files themselfs (currently, only one layer of
-includes is supported, no nested or recursive includes).
-
-The general rule of 'the later preseed file overwrites the earlier' applies.
-The debconf script reads the main preseed file (specified either on command line or
-by debconf selection/input dialog) after any included preseed files in there.
-
-That means that debconf values after the include statement in the main preseed
-file can overwrite any values specified in the included preseed files.
-
-
-OPTIONS
--------
-The following script options are available:
-
-*-n, --name='NAME'*::
- Specify container name.
-
-*-p, --preseed-file='FILE'*::
- Specify the preseed file.
-
-
-EXAMPLES
---------
-*Create a Debian based container:*::
- sudo container create -s debian -n debian.example.net
-
-*Create a Progress Linux container:*::
- sudo container create -s progress-linux -n progress.example.net
-
-
-FILES
------
-The following files are used:
-
-*/etc/open-infrastructure/container/config*::
- Container configuration files.
-
-*/usr/share/open-infrastructure/container/scripts*::
- Container creation scripts.
-
-*/usr/share/doc/compute-tools*::
- Container documentation.
-
-*/var/lib/machines*::
- Container directory.
-
-*/var/cache/open-infrastructure/container*::
- Container cache directory.
-
-*/tmp/compute-tools*::
- Container temporary directory.
-
-
-SEE ALSO
---------
-compute-tools(7),
-container(1).
-
-
-HOMEPAGE
---------
-More information about compute-tools and the Open Infrastructure project can be found on the homepage at 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 at 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-create-debootstrap.1.txt b/share/man/container-create-debootstrap.1.txt
deleted file mode 100644
index 6acdbeb..0000000
--- a/share/man/container-create-debootstrap.1.txt
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-CREATE-DEBOOTSTRAP(1)
-===============================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-create-debootstrap - Create a basic Debian based container with debootstrap or mmdebstrap
-
-
-SYNOPSIS
---------
-*container create -s debootstrap* ['OPTIONS']
-*cnt cr -s debootstrap* ['OPTIONS']
-
-*container create -s mmdebstrap* ['OPTIONS']
-*cnt cr -s mmdebstrap* ['OPTIONS']
-
-DESCRIPTION
------------
-The debootstrap container creation script uses debootstrap(8) or mmdebstrap(1) to create a Debian based container.
-
-This script creates a pure Debian system with three modificiations:
-
- * apt cache of packages downloaded during debootstrap is cleaned
- * hostname is set (container name) in /etc/hostname
- * root password is set (user specified or 16 random characters)
-
-
-OPTIONS
--------
-The following script options are available:
-
-*-n, --name='NAME'*::
- Specify container name.
-
-*-a, --architecture='ARCHITECTURE'*::
- Specify the Debian architecture, defaults to the host systems architecture.
-
-*-d, --distribution='DISTRIBUTION'*::
- Specify the Debian distribution, defaults to stretch.
-
-*-m, --mirror='MIRROR'*::
- 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.
-
-
-EXAMPLES
---------
-*Create a Debian 9 (stretch) based container with same architecture as the host system using debootstrap:*::
- sudo container create -s debootstrap -n stretch.example.net
-
-*Create a Debian 9 (stretch) based container with different architecture as the host system using mmdebstrap:*::
- sudo container create -s mmdebstrap -n stretch-i386.example.net -- -a i386
-
-
-SEE ALSO
---------
-compute-tools(7),
-container(1).
-
-
-HOMEPAGE
---------
-More information about compute-tools and the Open Infrastructure project can be found on the homepage at 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 at 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-create.1.txt b/share/man/container-create.1.txt
deleted file mode 100644
index 7770d9b..0000000
--- a/share/man/container-create.1.txt
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-CREATE(1)
-===================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-create - Create a container
-
-
-SYNOPSIS
---------
-*container create* ['OPTIONS']
-*cnt cr* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The container-create command creates a container based on a script.
-
-
-OPTIONS
--------
-The following container-create 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 creation 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.
-
-
-SCRIPTS
--------
-The following container 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).
-
-*default*::
- Symlink (if existing) to a container 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'.
-
-
-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
-
-*Create example.net container with the default create script and start it:*::
- sudo container create,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 at 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 at 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-enter.1.rst b/share/man/container-enter.1.rst
new file mode 100644
index 0000000..65961f5
--- /dev/null
+++ b/share/man/container-enter.1.rst
@@ -0,0 +1,86 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-enter
+===============
+
+---------------------------
+Enter a container namespace
+---------------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container enter** ['OPTIONS']
+
+Description
+===========
+
+The **container enter** command enters a container namespace.
+
+While 'container console' shows a full login prompt where any valid user and
+password combination can be used, the 'container enter' command bypasses this
+and drops to a root shell.
+
+Options
+=======
+
+The following **container enter** options are available:
+
+-n, --name='NAME':
+ Specify container name.
+
+Examples
+========
+
+Enter to example.net container namespace:
+
+ sudo container enter -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-enter.1.txt b/share/man/container-enter.1.txt
deleted file mode 100644
index 162d510..0000000
--- a/share/man/container-enter.1.txt
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-CONSOLE(1)
-====================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-enter - Enter a container namespace
-
-
-SYNOPSIS
---------
-*container enter* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The container enter enters a container namespace.
-
-While 'container console' shows a full login prompt where any valid user and password combination can be used,
-the 'container enter' command bypasses this and drops to a root shell.
-
-
-OPTIONS
--------
-The following container options are available:
-
-*-n, --name='NAME'*::
- Specify container name.
-
-
-EXAMPLES
---------
-*Enter to example.net container namespace:*::
- sudo container enter -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 at 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 at 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-get-curl.1.rst b/share/man/container-get-curl.1.rst
new file mode 100644
index 0000000..01ae592
--- /dev/null
+++ b/share/man/container-get-curl.1.rst
@@ -0,0 +1,148 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-get-curl
+==================
+
+---------------------------------------------------------------------------
+Download a Debian based container by downloading a tarball over the network
+---------------------------------------------------------------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container get -s curl** ['OPTIONS']
+
+Description
+===========
+
+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
+with three modificiations:
+
+ * hostname is set (container name) in /etc/hostname
+ * systemd machine-id is generated in /etc/machine-id
+ * root password is set (user specified or 16 random characters)
+
+Container images
+----------------
+
+compute-tools will download tarballs from a server expecting that the images are
+tarballs with either gzip, lzip, xz, or no compression. See container-images.sh
+as an example on how to create your own container images.
+
+Options
+=======
+
+The following script options are available:
+
+-n, --name='NAME':
+ Specify container name.
+
+-a, --architecture='ARCHITECTURE':
+ Specify container architecture.
+
+--clean:
+ 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'.
+
+--setup='SETUP':
+ Specify the setup image name to download, defaults to the value specified
+ 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
+ debian-bookworm-current_${ARCHITECTURE}.system.tar.${COMPRESSION} (where
+ ${ARCHITECTURE} is the host systems architecture and ${COMPRESSION} either
+ lz, xz, or gz depending on compressor availability on the host system).
+
+Examples
+========
+
+Download a Debian 12 (bookworm) based container with same architecture as the host
+system:
+
+ sudo container get -s curl -n bookworm.example.net
+
+Download a Debian 12 (bookworm) based container with different architecture as the
+host system:
+
+ sudo container get -s curl -n bookworm-i386.example.net -- --system debian-bookworm-current_i386.system.tar.xz
+
+Files
+=====
+
+The following files are used:
+
+/etc/compute-tools/config:
+ Container configuration files.
+
+/usr/share/compute-tools/get-scripts:
+ Container download scripts.
+
+/usr/share/doc/compute-tools:
+ Container documentation.
+
+/var/lib/machines:
+ Container directory.
+
+/var/cache/container:
+ Container cache directory.
+
+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-get.1.rst b/share/man/container-get.1.rst
new file mode 100644
index 0000000..8ec61de
--- /dev/null
+++ b/share/man/container-get.1.rst
@@ -0,0 +1,130 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-get
+=============
+
+--------------------
+Download a container
+--------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container get** ['OPTIONS']
+| **cnt g** ['OPTIONS']
+
+Description
+===========
+
+The **container get** command downloads a container based on a script.
+
+Scripts
+-------
+
+The following download scripts are available:
+
+curl:
+ Basic script to build Debian based container, see container-create-curl(1).
+
+default:
+ 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_get-script'.
+
+Options
+=======
+
+The following **container get** 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
+========
+
+Create example.net container using curl script:
+
+ sudo container get -n example.net -s curl
+
+Create example.net container with the default download script and start it:
+
+ sudo container get,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-info.1.rst b/share/man/container-info.1.rst
new file mode 100644
index 0000000..99ccb55
--- /dev/null
+++ b/share/man/container-info.1.rst
@@ -0,0 +1,100 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-info
+==============
+
+----------------------------------------
+Show specific information of a container
+----------------------------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container info** ['OPTIONS']
+
+Description
+===========
+
+The **container info** command shows specific information of a container.
+
+Options
+=======
+
+The following **container info** options are available, defaults to '--status
+--os --ip':
+
+-n, --name='NAME':
+ Specify container name. Specifying 'ALL' will start all stopped container.
+
+--status:
+ Show container status (started|stopped|other).
+
+--os:
+ Show container operating system (FIXME: Debian only).
+
+--ip:
+ Show container IP address.
+
+Examples
+========
+
+Show example.net container status:
+
+ sudo container info -n example.net --status
+
+Show example.net container operating system:
+
+ sudo container info -n example.net --os
+
+Show example.net container IP address:
+
+ sudo container info -n example.net --ip
+
+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-key.1.rst b/share/man/container-key.1.rst
new file mode 100644
index 0000000..ff2b93f
--- /dev/null
+++ b/share/man/container-key.1.rst
@@ -0,0 +1,113 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-key
+=============
+
+---------------------------------------------
+Manage GnuPG keyring for container operations
+---------------------------------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container key** ['OPTIONS']
+
+Description
+===========
+
+The **container key** command manages the GnuPG keyring for container
+operations.
+
+Options
+=======
+
+The following **container key** options are available:
+
+-a, --add='KEY_FILE|KEY_ID':
+ Add a key to the keyring.
+
+-l, --list':
+ List keys in the keyring.
+
+-r, --remove='KEY':
+ Remove a key from the keyring.
+
+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:
+
+ sudo container key --add 0x55CF1BF986ABB9C7
+
+Remove a key from the keyring:
+
+ 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
+========
+
+| 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-key.1.txt b/share/man/container-key.1.txt
deleted file mode 100644
index 9463141..0000000
--- a/share/man/container-key.1.txt
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-KEY(1)
-================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-key - Manage GnuPG keyring for container operations
-
-
-SYNOPSIS
---------
-*container key* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The container key manages the GnuPG keyring for container operations.
-
-
-OPTIONS
--------
-The following container options are available:
-
-*-a, --add='KEY'*::
- Add a key to the keyring.
-
-*-l, --list'*::
- List keys in the keyring.
-
-*-r, --remove='KEY'*::
- Remove a key from the keyring.
-
-
-EXAMPLES
---------
-*Add a key to the keyring:*::
- gpg --keyserver hkps://hkps.pool.sks-keyservers.net --recv 0x1E9B3AED2D9FA8F6
- gpg --armor --export 0x1E9B3AED2D9FA8F6 | sudo container key --add -
-
-*Remove a key from the keyring:*::
- sudo container key --remove 0x1E9B3AED2D9FA8F6
-
-
-SEE ALSO
---------
-compute-tools(7),
-container(1).
-
-
-HOMEPAGE
---------
-More information about compute-tools and the Open Infrastructure project can be found on the homepage at 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 at 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-limit.1.rst b/share/man/container-limit.1.rst
new file mode 100644
index 0000000..715314e
--- /dev/null
+++ b/share/man/container-limit.1.rst
@@ -0,0 +1,121 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-limit
+===============
+
+------------------------------
+Limit resources of a container
+------------------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container limit** ['OPTIONS']
+
+Description
+===========
+
+The **container limit** command limits resources available to a container at
+runtime.
+
+Options
+=======
+
+The following **container limit** options are available:
+
+-n, --name='NAME':
+ Specify container name.
+
+--blockio-device-weight='DEVICE WEIGHT':
+ Specify device specific blockio weight, see systemd.resource-control(5).
+
+--blockio-read-bandwidth='DEVICE BYTES':
+ Specify device specific blockio read bandwidth, see
+ systemd.resource-control(5).
+
+-b, --blockio-weight='WEIGHT':
+ Specify general blockio weight, see systemd.resource-control(5).
+
+--blockio-write-bandwidth='DEVICE BYTES':
+ Specify device specific blockio write bandwidth, see
+ systemd.resource-control(5).
+
+-c, --cpu-quota='QUOTA':
+ Specify CPU quota, see systemd.resource-control(5).
+
+--cpu-shares='SHARES':
+ Specify CPU shares, see systemd.resource-control(5).
+
+-m, --memory-limit='BYTES':
+ Specify memory limit, see systemd.resource-control(5).
+
+-t, --tasks-max='NUMBER':
+ Specify tasks max, see systemd.resource-control(5).
+
+Examples
+========
+
+Set blockio weight for the example.net container:
+
+ sudo container limit -n example.net --blockio-weight 100
+
+Set CPU quota for the example.net container:
+
+ sudo container limit -n example.net --cpu-quota 10%
+
+Set memory limit for the example.net container to 1GB:
+
+ sudo container limit -n example.net --memory-limit 1G
+
+Set tasks max for the example.net container to 100:
+
+ sudo container limit -n example.net --tasks-max 100
+
+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-limit.1.txt b/share/man/container-limit.1.txt
deleted file mode 100644
index c5c2408..0000000
--- a/share/man/container-limit.1.txt
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-LIMIT(1)
-==================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-limit - Limit ressources of a container
-
-
-SYNOPSIS
---------
-*container limit* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The container limit command limits ressources available to a container at runtime.
-
-
-OPTIONS
--------
-The following container options are available:
-
-*-n, --name='NAME'*::
- Specify container name.
-
-*--blockio-device-weight='DEVICE WEIGHT'*::
- Specify device specific blockio weight, see systemd.resource-control(5).
-
-*--blockio-read-bandwidth='DEVICE BYTES'*::
- Specify device specific blockio read bandwidth, see systemd.resource-control(5).
-
-*-b, --blockio-weight='WEIGHT'*::
- Specify general blockio weight, see systemd.resource-control(5).
-
-*--blockio-write-bandwidth='DEVICE BYTES'*::
- Specify device specific blockio write bandwidth, see systemd.resource-control(5).
-
-*-c, --cpu-quota='QUOTA'*::
- Specify CPU quota, see systemd.resource-control(5).
-
-*--cpu-shares='SHARES'*::
- Specify CPU shares, see systemd.resource-control(5).
-
-*-m, --memory-limit='BYTES'*::
- Specify memory limit, see systemd.resource-control(5).
-
-*-t, --tasks-max='NUMBER'*::
- Specify tasks max, see systemd.resource-control(5).
-
-
-EXAMPLES
---------
-*Set blockio weight for the example.net container:*::
- sudo container limit -n example.net --blockio-weight 100
-
-*Set CPU quota for the example.net container:*::
- sudo container limit -n example.net --cpu-quota 10%
-
-*Set memory limit for the example.net container to 1GB:*::
- sudo container limit -n example.net --memory-limit 1G
-
-*Set tasks max for the example.net container to 100:*::
- sudo container limit -n example.net --tasks-max 100
-
-
-SEE ALSO
---------
-compute-tools(7),
-container(1).
-
-
-HOMEPAGE
---------
-More information about compute-tools and the Open Infrastructure project can be found on the homepage at 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 at 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-list.1.rst b/share/man/container-list.1.rst
new file mode 100644
index 0000000..81a394b
--- /dev/null
+++ b/share/man/container-list.1.rst
@@ -0,0 +1,145 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-list
+==============
+
+----------------------------
+List container on the system
+----------------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container list** ['OPTIONS']
+| **cnt ls** ['OPTIONS']
+
+Description
+===========
+
+The **container list** command lists container on the system.
+
+Options
+=======
+
+The following **container list** options are available, defaults to '--started
+--stopped':
+
+-a, --all:
+ List all available container (started, stopped, and other).
+
+--csv-separator='SEPARATOR':
+ Specify custom CSV separator, defaults to ','.
+
+-f, --format='FORMAT':
+ Use format to list container. Currently available formats are 'cli' (default),
+ 'csv', 'json', 'nwdiag', 'shell', 'sh', 'yaml', or 'xml'.
+
+-h, --host='HOSTNAME':
+ List only container that are enabled for automatic start on the specified
+ hostname. Defaults to list containers of the local system only. Using 'all'
+ shows all container regardless of any automatic start configuration.
+
+--nwdiag-color='COLOR':
+ Specify custom nwdiag color for the host box, defaults to '#3465a4'.
+
+--nwdiag-label='LABEL':
+ Specify custom nwdiag label for the diagram, defaults to empty.
+
+-o, --other:
+ List only container that are not enable for automatic start on the current
+ system.
+
+-s, --started:
+ List only started container.
+
+-t, --stopped:
+ List only stopped container.
+
+Examples
+========
+
+List all started and stopped containers of the local system:
+
+ sudo container list
+
+List all started and other containers:
+
+ sudo container list -s -o
+
+Create a CSV export of all started and stopped containers:
+
+ sudo container list -f csv
+
+Create a JSON export of all started and stopped containers:
+
+ sudo container list -f json
+
+Create a nwdiag export of all started and stopped containers:
+
+ sudo container list -f nwdiag
+
+Create a SVG image via nwdiag of all started and stopped containers:
+
+ sudo container list -f nwdiag | nwdiag -T svg -o cnt-list.svg -
+
+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:
+
+ sudo container list -f yaml
+
+Create a XML export of all started and stopped containers:
+
+ sudo container list -f xml
+
+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-list.1.txt b/share/man/container-list.1.txt
deleted file mode 100644
index 15a54c2..0000000
--- a/share/man/container-list.1.txt
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-LIST(1)
-=================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-list - List container on the system
-
-
-SYNOPSIS
---------
-*container list* ['OPTIONS']
-*container ls* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The container list command lists container on the system.
-
-
-OPTIONS
--------
-The following container options are available, defaults to *--started --stopped*:
-
-*-a, --all*::
- List all available container (started, stopped, and other).
-
-*--csv-separator='SEPARATOR'*::
- Specify custom CSV separator, defaults to ','.
-
-*-f, --format='FORMAT'*::
- Use format to list container. Currently available formats are 'cli' (default), 'csv', 'json', 'nwdiag', 'shell', 'sh', 'yaml', or 'xml'.
-
-*-h, --host='HOSTNAME'*::
- List only container that are enabled for automatic start on the specified hostname. Defaults to list containers of the local system only. Using 'all' shows all container regardless of any automatic start configuration.
-
-*--nwdiag-color='COLOR'*::
- Specify custom nwdiag color for the host box, defaults to '#3465a4'.
-
-*--nwdiag-label='LABEL'*::
- Specify custom nwdiag label for the diagram, defaults to empty.
-
-*-o, --other*::
- List only container that are not enable for automatic start on the current system.
-
-*-s, --started*::
- List only started container.
-
-*-t, --stopped*::
- List only stopped container.
-
-EXAMPLES
---------
-*List all started and stopped containers of the local system:*::
- sudo container list
-
-*List all started and other containers:*::
- sudo container list -s -o
-
-*Create a CSV export of all started and stopped containers:*::
- sudo container list -f csv
-
-*Create a JSON export of all started and stopped containers:*::
- sudo container list -f json
-
-*Create a nwdiag export of all started and stopped containers:*::
- sudo container list -f nwdiag
-
-*Create a SVG image via nwdiag of all started and stopped containers:*::
- sudo container list -f nwdiag | nwdiag -T svg -o cnt-list.svg -
-
-*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:*::
- sudo container list -f yaml
-
-*Create a XML export of all started and stopped containers:*::
- sudo container list -f xml
-
-
-SEE ALSO
---------
-compute-tools(7),
-container(1).
-
-
-HOMEPAGE
---------
-More information about compute-tools and the Open Infrastructure project can be found on the homepage at 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 at 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-log.1.rst b/share/man/container-log.1.rst
new file mode 100644
index 0000000..5e72184
--- /dev/null
+++ b/share/man/container-log.1.rst
@@ -0,0 +1,101 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-log
+=============
+
+------------------
+Show container log
+------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container log** ['OPTIONS']
+
+Description
+===========
+
+The **container log** command shows the container log.
+
+Options
+=======
+
+The following **container log** options are available:
+
+-d, --date:
+ Show only log entries of the specified date as 'YYYY-MM-DD' or a date range like 'today-7'.
+
+-n, --name:
+ Show only log entries for the specified container.
+
+Examples
+========
+
+Show all log entries:
+
+ sudo container log
+
+Show only log entries of today:
+
+ sudo container log -d today
+
+Show only log entries of yesterday:
+
+ sudo container log -d yesterday
+
+Show all log entries of the example.net container:
+
+ sudo container log -n example.net
+
+Show only log entries of the example.net container of the last 30 days:
+
+ sudo container log -d today-30 -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-log.1.txt b/share/man/container-log.1.txt
deleted file mode 100644
index fa9fe71..0000000
--- a/share/man/container-log.1.txt
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-LOG(1)
-================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-log - Show container log
-
-
-SYNOPSIS
---------
-*container log* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The container log command shows the container log.
-
-
-OPTIONS
--------
-The following container options are available:
-
-*-d, --date*::
- Show only log entries of the specified date as 'YYYY-MM-DD' or a date range like 'today-7'.
-
-*-n, --name*::
- Show only log entries for the specified container.
-
-EXAMPLES
---------
-*Show all log entries:*::
- sudo container log
-
-*Show only log entries of today:*::
- sudo container log -d today
-
-*Show only log entries of yesterday:*::
- sudo container log -d yesterday
-
-*Show all log entries of the example.net container:*::
- sudo container log -n example.net
-
-*Show only log entries of the example.net container of the last 30 days:*::
- sudo container log -d today-30 -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 at 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 at 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-move.1.rst b/share/man/container-move.1.rst
new file mode 100644
index 0000000..ecbea6b
--- /dev/null
+++ b/share/man/container-move.1.rst
@@ -0,0 +1,93 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-move
+==============
+
+------------------
+Rename a container
+------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container move** ['OPTIONS']
+| **cnt mv** ['OPTIONS']
+
+Description
+===========
+
+The **container move** commands renames a container.
+
+Options
+=======
+
+The following **container move** options are available:
+
+-n, --new='NAME':
+ Specify new container name.
+
+-f, --force:
+ Do not prompt before moving.
+
+-o, --old:
+ Specify old container name.
+
+Examples
+========
+
+Rename example.net container to example.org:
+
+ sudo container move -n example.org -o example.net
+
+Rename example.net container to example.org without prompt:
+
+ sudo container move -n example.org -o example.net -f
+
+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-move.1.txt b/share/man/container-move.1.txt
deleted file mode 100644
index fd6b83d..0000000
--- a/share/man/container-move.1.txt
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-REMOVE(1)
-===================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-move - Rename a container
-
-
-SYNOPSIS
---------
-*container move* ['OPTIONS']
-*cnt mv* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The container move commands renames a container.
-
-
-OPTIONS
--------
-The following container options are available:
-
-*-n, --new='NAME'*::
- Specify new container name.
-
-*-f, --force*::
- Do not prompt before moving.
-
-*-o, --old*::
- Specify old container name.
-
-
-EXAMPLES
---------
-*Rename example.net container to example.org:*::
- sudo container move -n example.org -o example.net
-
-*Rename example.net container to example.org without prompt:*::
- sudo container move -n example.org -o example.net -f
-
-
-SEE ALSO
---------
-compute-tools(7),
-container(1).
-
-
-HOMEPAGE
---------
-More information about compute-tools and the Open Infrastructure project can be found on the homepage at 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 at 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-rebuild.1.rst b/share/man/container-rebuild.1.rst
new file mode 100644
index 0000000..345ec01
--- /dev/null
+++ b/share/man/container-rebuild.1.rst
@@ -0,0 +1,93 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-rebuild
+=================
+
+-------------------
+Restart a container
+-------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container rebuild** ['OPTIONS']
+| **cnt rb** ['OPTIONS']
+
+Description
+===========
+
+The **container rebuild** command rebuilds a container by stopping, building, starting an existing container.
+
+Options
+=======
+
+The following **container rebuild** options are available:
+
+-n, --name='NAME':
+ Specify container name. Specifying 'ALL' will rebuild all started container.
+
+-f, --force:
+ Do not fail if container is running.
+
+-v, --verbose:
+ Explain what is being done.
+
+Examples
+========
+
+Rebuild example.net container:
+
+ sudo container rebuild -n example.net
+
+Restart all container:
+
+ sudo container rebuild -n ALL
+
+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-remove.1.rst b/share/man/container-remove.1.rst
new file mode 100644
index 0000000..00f1ad1
--- /dev/null
+++ b/share/man/container-remove.1.rst
@@ -0,0 +1,104 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-remove
+================
+
+------------------
+Remove a container
+------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container remove** ['OPTIONS']
+| **cnt rm** ['OPTIONS']
+
+Description
+===========
+
+The **container remove** command removes a container.
+
+Options
+=======
+
+The following **container remove** options are available:
+
+-n, --name='NAME':
+ Specify container name. Specifying 'ALL' will remove all stopped container.
+
+--allow-stop:
+ Stop container prior removal.
+
+-f, --force:
+ Do not prompt before removal.
+
+-v, --verbose:
+ Explain what is being done.
+
+Examples
+========
+
+Remove example.net container from the system:
+
+ sudo container remove -n example.net
+
+Remove example.net container from the system without prompt:
+
+ sudo container remove -n example.net -f
+
+Remove a running container from the system, without prompt:
+
+ sudo container remove -n example.net -f --allow-stop
+
+Remove all container:
+
+ sudo container remove -n ALL
+
+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-remove.1.txt b/share/man/container-remove.1.txt
deleted file mode 100644
index afe8d03..0000000
--- a/share/man/container-remove.1.txt
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-REMOVE(1)
-===================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-remove - Remove a container
-
-
-SYNOPSIS
---------
-*container remove* ['OPTIONS']
-*cnt rm* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The container remove command removes a container.
-
-
-OPTIONS
--------
-The following container options are available:
-
-*-n, --name='NAME'*::
- Specify container name. Specifying 'ALL' will remove all stopped container.
-
-*--allow-stop*::
- Stop container prior removal.
-
-*-f, --force*::
- Do not prompt before removal.
-
-*-v, --verbose*::
- Explain what is being done.
-
-
-EXAMPLES
---------
-*Remove example.net container from the system:*::
- sudo container remove -n example.net
-
-*Remove example.net container from the system without prompt:*::
- sudo container remove -n example.net -f
-
-*Remove a running container from the system, without prompt:*::
- sudo container remove -n example.net -f --allow-stop
-
-*Remove all container:*::
- sudo container remove -n ALL
-
-
-SEE ALSO
---------
-compute-tools(7),
-container(1).
-
-
-HOMEPAGE
---------
-More information about compute-tools and the Open Infrastructure project can be found on the homepage at 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 at 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-restart.1.rst b/share/man/container-restart.1.rst
new file mode 100644
index 0000000..c52353d
--- /dev/null
+++ b/share/man/container-restart.1.rst
@@ -0,0 +1,96 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-restart
+=================
+
+-------------------
+Restart a container
+-------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container restart** ['OPTIONS']
+| **cnt rs** ['OPTIONS']
+
+Description
+===========
+
+The **container restart** command restarts a container.
+
+Options
+=======
+
+The following **container restart** options are available:
+
+-n, --name='NAME':
+ Specify container name. Specifying 'ALL' will restart all started container.
+
+-f, --force:
+ Do not prompt before every restarting.
+
+-i, --interactive:
+ Prompt before every restarting (default).
+
+-v, --verbose:
+ Explain what is being done.
+
+Examples
+========
+
+Restart example.net container:
+
+ sudo container restart -n example.net
+
+Restart all container:
+
+ sudo container restart -n ALL
+
+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-restart.1.txt b/share/man/container-restart.1.txt
deleted file mode 100644
index b0d66e2..0000000
--- a/share/man/container-restart.1.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-RESTART(1)
-====================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-restart - Restart a container
-
-
-SYNOPSIS
---------
-*container restart* ['OPTIONS']
-*cnt rs* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The container restart command restarts a container.
-
-
-OPTIONS
--------
-The following container options are available:
-
-*-n, --name='NAME'*::
- Specify container name. Specifying 'ALL' will restart all started container.
-
-
-EXAMPLES
---------
-*Restart example.net container:*::
- sudo container restart -n example.net
-
-*Restart all container:*::
- sudo container restart -n ALL
-
-
-SEE ALSO
---------
-compute-tools(7),
-container(1).
-
-
-HOMEPAGE
---------
-More information about compute-tools and the Open Infrastructure project can be found on the homepage at 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 at 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-run.1.rst b/share/man/container-run.1.rst
new file mode 100644
index 0000000..0fb923d
--- /dev/null
+++ b/share/man/container-run.1.rst
@@ -0,0 +1,88 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-run
+=============
+
+-----------------------------------------
+Execute commands in a container namespace
+-----------------------------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container run** ['OPTIONS'] -- 'COMMAND'\|"COMMANDS"
+| **cnt r** ['OPTIONS'] -- 'COMMAND'\|"COMMANDS"
+
+Description
+===========
+
+The **container run** command executes arbitrary commands as root in a container
+namespace.
+
+Options
+=======
+
+The following **container run** options are available:
+
+-n, --name='NAME':
+ Specify container name. Specifying 'ALL' will start all stopped container.
+
+Examples
+========
+
+Run 'hostname' in example.net container:
+
+ sudo container run -n example.net -- hostname
+
+Create and delete a file in example.net container:
+
+ sudo container run -n example.net -- 'touch /tmp/foo && rm -f /tmp/foo'
+
+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-shell.1.rst b/share/man/container-shell.1.rst
new file mode 100644
index 0000000..b12958f
--- /dev/null
+++ b/share/man/container-shell.1.rst
@@ -0,0 +1,141 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-shell
+===============
+
+----------------------------------------
+Manage systemd-nspawn containers (shell)
+----------------------------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container-shell** ['OPTIONS']
+| **cntsh** ['OPTIONS']
+
+Description
+===========
+
+compute-tools provides the system integration for managing containers using
+systemd-nspawn.
+
+Usage
+-----
+
+Although the **container-shell** can be started from a running system like any
+other program, the main intend is to use the **container-shell** via SSH. That
+way otherwise unprivileged users have possibility to manage containers without
+needing a regular shell login on the container server.
+
+For usage over SSH a unprivileged user should be created:
+
+|
+| sudo adduser --gecos "compute-tools,,," \\
+| --home /var/lib/open-infrastructure/container-shell \\
+| --shell /usr/bin/container-shell
+
+The container-shell can then be allowed for specific SSH keys via
+/var/lib/compute-tools/container-shell/.ssh/authorized_keys like so:
+
+|
+| command="/usr/bin/container-shell",no-port-forwarding,no-X11-forwarding,\\
+| no-agent-forwarding,no-pty ssh-ed25519 [...]
+
+Restricted shell
+----------------
+
+The container-shell by default grants any user that has access to it to use all available container commands.
+
+Through two corresponding environment variables users can be allowed or disallowed to use specific container commands.
+In connection with SSH this makes it possible to grant certain SSH keys (and by that, users) privileges to operate container
+servers without having to give them root access, a login shell at all and prevents them from doing things they are not trusted to do.
+
+Example (blacklisting)
+^^^^^^^^^^^^^^^^^^^^^^
+
+In order to allow all commands except for removing and stopping containers, the
+following variable can be used:
+
+|
+| command="CONTAINER_COMMANDS_DISABLE='remove stop' \\
+| /usr/bin/container-shell",no-port-forwarding,no-X11-forwarding,\\
+| no-agent-forwarding,no-pty ssh-ed25519 [...]
+
+Example (whitelisting)
+^^^^^^^^^^^^^^^^^^^^^^
+
+The other way around works too. To disallow all commands except for listing
+containers and showing the compute-tools version, the following variable can be
+used:
+
+|
+| command="CONTAINER_COMMANDS_ENABLE='list version' \\
+| /usr/bin/container-shell",no-port-forwarding,no-X11-forwarding,\\
+| no-agent-forwarding,no-pty ssh-ed25519 [...]
+
+Commands
+========
+
+All container commands are available, see container(1). Additionally, the
+following commands are specific to container-shell:
+
+about:
+ Shows introduction (manpage).
+
+help:
+ Shows available commands within the container-shell.
+
+help COMMAND:
+ Shows help (manpage) for a specific container command.
+
+logout, exit:
+ Exits container-shell.
+
+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-shell.1.txt b/share/man/container-shell.1.txt
deleted file mode 100644
index cd19c69..0000000
--- a/share/man/container-shell.1.txt
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER(1)
-============
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-shell - Manage systemd-nspawn containers (shell)
-
-
-SYNOPSIS
---------
-*container-shell*
-
-
-DESCRIPTION
------------
-compute-tools provides the system integration for managing containers using systemd-nspawn.
-
-
-COMMANDS
---------
-All container commands are available, see container(1). Additionally, the following commands are specific to container-shell:
-
-*about:*::
- shows introduction (manpage).
-
-*help:*::
- shows available commands within the container-shell.
-
-*help COMMAND:*::
- shows help (manpage) for a specific container command.
-
-*logout*, *exit:*::
- exits container-shell.
-
-USAGE
------
-Although the container-shell can be started from a running system like any other program, the main intend is to use the
-container-shell via SSH. That way otherwise unprivileged users have possibility to manage containers without
-needing a regular shell login on the container server.
-
-For usage over SSH a unprivileged user should be created:
-
- sudo adduser --gecos "compute-tools,,," \
- --home /var/lib/open-infrastructure/container-shell \
- --shell /usr/bin/container-shell
-
-The container-shell can then be allowed for specific SSH keys via /var/lib/open-infrastructure/container-shell/.ssh/authorized_keys like so:
-
- command="/usr/bin/container-shell",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-ed25519 [...]
-
-
-RESTRICTED SHELL
-----------------
-The container-shell by default grants any user that has access to it to use all available container commands.
-
-Through two corresponding environment variables users can be allowed or disallowed to use specific container commands.
-In connection with SSH this makes it possible to grant certain SSH keys (and by that, users) privileges to operate container
-servers without having to give them root access, a login shell at all and prevents them from doing things they are not trusted to do.
-
-Example (blacklisting): In order to allow all commands except for removing and stopping containers, the following variable can be used:
-
- command="CONTAINER_COMMANDS_DISABLE='remove stop' /usr/bin/container-shell",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa [...]
-
-Example (whitelisting): The other way around works too. To disallow all commands except for listing containers and showing the compute-tools version, the following variable can be used:
-
- command="CONTAINER_COMMANDS_ENABLE='list version' /usr/bin/container-shell",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa [...]
-
-
-SEE ALSO
---------
-machinectl(1),
-systemd-nspawn(1).
-
-
-HOMEPAGE
---------
-More information about compute-tools and the Open Infrastructure project can be found on the homepage at 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 at 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-start.1.rst b/share/man/container-start.1.rst
new file mode 100644
index 0000000..65d4af7
--- /dev/null
+++ b/share/man/container-start.1.rst
@@ -0,0 +1,93 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-start
+===============
+
+-----------------
+Start a container
+-----------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container start** ['OPTIONS']
+| **cnt s** ['OPTIONS']
+
+Description
+===========
+
+The **container start** command starts a container.
+
+Options
+=======
+
+The following **container start** options are available:
+
+-n, --name='NAME':
+ Specify container name. Specifying 'ALL' will start all stopped container.
+
+-f, --force':
+ Removing stray lock file if existing.
+
+-v, --verbose:
+ Explain what is being done.
+
+Examples
+========
+
+Start example.net container:
+
+ sudo container start -n example.net
+
+Start all container:
+
+ sudo container start -n ALL
+
+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-start.1.txt b/share/man/container-start.1.txt
deleted file mode 100644
index e6c874e..0000000
--- a/share/man/container-start.1.txt
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-START(1)
-==================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-start - Start a container
-
-
-SYNOPSIS
---------
-*container start* ['OPTIONS']
-*cnt s* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The container start command starts a container.
-
-
-OPTIONS
--------
-The following container options are available:
-
-*-n, --name='NAME'*::
- Specify container name. Specifying 'ALL' will start all stopped container.
-
-*-f, --force'*::
- Removing stray lock file if existing.
-
-*-v, --verbose*::
- Explain what is being done.
-
-
-EXAMPLES
---------
-*Start example.net container:*::
- sudo container start -n example.net
-
-*Start all container:*::
- sudo container start -n ALL
-
-
-SEE ALSO
---------
-compute-tools(7),
-container(1).
-
-
-HOMEPAGE
---------
-More information about compute-tools and the Open Infrastructure project can be found on the homepage at 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 at 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-status.1.rst b/share/man/container-status.1.rst
new file mode 100644
index 0000000..ad51ba7
--- /dev/null
+++ b/share/man/container-status.1.rst
@@ -0,0 +1,83 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-status
+================
+
+---------------------
+Show container status
+---------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container status** ['OPTIONS']
+| **cnt st** ['OPTIONS']
+
+Description
+===========
+
+The **container status** command displays the status of a container.
+
+Options
+=======
+
+The following **container status** options are available:
+
+-n, --name='NAME':
+ Specify container name.
+
+Examples
+========
+
+show status of example.net container:
+
+ sudo container status -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-status.1.txt b/share/man/container-status.1.txt
deleted file mode 100644
index 86820df..0000000
--- a/share/man/container-status.1.txt
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (C) 2016 Simon Spöehel <simon.spoehel@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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-STATUS(1)
-===================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-status - Show container status
-
-
-SYNOPSIS
---------
-*container status* ['OPTIONS']
-*cnt st* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The container-status command displays the status of a container.
-
-
-OPTIONS
--------
-The following container-status options are available:
-
-*-n, --name='NAME'*::
- Specify container name.
-
-
-EXAMPLES
---------
-*show status of example.net container:*::
- sudo container status -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 at 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 at 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-stop.1.rst b/share/man/container-stop.1.rst
new file mode 100644
index 0000000..bf668be
--- /dev/null
+++ b/share/man/container-stop.1.rst
@@ -0,0 +1,108 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-stop
+==============
+
+----------------
+Stop a container
+----------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container stop** ['OPTIONS']
+| **cnt t** ['OPTIONS']
+
+Description
+===========
+
+The **container stop** command stops a container by running the proper shutdown
+sequence.
+
+Options
+=======
+
+The following **container stop** options are available:
+
+-n, --name='NAME':
+ Specify container name. Specifying 'ALL' will stop all started container.
+
+-f, --force:
+ Do not prompt before every stopping.
+
+-i, --interactive:
+ Prompt before every stopping (default).
+
+-k, --kill:
+ Instead of running the proper shutdown sequence, terminate all processes of the container imediatly.
+
+-v, --verbose:
+ Explain what is being done.
+
+Examples
+========
+
+Shutdown example.net container:
+
+ sudo container stop -n example.net
+
+Shutdown example.net container without prompting:
+
+ sudo container stop -n example.net -f
+
+Immediately stop example.net container:
+
+ sudo container stop -n example.net -k
+
+Stop all container:
+
+ sudo container stop -n ALL
+
+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-stop.1.txt b/share/man/container-stop.1.txt
deleted file mode 100644
index 4450ba3..0000000
--- a/share/man/container-stop.1.txt
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-STOP(1)
-=================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-stop - Stop a container
-
-
-SYNOPSIS
---------
-*container stop* ['OPTIONS']
-*cnt t* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The container stop command stops a container by running the proper shutdown sequence.
-
-
-OPTIONS
--------
-The following container options are available:
-
-*-n, --name='NAME'*::
- Specify container name. Specifying 'ALL' will stop all started container.
-
-*-f, --force*::
- Instead of running the proper shutdown sequence, terminate all processes of the container imediatly.
-
-
-EXAMPLES
---------
-*Shutdown example.net container:*::
- sudo container stop -n example.net
-
-*Immediately stop example.net container:*::
- sudo container stop -n example.net -f
-
-*Stop all container:*::
- sudo container stop -n ALL
-
-
-SEE ALSO
---------
-compute-tools(7),
-container(1).
-
-
-HOMEPAGE
---------
-More information about compute-tools and the Open Infrastructure project can be found on the homepage at 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 at 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-top.1.rst b/share/man/container-top.1.rst
new file mode 100644
index 0000000..85b3627
--- /dev/null
+++ b/share/man/container-top.1.rst
@@ -0,0 +1,81 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-top
+=============
+
+------------------------------------
+Dynamic list container on the system
+------------------------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container top** ['OPTIONS']
+
+Description
+===========
+
+The **container top** command dynamically lists container on the system.
+
+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'.
+
+Examples
+========
+
+Dynamically list containers of the local system:
+ sudo container top
+
+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-top.1.txt b/share/man/container-top.1.txt
deleted file mode 100644
index 4f41b79..0000000
--- a/share/man/container-top.1.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-TOP(1)
-================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-top - Dynamic list container on the system
-
-
-SYNOPSIS
---------
-*container top* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The container top command dynamically lists container on the system.
-
-
-OPTIONS
--------
-The following container options are available, defaults to *--delay 1*:
-
-*-d, --delay='SECONDS[.TENTHS]'*::
- Specifies the delay between screen updates, defaults to 1.
-
-
-EXAMPLES
---------
-*Dynamically list containers of the local system:*::
- sudo container top
-
-
-SEE ALSO
---------
-compute-tools(7),
-container(1).
-
-
-HOMEPAGE
---------
-More information about compute-tools and the Open Infrastructure project can be found on the homepage at 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 at 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-update.1.rst b/share/man/container-update.1.rst
new file mode 100644
index 0000000..ec64f6b
--- /dev/null
+++ b/share/man/container-update.1.rst
@@ -0,0 +1,114 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-update
+================
+
+--------------------------------------------
+Update the packages installed in a container
+--------------------------------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container update** ['OPTIONS']
+| **cnt u** ['OPTIONS']
+
+Description
+===========
+
+The **container update** command updates packages installed in a container.
+
+Options
+=======
+
+The following **container update** options are available:
+
+-n, --name='NAME':
+ Specify container name. Specifying 'ALL' will start all stopped container.
+
+-f, --full-upgrade:
+ Runs an additional 'apt full-upgrade' after 'apt upgrade'.
+
+-i, --interactive:
+ Prompt before every container update.
+
+-r, --autoremove:
+ Runs an additional 'apt autoremove' after 'apt upgrade'.
+
+-p, --purge:
+ Passing '--purge' to 'apt autoremove'.
+
+-y|--yes:
+ Passing 'yes' to all questions asked by the package manager.
+
+Examples
+========
+
+Update example.net container (apt update && apt upgrade):
+
+ sudo container update -n example.net
+
+Update example.net container without asking questions (apt update && apt --yes
+upgrade):
+
+ sudo container update -n example.net -y
+
+Full update of example.net container without asking questions (apt update &&
+apt --yes upgrade && apt --yes full-upgrade):
+
+ sudo container update -n example.net -f -y
+
+Full update of all container on the host, with asking questions and
+purging unused packages (apt update && apt upgrade && apt full-upgrade && apt
+autoremove):
+
+ sudo container update -n ALL -f -r -p -y
+
+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-version.1.rst b/share/man/container-version.1.rst
new file mode 100644
index 0000000..3f0266d
--- /dev/null
+++ b/share/man/container-version.1.rst
@@ -0,0 +1,79 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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-version
+=================
+
+----------------------
+Show container version
+----------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container version** ['OPTIONS']
+
+Description
+===========
+
+The **container version** command shows the container version number.
+
+Options
+=======
+
+The **container version** command has no options.
+
+Examples
+========
+
+Show container version:
+
+ container version
+
+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-version.1.txt b/share/man/container-version.1.txt
deleted file mode 100644
index 498d842..0000000
--- a/share/man/container-version.1.txt
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER-VERSION(1)
-====================
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container-version - Show container version
-
-
-SYNOPSIS
---------
-*container version* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The container version command shows the container version number.
-
-
-OPTIONS
--------
-This command has no options.
-
-
-EXAMPLES
---------
-*Show container version:*::
- container version
-
-
-SEE ALSO
---------
-compute-tools(7),
-container(1).
-
-
-HOMEPAGE
---------
-More information about compute-tools and the Open Infrastructure project can be found on the homepage at 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 at 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.1.rst b/share/man/container.1.rst
new file mode 100644
index 0000000..c08cbd9
--- /dev/null
+++ b/share/man/container.1.rst
@@ -0,0 +1,171 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 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
+=========
+
+--------------------------------
+Manage systemd-nspawn containers
+--------------------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container** 'COMMAND' ['OPTIONS']
+| **container** 'COMMAND1','COMMAND2',... 'COMMANDn'
+
+Description
+===========
+
+compute-tools provides the system integration for managing containers using
+systemd-nspawn.
+
+Options
+=======
+
+The following **container** common options are available:
+
+-n, --name='NAME':
+ Specify container name.
+
+Commands
+========
+
+The following **container** commands are available:
+
+build:
+ Build a new container, see container-build(1).
+
+start:
+ Start a container, see container-start(1).
+
+rebuild:
+ Rebuild a container, see container-rebuild(1).
+
+restart:
+ Restart a container, see container-restart(1).
+
+stop:
+ Stop a container, see container-stop(1).
+
+remove:
+ Remove a container, see container-remove(1).
+
+move:
+ Rename a container, see container-move(1).
+
+console:
+ Attach console to a container, see container-console(1).
+
+enter:
+ Enter a container namespace, see container-enter(1).
+
+run:
+ Execute commands in a container namespace, see container-run(1).
+
+info:
+ Show specific information of a container, see container-info(1).
+
+key:
+ Manage GnuPG keyring for container operations, see container-key(1).
+
+limit:
+ Limit resources of a container, see container-limit(1).
+
+list:
+ List container on the system, see container-list(1).
+
+log:
+ Show container log, see container-log(1).
+
+status:
+ Show container status, see container-status(1).
+
+top:
+ Dynamic list of container on the system, see container-top(1).
+
+update:
+ Update the packages installed in a container.
+
+version:
+ Show container version, see container-version(1).
+
+Files
+=====
+
+The following files are used:
+
+/etc/compute-tools/container.conf, /etc/compute-tools/container.conf.d/\*.conf:
+ Container configuration files.
+
+/usr/bin/container, /usr/bin/cnt:
+ Container program.
+
+/usr/bin/container-shell, /usr/bin/cntsh:
+ Container shell program.
+
+/usr/libexec/container:
+ Container commands.
+
+/usr/share/compute-tools/:
+ Container shared data.
+
+/usr/share/doc/compute-tools:
+ Container documentation files.
+
+/var/cache/container:
+ Container cache directory.
+
+/var/lib/machines:
+ Container root directory.
+
+/var/log/compute-tools:
+ Container log files.
+
+See also
+========
+
+| machinectl(1),
+| systemd-nspawn(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.1.txt b/share/man/container.1.txt
deleted file mode 100644
index 02cdc64..0000000
--- a/share/man/container.1.txt
+++ /dev/null
@@ -1,153 +0,0 @@
-// Copyright (C) 2014-2020 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 <http://www.gnu.org/licenses/>.
-
-CONTAINER(1)
-============
-:doctype: manpage
-:man manual: Open Infrastructure
-:man source: compute-tools
-:man version: {revnumber}
-
-
-NAME
-----
-container - Manage systemd-nspawn containers
-
-
-SYNOPSIS
---------
-*container* 'COMMAND' ['OPTIONS']
-*container* 'COMMAND1','COMMAND2',... 'COMMANDn'
-
-
-DESCRIPTION
------------
-compute-tools provides the system integration for managing containers using systemd-nspawn.
-
-
-OPTIONS
--------
-The following container common options are available:
-
-*-n, --name='NAME'*::
- Specify container name.
-
-
-COMMANDS
---------
-The following container commands are available:
-
-*create*::
- Create a new container, see container-create(1).
-
-*start*::
- Start a container, see container-start(1).
-
-*restart*::
- Restart a container, see container-restart(1).
-
-*stop*::
- Stop a container, see container-stop(1).
-
-*remove*::
- Remove a container, see container-remove(1).
-
-*move*::
- Rename a container, see container-move(1).
-
-*console*::
- Attach console to a container, see container-console(1).
-
-*enter*::
- Enter a container namespace, see container-enter(1).
-
-*key*::
- Manage GnuPG keyring for container operations, see container-key(1).
-
-*limit*::
- Limit ressources of a container, see container-limit(1).
-
-*list*::
- List container on the system, see container-list(1).
-
-*log*::
- Show container log, see container-log(1).
-
-*status*::
- Show container status, see container-status(1).
-
-*top*::
- Dynamic list of container on the system, see container-top(1).
-
-*version*::
- Show container version, see container-version(1).
-
-
-FILES
------
-The following files are used:
-
-*/etc/open-infrastructure/container*::
- Container configuration files.
-
-*/usr/bin/container*, */usr/bin/cnt*::
- Container program.
-
-*/usr/bin/container-shell*, */usr/bin/cntsh*::
- Container shell program.
-
-*/usr/lib/open-infrastructure/container*::
- Container commands.
-
-*/usr/share/open-infrastructure/container*::
- Container shared data.
-
-*/usr/share/doc/compute-tools*::
- Container documentation files.
-
-*/var/cache/open-infrastructure/container*::
- Container cache directory.
-
-*/var/lib/machines*::
- Container root directory.
-
-*/var/log/open-infrastructure*::
- Container log files.
-
-
-SEE ALSO
---------
-machinectl(1),
-systemd-nspawn(1).
-
-
-HOMEPAGE
---------
-More information about compute-tools and the Open Infrastructure project can be found on the homepage at 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 at https://bugs.debian.org.
-
-
-AUTHORS
--------
-compute-tools were written by Daniel Baumann <daniel.baumann@open-infrastructure.net> and others.
diff --git a/share/man/man.in b/share/man/man.in
new file mode 100644
index 0000000..45a5f40
--- /dev/null
+++ b/share/man/man.in
@@ -0,0 +1,19 @@
+.\" Open Infrastructure: compute-tools
+.\"
+.\" Copyright (C) 2014-2022 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/>.
+.\"
diff --git a/share/needrestart/container-tools.conf b/share/needrestart/container-tools.conf
new file mode 100644
index 0000000..cd1c76b
--- /dev/null
+++ b/share/needrestart/container-tools.conf
@@ -0,0 +1,6 @@
+# Open Infrastructure: compute-tools
+
+$nrconf{blacklist_rc} = [
+ # container-tools
+ qr(^container@(.*).service) => 0,
+];
diff --git a/share/procps/zz-container.conf b/share/procps/zz-container.conf
index c464c42..61c047d 100644
--- a/share/procps/zz-container.conf
+++ b/share/procps/zz-container.conf
@@ -1,3 +1,5 @@
+# Open Infrastructure: compute-tools
+
# The default limits are set to low for running many containers
# and eventually lead to errors like the following on container start:
#
diff --git a/share/sudo/container-shell b/share/sudo/container-shell
index cd3f74d..c4108a6 100644
--- a/share/sudo/container-shell
+++ b/share/sudo/container-shell
@@ -1 +1,3 @@
+# Open Infrastructure: compute-tools
+
container ALL=NOPASSWD: /usr/bin/container
diff --git a/share/systemd/container-auto.service b/share/systemd/container-auto.service
index 4d7e10e..50f8ac6 100644
--- a/share/systemd/container-auto.service
+++ b/share/systemd/container-auto.service
@@ -1,3 +1,5 @@
+# Open Infrastructure: compute-tools
+
[Unit]
Description=compute-tools automatic start and stop
Documentation=man:container-auto
@@ -9,8 +11,8 @@ RemainAfterExit=yes
ExecStart=/usr/bin/container auto --start
ExecStop=/usr/bin/container auto --stop
Delegate=yes
-StandardOutput=syslog
-StandardError=syslog
+StandardOutput=journal
+StandardError=journal
[Install]
WantedBy=multi-user.target
diff --git a/share/systemd/container@.service b/share/systemd/container@.service
index 9e9f720..4bd7be5 100644
--- a/share/systemd/container@.service
+++ b/share/systemd/container@.service
@@ -1,9 +1,12 @@
+# Open Infrastructure: compute-tools
+
[Unit]
Description="Container: %i"
Documentation=man:compute-tools
[Service]
Type=simple
+Environment=TERM=xterm-256color
ExecStart=/usr/bin/container start --name %i --nspawn --no-notification
ExecStartPost=/usr/bin/container start --name %i --start --no-notification
ExecStopPost=/usr/bin/container stop -n %i --clean --no-notification