SPECS: mysql.spec - keep only one trigger on mysql package name du...
glen
glen at pld-linux.org
Sat Jan 12 17:09:34 CET 2008
Author: glen Date: Sat Jan 12 16:09:34 2008 GMT
Module: SPECS Tag: HEAD
---- Log message:
- keep only one trigger on mysql package name due rpm bugs
- cosmetic on < 5.1 upgrade script
- federated ha bconded in files
- federated disabled, doesn't produce any files here
- no ldconfig on main package
- rel 4
---- Files affected:
SPECS:
mysql.spec (1.395 -> 1.396)
---- Diffs:
================================================================
Index: SPECS/mysql.spec
diff -u SPECS/mysql.spec:1.395 SPECS/mysql.spec:1.396
--- SPECS/mysql.spec:1.395 Thu Jan 3 16:50:42 2008
+++ SPECS/mysql.spec Sat Jan 12 17:09:29 2008
@@ -14,7 +14,7 @@
# Conditional build:
%bcond_without innodb # InnoDB storage engine support
%bcond_without big_tables # Support tables with more than 4G rows even on 32 bit platforms
-%bcond_without federated # Federated storage engine support
+%bcond_with federated # Federated storage engine support
%bcond_without raid # RAID support
%bcond_without ssl # OpenSSL support
%bcond_without tcpd # libwrap (tcp_wrappers) support
@@ -33,7 +33,7 @@
Summary(zh_CN.UTF-8): MySQL数据库服务器
Name: mysql
Version: 5.1.22
-Release: 3
+Release: 4
License: GPL + MySQL FLOSS Exception
Group: Applications/Databases
#Source0Download: http://dev.mysql.com/downloads/mysql/5.1.html#source
@@ -83,11 +83,10 @@
BuildRequires: perl-devel >= 1:5.6.1
BuildRequires: readline-devel >= 4.2
BuildRequires: rpm-perlprov >= 4.1-13
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rpmbuild(macros) >= 1.414
BuildRequires: sed >= 4.0
BuildRequires: texinfo
BuildRequires: zlib-devel
-Requires(post,postun): /sbin/ldconfig
Requires(post,preun): /sbin/chkconfig
Requires(postun): /usr/sbin/groupdel
Requires(postun): /usr/sbin/userdel
@@ -641,6 +640,7 @@
rm $RPM_BUILD_ROOT%{_bindir}/mysql_client_test
rm $RPM_BUILD_ROOT%{_datadir}/mysql/mi_test_all
rm $RPM_BUILD_ROOT%{_datadir}/mysql/mi_test_all.res
+rm $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld_multi.server
rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test_embedded.1*
rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql-stress-test.pl.1*
@@ -649,8 +649,8 @@
# in %doc
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.{ini,cnf}
-# afaik not needed
-rm $RPM_BUILD_ROOT%{_libdir}/mysql/ha_{example,blackhole,federated}.{a,la}
+# not needed
+rm -f $RPM_BUILD_ROOT%{_libdir}/mysql/ha_{example,blackhole,federated}.{a,la}
%clean
rm -rf $RPM_BUILD_ROOT
@@ -661,7 +661,6 @@
%post
[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
-/sbin/ldconfig
/sbin/chkconfig --add mysql
%service mysql restart
@@ -673,7 +672,6 @@
%postun
[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
-/sbin/ldconfig
if [ "$1" = "0" ]; then
%userremove mysql
@@ -713,9 +711,12 @@
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
+%if 0
+# rpm 4.4.9 is broken, it invokes the first trigger (4.0.20-2) three times
+# instead all of them (or only last one if compared to 4.4.2).
%triggerpostun -- mysql <= 4.0.20-2
# For clusters in /etc/mysql/clusters.conf
-if [ -f "/etc/sysconfig/mysql" ]; then
+if [ -f /etc/sysconfig/mysql ]; then
. /etc/sysconfig/mysql
if [ -n "$MYSQL_DB_CLUSTERS" ]; then
for i in "$MYSQL_DB_CLUSTERS"; do
@@ -767,6 +768,8 @@
EOF
#'
+%endif
+
%triggerpostun -- mysql < 5.1
configs=""
for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/mysql/clusters.conf); do
@@ -795,7 +798,7 @@
echo 'You should run MySQL upgrade scripts for all MySQL clusters.'
echo 'Thus, you should invoke:'
for config in $configs; do
- datadir=$(awk -F= '!/^#/ && $1 ~ /datadir/{print $2}' $config)
+ datadir=$(awk -F= '!/^#/ && $1 ~ /datadir/{print $2}' $config | xargs)
echo "# mysql_upgrade --datadir=$datadir"
done
) | %banner -e %{name}-5.1
@@ -819,7 +822,7 @@
%dir %{_libdir}/mysql
%attr(755,root,root) %{_libdir}/mysql/ha_blackhole.so.*.*.*
%attr(755,root,root) %{_libdir}/mysql/ha_example.so.*.*.*
-%attr(755,root,root) %{_libdir}/mysql/ha_federated.so.*.*.*
+%{?with_federated:%attr(755,root,root) %{_libdir}/mysql/ha_federated.so.*.*.*}
%{_mandir}/man1/innochecksum.1*
%{_mandir}/man1/myisamchk.1*
%{_mandir}/man1/myisamlog.1*
@@ -1034,6 +1037,14 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.396 2008-01-12 16:09:29 glen
+- keep only one trigger on mysql package name due rpm bugs
+- cosmetic on < 5.1 upgrade script
+- federated ha bconded in files
+- federated disabled, doesn't produce any files here
+- no ldconfig on main package
+- rel 4
+
Revision 1.395 2008-01-03 15:50:42 qboosh
- updated download URL
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/mysql.spec?r1=1.395&r2=1.396&f=u
More information about the pld-cvs-commit
mailing list