Accepting request 186764 from server:database
- chown --no-dereference instead of chown to improve security * similar issue as CVE-2013-1976 - fix build for ppc64 using -mminimal-toc - merge latest packaging fixes * better handling of libdir * more cautious upgrades - add patch for lib64 on s390x mysql-patches/mariadb-5.5.24-s390x-libdir.patch - get rid of info which is not info (bnc#747811) - minor polishing of spec/installation - fix ownership of logdir (bnc#763150) OBS-URL: https://build.opensuse.org/request/show/186764 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mariadb?expand=0&rev=30
This commit is contained in:
commit
fed63298ef
@ -4,9 +4,12 @@
|
|||||||
%define socketpath /var/run/mysql
|
%define socketpath /var/run/mysql
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?suse_version} > 1140
|
%if 0%{?suse_version} > 1140
|
||||||
export WARN_DIS="$WARN_DIS -Wno-unused-but-set-variable -fno-strict-aliasing -Wno-unused-parameter "
|
export EXTRA_FLAGS=" -Wno-unused-but-set-variable -fno-strict-aliasing -Wno-unused-parameter "
|
||||||
%endif
|
%endif
|
||||||
export CFLAGS="$RPM_OPT_FLAGS -DPIC -fPIC -DFORCE_INIT_OF_VARS $WARN_DIS "
|
%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"
|
export CXXFLAGS="$CFLAGS -fno-exceptions -fno-rtti"
|
||||||
|
|
||||||
%if 0%{use_cmake} < 1
|
%if 0%{use_cmake} < 1
|
||||||
@ -111,6 +114,8 @@ BuildMySQL() {
|
|||||||
-DWITH_EMBEDDED_SERVER=true \
|
-DWITH_EMBEDDED_SERVER=true \
|
||||||
-DCOMPILATION_COMMENT="openSUSE package" \
|
-DCOMPILATION_COMMENT="openSUSE package" \
|
||||||
-DDENABLE_DOWNLOADS=false \
|
-DDENABLE_DOWNLOADS=false \
|
||||||
|
-DINSTALL_PLUGINDIR_RPM="%{_libdir}/mysql/plugin" \
|
||||||
|
-DINSTALL_LIBDIR_RPM="%{_libdir}" \
|
||||||
"$@" ..
|
"$@" ..
|
||||||
make %{?jobs:-j%jobs}
|
make %{?jobs:-j%jobs}
|
||||||
nm --numeric-sort sql/mysqld > sql/mysqld.sym
|
nm --numeric-sort sql/mysqld > sql/mysqld.sym
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:b2b4528bfd705dccf6be532a58ace71daff468b7e2777a01f569836a29552488
|
oid sha256:5e1d7b3da204d4812554888639fd49101b3a2d87c41bac802df35cf794ef088c
|
||||||
size 323
|
size 312
|
||||||
|
56
install.inc
56
install.inc
@ -15,26 +15,20 @@ if [ -f "%{buildroot}%{_bindir}/mytop" ]; then
|
|||||||
fi
|
fi
|
||||||
rm -f %buildroot%_libdir/mysql/plugin/handlersocket.so
|
rm -f %buildroot%_libdir/mysql/plugin/handlersocket.so
|
||||||
# remove most static libs (FIXME: don't build them at all...)
|
# remove most static libs (FIXME: don't build them at all...)
|
||||||
rm -f %buildroot%_libdir/libmysqlclient*a
|
[ \! -f "%buildroot%_libdir/"libmysqld.a ] || mv "%buildroot%_libdir/"libmysqld.a "%buildroot%_libdir/"libmysqld.static
|
||||||
rm -f %buildroot%_libdir/libmysqlservices*a
|
rm -f %buildroot%_libdir/*.a
|
||||||
rm -f %buildroot%_libdir/mysql/*.a %buildroot%_libdir/mysql/*.la
|
[ \! -f "%buildroot%_libdir/"libmysqld.static ] || mv "%buildroot%_libdir/"libmysqld.static "%buildroot%_libdir/"libmysqld.a
|
||||||
rm -f %buildroot%_libdir/mysql/plugin/*a
|
rm -f %buildroot%_libdir/mysql/{,plugin}/*.{a,la}
|
||||||
# XXX: package these? The ndb tools are linked statically atm
|
# XXX: package these? The ndb tools are linked statically atm
|
||||||
rm -f %buildroot%_libdir/mysql/libndbclient.*
|
rm -f %buildroot%_libdir/mysql/libndbclient.*
|
||||||
rm -f %{buildroot}/usr/share/mysql-test/mysql-test-run
|
rm -f %{buildroot}/usr/share/mysql-test/{mysql-test-run,mtr}
|
||||||
rm -f %{buildroot}/usr/share/mysql-test/mtr
|
rm -f %{buildroot}/usr/share/mysql/{binary-configure,errmsg-utf8.txt,magic,mysql-log-rotate,mysql*.server}
|
||||||
rm -f %{buildroot}/usr/share/mysql/binary-configure
|
|
||||||
rm -f %{buildroot}/usr/share/mysql/errmsg-utf8.txt
|
|
||||||
rm -f %{buildroot}/usr/share/mysql/magic
|
|
||||||
rm -f %{buildroot}/usr/share/mysql/mysql-log-rotate
|
|
||||||
rm -f %{buildroot}/usr/share/mysql/mysql*.server
|
|
||||||
rm -f %{buildroot}%{_libdir}/mysql/plugin/daemon_example.ini
|
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/mtr
|
||||||
ln -sf mysql-test-run.pl %{buildroot}/usr/share/mysql-test/mysql-test-run
|
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}
|
mv %{buildroot}/usr/share/mysql-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir}
|
||||||
# generate filelist for binaries and their manpages (easier than enumerating
|
# generate filelist for binaries and their manpages (easier than enumerating
|
||||||
# all the binaries and manapages manually, esp. when there are new manpages in
|
# all the binaries and manapages manually
|
||||||
# each release)
|
|
||||||
filelist()
|
filelist()
|
||||||
{
|
{
|
||||||
echo '%%defattr(-, root, root)'
|
echo '%%defattr(-, root, root)'
|
||||||
@ -108,9 +102,6 @@ install -D -m 644 %_sourcedir/mysql.SuSEfirewall2 \
|
|||||||
# testsuite
|
# testsuite
|
||||||
mkdir -p '%buildroot'/usr/share/mysql-test/
|
mkdir -p '%buildroot'/usr/share/mysql-test/
|
||||||
install -m 755 suse-test-run '%buildroot'/usr/share/mysql-test/
|
install -m 755 suse-test-run '%buildroot'/usr/share/mysql-test/
|
||||||
# XXX this should go under /var/..., but some tests get confused by a symlink
|
|
||||||
# var -> ../../../var/...
|
|
||||||
#ln -sf ../../../var/lib/mysql/mysql-test %buildroot/usr/share/mysql-test/var
|
|
||||||
mkdir '%buildroot'/usr/share/mysql-test/var
|
mkdir '%buildroot'/usr/share/mysql-test/var
|
||||||
# Final fixes
|
# Final fixes
|
||||||
find '%buildroot'/usr/share/mysql-test -name '*.orig' -delete
|
find '%buildroot'/usr/share/mysql-test -name '*.orig' -delete
|
||||||
@ -134,18 +125,33 @@ cat mysql-ndb-storage.files mysql-ndb-management.files \
|
|||||||
rm -f .$tmp
|
rm -f .$tmp
|
||||||
done
|
done
|
||||||
%endif
|
%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
|
%if ! 0%{prefered} > 0
|
||||||
cat libmysqlclient-devel.files | sed 's|%%doc\ ||' | while read tmp; do
|
cat libmysqlclient-devel.files | sed 's|%%doc\ ||' | while read tmp; do
|
||||||
cd '%buildroot'
|
cd '%buildroot'
|
||||||
rm -f ."$tmp"
|
rm -f ."$tmp"
|
||||||
done
|
done
|
||||||
rm -rf '%buildroot'/%_libdir/libmysqld.*
|
rm -rf '%buildroot'/%_libdir/libmysqld.*
|
||||||
rm -rf '%buildroot'/%_libdir/*.la
|
rm -rf '%buildroot'/%_libdir/{*.la,*.so,*.a}
|
||||||
rm -rf '%buildroot'/%_libdir/*.so
|
|
||||||
rm -rf '%buildroot'/%_datadir/man/*/mysql_config.1*
|
rm -rf '%buildroot'/%_datadir/man/*/mysql_config.1*
|
||||||
rm -rf '%buildroot'/%_includedir
|
rm -rf '%buildroot'/%_includedir
|
||||||
rm -rf '%buildroot'/%_datadir/aclocal
|
rm -rf '%buildroot'/%_datadir/aclocal
|
||||||
rm -rf '%buildroot'/%_libdir/*.a
|
|
||||||
%endif
|
%endif
|
||||||
sed -i 's|doc/packages/mysql|doc/packages/%{name}|g' '%buildroot'/etc/init.d/mysql
|
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/mysqlrepair
|
||||||
@ -158,18 +164,14 @@ ln -s libndbclient.so.6.0.0 '%buildroot'%_libdir/libndbclient.so.6
|
|||||||
if [ -f '%buildroot'/usr/bin/mysqlaccess.conf ]; then
|
if [ -f '%buildroot'/usr/bin/mysqlaccess.conf ]; then
|
||||||
mv '%buildroot'/usr/bin/mysqlaccess.conf '%buildroot'/etc/mysqlaccess.conf
|
mv '%buildroot'/usr/bin/mysqlaccess.conf '%buildroot'/etc/mysqlaccess.conf
|
||||||
fi
|
fi
|
||||||
|
rm -rf '%buildroot'/etc/my.cnf.d
|
||||||
mkdir -p '%buildroot'/etc/my.cnf.d
|
mkdir -p '%buildroot'/etc/my.cnf.d
|
||||||
rm -rf '%buildroot'/etc/my.cnf.d/*
|
|
||||||
bzip2 -cd '%_sourcedir'/configuration-tweaks.tar.bz2 | tar -C '%buildroot'/etc/my.cnf.d -xvf -
|
bzip2 -cd '%_sourcedir'/configuration-tweaks.tar.bz2 | tar -C '%buildroot'/etc/my.cnf.d -xvf -
|
||||||
if [ -z "`ls '%buildroot'/usr/share/info/mysql.info*`" ]; then
|
[ -z "`ls '%buildroot'/usr/share/info/mysql.info* 2> /dev/null`" ] || rm -f '%buildroot'/usr/share/info/mysql.info*
|
||||||
install -D -m 0644 Docs/mysql.info "%buildroot/usr/share/info/mysql.info"
|
if [ "`ls '%buildroot'%_libdir/mysql/plugin/dialog*.so 2> /dev/null`" ]; then
|
||||||
gzip -9 "%buildroot/usr/share/info/mysql.info"
|
|
||||||
fi
|
|
||||||
if [ "`ls '%buildroot'%_libdir/mysql/plugin/dialog*.so`" ]; then
|
|
||||||
echo '%%dir %%_libdir/mysql' >> mysql-client.files
|
echo '%%dir %%_libdir/mysql' >> mysql-client.files
|
||||||
echo '%%dir %%_libdir/mysql/plugin' >> mysql-client.files
|
echo '%%dir %%_libdir/mysql/plugin' >> mysql-client.files
|
||||||
echo '%%_libdir/mysql/plugin/dialog*.so' >> mysql-client.files
|
echo '%%_libdir/mysql/plugin/dialog*.so' >> mysql-client.files
|
||||||
fi
|
fi
|
||||||
rm -rf '%buildroot'/usr/share/doc/{mysql,mariadb}*
|
rm -rf '%buildroot'/usr/share/doc/{mysql,mariadb}*
|
||||||
rm -rf '%buildroot'/usr/share/mysql/solaris
|
rm -rf '%buildroot'/usr/share/mysql/{solaris,SELinux}
|
||||||
rm -rf '%buildroot'/usr/share/mysql/SELinux
|
|
||||||
|
@ -1,3 +1,34 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 12 14:32:51 CEST 2013 - mhrusecky@suse.cz
|
||||||
|
|
||||||
|
- chown --no-dereference instead of chown to improve security
|
||||||
|
* similar issue as CVE-2013-1976
|
||||||
|
- fix build for ppc64 using -mminimal-toc
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 12 12:25:16 CEST 2013 - mhrusecky@suse.cz
|
||||||
|
|
||||||
|
- merge latest packaging fixes
|
||||||
|
* better handling of libdir
|
||||||
|
* more cautious upgrades
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 7 15:12:13 CEST 2013 - ro@suse.de
|
||||||
|
|
||||||
|
- add patch for lib64 on s390x
|
||||||
|
mysql-patches/mariadb-5.5.24-s390x-libdir.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 30 21:51:25 CEST 2013 - mhrusecky@suse.cz
|
||||||
|
|
||||||
|
- get rid of info which is not info (bnc#747811)
|
||||||
|
- minor polishing of spec/installation
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jul 26 10:07:33 CEST 2013 - mhrusecky@suse.cz
|
||||||
|
|
||||||
|
- fix ownership of logdir (bnc#763150)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jul 25 13:08:06 CEST 2013 - mhrusecky@suse.cz
|
Thu Jul 25 13:08:06 CEST 2013 - mhrusecky@suse.cz
|
||||||
|
|
||||||
|
41
mariadb.spec
41
mariadb.spec
@ -15,7 +15,6 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
# Few definitions which will alter build
|
# Few definitions which will alter build
|
||||||
%define prefered 1
|
%define prefered 1
|
||||||
%define use_cmake 1
|
%define use_cmake 1
|
||||||
@ -55,10 +54,10 @@ Source14: my.ini
|
|||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
PreReq: pwdutils
|
PreReq: pwdutils
|
||||||
PreReq: %install_info_prereq %insserv_prereq
|
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
|
BuildRequires: bison
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: libaio-devel
|
BuildRequires: libaio-devel
|
||||||
@ -94,14 +93,18 @@ Requires: perl-base
|
|||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
%endif
|
%endif
|
||||||
|
%if "%{name}" != mysql
|
||||||
Provides: mysql = %{srv_vers}
|
Provides: mysql = %{srv_vers}
|
||||||
|
%endif
|
||||||
Provides: mysql-Max = %{srv_vers}
|
Provides: mysql-Max = %{srv_vers}
|
||||||
%if 0%{?use_extra_provides} > 0
|
%if 0%{?use_extra_provides} > 0
|
||||||
Provides: %{extra_provides} = %{version}
|
Provides: %{extra_provides} = %{version}
|
||||||
Obsoletes: %{extra_provides} < %{version}
|
Obsoletes: %{extra_provides} < %{version}
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?prefered} > 0
|
%if 0%{?prefered} > 0
|
||||||
|
%if "%{name}" != mysql
|
||||||
Obsoletes: mysql < %{srv_vers}
|
Obsoletes: mysql < %{srv_vers}
|
||||||
|
%endif
|
||||||
Obsoletes: mysql-Max < %{srv_vers}
|
Obsoletes: mysql-Max < %{srv_vers}
|
||||||
%endif
|
%endif
|
||||||
Conflicts: otherproviders(mysql)
|
Conflicts: otherproviders(mysql)
|
||||||
@ -171,18 +174,22 @@ languages and applications need to dynamically load and use MariaDB.
|
|||||||
%package client
|
%package client
|
||||||
Summary: Client for MariaDB
|
Summary: Client for MariaDB
|
||||||
Group: Productivity/Databases/Clients
|
Group: Productivity/Databases/Clients
|
||||||
|
%if "%{name}" != mysql
|
||||||
Provides: mysql-client = %{srv_vers}
|
Provides: mysql-client = %{srv_vers}
|
||||||
|
%endif
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
PreReq: pwdutils
|
PreReq: pwdutils
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?use_extra_provides} > 0
|
%if 0%{?use_extra_provides} > 0
|
||||||
Provides: %{extra_provides}-client = %{version}
|
Provides: %{extra_provides}-client = %{version}
|
||||||
Obsoletes: %{extra_provides}-client < %{version}
|
Obsoletes: %{extra_provides}-client < %{version}
|
||||||
Requires: %{name}-errormessages = %version
|
|
||||||
%endif
|
%endif
|
||||||
|
Requires: %{name}-errormessages = %version
|
||||||
%if 0%{?prefered} > 0
|
%if 0%{?prefered} > 0
|
||||||
|
%if "%{name}" != mysql
|
||||||
Obsoletes: mysql-client < %{srv_vers}
|
Obsoletes: mysql-client < %{srv_vers}
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
Conflicts: otherproviders(mysql-client)
|
Conflicts: otherproviders(mysql-client)
|
||||||
|
|
||||||
%description client
|
%description client
|
||||||
@ -201,14 +208,18 @@ Requires: %{name}-client
|
|||||||
Requires: perl-DBD-mysql
|
Requires: perl-DBD-mysql
|
||||||
Summary: Benchmarks for MariaDB
|
Summary: Benchmarks for MariaDB
|
||||||
Group: Productivity/Databases/Tools
|
Group: Productivity/Databases/Tools
|
||||||
|
%if "%{name}" != mysql
|
||||||
Provides: mysql-bench = %{srv_vers}
|
Provides: mysql-bench = %{srv_vers}
|
||||||
|
%endif
|
||||||
%if 0%{?use_extra_provides} > 0
|
%if 0%{?use_extra_provides} > 0
|
||||||
Provides: %{extra_provides}-bench = %{version}
|
Provides: %{extra_provides}-bench = %{version}
|
||||||
Obsoletes: %{extra_provides}-bench < %{version}
|
Obsoletes: %{extra_provides}-bench < %{version}
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?prefered} > 0
|
%if 0%{?prefered} > 0
|
||||||
|
%if "%{name}" != mysql
|
||||||
Obsoletes: mysql-bench < %{srv_vers}
|
Obsoletes: mysql-bench < %{srv_vers}
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
Conflicts: otherproviders(mysql-bench)
|
Conflicts: otherproviders(mysql-bench)
|
||||||
|
|
||||||
%description bench
|
%description bench
|
||||||
@ -248,14 +259,18 @@ Requires: %{name}-bench = %{version}
|
|||||||
Requires: %{name}-client = %{version}
|
Requires: %{name}-client = %{version}
|
||||||
Requires: %{name}-tools = %{version}
|
Requires: %{name}-tools = %{version}
|
||||||
Requires: perl-DBD-mysql
|
Requires: perl-DBD-mysql
|
||||||
|
%if "%{name}" != mysql
|
||||||
Provides: mysql-test = %{srv_vers}
|
Provides: mysql-test = %{srv_vers}
|
||||||
|
%endif
|
||||||
%if 0%{?use_extra_provides} > 0
|
%if 0%{?use_extra_provides} > 0
|
||||||
Provides: %{extra_provides}-test = %{version}
|
Provides: %{extra_provides}-test = %{version}
|
||||||
Obsoletes: %{extra_provides}-test < %{version}
|
Obsoletes: %{extra_provides}-test < %{version}
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?prefered} > 0
|
%if 0%{?prefered} > 0
|
||||||
|
%if "%{name}" != mysql
|
||||||
Obsoletes: mysql-test < %{srv_vers}
|
Obsoletes: mysql-test < %{srv_vers}
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
Conflicts: otherproviders(mysql-test)
|
Conflicts: otherproviders(mysql-test)
|
||||||
|
|
||||||
%description test
|
%description test
|
||||||
@ -269,15 +284,19 @@ Group: Productivity/Databases/Servers
|
|||||||
Requires: perl-DBD-mysql
|
Requires: perl-DBD-mysql
|
||||||
# make sure this package is installed when updating from 10.2 and older
|
# make sure this package is installed when updating from 10.2 and older
|
||||||
Provides: mysql-client:/usr/bin/perror
|
Provides: mysql-client:/usr/bin/perror
|
||||||
|
%if "%{name}" != mysql
|
||||||
Provides: mysql-tools = %{srv_vers}
|
Provides: mysql-tools = %{srv_vers}
|
||||||
|
%endif
|
||||||
Provides: mysql:/usr/bin/mysqlhotcopy
|
Provides: mysql:/usr/bin/mysqlhotcopy
|
||||||
%if 0%{?use_extra_provides} > 0
|
%if 0%{?use_extra_provides} > 0
|
||||||
Provides: %{extra_provides}-tools = %{version}
|
Provides: %{extra_provides}-tools = %{version}
|
||||||
Obsoletes: %{extra_provides}-tools < %{version}
|
Obsoletes: %{extra_provides}-tools < %{version}
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?prefered} > 0
|
%if 0%{?prefered} > 0
|
||||||
|
%if "%{name}" != mysql
|
||||||
Obsoletes: mysql-tools < %{srv_vers}
|
Obsoletes: mysql-tools < %{srv_vers}
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
Conflicts: otherproviders(mysql-tools)
|
Conflicts: otherproviders(mysql-tools)
|
||||||
|
|
||||||
%description tools
|
%description tools
|
||||||
@ -301,8 +320,10 @@ cluster.
|
|||||||
%package ndb-storage
|
%package ndb-storage
|
||||||
Summary: MariaDB - ndbcluster storage engine
|
Summary: MariaDB - ndbcluster storage engine
|
||||||
Group: Productivity/Databases/Servers
|
Group: Productivity/Databases/Servers
|
||||||
|
%if "%{name}" != mysql
|
||||||
Provides: mysql-ndb-storage = %{srv_vers}
|
Provides: mysql-ndb-storage = %{srv_vers}
|
||||||
Obsoletes: mysql-ndb-storage < %{srv_vers}
|
Obsoletes: mysql-ndb-storage < %{srv_vers}
|
||||||
|
%endif
|
||||||
Conflicts: otherproviders(mysql-ndb-storage)
|
Conflicts: otherproviders(mysql-ndb-storage)
|
||||||
|
|
||||||
%description ndb-storage
|
%description ndb-storage
|
||||||
@ -314,8 +335,10 @@ computers that should store ndbcluster table data.
|
|||||||
%package ndb-management
|
%package ndb-management
|
||||||
Summary: MariaDB - ndbcluster storage engine management
|
Summary: MariaDB - ndbcluster storage engine management
|
||||||
Group: Productivity/Databases/Servers
|
Group: Productivity/Databases/Servers
|
||||||
|
%if "%{name}" != mysql
|
||||||
Provides: mysql-ndb-management = %{srv_vers}
|
Provides: mysql-ndb-management = %{srv_vers}
|
||||||
Obsoletes: mysql-ndb-management < %{srv_vers}
|
Obsoletes: mysql-ndb-management < %{srv_vers}
|
||||||
|
%endif
|
||||||
Conflicts: otherproviders(mysql-ndb-management)
|
Conflicts: otherproviders(mysql-ndb-management)
|
||||||
|
|
||||||
%description ndb-management
|
%description ndb-management
|
||||||
@ -326,8 +349,10 @@ one computer in the cluster.
|
|||||||
%package ndb-tools
|
%package ndb-tools
|
||||||
Summary: MariaDB - ndbcluster storage engine basic tools
|
Summary: MariaDB - ndbcluster storage engine basic tools
|
||||||
Group: Productivity/Databases/Servers
|
Group: Productivity/Databases/Servers
|
||||||
|
%if "%{name}" != mysql
|
||||||
Provides: mysql-ndb-tools = %{srv_vers}
|
Provides: mysql-ndb-tools = %{srv_vers}
|
||||||
Obsoletes: mysql-ndb-tools < %{srv_vers}
|
Obsoletes: mysql-ndb-tools < %{srv_vers}
|
||||||
|
%endif
|
||||||
Conflicts: otherproviders(mysql-ndb-tools)
|
Conflicts: otherproviders(mysql-ndb-tools)
|
||||||
|
|
||||||
%description ndb-tools
|
%description ndb-tools
|
||||||
@ -336,8 +361,10 @@ This package contains ndbcluster storage engine basic tools.
|
|||||||
%package ndb-extra
|
%package ndb-extra
|
||||||
Summary: MariaDB - ndbcluster storage engine extra tools
|
Summary: MariaDB - ndbcluster storage engine extra tools
|
||||||
Group: Productivity/Databases/Servers
|
Group: Productivity/Databases/Servers
|
||||||
|
%if "%{name}" != mysql
|
||||||
Provides: mysql-ndb-extra = %{srv_vers}
|
Provides: mysql-ndb-extra = %{srv_vers}
|
||||||
Obsoletes: mysql-ndb-extra < %{srv_vers}
|
Obsoletes: mysql-ndb-extra < %{srv_vers}
|
||||||
|
%endif
|
||||||
Conflicts: otherproviders(mysql-ndb-extra)
|
Conflicts: otherproviders(mysql-ndb-extra)
|
||||||
|
|
||||||
%description ndb-extra
|
%description ndb-extra
|
||||||
@ -383,7 +410,7 @@ rm -f mysql-test/t/file_contents.test mysql-test/r/file_contents.result
|
|||||||
/usr/sbin/groupadd -r mysql >/dev/null 2>/dev/null || :
|
/usr/sbin/groupadd -r mysql >/dev/null 2>/dev/null || :
|
||||||
/usr/sbin/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \
|
/usr/sbin/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \
|
||||||
-s /bin/false -d /var/lib/mysql mysql 2> /dev/null || :
|
-s /bin/false -d /var/lib/mysql mysql 2> /dev/null || :
|
||||||
/usr/sbin/usermod -g mysql -s /bin/false mysql || :
|
/usr/sbin/usermod -g mysql -s /bin/false mysql 2> /dev/null || :
|
||||||
# systemd requirment
|
# systemd requirment
|
||||||
%if 0%{?suse_version} >= 1210
|
%if 0%{?suse_version} >= 1210
|
||||||
%service_add_pre mysql.service
|
%service_add_pre mysql.service
|
||||||
@ -393,7 +420,7 @@ rm -f mysql-test/t/file_contents.test mysql-test/r/file_contents.result
|
|||||||
/usr/sbin/groupadd -r mysql >/dev/null 2>/dev/null || :
|
/usr/sbin/groupadd -r mysql >/dev/null 2>/dev/null || :
|
||||||
/usr/sbin/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \
|
/usr/sbin/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \
|
||||||
-s /bin/false -d /var/lib/mysql mysql 2> /dev/null || :
|
-s /bin/false -d /var/lib/mysql mysql 2> /dev/null || :
|
||||||
/usr/sbin/usermod -g mysql -s /bin/false mysql || :
|
/usr/sbin/usermod -g mysql -s /bin/false mysql 2> /dev/null || :
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# systemd requirment
|
# systemd requirment
|
||||||
@ -418,8 +445,6 @@ if posix.access("/usr/sbin/rcmysql", "x") then
|
|||||||
end
|
end
|
||||||
|
|
||||||
%posttrans
|
%posttrans
|
||||||
[ -z "`ls %{_infodir}/mysql.info.* 2> /dev/null`" ] || \
|
|
||||||
%install_info --info-dir=%{_infodir} %{_infodir}/mysql.info.*
|
|
||||||
if [ -d /var/lib/mysql ]; then
|
if [ -d /var/lib/mysql ]; then
|
||||||
touch /var/lib/mysql/.run-mysql_upgrade
|
touch /var/lib/mysql/.run-mysql_upgrade
|
||||||
chown -R mysql:mysql /var/lib/mysql
|
chown -R mysql:mysql /var/lib/mysql
|
||||||
@ -459,7 +484,6 @@ fi
|
|||||||
|
|
||||||
%postun
|
%postun
|
||||||
if [ $1 = 0 ]; then
|
if [ $1 = 0 ]; then
|
||||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/mysql.info.*
|
|
||||||
%{insserv_cleanup}
|
%{insserv_cleanup}
|
||||||
rm -f "/var/lib/systemd/migrated/mysql.service"
|
rm -f "/var/lib/systemd/migrated/mysql.service"
|
||||||
if [ -x /usr/bin/systemctl ]; then
|
if [ -x /usr/bin/systemctl ]; then
|
||||||
@ -478,7 +502,6 @@ fi
|
|||||||
%config(noreplace) %attr(0640, root, mysql) /etc/my.cnf.d/*
|
%config(noreplace) %attr(0640, root, mysql) /etc/my.cnf.d/*
|
||||||
%config /etc/logrotate.d/mysql
|
%config /etc/logrotate.d/mysql
|
||||||
%doc %{_defaultdocdir}/%{name}
|
%doc %{_defaultdocdir}/%{name}
|
||||||
%doc %{_infodir}/mysql.info.*
|
|
||||||
/etc/init.d/mysql
|
/etc/init.d/mysql
|
||||||
/usr/sbin/rcmysql
|
/usr/sbin/rcmysql
|
||||||
%dir /usr/share/%{name}
|
%dir /usr/share/%{name}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:2b34d03c24091c0a8120aae545ac9f0959b4167c21e7a1954819836bdf66a673
|
oid sha256:3c9a38335384fb99e0ac76488a2dd72cefa8fbca5f9f2b191c2348ecc64d6b0b
|
||||||
size 11823
|
size 13306
|
||||||
|
@ -273,7 +273,7 @@ else
|
|||||||
|
|
||||||
parse_arguments `$print_defaults $defaults mysqld mysql_server`
|
parse_arguments `$print_defaults $defaults mysqld mysql_server`
|
||||||
mkdir -m 755 -p /var/run/mysql
|
mkdir -m 755 -p /var/run/mysql
|
||||||
chown $mysql_daemon_user:$mysql_daemon_group /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`"
|
export TEMPDIR="`cat /var/run/mysql/tmpdir 2> /dev/null`"
|
||||||
|
|
||||||
# Safeguard (relative paths, core dumps..)
|
# Safeguard (relative paths, core dumps..)
|
||||||
@ -292,7 +292,7 @@ else
|
|||||||
rm -rf "$TEMPDIR"
|
rm -rf "$TEMPDIR"
|
||||||
fi
|
fi
|
||||||
TEMPDIR="`mktemp -d -p /var/tmp mysql.XXXXXX | tee /var/run/mysql/tmpdir`"
|
TEMPDIR="`mktemp -d -p /var/tmp mysql.XXXXXX | tee /var/run/mysql/tmpdir`"
|
||||||
[ -z "$TEMPDIR" ] || chown "$mysql_daemon_user:$mysql_daemon_group" "$TEMPDIR"
|
[ -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:]]\+.*"`" ] || {
|
[ "`ls -ld "$TEMPDIR" | grep "^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ] || {
|
||||||
echo "Can't create secure $TEMPDIR"
|
echo "Can't create secure $TEMPDIR"
|
||||||
rc_failed; rc_status -v; rc_exit;
|
rc_failed; rc_status -v; rc_exit;
|
||||||
@ -329,10 +329,13 @@ else
|
|||||||
log_dir="`dirname "$i"`"
|
log_dir="`dirname "$i"`"
|
||||||
if [ \! -d "$log_dir" ]; then
|
if [ \! -d "$log_dir" ]; then
|
||||||
mkdir -p "$log_dir"
|
mkdir -p "$log_dir"
|
||||||
chmod 770 "$log_dir"
|
|
||||||
fi
|
fi
|
||||||
|
chmod 770 "$log_dir"
|
||||||
|
chown -R --no-dereference mysql:mysql "$log_dir"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
MYSQLVER="`mysqld --version | sed 's|.*Ver\ *\([^\ ]*\)\.[0-9]\+[\-\ ].*|\1|'`"
|
||||||
|
|
||||||
# We assume a fresh install if the directory $datadir/mysql
|
# We assume a fresh install if the directory $datadir/mysql
|
||||||
# does not exist and create the privilege database
|
# does not exist and create the privilege database
|
||||||
if ! test -d "$datadir/mysql"; then
|
if ! test -d "$datadir/mysql"; then
|
||||||
@ -340,17 +343,33 @@ else
|
|||||||
mysql_install_db --user="$mysql_daemon_user" --datadir="$datadir" ||{
|
mysql_install_db --user="$mysql_daemon_user" --datadir="$datadir" ||{
|
||||||
rc_failed; rc_status -v; rc_exit
|
rc_failed; rc_status -v; rc_exit
|
||||||
}
|
}
|
||||||
|
echo -n "$MYSQLVER" > "$datadir"/mysql_upgrade_info
|
||||||
fi
|
fi
|
||||||
check_obsolete
|
check_obsolete
|
||||||
# Run mysql_upgrade on every package install/upgrade. Not allways
|
# Run mysql_upgrade on every package install/upgrade. Not always
|
||||||
# necessary, but doesn't do any harm.
|
# 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/.run-mysql_upgrade" ]; then
|
||||||
|
if [ \! -f "/var/lib/mysql/.force_upgrade" ] && \
|
||||||
|
[ -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
|
||||||
echo > "$log_upgrade"
|
echo > "$log_upgrade"
|
||||||
echo "`LANG="" date` - upgrading MySQL..." >> "$log_upgrade"
|
echo "`LANG="" date` - upgrading MySQL..." >> "$log_upgrade"
|
||||||
echo >> "$log_upgrade"
|
echo >> "$log_upgrade"
|
||||||
echo "Will update MySQL now, if you encounter any problems, please read following file:" | tee -a "$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|^\([^#]*skip-locking\)|#\1\nskip-external-locking|' \
|
sed -i -e 's|^\([^#]*skip-locking\)|\1\nskip-external-locking|' \
|
||||||
-e 's|^\([^#]*skip-federated\)|#\1|' /etc/my.cnf
|
-e 's|^\([^#]*skip-federated\)|#\1|' /etc/my.cnf
|
||||||
# Check logs for inconsistencies
|
# Check logs for inconsistencies
|
||||||
SRCLOGS=""
|
SRCLOGS=""
|
||||||
@ -399,7 +418,7 @@ else
|
|||||||
# reloads privileges tables, so we can get lock out
|
# reloads privileges tables, so we can get lock out
|
||||||
for cmd in "/usr/bin/mysql_upgrade" \
|
for cmd in "/usr/bin/mysql_upgrade" \
|
||||||
"/usr/bin/mysql_upgrade"; do
|
"/usr/bin/mysql_upgrade"; do
|
||||||
[ -z "$protected" ] || chown "$mysql_daemon_user:$mysql_daemon_group" "$protected"
|
[ -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:]]\+.*"`" ] || {
|
[ "`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"
|
echo "Can't create secure $protected" | tee -a "$log_upgrade"
|
||||||
touch /var/lib/mysql/.run-mysql_upgrade
|
touch /var/lib/mysql/.run-mysql_upgrade
|
||||||
@ -425,6 +444,7 @@ else
|
|||||||
rc_failed; rc_status -v; rc_exit;
|
rc_failed; rc_status -v; rc_exit;
|
||||||
}
|
}
|
||||||
if [ "`grep "Upgrading MySQL..." "$log_upgrade"`" ]; then
|
if [ "`grep "Upgrading MySQL..." "$log_upgrade"`" ]; then
|
||||||
|
echo "Problems should be fixed now."
|
||||||
echo "Rechecking whether everything is Ok... " | tee -a "$log_upgrade"
|
echo "Rechecking whether everything is Ok... " | tee -a "$log_upgrade"
|
||||||
LANG=C $cmd --no-defaults --force \
|
LANG=C $cmd --no-defaults --force \
|
||||||
--socket="$protected/mysql.sock" | \
|
--socket="$protected/mysql.sock" | \
|
||||||
@ -461,11 +481,12 @@ else
|
|||||||
rm -rf "$protected"
|
rm -rf "$protected"
|
||||||
# Fix ownerships and permissions for $datadir
|
# Fix ownerships and permissions for $datadir
|
||||||
chmod 750 "$datadir"
|
chmod 750 "$datadir"
|
||||||
chown -R "$mysql_daemon_user:$mysql_daemon_group" "$datadir"
|
chown -R --no-dereference "$mysql_daemon_user:$mysql_daemon_group" "$datadir"
|
||||||
rm -f /var/lib/mysql/.run-mysql_upgrade \
|
rm -f /var/adm/update-messages/mysql-*
|
||||||
rm -f /var/lib/mysql/.force_upgrade \
|
rm -f /var/lib/mysql/.run-mysql_upgrade
|
||||||
"$datadir"/{update-stamp-*,mysql/stamp-4.1} # used in the past
|
rm -f /var/lib/mysql/.force_upgrade
|
||||||
chown "$mysql_daemon_user:$mysql_daemon_group" "$log_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"
|
chmod 640 "$log_upgrade"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
5
series
5
series
@ -9,5 +9,6 @@ mariadb-5.5.32-upgrade-exit-status.patch
|
|||||||
mariadb-5.2.3-cnf.patch
|
mariadb-5.2.3-cnf.patch
|
||||||
mysql-community-server-5.5.6-safe-process-in-bin.patch
|
mysql-community-server-5.5.6-safe-process-in-bin.patch
|
||||||
mariadb-5.5.28-group.patch
|
mariadb-5.5.28-group.patch
|
||||||
mariadb-5.5.24-ppc64-libdir.patch
|
mariadb-5.5.32-deharcode-libdir.patch
|
||||||
mariadb-5.5.24-aarch64-libdir.patch
|
mysql-5.5.31-upgrade-datadir.patch
|
||||||
|
mysql-5.5-dump.patch
|
||||||
|
Loading…
Reference in New Issue
Block a user