commit opensuse-mariadb-image for openSUSE:Factory

2020-05-28 Thread root
Hello community,

here is the log from the commit of package opensuse-mariadb-image for 
openSUSE:Factory checked in at 2020-05-28 09:15:22

Comparing /work/SRC/openSUSE:Factory/opensuse-mariadb-image (Old)
 and  /work/SRC/openSUSE:Factory/.opensuse-mariadb-image.new.3606 (New)


Package is "opensuse-mariadb-image"

Thu May 28 09:15:22 2020 rev:8 rq:809215 version:1.0.0

Changes:

--- 
/work/SRC/openSUSE:Factory/opensuse-mariadb-image/opensuse-mariadb-image.changes
2020-03-01 21:28:18.164591668 +0100
+++ 
/work/SRC/openSUSE:Factory/.opensuse-mariadb-image.new.3606/opensuse-mariadb-image.changes
  2020-05-28 09:15:49.184751424 +0200
@@ -1,0 +2,5 @@
+Thu May 21 19:29:17 UTC 2020 - Thorsten Kukuk 
+
+- Read secrets before dropping root privileges [bsc#1171893]
+
+---



Other differences:
--
++ entrypoint.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/usr/local/bin/entrypoint.sh 
new/usr/local/bin/entrypoint.sh
--- old/usr/local/bin/entrypoint.sh 2020-02-28 15:44:09.100510713 +0100
+++ new/usr/local/bin/entrypoint.sh 2020-05-21 21:28:50.450875622 +0200
@@ -60,6 +60,17 @@
fi
 }
 
+# Loads various settings that are used elsewhere in the script
+# This should be called after _check_config, but before any other functions
+_setup_env() {
+   # Initialize values that might be stored in a file
+   file_env 'MYSQL_ROOT_HOST' '%'
+   file_env 'MYSQL_DATABASE'
+   file_env 'MYSQL_USER'
+   file_env 'MYSQL_PASSWORD'
+   file_env 'MYSQL_ROOT_PASSWORD'
+}
+
 # Fetch value from server config
 # We use mysqld --verbose --help instead of my_print_defaults because the
 # latter only show values present in config files, and not server defaults
@@ -71,6 +82,8 @@
 # allow the container to be started with `--user`
 if [ "$1" = 'mysqld' -a -z "$wantHelp" -a "$(id -u)" = '0' ]; then
_check_config "$@"
+# Load various environment variables
+   _setup_env "$@"
mkdir -p /run/mysql
chown mysql:mysql /run/mysql
DATADIR="$(_get_config 'datadir' "$@")"
@@ -81,12 +94,11 @@
 
 if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
# still need to check config, container may have started with --user
-   _check_config "$@"
+_check_config "$@"
# Get config
DATADIR="$(_get_config 'datadir' "$@")"
 
if [ ! -d "$DATADIR/mysql" ]; then
-   file_env 'MYSQL_ROOT_PASSWORD'
if [ -z "$MYSQL_ROOT_PASSWORD" -a -z 
"$MYSQL_ALLOW_EMPTY_PASSWORD" -a -z "$MYSQL_RANDOM_ROOT_PASSWORD" ]; then
echo >&2 'error: database is uninitialized and password 
option is not specified '
echo >&2 '  You need to specify one of 
MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD'
@@ -133,7 +145,6 @@
 
rootCreate=
# default root to listen for connections from anywhere
-   file_env 'MYSQL_ROOT_HOST' '%'
if [ ! -z "$MYSQL_ROOT_HOST" -a "$MYSQL_ROOT_HOST" != 
'localhost' ]; then
# no, we don't care if read finds a terminating 
character in this heredoc
# 
https://unix.stackexchange.com/questions/265149/why-is-set-o-errexit-breaking-this-read-heredoc-expression/265151#265151
@@ -160,14 +171,11 @@
mysql+=( -p"${MYSQL_ROOT_PASSWORD}" )
fi
 
-   file_env 'MYSQL_DATABASE'
if [ "$MYSQL_DATABASE" ]; then
echo "CREATE DATABASE IF NOT EXISTS \`$MYSQL_DATABASE\` 
;" | "${mysql[@]}"
mysql+=( "$MYSQL_DATABASE" )
fi
 
-   file_env 'MYSQL_USER'
-   file_env 'MYSQL_PASSWORD'
if [ "$MYSQL_USER" -a "$MYSQL_PASSWORD" ]; then
echo "CREATE USER '$MYSQL_USER'@'%' IDENTIFIED BY 
'$MYSQL_PASSWORD' ;" | "${mysql[@]}"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/usr/local/bin/entrypoint.sh~ 
new/usr/local/bin/entrypoint.sh~
--- old/usr/local/bin/entrypoint.sh~1970-01-01 01:00:00.0 +0100
+++ new/usr/local/bin/entrypoint.sh~2020-05-21 21:25:59.133985854 +0200
@@ -0,0 +1,212 @@
+#!/bin/bash
+
+# This file is based on mariadb-10.3.18.tar.gz, which is GPLv2,
+# and adjusted for openSUSE Tumbleweeds mariadb package.
+
+set -eo pipefail
+shopt -s nullglob
+
+export PATH=/usr/sbin:/sbin:${PATH}
+
+# if command starts with an option, prepend mysqld
+if [ "${1:0:1}" = '-' ]; then
+   set -- mysqld "$@"
+fi
+
+# skip setup if they want an option that stops 

commit opensuse-mariadb-image for openSUSE:Factory

2020-03-01 Thread root
Hello community,

here is the log from the commit of package opensuse-mariadb-image for 
openSUSE:Factory checked in at 2020-03-01 21:27:52

Comparing /work/SRC/openSUSE:Factory/opensuse-mariadb-image (Old)
 and  /work/SRC/openSUSE:Factory/.opensuse-mariadb-image.new.26092 (New)


Package is "opensuse-mariadb-image"

Sun Mar  1 21:27:52 2020 rev:7 rq:780382 version:1.0.0

Changes:

--- 
/work/SRC/openSUSE:Factory/opensuse-mariadb-image/opensuse-mariadb-image.changes
2020-02-24 15:57:27.852128739 +0100
+++ 
/work/SRC/openSUSE:Factory/.opensuse-mariadb-image.new.26092/opensuse-mariadb-image.changes
 2020-03-01 21:28:18.164591668 +0100
@@ -1,0 +2,11 @@
+Fri Feb 28 21:04:18 UTC 2020 - Thorsten Kukuk 
+
+- Fix parsing of default value output of mysqld
+- Fix init_db call to allow correct setup of database
+
+---
+Thu Feb 27 17:59:40 UTC 2020 - Thorsten Kukuk 
+
+- Remove database if init failed
+
+---



Other differences:
--
++ opensuse-mariadb-image.kiwi ++
--- /var/tmp/diff_new_pack.EWu7ld/_old  2020-03-01 21:28:19.048593463 +0100
+++ /var/tmp/diff_new_pack.EWu7ld/_new  2020-03-01 21:28:19.052593472 +0100
@@ -50,8 +50,8 @@
 
 
 
-
-
+
+
 
   
 

++ config.sh ++
--- /var/tmp/diff_new_pack.EWu7ld/_old  2020-03-01 21:28:19.120593609 +0100
+++ /var/tmp/diff_new_pack.EWu7ld/_new  2020-03-01 21:28:19.120593609 +0100
@@ -9,6 +9,8 @@
 echo "Configure image: [$kiwi_iname]..."
 
 # Disable binding to localhost only, doesn't make sense in a container
-sed -i -e 's|\(bind-address.*\)|#\1|g' /etc/my.cnf
+sed -i -e 's|^\(bind-address.*\)|#\1|g' /etc/my.cnf
+# Disable log_error to log to stderr
+sed -i -e 's|^\(log-error.*\)|#\1|g' /etc/my.cnf
 
 exit 0

++ entrypoint.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/usr/local/bin/entrypoint.sh 
new/usr/local/bin/entrypoint.sh
--- old/usr/local/bin/entrypoint.sh 2019-10-30 14:37:04.959985381 +0100
+++ new/usr/local/bin/entrypoint.sh 2020-02-28 15:44:09.100510713 +0100
@@ -65,26 +65,9 @@
 # latter only show values present in config files, and not server defaults
 _get_config() {
local conf="$1"; shift
-   "$@" --verbose --help --log-bin-index="$(mktemp -u)" 2>/dev/null | awk 
'$1 == "'"$conf"'" { print $2; exit }'
+   "$@" --verbose --help --log-bin-index="$(mktemp -u)" 2>/dev/null | grep 
^$conf | awk '$1 == "'"$conf"'" { print $2; exit }'
 }
 
-# Read environment files, we may not be allowed to do that after
-# switching the user anymore
-if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
-# still need to check config, container may have started with --user
-_check_config "$@"
-# Get config
-DATADIR="$(_get_config 'datadir' "$@")"
-
-if [ ! -d "$DATADIR/mysql" ]; then
-   file_env 'MYSQL_ROOT_PASSWORD'
-   file_env 'MYSQL_ROOT_HOST' '%'
-   file_env 'MYSQL_DATABASE'
-   file_env 'MYSQL_USER'
-   file_env 'MYSQL_PASSWORD'
-   fi
-fi
-
 # allow the container to be started with `--user`
 if [ "$1" = 'mysqld' -a -z "$wantHelp" -a "$(id -u)" = '0' ]; then
_check_config "$@"
@@ -103,6 +86,7 @@
DATADIR="$(_get_config 'datadir' "$@")"
 
if [ ! -d "$DATADIR/mysql" ]; then
+   file_env 'MYSQL_ROOT_PASSWORD'
if [ -z "$MYSQL_ROOT_PASSWORD" -a -z 
"$MYSQL_ALLOW_EMPTY_PASSWORD" -a -z "$MYSQL_RANDOM_ROOT_PASSWORD" ]; then
echo >&2 'error: database is uninitialized and password 
option is not specified '
echo >&2 '  You need to specify one of 
MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD'
@@ -110,14 +94,16 @@
fi
 
mkdir -p "$DATADIR"
+
echo 'Initializing database'
-   mysql_install_db --datadir="$DATADIR" --rpm
+   mysql_install_db --datadir="$DATADIR" 
--auth-root-authentication-method=normal --rpm
echo -n `mysql --version | sed -e 's|.*Distrib 
\(.*\)-MariaDB.*|\1|g' -e 's|\.[0-9]\+$||'` > "$DATADIR"/mysql_upgrade_info
chmod 640 "$DATADIR/mysql_upgrade_info"
echo 'Database initialized'
 
SOCKET="$(_get_config 'socket' "$@")"
-   "$@" --skip-networking --socket="${SOCKET}" &
+   echo "Found socket: $SOCKET"
+   "$@" --verbose --skip-networking --socket="${SOCKET}" &
pid="$!"
 
mysql=( mysql --protocol=socket -uroot -hlocalhost 
--socket="${SOCKET}" )
@@ 

commit opensuse-mariadb-image for openSUSE:Factory

2020-02-24 Thread root
Hello community,

here is the log from the commit of package opensuse-mariadb-image for 
openSUSE:Factory checked in at 2020-02-24 15:55:13

Comparing /work/SRC/openSUSE:Factory/opensuse-mariadb-image (Old)
 and  /work/SRC/openSUSE:Factory/.opensuse-mariadb-image.new.26092 (New)


Package is "opensuse-mariadb-image"

Mon Feb 24 15:55:13 2020 rev:6 rq:778744 version:1.0.0

Changes:

--- 
/work/SRC/openSUSE:Factory/opensuse-mariadb-image/opensuse-mariadb-image.changes
2019-12-19 14:55:26.468713506 +0100
+++ 
/work/SRC/openSUSE:Factory/.opensuse-mariadb-image.new.26092/opensuse-mariadb-image.changes
 2020-02-24 15:57:27.852128739 +0100
@@ -1,0 +2,5 @@
+Mon Feb 24 11:10:03 UTC 2020 - Thorsten Kukuk 
+
+- Disable binding to localhost only, breaks usage in containers
+
+---

New:

  config.sh



Other differences:
--
++ config.sh ++
#!/bin/sh
  
#--
#test -f /.profile && . /.profile

#==
# Greeting...
#--
echo "Configure image: [$kiwi_iname]..."

# Disable binding to localhost only, doesn't make sense in a container
sed -i -e 's|\(bind-address.*\)|#\1|g' /etc/my.cnf

exit 0



commit opensuse-mariadb-image for openSUSE:Factory

2019-12-19 Thread root
Hello community,

here is the log from the commit of package opensuse-mariadb-image for 
openSUSE:Factory checked in at 2019-12-19 14:55:25

Comparing /work/SRC/openSUSE:Factory/opensuse-mariadb-image (Old)
 and  /work/SRC/openSUSE:Factory/.opensuse-mariadb-image.new.6675 (New)


Package is "opensuse-mariadb-image"

Thu Dec 19 14:55:25 2019 rev:5 rq:758116 version:1.0.0

Changes:

--- 
/work/SRC/openSUSE:Factory/opensuse-mariadb-image/opensuse-mariadb-image.changes
2019-10-31 22:17:54.611722974 +0100
+++ 
/work/SRC/openSUSE:Factory/.opensuse-mariadb-image.new.6675/opensuse-mariadb-image.changes
  2019-12-19 14:55:26.468713506 +0100
@@ -1,0 +2,5 @@
+Thu Dec 19 09:23:57 UTC 2019 - Fabian Vogt 
+
+- Change the owner of files inside the tarball to root:root
+
+---



Other differences:
--
++ entrypoint.tar.gz ++




commit opensuse-mariadb-image for openSUSE:Factory

2019-10-31 Thread root
Hello community,

here is the log from the commit of package opensuse-mariadb-image for 
openSUSE:Factory checked in at 2019-10-31 22:17:53

Comparing /work/SRC/openSUSE:Factory/opensuse-mariadb-image (Old)
 and  /work/SRC/openSUSE:Factory/.opensuse-mariadb-image.new.2990 (New)


Package is "opensuse-mariadb-image"

Thu Oct 31 22:17:53 2019 rev:4 rq:744258 version:1.0.0

Changes:

--- 
/work/SRC/openSUSE:Factory/opensuse-mariadb-image/opensuse-mariadb-image.changes
2019-10-22 15:46:51.749817273 +0200
+++ 
/work/SRC/openSUSE:Factory/.opensuse-mariadb-image.new.2990/opensuse-mariadb-image.changes
  2019-10-31 22:17:54.611722974 +0100
@@ -1,0 +2,5 @@
+Wed Oct 30 15:01:07 CET 2019 - ku...@suse.de
+
+- Read environmenn files before switching to mariadb user
+
+---



Other differences:
--
++ entrypoint.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/usr/local/bin/entrypoint.sh 
new/usr/local/bin/entrypoint.sh
--- old/usr/local/bin/entrypoint.sh 2019-10-10 18:49:44.791769360 +0200
+++ new/usr/local/bin/entrypoint.sh 2019-10-30 14:37:04.959985381 +0100
@@ -68,6 +68,23 @@
"$@" --verbose --help --log-bin-index="$(mktemp -u)" 2>/dev/null | awk 
'$1 == "'"$conf"'" { print $2; exit }'
 }
 
+# Read environment files, we may not be allowed to do that after
+# switching the user anymore
+if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
+# still need to check config, container may have started with --user
+_check_config "$@"
+# Get config
+DATADIR="$(_get_config 'datadir' "$@")"
+
+if [ ! -d "$DATADIR/mysql" ]; then
+   file_env 'MYSQL_ROOT_PASSWORD'
+   file_env 'MYSQL_ROOT_HOST' '%'
+   file_env 'MYSQL_DATABASE'
+   file_env 'MYSQL_USER'
+   file_env 'MYSQL_PASSWORD'
+   fi
+fi
+
 # allow the container to be started with `--user`
 if [ "$1" = 'mysqld' -a -z "$wantHelp" -a "$(id -u)" = '0' ]; then
_check_config "$@"
@@ -86,7 +103,6 @@
DATADIR="$(_get_config 'datadir' "$@")"
 
if [ ! -d "$DATADIR/mysql" ]; then
-   file_env 'MYSQL_ROOT_PASSWORD'
if [ -z "$MYSQL_ROOT_PASSWORD" -a -z 
"$MYSQL_ALLOW_EMPTY_PASSWORD" -a -z "$MYSQL_RANDOM_ROOT_PASSWORD" ]; then
echo >&2 'error: database is uninitialized and password 
option is not specified '
echo >&2 '  You need to specify one of 
MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD'
@@ -130,7 +146,6 @@
 
rootCreate=
# default root to listen for connections from anywhere
-   file_env 'MYSQL_ROOT_HOST' '%'
if [ ! -z "$MYSQL_ROOT_HOST" -a "$MYSQL_ROOT_HOST" != 
'localhost' ]; then
# no, we don't care if read finds a terminating 
character in this heredoc
# 
https://unix.stackexchange.com/questions/265149/why-is-set-o-errexit-breaking-this-read-heredoc-expression/265151#265151
@@ -157,14 +172,11 @@
mysql+=( -p"${MYSQL_ROOT_PASSWORD}" )
fi
 
-   file_env 'MYSQL_DATABASE'
if [ "$MYSQL_DATABASE" ]; then
echo "CREATE DATABASE IF NOT EXISTS \`$MYSQL_DATABASE\` 
;" | "${mysql[@]}"
mysql+=( "$MYSQL_DATABASE" )
fi
 
-   file_env 'MYSQL_USER'
-   file_env 'MYSQL_PASSWORD'
if [ "$MYSQL_USER" -a "$MYSQL_PASSWORD" ]; then
echo "CREATE USER '$MYSQL_USER'@'%' IDENTIFIED BY 
'$MYSQL_PASSWORD' ;" | "${mysql[@]}"
 




commit opensuse-mariadb-image for openSUSE:Factory

2019-10-22 Thread root
Hello community,

here is the log from the commit of package opensuse-mariadb-image for 
openSUSE:Factory checked in at 2019-10-22 15:46:51

Comparing /work/SRC/openSUSE:Factory/opensuse-mariadb-image (Old)
 and  /work/SRC/openSUSE:Factory/.opensuse-mariadb-image.new.2352 (New)


Package is "opensuse-mariadb-image"

Tue Oct 22 15:46:51 2019 rev:3 rq:741821 version:1.0.0

Changes:

--- 
/work/SRC/openSUSE:Factory/opensuse-mariadb-image/opensuse-mariadb-image.changes
2019-10-12 22:44:14.225551324 +0200
+++ 
/work/SRC/openSUSE:Factory/.opensuse-mariadb-image.new.2352/opensuse-mariadb-image.changes
  2019-10-22 15:46:51.749817273 +0200
@@ -1,0 +2,5 @@
+Tue Oct 22 13:37:53 CEST 2019 - ku...@suse.de
+
+- Update README file
+
+---



Other differences:
--
++ README ++
--- /var/tmp/diff_new_pack.TRphZZ/_old  2019-10-22 15:46:52.485818173 +0200
+++ /var/tmp/diff_new_pack.TRphZZ/_new  2019-10-22 15:46:52.489818177 +0200
@@ -1,6 +1,6 @@
-The command to run this container is as example for portus:
+The command to run this container is as example:
 
-podman run -d --rm --net host -v /srv/mariadb:/var/lib/mysql --name mariadb 
--env MYSQL_ROOT_PASSWORD=portus --env MYSQL_USER=portus --env 
MYSQL_PASSWORD=portus --env MYSQL_DATABASE=portus 
registry.opensuse.org/home/kukuk/container/container/opensuse/mariadb
+podman run -d --rm -v /srv/mariadb:/var/lib/mysql --name mariadb --env 
MYSQL_ROOT_PASSWORD=pass --env MYSQL_USER=user --env MYSQL_PASSWORD=pass --env 
MYSQL_DATABASE=db -p 3306:3306 
registry.opensuse.org/devel/kubic/containers/container/opensuse/mariadb
 
 Supported environment variables:
 MYSQL_ROOT_PASSWORD - needs to contain the root password for the database




commit opensuse-mariadb-image for openSUSE:Factory

2019-10-12 Thread root
Hello community,

here is the log from the commit of package opensuse-mariadb-image for 
openSUSE:Factory checked in at 2019-10-12 22:44:14

Comparing /work/SRC/openSUSE:Factory/opensuse-mariadb-image (Old)
 and  /work/SRC/openSUSE:Factory/.opensuse-mariadb-image.new.2352 (New)


Package is "opensuse-mariadb-image"

Sat Oct 12 22:44:14 2019 rev:2 rq:737655 version:1.0.0

Changes:

--- 
/work/SRC/openSUSE:Factory/opensuse-mariadb-image/opensuse-mariadb-image.changes
2019-10-11 15:21:09.527469955 +0200
+++ 
/work/SRC/openSUSE:Factory/.opensuse-mariadb-image.new.2352/opensuse-mariadb-image.changes
  2019-10-12 22:44:14.225551324 +0200
@@ -1,0 +2,5 @@
+Sat Oct 12 12:52:26 CEST 2019 - ku...@suse.de
+
+- Fix org.opensuse.reference
+
+---



Other differences:
--
++ opensuse-mariadb-image.kiwi ++
--- /var/tmp/diff_new_pack.SFFtg3/_old  2019-10-12 22:44:14.717550066 +0200
+++ /var/tmp/diff_new_pack.SFFtg3/_new  2019-10-12 22:44:14.717550066 +0200
@@ -32,7 +32,7 @@
 
 
 
-
+