Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package toolbox for openSUSE:Factory checked 
in at 2021-02-07 15:16:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/toolbox (Old)
 and      /work/SRC/openSUSE:Factory/.toolbox.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "toolbox"

Sun Feb  7 15:16:43 2021 rev:10 rq:868896 version:2.1+git20210203.a669e3a

Changes:
--------
--- /work/SRC/openSUSE:Factory/toolbox/toolbox.changes  2021-02-01 
13:25:03.249808395 +0100
+++ /work/SRC/openSUSE:Factory/.toolbox.new.28504/toolbox.changes       
2021-02-07 15:18:16.933693925 +0100
@@ -1,0 +2,10 @@
+Wed Feb 03 10:33:22 UTC 2021 - ku...@suse.com
+
+- Update to version 2.1+git20210203.a669e3a:
+  * Fix formatting
+  * Enhance alternate UI docu
+  * Ignore podman runlabel error if no RUN label exist
+  * Enhance documentation
+  * Check existence of volume directories (#15)
+
+-------------------------------------------------------------------

Old:
----
  microos-toolbox-2.0+git20210125.50611db.tar.xz

New:
----
  microos-toolbox-2.1+git20210203.a669e3a.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ toolbox.spec ++++++
--- /var/tmp/diff_new_pack.GG5jnU/_old  2021-02-07 15:18:17.529694918 +0100
+++ /var/tmp/diff_new_pack.GG5jnU/_new  2021-02-07 15:18:17.533694925 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           toolbox
-Version:        2.0+git20210125.50611db
+Version:        2.1+git20210203.a669e3a
 Release:        0
 Summary:        Script to start a toolbox container for system debugging
 License:        Apache-2.0

++++++ _service ++++++
--- /var/tmp/diff_new_pack.GG5jnU/_old  2021-02-07 15:18:17.573694992 +0100
+++ /var/tmp/diff_new_pack.GG5jnU/_new  2021-02-07 15:18:17.573694992 +0100
@@ -1,8 +1,8 @@
 <services>
   <service name="tar_scm" mode="disabled">
-    <param name="version">2.0</param>
-    <param name="versionformat">2.0+git%cd.%h</param>
-    <param name="url">git://github.com/thkukuk/microos-toolbox.git</param>
+    <param name="version">2.1</param>
+    <param name="versionformat">2.1+git%cd.%h</param>
+    <param 
name="url">git://github.com/kubic-project/microos-toolbox.git</param>
     <param name="scm">git</param>
     <param name="changesgenerate">enable</param>
   </service>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.GG5jnU/_old  2021-02-07 15:18:17.605695045 +0100
+++ /var/tmp/diff_new_pack.GG5jnU/_new  2021-02-07 15:18:17.605695045 +0100
@@ -1,6 +1,6 @@
 <servicedata>
   <service name="tar_scm">
-    <param name="url">git://github.com/thkukuk/microos-toolbox.git</param>
-    <param 
name="changesrevision">50611dbcda36b1e7da6770ee498bd38bf4ab607a</param>
+    <param 
name="url">git://github.com/kubic-project/microos-toolbox.git</param>
+    <param 
name="changesrevision">e589434b4619773c676c7aef667f69b6d944da6b</param>
  </service>
 </servicedata>
\ No newline at end of file

++++++ microos-toolbox-2.0+git20210125.50611db.tar.xz -> 
microos-toolbox-2.1+git20210203.a669e3a.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/microos-toolbox-2.0+git20210125.50611db/README.md 
new/microos-toolbox-2.1+git20210203.a669e3a/README.md
--- old/microos-toolbox-2.0+git20210125.50611db/README.md       2021-01-25 
11:23:20.000000000 +0100
+++ new/microos-toolbox-2.1+git20210203.a669e3a/README.md       2021-02-03 
11:29:25.000000000 +0100
@@ -32,7 +32,10 @@
 ```
 
 If a config file is found, with `REGISTRY` and `IMAGE` defined, 
`${REGISTRY}/${IMAGE}` is used, overriding the default.
-If `-R` and/or `-I` (or `-i`) is/are used they override both the defaults and 
the content of `REGISTRY` and/or `IMAGE` from the config file.
+If `-R` and/or `-I` (or `-i`) is/are used they override both the defaults and
+the content of `REGISTRY` and/or `IMAGE` from the config file. If an alternate
+image is used, the `REGISTRY` and/or `IMAGE` needs to be specified with every
+`toolbox` call.
 
 ### Configuration files
 
@@ -51,6 +54,7 @@
 * `enter`: Enter a toolbox (creating it, if it does not exist, in our case)
 * `run`: Run a command / start a program inside a toolbox
 * `list`: Show existing toolboxes, although for now it is basically an alias 
to `podman ps -a`
+This commands imply user mode (-u) and uses a different container 
(`toolbox-<user>-user` vs. `toolbox-<user>`).
 
 ### Rootless Usage
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/microos-toolbox-2.0+git20210125.50611db/toolbox 
new/microos-toolbox-2.1+git20210203.a669e3a/toolbox
--- old/microos-toolbox-2.0+git20210125.50611db/toolbox 2021-01-25 
11:23:20.000000000 +0100
+++ new/microos-toolbox-2.1+git20210203.a669e3a/toolbox 2021-02-03 
11:29:25.000000000 +0100
@@ -66,7 +66,8 @@
     fi
 
     local msg="creat"
-    local runlabel=$(image_runlabel)
+    local runlabel
+    runlabel=$(image_runlabel) ||:
     if ! container_exists; then
         echo "Spawning a container '$TOOLBOX_NAME' with image '$TOOLBOX_IMAGE'"
         if [[ -z "$runlabel" ]]; then
@@ -77,14 +78,15 @@
             return
         fi
        # We want to do the user setup only when the container is created for 
the first time
-       [[ ! -z ${CREATE_AS_USER} ]] && SETUP_USER=true
+       [[ -n "${CREATE_AS_USER}" ]] && SETUP_USER=true
     else
         echo "Container '$TOOLBOX_NAME' already exists. Trying to start..."
         echo "(To remove the container and start with a fresh toolbox, run: 
podman rm '$TOOLBOX_NAME')"
        msg="start"
     fi
 
-    local state=$(container_state)
+    local state
+    state=$(container_state)
     if [[ "$state" == configured ]] || [[ "$state" == exited ]] || [[ "$state" 
== stopped ]]; then
         container_start
     elif [[ "$state" != running ]]; then
@@ -96,8 +98,9 @@
         echo "Setting up user '${USER_NAME}' (with 'sudo' access) inside the 
container..."
         echo "(NOTE that, if 'sudo' and related packages are not present in 
the image already,"
         echo "this may take some time. But this will only happen now that the 
toolbox is being created)"
-        local tmp_user_setup=`mktemp 
${HOME}/.${TOOLBOX_NAME}-user-setup-XXXXXX.sh`
-        cat <<EOF > ${tmp_user_setup}
+        local tmp_user_setup
+        tmp_user_setup=$(mktemp 
"${HOME}/.${TOOLBOX_NAME}-user-setup-XXXXXX.sh")
+        cat <<EOF > "${tmp_user_setup}"
 #!/bin/bash
 groupadd -g ${USER_GID} ${USER_GNAME} &> /dev/null
 useradd -M -N -g ${USER_GNAME} -u ${USER_ID} ${USER_NAME} &> /dev/null
@@ -105,9 +108,9 @@
 echo "%wheel ALL = (root) NOPASSWD:ALL" > /etc/sudoers.d/wheel 2> /dev/null
 usermod -G wheel -a ${USER_NAME} &> /dev/null
 EOF
-        ${SUDO} podman cp ${tmp_user_setup} ${TOOLBOX_NAME}:${tmp_user_setup}
-        ${SUDO} podman exec --user root ${TOOLBOX_NAME} bash ${tmp_user_setup}
-        ${SUDO} podman exec --user root ${TOOLBOX_NAME} rm ${tmp_user_setup}
+        ${SUDO} podman cp "${tmp_user_setup}" 
"${TOOLBOX_NAME}":"${tmp_user_setup}"
+        ${SUDO} podman exec --user root "${TOOLBOX_NAME}" bash 
"${tmp_user_setup}"
+        ${SUDO} podman exec --user root "${TOOLBOX_NAME}" rm 
"${tmp_user_setup}"
     fi
 
     echo "Container ${msg}ed."
@@ -195,7 +198,7 @@
 The toolbox container is a pet container and will be restarted on following 
runs.
 To remove the container and start fresh, do podman rm ${TOOLBOX_NAME}.
 
-Commands are optional. The supported ones are:
+Commands are optional and imply user mode (-u):
  list: List existing toolboxes
  create: Just create the toolbox
  enter: Enter inside a toolbox (if it does not exist, it is created)
@@ -247,7 +250,7 @@
     # even if `-u` is not specified later). This is again for compatibility
     # with https://github.com/containers/toolbox).
     COMMAND=run
-    if [ ! -z $1 ] && is_option $1 ; then
+    if [ -n "$1" ] && is_option $1 ; then
         case $1 in
             create | list | enter | run )
                 MODE="user"
@@ -257,7 +260,7 @@
         esac
     fi
 
-    ARGS=`getopt -o hrut:R:I:c:i: --long 
help,root,user,tag:,reg:,img:,container:,image: -n toolbox -- "$@"`
+    ARGS=$(getopt -o hrut:R:I:c:i: --long 
help,root,user,tag:,reg:,img:,container:,image: -n toolbox -- "$@")
     eval set -- "$ARGS"
     while true; do
         case "$1" in
@@ -275,7 +278,7 @@
                MODE="user"
                 ;;
             -c|--container)
-                if [ ! -z $TAG ]; then
+                if [ -z "$TAG" ]; then
                     echo "ERROR: Don't use both -c and -t!"
                     show_help
                     exit 1
@@ -285,7 +288,7 @@
                 shift 2
                 ;;
             -t|--tag)
-                if [ ! -z $CHANGE_NAME ]; then
+                if [ -n "$CHANGE_NAME" ]; then
                     echo "ERROR: Don't use both -c and -t!"
                     show_help
                     exit 1
@@ -320,28 +323,31 @@
 
     # Let's rebuild the image URI (this means that command
     # line, if present, overrides config file)
-    TOOLBOX_IMAGE=`echo "${REGISTRY}"/"${IMAGE}" | sed 's/^\///g'`
+    TOOLBOX_IMAGE=$(echo "${REGISTRY}"/"${IMAGE}" | sed 's/^\///g')
 
     if [ "$MODE" = "user" ]; then
-        USER_ID=`id -u`; USER_GID=`id -g`
-        USER_NAME=`id -un` ; USER_GNAME=`id -gn`
-        USER_HOME=$HOME
-       if [ -z $CHANGE_NAME ]; then
+        USER_ID=$(id -u); USER_GID=$(id -g)
+        USER_NAME=$(id -un) ; USER_GNAME=$(id -gn)
+       if [ -z "$CHANGE_NAME" ]; then
             TOOLBOX_NAME="${TOOLBOX_NAME}-user"
         fi
 
         # We want to keep the pid namespace of the running user.
         # We, however, use root:root while creating, so that later we
         # can modify the user's name, groups, etc, within the container.
-        CREATE_AS_USER="--pid host --userns=keep-id -v ${HOME}:${HOME} --user 
root:root --volume /run/user/${USER_ID}:/run/user/${USER_ID}:rslave --volume 
/run/media/:/run/media/:rslave --volume /tmp:/tmp:rslave"
+        VOLUMES="--volume /tmp:/tmp:rslave"
+        test -d "${HOME}" && VOLUMES="$VOLUMES --volume ${HOME}:${HOME}"
+        test -d "/run/user/${USER_ID}" && VOLUMES="$VOLUMES --volume 
/run/user/${USER_ID}:/run/user/${USER_ID}:rslave"
+        test -d /run/media && VOLUMES="$VOLUMES --volume 
/run/media/:/run/media/:rslave"
+        CREATE_AS_USER="--pid host --userns=keep-id --user root:root $VOLUMES"
         for ENV in $USER_ENV ; do
             eval VAL="$""$ENV"
-            [[ ! -z $VAL ]] && USER_ENV_STR="$USER_ENV_STR --env $ENV=$VAL"
+            [[ -n "$VAL" ]] && USER_ENV_STR="$USER_ENV_STR --env $ENV=$VAL"
         done
-        EXEC_AS_USER="--user ${USER_ID}:${USER_GID} -w `pwd` $USER_ENV_STR"
+        EXEC_AS_USER="--user ${USER_ID}:${USER_GID} -w $(pwd) $USER_ENV_STR"
     fi
 
-    if [ ! -z $TAG ]; then
+    if [ -n "$TAG" ]; then
         TOOLBOX_NAME="${TOOLBOX_NAME}-$TAG"
     fi
 

++++++ toolboxrc.sle-micro ++++++
--- /var/tmp/diff_new_pack.GG5jnU/_old  2021-02-07 15:18:17.697695198 +0100
+++ /var/tmp/diff_new_pack.GG5jnU/_new  2021-02-07 15:18:17.697695198 +0100
@@ -1,2 +1,2 @@
 REGISTRY=registry.suse.com
-IMAGE=suse/toolbox
+IMAGE=suse/sle-micro/5.0/toolbox

Reply via email to