diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-04-11 13:52:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-04-11 13:52:42 +0000 |
commit | c759c2b9c54ba0262980214cd3d7cb6566ed7c7b (patch) | |
tree | e54395585d3605a86e91680ea200779058cc10e5 | |
parent | Adding upstream version 20210101. (diff) | |
download | open-infrastructure-compute-tools-c759c2b9c54ba0262980214cd3d7cb6566ed7c7b.tar.xz open-infrastructure-compute-tools-c759c2b9c54ba0262980214cd3d7cb6566ed7c7b.zip |
Adding upstream version 20210411.upstream/20210411
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
61 files changed, 277 insertions, 231 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 171ca3c..e76a584 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,9 +1,45 @@ +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. @@ -13,7 +13,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 +21,20 @@ PROJECT = open-infrastructure SOFTWARE = compute-tools PROGRAM = container -SCRIPTS = bin/* lib/*/* +SCRIPTS = bin/* libexec/*/* 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,7 +45,20 @@ 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/checkbashisms ]; \ + 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 @@ -57,19 +67,19 @@ build: share/man/*.txt sed -n '/^NAME/,$$p' share/man/$(SOFTWARE).7.txt > 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)/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/scripts $(DESTDIR)/usr/share/$(SOFTWARE) mkdir -p $(DESTDIR)/usr/share/bash-completion/completions cp -r share/bash-completion/* $(DESTDIR)/usr/share/bash-completion/completions @@ -102,31 +112,31 @@ 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 debconf $(DESTDIR)/usr/share/$(SOFTWARE)/scripts/debian + ln -sf debconf.d $(DESTDIR)/usr/share/$(SOFTWARE)/scripts/debian.d ln -sf container-create-debconf.1 $(DESTDIR)/usr/share/man/man1/container-create-debian.1 - ln -sf debconf $(DESTDIR)/usr/share/$(PROJECT)/$(PROGRAM)/scripts/progress-linux - ln -sf debconf.d $(DESTDIR)/usr/share/$(PROJECT)/$(PROGRAM)/scripts/progress-linux.d + ln -sf debconf $(DESTDIR)/usr/share/$(SOFTWARE)/scripts/progress-linux + ln -sf debconf.d $(DESTDIR)/usr/share/$(SOFTWARE)/scripts/progress-linux.d ln -sf container-create-debconf.1 $(DESTDIR)/usr/share/man/man1/container-create-progress-linux.1 - ln -sf debootstrap $(DESTDIR)/usr/share/$(PROJECT)/$(PROGRAM)/scripts/mmdebstrap + ln -sf debootstrap $(DESTDIR)/usr/share/$(SOFTWARE)/scripts/mmdebstrap ln -sf container-create-debootstrap.1 $(DESTDIR)/usr/share/man/man1/container-create-mmdebstrap.1 - ln -sf create $(DESTDIR)/usr/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 create $(DESTDIR)/usr/libexec/$(PROGRAM)/cr + 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 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 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 \ @@ -174,11 +184,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 +196,10 @@ 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) || true rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc || true rmdir --ignore-fail-on-non-empty --parents $(DESTDIR) || true diff --git a/VERSION.txt b/VERSION.txt index 71bc3f4..4320a50 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -20210101 +20210411 diff --git a/bin/container b/bin/container index 4570dc3..c3748d9 100755 --- a/bin/container +++ b/bin/container @@ -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}" @@ -44,7 +44,7 @@ OPTIONS="${@}" 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 exit 1 @@ -71,12 +71,12 @@ do HOST="$(hostname -f 2> /dev/null || hostname)" # logfile - echo "${DATE} ${HOST} ${USER} ${PROGRAM} ${COMMAND} ${OPTIONS}" >> "/var/log/${PROJECT}/${PROGRAM}.log" + echo "${DATE} ${HOST} ${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 ] && [ -e "/etc/${SOFTWARE}.conf" ] then - . "/etc/${PROJECT}/${PROGRAM}.conf" + . "/etc/${SOFTWARE}.conf" if [ -n "${IRK_TARGETS}" ] then @@ -91,7 +91,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 016724f..98ece06 100755 --- a/bin/container-shell +++ b/bin/container-shell @@ -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/lib/container/auto b/libexec/container/auto index 6c1d47b..0c9d136 100755 --- a/lib/container/auto +++ b/libexec/container/auto @@ -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 () { diff --git a/lib/container/console b/libexec/container/console index 2dc6546..ce53712 100755 --- a/lib/container/console +++ b/libexec/container/console @@ -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 () diff --git a/lib/container/create b/libexec/container/create index bdf9fb4..418bc35 100755 --- a/lib/container/create +++ b/libexec/container/create @@ -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" 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}/scripts" +CONFIG_TEMPLATE="/usr/share/${SOFTWARE}/config/container.conf.in" Parameters () { diff --git a/lib/container/enter b/libexec/container/enter index fed1193..2664fdc 100755 --- a/lib/container/enter +++ b/libexec/container/enter @@ -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 () diff --git a/lib/container/key b/libexec/container/key index 4cbdaa0..5f76fb2 100755 --- a/lib/container/key +++ b/libexec/container/key @@ -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 () { diff --git a/lib/container/limit b/libexec/container/limit index 99ef03a..6323a42 100755 --- a/lib/container/limit +++ b/libexec/container/limit @@ -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 () diff --git a/lib/container/list b/libexec/container/list index ba794ab..30446c0 100755 --- a/lib/container/list +++ b/libexec/container/list @@ -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)" diff --git a/lib/container/log b/libexec/container/log index a18c421..e514391 100755 --- a/lib/container/log +++ b/libexec/container/log @@ -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 () { @@ -79,6 +81,16 @@ Usage () 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 +153,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 e20d8a8..a76cde1 100755 --- a/lib/container/move +++ b/libexec/container/move @@ -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 () diff --git a/lib/container/remove b/libexec/container/remove index 75ebd60..3205c32 100755 --- a/lib/container/remove +++ b/libexec/container/remove @@ -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 () diff --git a/lib/container/restart b/libexec/container/restart index 3c84f4d..922629d 100755 --- a/lib/container/restart +++ b/libexec/container/restart @@ -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 () diff --git a/lib/container/run b/libexec/container/run index f6323c0..bf8d0a7 100755 --- a/lib/container/run +++ b/libexec/container/run @@ -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 () diff --git a/lib/container/start b/libexec/container/start index 30aee53..089aa7d 100755 --- a/lib/container/start +++ b/libexec/container/start @@ -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" diff --git a/lib/container/status b/libexec/container/status index a4b49e1..9c3a076 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 () diff --git a/lib/container/stop b/libexec/container/stop index 6b8caee..58fc0e9 100755 --- a/lib/container/stop +++ b/libexec/container/stop @@ -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" diff --git a/lib/container/top b/libexec/container/top index d9baa1c..c846000 100755 --- a/lib/container/top +++ b/libexec/container/top @@ -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})" diff --git a/lib/container/version b/libexec/container/version index c2b7716..3b33a4d 100755 --- a/lib/container/version +++ b/libexec/container/version @@ -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}" diff --git a/share/bash-completion/container b/share/bash-completion/container index 4e49cec..540f162 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-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net> +# Copyright (C) 2014-2021 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() { @@ -63,13 +62,13 @@ _container() create|cr) 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="$(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/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 ;; @@ -145,13 +144,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 +158,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 @@ -286,7 +285,7 @@ _container() ;; *) - 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/doc/examples/buster.cfg b/share/doc/examples/bullseye.cfg index cfc8595..044504e 100644 --- a/share/doc/examples/buster.cfg +++ b/share/doc/examples/bullseye.cfg @@ -1,4 +1,4 @@ -# example for automated Debian 10 (buster) based container creation +# example for automated Debian 11 (bullseye) based container creation # using: sudo container create -s debian debconf debconf/priority select critical @@ -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 bullseye #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 bullseye-security, bullseye-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 index 7bb40b4..ede68b5 100755 --- a/share/doc/examples/container-images.sh +++ b/share/doc/examples/container-images.sh @@ -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/>. # Description: example for automated Debian base system container image creation # Requires: debootstrap plzip xz-utils diff --git a/share/doc/examples/engywuck-backports.cfg b/share/doc/examples/fuchur-backports.cfg index 9ca0288..20cd127 100644 --- a/share/doc/examples/engywuck-backports.cfg +++ b/share/doc/examples/fuchur-backports.cfg @@ -1,4 +1,4 @@ -# example for automated Progress Linux 5+ (engywuck-backports) container creation +# example for automated Progress Linux 6.99 (fuchur-backports) container creation # using: sudo container create -s progress-linux debconf debconf/priority select critical @@ -9,19 +9,19 @@ 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 fuchur-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 fuchur-security, fuchur-updates, fuchur-extras, fuchur-backports, fuchur-backports-extras #compute-tools container/parent-archives multiselect 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 diff --git a/share/hooks/post-start.chown-nvidia.sh b/share/hooks/post-start.chown-nvidia.sh index e1ab35b..64c02cc 100755 --- a/share/hooks/post-start.chown-nvidia.sh +++ b/share/hooks/post-start.chown-nvidia.sh @@ -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/hooks/pre-create.git-pull.sh b/share/hooks/pre-create.git-pull.sh index 823440f..744f955 100755 --- a/share/hooks/pre-create.git-pull.sh +++ b/share/hooks/pre-create.git-pull.sh @@ -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,9 +31,9 @@ do then echo "Updating ${DIRECTORY}..." - if [ -e "/etc/${PROJECT}/${PROGRAM}.conf" ] + if [ -e "/etc/${SOFTWARE}.conf" ] then - . "/etc/${PROJECT}/${PROGRAM}.conf" + . "/etc/${SOFTWARE}.conf" fi DEBCONF_ID="${DEBCONF_ID:-HEAD}" diff --git a/share/hooks/pre-start.unlink-console.sh b/share/hooks/pre-start.unlink-console.sh index 3133a19..b44491e 100755 --- a/share/hooks/pre-start.unlink-console.sh +++ b/share/hooks/pre-start.unlink-console.sh @@ -15,14 +15,15 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" -CONFIG="/etc/${PROJECT}/${PROGRAM}/config" +CONFIG="/etc/${SOFTWARE}/config" # Run if grep -qs 'bind=.*/dev:/dev;' "${CONFIG}/${NAME}.conf" diff --git a/share/logrotate/container b/share/logrotate/container index 14599be..0722aa5 100644 --- a/share/logrotate/container +++ b/share/logrotate/container @@ -1,4 +1,4 @@ -/var/log/open-infrastructure/container.log { +/var/log/compute-tools/container.log { compress create 0640 root adm dateext diff --git a/share/man/Makefile b/share/man/Makefile index 1500b15..2ef1507 100644 --- a/share/man/Makefile +++ b/share/man/Makefile @@ -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/>. # Depends: asciidoc dblatex docbook-xsl libxml2-utils source-highlight diff --git a/share/man/compute-tools.7.txt b/share/man/compute-tools.7.txt index f8d9c76..e5f2c54 100644 --- a/share/man/compute-tools.7.txt +++ b/share/man/compute-tools.7.txt @@ -13,7 +13,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-TOOLS(7) ================== diff --git a/share/man/container-auto.1.txt b/share/man/container-auto.1.txt index 3ed4c56..ecb84b0 100644 --- a/share/man/container-auto.1.txt +++ b/share/man/container-auto.1.txt @@ -13,7 +13,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-START(1) ================== diff --git a/share/man/container-console.1.txt b/share/man/container-console.1.txt index 8f35a8d..59bb421 100644 --- a/share/man/container-console.1.txt +++ b/share/man/container-console.1.txt @@ -13,7 +13,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-CONSOLE(1) ==================== diff --git a/share/man/container-create-curl.1.txt b/share/man/container-create-curl.1.txt index 1095103..e263092 100644 --- a/share/man/container-create-curl.1.txt +++ b/share/man/container-create-curl.1.txt @@ -13,7 +13,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-CREATE-CURL(1) ======================== @@ -83,10 +83,10 @@ FILES ----- The following files are used: -*/etc/open-infrastructure/container/config*:: +*/etc/compute-tools/config*:: Container configuration files. -*/usr/share/open-infrastructure/container/scripts*:: +*/usr/share/compute-tools/scripts*:: Container creation scripts. */usr/share/doc/compute-tools*:: @@ -95,7 +95,7 @@ The following files are used: */var/lib/machines*:: Container directory. -*/var/cache/open-infrastructure/container*:: +*/var/cache/container*:: Container cache directory. diff --git a/share/man/container-create-debconf.1.txt b/share/man/container-create-debconf.1.txt index f4092a0..a04dfaf 100644 --- a/share/man/container-create-debconf.1.txt +++ b/share/man/container-create-debconf.1.txt @@ -13,7 +13,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-CREATE-DEBOOTSTRAP(1) =============================== @@ -114,10 +114,10 @@ FILES ----- The following files are used: -*/etc/open-infrastructure/container/config*:: +*/etc/compute-tools/config*:: Container configuration files. -*/usr/share/open-infrastructure/container/scripts*:: +*/usr/share/compute-tools/scripts*:: Container creation scripts. */usr/share/doc/compute-tools*:: @@ -126,7 +126,7 @@ The following files are used: */var/lib/machines*:: Container directory. -*/var/cache/open-infrastructure/container*:: +*/var/cache/container*:: Container cache directory. */tmp/compute-tools*:: diff --git a/share/man/container-create-debootstrap.1.txt b/share/man/container-create-debootstrap.1.txt index 60f0a22..37d6414 100644 --- a/share/man/container-create-debootstrap.1.txt +++ b/share/man/container-create-debootstrap.1.txt @@ -13,7 +13,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-CREATE-DEBOOTSTRAP(1) =============================== diff --git a/share/man/container-create.1.txt b/share/man/container-create.1.txt index dcb0df4..c49ac9c 100644 --- a/share/man/container-create.1.txt +++ b/share/man/container-create.1.txt @@ -13,7 +13,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-CREATE(1) =================== diff --git a/share/man/container-enter.1.txt b/share/man/container-enter.1.txt index c8d7f3c..c7adc1e 100644 --- a/share/man/container-enter.1.txt +++ b/share/man/container-enter.1.txt @@ -13,7 +13,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-CONSOLE(1) ==================== diff --git a/share/man/container-key.1.txt b/share/man/container-key.1.txt index 2b54d78..e6c1553 100644 --- a/share/man/container-key.1.txt +++ b/share/man/container-key.1.txt @@ -13,7 +13,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-KEY(1) ================ diff --git a/share/man/container-limit.1.txt b/share/man/container-limit.1.txt index 5f1ca30..12d76cd 100644 --- a/share/man/container-limit.1.txt +++ b/share/man/container-limit.1.txt @@ -13,7 +13,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-LIMIT(1) ================== diff --git a/share/man/container-list.1.txt b/share/man/container-list.1.txt index 4016b87..4b3df3a 100644 --- a/share/man/container-list.1.txt +++ b/share/man/container-list.1.txt @@ -13,7 +13,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-LIST(1) ================= diff --git a/share/man/container-log.1.txt b/share/man/container-log.1.txt index c30b37a..b503d42 100644 --- a/share/man/container-log.1.txt +++ b/share/man/container-log.1.txt @@ -13,7 +13,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-LOG(1) ================ diff --git a/share/man/container-move.1.txt b/share/man/container-move.1.txt index fef0bce..5c9475c 100644 --- a/share/man/container-move.1.txt +++ b/share/man/container-move.1.txt @@ -13,7 +13,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-REMOVE(1) =================== diff --git a/share/man/container-remove.1.txt b/share/man/container-remove.1.txt index 0975168..50ad861 100644 --- a/share/man/container-remove.1.txt +++ b/share/man/container-remove.1.txt @@ -13,7 +13,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-REMOVE(1) =================== diff --git a/share/man/container-restart.1.txt b/share/man/container-restart.1.txt index 2a4dfa8..afc4581 100644 --- a/share/man/container-restart.1.txt +++ b/share/man/container-restart.1.txt @@ -13,7 +13,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-RESTART(1) ==================== diff --git a/share/man/container-run.1.txt b/share/man/container-run.1.txt index b46ebf8..593e1a7 100644 --- a/share/man/container-run.1.txt +++ b/share/man/container-run.1.txt @@ -13,7 +13,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-RUN(1) ================ diff --git a/share/man/container-shell.1.txt b/share/man/container-shell.1.txt index 03f2185..ce5c13c 100644 --- a/share/man/container-shell.1.txt +++ b/share/man/container-shell.1.txt @@ -13,7 +13,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(1) ============ diff --git a/share/man/container-start.1.txt b/share/man/container-start.1.txt index 2b7b919..bc0c946 100644 --- a/share/man/container-start.1.txt +++ b/share/man/container-start.1.txt @@ -13,7 +13,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-START(1) ================== diff --git a/share/man/container-status.1.txt b/share/man/container-status.1.txt index 86820df..e74b8e5 100644 --- a/share/man/container-status.1.txt +++ b/share/man/container-status.1.txt @@ -13,7 +13,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-STATUS(1) =================== diff --git a/share/man/container-stop.1.txt b/share/man/container-stop.1.txt index 9eab1c4..dc36bb9 100644 --- a/share/man/container-stop.1.txt +++ b/share/man/container-stop.1.txt @@ -13,7 +13,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-STOP(1) ================= diff --git a/share/man/container-top.1.txt b/share/man/container-top.1.txt index 367be1b..295f51b 100644 --- a/share/man/container-top.1.txt +++ b/share/man/container-top.1.txt @@ -13,7 +13,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-TOP(1) ================ diff --git a/share/man/container-version.1.txt b/share/man/container-version.1.txt index 6549d02..4f625f8 100644 --- a/share/man/container-version.1.txt +++ b/share/man/container-version.1.txt @@ -13,7 +13,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-VERSION(1) ==================== diff --git a/share/man/container.1.txt b/share/man/container.1.txt index d7ad339..7edc1f4 100644 --- a/share/man/container.1.txt +++ b/share/man/container.1.txt @@ -13,7 +13,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(1) ============ @@ -104,7 +104,7 @@ FILES ----- The following files are used: -*/etc/open-infrastructure/container*:: +*/etc/compute-tools/container*:: Container configuration files. */usr/bin/container*, */usr/bin/cnt*:: @@ -113,22 +113,22 @@ The following files are used: */usr/bin/container-shell*, */usr/bin/cntsh*:: Container shell program. -*/usr/lib/open-infrastructure/container*:: +*/usr/libexec/container*:: Container commands. -*/usr/share/open-infrastructure/container*:: +*/usr/share/compute-tools/*:: Container shared data. */usr/share/doc/compute-tools*:: Container documentation files. -*/var/cache/open-infrastructure/container*:: +*/var/cache/container*:: Container cache directory. */var/lib/machines*:: Container root directory. -*/var/log/open-infrastructure*:: +*/var/log/compute-tools*:: Container log files. diff --git a/share/scripts/curl b/share/scripts/curl index 465ecbe..98c2b82 100755 --- a/share/scripts/curl +++ b/share/scripts/curl @@ -15,19 +15,21 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" SOFTWARE="compute-tools" PROGRAM="container" -SCRIPT="${0}" -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" +CACHE="/var/cache/${PROGRAM}/system" + +SCRIPT="${0}" +export SCRIPT Parameters () { @@ -267,7 +269,7 @@ then Debconf # Run debconf parts - for DEBCONF_SCRIPT in /usr/share/${PROJECT}/${PROGRAM}/scripts/curl.d/* + for DEBCONF_SCRIPT in /usr/share/${SOFTWARE}/scripts/curl.d/* do if [ -x "${DEBCONF_SCRIPT}" ] then diff --git a/share/scripts/curl.d/0001-debconf b/share/scripts/curl.d/0001-debconf index 0910480..083d469 100755 --- a/share/scripts/curl.d/0001-debconf +++ b/share/scripts/curl.d/0001-debconf @@ -15,7 +15,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e diff --git a/share/scripts/debconf b/share/scripts/debconf index 7f2bf3d..1994926 100755 --- a/share/scripts/debconf +++ b/share/scripts/debconf @@ -15,20 +15,21 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" SOFTWARE="compute-tools" PROGRAM="container" -SCRIPT="${0}" -export SCRIPT -CONFIG="/etc/${PROJECT}/${PROGRAM}/config" -HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks" +CONFIG="/etc/${SOFTWARE}/config" +HOOKS="/etc/${SOFTWARE}/hooks" MACHINES="/var/lib/machines" +SCRIPT="${0}" +export SCRIPT + Parameters () { GETOPT_LONGOPTIONS="bind:,bind-ro:,script:,name:,preseed-file:" @@ -448,37 +449,6 @@ EOF rm -f "${DIRECTORY}/etc/mtab" ln -s /proc/self/mounts "${DIRECTORY}/etc/mtab" - # Temporary hack for dpkg - if [ -e "${DIRECTORY}/etc/dpkg/origins/default" ] - then - rm -f "${DIRECTORY}/etc/dpkg/origins/default" - Chroot "${DIRECTORY}" "dpkg-reconfigure base-files" - fi - - # Temporary hack for base-files - for FILE in motd.tail motd profile - do - if [ -e "${DIRECTORY}/usr/share/base-files/${FILE}" ] - then - rm -f "${DIRECTORY}/etc/${FILE}" - cp "${DIRECTORY}/usr/share/base-files/${FILE}" "${DIRECTORY}/etc" - fi - done - - # Temporary hack for readline - if [ -e "${DIRECTORY}/etc/inputrc" ] - then - rm -f "${DIRECTORY}/etc/inputrc" - cp "${DIRECTORY}/usr/share/readline/inputrc" "${DIRECTORY}/etc" - fi - - # Temporary hack for sysvinit - if [ -e "${DIRECTORY}/etc/inittab" ] - then - rm -f "${DIRECTORY}/etc/inittab" - cp "${DIRECTORY}/usr/share/sysvinit/inittab" "${DIRECTORY}/etc/inittab" - fi - # Removing resolv.conf rm -f "${DIRECTORY}/etc/resolv.conf" cp /etc/resolv.conf "${DIRECTORY}/etc" @@ -521,7 +491,7 @@ EOF echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DIST}/updates ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list" ;; - bullseye-security) + ${PARENT_DIST}-security) echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DIST}-security ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list" ;; @@ -674,16 +644,6 @@ EOF done fi - # Temporary hack for base-files (base-files gets upgraded, so run it second time) - for FILE in motd.tail motd profile - do - if [ -e "${DIRECTORY}/usr/share/base-files/${FILE}" ] - then - rm -f "${DIRECTORY}/etc/${FILE}" - cp "${DIRECTORY}/usr/share/base-files/${FILE}" "${DIRECTORY}/etc" - fi - done - if [ -n "${PACKAGES}" ] then Chroot "${DIRECTORY}" "apt --option Dpkg::Options::=--force-confnew --yes install ${PACKAGES}" @@ -1121,7 +1081,7 @@ do done # Run debconf parts -for DEBCONF_SCRIPT in "/usr/share/${PROJECT}/${PROGRAM}/scripts/debconf.d"/* +for DEBCONF_SCRIPT in "/usr/share/${SOFTWARE}/scripts/debconf.d"/* do if [ -x "${DEBCONF_SCRIPT}" ] then @@ -1132,7 +1092,7 @@ done # Read-in configuration from debconf . "${DEBCONF_TMPDIR}/debconf.default" -CACHE="/var/cache/${PROJECT}/${PROGRAM}/${MODE}" +CACHE="/var/cache/${PROGRAM}/${MODE}" SYSTEM="${MACHINES}/${NAME}" ## Generic parts @@ -1145,7 +1105,7 @@ then mv "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}.tmp" "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" fi -Upgrade_system "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" || echo "W: If upgrading the system failed, try removing the cache for your distribution in /var/cache/${PROJECT}/${PROGRAM}" +Upgrade_system "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" || echo "W: If upgrading the system failed, try removing the cache for your distribution in /var/cache/${PROGRAM}" Cleanup_system "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" ## Specific parts diff --git a/share/scripts/debconf.d/0001-preseed-file b/share/scripts/debconf.d/0001-preseed-file index 4fec6b0..d70e4e1 100755 --- a/share/scripts/debconf.d/0001-preseed-file +++ b/share/scripts/debconf.d/0001-preseed-file @@ -15,14 +15,15 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" -CONFIG="/etc/${PROJECT}/${PROGRAM}/debconf" +CONFIG="/etc/${SOFTWARE}/debconf" DEBCONF_NOWARNINGS="true" export DEBCONF_NOWARNINGS @@ -43,7 +44,7 @@ then elif [ "$(ls ${CONFIG}/*/${NAME}.cfg 2>/dev/null | wc -l)" -eq 1 ] then # user did not specify a pressed file, but there is 1 (and only 1) - # matching in a sub-directory of /etc/${PROJECT}/${PROGRAM}/debconf + # matching in a sub-directory of /etc/${SOFTWARE}/debconf FILE="$(ls ${CONFIG}/*/${NAME}.cfg)" diff --git a/share/scripts/debconf.d/0002-preseed-debconf b/share/scripts/debconf.d/0002-preseed-debconf index 9bc9fcf..4bc4da6 100755 --- a/share/scripts/debconf.d/0002-preseed-debconf +++ b/share/scripts/debconf.d/0002-preseed-debconf @@ -15,7 +15,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e diff --git a/share/scripts/debconf.d/0003-debconf b/share/scripts/debconf.d/0003-debconf index dda3821..c1c4e79 100755 --- a/share/scripts/debconf.d/0003-debconf +++ b/share/scripts/debconf.d/0003-debconf @@ -15,7 +15,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e @@ -53,15 +53,15 @@ Distribution () then case "${MODE}" in debian) - db_subst container/distribution CHOICES "Debian GNU/Linux 9 \"stretch\", Debian GNU/Linux 10 \"buster\", Debian GNU/Linux 11 \"bullseye\", Debian GNU/Linux unstable/sid" - db_subst container/distribution CHOICES_C "stretch, buster, bullseye, sid" + db_subst container/distribution CHOICES "Debian GNU/Linux 10 \"buster\", Debian GNU/Linux 11 \"bullseye\", Debian GNU/Linux testing/bookworm, Debian GNU/Linux unstable/sid" + db_subst container/distribution CHOICES_C "buster, bullseye, bookworm, sid" db_set container/distribution bullseye db_fset container/distribution seen false ;; progress-linux) - db_subst container/distribution CHOICES "Progress Linux 5 (engywuck), Progress Linux 5+ (engywuck-backports), Progress Linux 6 (fuchur), Progress Linux 6+ (fuchur-backports)" + db_subst container/distribution CHOICES "Progress Linux 5 (engywuck), Progress Linux 5.99 (engywuck-backports), Progress Linux 6 (fuchur), Progress Linux 6.99 (fuchur-backports)" db_subst container/distribution CHOICES_C "engywuck, engywuck-backports, fuchur, fuchur-backports" db_set container/distribution fuchur-backports @@ -352,7 +352,7 @@ Mirror_security () then case "${MODE}" in debian) - db_set container/mirror-security http://security.debian.org + db_set container/mirror-security https://security.debian.org db_fset container/mirror-security seen false ;; @@ -373,7 +373,7 @@ Mirror_security () then case "${MODE}" in debian) - MIRROR_SECURITY="http://security.debian.org" + MIRROR_SECURITY="https://security.debian.org" ;; *) @@ -445,7 +445,7 @@ Parent_mirror_security () then case "${MODE}" in progress-linux) - db_set container/parent-mirror-security http://security.debian.org + db_set container/parent-mirror-security https://security.debian.org db_fset container/parent-mirror-security seen false db_settitle container/title @@ -466,7 +466,7 @@ Parent_mirror_security () then case "${MODE}" in progress-linux) - PARENT_MIRROR_SECURITY="http://security.debian.org" + PARENT_MIRROR_SECURITY="https://security.debian.org" ;; *) diff --git a/share/scripts/debootstrap b/share/scripts/debootstrap index 98f202b..f0db7e8 100755 --- a/share/scripts/debootstrap +++ b/share/scripts/debootstrap @@ -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 () |