summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-10-02 21:08:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-10-02 21:08:44 +0000
commit358993337bb49b29f4d0ec097d612525957560ec (patch)
tree84ca1b315ca941e585c3c1d2e331fdc7e99d5d14
parentReleasing debian version 20220721-2. (diff)
downloadopen-infrastructure-compute-tools-358993337bb49b29f4d0ec097d612525957560ec.tar.xz
open-infrastructure-compute-tools-358993337bb49b29f4d0ec097d612525957560ec.zip
Merging upstream version 20221002.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--CHANGELOG.txt12
-rw-r--r--LICENSE.txt8
-rw-r--r--Makefile2
-rw-r--r--VERSION.txt2
-rwxr-xr-xbin/container2
-rwxr-xr-xlibexec/container/restart37
-rwxr-xr-xshare/build-scripts/debconf3
-rwxr-xr-xshare/build-scripts/debootstrap2
-rw-r--r--share/man/container-restart.1.rst6
9 files changed, 62 insertions, 12 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index ac686db..e789f68 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,15 @@
+2022-10-02 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20220721.
+
+ [ 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.
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 bdb8f26..d652f32 100644
--- a/Makefile
+++ b/Makefile
@@ -229,7 +229,7 @@ clean:
rm -f README.txt
distclean: clean
- rm -rf service-tools-$(VERSION)
+ rm -rf $(SOFTWARE)-$(VERSION)
reinstall: uninstall install
diff --git a/VERSION.txt b/VERSION.txt
index ace4919..9bab13a 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-20220721
+20221002
diff --git a/bin/container b/bin/container
index 582fe08..fb52687 100755
--- a/bin/container
+++ b/bin/container
@@ -49,7 +49,7 @@ for COMMAND in $(echo "${COMMANDS}" | sed -e 's|,| |g')
do
if [ ! -e "/usr/libexec/${PROGRAM}/${COMMAND}" ]
then
- echo "'${COMMAND}': no such ${PROGRAM} command, see container(1)." >&2
+ echo "'${COMMAND}': no such ${PROGRAM} command, see ${PROGRAM}(1)." >&2
exit 1
fi
diff --git a/libexec/container/restart b/libexec/container/restart
index fcb28b8..0eb753c 100755
--- a/libexec/container/restart
+++ b/libexec/container/restart
@@ -31,8 +31,8 @@ Parameters ()
{
OPTIONS_ALL=""
- GETOPT_LONGOPTIONS="name:,verbose,"
- GETOPT_OPTIONS="n:,v,"
+ GETOPT_LONGOPTIONS="name:,force,interactive,verbose,"
+ GETOPT_OPTIONS="n:,f,i,v,"
PARAMETERS="$(getopt --longoptions ${GETOPT_LONGOPTIONS} --name=${COMMAND} --options ${GETOPT_OPTIONS} --shell sh -- ${@})"
@@ -52,6 +52,20 @@ Parameters ()
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
@@ -74,7 +88,7 @@ Parameters ()
Usage ()
{
- echo "Usage: ${PROGRAM} ${COMMAND} -n|--name NAME [-v|--verbose]" >&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."
@@ -107,6 +121,23 @@ then
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
diff --git a/share/build-scripts/debconf b/share/build-scripts/debconf
index ac5f9cd..b589fce 100755
--- a/share/build-scripts/debconf
+++ b/share/build-scripts/debconf
@@ -405,7 +405,8 @@ Debootstrap ()
mmdebstrap)
mmdebstrap --arch=${ARCHITECTURE} --components=${PARENT_ARCHIVE_AREAS} \
- --mode=root --include=${INCLUDE} ${PARENT_DISTRIBUTION} "${DIRECTORY}" ${PARENT_MIRROR}
+ --format=directory --mode=root --aptopt='APT::Sandbox::User "root"' \
+ --include=${INCLUDE} ${PARENT_DISTRIBUTION} "${DIRECTORY}" ${PARENT_MIRROR}
;;
*)
diff --git a/share/build-scripts/debootstrap b/share/build-scripts/debootstrap
index 2cfa328..567ee6b 100755
--- a/share/build-scripts/debootstrap
+++ b/share/build-scripts/debootstrap
@@ -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
diff --git a/share/man/container-restart.1.rst b/share/man/container-restart.1.rst
index bb2d4f1..c52353d 100644
--- a/share/man/container-restart.1.rst
+++ b/share/man/container-restart.1.rst
@@ -47,6 +47,12 @@ 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.