SPECS (DEVEL): mysql.spec - 5.1 trigger (not tested)
glen
glen at pld-linux.org
Wed Nov 1 19:28:36 CET 2006
Author: glen Date: Wed Nov 1 18:28:36 2006 GMT
Module: SPECS Tag: DEVEL
---- Log message:
- 5.1 trigger (not tested)
---- Files affected:
SPECS:
mysql.spec (1.324.2.7 -> 1.324.2.8)
---- Diffs:
================================================================
Index: SPECS/mysql.spec
diff -u SPECS/mysql.spec:1.324.2.7 SPECS/mysql.spec:1.324.2.8
--- SPECS/mysql.spec:1.324.2.7 Sun Oct 22 21:07:28 2006
+++ SPECS/mysql.spec Wed Nov 1 19:28:31 2006
@@ -685,6 +685,39 @@
EOF
#'
+%triggerpostun -- mysql < 5.1
+configs=""
+for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/mysql/clusters.conf); do
+ if echo "$config" | grep -q '^/'; then
+ config_file="$config"
+ elif [ -f "/etc/mysql/$config" ]; then
+ config_file=/etc/mysql/$config
+ else
+ clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/mysql/clusters.conf)
+ if [ -z "$clusterdir" ]; then
+ echo >&2 "Can't find cluster dir for $config!"
+ echo >&2 "Please remove extra (leading) spaces from /etc/mysql/clusters.conf"
+ exit 1
+ fi
+ config_file="$clusterdir/mysqld.conf"
+ fi
+
+ if [ ! -f "$config_file" ]; then
+ echo >&2 "ERROR: Can't find real config file for $config! Please report this (with above errors, if any) to http://bugs.pld-linux.org/"
+ continue
+ fi
+ configs="$configs $config_file"
+done
+
+(
+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)
+ echo "# mysql_upgrade --datadir=$datadir"
+done
+) | %banner -e %{name}-5.1
+
%files
%defattr(644,root,root,755)
%doc support-files/*.cnf support-files/*.ini
@@ -855,6 +888,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.324.2.8 2006/11/01 18:28:31 glen
+- 5.1 trigger (not tested)
+
Revision 1.324.2.7 2006/10/22 19:07:28 glen
- package ha_blackhole plugin
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/mysql.spec?r1=1.324.2.7&r2=1.324.2.8&f=u
More information about the pld-cvs-commit
mailing list