Hello community,
here is the log from the commit of package mariadb.1946 for openSUSE:12.2:Update checked in at 2013-08-23 14:37:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.2:Update/mariadb.1946 (Old)
and /work/SRC/openSUSE:12.2:Update/.mariadb.1946.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mariadb.1946"
Changes:
--------
New Changes file:
--- /dev/null 2013-07-23 23:44:04.804033756 +0200
+++ /work/SRC/openSUSE:12.2:Update/.mariadb.1946.new/mariadb.changes 2013-08-23 14:37:15.000000000 +0200
@@ -0,0 +1,1892 @@
+-------------------------------------------------------------------
+Wed Aug 14 16:16:58 UTC 2013 - mhrusecky@suse.com
+
+- fix hardcoded plugin paths (bnc#834028)
+- fix includedir (bnc#734436)
+- chown --no-dereference to improve security (bnc#834967)
+
+-------------------------------------------------------------------
+Tue Dec 18 13:59:37 CET 2012 - mhrusecky@suse.cz
+
+- updated to MariaDB 5.5.28a
+ * Release notes:
+ http://kb.askmonty.org/v/mariadb-5528a-release-notes
+ http://kb.askmonty.org/v/mariadb-5528-release-notes
+ http://kb.askmonty.org/v/mariadb-5527-release-notes
+ * Changelog:
+ http://kb.askmonty.org/v/mariadb-5528a-changelog
+ http://kb.askmonty.org/v/mariadb-5528-changelog
+ http://kb.askmonty.org/v/mariadb-5527-changelog
+ * fixes CVE-2012-5611 (bnc#792444)
+ * fixes CVE-2012-4414 (bnc#779476)
+
+-------------------------------------------------------------------
+Mon Jul 2 12:28:40 UTC 2012 - mhrusecky@suse.com
+
+- fixed path for messages from previous commit
+
+-------------------------------------------------------------------
+Mon Jun 25 14:05:10 CEST 2012 - mhrusecky@suse.cz
+
+- splitted out error messages and put them into diferent directory
+
+-------------------------------------------------------------------
+Sat Jun 23 09:52:00 CEST 2012 - mhrusecky@suse.cz
+
+- updated to MariaDB 5.5.25
+ * Release notes:
+ http://kb.askmonty.org/v/mariadb-5525-release-notes
+ * Changelog:
+ http://kb.askmonty.org/v/mariadb-5525-changelog
+
+-------------------------------------------------------------------
+Tue Jun 19 10:52:13 CEST 2012 - mhrusecky@suse.cz
+
+- updated to MariaDB 5.5.24
+ * Release notes:
+ http://kb.askmonty.org/v/mariadb-5524-release-notes
+ * Changelog:
+ http://kb.askmonty.org/v/mariadb-5524-changelog
+
+-------------------------------------------------------------------
+Sat Jun 9 18:30:56 UTC 2012 - xgpub@tellas.gr
+
+- move the dialog.so client plugin to the client library package
+
+-------------------------------------------------------------------
+Wed Apr 25 11:24:31 UTC 2012 - dvaleev@suse.com
+
+- fix plugin libdir on ppc64
+
+-------------------------------------------------------------------
+Sun Apr 15 09:51:54 CEST 2012 - mhrusecky@suse.cz
+
+- migrated to MariaDB 5.5.23, see:
+ http://kb.askmonty.org/en/what-is-mariadb-55
+ http://kb.askmonty.org/en/release-notes-mariadb-55-series
+ http://kb.askmonty.org/en/changelogs-mariadb-55-series
+
+-------------------------------------------------------------------
+Tue Apr 10 11:42:16 CEST 2012 - mhrusecky@suse.cz
+
+- updated to MariaDB 5.3.6
+ * Release notes:
+ http://kb.askmonty.org/v/mariadb-536-release-notes
+ * Changelog:
+ http://kb.askmonty.org/v/mariadb-536-changelog
+
+-------------------------------------------------------------------
+Mon Mar 12 16:03:38 UTC 2012 - mhrusecky@suse.cz
+
+- migrated to MariaDB 5.3.5, see:
+ http://kb.askmonty.org/en/what-is-mariadb-53
+ http://kb.askmonty.org/en/release-notes-mariadb-53-series
+ http://kb.askmonty.org/en/changelogs-mariadb-53-series
+
+-------------------------------------------------------------------
+Sat Feb 18 08:25:25 UTC 2012 - mhrusecky@suse.cz
+
+- updated license to conform new policy
+
+-------------------------------------------------------------------
+Mon Jan 30 08:46:31 UTC 2012 - mhrusecky@suse.cz
+
+- adding /ush/share/aclocal in files
+- renaming *-debug package to *-debug-version to avoid conflicts
+
+-------------------------------------------------------------------
+Mon Jan 30 08:23:32 UTC 2012 - mhrusecky@suse.cz
+
+- adding missing buildrequires (fixes build for factory)
+
+-------------------------------------------------------------------
+Thu Dec 8 10:39:05 CET 2011 - mhrusecky@suse.cz
+
+- migrated to the new common template
+- updated to MariaDB 5.2.10
+ * Release notes:
+ http://kb.askmonty.org/v/mariadb-5210-release-notes
+ * Changelog:
+ http://kb.askmonty.org/v/mariadb-5210-changelog
+
+-------------------------------------------------------------------
+Wed Nov 23 09:27:43 UTC 2011 - coolo@suse.com
+
+- add libtool as buildrequire to avoid implicit dependency
+
+-------------------------------------------------------------------
+Wed Nov 2 12:55:18 UTC 2011 - bkutil@suse.com
+
+- Fix pretrans script in spec file to use RPM embedded LUA.
+
+-------------------------------------------------------------------
+Tue Oct 18 14:26:19 CEST 2011 - mhrusecky@suse.cz
+
+- re-adding static mysql user id
+
+-------------------------------------------------------------------
+Sun Oct 2 23:47:02 CEST 2011 - mhrusecky@suse.cz
+
+- updated to MariaDB 5.2.9
+ * Release notes:
+ http://kb.askmonty.org/v/mariadb-529-release-notes
+ * Changelog:
+ http://kb.askmonty.org/v/mariadb-529-changelog
+
+-------------------------------------------------------------------
+Wed Aug 24 16:04:32 CEST 2011 - mhrusecky@suse.cz
+
+- updated to MariaDB 5.2.8
+ * Release notes:
+ http://kb.askmonty.org/v/mariadb-528-release-notes
+ * Changelog:
+ http://kb.askmonty.org/v/mariadb-528-changelog
+
+-------------------------------------------------------------------
+Tue Aug 16 15:50:27 CEST 2011 - mhrusecky@suse.cz
+
+- not building embedded server as we don't ship it anyway and it
+ adds some unresolvable dependencies
+
+-------------------------------------------------------------------
+Wed Jul 27 13:51:14 CEST 2011 - mhrusecky@suse.cz
+
+- requiring %{version} and not %{srv_vers}
+ - dependencies are resolvable now
+
+-------------------------------------------------------------------
+Sat Jul 16 23:14:42 UTC 2011 - crrodriguez@opensuse.org
+
+- Fix strict-aliasing warnings
+- allow using the "pool of threads" feature that requires libevent
+
+-------------------------------------------------------------------
+Wed Jun 22 19:19:50 CEST 2011 - mhrusecky@suse.cz
+
+- updated to MariaDB 5.2.7
+ * Release notes:
+ http://kb.askmonty.org/v/mariadb-527-release-notes
+ * Changelog:
+ http://kb.askmonty.org/v/mariadb-527-changelog
+
+-------------------------------------------------------------------
+Sun May 15 18:53:40 CEST 2011 - mhrusecky@suse.cz
+
+- updated to MariaDB 5.2.6
+ * Release notes:
+ http://kb.askmonty.org/v/mariadb-526-release-notes
+ * Changelog:
+ http://kb.askmonty.org/v/mariadb-526-changelog
+
+-------------------------------------------------------------------
+Mon Mar 14 16:47:16 CET 2011 - mhrusecky@suse.cz
+
+- updated to MariaDB 5.2.5
+ * Release notes:
+ http://kb.askmonty.org/v/mariadb-525-release-notes
+ * Changelog:
+ http://kb.askmonty.org/v/mariadb-525-changelog
+
+-------------------------------------------------------------------
+Wed Feb 23 16:20:02 CET 2011 - mhrusecky@suse.cz
+
+- fixed init script to
+ - work with SELinux (bnc#635645)
+ - allow running as different user/group
+ - create TMPDIR correctly
+
++++ 1695 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:12.2:Update/.mariadb.1946.new/mariadb.changes
New:
----
README.SuSE
README.debug
baselibs.conf
build.inc
configuration-tweaks.tar.bz2
install.inc
mariadb-5.5.32.tar.bz2
mariadb.changes
mariadb.spec
mysql-patches.tar.bz2
mysql.SuSEfirewall2
rc.mysql-multi
series
suse-test-run
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mariadb.spec ++++++
#
# spec file for package mariadb
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# Few definitions which will alter build
%define prefered 0
%define use_cmake 1
%define cluster 0
%define builtin_plugins partition,csv,heap,aria,pbxt,myisam,myisammrg,xtradb
%define use_extra_provides 1
%define extra_provides mariadb_55
%if %{?rel:0}%{!?rel:1}
%define rel 1
%endif
#Distribution: %dist
#Packager: %packager
#Vendor: %vendor
Name: mariadb
Summary: Server part of MariaDB
License: SUSE-GPL-2.0-with-FLOSS-exception
Group: Productivity/Databases/Servers
Version: 5.5.32
Release: 0
%define srv_vers 5.5.32
Url: http://www.mariab.org
Source: mariadb-%{version}.tar.bz2
Source2: baselibs.conf
Source3: README.debug
Source4: suse-test-run
Source5: mysql.SuSEfirewall2
Source7: rc.mysql-multi
Source8: README.SuSE
Source9: mysql-patches.tar.bz2
Source10: build.inc
Source11: install.inc
Source12: series
Source13: configuration-tweaks.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
PreReq: pwdutils
%endif
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: libaio-devel
BuildRequires: libedit-devel
BuildRequires: libtool
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: sqlite
%endif
%if 0%{?suse_version} > 1030
Recommends: logrotate
%else
Requires: logrotate
%endif
# required by rcmysql
Requires: %{name}-client
Requires: %{name}-errormessages = %version
Requires: perl-base
# systemd requirements for openSUSE >= 12.1
%if 0%{?suse_version} >= 1210
BuildRequires: systemd
%{?systemd_requires}
%endif
%if "%{name}" != mysql
Provides: mysql = %{srv_vers}
%endif
Provides: mysql-Max = %{srv_vers}
%if 0%{?use_extra_provides} > 0
Provides: %{extra_provides} = %{version}
Obsoletes: %{extra_provides} < %{version}
%endif
%if 0%{?prefered} > 0
%if "%{name}" != mysql
Obsoletes: mysql < %{srv_vers}
%endif
Obsoletes: mysql-Max < %{srv_vers}
%endif
Conflicts: otherproviders(mysql)
%description
MariaDB is a backward compatible, drop-in replacement branch of the MySQL
Database Server. It includes all major open source storage engines, including
the Maria storage engine.
This package only contains the server-side programs.
%if 0%{?prefered} > 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++
%description -n libmysqlclient-devel
This package contains the development header files and libraries
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
%description -n libmysqld18
This package contains the development header files and libraries
for developing applications that embed the MariaDB.
%package -n libmysqld-devel
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: tcpd-devel
%description -n libmysqld-devel
This package contains the development header files and libraries
for developing applications that embed the MariaDB.
%endif
%package -n libmariadbclient18
Summary: Shared Libraries for MariaDB
Group: Development/Libraries/Other
%description -n libmariadbclient18
This package contains the shared libraries (.so) which certain
languages and applications need to dynamically load and use MariaDB.
%package -n libmariadbclient_r18
Summary: Shared Libraries for MariaDB
Group: Development/Libraries/Other
%description -n libmariadbclient_r18
This package contains the shared libraries (.so) which certain
languages and applications need to dynamically load and use MariaDB.
%package client
Summary: Client for MariaDB
Group: Productivity/Databases/Clients
%if "%{name}" != mysql
Provides: mysql-client = %{srv_vers}
%endif
%if 0%{?suse_version}
PreReq: pwdutils
%endif
%if 0%{?use_extra_provides} > 0
Provides: %{extra_provides}-client = %{version}
Obsoletes: %{extra_provides}-client < %{version}
%endif
Requires: %{name}-errormessages = %version
%if 0%{?prefered} > 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.
%package errormessages
Summary: MySQL Community Server development header files and libraries
Group: Development/Libraries/C and C++
%description errormessages
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
%if "%{name}" != mysql
Provides: mysql-bench = %{srv_vers}
%endif
%if 0%{?use_extra_provides} > 0
Provides: %{extra_provides}-bench = %{version}
Obsoletes: %{extra_provides}-bench < %{version}
%endif
%if 0%{?prefered} > 0
%if "%{name}" != mysql
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%{?prefered} > 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.
%package test
Summary: Testsuite for MariaDB
Group: Productivity/Databases/Servers
Requires: %{name} = %{version}
Requires: %{name}-bench = %{version}
Requires: %{name}-client = %{version}
Requires: %{name}-tools = %{version}
Requires: perl-DBD-mysql
%if "%{name}" != mysql
Provides: mysql-test = %{srv_vers}
%endif
%if 0%{?use_extra_provides} > 0
Provides: %{extra_provides}-test = %{version}
Obsoletes: %{extra_provides}-test < %{version}
%endif
%if 0%{?prefered} > 0
%if "%{name}" != mysql
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.
%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
%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}
%endif
%if 0%{?prefered} > 0
%if "%{name}" != mysql
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 .
# apply patches from series
mysql-patches/tools/quilt-setup.sh "%{S:12}"
mysql-patches/tools/apply-series.sh "%{S:12}"
# remove unneeded manpages ('make install' basically installs everything under
# man/*)
rm -f man/mysqlman.1 # dummy fallback manpage
[ \! -f man/CMakeLists.txt ] || sed -i 's|mysqlman.1||' man/CMakeLists.txt
rm -f man/mysql.server.1 # init script, not installed in our rpm
[ \! -f man/CMakeLists.txt ] || sed -i 's|mysql.server.1||' man/CMakeLists.txt
rm -f man/make_win_*.1 # windows build scripts
rm -f man/comp_err.1 # built-time utility
# 5.1 Carrier Grade Edition only / still under development as of 5.1.22
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
%if 0%{prefered} < 1
for i in `grep -Rl mysqlclient .`; do
sed -i 's|mysqlclient|mariadbclient|g' $i
done
%endif
# Broken test that needs sources
rm -f mysql-test/t/file_contents.test mysql-test/r/file_contents.result
%build
%{expand:%(cat %_sourcedir/build.inc)}
%install
%{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
%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 || :
%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
%pretrans -p <lua>
if posix.access("/usr/sbin/rcmysql", "x") then
restart = os.execute("/usr/sbin/rcmysql status > /dev/null")
os.execute("/usr/sbin/rcmysql stop")
if restart == 0 then
os.execute("/bin/mkdir -p /var/run/mysql/restart")
end
end
%posttrans
if [ -d /var/lib/mysql ]; then
touch /var/lib/mysql/.run-mysql_upgrade
chown -R --no-dereference mysql:mysql /var/lib/mysql
fi
for i in /var/lib/mysql/{.protected,.tmp}; do
( [ -d "$i" ] && rmdir "$i" ) || :
done
# start mysql again if it should run
if [ "`ls /etc/rc.d/rc*.d/S*mysql 2> /dev/null`" ] || [ -d /var/run/mysql/restart ]; then
[ -x /usr/sbin/rcmysql ] && /usr/sbin/rcmysql start
rmdir /var/run/mysql/restart || :
fi
#######################################################################
# Various ldconfig post scripts #
#######################################################################
%post -n libmariadbclient18 -p /sbin/ldconfig
%postun -n libmariadbclient18 -p /sbin/ldconfig
%post -n libmariadbclient_r18 -p /sbin/ldconfig
%postun -n libmariadbclient_r18 -p /sbin/ldconfig
%if 0%{cluster} > 1
%post -n libndbclient6 -p /sbin/ldconfig
%postun -n libndbclient6 -p /sbin/ldconfig
%endif
%if 0%{prefered} > 0
%post -n libmysqld18 -p /sbin/ldconfig
%postun -n libmysqld18 -p /sbin/ldconfig
%endif
%postun
if [ $1 = 0 ]; then
%{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
#######################################################################
# Files section #
#######################################################################
%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/*
%config /etc/logrotate.d/mysql
%doc %{_defaultdocdir}/%{name}
/etc/init.d/mysql
/usr/sbin/rcmysql
%dir /usr/share/%{name}
%dir /usr/share/mysql
/usr/share/%{name}/charsets/
/usr/share/%{name}/*.sql
%ghost %dir %attr(755,mysql,mysql)/var/run/mysql
%dir %{_libdir}/mysql
%{_libdir}/mysql/mysqld.sym
%config /etc/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
%files client -f mysql-client.files
%defattr(-, root, root)
%config(noreplace) %attr(0640, root, mysql) /etc/mysqlaccess.conf
%if 0%{prefered} > 0
%files -n libmysqlclient-devel -f libmysqlclient-devel.files
%defattr(-, root, root)
/usr/include/mysql
%{_libdir}/libmysqlclient.so
%{_libdir}/libmysqlclient_r.so
%dir /usr/share/aclocal
/usr/share/aclocal/mysql.m4
%files -n libmysqld-devel
%defattr(-,root,root)
%_libdir/libmysqld.a
%_libdir/libmysqld.so
%files -n libmysqld18
%defattr(-,root,root)
%_libdir/libmysqld.so.*
%endif
%files -n libmariadbclient18
%defattr(-, root, root)
%{_libdir}/libmariadbclient.so.*
%if 0%{cluster} > 1
%files -n libndbclient6
%defattr(-, root, root)
%{_libdir}/libndbclient.so.*
%endif
%files -n libmariadbclient_r18
%defattr(-, root, root)
%{_libdir}/libmariadbclient_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
%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
%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
%changelog
++++++ README.SuSE ++++++
Notes about MySQL 5.1 package:
==============================
With MySQL 5.1 package we introduced some changes you may like to know. Most of
them will affect you only if you are upgrading from previous version and you
did some changes to your configuration.
1) Plugins:
===========
One of the new features in MySQL 5.1 is support for plugins. So some of the
storage engines are now shipped like that. You can use following plugins:
- archive
- blackhole
- federated
- example
InnoDB is still compiled as internal part of MySQL. If you are upgrading from
version 5.0 or if this is your first installation of MySQL 5.1, all plugins
will be enabled by default and you can disable them manually later (see
http://dev.mysql.com/doc/refman/5.1/en/uninstall-plugin.html).
With this change you need to remove skip-federated option from your my.cnf file
if you have changed it manually. This option was there by default in previous
versions of MySQL.
2) File locations:
==================
There were some changes in files locations. Most of them were made in the
default configuration file so if you are experiencing problems and you have
made some manual adjustments to your /etc/my.cnf, try to merge this file with
/etc/my.cnf.rpmnew.
File locations changes:
- MySQL socket file and pid file were moved from /var/lib/mysql to more
reasonable location ( /var/run/mysql ) by default.
- MySQL log files are in /var/log/mysql.
3) BerkeleyDB:
==============
MySQL no longer contains BerkeleyDB as storage engine. There is no fix for that
and if you used it before, you have to migrate your data to different storage
engine BEFORE updating. This can be done for example using following command:
ALTER TABLE foo ENGINE = INNODB;
4) MySQL Upgrade Log
====================
If you missed messages displayed during automatic MySQL database upgrade, you
can find them from now on in
/var/log/mysql/mysqld-upgrade.log
++++++ README.debug ++++++
Debugging mysqld crashes
========================
Author: Michal Marek
Last modified: 2006-07-31
Contents
--------
1) Query log
2) Coredumps and Backtraces
3) Trace files
In case your MySQL server crashes, here are some hints on what to
include in a bugreport at https://bugzilla.novell.com/ . Please report
there only bugs in the MySQL packages packaged by Novell/SUSE, bugs in
binaries / source provided by MySQL AB should be reported at
http://bugs.mysql.com/ .
1) Query log
------------
Note: Skip this chapter if you already have an exact query that
crashes the server
To find out which query possibly crashed the server, add the following
line to your /etc/my.cnf into section [mysqld]:
log=/var/lib/mysql/mysqld-query.log
Mysqld then will, at some performance cost, log all queries into this
file. After a server crash, you can examine the queries from the time it
crashed and try to reproduce the crash with single queries (this might
not allways work, eg. if the crash is caused by some race condition).
Note that this log file may become extremly large, so if you decide to
attach it whole to the bugzilla, don't forget to
bzip2 -k /var/lib/mysql/mysqld-query.log
and attach the bzipped file instead.
2) Coredumps and Backtraces
---------------------------
Another valuable information for the developers is the backtrace. The
easies way to get one is to let mysqld produce a coredump. Add the
following line to your /etc/my.cnf into section [mysqld]:
core-file
Note: this unfortunatelly doesn't work in SUSE Linux 10.1 and older.
On these systems, you need to run safe_mysqld directly under user
mysql:
su - mysql
mysqld_safe --socket=/var/lib/mysql/mysql.sock \
--datadir=/var/lib/mysql --core-file &
The core file will be written to the /var/lib/mysql/ directory. I
suggest setting the kernel variable kernel.core_uses_pid to 1
sysctl -w kernel.core_uses_pid=1
so that the coredumps don't overwrite each other if you experience
multiple crashes.
After you got the core file, install the gdb and mysql-debuginfo
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.
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:
$ 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,
--log and --debug options for you. The query log will be stored in
/var/lib/mysql/myqld-query.log
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 .
The trace file will contain various debug information and function
calls/returns and will become _extremly_ huge after a while, so don't
attach it to bugzilla unless requested.
++++++ baselibs.conf ++++++
libmariadbclient18
libmariadbclient_r18
++++++ build.inc ++++++
%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
%ifarch ppc64
export EXTRA_FLAGS=" -mminimal-toc "
%endif
export CFLAGS="$RPM_OPT_FLAGS -DPIC -fPIC -DFORCE_INIT_OF_VARS $EXTRA_FLAGS "
export CXXFLAGS="$CFLAGS -fno-exceptions -fno-rtti"
%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 \
%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%{?prefered} > 0
BuildMySQL "" --with-embedded-server
%else
BuildMySQL "" --without-embedded-server
%endif
# build mysqld-debug
BuildMySQL "-debug" --with-debug --without-embedded-server
%if 0%{?prefered} > 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_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}" \
"$@" ..
make %{?jobs:-j%jobs}
nm --numeric-sort sql/mysqld > sql/mysqld.sym
popd
}
BuildMySQL "" -DCMAKE_BUILD_TYPE=Release -DINSTALL_SQLBENCHDIR=share
BuildMySQL "-debug" -DCMAKE_BUILD_TYPE=Debug
%endif
++++++ install.inc ++++++
# 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
# remove handler socket client
rm -f %buildroot%_libdir/libhsclient*
rm -f %buildroot%_bindir/hsclient*
[ \! -f "%{buildroot}%{_bindir}/mytop" ] || 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...)
[ \! -f "%buildroot%_libdir/"libmysqld.a ] || mv "%buildroot%_libdir/"libmysqld.a "%buildroot%_libdir/"libmysqld.static
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}/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
ln -sf mysql-test-run.pl %{buildroot}/usr/share/mysql-test/mtr
ln -sf mysql-test-run.pl %{buildroot}/usr/share/mysql-test/mysql-test-run
mv %{buildroot}/usr/share/mysql-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir}
# generate filelist for binaries and their manpages
filelist()
{
echo '%%defattr(-, root, root)'
pushd %buildroot >/dev/null
for i; do
if test -e usr/sbin/"$i"; then
echo /usr/sbin/"$i"
fi
if test -e usr/bin/"$i"; then
echo /usr/bin/"$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 >mysql.files
filelist mysql mysqladmin mysqlcheck mysqldump mysqlimport mysqlshow >mysql-client.files
filelist mysql_config >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_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
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)'
pushd %buildroot >/dev/null
for f in usr/share/%{name}/*; do
if test -e $f/errmsg.sys; then
echo "%%dir /$f"
fi
done
echo /usr/share/%{name}/errmsg-utf8.txt
popd >/dev/null
}
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)
DOCDIR=%buildroot%_defaultdocdir/%name
install -d -m 755 ${DOCDIR}
install -d -m 755 %buildroot/etc/logrotate.d
install -d -m 755 %buildroot/etc/init.d
install -m 644 _build/support-files/mysql-log-rotate %buildroot/etc/logrotate.d/mysql
%if 0%{?prefered} > 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 660 _build/support-files/my-medium.cnf %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
done
install -m 755 %_sourcedir/rc.mysql-multi %buildroot/etc/init.d/mysql
ln -sf ../../etc/init.d/mysql %buildroot/usr/sbin/rcmysql
# this is used by the init script
install -m 755 -d %buildroot/var/run/mysql
# SuSEfirewall service description
install -D -m 644 %_sourcedir/mysql.SuSEfirewall2 \
%buildroot/etc/sysconfig/SuSEfirewall2.d/services/mysql
# testsuite
mkdir -p '%buildroot'/usr/share/mysql-test/
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
pushd '%buildroot'/%_libdir
for i in *.so.*.*.*; do
if [ -L "$i" ]; then
trg="`readlink "$i"`"
rm "$i"
mv "$trg" "$i"
ln -s "$i" "$trg"
fi
done
for i in *.so.*; do
if [ -L "$i" ] && [ -L "`readlink "$i"`" ]; then
trg="`readlink "$i"`"
rm "$i"
ln -s "`readlink "$trg"`" "$i"
fi
done
popd
%if ! 0%{prefered} > 0
cat libmysqlclient-devel.files | sed 's|%%doc\ ||' | while read tmp; do
cd '%buildroot'
rm -f ."$tmp"
done
rm -rf '%buildroot'/%_libdir/libmysqld.*
rm -rf '%buildroot'/%_libdir/{*.la,*.so,*.a}
rm -rf '%buildroot'/%_datadir/man/*/mysql_config.1*
rm -rf '%buildroot'/%_includedir
rm -rf '%buildroot'/%_datadir/aclocal
%endif
sed -i 's|doc/packages/mysql|doc/packages/%{name}|g' '%buildroot'/etc/init.d/mysql
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
rm -rf '%buildroot'/etc/{mysql,my.cnf.d}
mkdir -p '%buildroot'/etc/mysql
sed -i 's|^log-bin=|#\ log-bin=|' %buildroot/etc/my.cnf
sed -i 's|^binlog_format=|#\ binlog_format=|' %buildroot/etc/my.cnf
bzip2 -cd '%_sourcedir'/configuration-tweaks.tar.bz2 | tar -C '%buildroot'/etc/mysql -xvf -
[ -z "`ls '%buildroot'/usr/share/info/mysql.info* 2> /dev/null`" ] || rm -f '%buildroot'/usr/share/info/mysql.info*
if [ "`ls '%buildroot'%_libdir/mysql/plugin/dialog*.so 2> /dev/null`" ]; then
echo '%%dir %%_libdir/mysql' >> mysql-client.files
echo '%%dir %%_libdir/mysql/plugin' >> mysql-client.files
echo '%%_libdir/mysql/plugin/dialog*.so' >> mysql-client.files
fi
rm -rf '%buildroot'/usr/share/doc/{mysql,mariadb}*
rm -rf '%buildroot'/usr/share/mysql/{solaris,SELinux}
++++++ mysql.SuSEfirewall2 ++++++
## Name: MySQL server
## Description: opens ports for MySQL in order to allow other hosts connect to it
# space separated list of allowed TCP ports
TCP="3306"
++++++ rc.mysql-multi ++++++
#!/bin/bash
# Copyright (c) 1995-2011 SuSE Linux AG Nuernberg, Germany.
#
# Author: Lenz Grimmer
# Maintainer: Michal Hrusecky
#
# mysqld_multi extension added by Richard Bos, 2008
#
# /etc/init.d/mysql
#
# and its symbolic link
#
# /usr/sbin/rcmysql
#
### BEGIN INIT INFO
# Provides: mysql
# Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs
# Default-Start: 3 5
# Default-Stop:
# Short-Description: Start the MySQL database server
# Description: Start the MySQL database server
### END INIT INFO
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v ditto but be verbose in local rc status
# rc_status -v -r ditto and clear the local rc status
# rc_failed set local and overall rc status to failed
# rc_failed <num> set local and overall rc status to <num>
# rc_reset clear local rc status (overall remains)
# rc_exit exit appropriate to overall rc status
. /etc/rc.status
# 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
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signalling is not supported) are
# considered a success.
# Check for the location of initscript
if [ "`echo "$0" | grep "^\."`" ] || [ "`echo "$0" | grep "^[^/].*/"`" ]; then
MYSELF="`pwd`/$0"
else
MYSELF="$0"
fi
parse_arguments() {
for arg do
case "$arg" in
--basedir=*) basedir="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;;
--datadir=*) datadir="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;;
--pid-file=*) pid_file="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;;
--socket=*) socket="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;;
--log-error=*) log_error="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;;
--user=*) mysql_daemon_user="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;;
--group=*) mysql_daemon_group="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;;
esac
done
}
wait_for_socket()
{
local i
for((i=0; i<150; i++)); do
sleep 0.2
test -S $1 && i='' && break
done
test -z "$i" || return 1
return 0
}
# Don't run killproc -TERM, as it could send a SIGKILL as well, possibly
# resulting in database corruption. Run kill -TERM manually instead, wait
# approximately 300 seconds and fail if mysql doesn't respond. This will at
# least prevent the SIGKILL when doing 'rcmysql stop' manually. During system
# shutdown, we are out of luck...
# See https://bugzilla.novell.com/show_bug.cgi?id=223209
kill_mysql ()
{
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
fi
test -L "/proc/$pid/exe" || return 7
exe=`readlink "/proc/$pid/exe"` || return 4
test "`echo "$exe" | grep "^$MYSQLD"`" || return 7
kill -STOP "$pid"
kill -TERM "$pid" || return 4 # suboptimal
kill -CONT "$pid"
for i in `seq 3000`; do
# mysqld removes its pid file
test -e "$test_pid_file" || return 0
LC_ALL=C sleep 0.1
done
test -e "$test_pid_file" || return 0
return 1
}
# Helper function which can end with any status
set_return_value() {
return $1
}
# Checks for obsolete database
check_obsolete() {
# check for ISAM tables
tables="`find "$datadir" -name '*.ISM' 2> /dev/null | sed "s@$datadir/*@@; s@.ISM@@; s@/@.@;"`"
if test "$tables" ; then
echo
echo "Some tables still use ISAM format, which is NO LONGER SUPPORTED"
echo "since mysql 5.0. To use these tables, you would need to open them"
echo "from an older mysql server and convert to something better (eg. MyISAM)."
echo
echo "Tables using ISAM are: "
echo " $tables "
echo
fi
# check for bdb tables
tables="`find "$datadir" -name '*.db' 2> /dev/null | sed "s@$datadir/*@@; s@.db@@; s@/@.@;"`"
if test -n "$tables" ; then
echo
echo "Some tables still use BerkeleyDB format, which is NO LONGER SUPPORTED"
echo "since mysql 5.1. To use these tables, you would need to open them"
echo "from an older mysql server and convert to something better (eg. MyISAM)."
echo
echo "Tables using BerkeleyDB are: "
echo " $tables "
echo
fi
}
# Check if we want to run multiple instances.
[[ "`cat /etc/my.cnf | sed -n 's|^[[:blank:]]*\[mysqld[0-9]\+\]|yes|p'`" ]] && MYSQLD_MULTI=yes
# This was old way how to specify this, left for backward compatibility.
[[ -f /etc/sysconfig/mysql ]] && . /etc/sysconfig/mysql
if [[ "$MYSQLD_MULTI" == "yes" ]]; then
[[ -x /usr/bin/mysqld_multi ]] || {
echo -n "MySQL: /usr/bin/mysqld_multi not found"
rc_failed 5; rc_status -v; rc_exit;
}
case "$1" in
start)
# FIXME:
# We assume a fresh install if the directory $datadir/mysql
# does not exist and create the privilege database
# if ! test -d $datadir/mysql; then
# echo -n "Creating MySQL privilege database... "
# mysql_install_db --user=$mysql_daemon_user --datadir=$datadir || {
# rc_failed; rc_status -v; rc_exit
# }
# fi
echo -n "Starting service multi MySQL "
mysqld_multi start
# Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting down service multi MySQL "
mysqld_multi stop
# Remember status and be verbose
rc_status -v
;;
try-restart)
## Stop the service and if this succeeds (i.e. the
## service was running before), start it again.
## Note: try-restart is not (yet) part of LSB (as of 0.7.5)
"$MYSELF" status >/dev/null && "$MYSELF" restart
# Remember status and be quiet
rc_status
;;
restart|force-reload)
echo "Restarting service multi MySQL "
"$MYSELF" stop
"$MYSELF" start
rc_status
;;
reload)
echo -n "Reloading service multi MySQL "
mysqld_multi reload
rc_status -v
;;
status)
STATUS=$(mysqld_multi report)
echo -n "$STATUS"
# Set the status for rc_status
echo "$STATUS" | grep -q "is running"
rc_status -v
;;
*)
echo "Usage: $MYSELF {start|stop|status|reload|restart|try-restart|force-reload}"
exit 1
;;
esac
else
# Test, if mysqld or mysql-max actually exist
unset MYSQLD
# use mysqld-debug only if explicitly requested (TODO: sysconfig variable?)
if test "$MYSQLD_DEBUG" = yes -a -x /usr/sbin/mysqld-debug
then
MYSQLD=/usr/sbin/mysqld-debug
elif test -x /usr/sbin/mysqld-max
then
MYSQLD=/usr/sbin/mysqld-max
elif test -x /usr/sbin/mysqld
then
MYSQLD=/usr/sbin/mysqld
fi
test "$MYSQLD" || {
echo -n "Nor /usr/sbin/mysqld nor /usr/sbin/mysqld-max exists";
rc_failed 5; rc_status -v; rc_exit;
}
# The following section has been taken from
# the original MySQL init script
# Note: If you want to change these variables, you'll make your life easier
# if you do so in /etc/my.cnf, which is preserved during upgrades
basedir=/usr
datadir=/var/lib/mysql
mysql_daemon_user=mysql
mysql_daemon_group=mysql
pid_file=/var/run/mysql/mysqld.pid
socket=/var/run/mysql/mysql.sock
print_defaults=/usr/bin/my_print_defaults
log_error=/var/log/mysql/mysqld.log
mode=$1 # start or stop
log_base="`echo "$log_error" | sed 's|\.log$||'`"
[ "$log_base" \!= "$log_error" ] || log_base="/var/log/mysql/mysql"
log_upgrade="${log_base}-upgrade.log"
log_upgrade_run="${log_base}-upgrade-run.log"
log_query="${log_base}-query.log"
parse_arguments `$print_defaults $defaults mysqld mysql_server`
mkdir -m 755 -p /var/run/mysql
chown --no-dereference "$mysql_daemon_user:$mysql_daemon_group" /var/run/mysql
export TEMPDIR="`cat /var/run/mysql/tmpdir 2> /dev/null`"
# Safeguard (relative paths, core dumps..)
cd "$basedir"
case "$1" in
start)
# exit gracefully, if we are already running
"$MYSELF" status >/dev/null && echo -n "Starting service MySQL " && \
rc_status -v && rc_exit
# prepare tmp dir
unset TMPDIR
if [ "$TEMPDIR" ] && [ -d "$TEMPDIR" ] && \
[ "`ls -ld "$TEMPDIR" | grep "^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ]; then
rm -rf "$TEMPDIR"
fi
TEMPDIR="`mktemp -d -p /var/tmp mysql.XXXXXX | tee /var/run/mysql/tmpdir`"
[ -z "$TEMPDIR" ] || chown --no-dereference "$mysql_daemon_user:$mysql_daemon_group" "$TEMPDIR"
[ "`ls -ld "$TEMPDIR" | grep "^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ] || {
echo "Can't create secure $TEMPDIR"
rc_failed; rc_status -v; rc_exit;
}
# Test, if safe_mysqld actually exists
SAFE_MYSQLD=/usr/bin/mysqld_safe
test -x $SAFE_MYSQLD || {
echo "$SAFE_MYSQLD does not exist ";
rc_failed 5; rc_status -v; rc_exit;
}
debug_flags=""
if test "$MYSQLD_DEBUG" = yes; then
# add --log, --core-file and --debug
# but only if not already set in my.cnf
if ! $print_defaults mysqld | \
grep -q -e '--log$' -e '--log[[:blank:]=]'
then
debug_flags="--log=${log_query}"
fi
if ! $print_defaults mysqld | grep -q -e '^--debug\>' &&
test "$MYSQLD" = /usr/sbin/mysqld-debug
then
debug_flags="$debug_flags --debug=d:t:F:L:o,$datadir/mysqld.trace"
fi
if ! $print_defaults mysqld | grep -q -e '^--core-file\>'
then
debug_flags="$debug_flags --core-file"
fi
fi
# Creating parent directories for logs
for i in "$log_upgrade" "$log_query" "$log_error"; do
log_dir="`dirname "$i"`"
if [ \! -d "$log_dir" ]; then
mkdir -p "$log_dir"
fi
chmod 770 "$log_dir"
chown -R --no-dereference mysql:mysql "$log_dir"
done
MYSQLVER="`mysqld --version | sed 's|.*Ver\ *\([^\ ]*\)\.[0-9]\+[\-\ ].*|\1|'`"
# We assume a fresh install if the directory $datadir/mysql
# does not exist and create the privilege database
if ! test -d "$datadir/mysql"; then
echo "Creating MySQL privilege database... "
mysql_install_db --user="$mysql_daemon_user" --datadir="$datadir" ||{
rc_failed; rc_status -v; rc_exit
}
echo -n "$MYSQLVER" > "$datadir"/mysql_upgrade_info
fi
check_obsolete
# 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
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\nskip-external-locking|' \
-e 's|^\([^#]*skip-federated\)|#\1|' /etc/my.cnf
# Check logs for inconsistencies
SRCLOGS=""
ALL_SRCLOGS=""
for i in "$log_error" /var/lib/mysql/mysqld.log \
/var/log/mysqld.log ; do
if test -f "$i"; then
SRCLOGS="$i"
ALL_SRCLOGS="${ALL_SRCLOGS} ${i}"
fi
done
if [ "${ALL_SRCLOGS}" \!= " ${SRCLOGS}" ]; then
echo "Log files inconsistency, please merge following files manually:"
echo $ALL_SRCLOGS | sed 's|[[:blank:]]\+|\n|' | sed 's|^|\t|'
else
if [ "$SRCLOGS" ]; then
[ "$SRCLOGS" = "$log_error" ] || mv "$SRCLOGS" "$log_error"
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`"
if [ "$pid" ] && [ -d "/proc/$pid" ] &&
[ "`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"
fi
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 --no-dereference "$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;
}
echo "Running protected MySQL... " | tee -a "$log_upgrade"
$SAFE_MYSQLD \
--mysqld=${MYSQLD#/usr/sbin/} \
$debug_flags \
--skip-networking \
--skip-grant-tables \
--datadir="$datadir" \
--user="$mysql_daemon_user" \
--log-error="$log_upgrade_run" \
--socket="$protected/mysql.sock" \
--pid-file="$protected/mysqld.pid" \
--group="$mysql_daemon_group" &>/dev/null &
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;
}
if [ "`grep "Upgrading MySQL..." "$log_upgrade"`" ]; then
echo "Problems should be fixed now."
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_mysql "$protected/mysqld.pid"
rc_exit; }
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 --no-dereference "$mysql_daemon_user:$mysql_daemon_group" "$datadir"
rm -f /var/adm/update-messages/mysql-*
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
chown --no-dereference "$mysql_daemon_user:$mysql_daemon_group" "$log_upgrade"
chmod 640 "$log_upgrade"
fi
export TMPDIR="$TEMPDIR"
echo -n "Starting service MySQL "
$SAFE_MYSQLD \
--mysqld=${MYSQLD#/usr/sbin/} \
$debug_flags \
--user="$mysql_daemon_user" \
--pid-file="$pid_file" \
--socket="$socket" \
--datadir="$datadir" &>/dev/null &
wait_for_socket "$socket" || {
# let's not treat this as a fatal error
echo "warning: $socket didn't appear within 30 seconds"
}
chmod a+r "$pid_file"
# Rmember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting down service MySQL "
kill_mysql
if [ "$TEMPDIR" ] && [ -d "$TEMPDIR" ] && \
[ "`ls -ld "$TEMPDIR" | grep "^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ]; then
rm -rf "$TEMPDIR"
fi
# Remember status and be verbose
rc_status -v
;;
try-restart)
## Stop the service and if this succeeds (i.e. the
## service was running before), start it again.
## Note: try-restart is not (yet) part of LSB (as of 0.7.5)
"$MYSELF" status >/dev/null && "$MYSELF" restart
# Remember status and be quiet
rc_status
;;
restart|force-reload)
echo "Restarting service MySQL "
"$MYSELF" stop
"$MYSELF" start
rc_status
;;
reload)
echo -n "Reloading service MySQL "
kill -HUP "`cat "$pid_file"`"
touch "$pid_file"
rc_status -v
;;
check|status)
echo -n "Checking for service MySQL: "
## Check status with checkproc(8), if process is running
## checkproc will return with exit status 0.
# Status has a slightly different for the status command:
# 0 - service running
# 1 - service dead, but /var/run/ pid file exists
# 2 - service dead, but /var/lock/ lock file exists
# 3 - service not running
# NOTE: checkproc returns LSB compliant status values,
# but it checks for running binary first and only
# if it doesn't find running process with proper
# name it checks pidfile. So we can't use it because
# akonadi runs it's own database.
# checkproc -p $pid_file $MYSQLD
if [ -f "$pid_file" ]; then
if ! [ -e /proc/version ]; then
mount -n -t proc proc /proc
test -e /proc/version || set_return_value 100
fi
pid="`cat "$pid_file"`"
if [ "$pid" ] && [ -d "/proc/$pid" ]; then
cmd=`cat "/proc/$pid/cmdline" 2> /dev/null`
exe=`readlink "/proc/$pid/exe" 2> /dev/null`
if [ "`echo "$exe" | grep "^$MYSQLD"`" ] || [ "`echo "$cmd" | grep "^$MYSQLD"`" ]; then
set_return_value 0
else
set_return_value 1
fi
else
set_return_value 1
fi
else
set_return_value 3
fi
rc_status -v
;;
*)
echo "Usage: $MYSELF {start|stop|status|reload|restart|try-restart|force-reload}"
exit 1
;;
esac
fi
rc_exit
# vim: ft=sh
++++++ series ++++++
mariadb-5.5.28-hotcopy.patch
mysql-community-server-5.1.45-multi-configuration.patch
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-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
mariadb-5.5.32-deharcode-libdir.patch
mysql-5.5.31-upgrade-datadir.patch
mysql-5.5-dump.patch
++++++ suse-test-run ++++++
#!/usr/bin/perl
#
# Test the SUSE mysql(-Max) package using the MySQL testsuite
my $id = getpwnam("mysql") or die "can't find user \"mysql\": $!";
my $dir = "/usr/share/mysql-test/";
if ($< == 0) {
($<, $>) = ($id, $id);
if ($< != $id || $> != $id) {
die "can't switch to user mysql(id $id): $!";
}
}
chdir($dir) or die "can't cd to $dir: $!";
exec("./mysql-test-run.pl", "--big-test", @ARGV);
die "can't execute mysql-test-run.pl: $!";
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org