- merge latest packaging fixes
* better handling of libdir * more cautious upgrades OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=128
This commit is contained in:
parent
1134b7b25a
commit
9cefabf9c7
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3cc0f6ea38614ac278f6828fc2c9518437fd9958231af5fd58e0a3b8d590399c
|
||||
size 312
|
||||
oid sha256:219b058d331b9ac48e9ee207888ea60adc3e086733e7cda68592a04951bfb30e
|
||||
size 317
|
||||
|
24
install.inc
24
install.inc
@ -15,26 +15,20 @@ if [ -f "%{buildroot}%{_bindir}/mytop" ]; then
|
||||
fi
|
||||
rm -f %buildroot%_libdir/mysql/plugin/handlersocket.so
|
||||
# remove most static libs (FIXME: don't build them at all...)
|
||||
rm -f %buildroot%_libdir/libmysqlclient*a
|
||||
rm -f %buildroot%_libdir/libmysqlservices*a
|
||||
rm -f %buildroot%_libdir/mysql/*.a %buildroot%_libdir/mysql/*.la
|
||||
rm -f %buildroot%_libdir/mysql/plugin/*a
|
||||
[ \! -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}
|
||||
# XXX: package these? The ndb tools are linked statically atm
|
||||
rm -f %buildroot%_libdir/mysql/libndbclient.*
|
||||
rm -f %{buildroot}/usr/share/mysql-test/mysql-test-run
|
||||
rm -f %{buildroot}/usr/share/mysql-test/mtr
|
||||
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}/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 (easier than enumerating
|
||||
# all the binaries and manapages manually, esp. when there are new manpages in
|
||||
# each release)
|
||||
# all the binaries and manapages manually
|
||||
filelist()
|
||||
{
|
||||
echo '%%defattr(-, root, root)'
|
||||
@ -170,11 +164,11 @@ ln -s libndbclient.so.6.0.0 '%buildroot'%_libdir/libndbclient.so.6
|
||||
if [ -f '%buildroot'/usr/bin/mysqlaccess.conf ]; then
|
||||
mv '%buildroot'/usr/bin/mysqlaccess.conf '%buildroot'/etc/mysqlaccess.conf
|
||||
fi
|
||||
rm -rf '%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 -
|
||||
[ -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`" ]; then
|
||||
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
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
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
|
||||
|
||||
|
32
mariadb.spec
32
mariadb.spec
@ -15,7 +15,6 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
# Few definitions which will alter build
|
||||
%define prefered 1
|
||||
%define use_cmake 1
|
||||
@ -68,6 +67,7 @@ BuildRequires: ncurses-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: pam-devel
|
||||
BuildRequires: procps
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: zlib-devel
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: pwdutils
|
||||
@ -93,14 +93,18 @@ Requires: perl-base
|
||||
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)
|
||||
@ -170,18 +174,22 @@ 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}
|
||||
Requires: %{name}-errormessages = %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
|
||||
@ -200,14 +208,18 @@ 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
|
||||
@ -247,14 +259,18 @@ 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
|
||||
@ -268,15 +284,19 @@ 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
|
||||
@ -300,8 +320,10 @@ cluster.
|
||||
%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
|
||||
@ -313,8 +335,10 @@ 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
|
||||
@ -325,8 +349,10 @@ 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
|
||||
@ -335,8 +361,10 @@ 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
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a0e2010cb3d5483443dd9444f61618da50ab966c13c1acada187e17f8a0b5195
|
||||
size 11226
|
||||
oid sha256:8d8547e5bd6984bdbff29f6f6f1bfa78a18353a9389c5f47a708d8c52f07fe53
|
||||
size 13345
|
||||
|
@ -334,6 +334,8 @@ else
|
||||
chown -R 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
|
||||
@ -341,17 +343,33 @@ else
|
||||
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 allways
|
||||
# necessary, but doesn't do any harm.
|
||||
# Run mysql_upgrade on every package install/upgrade. Not always
|
||||
# necessary, but doesn't do any harm. On big upgrade, require
|
||||
# user confirmation.
|
||||
if [ -f "/var/lib/mysql/.run-mysql_upgrade" ]; then
|
||||
if [ \! -f "/var/lib/mysql/.force_upgrade" ] && \
|
||||
[ -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 "`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|' \
|
||||
sed -i -e 's|^\([^#]*skip-locking\)|\1\nskip-external-locking|' \
|
||||
-e 's|^\([^#]*skip-federated\)|#\1|' /etc/my.cnf
|
||||
# Check logs for inconsistencies
|
||||
SRCLOGS=""
|
||||
@ -426,6 +444,7 @@ else
|
||||
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" | \
|
||||
@ -463,9 +482,10 @@ else
|
||||
# Fix ownerships and permissions for $datadir
|
||||
chmod 750 "$datadir"
|
||||
chown -R "$mysql_daemon_user:$mysql_daemon_group" "$datadir"
|
||||
rm -f /var/lib/mysql/.run-mysql_upgrade \
|
||||
rm -f /var/lib/mysql/.force_upgrade \
|
||||
"$datadir"/{update-stamp-*,mysql/stamp-4.1} # used in the past
|
||||
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 "$mysql_daemon_user:$mysql_daemon_group" "$log_upgrade"
|
||||
chmod 640 "$log_upgrade"
|
||||
fi
|
||||
|
6
series
6
series
@ -9,6 +9,6 @@ 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.24-ppc64-libdir.patch
|
||||
mariadb-5.5.24-aarch64-libdir.patch
|
||||
mariadb-5.5.24-s390x-libdir.patch
|
||||
mariadb-5.5.32-deharcode-libdir.patch
|
||||
mysql-5.5.31-upgrade-datadir.patch
|
||||
mysql-5.5-dump.patch
|
||||
|
Loading…
Reference in New Issue
Block a user