From 025ecbc1edfd92d84f1cf6bca23bba8aa2f1271577ab43bc4e075903d9e72be2 Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Tue, 26 Mar 2013 12:57:24 +0000 Subject: [PATCH 1/8] update OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=113 --- build.inc | 1 + configuration-tweaks.tar.bz2 | 4 ++-- mariadb-5.5.29.tar.bz2 | 3 --- mariadb-5.5.30.tar.bz2 | 3 +++ mariadb.changes | 14 ++++++++++++++ mariadb.spec | 21 +++++++-------------- mysql-patches.tar.bz2 | 4 ++-- 7 files changed, 29 insertions(+), 21 deletions(-) delete mode 100644 mariadb-5.5.29.tar.bz2 create mode 100644 mariadb-5.5.30.tar.bz2 diff --git a/build.inc b/build.inc index 284ef12..b206e85 100644 --- a/build.inc +++ b/build.inc @@ -109,6 +109,7 @@ BuildMySQL() { -DWITH_INNOBASE_STORAGE_ENGINE=1 \ -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \ -DWITH_EMBEDDED_SERVER=true \ + -DCOMPILATION_COMMENT="openSUSE package" \ -DDENABLE_DOWNLOADS=false \ "$@" .. make %{?jobs:-j%jobs} diff --git a/configuration-tweaks.tar.bz2 b/configuration-tweaks.tar.bz2 index c467e65..fbc2f39 100644 --- a/configuration-tweaks.tar.bz2 +++ b/configuration-tweaks.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d7787ba1d8fcb24323d602ecf38185504f9b0edfca9e00533045c88867a9c42 -size 220 +oid sha256:1abd3f67af2880a6b0f4b66131516cfa1ca5df16713e7e972197184c47525e11 +size 319 diff --git a/mariadb-5.5.29.tar.bz2 b/mariadb-5.5.29.tar.bz2 deleted file mode 100644 index 2d7c5fe..0000000 --- a/mariadb-5.5.29.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5d6df248b16736c2d3e9f163bb672390d59625f28520410bb746cf8a6d843dfc -size 21299322 diff --git a/mariadb-5.5.30.tar.bz2 b/mariadb-5.5.30.tar.bz2 new file mode 100644 index 0000000..b9825ec --- /dev/null +++ b/mariadb-5.5.30.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a964665ed6bcf1cec9785a7d5ce5e093b44bc5107acfa747320a70f2834c19d5 +size 21257832 diff --git a/mariadb.changes b/mariadb.changes index 001a550..49020f4 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Tue Mar 26 13:56:50 CET 2013 - mhrusecky@suse.cz + +- little cleanup of systemd + +------------------------------------------------------------------- +Tue Mar 26 11:11:37 CET 2013 - mhrusecky@suse.cz + +- updated to MariaDB 5.5.29 + * Release notes: + http://kb.askmonty.org/v/mariadb-5529-release-notes + * Changelog: + http://kb.askmonty.org/v/mariadb-5529-changelog + ------------------------------------------------------------------- Tue Mar 12 16:03:07 UTC 2013 - tpaszkowski@suse.com diff --git a/mariadb.spec b/mariadb.spec index 9932c5a..cddee93 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -35,9 +35,9 @@ Name: mariadb Summary: Server part of MariaDB License: SUSE-GPL-2.0-with-FLOSS-exception Group: Productivity/Databases/Servers -Version: 5.5.29 +Version: 5.5.30 Release: 0 -%define srv_vers 5.5.29 +%define srv_vers 5.5.30 Url: http://www.mariab.org Source: mariadb-%{version}.tar.bz2 Source2: baselibs.conf @@ -77,9 +77,6 @@ BuildRequires: fdupes %if 0%{?fedora_version} > 11 BuildRequires: sqlite %endif -%if 0%{?suse_version} >= 1210 -BuildRequires: systemd -%endif %if 0%{?suse_version} > 1030 Recommends: logrotate %else @@ -91,6 +88,7 @@ Requires: %{name}-errormessages = %version Requires: perl-base # systemd requirements for openSUSE >= 12.1 %if 0%{?suse_version} >= 1210 +BuildRequires: systemd %{?systemd_requires} %endif Provides: mysql = %{srv_vers} @@ -396,10 +394,6 @@ rm -f mysql-test/t/file_contents.test mysql-test/r/file_contents.result ####################################################################### %preun [ $1 = 1 ] || /usr/sbin/rcmysql stop -# systemd requirment -%if 0%{?suse_version} >= 1210 -%service_del_preun mysql.service -%endif %pretrans -p if posix.access("/usr/sbin/rcmysql", "x") then @@ -410,7 +404,6 @@ if posix.access("/usr/sbin/rcmysql", "x") then os.execute("/bin/mkdir -p /var/run/mysql/restart") end end - dbfile="var/mysql/mysql/db.ISM" olddir="var/mysql" newdir="var/lib/mysql" @@ -463,11 +456,11 @@ fi if [ $1 = 0 ]; then %install_info_delete --info-dir=%{_infodir} %{_infodir}/mysql.info.* %{insserv_cleanup} + rm -f "/var/lib/systemd/migrated/mysql.service" + if [ -x /usr/bin/systemctl ]; then + /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : + fi fi -# systemd requirment -%if 0%{?suse_version} >= 1210 -%service_del_postun mysql.service -%endif ####################################################################### # Files section # diff --git a/mysql-patches.tar.bz2 b/mysql-patches.tar.bz2 index 90bb7fe..2d6805b 100644 --- a/mysql-patches.tar.bz2 +++ b/mysql-patches.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ab62b051b2d913334d421d92dfbe156e55e5571fd163f57d1c58587550ae9341 -size 11762 +oid sha256:58dbc3e1be513b1b61c81dacd3fd6899ed364ed93f0f04e2c0cbc066d62b5582 +size 11760 From d8d8adffcdec23db347820886b5cfb41bb962228116b0aaa86d5bdc4c45fdb82 Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Fri, 24 May 2013 07:08:53 +0000 Subject: [PATCH 2/8] - updated to MariaDB 5.5.31 * Release notes: http://kb.askmonty.org/v/mariadb-5531-release-notes * Changelog: http://kb.askmonty.org/v/mariadb-5531-changelog - cleanups in upgrade procedure OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=114 --- configuration-tweaks.tar.bz2 | 4 +- mariadb-5.5.30.tar.bz2 | 3 -- mariadb-5.5.31.tar.bz2 | 3 ++ mariadb.changes | 16 ++++++-- mariadb.spec | 4 +- mysql-patches.tar.bz2 | 4 +- rc.mysql-multi | 72 +++++++++++++++++++++++++++++------- 7 files changed, 81 insertions(+), 25 deletions(-) delete mode 100644 mariadb-5.5.30.tar.bz2 create mode 100644 mariadb-5.5.31.tar.bz2 diff --git a/configuration-tweaks.tar.bz2 b/configuration-tweaks.tar.bz2 index fbc2f39..df08a85 100644 --- a/configuration-tweaks.tar.bz2 +++ b/configuration-tweaks.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1abd3f67af2880a6b0f4b66131516cfa1ca5df16713e7e972197184c47525e11 -size 319 +oid sha256:71b134417cbb991970d50072412a272f466f679db6603463e03647e4b0b687fb +size 315 diff --git a/mariadb-5.5.30.tar.bz2 b/mariadb-5.5.30.tar.bz2 deleted file mode 100644 index b9825ec..0000000 --- a/mariadb-5.5.30.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a964665ed6bcf1cec9785a7d5ce5e093b44bc5107acfa747320a70f2834c19d5 -size 21257832 diff --git a/mariadb-5.5.31.tar.bz2 b/mariadb-5.5.31.tar.bz2 new file mode 100644 index 0000000..f50054b --- /dev/null +++ b/mariadb-5.5.31.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac2307d6d6939d8564af8bf5b097870fc8d9819684cedb811005b87f8a363e46 +size 21327911 diff --git a/mariadb.changes b/mariadb.changes index 49020f4..1bace39 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri May 24 08:27:48 CEST 2013 - mhrusecky@suse.cz + +- updated to MariaDB 5.5.31 + * Release notes: + http://kb.askmonty.org/v/mariadb-5531-release-notes + * Changelog: + http://kb.askmonty.org/v/mariadb-5531-changelog +- cleanups in upgrade procedure + ------------------------------------------------------------------- Tue Mar 26 13:56:50 CET 2013 - mhrusecky@suse.cz @@ -6,11 +16,11 @@ Tue Mar 26 13:56:50 CET 2013 - mhrusecky@suse.cz ------------------------------------------------------------------- Tue Mar 26 11:11:37 CET 2013 - mhrusecky@suse.cz -- updated to MariaDB 5.5.29 +- updated to MariaDB 5.5.30 * Release notes: - http://kb.askmonty.org/v/mariadb-5529-release-notes + http://kb.askmonty.org/v/mariadb-5530-release-notes * Changelog: - http://kb.askmonty.org/v/mariadb-5529-changelog + http://kb.askmonty.org/v/mariadb-5530-changelog ------------------------------------------------------------------- Tue Mar 12 16:03:07 UTC 2013 - tpaszkowski@suse.com diff --git a/mariadb.spec b/mariadb.spec index cddee93..5c3c2d2 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -35,9 +35,9 @@ Name: mariadb Summary: Server part of MariaDB License: SUSE-GPL-2.0-with-FLOSS-exception Group: Productivity/Databases/Servers -Version: 5.5.30 +Version: 5.5.31 Release: 0 -%define srv_vers 5.5.30 +%define srv_vers 5.5.31 Url: http://www.mariab.org Source: mariadb-%{version}.tar.bz2 Source2: baselibs.conf diff --git a/mysql-patches.tar.bz2 b/mysql-patches.tar.bz2 index 2d6805b..c32d445 100644 --- a/mysql-patches.tar.bz2 +++ b/mysql-patches.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:58dbc3e1be513b1b61c81dacd3fd6899ed364ed93f0f04e2c0cbc066d62b5582 -size 11760 +oid sha256:73932aa47404b788b4ca58e8f586cf12b46e8976d928fedc6ad6df3c3598dba0 +size 11792 diff --git a/rc.mysql-multi b/rc.mysql-multi index 28957f5..ba55a2f 100644 --- a/rc.mysql-multi +++ b/rc.mysql-multi @@ -91,9 +91,14 @@ wait_for_socket() # See https://bugzilla.novell.com/show_bug.cgi?id=223209 kill_mysql () { - local pid exe - test -e "$pid_file" || return 7 # not running - pid=`cat "$pid_file"` || return 4 # insufficient privileges + local pid exe test_pid_file + if [ "$1" ]; then + test_pid_file="$1" + else + test_pid_file="$pid_file" + fi + test -e "$test_pid_file" || return 7 # not running + pid=`cat "$test_pid_file"` || return 4 # insufficient privileges if ! test -e /proc/version; then mount -n -t proc proc /proc test -e /proc/version || return 100 @@ -106,10 +111,10 @@ kill_mysql () kill -CONT "$pid" for i in `seq 3000`; do # mysqld removes its pid file - test -e "$pid_file" || return 0 + test -e "$test_pid_file" || return 0 LC_ALL=C sleep 0.1 done - test -e "$pid_file" || return 0 + test -e "$test_pid_file" || return 0 return 1 } @@ -339,12 +344,14 @@ else check_obsolete # Run mysql_upgrade on every package install/upgrade. Not allways # necessary, but doesn't do any harm. - if test -f "$datadir/.run-mysql_upgrade" ; then - echo >> "$log_upgrade" + if [ -f "/var/lib/mysql/.run-mysql_upgrade" ]; then + echo > "$log_upgrade" echo "`LANG="" date` - upgrading MySQL..." >> "$log_upgrade" echo >> "$log_upgrade" echo "Will update MySQL now, if you encounter any problems, please read following file:" | tee -a "$log_upgrade" echo " /usr/share/doc/packages/mysql/README.SuSE" | tee -a "$log_upgrade" + sed -i -e 's|^\([^#]*skip-locking\)|#\1|' \ + -e 's|^\([^#]*skip-federated\)|#\1|' /etc/my.cnf # Check logs for inconsistencies SRCLOGS="" ALL_SRCLOGS="" @@ -364,10 +371,13 @@ else fi fi check_obsolete >> "$log_upgrade" + # instead of running mysqld --bootstrap, which wouldn't allow # us to run mysql_upgrade, we start a full-featured server with # --skip-grant-tables and restict access to it by unix # permissions of the named socket + + protected="`cat /var/run/mysql/protecteddir 2> /dev/null`" if [ -d "$protected" ]; then pid="`cat "$protected/mysqld.pid" 2> /dev/null`" @@ -375,6 +385,7 @@ else [ "`readlink "/proc/$pid/exe" | grep "mysql"`" ]; then echo "Can't update as another updating process is currently running" | tee -a "$log_upgrade" echo "Please check process $pid and terminate it before restarting MySQL" | tee -a "$log_upgrade" + touch /var/lib/mysql/.run-mysql_upgrade rc_failed; rc_status -v; rc_exit; else rm -rf "$protected" @@ -382,9 +393,16 @@ else fi protected="`mktemp -d -p /var/tmp mysql-protected.XXXXXX | tee /var/run/mysql/protecteddir`" export TMPDIR="$TEMPDIR" + + # Run upgrade, double check + # We need to restart mysql every time as programs + # reloads privileges tables, so we can get lock out + for cmd in "/usr/bin/mysql_upgrade" \ + "/usr/bin/mysql_upgrade"; do [ -z "$protected" ] || chown "$mysql_daemon_user:$mysql_daemon_group" "$protected" [ "`ls -ld "$protected" | grep "^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ] || { echo "Can't create secure $protected" | tee -a "$log_upgrade" + touch /var/lib/mysql/.run-mysql_upgrade rc_failed; rc_status -v; rc_exit; } @@ -403,21 +421,49 @@ else wait_for_socket "$protected/mysql.sock" || { echo "error: $protected/mysql.sock file didn't appeared... " | tee -a "$log_upgrade" echo " Try checking \"$log_upgrade_run\"... " | tee -a "$log_upgrade" + touch /var/lib/mysql/.run-mysql_upgrade rc_failed; rc_status -v; rc_exit; } - echo "Upgrading MySQL... " | tee -a "$log_upgrade" - /usr/bin/mysql_upgrade \ - --socket="$protected/mysql.sock" | tee -a "$log_upgrade" + if [ "`grep "Upgrading MySQL..." "$log_upgrade"`" ]; then + echo "Rechecking whether everything is Ok... " | tee -a "$log_upgrade" + LANG=C $cmd --no-defaults --force \ + --socket="$protected/mysql.sock" | \ + sed -e 's|^|\ \ \ |' | \ + tee -a "$log_upgrade" + else + echo "Upgrading MySQL... " | tee -a "$log_upgrade" + LANG=C $cmd --no-defaults --force \ + --socket="$protected/mysql.sock" | \ + sed -e 's|^|\ \ \ |' \ + -e 's|error|info|' \ + -e 's|\(Table\ upgrade\ required.\).*|\1|' | \ + tee -a "$log_upgrade" + fi [ "$PIPESTATUS" -ne 0 ] && { rc_failed; rc_status -v; - kill -TERM "`cat $protected/mysqld.pid`" + kill_mysql "$protected/mysqld.pid" rc_exit; } - kill -TERM "`cat $protected/mysqld.pid`" + + kill_mysql "$protected/mysqld.pid" || { + echo "error: Can't stop protected MySQL... " | tee -a "$log_upgrade" + rc_failed; rc_status -v; + kill_mysql "$protected/mysqld.pid" + rc_exit; } + + # Everything went fine + if [ -z "`grep REPAIR "$log_upgrade"`" ] && \ + [ -z "`grep "Table\ upgrade\ required" "$log_upgrade"`" ]; then + break + fi + + done # end of upgrade + rm -rf "$protected" # Fix ownerships and permissions for $datadir chmod 750 "$datadir" chown -R "$mysql_daemon_user:$mysql_daemon_group" "$datadir" - rm -f "$datadir/.run-mysql_upgrade" \ + rm -f /var/lib/mysql/.run-mysql_upgrade \ + rm -f /var/lib/mysql/.force_upgrade \ "$datadir"/{update-stamp-*,mysql/stamp-4.1} # used in the past chown "$mysql_daemon_user:$mysql_daemon_group" "$log_upgrade" chmod 640 "$log_upgrade" From 7a87f6626a8b007f14385eabb60d925ccf7b676e55509bca75bedf3d88b0d947 Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Wed, 5 Jun 2013 05:52:53 +0000 Subject: [PATCH 3/8] - New default config file OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=115 --- configuration-tweaks.tar.bz2 | 4 +- install.inc | 16 +++--- mariadb.changes | 5 ++ mariadb.spec | 4 +- my.ini | 99 ++++++++++++++++++++++++++++++++++++ mysql-patches.tar.bz2 | 4 +- 6 files changed, 119 insertions(+), 13 deletions(-) create mode 100644 my.ini diff --git a/configuration-tweaks.tar.bz2 b/configuration-tweaks.tar.bz2 index df08a85..ce61d3c 100644 --- a/configuration-tweaks.tar.bz2 +++ b/configuration-tweaks.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:71b134417cbb991970d50072412a272f466f679db6603463e03647e4b0b687fb -size 315 +oid sha256:f2261ec50c13f51c3f47479758ae0a44e5912e30136a187981bb1492c4605ba4 +size 316 diff --git a/install.inc b/install.inc index a34bfff..871980f 100644 --- a/install.inc +++ b/install.inc @@ -56,11 +56,14 @@ filelist mysqlslap >mysql-bench.files filelist mysql_client_test mysql_client_test_embedded mysql_waitpid mysqltest mysqltest_embedded >mysql-test.files # all binaries that don't need to be in a "default" install (mysql.rpm + # mysql-client.rpm) -filelist msql2mysql mysql_plugin mysql_convert_table_format mysql_find_rows mysql_setpermission mysql_tzinfo_to_sql mysql_zap mysqlaccess mysqlhotcopy perror replace mysql_embedded mytop hsclient >mysql-tools.files +filelist msql2mysql mysql_config_editor mysql_plugin mysql_convert_table_format mysql_find_rows mysql_setpermission mysql_tzinfo_to_sql mysql_zap mysqlaccess mysqlhotcopy perror replace mysql_embedded mytop hsclient >mysql-tools.files filelist ndbd ndbmtd ndbd_redo_log_reader >mysql-ndb-storage.files filelist ndb_mgmd >mysql-ndb-management.files filelist ndb_{config,desc,error_reporter,mgm,print_backup_file,print_schema_file,print_sys_file,restore,select_all,select_count,show_tables,size.pl,test_platform,waiter} >mysql-ndb-tools.files filelist ndb_{cpcd,delete_all,drop_index,index_stat,print_file,redo_log_reader,drop_table} ndbinfo_select_all memcached >mysql-ndb-extra.files +[ -z "`ls -1 "%buildroot/usr/share/mysql/"*.ini`" ] || echo '/usr/share/mysql/*.ini' >> mysql.files +[ -z "`ls -1 "%buildroot/usr/share/mysql/"*.cnf`" ] || echo '/usr/share/mysql/*.cnf' >> mysql.files +[ \! -f "%buildroot/usr/share/%name"/dictionary.txt ] || echo "/usr/share/%name/dictionary.txt" >> mysql.files errmsg_list() { echo '%%defattr(-, root, root)' @@ -87,7 +90,7 @@ install -m 644 _buildlibmysqld/*.so* %buildroot%_libdir ln -s libmysqld.so.0.0.1 %buildroot%_libdir/libmysqld.so.0 ln -s libmysqld.so.0.0.1 %buildroot%_libdir/libmysqld.so %endif -install -m 660 _build/support-files/my-medium.cnf %buildroot/etc/my.cnf +install -m 660 %{S:14} %buildroot/etc/my.cnf install -m 640 scripts/mysqlaccess.conf %buildroot/etc/mysqlaccess.conf for i in "${DOCS[@]}"; do install -m 644 "${i}" "${DOCDIR}" || true @@ -129,15 +132,15 @@ cat mysql-ndb-storage.files mysql-ndb-management.files \ done %endif %if ! 0%{prefered} > 0 -cat libmysqlclient-devel.files | while read tmp; do +cat libmysqlclient-devel.files | sed 's|%%doc\ ||' | while read tmp; do cd '%buildroot' - rm -f .$tmp + rm -f ."$tmp" done rm -rf '%buildroot'/%_libdir/libmysqld.* rm -rf '%buildroot'/%_libdir/*.la rm -rf '%buildroot'/%_libdir/*.so +rm -rf '%buildroot'/%_datadir/man/*/mysql_config.1* rm -rf '%buildroot'/%_includedir -rm -rf '%buildroot'/%_datadir/man/*/mysql_config* rm -rf '%buildroot'/%_datadir/aclocal rm -rf '%buildroot'/%_libdir/*.a %endif @@ -163,6 +166,5 @@ if [ "`ls '%buildroot'%_libdir/mysql/plugin/dialog*.so`" ]; then echo '%%dir %%_libdir/mysql/plugin' >> mysql-client.files echo '%%_libdir/mysql/plugin/dialog*.so' >> mysql-client.files fi -rm -rf '%buildroot'/etc/my.cnf.d rm -rf '%buildroot'/usr/share/doc/%{name}-%{version} -rm -rf '%buildroot'/usr/share/mysql/SELinux +rm -rf '%buildroot'/usr/share/mysql/solaris diff --git a/mariadb.changes b/mariadb.changes index 1bace39..e4fdf53 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 5 05:51:45 UTC 2013 - mhrusecky@suse.com + +- New default config file + ------------------------------------------------------------------- Fri May 24 08:27:48 CEST 2013 - mhrusecky@suse.cz diff --git a/mariadb.spec b/mariadb.spec index 5c3c2d2..61e5841 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -51,6 +51,7 @@ Source10: build.inc Source11: install.inc Source12: series Source13: configuration-tweaks.tar.bz2 +Source14: my.ini BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} PreReq: pwdutils @@ -60,6 +61,7 @@ BuildRequires: autoconf BuildRequires: automake BuildRequires: cmake BuildRequires: gcc-c++ +BuildRequires: libedit-devel BuildRequires: libtool BuildRequires: ncurses-devel BuildRequires: openssl-devel @@ -479,8 +481,6 @@ fi %dir /usr/share/%{name} %dir /usr/share/mysql /usr/share/%{name}/charsets/ -/usr/share/mysql/*.cnf -/usr/share/mysql/*.ini /usr/share/%{name}/*.sql %ghost %dir %attr(755,mysql,mysql)/var/run/mysql %dir %{_libdir}/mysql diff --git a/my.ini b/my.ini new file mode 100644 index 0000000..070f964 --- /dev/null +++ b/my.ini @@ -0,0 +1,99 @@ +# This is default example of MySQL/MariaDB configuration provided with openSUSE package +# It is based on upstream defaults with some additional examples. + + +# The following options will be passed to all MariaDB clients +[client] +# password = your_password +# port = 3306 +# socket = /var/run/mysql/mysql.sock + +[mysqld] + +# Remove leading # and set to the amount of RAM for the most important data +# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. +# innodb_buffer_pool_size = 128M + +# Using newer file format that supports dynamic and compressed row formats. +# If you are using replication you have to make sure, that these options are +# set everywhere the same way (probably comment them out is the easiest way) +innodb_file_format=Barracuda +innodb_file_per_table=ON + +# Remove leading # to turn on a very important data integrity option: logging +# changes to the binary log between backups. +# log_bin=mysql-bin +# binlog_format=mixed + +# Remove leading # if you want to store your database elsewhere +# datadir = /var/lib/mysql + +# required unique id between 1 and 2^32 - 1 +# defaults to 1 if master-host is not set +# but will not function as a master if omitted +server-id = 1 + +# These are commonly set, remove the # and set as required. +# port = 3306 +# socket = /var/run/mysql/mysql.sock + +# Don't listen on a TCP/IP port at all. This can be a security enhancement, +# if all processes that need to connect to mysqld run on the same host. +# All interaction with mysqld must be made via Unix sockets or named pipes. +# Note that using this option without enabling named pipes on Windows +# (via the "enable-named-pipe" option) will render mysqld useless! +# +# skip-networking + +# Remove leading # to set options mainly useful for reporting servers. +# The server defaults are faster for transactions and fast SELECTs. +# Adjust sizes as needed, experiment to find the optimal values. +# join_buffer_size = 128M +# sort_buffer_size = 2M +# read_rnd_buffer_size = 2M + +sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES + +[mysqld_multi] +mysqld = /usr/bin/mysqld_safe +mysqladmin = /usr/bin/mysqladmin +log = /var/log/mysqld_multi.log + +# If you want to use mysqld_multi uncomment 1 or more mysqld sections +# below or add your own ones. + +# WARNING +# -------- +# If you uncomment mysqld1 than make absolutely sure, that database mysql, +# configured above, is not started. This may result in corrupted data! +# +# [mysqld1] +# port = 3306 +# datadir = /var/lib/mysql +# pid-file = /var/lib/mysql/mysqld.pid +# socket = /var/lib/mysql/mysql.sock +# user = mysql + +# [mysqld2] +# port = 3307 +# datadir = /var/lib/mysql-databases/mysqld2 +# pid-file = /var/lib/mysql-databases/mysqld2/mysql.pid +# socket = /var/lib/mysql-databases/mysqld2/mysql.sock +# user = mysql + +# [mysqld3] +# port = 3308 +# datadir = /var/lib/mysql-databases/mysqld3 +# pid-file = /var/lib/mysql-databases/mysqld3/mysql.pid +# socket = /var/lib/mysql-databases/mysqld3/mysql.sock +# user = mysql + +# [mysqld6] +# port = 3309 +# datadir = /var/lib/mysql-databases/mysqld6 +# pid-file = /var/lib/mysql-databases/mysqld6/mysql.pid +# socket = /var/lib/mysql-databases/mysqld6/mysql.sock +# user = mysql + +!include_dir /etc/mysql + diff --git a/mysql-patches.tar.bz2 b/mysql-patches.tar.bz2 index c32d445..9da6a2d 100644 --- a/mysql-patches.tar.bz2 +++ b/mysql-patches.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:73932aa47404b788b4ca58e8f586cf12b46e8976d928fedc6ad6df3c3598dba0 -size 11792 +oid sha256:7935739f70f9e0e29aecbfa9d7a7bc18bf91e63141b1f4493ed0f3406563aaef +size 11806 From a4c6753144c971233f399300d0e670d85a9adabcec5c7bf037124b908e8adea0 Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Wed, 5 Jun 2013 08:49:48 +0000 Subject: [PATCH 4/8] - Moving directory with configuration to upstream default (/etc/mysql -> /etc/my.cnf.d) OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=116 --- configuration-tweaks.tar.bz2 | 4 ++-- install.inc | 6 ++++-- mariadb.changes | 6 ++++++ mariadb.spec | 4 ++-- my.ini | 1 + mysql-patches.tar.bz2 | 4 ++-- 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/configuration-tweaks.tar.bz2 b/configuration-tweaks.tar.bz2 index ce61d3c..86a6571 100644 --- a/configuration-tweaks.tar.bz2 +++ b/configuration-tweaks.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f2261ec50c13f51c3f47479758ae0a44e5912e30136a187981bb1492c4605ba4 -size 316 +oid sha256:65ac32a3b776ada3b317d1bb596dd3623499f1b408d598ded05f691a02364562 +size 321 diff --git a/install.inc b/install.inc index 871980f..31da97a 100644 --- a/install.inc +++ b/install.inc @@ -155,8 +155,9 @@ ln -s libndbclient.so.6.0.0 '%buildroot'%_libdir/libndbclient.so.6 if [ -f '%buildroot'/usr/bin/mysqlaccess.conf ]; then mv '%buildroot'/usr/bin/mysqlaccess.conf '%buildroot'/etc/mysqlaccess.conf fi -mkdir -p '%buildroot'/etc/mysql -bzip2 -cd '%_sourcedir'/configuration-tweaks.tar.bz2 | tar -C '%buildroot'/etc/mysql -xvf - +mkdir -p '%buildroot'/etc/my.cnf.d +rm -rf '%buildroot'/etc/my.cnf.d/* +bzip2 -cd '%_sourcedir'/configuration-tweaks.tar.bz2 | tar -C '%buildroot'/etc/my.cnf.d -xvf - if [ -z "`ls '%buildroot'/usr/share/info/mysql.info*`" ]; then install -D -m 0644 Docs/mysql.info "%buildroot/usr/share/info/mysql.info" gzip -9 "%buildroot/usr/share/info/mysql.info" @@ -168,3 +169,4 @@ if [ "`ls '%buildroot'%_libdir/mysql/plugin/dialog*.so`" ]; then fi rm -rf '%buildroot'/usr/share/doc/%{name}-%{version} rm -rf '%buildroot'/usr/share/mysql/solaris +rm -rf '%buildroot'/usr/share/mysql/SELinux diff --git a/mariadb.changes b/mariadb.changes index e4fdf53..dad4da5 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 5 08:48:42 UTC 2013 - mhrusecky@suse.com + +- Moving directory with configuration to upstream default + (/etc/mysql -> /etc/my.cnf.d) + ------------------------------------------------------------------- Wed Jun 5 05:51:45 UTC 2013 - mhrusecky@suse.com diff --git a/mariadb.spec b/mariadb.spec index 61e5841..cf7161c 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -471,8 +471,8 @@ fi %files -f mysql.files %defattr(-, root, root) %config(noreplace) %attr(0640, root, mysql) /etc/my.cnf -%dir %attr(0750, root, mysql) /etc/mysql -%config(noreplace) %attr(0640, root, mysql) /etc/mysql/* +%dir %attr(0750, root, mysql) /etc/my.cnf.d +%config(noreplace) %attr(0640, root, mysql) /etc/my.cnf.d/* %config /etc/logrotate.d/mysql %doc %{_defaultdocdir}/%{name} %doc %{_infodir}/mysql.info.* diff --git a/my.ini b/my.ini index 070f964..a863018 100644 --- a/my.ini +++ b/my.ini @@ -96,4 +96,5 @@ log = /var/log/mysqld_multi.log # user = mysql !include_dir /etc/mysql +!include_dir /etc/my.cnf.d diff --git a/mysql-patches.tar.bz2 b/mysql-patches.tar.bz2 index 9da6a2d..2fcb8f8 100644 --- a/mysql-patches.tar.bz2 +++ b/mysql-patches.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7935739f70f9e0e29aecbfa9d7a7bc18bf91e63141b1f4493ed0f3406563aaef -size 11806 +oid sha256:242cbdabafce318f7351fc293fc1ad224c7ecef4392041ba94d42518e9d8ac1a +size 11793 From d55af5babd935f5aa3267f441c201c366e27201193d0dc6928e56fa9a7d90acf Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Thu, 6 Jun 2013 13:23:51 +0000 Subject: [PATCH 5/8] - enable support for libaio (bnc#796164) - better rights for logdir (bnc#789263) OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=117 --- configuration-tweaks.tar.bz2 | 4 ++-- install.inc | 2 +- mariadb.changes | 6 ++++++ mariadb.spec | 10 ++++++++++ mysql-patches.tar.bz2 | 4 ++-- rc.mysql-multi | 4 ++-- 6 files changed, 23 insertions(+), 7 deletions(-) diff --git a/configuration-tweaks.tar.bz2 b/configuration-tweaks.tar.bz2 index 86a6571..742d2d5 100644 --- a/configuration-tweaks.tar.bz2 +++ b/configuration-tweaks.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:65ac32a3b776ada3b317d1bb596dd3623499f1b408d598ded05f691a02364562 -size 321 +oid sha256:ac5ba7427aed3e005cc0f19dabb58c1e69856c054d3016adf538b46c1df2d2e9 +size 312 diff --git a/install.inc b/install.inc index 31da97a..c4495b0 100644 --- a/install.inc +++ b/install.inc @@ -167,6 +167,6 @@ if [ "`ls '%buildroot'%_libdir/mysql/plugin/dialog*.so`" ]; then echo '%%dir %%_libdir/mysql/plugin' >> mysql-client.files echo '%%_libdir/mysql/plugin/dialog*.so' >> mysql-client.files fi -rm -rf '%buildroot'/usr/share/doc/%{name}-%{version} +rm -rf '%buildroot'/usr/share/doc/{mysql,mariadb}* rm -rf '%buildroot'/usr/share/mysql/solaris rm -rf '%buildroot'/usr/share/mysql/SELinux diff --git a/mariadb.changes b/mariadb.changes index dad4da5..5269aa9 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jun 6 13:22:37 UTC 2013 - mhrusecky@suse.com + +- enable support for libaio (bnc#796164) +- better rights for logdir (bnc#789263) + ------------------------------------------------------------------- Wed Jun 5 08:48:42 UTC 2013 - mhrusecky@suse.com diff --git a/mariadb.spec b/mariadb.spec index cf7161c..de682d0 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -61,6 +61,7 @@ BuildRequires: autoconf BuildRequires: automake BuildRequires: cmake BuildRequires: gcc-c++ +BuildRequires: libaio-devel BuildRequires: libedit-devel BuildRequires: libtool BuildRequires: ncurses-devel @@ -171,6 +172,9 @@ languages and applications need to dynamically load and use MariaDB. Summary: Client for MariaDB Group: Productivity/Databases/Clients Provides: mysql-client = %{srv_vers} +%if 0%{?suse_version} +PreReq: pwdutils +%endif %if 0%{?use_extra_provides} > 0 Provides: %{extra_provides}-client = %{version} Obsoletes: %{extra_provides}-client < %{version} @@ -385,6 +389,12 @@ rm -f mysql-test/t/file_contents.test mysql-test/r/file_contents.result %service_add_pre mysql.service %endif +%pre client +/usr/sbin/groupadd -r mysql >/dev/null 2>/dev/null || : +/usr/sbin/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \ + -s /bin/false -d /var/lib/mysql mysql 2> /dev/null || : +/usr/sbin/usermod -g mysql -s /bin/false mysql || : + %post # systemd requirment %if 0%{?suse_version} >= 1210 diff --git a/mysql-patches.tar.bz2 b/mysql-patches.tar.bz2 index 2fcb8f8..6155a3a 100644 --- a/mysql-patches.tar.bz2 +++ b/mysql-patches.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:242cbdabafce318f7351fc293fc1ad224c7ecef4392041ba94d42518e9d8ac1a -size 11793 +oid sha256:2a44cd8a364876bd0dca1b99b63374f75bd6eca42c68c018e69429263d2f533d +size 11797 diff --git a/rc.mysql-multi b/rc.mysql-multi index ba55a2f..de8fa0e 100644 --- a/rc.mysql-multi +++ b/rc.mysql-multi @@ -329,7 +329,7 @@ else log_dir="`dirname "$i"`" if [ \! -d "$log_dir" ]; then mkdir -p "$log_dir" - chmod 660 "$log_dir" + chmod 770 "$log_dir" fi done @@ -350,7 +350,7 @@ else echo >> "$log_upgrade" echo "Will update MySQL now, if you encounter any problems, please read following file:" | tee -a "$log_upgrade" echo " /usr/share/doc/packages/mysql/README.SuSE" | tee -a "$log_upgrade" - sed -i -e 's|^\([^#]*skip-locking\)|#\1|' \ + sed -i -e 's|^\([^#]*skip-locking\)|#\1\nskip-external-locking|' \ -e 's|^\([^#]*skip-federated\)|#\1|' /etc/my.cnf # Check logs for inconsistencies SRCLOGS="" From 092ba47173cef70bdbfdedad498b5a3306d80be36e11009da2a42426830b3cdf Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Tue, 23 Jul 2013 09:04:35 +0000 Subject: [PATCH 6/8] update OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=118 --- configuration-tweaks.tar.bz2 | 4 ++-- mariadb-5.5.31.tar.bz2 | 3 --- mariadb-5.5.32.tar.bz2 | 3 +++ mariadb.changes | 9 +++++++++ mariadb.spec | 13 +++---------- my.ini | 3 +++ mysql-patches.tar.bz2 | 4 ++-- series | 2 +- 8 files changed, 23 insertions(+), 18 deletions(-) delete mode 100644 mariadb-5.5.31.tar.bz2 create mode 100644 mariadb-5.5.32.tar.bz2 diff --git a/configuration-tweaks.tar.bz2 b/configuration-tweaks.tar.bz2 index 742d2d5..479f499 100644 --- a/configuration-tweaks.tar.bz2 +++ b/configuration-tweaks.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac5ba7427aed3e005cc0f19dabb58c1e69856c054d3016adf538b46c1df2d2e9 -size 312 +oid sha256:b2b4528bfd705dccf6be532a58ace71daff468b7e2777a01f569836a29552488 +size 323 diff --git a/mariadb-5.5.31.tar.bz2 b/mariadb-5.5.31.tar.bz2 deleted file mode 100644 index f50054b..0000000 --- a/mariadb-5.5.31.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ac2307d6d6939d8564af8bf5b097870fc8d9819684cedb811005b87f8a363e46 -size 21327911 diff --git a/mariadb-5.5.32.tar.bz2 b/mariadb-5.5.32.tar.bz2 new file mode 100644 index 0000000..f38799a --- /dev/null +++ b/mariadb-5.5.32.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ae38e45391899f5377ed75e6974100af165f654842517db2b53033159257d72 +size 21314660 diff --git a/mariadb.changes b/mariadb.changes index 5269aa9..9058c97 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Jul 23 10:28:10 CEST 2013 - mhrusecky@suse.cz + +- updated to MariaDB 5.5.32 + * Release notes: + http://kb.askmonty.org/v/mariadb-5532-release-notes + * Changelog: + http://kb.askmonty.org/v/mariadb-5532-changelog + ------------------------------------------------------------------- Thu Jun 6 13:22:37 UTC 2013 - mhrusecky@suse.com diff --git a/mariadb.spec b/mariadb.spec index de682d0..72aa499 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -35,9 +35,9 @@ Name: mariadb Summary: Server part of MariaDB License: SUSE-GPL-2.0-with-FLOSS-exception Group: Productivity/Databases/Servers -Version: 5.5.31 +Version: 5.5.32 Release: 0 -%define srv_vers 5.5.31 +%define srv_vers 5.5.32 Url: http://www.mariab.org Source: mariadb-%{version}.tar.bz2 Source2: baselibs.conf @@ -416,16 +416,9 @@ if posix.access("/usr/sbin/rcmysql", "x") then os.execute("/bin/mkdir -p /var/run/mysql/restart") end end -dbfile="var/mysql/mysql/db.ISM" -olddir="var/mysql" -newdir="var/lib/mysql" --- Do the database files still belong to root (very old installation)? --- Change ownerships -if posix.stat(dbfile, "uid") == 0 then - os.execute("/bin/chown -Rv mysql:mysql var/mysql/") -end %posttrans +[ -z "`ls %{_infodir}/mysql.info.* 2> /dev/null`" ] || \ %install_info --info-dir=%{_infodir} %{_infodir}/mysql.info.* if [ -d /var/lib/mysql ]; then touch /var/lib/mysql/.run-mysql_upgrade diff --git a/my.ini b/my.ini index a863018..1f2d878 100644 --- a/my.ini +++ b/my.ini @@ -10,6 +10,9 @@ [mysqld] +# Remove leading # if you don't want to listen on network (only socket - safer) +# skip-networking + # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M diff --git a/mysql-patches.tar.bz2 b/mysql-patches.tar.bz2 index 6155a3a..446b786 100644 --- a/mysql-patches.tar.bz2 +++ b/mysql-patches.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2a44cd8a364876bd0dca1b99b63374f75bd6eca42c68c018e69429263d2f533d -size 11797 +oid sha256:2b34d03c24091c0a8120aae545ac9f0959b4167c21e7a1954819836bdf66a673 +size 11823 diff --git a/series b/series index 3379ebd..252baca 100644 --- a/series +++ b/series @@ -5,7 +5,7 @@ mariadb-5.1.50-strncat-overflow.patch mariadb-5.5.28-install_db-quiet.patch mysql-community-server-5.1.51-mysql_config.patch mariadb-5.5.25-mysqld_multi-features.patch -mariadb-5.1.50-upgrade-exit-status.patch +mariadb-5.5.32-upgrade-exit-status.patch mariadb-5.2.3-cnf.patch mysql-community-server-5.5.6-safe-process-in-bin.patch mariadb-5.5.28-group.patch From d4d9047498508bb2ba97ba5ae78b2713f8fc0bdab3b1d60642af51734cfa21cd Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Thu, 25 Jul 2013 11:38:16 +0000 Subject: [PATCH 7/8] - avoiding file conflicts with mytop OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=119 --- install.inc | 4 +++- mariadb.changes | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/install.inc b/install.inc index c4495b0..055c666 100644 --- a/install.inc +++ b/install.inc @@ -10,6 +10,8 @@ install -m 644 _build/sql/mysqld.sym %buildroot%_libdir/mysql/mysqld.sym # remove handler socket client rm -f %buildroot%_libdir/libhsclient* rm -f %buildroot%_bindir/hsclient* +[ -z "`ls %buildroot%_bindir/mytop 2> /dev/null`" ] || \ +mv %buildroot%_bindir/mytop %buildroot%_bindir/%{name}_mytop rm -f %buildroot%_libdir/mysql/plugin/handlersocket.so # remove most static libs (FIXME: don't build them at all...) rm -f %buildroot%_libdir/libmysqlclient*a @@ -56,7 +58,7 @@ filelist mysqlslap >mysql-bench.files filelist mysql_client_test mysql_client_test_embedded mysql_waitpid mysqltest mysqltest_embedded >mysql-test.files # all binaries that don't need to be in a "default" install (mysql.rpm + # mysql-client.rpm) -filelist msql2mysql mysql_config_editor mysql_plugin mysql_convert_table_format mysql_find_rows mysql_setpermission mysql_tzinfo_to_sql mysql_zap mysqlaccess mysqlhotcopy perror replace mysql_embedded mytop hsclient >mysql-tools.files +filelist msql2mysql mysql_config_editor mysql_plugin mysql_convert_table_format mysql_find_rows mysql_setpermission mysql_tzinfo_to_sql mysql_zap mysqlaccess mysqlhotcopy perror replace mysql_embedded %{name}_mytop hsclient >mysql-tools.files filelist ndbd ndbmtd ndbd_redo_log_reader >mysql-ndb-storage.files filelist ndb_mgmd >mysql-ndb-management.files filelist ndb_{config,desc,error_reporter,mgm,print_backup_file,print_schema_file,print_sys_file,restore,select_all,select_count,show_tables,size.pl,test_platform,waiter} >mysql-ndb-tools.files diff --git a/mariadb.changes b/mariadb.changes index 9058c97..f51ae06 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 25 13:08:06 CEST 2013 - mhrusecky@suse.cz + +- avoiding file conflicts with mytop + ------------------------------------------------------------------- Tue Jul 23 10:28:10 CEST 2013 - mhrusecky@suse.cz From 69cd92f203f9f0850b12ac22368f6999c939db32214c79a591e00b92ef17d34f Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Thu, 25 Jul 2013 13:11:17 +0000 Subject: [PATCH 8/8] better way OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=120 --- install.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.inc b/install.inc index 055c666..b3b5f32 100644 --- a/install.inc +++ b/install.inc @@ -10,8 +10,9 @@ install -m 644 _build/sql/mysqld.sym %buildroot%_libdir/mysql/mysqld.sym # remove handler socket client rm -f %buildroot%_libdir/libhsclient* rm -f %buildroot%_bindir/hsclient* -[ -z "`ls %buildroot%_bindir/mytop 2> /dev/null`" ] || \ -mv %buildroot%_bindir/mytop %buildroot%_bindir/%{name}_mytop +if [ -f "%{buildroot}%{_bindir}/mytop" ]; then + mv %{buildroot}%{_bindir}/mytop %{buildroot}%{_bindir}/%{name}_mytop +fi rm -f %buildroot%_libdir/mysql/plugin/handlersocket.so # remove most static libs (FIXME: don't build them at all...) rm -f %buildroot%_libdir/libmysqlclient*a