Hello community,

here is the log from the commit of package mariadb for openSUSE:Factory checked 
in at 2019-12-23 22:35:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mariadb (Old)
 and      /work/SRC/openSUSE:Factory/.mariadb.new.6675 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mariadb"

Mon Dec 23 22:35:11 2019 rev:90 rq:755500 version:10.3.20

Changes:
--------
--- /work/SRC/openSUSE:Factory/mariadb/mariadb.changes  2019-12-02 
11:35:48.734431412 +0100
+++ /work/SRC/openSUSE:Factory/.mariadb.new.6675/mariadb.changes        
2019-12-23 22:36:32.681796906 +0100
@@ -1,0 +2,7 @@
+Thu Dec  5 10:41:56 UTC 2019 - pgaj...@suse.com
+
+- added rpm test macros: %mysql_testserver_start,
+  %mysql_testserver_cconf, %mysql_testserver_stop
+  First two consuments are python-sortinghat and python-mysqlclient.
+
+-------------------------------------------------------------------

New:
----
  macros.mariadb-test

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

Other differences:
------------------
++++++ mariadb.spec ++++++
--- /var/tmp/diff_new_pack.YGfnDu/_old  2019-12-23 22:36:35.841798277 +0100
+++ /var/tmp/diff_new_pack.YGfnDu/_new  2019-12-23 22:36:35.885798296 +0100
@@ -71,6 +71,7 @@
 Source16:       mariadb.target
 Source17:       mysql-systemd-helper
 Source18:       mariadb@.service
+Source19:       macros.mariadb-test
 Source50:       suse_skipped_tests.list
 Patch1:         mariadb-10.2.4-logrotate.patch
 Patch3:         mariadb-10.1.1-mysqld_multi-features.patch
@@ -214,6 +215,13 @@
 This package contains the development header files and libraries
 for developing applications that embed the MariaDB.
 
+%package rpm-macros
+Summary:        MariaDB RPM macros
+Requires:       %{name}
+
+%description rpm-macros
+Provides macros usable in rpm spec files.
+
 %package client
 Summary:        Client for MariaDB
 Group:          Productivity/Databases/Clients
@@ -651,6 +659,11 @@
 # Create the directory specified in 'secure-file-priv' option
 mkdir -p '%{buildroot}'%{_localstatedir}/lib/mysql-files
 
+# install rpm macros file
+mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d
+install -m 644 %{SOURCE19} %{buildroot}%{_rpmconfigdir}/macros.d
+
+
 %check
 cd build
 
@@ -815,6 +828,10 @@
 %{_datadir}/mysql/systemd/mariadb.service
 %{_datadir}/mysql/systemd/mariadb@.service
 
+%files rpm-macros
+%dir %{_rpmconfigdir}/macros.d
+%{_rpmconfigdir}/macros.d/macros.mariadb-test
+
 %files -n libmariadbd%{soname}
 %{_libdir}/libmariadbd.so.*
 

++++++ macros.mariadb-test ++++++
%__mysql_test_run_dir  /tmp/mysql
%__mysql_test_user     abuild
%__mysql_test_pass     abuildpw
%__mysql_test_cconf    abuild-myclient.cnf
%__mysql_test_port     63306

#
# macro: mysql_testserver_start -- start a test mysqld instance
#
#        usage: %mysql_test_start -u <user> -p <password> -t <port>
#

%mysql_testserver_start(u:p:t:) \
TEST_RUN_DIR=%{__mysql_test_run_dir} \
TEST_USER="%{-u:%{-u*}}" \
if [ -z "$TEST_USER" ]; then \
  TEST_USER='%{__mysql_test_user}' \
fi \
TEST_PASS="%{-p:%{-p*}}" \
if [ -z "$TEST_PASS" ]; then \
  TEST_PASS='%{__mysql_test_pass}' \
fi \
TEST_PORT="%{-t:%{-t*}}" \
if [ -z "$TEST_PORT" ]; then \
  TEST_PORT='%{__mysql_test_port}' \
fi \
\
[ -d $TEST_RUN_DIR ] && rm -r $TEST_RUN_DIR \
mkdir -p $TEST_RUN_DIR/datadir{,-private} \
\
cat << EOF > $TEST_RUN_DIR/my.cnf \
[client] \
socket = $TEST_RUN_DIR/mysql.sock \
port   = $TEST_PORT \
[mysqld] \
user             = $TEST_USER \
log-error        = $TEST_RUN_DIR/mysqld.log \
secure_file_priv = $TEST_RUN_DIR/datadir-private \
datadir          = $TEST_RUN_DIR/datadir \
server-id        = 1 \
socket           = $TEST_RUN_DIR/mysql.sock \
port             = $TEST_PORT \
sql_mode         = '' \
EOF\
\
echo '>>> Initializing databases' \
mysql_install_db --defaults-file=$TEST_RUN_DIR/my.cnf \
\
echo '>>> Invoking mysqld' \
/usr/sbin/mysqld --defaults-file=$TEST_RUN_DIR/my.cnf& \
sleep 2 \
\
echo '>>> Creating authentication database' \
mysqladmin       --defaults-file=$TEST_RUN_DIR/my.cnf --user root password 
'roots_secret' \
mysqladmin       --defaults-file=$TEST_RUN_DIR/my.cnf --user root 
--password='roots_secret' create testhat \
mysql --defaults-file=$TEST_RUN_DIR/my.cnf --user root 
--password='roots_secret' -e "CREATE USER '$TEST_USER'@'localhost' IDENTIFIED 
BY '$TEST_PASS'" \
mysql --defaults-file=$TEST_RUN_DIR/my.cnf --user root 
--password='roots_secret' -e "GRANT ALL PRIVILEGES ON * . * TO 
'$TEST_USER'@'localhost'" \
mysql --defaults-file=$TEST_RUN_DIR/my.cnf --user root 
--password='roots_secret' -e "FLUSH PRIVILEGES" \
%nil

#
# macro mysql_testserver_cconf -- generate client access conf
#

%mysql_testserver_cconf(n:t:) \
TEST_RUN_DIR=%{__mysql_test_run_dir} \
TEST_CCONF="%{-n:%{-n*}}" \
if [ -z "$TEST_CCONF" ]; then \
  TEST_CCONF='%{__mysql_test_cconf}' \
fi \
TEST_PORT="%{-t:%{-t*}}" \
if [ -z "$TEST_PORT" ]; then \
  TEST_PORT='%{__mysql_test_port}' \
fi \
cat << EOF > $TEST_CCONF \
[client] \
user     = abuild \
password = abuildpw \
database = test \
socket   = $TEST_RUN_DIR/mysql.sock \
port     = $TEST_PORT \
EOF\
%nil

#
# macro: mysql_testserver_stop -- start a test mysqld instance
#
#        usage: %mysql_test_stop
#

%mysql_testserver_stop() \
TEST_RUN_DIR=%{__mysql_test_run_dir} \
echo '>>> Shutting the mysql server down' \
cat << EOF > $TEST_RUN_DIR/shutdown.sql \
SHUTDOWN; \
EOF\
mysql       --defaults-file=$TEST_RUN_DIR/my.cnf --user root 
--password='roots_secret' < $TEST_RUN_DIR/shutdown.sql \
%nil



Reply via email to