From 3b44ff4ed0b6c121dfc34f4da64ba03f138e1ee1f53c03b0a5b03f4597c1334d Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Sat, 6 Dec 2014 13:56:41 +0000 Subject: [PATCH 01/12] - run spec cleaner on spec - update to 10.0.15 * Release notes: http://kb.askmonty.org/v/mariadb-10015-release-notes * Changelog: http://kb.askmonty.org/v/mariadb-10015-changelog - conditionally enable more storage engines - updated packaging to the latest templates OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=161 --- README.debug | 20 +- README.install | 2 +- _constraints | 2 +- build.inc | 170 ++++---------- configuration-tweaks.tar.bz2 | 4 +- install.inc | 54 ++--- mariadb-10.0.14.tar.bz2 | 3 - mariadb-10.0.15.tar.gz | 3 + mariadb.changes | 12 + mariadb.spec | 442 ++++++++++++----------------------- mysql-patches.tar.bz2 | 4 +- rc.mysql.systemd | 7 +- rc.mysql.sysvinit | 7 +- series | 7 +- 14 files changed, 248 insertions(+), 489 deletions(-) delete mode 100644 mariadb-10.0.14.tar.bz2 create mode 100644 mariadb-10.0.15.tar.gz diff --git a/README.debug b/README.debug index b40480a..bcf61c8 100644 --- a/README.debug +++ b/README.debug @@ -1,7 +1,7 @@ Debugging mysqld crashes ======================== Author: Michal Marek -Last modified: 2006-07-31 +Last modified: 2014-11-21 Contents -------- @@ -67,22 +67,16 @@ packages and run gdb /usr/sbin/mysqld /var/lib/mysql/core (gdb) bt -Replace mysqld with the mysqld version you used (mysqld, mysqld-max or -mysqld-debug) and core with the actual name of the coredump. +Replace mysqld with the mysqld version you used (mysqld, mysqld-max) +and core with the actual name of the coredump. 3) Trace files -------------- -You'll need the mysqld-debug binary from the mysql-debug package to get -a trace file. Install the mysqld-debug package and the start mysqld -using following command: +Start mysqld using following command: $ MYSQLD_DEBUG=yes rcmysql start - Note: The init script doesn't automatically pick up the mysqld-debug - binary (as it does with mysqld-max), because it is expected to be used - just temporarily to help solving a particular problem. - -The init script will then start mysqld-debug and add the --core-file, +The init script will then start mysqld and add the --core-file, --log and --debug options for you. The query log will be stored in /var/lib/mysql/myqld-query.log @@ -92,9 +86,7 @@ and the trace file in /var/lib/mysql/mysqld.trace If you don't like the options set by the init script, just put your own -into /etc/my.cnf and the init script will honor it. For information -about the --debug option, see "The DBUG Package": -http://dev.mysql.com/doc/refman/5.0/en/the-dbug-package.html . +into /etc/my.cnf and the init script will honor them. The trace file will contain various debug information and function calls/returns and will become _extremly_ huge after a while, so don't diff --git a/README.install b/README.install index 8bd26b3..77012cf 100644 --- a/README.install +++ b/README.install @@ -15,6 +15,6 @@ Alternatively you can run: '/usr/bin/mysql_secure_installation' which will also give you the option of removing the test -databases and anonymous user created by default. This is +databases and anonymous user created by default. This is strongly recommended for production servers. diff --git a/_constraints b/_constraints index 58d987a..66cbdbe 100644 --- a/_constraints +++ b/_constraints @@ -1,7 +1,7 @@ - 9 + 11 diff --git a/build.inc b/build.inc index d7c4845..f12d8fc 100644 --- a/build.inc +++ b/build.inc @@ -1,130 +1,48 @@ -%if 0%{?suse_version} < 1120 && 0%{?suse_version} > 0 -%define socketpath /var/lib/mysql -%else -%define socketpath /var/run/mysql -%endif -%if 0%{?suse_version} > 1140 -export EXTRA_FLAGS=" -Wno-unused-but-set-variable -fno-strict-aliasing -Wno-unused-parameter " -%endif +EXTRA_FLAGS="-Wno-unused-but-set-variable -fno-strict-aliasing -Wno-unused-parameter" +# Mariadb devs seems to fall in love with -Werror option +EXTRA_FLAGS="${EXTRA_FLAGS} -Wno-error" %ifarch ppc64 -export EXTRA_FLAGS=" -mminimal-toc " +EXTRA_FLAGS="${EXTRA_FLAGS} -mminimal-toc" %endif -export CFLAGS="$RPM_OPT_FLAGS -DOPENSSL_LOAD_CONF -DPIC -fPIC -DFORCE_INIT_OF_VARS $EXTRA_FLAGS " -export CXXFLAGS="$CFLAGS" - -%if 0%{use_cmake} < 1 -autoreconf -f -i -# Make the compile a function, since we do multiple builds -BuildMySQL() { - # The --enable-assembler simply does nothing on systems that do not - # support assembler speedups. - suffix="$1"; shift - mkdir _build$suffix - pushd _build$suffix - ../configure \ - --enable-assembler \ - --with-readline \ - --infodir=%{_infodir} \ - --libdir=%{_libdir} \ - --libexecdir=/usr/sbin \ - --localstatedir=/var/lib/mysql \ - --mandir=%{_mandir} \ - --prefix=%{_prefix} \ - --sysconfdir=/etc \ - --with-mysqld-user=mysql \ - --with-mysqld-group=mysql \ - --without-debug \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --with-charset=utf8 \ - --with-collation=utf8_unicode_ci \ - --with-extra-charsets=all \ - --with-unix-socket-path=%{socketpath}/mysql.sock \ - --enable-thread-safe-client \ - --with-comment="SUSE MySQL RPM" \ - --with-libwrap \ - --with-server-suffix=$suffix \ -%ifarch s390 s390x - --with-atomic-ops=rwlocks \ -%else - --with-atomic-ops=smp \ +export CFLAGS="%{optflags} -DOPENSSL_LOAD_CONF -DPIC -fPIC -DFORCE_INIT_OF_VARS $EXTRA_FLAGS" +export CXXFLAGS="$CFLAGS -felide-constructors" +%cmake -DWITH_SSL=system \ + -DWITH_ZLIB=system \ + -DWITH_LIBEVENT=system \ + -DWITH_JEMALLOC=auto \ + -DWITH_READLINE=0 \ + -DWITH_LIBEDIT=0 \ + -DINSTALL_LAYOUT=RPM \ + -DMYSQL_UNIX_ADDR="%{_localstatedir}/run/mysql/mysql.sock" \ + -DINSTALL_UNIX_ADDRDIR="%{_localstatedir}/run/mysql/mysql.sock" \ + -DINSTALL_MYSQLSHAREDIR=share/%{name} \ + -DWITH_COMMENT="openSUSE MySQL rpm" \ + -DWITH_EXTRA_CHARSET=all \ + -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci \ + -DWITH_INNOBASE_STORAGE_ENGINE=1 \ + -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \ +%if %{with oqgraph} + -DWITH_OQGRAPH_STORAGE_ENGINE=1 \ %endif - --with-ssl=/usr \ - --with-plugins=%{builtin_plugins} \ - --without-plugin-handlersocket \ - HOSTNAME="/bin/hostname -f" \ - "$@" - # Add this for MyISAM RAID support: - # --with-raid - # benchdir does not fit in above model. Fix when we make a separate package - make %{?jobs:-j%jobs} - nm --numeric-sort sql/mysqld > sql/mysqld.sym - # needed for make check, which is not VPATH aware - # copy the files unconditionally so that manual 'make check' after - # the build works, too - cp -a ../mysql-test/* mysql-test/ - for i in ../sql/share/{english,charsets}; do - [ -d $i ] && cp -a $i sql/share/ - done - cp -a ../scripts/*.sql scripts/ -%if %{?_with_testsuite:1}0 - pushd mysql-test; perl ./mysql-test-run.pl --force; popd -%endif - popd -} -# Build the client, extra tools, libraries -%if 0%{?preferred} > 0 -BuildMySQL "" --with-embedded-server -%else -BuildMySQL "" --without-embedded-server -%endif -# build mysqld-debug -BuildMySQL "-debug" --with-debug --without-embedded-server - -%if 0%{?preferred} > 0 -mkdir -p _buildlibmysqld/tmp -cd _buildlibmysqld/tmp -ar -x ../../_build/libmysqld/libmysqld.a -gcc $CFLAGS $LDFLAGS -shared -Wl,-soname,libmysqld.so.0 -o ../libmysqld.so.0.0.1 \ -*.o \ --lpthread -lcrypt -lnsl -lssl -lcrypto -lz -lrt -lstdc++ -lm -lc -cd .. -rm -rf tmp -cd .. -%endif - -%else # cmake build - -BuildMySQL() { - mkdir _build$1 - pushd _build$1 - shift - cmake -DWITH_SSL=system \ - -DWITH_ZLIB=system \ - -DWITH_LIBEVENT=system \ - -DWITH_JEMALLOC=no \ - -DWITH_READLINE=0 \ - -DWITH_LIBEDIT=0 \ - -DINSTALL_LAYOUT=RPM \ - -DMYSQL_UNIX_ADDR=%{socketpath}/mysql.sock \ - -DINSTALL_MYSQLSHAREDIR=share/%{name} \ - -DWITH_COMMENT="openSUSE MySQL rpm" \ - -DWITH_EXTRA_CHARSET=all \ - -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci \ - -DWITH_INNOBASE_STORAGE_ENGINE=1 \ - -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \ - -DWITH_EMBEDDED_SERVER=true \ - -DCOMPILATION_COMMENT="openSUSE package" \ - -DDENABLE_DOWNLOADS=false \ - -DINSTALL_PLUGINDIR_RPM="%{_lib}/mysql/plugin" \ - -DINSTALL_LIBDIR_RPM="%{_lib}" \ - -Wno-dev "$@" .. - make %{?jobs:-j%jobs} - nm --numeric-sort sql/mysqld > sql/mysqld.sym - popd -} - -BuildMySQL "" -DCMAKE_BUILD_TYPE=Release -DINSTALL_SQLBENCHDIR=share -# TokuDB can't be compiled without optimisations turned on -BuildMySQL "-debug" -DCMAKE_BUILD_TYPE=Debug -DWITHOUT_TOKUDB=1 +%if %{with cassandra} + -DWITH_CASSANDRA_STORAGE_ENGINE=1 \ %endif + -DWITH_XTRADB_STORAGE_ENGINE=1 \ + -DWITH_CSV_STORAGE_ENGINE=1 \ + -DWITH_EMBEDDED_SERVER=true \ + -DCOMPILATION_COMMENT="openSUSE package" \ + -DDENABLE_DOWNLOADS=false \ + -DINSTALL_PLUGINDIR_RPM="%{_lib}/mysql/plugin" \ + -DINSTALL_LIBDIR_RPM="%{_lib}" \ + -DINSTALL_SYSCONF2DIR="%{_sysconfdir}/my.cnf.d" \ + -DCMAKE_C_FLAGS_RELWITHDEBINFO="$CFLAGS" \ + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$CXXFLAGS" \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo -DINSTALL_SQLBENCHDIR=share \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -pie -Wl,-z,relro,-z,now" \ + -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -pie -Wl,-z,relro,-z,now" \ + -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -pie -Wl,-z,relro,-z,now" \ + -Wno-dev "$@" .. +make %{?_smp_mflags} +nm --numeric-sort sql/mysqld > sql/mysqld.sym diff --git a/configuration-tweaks.tar.bz2 b/configuration-tweaks.tar.bz2 index 7f0612b..de3a380 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:861f2e1c5a96eb4a1b63268c9a5b33791178554385401955c15d99dcae8cd0c2 -size 218 +oid sha256:000e093b6d758ad1df72239727cc7c78e91f962a44999ce78779a5e22f158675 +size 219 diff --git a/install.inc b/install.inc index 87d6110..9d812d7 100644 --- a/install.inc +++ b/install.inc @@ -1,11 +1,5 @@ -# install the debug server first, so that we don't overwrite the standard -mkdir -p %buildroot%_libdir/mysql -make -C _build-debug/sql install DESTDIR=%buildroot -mv %buildroot/usr/sbin/mysqld %buildroot/usr/sbin/mysqld-debug -install -m 644 _build-debug/sql/mysqld.sym %buildroot%_libdir/mysql/mysqld-debug.sym -# install the client, extra tools, libraries and the standard server -make -C _build install DESTDIR=%buildroot benchdir_root=/usr/share/ -install -m 644 _build/sql/mysqld.sym %buildroot%_libdir/mysql/mysqld.sym +%cmake_install benchdir_root=/usr/share/ +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* @@ -35,20 +29,27 @@ filelist() if test -e usr/bin/"$i"; then echo /usr/bin/"$i" fi + if test -d usr/share/*/"$i"; then + echo "/`echo usr/share/*/"$i"`" + fi + if test -n "`ls -1 %buildroot$i 2> /dev/null`"; then + echo "$i" + fi if ls usr/share/man/*/"$i".[1-9]* >/dev/null 2>&1; then echo "%%doc %_mandir/*/$i.[1-9]*" fi done popd >/dev/null } -filelist innochecksum my_print_defaults myisam_ftdump myisamchk myisamlog myisampack mysql_fix_extensions mysql_fix_privilege_tables mysql_install_db mysql_secure_installation mysql_upgrade mysqlbug mysqld mysqld_multi mysqld_safe mysqlbinlog mysqldumpslow mysqlmanager resolve_stack_dump resolveip {m,}aria_chk {m,}aria_dump_log {m,}aria_ftdump {m,}aria_pack {m,}aria_read_log xtstat tokuftdump >mysql.files +filelist innochecksum my_print_defaults myisam_ftdump myisamchk myisamlog myisampack mysql_fix_extensions mysql_fix_privilege_tables mysql_install_db mysql_secure_installation mysql_upgrade mysqlbug mysqld mysqld_multi mysqld_safe mysqlbinlog mysqldumpslow mysqlmanager mroonga resolve_stack_dump resolveip {m,}aria_chk {m,}aria_dump_log {m,}aria_ftdump {m,}aria_pack {m,}aria_read_log xtstat tokuftdump >mysql.files +[ \! -d %buildroot/usr/share/*/mroonga ] || echo filelist mysql mysqladmin mysqlcheck mysqldump mysqlimport mysqlshow mysql_config_editor >mysql-client.files -filelist mysql_config >libmysqlclient-devel.files +filelist mysql_config /usr/share/pkgconfig/mariadb.pc >libmysqlclient-devel.files 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 %{name}_mytop hsclient >mysql-tools.files +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 %{name}_mytop hsclient %{_bindir}/wsrep* /usr/share/mysql/wsrep_notify >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 @@ -75,31 +76,18 @@ DOCS=(COPYING README EXCEPTIONS-CLIENT %_sourcedir/README.debug %_sourcedir/READ DOCDIR=%buildroot%_defaultdocdir/%name install -d -m 755 ${DOCDIR} install -d -m 755 %buildroot/etc/logrotate.d -install -m 644 _build/support-files/mysql-log-rotate %buildroot/etc/logrotate.d/mysql -%if 0%{?preferred} > 0%{?use_cmake} -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 644 build/support-files/mysql-log-rotate %buildroot/etc/logrotate.d/mysql install -m 660 %{S:14} %buildroot/etc/my.cnf [ \! -f scripts/mysqlaccess.conf ] || install -m 640 scripts/mysqlaccess.conf %buildroot/etc/mysqlaccess.conf for i in "${DOCS[@]}"; do install -m 644 "${i}" "${DOCDIR}" || true done -%if 0%{?use_systemd} > 0 install -D -m 755 %_sourcedir/rc.mysql.systemd '%buildroot'/usr/lib/mysql/rcmysql sed -i 's|@MYSQLVER@|%{version}|' '%buildroot'/usr/lib/mysql/rcmysql ln -sf service '%buildroot'/usr/sbin/rcmysql install -D -m 644 %_sourcedir/mysql.service '%buildroot'/usr/lib/systemd/system/mysql.service sed -i 's|doc/packages/mysql|doc/packages/%{name}|g' '%buildroot'/usr/lib/mysql/rcmysql rm -rf '%buildroot'/etc/init.d -%else -install -d -m 755 '%buildroot'/etc/init.d -install -m 755 '%_sourcedir'/rc.mysql.sysvinit '%buildroot'/etc/init.d/mysql -sed -i 's|@MYSQLVER@|%{version}|' '%buildroot'/etc/init.d/mysql -ln -sf ../../etc/init.d/mysql '%buildroot'/usr/sbin/rcmysql -sed -i 's|doc/packages/mysql|doc/packages/%{name}|g' '%buildroot'/etc/init.d/mysql -%endif # SuSEfirewall service description install -D -m 644 %_sourcedir/mysql.SuSEfirewall2 \ %buildroot/etc/sysconfig/SuSEfirewall2.d/services/mysql @@ -109,26 +97,14 @@ install -m 755 suse-test-run '%buildroot'/usr/share/mysql-test/ mkdir '%buildroot'/usr/share/mysql-test/var # Final fixes find '%buildroot'/usr/share/mysql-test -name '*.orig' -delete -%if 0%{?suse_version} > 1030 %fdupes -s '%buildroot'/usr/share/mysql-test -%endif -%if 0%{?fedora_version} > 8 fdupes -q -n -r '%buildroot'/usr/share/mysql-test -%endif dos2unixConversion() { %{__sed} -i 's/\r//g' "$1" } for i in `grep -Rl '\r' '%buildroot'/usr/share/sql-bench`; do dos2unixConversion "$i" done -%if ! 0%{cluster} > 0 -cat mysql-ndb-storage.files mysql-ndb-management.files \ - mysql-ndb-tools.files mysql-ndb-extra.files | \ - sed 's|^%%doc\ ||' | while read tmp; do - cd '%buildroot' - rm -f .$tmp -done -%endif %if ! 0%{preferred} > 0 cat libmysqlclient-devel.files | sed 's|%%doc\ ||' | while read tmp; do cd '%buildroot' @@ -143,10 +119,6 @@ rm -rf '%buildroot'/%_datadir/aclocal ln -s mysqlcheck '%buildroot'%_bindir/mysqlrepair ln -s mysqlcheck '%buildroot'%_bindir/mysqlanalyze ln -s mysqlcheck '%buildroot'%_bindir/mysqloptimize -%if 0%{?cluster} > 1 -ln -s libndbclient.so.6.0.0 '%buildroot'%_libdir/libndbclient.so.6.0 -ln -s libndbclient.so.6.0.0 '%buildroot'%_libdir/libndbclient.so.6 -%endif if [ -f '%buildroot'/usr/bin/mysqlaccess.conf ]; then mv '%buildroot'/usr/bin/mysqlaccess.conf '%buildroot'/etc/mysqlaccess.conf fi diff --git a/mariadb-10.0.14.tar.bz2 b/mariadb-10.0.14.tar.bz2 deleted file mode 100644 index 1724831..0000000 --- a/mariadb-10.0.14.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:be067e9a9fadbf1f32d00485ad75ca4963ab3692d575e6a737b8975457d9f117 -size 41139863 diff --git a/mariadb-10.0.15.tar.gz b/mariadb-10.0.15.tar.gz new file mode 100644 index 0000000..38ecc03 --- /dev/null +++ b/mariadb-10.0.15.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9154cb68504d469b1bac636b85e30b2b2da2586092476d6ad2f9d6bc462909d8 +size 55531927 diff --git a/mariadb.changes b/mariadb.changes index b241c20..dc30af6 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Sat Dec 6 11:44:25 UTC 2014 - michal.hrusecky@opensuse.org + +- run spec cleaner on spec +- update to 10.0.15 + * Release notes: + http://kb.askmonty.org/v/mariadb-10015-release-notes + * Changelog: + http://kb.askmonty.org/v/mariadb-10015-changelog +- conditionally enable more storage engines +- updated packaging to the latest templates + ------------------------------------------------------------------- Sun Nov 09 18:53:00 UTC 2014 - Led diff --git a/mariadb.spec b/mariadb.spec index b012448..de2cfce 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -15,36 +15,29 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# Few definitions which will alter build + %define preferred 01 -%define use_systemd 01 -%define use_cmake 01 -%define cluster 00 %define have_info 0 %define builtin_plugins partition,csv,heap,aria,pbxt,myisam,myisammrg,xtradb %define use_extra_provides 1 %define extra_provides mariadb_100 - +%define srv_vers 5.6.21 %if ! %{defined _rundir} %define _rundir %{_localstatedir}/run %endif -%if %{?rel:0}%{!?rel:1} -%define rel 1 -%endif -#Distribution: %dist -#Packager: %packager -#Vendor: %vendor +%bcond_with jemalloc +%bcond_with oqgraph +%bcond_with cassandra Name: mariadb +Version: 10.0.15 +Release: 0 Summary: Server part of MariaDB License: SUSE-GPL-2.0-with-FLOSS-exception Group: Productivity/Databases/Servers -Version: 10.0.14 -Release: 0 -%define srv_vers 5.6.20 Url: https://www.mariadb.org -Source: mariadb-%{version}.tar.bz2 +Source: https://downloads.mariadb.org/f/mariadb-%{version}/source/mariadb-%{version}.tar.gz Source2: baselibs.conf Source3: README.debug Source4: suse-test-run @@ -60,76 +53,80 @@ Source14: my.ini Source15: rc.mysql.sysvinit Source16: rc.mysql.systemd Source17: mysql.service -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} -PreReq: pwdutils -%if %have_info -PreReq: %install_info_prereq %insserv_prereq -%endif -%endif -BuildRequires: autoconf -BuildRequires: automake BuildRequires: bison +%if %{with oqgraph} || %{with cassandra} +BuildRequires: boost-devel +%endif BuildRequires: cmake +BuildRequires: fdupes BuildRequires: gcc-c++ +%if %{with jemalloc} +BuildRequires: jemalloc-devel +%endif +%if %{with oqgraph} +BuildRequires: judy-devel +%endif BuildRequires: libaio-devel +BuildRequires: libbz2-devel BuildRequires: libedit-devel BuildRequires: libevent-devel +%if %{with cassandra} +BuildRequires: libthrift-devel +%endif BuildRequires: libtool +BuildRequires: libxml2-devel +BuildRequires: lzo-devel BuildRequires: ncurses-devel BuildRequires: openssl-devel BuildRequires: pam-devel BuildRequires: procps -BuildRequires: readline-devel -BuildRequires: zlib-devel -%if 0%{?suse_version} BuildRequires: pwdutils -BuildRequires: tcpd-devel -%endif -%if 0%{?suse_version} > 1030 || 0%{?fedora_version} > 8 -BuildRequires: fdupes -%endif -%if 0%{?fedora_version} > 11 +BuildRequires: readline-devel BuildRequires: sqlite -%endif -%if 0%{?suse_version} > 1030 -Recommends: logrotate -%else -Requires: logrotate -%endif +BuildRequires: tcpd-devel +BuildRequires: zlib-devel +BuildRequires: pkgconfig(systemd) # required by rcmysql Requires: %{name}-client -Requires: %{name}-errormessages = %version -%if 0%{?suse_version} +Requires: %{name}-errormessages = %{version} Requires: perl-base -%else -Requires: perl -%endif -# systemd requirements for openSUSE >= 12.1 -%if 0%{?suse_version} >= 1210 -BuildRequires: pkgconfig(systemd) -%{?systemd_requires} -%endif -%if "%{name}" != mysql -Provides: mysql = %{srv_vers} -%endif +Requires(pre): pwdutils +Recommends: logrotate Provides: mysql-Max = %{srv_vers} -%if 0%{?use_extra_provides} > 0 -Provides: %{extra_provides} = %{version} -Obsoletes: %{extra_provides} < %{version} -%endif -%if 0%{?preferred} > 0 -%if "%{name}" != mysql -Obsoletes: mysql < %{srv_vers} -%endif -Obsoletes: mysql-Max < %{srv_vers} -%endif -Conflicts: otherproviders(mysql) # Compatibility with Fedora/CentOS Provides: mysql-server = %{srv_vers} Provides: mariadb-server = %{srv_vers} +# Compatibility with old version +Provides: %{name}-debug-version = %{srv_vers} +Obsoletes: %{name}-debug-version < %{srv_vers} +Provides: %{name}-debug = %{srv_vers} +Obsoletes: %{name}-debug < %{srv_vers} +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Conflicts: otherproviders(mysql) Conflicts: otherproviders(mysql-server) Conflicts: otherproviders(mariadb-server) +Conflicts: otherproviders(mysql-debug) +%{?systemd_requires} +%if 0%{have_info} > 0 +Requires(post): %{install_info_prereq} %insserv_prereq +%endif +%if "%{name}" != mysql +Provides: mysql = %{srv_vers} +Provides: mysql-debug = %{srv_vers} +%endif +%if 0%{?use_extra_provides} > 0 +Provides: %{extra_provides} = %{version} +Obsoletes: %{extra_provides} < %{version} +Provides: %{extra_provides}-debug-version = %{version} +Obsoletes: %{extra_provides}-debug-version < %{version} +%endif +%if 0%{?preferred} > 0 +Obsoletes: mysql-Max < %{srv_vers} +%if "%{name}" != mysql +Obsoletes: mysql < %{srv_vers} +Obsoletes: mysql-debug < %{srv_vers} +%endif +%endif %description MariaDB is a backward compatible, drop-in replacement branch of the MySQL @@ -140,16 +137,16 @@ This package only contains the server-side programs. %if 0%{?preferred} > 0 %package -n libmysqlclient-devel -# mysql-devel was last used in openSUSE 10.2 -Provides: mysql-devel = %srv_vers-%release -Obsoletes: mysql-devel < %srv_vers -Requires: glibc-devel -Requires: libmysqlclient18 = %version -Requires: libmysqlclient_r18 = %version -Requires: openssl-devel -Requires: zlib-devel Summary: MariaDB development header files and libraries Group: Development/Libraries/C and C++ +Requires: glibc-devel +Requires: libmysqlclient_r18 = %{version} +Requires: libmysqlclient18 = %{version} +Requires: openssl-devel +Requires: zlib-devel +# mysql-devel was last used in openSUSE 10.2 +Provides: mysql-devel = %{srv_vers}-%{release} +Obsoletes: mysql-devel < %{srv_vers} %description -n libmysqlclient-devel This package contains the development header files and libraries @@ -158,7 +155,7 @@ necessary to develop client applications for MariaDB. %package -n libmysqld18 Summary: MariaDB embedded server development files Group: Development/Libraries/C and C++ -Requires: %{name}-errormessages = %version +Requires: %{name}-errormessages = %{version} %description -n libmysqld18 This package contains the development header files and libraries @@ -168,8 +165,8 @@ for developing applications that embed the MariaDB. Summary: MariaDB embedded server development files Group: Development/Libraries/C and C++ # the headers files are the shared -Requires: libmysqlclient-devel = %version -Requires: libmysqld18 = %version +Requires: libmysqlclient-devel = %{version} +Requires: libmysqld18 = %{version} Requires: tcpd-devel %description -n libmysqld-devel @@ -197,23 +194,21 @@ languages and applications need to dynamically load and use MariaDB. %package client Summary: Client for MariaDB Group: Productivity/Databases/Clients +Requires: %{name}-errormessages = %{version} +Conflicts: otherproviders(mysql-client) %if "%{name}" != mysql Provides: mysql-client = %{srv_vers} %endif -%if 0%{?suse_version} -PreReq: pwdutils -%endif +Requires(pre): pwdutils %if 0%{?use_extra_provides} > 0 Provides: %{extra_provides}-client = %{version} Obsoletes: %{extra_provides}-client < %{version} %endif -Requires: %{name}-errormessages = %version %if 0%{?preferred} > 0 %if "%{name}" != mysql Obsoletes: mysql-client < %{srv_vers} %endif %endif -Conflicts: otherproviders(mysql-client) %description client This package contains the standard clients for MariaDB. @@ -227,10 +222,11 @@ This package provides the translated error messages for the standalone server daemon as well as the embedded server %package bench -Requires: %{name}-client -Requires: perl-DBD-mysql Summary: Benchmarks for MariaDB Group: Productivity/Databases/Tools +Requires: %{name}-client +Requires: perl-DBD-mysql +Conflicts: otherproviders(mysql-bench) %if "%{name}" != mysql Provides: mysql-bench = %{srv_vers} %endif @@ -243,36 +239,12 @@ Obsoletes: %{extra_provides}-bench < %{version} Obsoletes: mysql-bench < %{srv_vers} %endif %endif -Conflicts: otherproviders(mysql-bench) %description bench This package contains benchmark scripts and data for MariaDB. To run these database benchmarks, start the script "run-all-tests" in -the directory /usr/share/sql-bench after starting MariaDB. - - -%package debug-version -Summary: MariaDB with debug options turned on -Group: Productivity/Databases/Servers -Requires: %{name} = %{version} -Provides: %{name}-debug = %{srv_vers} -Provides: mysql-debug = %{srv_vers} -%if 0%{?use_extra_provides} > 0 -Provides: %{extra_provides}-debug-verion = %{version} -Obsoletes: %{extra_provides}-debug-version < %{version} -%endif -%if 0%{?preferred} > 0 -Obsoletes: mysql-debug < %{srv_vers} -%endif -Conflicts: otherproviders(mysql-debug) - -%description debug-version -A version of the MariaDB that has some debug code turned on. -It should be only used to track down problems with the standard -servers. Note that merely installing this package will bot replace the -standard server. Read /usr/share/doc/packages/mysql/README.debug for -information on how to use the debug server. +the directory %{_datadir}/sql-bench after starting MariaDB. %package test Summary: Testsuite for MariaDB @@ -282,6 +254,7 @@ Requires: %{name}-bench = %{version} Requires: %{name}-client = %{version} Requires: %{name}-tools = %{version} Requires: perl-DBD-mysql +Conflicts: otherproviders(mysql-test) %if "%{name}" != mysql Provides: mysql-test = %{srv_vers} %endif @@ -294,23 +267,23 @@ Obsoletes: %{extra_provides}-test < %{version} Obsoletes: mysql-test < %{srv_vers} %endif %endif -Conflicts: otherproviders(mysql-test) %description test This package contains the test scripts and data for MariaDB. -To run the testsuite, run /usr/share/mysql-test/suse-test-run. +To run the testsuite, run %{_datadir}/mysql-test/suse-test-run. %package tools Summary: MariaDB tools Group: Productivity/Databases/Servers Requires: perl-DBD-mysql # make sure this package is installed when updating from 10.2 and older -Provides: mysql-client:/usr/bin/perror +Provides: mysql-client:%{_bindir}/perror +Provides: mysql:%{_bindir}/mysqlhotcopy +Conflicts: otherproviders(mysql-tools) %if "%{name}" != mysql Provides: mysql-tools = %{srv_vers} %endif -Provides: mysql:/usr/bin/mysqlhotcopy %if 0%{?use_extra_provides} > 0 Provides: %{extra_provides}-tools = %{version} Obsoletes: %{extra_provides}-tools < %{version} @@ -320,88 +293,18 @@ Obsoletes: %{extra_provides}-tools < %{version} Obsoletes: mysql-tools < %{srv_vers} %endif %endif -Conflicts: otherproviders(mysql-tools) %description tools A set of scripts for administering a MariaDB or developing applications with MariaDB. -%if 0%{?cluster} > 0 - -%if 0%{?cluster} > 1 -%package -n libndbclient6 -Summary: Shared Libraries for cluster client -Group: Development/Libraries/Other - -%description -n libndbclient6 -This package contains the shared libraries (.so) which certain -languages and applications need to dynamically load and use MariaDB -cluster. - -%endif - -%package ndb-storage -Summary: MariaDB - ndbcluster storage engine -Group: Productivity/Databases/Servers -%if "%{name}" != mysql -Provides: mysql-ndb-storage = %{srv_vers} -Obsoletes: mysql-ndb-storage < %{srv_vers} -%endif -Conflicts: otherproviders(mysql-ndb-storage) - -%description ndb-storage -This package contains the ndbcluster storage engine. -It is necessary to have this package installed on all -computers that should store ndbcluster table data. - - -%package ndb-management -Summary: MariaDB - ndbcluster storage engine management -Group: Productivity/Databases/Servers -%if "%{name}" != mysql -Provides: mysql-ndb-management = %{srv_vers} -Obsoletes: mysql-ndb-management < %{srv_vers} -%endif -Conflicts: otherproviders(mysql-ndb-management) - -%description ndb-management -This package contains ndbcluster storage engine management. -It is necessary to have this package installed on at least -one computer in the cluster. - -%package ndb-tools -Summary: MariaDB - ndbcluster storage engine basic tools -Group: Productivity/Databases/Servers -%if "%{name}" != mysql -Provides: mysql-ndb-tools = %{srv_vers} -Obsoletes: mysql-ndb-tools < %{srv_vers} -%endif -Conflicts: otherproviders(mysql-ndb-tools) - -%description ndb-tools -This package contains ndbcluster storage engine basic tools. - -%package ndb-extra -Summary: MariaDB - ndbcluster storage engine extra tools -Group: Productivity/Databases/Servers -%if "%{name}" != mysql -Provides: mysql-ndb-extra = %{srv_vers} -Obsoletes: mysql-ndb-extra < %{srv_vers} -%endif -Conflicts: otherproviders(mysql-ndb-extra) - -%description ndb-extra -This package contains some extra ndbcluster storage engine tools for the -advanced user. They should be used with caution. -%endif - %prep %setup -q -n mariadb-%{version} -D -a 9 -cp %_sourcedir/README.SUSE . -cp %_sourcedir/suse-test-run . +cp %{_sourcedir}/README.SUSE . +cp %{_sourcedir}/suse-test-run . # apply patches from series -mysql-patches/tools/quilt-setup.sh "%{S:12}" -mysql-patches/tools/apply-series.sh "%{S:12}" +mysql-patches/tools/quilt-setup.sh "%{SOURCE12}" +mysql-patches/tools/apply-series.sh "%{SOURCE12}" # remove unneeded manpages ('make install' basically installs everything under # man/*) rm -f man/mysqlman.1 # dummy fallback manpage @@ -414,7 +317,7 @@ rm -f man/comp_err.1 # built-time utility rm -f man/ndbd_redo_log_reader.1 # breaks VPATH builds when in sourcedir, is generated in the builddirs rm -f sql/sql_builtin.cc -sed -i 's|@localstatedir@|/var/log|' support-files/mysql-log-rotate.sh +sed -i 's|@localstatedir@|%{_localstatedir}/log|' support-files/mysql-log-rotate.sh %if 0%{preferred} < 1 for i in `grep -Rl mysqlclient .`; do sed -i 's|mysqlclient|mysqlclient|g' $i @@ -425,78 +328,73 @@ done rm -f mysql-test/t/file_contents.test mysql-test/r/file_contents.result # Specify perl path on shebangs for i in `grep -Rl '^#!@PERL@$' .`; do - sed -i 's|@PERL@|/usr/bin/perl|' $i + sed -i 's|@PERL@|%{_bindir}/perl|' $i done %build -%{expand:%(cat %_sourcedir/build.inc)} +%{expand:%(cat %{_sourcedir}/build.inc)} %install -%{expand:%(cat %_sourcedir/install.inc)} +%{expand:%(cat %{_sourcedir}/install.inc)} %pre -/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 2> /dev/null || : -# systemd requirment -%if 0%{?suse_version} >= 1210 +%{_sbindir}/groupadd -r mysql >/dev/null 2>/dev/null || : +%{_sbindir}/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \ + -s /bin/false -d %{_localstatedir}/lib/mysql mysql 2> /dev/null || : +%{_sbindir}/usermod -g mysql -s /bin/false mysql 2> /dev/null || : %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 2> /dev/null || : +%{_sbindir}/groupadd -r mysql >/dev/null 2>/dev/null || : +%{_sbindir}/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \ + -s /bin/false -d %{_localstatedir}/lib/mysql mysql 2> /dev/null || : +%{_sbindir}/usermod -g mysql -s /bin/false mysql 2> /dev/null || : %post -# systemd requirment -%if 0%{?suse_version} >= 1210 %service_add_post mysql.service -%endif ####################################################################### # preun and posttran takes care of restart # ####################################################################### + %preun -[ $1 = 1 ] || /usr/sbin/rcmysql stop || true +[ $1 = 1 ] || %{_sbindir}/rcmysql stop || true %pretrans -p -if posix.access("/usr/sbin/rcmysql", "x") then - restart = os.execute("/usr/sbin/rcmysql status > /dev/null") +if posix.access("%{_sbindir}/rcmysql", "x") then + restart = os.execute("%{_sbindir}/rcmysql status > /dev/null") if restart == 0 then - os.execute("/usr/sbin/rcmysql stop") + os.execute("%{_sbindir}/rcmysql stop") os.execute("/bin/mkdir -p %{_rundir}/mysql/restart") end end %posttrans -%if %have_info +%if 0%{have_info} > 0 [ -z "`ls %{_infodir}/mysql.info.* 2> /dev/null`" ] || \ %install_info --info-dir=%{_infodir} %{_infodir}/mysql.info.* %endif -if [ -d /var/lib/mysql ]; then - touch /var/lib/mysql/.run-mysql_upgrade +if [ -d %{_localstatedir}/lib/mysql ]; then + touch %{_localstatedir}/lib/mysql/.run-mysql_upgrade fi for in in protected tmp; do - rmdir /var/lib/mysql/.$i 2>/dev/null || : + rmdir %{_localstatedir}/lib/mysql/.$i 2>/dev/null || : done # start mysql again if it should run -if [ "`ls /etc/rc.d/rc*.d/S*mysql 2> /dev/null`" ] || [ -d %{_rundir}/mysql/restart ]; then - [ -x /usr/sbin/rcmysql ] && /usr/sbin/rcmysql start +if [ "`ls %{_sysconfdir}/rc.d/rc*.d/S*mysql 2> /dev/null`" ] || [ -d %{_rundir}/mysql/restart ]; then + [ -x %{_sbindir}/rcmysql ] && %{_sbindir}/rcmysql start # Might not be there, so ignoring errors rmdir %{_rundir}/mysql/restart 2> /dev/null || : fi # warn on first run -datadir="/var/lib/mysql" -if [ -x /usr/bin/my_print_defaults ]; then - datadir="`/usr/bin/my_print_defaults mysqld mysql_server | sed -n 's|--datadir=||p'`" - [ "$datadir" ] || datadir="/var/lib/mysql" +datadir="%{_localstatedir}/lib/mysql" +if [ -x %{_bindir}/my_print_defaults ]; then + datadir="`%{_bindir}/my_print_defaults mysqld mysql_server | sed -n 's|--datadir=||p'`" + [ "$datadir" ] || datadir="%{_localstatedir}/lib/mysql" fi if [ \! -d "$datadir/mysql" ]; then -cat > /var/adm/update-messages/%{name}-%{version}-%{release} << EOF -%(cat %_sourcedir/README.install) +cat > %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} << EOF +%(cat %{_sourcedir}/README.install) EOF fi @@ -512,12 +410,6 @@ fi %postun -n libmysqlclient_r18 -p /sbin/ldconfig -%if 0%{cluster} > 1 -%post -n libndbclient6 -p /sbin/ldconfig - -%postun -n libndbclient6 -p /sbin/ldconfig -%endif - %if 0%{preferred} > 0 %post -n libmysqld18 -p /sbin/ldconfig @@ -526,13 +418,13 @@ fi %postun if [ $1 = 0 ]; then - %if %have_info + %if 0%{have_info} > 0 %install_info_delete --info-dir=%{_infodir} %{_infodir}/mysql.info.* %endif - %{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 || : + %insserv_cleanup + rm -f "%{_localstatedir}/lib/systemd/migrated/mysql.service" + if [ -x %{_bindir}/systemctl ]; then + %{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || : fi fi @@ -542,35 +434,31 @@ fi %files -f mysql.files %defattr(-, root, root) -%config(noreplace) %attr(0640, root, mysql) /etc/my.cnf -%dir %attr(0750, root, mysql) /etc/my.cnf.d -%config(noreplace) %attr(0640, root, mysql) /etc/my.cnf.d/* -%config /etc/logrotate.d/mysql +%config(noreplace) %attr(0640, root, mysql) %{_sysconfdir}/my.cnf +%dir %attr(0750, root, mysql) %{_sysconfdir}/my.cnf.d +%config(noreplace) %attr(0640, root, mysql) %{_sysconfdir}/my.cnf.d/* +%config %{_sysconfdir}/logrotate.d/mysql %doc %{_defaultdocdir}/%{name} -%if %have_info +%if 0%{have_info} > 0 %doc %{_infodir}/mysql.info.* %endif -%if 0%{?use_systemd} > 0 -%dir /usr/lib/mysql -/usr/lib/mysql/rcmysql -/usr/lib/systemd/system/mysql.service -%else -/etc/init.d/mysql -%endif -/usr/sbin/rcmysql -%dir /usr/share/%{name} -%dir /usr/share/mysql -/usr/share/%{name}/charsets/ -/usr/share/%{name}/*.sql +%dir %{_libexecdir}/mysql +%{_libexecdir}/mysql/rcmysql +%{_libexecdir}/systemd/system/mysql.service +%{_sbindir}/rcmysql +%dir %{_datadir}/%{name} +%dir %{_datadir}/mysql +%{_datadir}/%{name}/charsets/ +%{_datadir}/%{name}/*.sql %dir %{_libdir}/mysql %{_libdir}/mysql/mysqld.sym -%config /etc/sysconfig/SuSEfirewall2.d/services/mysql -%dir %_libdir/mysql/plugin -%_libdir/mysql/plugin/[!d]*.so +%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/mysql +%dir %{_libdir}/mysql/plugin +%{_libdir}/mysql/plugin/[!d]*.so %files errormessages -f errormessages.files %defattr(-, root, root) -/usr/share/%{name}/*/errmsg.sys +%{_datadir}/%{name}/*/errmsg.sys %files client -f mysql-client.files %defattr(-, root, root) @@ -578,70 +466,48 @@ fi %if 0%{preferred} > 0 %files -n libmysqlclient-devel -f libmysqlclient-devel.files %defattr(-, root, root) -/usr/include/mysql +%{_includedir}/mysql %{_libdir}/libmysqlclient.so %{_libdir}/libmysqlclient_r.so -%dir /usr/share/aclocal -/usr/share/aclocal/mysql.m4 +%dir %{_datadir}/aclocal +%{_datadir}/aclocal/mysql.m4 %files -n libmysqld-devel %defattr(-,root,root) -%_libdir/libmysqld.a -%_libdir/libmysqld.so +%{_libdir}/libmysqld.a +%{_libdir}/libmysqld.so %files -n libmysqld18 %defattr(-,root,root) -%_libdir/libmysqld.so.* +%{_libdir}/libmysqld.so.* %endif %files -n libmysqlclient18 %defattr(-, root, root) %{_libdir}/libmysqlclient.so.* -%if 0%{cluster} > 1 -%files -n libndbclient6 -%defattr(-, root, root) -%{_libdir}/libndbclient.so.* -%endif - %files -n libmysqlclient_r18 %defattr(-, root, root) %{_libdir}/libmysqlclient_r.so.* %files bench -f mysql-bench.files %defattr(-, root, root) -/usr/share/sql-bench - -%files debug-version -%defattr(-, root, root) -/usr/sbin/mysqld-debug -%{_libdir}/mysql/mysqld-debug.sym +%{_datadir}/sql-bench %files test -f mysql-test.files %defattr(-, root, root) %{_bindir}/my_safe_process -%_mandir/man1/mysql-test-run.pl.1* -%_mandir/man1/mysql-stress-test.pl.1* -/usr/share/mysql-test/valgrind.supp -%dir %attr(755, root, root)/usr/share/mysql-test -/usr/share/mysql-test/[^v]* -%dir %attr(755, mysql, mysql) /usr/share/mysql-test/var +%{_mandir}/man1/mysql-test-run.pl.1* +%{_mandir}/man1/mysql-stress-test.pl.1* +%{_datadir}/mysql-test/valgrind.supp +%dir %attr(755, root, root)%{_datadir}/mysql-test +%{_datadir}/mysql-test/[^v]* +%dir %attr(755, mysql, mysql) %{_datadir}/mysql-test/var %files tools -f mysql-tools.files %defattr(-, root, root) -%_bindir/mysqlrepair -%_bindir/mysqlanalyze -%_bindir/mysqloptimize - -%if 0%{cluster} > 0 -%files ndb-storage -f mysql-ndb-storage.files - -%files ndb-management -f mysql-ndb-management.files - -%files ndb-tools -f mysql-ndb-tools.files - -%files ndb-extra -f mysql-ndb-extra.files - -%endif +%{_bindir}/mysqlrepair +%{_bindir}/mysqlanalyze +%{_bindir}/mysqloptimize %changelog diff --git a/mysql-patches.tar.bz2 b/mysql-patches.tar.bz2 index 4945c0b..400fc40 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:d4bdfe7f2ac1d759c8ef4e0f05d7b4688685b572f833b66e6b05f14b152a3e6d -size 24164 +oid sha256:02c61051825891fbada58946b83323752bd0efbc0867bed0d98c1671e62255cd +size 25221 diff --git a/rc.mysql.systemd b/rc.mysql.systemd index 5ef8f45..7bb80e6 100644 --- a/rc.mysql.systemd +++ b/rc.mysql.systemd @@ -301,9 +301,9 @@ else unset MYSQLD # use mysqld-debug only if explicitly requested (TODO: sysconfig variable?) - if test "$MYSQLD_DEBUG" = yes -a -x /usr/sbin/mysqld-debug + if test "$MYSQLD_DEBUG" = yes -a -x /usr/sbin/mysqld then - MYSQLD=/usr/sbin/mysqld-debug + MYSQLD=/usr/sbin/mysqld elif test -x /usr/sbin/mysqld-max then MYSQLD=/usr/sbin/mysqld-max @@ -502,8 +502,7 @@ else } echo "Running protected MySQL... " | tee -a "$log_upgrade" - $SAFE_MYSQLD \ - --mysqld=${MYSQLD#/usr/sbin/} \ + $MYSQLD \ $debug_flags \ --skip-networking \ --skip-grant-tables \ diff --git a/rc.mysql.sysvinit b/rc.mysql.sysvinit index 7965148..b04f371 100644 --- a/rc.mysql.sysvinit +++ b/rc.mysql.sysvinit @@ -251,9 +251,9 @@ else unset MYSQLD # use mysqld-debug only if explicitly requested (TODO: sysconfig variable?) - if test "$MYSQLD_DEBUG" = yes -a -x /usr/sbin/mysqld-debug + if test "$MYSQLD_DEBUG" = yes -a -x /usr/sbin/mysqld then - MYSQLD=/usr/sbin/mysqld-debug + MYSQLD=/usr/sbin/mysqld elif test -x /usr/sbin/mysqld-max then MYSQLD=/usr/sbin/mysqld-max @@ -452,8 +452,7 @@ else } echo "Running protected MySQL... " | tee -a "$log_upgrade" - $SAFE_MYSQLD \ - --mysqld=${MYSQLD#/usr/sbin/} \ + $MYSQLD \ $debug_flags \ --skip-networking \ --skip-grant-tables \ diff --git a/series b/series index e25e71b..761cded 100644 --- a/series +++ b/series @@ -4,14 +4,15 @@ mysql-community-server-5.1.46-logrotate.patch 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-10.0.15-mysqld_multi-features.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-10.0.11-group.patch mariadb-10.0.5-deharcode-libdir.patch -mariadb-10.0.14-upgrade-datadir.patch +mariadb-10.0.15-upgrade-datadir.patch mysql-community-server-5.6.12-srv_buf_size.patch mariadb-10.0.9-perl-in-bench.patch mariadb-10.0.11-header_files_const_warnings.patch -mariadb-10.0.13-default-source.patch +mariadb-10.0.15-default-source.patch +mariadb-10.0.15-fortify-and-O.patch From 2dd25a72517e39570295e794cc2dd754941c4a7ec7c128169eb5b0d9d37c92b1 Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Sun, 7 Dec 2014 12:38:26 +0000 Subject: [PATCH 02/12] test OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=162 --- configuration-tweaks.tar.bz2 | 4 ++-- install.inc | 1 - mysql-patches.tar.bz2 | 4 ++-- series | 1 - 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/configuration-tweaks.tar.bz2 b/configuration-tweaks.tar.bz2 index de3a380..f2f2b3c 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:000e093b6d758ad1df72239727cc7c78e91f962a44999ce78779a5e22f158675 -size 219 +oid sha256:e4312d7a8132189453340e519c8aee70791e450933d8f47bf734f9db0f83a5c5 +size 221 diff --git a/install.inc b/install.inc index 9d812d7..b3ce1cb 100644 --- a/install.inc +++ b/install.inc @@ -42,7 +42,6 @@ filelist() popd >/dev/null } filelist innochecksum my_print_defaults myisam_ftdump myisamchk myisamlog myisampack mysql_fix_extensions mysql_fix_privilege_tables mysql_install_db mysql_secure_installation mysql_upgrade mysqlbug mysqld mysqld_multi mysqld_safe mysqlbinlog mysqldumpslow mysqlmanager mroonga resolve_stack_dump resolveip {m,}aria_chk {m,}aria_dump_log {m,}aria_ftdump {m,}aria_pack {m,}aria_read_log xtstat tokuftdump >mysql.files -[ \! -d %buildroot/usr/share/*/mroonga ] || echo filelist mysql mysqladmin mysqlcheck mysqldump mysqlimport mysqlshow mysql_config_editor >mysql-client.files filelist mysql_config /usr/share/pkgconfig/mariadb.pc >libmysqlclient-devel.files filelist mysqlslap >mysql-bench.files diff --git a/mysql-patches.tar.bz2 b/mysql-patches.tar.bz2 index 400fc40..99c2cef 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:02c61051825891fbada58946b83323752bd0efbc0867bed0d98c1671e62255cd -size 25221 +oid sha256:5e9ac15a785b668ccb91195417b664645ff7229c0cf50eb5bf0862d8237206e8 +size 25032 diff --git a/series b/series index 761cded..1cabaaf 100644 --- a/series +++ b/series @@ -14,5 +14,4 @@ mariadb-10.0.15-upgrade-datadir.patch mysql-community-server-5.6.12-srv_buf_size.patch mariadb-10.0.9-perl-in-bench.patch mariadb-10.0.11-header_files_const_warnings.patch -mariadb-10.0.15-default-source.patch mariadb-10.0.15-fortify-and-O.patch From d617d57d8c1cab3bde22307c847ed41fd0b545e26b36207dd24d57d3b81c2ca5 Mon Sep 17 00:00:00 2001 From: Christos Gourdoupis Date: Mon, 12 Jan 2015 20:33:16 +0000 Subject: [PATCH 03/12] - Fix include dir in alternative cnf files (bnc #859345) OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=163 --- mariadb.changes | 5 +++++ mysql-patches.tar.bz2 | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mariadb.changes b/mariadb.changes index dc30af6..f4dc9a6 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jan 12 20:29:24 UTC 2015 - xrigou@otenet.gr + +- Fix include dir in alternative cnf files (bnc #859345) + ------------------------------------------------------------------- Sat Dec 6 11:44:25 UTC 2014 - michal.hrusecky@opensuse.org diff --git a/mysql-patches.tar.bz2 b/mysql-patches.tar.bz2 index 99c2cef..071b969 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:5e9ac15a785b668ccb91195417b664645ff7229c0cf50eb5bf0862d8237206e8 -size 25032 +oid sha256:ac425e8094f738ad9594c2b76b49bfbdd492c923bce3e50755f3189a80eaa72e +size 25131 From 81ede2b5b695972cc0d18ad10b2e28dafcaf1a2f9fbdb8ee1504022295c1d24f Mon Sep 17 00:00:00 2001 From: Christos Gourdoupis Date: Fri, 23 Jan 2015 19:25:53 +0000 Subject: [PATCH 04/12] - Fix undefined initial status in systemd script (boo #914370) OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=164 --- mariadb.changes | 5 +++++ rc.mysql.systemd | 3 +++ 2 files changed, 8 insertions(+) diff --git a/mariadb.changes b/mariadb.changes index f4dc9a6..01a8571 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jan 23 19:17:09 UTC 2015 - xrigou@otenet.gr + +- Fix undefined initial status in systemd script (boo #914370) + ------------------------------------------------------------------- Mon Jan 12 20:29:24 UTC 2015 - xrigou@otenet.gr diff --git a/rc.mysql.systemd b/rc.mysql.systemd index 7bb80e6..04e49b7 100644 --- a/rc.mysql.systemd +++ b/rc.mysql.systemd @@ -86,6 +86,9 @@ rc_reset () return 0 } +# First reset status of this service +rc_reset + # Return values acc. to LSB for all commands but status: # 0 - success # 1 - generic or unspecified error From 5bd6f1bd842f1e3a44f34d0a9b8b5bfe05af615d5762f91ec2e1d01c60b24c7b Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Mon, 2 Mar 2015 18:14:06 +0000 Subject: [PATCH 05/12] Accepting request 288527 from home:mgorse:branches:server:database - README.SuSE is now README.SUSE; fix name in some places. OBS-URL: https://build.opensuse.org/request/show/288527 OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=165 --- install.inc | 2 +- mariadb.changes | 5 +++++ rc.mysql.systemd | 4 ++-- rc.mysql.sysvinit | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/install.inc b/install.inc index b3ce1cb..1299f88 100644 --- a/install.inc +++ b/install.inc @@ -71,7 +71,7 @@ errmsg_list() errmsg_list > errormessages.files ### files not installed by make install # Create directory structure -DOCS=(COPYING README EXCEPTIONS-CLIENT %_sourcedir/README.debug %_sourcedir/README.SuSE plugin/daemon_example/daemon_example.ini) +DOCS=(COPYING README EXCEPTIONS-CLIENT %_sourcedir/README.debug %_sourcedir/README.SUSE plugin/daemon_example/daemon_example.ini) DOCDIR=%buildroot%_defaultdocdir/%name install -d -m 755 ${DOCDIR} install -d -m 755 %buildroot/etc/logrotate.d diff --git a/mariadb.changes b/mariadb.changes index 01a8571..66963b5 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Mar 2 17:25:47 UTC 2015 - mgorse@suse.com + +- README.SuSE is now README.SUSE; fix name in some places. + ------------------------------------------------------------------- Fri Jan 23 19:17:09 UTC 2015 - xrigou@otenet.gr diff --git a/rc.mysql.systemd b/rc.mysql.systemd index 04e49b7..1b71746 100644 --- a/rc.mysql.systemd +++ b/rc.mysql.systemd @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 1995-2014 SuSE Linux AG Nuernberg, Germany. +# Copyright (c) 1995-2015 SUSE Linux AG Nuernberg, Germany. # # Author: Lenz Grimmer # Maintainer: Michal Hrusecky @@ -445,7 +445,7 @@ else 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" + echo " /usr/share/doc/packages/mysql/README.SUSE" | tee -a "$log_upgrade" sed -i -e 's|^\([[:blank:]]*\)skip-locking|\1skip-external-locking|' \ -e 's|^\([[:blank:]]*skip-federated\)|#\1|' /etc/my.cnf [ -d /etc/mysql ] || \ diff --git a/rc.mysql.sysvinit b/rc.mysql.sysvinit index b04f371..41e7478 100644 --- a/rc.mysql.sysvinit +++ b/rc.mysql.sysvinit @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 1995-2014 SuSE Linux AG Nuernberg, Germany. +# Copyright (c) 1995-2015 SUSE Linux AG Nuernberg, Germany. # # Author: Lenz Grimmer # Maintainer: Michal Hrusecky @@ -392,7 +392,7 @@ else 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" + echo " /usr/share/doc/packages/mysql/README.SUSE" | tee -a "$log_upgrade" sed -i -e 's|^\([[:blank:]]*\)skip-locking|\1skip-external-locking|' \ -e 's|^\([[:blank:]]*skip-federated\)|#\1|' /etc/my.cnf [ -d /etc/mysql ] || \ From b6653d8e22782b9dabf3d6e5fd0b3794907597bd7b4581fca4e1b341b431a54e Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Tue, 3 Mar 2015 08:15:49 +0000 Subject: [PATCH 06/12] - Updated to the version 10.0.17 * Release notes: http://kb.askmonty.org/v/mariadb-10017-release-notes * Changelog: http://kb.askmonty.org/v/mariadb-10017-changelog - merged patches to packaging git and regenerated * few fixes mainly to upgrades OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=166 --- build.inc | 1 + configuration-tweaks.tar.bz2 | 2 +- mariadb-10.0.15.tar.gz | 3 -- mariadb-10.0.17.tar.gz | 3 ++ mariadb.changes | 11 ++++++ mariadb.spec | 72 ++++++++++++++++++++++++------------ mysql-patches.tar.bz2 | 4 +- rc.mysql.systemd | 28 ++++---------- rc.mysql.sysvinit | 21 ++--------- series | 5 +-- 10 files changed, 81 insertions(+), 69 deletions(-) delete mode 100644 mariadb-10.0.15.tar.gz create mode 100644 mariadb-10.0.17.tar.gz diff --git a/build.inc b/build.inc index f12d8fc..51e5e21 100644 --- a/build.inc +++ b/build.inc @@ -29,6 +29,7 @@ export CXXFLAGS="$CFLAGS -felide-constructors" %endif -DWITH_XTRADB_STORAGE_ENGINE=1 \ -DWITH_CSV_STORAGE_ENGINE=1 \ + -DWITH_HANDLERSOCKET_STORAGE_ENGINE=1 \ -DWITH_EMBEDDED_SERVER=true \ -DCOMPILATION_COMMENT="openSUSE package" \ -DDENABLE_DOWNLOADS=false \ diff --git a/configuration-tweaks.tar.bz2 b/configuration-tweaks.tar.bz2 index f2f2b3c..8548ca2 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:e4312d7a8132189453340e519c8aee70791e450933d8f47bf734f9db0f83a5c5 +oid sha256:55f9dc7300fa294189c5e74d950bdbcefd48bdc916a8f4521a86d1e284fc451b size 221 diff --git a/mariadb-10.0.15.tar.gz b/mariadb-10.0.15.tar.gz deleted file mode 100644 index 38ecc03..0000000 --- a/mariadb-10.0.15.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9154cb68504d469b1bac636b85e30b2b2da2586092476d6ad2f9d6bc462909d8 -size 55531927 diff --git a/mariadb-10.0.17.tar.gz b/mariadb-10.0.17.tar.gz new file mode 100644 index 0000000..44c82a8 --- /dev/null +++ b/mariadb-10.0.17.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9cd394e99942c3700b13f2bf126895fe587e668bfcaffcfd81f0cd878fc19311 +size 55989700 diff --git a/mariadb.changes b/mariadb.changes index 66963b5..e31ba02 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Mar 3 05:48:08 UTC 2015 - michal.hrusecky@opensuse.org + +- Updated to the version 10.0.17 + * Release notes: + http://kb.askmonty.org/v/mariadb-10017-release-notes + * Changelog: + http://kb.askmonty.org/v/mariadb-10017-changelog +- merged patches to packaging git and regenerated + * few fixes mainly to upgrades + ------------------------------------------------------------------- Mon Mar 2 17:25:47 UTC 2015 - mgorse@suse.com diff --git a/mariadb.spec b/mariadb.spec index de2cfce..7f74f82 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -21,7 +21,7 @@ %define builtin_plugins partition,csv,heap,aria,pbxt,myisam,myisammrg,xtradb %define use_extra_provides 1 %define extra_provides mariadb_100 -%define srv_vers 5.6.21 +%define srv_vers 5.6.26 %if ! %{defined _rundir} %define _rundir %{_localstatedir}/run %endif @@ -31,7 +31,7 @@ %bcond_with cassandra Name: mariadb -Version: 10.0.15 +Version: 10.0.17 Release: 0 Summary: Server part of MariaDB License: SUSE-GPL-2.0-with-FLOSS-exception @@ -79,6 +79,7 @@ BuildRequires: lzo-devel BuildRequires: ncurses-devel BuildRequires: openssl-devel BuildRequires: pam-devel +BuildRequires: pcre-devel BuildRequires: procps BuildRequires: pwdutils BuildRequires: readline-devel @@ -360,42 +361,67 @@ done %preun [ $1 = 1 ] || %{_sbindir}/rcmysql stop || true -%pretrans -p -if posix.access("%{_sbindir}/rcmysql", "x") then - restart = os.execute("%{_sbindir}/rcmysql status > /dev/null") - if restart == 0 then - os.execute("%{_sbindir}/rcmysql stop") - os.execute("/bin/mkdir -p %{_rundir}/mysql/restart") - end -end - %posttrans %if 0%{have_info} > 0 [ -z "`ls %{_infodir}/mysql.info.* 2> /dev/null`" ] || \ %install_info --info-dir=%{_infodir} %{_infodir}/mysql.info.* %endif -if [ -d %{_localstatedir}/lib/mysql ]; then - touch %{_localstatedir}/lib/mysql/.run-mysql_upgrade -fi +rm -f %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} for in in protected tmp; do rmdir %{_localstatedir}/lib/mysql/.$i 2>/dev/null || : done -# start mysql again if it should run -if [ "`ls %{_sysconfdir}/rc.d/rc*.d/S*mysql 2> /dev/null`" ] || [ -d %{_rundir}/mysql/restart ]; then - [ -x %{_sbindir}/rcmysql ] && %{_sbindir}/rcmysql start - # Might not be there, so ignoring errors - rmdir %{_rundir}/mysql/restart 2> /dev/null || : +# During package rename, there might be config file move +if [ -f /etc/my.cnf.rpmsave ]; then + mv /etc/my.cnf{,.rpmnew} + mv /etc/my.cnf{.rpmsave,} +cat >> %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} << EOF + +WARNING: /etc/my.cnf.rpmsave file detected! + +This probably means that you are upgrading from different variant of MySQL. +Your original configuration file was restored. If it is not a case, you can +find your original /etc/my.cnf as /etc/my.cnf.rpmnew + +EOF + fi # warn on first run -datadir="%{_localstatedir}/lib/mysql" if [ -x %{_bindir}/my_print_defaults ]; then datadir="`%{_bindir}/my_print_defaults mysqld mysql_server | sed -n 's|--datadir=||p'`" - [ "$datadir" ] || datadir="%{_localstatedir}/lib/mysql" fi -if [ \! -d "$datadir/mysql" ]; then -cat > %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} << EOF +[ -n "$datadir" ] || datadir="%{_localstatedir}/lib/mysql" +if [ -d "$datadir/mysql" ]; then + touch "$datadir/.run-mysql_upgrade" +fi +for in in protected tmp; do + rmdir "$datadir"/.$i 2>/dev/null || : +done +if [ \! -f "$datadir/mysql_upgrade_info" ]; then +cat >> %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} << EOF + %(cat %{_sourcedir}/README.install) + EOF +else +MYSQLVER="`echo %{version} | sed 's|\.[0-9]\+$||'`" +if [ -f "$datadir/mysql_upgrade_info" ] && \ + [ -z "`grep "^$MYSQLVER" "$datadir/mysql_upgrade_info" 2> /dev/null`" ]; then +cat >> %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} << EOF + +WARNING: You are upgrading from different stable version of MySQL! + +Your database will be migrated automatically during next restart of MySQL. +Before you do that make sure you have up to date backup of your data. It +should be mainly in $datadir directory. + +EOF +fi +fi +# start mysql again if it should run - migration from old setup +if [ -d %{_rundir}/mysql/restart ]; then + [ -x %{_sbindir}/rcmysql ] && %{_sbindir}/rcmysql start + # Might not be there, so ignoring errors + rmdir %{_rundir}/mysql/restart 2> /dev/null fi ####################################################################### diff --git a/mysql-patches.tar.bz2 b/mysql-patches.tar.bz2 index 071b969..b1745f9 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:ac425e8094f738ad9594c2b76b49bfbdd492c923bce3e50755f3189a80eaa72e -size 25131 +oid sha256:89209fffcb7d65e02821e9a7e2d53e9670d3dbecbc242044142ca49de2ad54f1 +size 14752 diff --git a/rc.mysql.systemd b/rc.mysql.systemd index 1b71746..5beff54 100644 --- a/rc.mysql.systemd +++ b/rc.mysql.systemd @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 1995-2015 SUSE Linux AG Nuernberg, Germany. +# Copyright (c) 1995-2014 SuSE Linux AG Nuernberg, Germany. # # Author: Lenz Grimmer # Maintainer: Michal Hrusecky @@ -32,6 +32,10 @@ # rc_reset clear local rc status (overall remains) # rc_exit exit appropriate to overall rc status +_rc_status_ret=0 +_rc_status=$_rc_status_ret +_rc_status_all=$_rc_status + rc_check () { _rc_status_ret=$? @@ -86,9 +90,6 @@ rc_reset () return 0 } -# First reset status of this service -rc_reset - # Return values acc. to LSB for all commands but status: # 0 - success # 1 - generic or unspecified error @@ -425,22 +426,7 @@ else # Run mysql_upgrade on every package install/upgrade. Not always # necessary, but doesn't do any harm. On big upgrade, require # user confirmation. - if [ -f "/var/lib/mysql/.run-mysql_upgrade" ]; then - if [ \! -f "/var/lib/mysql/.force_upgrade" ] && \ - [ -f "$datadir/mysql_upgrade_info" ] && \ - [ -z "`grep "^$MYSQLVER" "$datadir/mysql_upgrade_info" 2> /dev/null`" ]; then - echo - echo "You are upgrading from different stable version of MySQL!" - echo "Make sure you to make backup of your data (mostly $datadir)!" - echo - echo "If you want to continue upgrading your database, run following commands:" - echo - echo " touch /var/lib/mysql/.force_upgrade" - echo " rcmysql restart" - echo - rc_failed; rc_status -v; rc_exit - - fi + if [ -f "$datadir/.run-mysql_upgrade" ]; then echo > "$log_upgrade" echo "`LANG="" date` - upgrading MySQL..." >> "$log_upgrade" echo >> "$log_upgrade" @@ -566,6 +552,8 @@ else rm -f /var/lib/mysql/.run-mysql_upgrade rm -f /var/lib/mysql/.force_upgrade rm -f "$datadir"/{update-stamp-*,mysql/stamp-4.1} # used in the past + MYSQLVERSION="`mysqld --version 2> /dev/null | sed -n 's|mysqld[[:blank:]]\+Ver[[:blank:]]\+\([^[:blank:]]\+\)[[:blank:]].*|\1|p'`" + [ -z "$MYSQLVERSION" ] || echo "$MYSQLVERSION" > "$datadir"/mysql_upgrade_info chown --no-dereference "$mysql_daemon_user:$mysql_daemon_group" "$log_upgrade" chmod 640 "$log_upgrade" fi diff --git a/rc.mysql.sysvinit b/rc.mysql.sysvinit index 41e7478..edb9631 100644 --- a/rc.mysql.sysvinit +++ b/rc.mysql.sysvinit @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 1995-2015 SUSE Linux AG Nuernberg, Germany. +# Copyright (c) 1995-2014 SuSE Linux AG Nuernberg, Germany. # # Author: Lenz Grimmer # Maintainer: Michal Hrusecky @@ -372,22 +372,7 @@ else # Run mysql_upgrade on every package install/upgrade. Not always # necessary, but doesn't do any harm. On big upgrade, require # user confirmation. - if [ -f "/var/lib/mysql/.run-mysql_upgrade" ]; then - if [ \! -f "/var/lib/mysql/.force_upgrade" ] && \ - [ -f "$datadir/mysql_upgrade_info" ] && \ - [ -z "`grep "^$MYSQLVER" "$datadir/mysql_upgrade_info" 2> /dev/null`" ]; then - echo - echo "You are upgrading from different stable version of MySQL!" - echo "Make sure you to make backup of your data (mostly $datadir)!" - echo - echo "If you want to continue upgrading your database, run following commands:" - echo - echo " touch /var/lib/mysql/.force_upgrade" - echo " rcmysql restart" - echo - rc_failed; rc_status -v; rc_exit - - fi + if [ -f "$datadir/.run-mysql_upgrade" ]; then echo > "$log_upgrade" echo "`LANG="" date` - upgrading MySQL..." >> "$log_upgrade" echo >> "$log_upgrade" @@ -513,6 +498,8 @@ else rm -f /var/lib/mysql/.run-mysql_upgrade rm -f /var/lib/mysql/.force_upgrade rm -f "$datadir"/{update-stamp-*,mysql/stamp-4.1} # used in the past + MYSQLVERSION="`mysqld --version 2> /dev/null | sed -n 's|mysqld[[:blank:]]\+Ver[[:blank:]]\+\([^[:blank:]]\+\)[[:blank:]].*|\1|p'`" + [ -z "$MYSQLVERSION" ] || echo "$MYSQLVERSION" > "$datadir"/mysql_upgrade_info chown --no-dereference "$mysql_daemon_user:$mysql_daemon_group" "$log_upgrade" chmod 640 "$log_upgrade" fi diff --git a/series b/series index 1cabaaf..67dbd0d 100644 --- a/series +++ b/series @@ -8,10 +8,9 @@ mariadb-10.0.15-mysqld_multi-features.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-10.0.11-group.patch +mariadb-10.0.17-group.patch mariadb-10.0.5-deharcode-libdir.patch mariadb-10.0.15-upgrade-datadir.patch mysql-community-server-5.6.12-srv_buf_size.patch -mariadb-10.0.9-perl-in-bench.patch -mariadb-10.0.11-header_files_const_warnings.patch +mariadb-10.0.16-header_files_const_warnings.patch mariadb-10.0.15-fortify-and-O.patch From 36235da92851dfb8e0124aa23bc4901d1595531a81eddaa8e37982eaf21db69d Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Tue, 24 Mar 2015 18:24:02 +0000 Subject: [PATCH 07/12] Accepting request 292540 from home:k0da:branches:server:database - Adjust _constraints. 11GB is not enough for ppc64 builds, increase to 13GB OBS-URL: https://build.opensuse.org/request/show/292540 OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=167 --- _constraints | 2 +- mariadb.changes | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/_constraints b/_constraints index 66cbdbe..5a60940 100644 --- a/_constraints +++ b/_constraints @@ -1,7 +1,7 @@ - 11 + 13 diff --git a/mariadb.changes b/mariadb.changes index e31ba02..d1f5fbc 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 23 23:24:11 UTC 2015 - dvaleev@suse.com + +- Adjust _constraints. 11GB is not enough for ppc64 builds, + increase to 13GB + ------------------------------------------------------------------- Tue Mar 3 05:48:08 UTC 2015 - michal.hrusecky@opensuse.org From 055208ab6f3005ba937127997ea7a61e9af7a8c9268868517a5ca8d0036a26ce Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Tue, 14 Apr 2015 08:23:34 +0000 Subject: [PATCH 08/12] - disable optional features for mariadb * still possible to use them from mariadb_100 package OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=168 --- configuration-tweaks.tar.bz2 | 4 ++-- mariadb.changes | 6 ++++++ mariadb.spec | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/configuration-tweaks.tar.bz2 b/configuration-tweaks.tar.bz2 index 8548ca2..da62ce3 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:55f9dc7300fa294189c5e74d950bdbcefd48bdc916a8f4521a86d1e284fc451b -size 221 +oid sha256:1e611d2b15a920649b4c891efdb5e5c3f52ae4c8a6f0d32f7d065aab560e6a1a +size 217 diff --git a/mariadb.changes b/mariadb.changes index d1f5fbc..dfcf268 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Apr 14 08:20:47 UTC 2015 - michal.hrusecky@opensuse.org + +- disable optional features for mariadb + * still possible to use them from mariadb_100 package + ------------------------------------------------------------------- Mon Mar 23 23:24:11 UTC 2015 - dvaleev@suse.com diff --git a/mariadb.spec b/mariadb.spec index 7f74f82..20ea163 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -26,9 +26,11 @@ %define _rundir %{_localstatedir}/run %endif +%if "%{name}" != "mariadb" && "%{name}" != "mysql" %bcond_with jemalloc %bcond_with oqgraph %bcond_with cassandra +%endif Name: mariadb Version: 10.0.17 From a321e573df8697605d661e5b46d0b6842107a3667a851f8bac56db55c72b557f Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Tue, 14 Apr 2015 10:16:23 +0000 Subject: [PATCH 09/12] test OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=169 --- configuration-tweaks.tar.bz2 | 4 ++-- mariadb.spec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configuration-tweaks.tar.bz2 b/configuration-tweaks.tar.bz2 index da62ce3..2cbfd50 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:1e611d2b15a920649b4c891efdb5e5c3f52ae4c8a6f0d32f7d065aab560e6a1a -size 217 +oid sha256:aaffd991c9c98217463e452d3cb2eba69dd40465831119c57c892f4ec08e0d8b +size 222 diff --git a/mariadb.spec b/mariadb.spec index 20ea163..00536b8 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -26,7 +26,7 @@ %define _rundir %{_localstatedir}/run %endif -%if "%{name}" != "mariadb" && "%{name}" != "mysql" +%if %{use_extra_provides} > 0 %bcond_with jemalloc %bcond_with oqgraph %bcond_with cassandra From 476e720435ff9b0ee7f6644ea7b406a21f3d156b52674ae89c30aef9961bbf07 Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Tue, 14 Apr 2015 10:29:38 +0000 Subject: [PATCH 10/12] fix OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=170 --- build.inc | 4 ++-- configuration-tweaks.tar.bz2 | 4 ++-- mariadb.spec | 20 ++++++++++++-------- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/build.inc b/build.inc index 51e5e21..0c06e4e 100644 --- a/build.inc +++ b/build.inc @@ -21,10 +21,10 @@ export CXXFLAGS="$CFLAGS -felide-constructors" -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci \ -DWITH_INNOBASE_STORAGE_ENGINE=1 \ -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \ -%if %{with oqgraph} +%if 0%{with_oqgraph} > 0 -DWITH_OQGRAPH_STORAGE_ENGINE=1 \ %endif -%if %{with cassandra} +%if 0%{with_cassandra} > 0 -DWITH_CASSANDRA_STORAGE_ENGINE=1 \ %endif -DWITH_XTRADB_STORAGE_ENGINE=1 \ diff --git a/configuration-tweaks.tar.bz2 b/configuration-tweaks.tar.bz2 index 2cbfd50..d34b51f 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:aaffd991c9c98217463e452d3cb2eba69dd40465831119c57c892f4ec08e0d8b -size 222 +oid sha256:4aa62499d5bcff38f7c077245fc896160539eef671aa1588bd7d65defd6bbe78 +size 219 diff --git a/mariadb.spec b/mariadb.spec index 00536b8..d157e75 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -26,10 +26,14 @@ %define _rundir %{_localstatedir}/run %endif -%if %{use_extra_provides} > 0 -%bcond_with jemalloc -%bcond_with oqgraph -%bcond_with cassandra +%if 0 > 0 +%define_with_jemalloc 1 +%define_with_oqgraph 1 +%define_with_cassandra 1 +%else +%define_with_jemalloc 0 +%define_with_oqgraph 0 +%define_with_cassandra 0 %endif Name: mariadb @@ -56,23 +60,23 @@ Source15: rc.mysql.sysvinit Source16: rc.mysql.systemd Source17: mysql.service BuildRequires: bison -%if %{with oqgraph} || %{with cassandra} +%if 0%{with_oqgraph} > 0 || 0%{with_cassandra} > 0 BuildRequires: boost-devel %endif BuildRequires: cmake BuildRequires: fdupes BuildRequires: gcc-c++ -%if %{with jemalloc} +%if 0%{with_jemalloc} > 0 BuildRequires: jemalloc-devel %endif -%if %{with oqgraph} +%if 0%{with_oqgraph} > 0 BuildRequires: judy-devel %endif BuildRequires: libaio-devel BuildRequires: libbz2-devel BuildRequires: libedit-devel BuildRequires: libevent-devel -%if %{with cassandra} +%if 0%{with_cassandra} > 0 BuildRequires: libthrift-devel %endif BuildRequires: libtool From f37a164df23c08c3c13a72e6380a84359529e8f852d476f34584ce83213b4a0f Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Tue, 14 Apr 2015 10:38:26 +0000 Subject: [PATCH 11/12] fix OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=171 --- configuration-tweaks.tar.bz2 | 4 ++-- install.inc | 1 + mariadb.spec | 12 ++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/configuration-tweaks.tar.bz2 b/configuration-tweaks.tar.bz2 index d34b51f..c986989 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:4aa62499d5bcff38f7c077245fc896160539eef671aa1588bd7d65defd6bbe78 -size 219 +oid sha256:746bd24dc78bad63f5066c36c42743f66ea387359388ea22787d1dc51ca0045a +size 221 diff --git a/install.inc b/install.inc index 1299f88..4045a7e 100644 --- a/install.inc +++ b/install.inc @@ -11,6 +11,7 @@ rm -f %buildroot%_libdir/*.a [ \! -f "%buildroot%_libdir/"libmysqld.static ] || mv "%buildroot%_libdir/"libmysqld.static "%buildroot%_libdir/"libmysqld.a rm -f %buildroot%_libdir/mysql/{,plugin}/*.{a,la} rm -f %buildroot%_libdir/mysql/libndbclient.* +rm -f %buildroot%_libdir/mysql/plugin/debug_key_management.so rm -f %{buildroot}/usr/share/mysql-test/{mysql-test-run,mtr} rm -f %{buildroot}/usr/share/mysql/{binary-configure,errmsg-utf8.txt,magic,mysql-log-rotate,mysql*.server} rm -f %{buildroot}%{_libdir}/mysql/plugin/daemon_example.ini diff --git a/mariadb.spec b/mariadb.spec index d157e75..c468ba1 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -27,13 +27,13 @@ %endif %if 0 > 0 -%define_with_jemalloc 1 -%define_with_oqgraph 1 -%define_with_cassandra 1 +%define with_jemalloc 1 +%define with_oqgraph 1 +%define with_cassandra 1 %else -%define_with_jemalloc 0 -%define_with_oqgraph 0 -%define_with_cassandra 0 +%define with_jemalloc 0 +%define with_oqgraph 0 +%define with_cassandra 0 %endif Name: mariadb From 090d2c6e184de00b058763e93a3daca0d695ea158abc00fd77ab72f75c3fb309 Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Tue, 14 Apr 2015 13:44:59 +0000 Subject: [PATCH 12/12] - fix parent directory has insecure permissions error OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=172 --- configuration-tweaks.tar.bz2 | 4 ++-- mariadb.changes | 5 +++++ mysql-patches.tar.bz2 | 4 ++-- series | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/configuration-tweaks.tar.bz2 b/configuration-tweaks.tar.bz2 index c986989..50b80ce 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:746bd24dc78bad63f5066c36c42743f66ea387359388ea22787d1dc51ca0045a -size 221 +oid sha256:2c96c09b6dff46a9d93d48ae6e5fdbf83469abbafd1191f2eef92f452b17ac4f +size 218 diff --git a/mariadb.changes b/mariadb.changes index dfcf268..89e08b0 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 14 13:42:54 UTC 2015 - michal.hrusecky@opensuse.org + +- fix parent directory has insecure permissions error + ------------------------------------------------------------------- Tue Apr 14 08:20:47 UTC 2015 - michal.hrusecky@opensuse.org diff --git a/mysql-patches.tar.bz2 b/mysql-patches.tar.bz2 index b1745f9..c099b24 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:89209fffcb7d65e02821e9a7e2d53e9670d3dbecbc242044142ca49de2ad54f1 -size 14752 +oid sha256:d0850543056d459a235ccb6e4d36f503e7dfe58a2ce2ef6015072d495000c533 +size 14898 diff --git a/series b/series index 67dbd0d..10332b1 100644 --- a/series +++ b/series @@ -14,3 +14,4 @@ mariadb-10.0.15-upgrade-datadir.patch mysql-community-server-5.6.12-srv_buf_size.patch mariadb-10.0.16-header_files_const_warnings.patch mariadb-10.0.15-fortify-and-O.patch +mariadb-10.0.15-logrotate-su.patch