packages: mysql/percona.sh - bring from MYSQL_5_1 branch

glen glen at pld-linux.org
Tue Mar 8 12:46:58 CET 2011


Author: glen                         Date: Tue Mar  8 11:46:58 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- bring from MYSQL_5_1 branch

---- Files affected:
packages/mysql:
   percona.sh (1.8 -> 1.9) 

---- Diffs:

================================================================
Index: packages/mysql/percona.sh
diff -u /dev/null packages/mysql/percona.sh:1.9
--- /dev/null	Tue Mar  8 12:46:58 2011
+++ packages/mysql/percona.sh	Tue Mar  8 12:46:53 2011
@@ -0,0 +1,73 @@
+#!/bin/sh
+# updates percona patches
+# http://www.percona.com/docs/wiki/repositories:start
+# https://launchpad.net/percona-server/5.5
+# bzr branch lp:percona-server/5.5
+
+version=5.5
+bzr_branch=lp:percona-server/$version
+branch=
+
+filter_names() {
+	# mysql_dump_ignore_ct.patch is broken, therefore we skip
+	grep -v 'mysql_dump_ignore_ct.patch' | \
+	grep -v 'percona-support.patch' | \
+	grep -v 'mysqld_safe_syslog.patch' | \
+	grep -v 'mysql-test.diff'
+}
+
+filter_files() {
+	filterdiff -x '*/configure'
+}
+
+if [ -d $version ]; then
+	cd $version
+	bzr pull
+	cd ..
+else
+	bzr branch $bzr_branch $version
+fi
+
+> .percona.spec
+> .patch.spec
+i=100
+for patch in $(cat $version/series | filter_names); do
+	file=mysql-$patch
+	cat $version/$patch | filter_files > $file
+
+	if [ -z "$(awk -vfile=$file -F/ '$2 == file{print}' CVS/Entries)" ]; then
+		cvs add $file
+		${branch:+cvs up -r $branch $file}
+	fi
+
+	echo >&2 "Adding: $patch"
+	printf "Patch%d:\t%s\n" $i %{name}-$patch >> .percona.spec
+	printf "%%patch%d -p1\n" $i >> .patch.spec
+	i=$((i+1))
+done
+
+# update PatchX section
+sed -i -e '
+/^# <percona patches/,/^# <\/percona>/ {
+	/^ <\/percona>/b
+	/^# <percona patches/ {
+		p # print header
+		r .percona.spec
+		a# </percona>
+	}
+	d
+}
+' mysql.spec
+
+# update %patchX section
+sed -i -e '
+/^# <percona %patches/,/^# <\/percona>/ {
+	/^ <\/percona>/b
+	/^# <percona %patches/ {
+		p # print header
+		r .patch.spec
+		a# </percona>
+	}
+	d
+}
+' mysql.spec
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/percona.sh?r1=1.8&r2=1.9&f=u



More information about the pld-cvs-commit mailing list