[arch-commits] Commit in mysql/trunk (5 files)
Jan de Groot
jgc at archlinux.org
Fri May 28 20:08:31 UTC 2010
Date: Friday, May 28, 2010 @ 16:08:31
Author: jgc
Revision: 81345
Update to 5.1.47:
- do not remove /usr/lib/mysql completely, restores plugins and ndb client
- fix install scriptlet to avoid errors on post_remove
- fix startup script to wait for mysql to stop instead of sleeping 5 seconds
- fix build with gcc 4.5 by skipping the abi check for now
Added:
mysql/trunk/skip-abi-check.patch
Modified:
mysql/trunk/PKGBUILD
mysql/trunk/mysql.install
mysql/trunk/mysqld
Deleted:
mysql/trunk/gcc4.5.patch
----------------------+
PKGBUILD | 78 +++++++++++++++++++------------------------------
gcc4.5.patch | 28 -----------------
mysql.install | 8 +++--
mysqld | 14 ++++++--
skip-abi-check.patch | 13 ++++++++
5 files changed, 61 insertions(+), 80 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2010-05-28 19:05:49 UTC (rev 81344)
+++ PKGBUILD 2010-05-28 20:08:31 UTC (rev 81345)
@@ -5,32 +5,28 @@
pkgbase=mysql
pkgname=('libmysqlclient' 'mysql-clients' 'mysql')
-pkgver=5.1.46
-pkgrel=2
+pkgver=5.1.47
+pkgrel=1
arch=('i686' 'x86_64')
license=('GPL')
url="http://www.mysql.com/"
makedepends=('tcp_wrappers' 'zlib' 'perl' 'openssl' 'libtool' 'patch')
options=('!libtool')
-source=("http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.1/${pkgbase}-${pkgver}.tar.gz"
- 'mysqld' 'my.cnf'
- 'gcc4.5.patch')
-md5sums=('04f7c1422199c73a88a3d408b9161b63'
- '2832c3ed6c70c198785ade1b2d9c0404'
+source=(http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.1/${pkgbase}-${pkgver}.tar.gz
+ mysqld
+ my.cnf
+ skip-abi-check.patch)
+md5sums=('02b9964b3966832f3d6bc87524bfd73f'
+ '2234207625baa29b2ff7d7b4f088abce'
'0337741fa9afbe57939993636081a827'
- '4cbf0fc3eb76057f7a8dd52a3e2a58e6')
+ 'a97e574945e19de3908575b956241026')
build() {
- cd ${srcdir}/${pkgbase}-${pkgver}
-
- # fix build with gcc 4.4
- # see http://bugs.archlinux.org/task/15242
- # and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38562
- CFLAGS="-fPIC ${CFLAGS} -fno-strict-aliasing"
- CXXFLAGS="-fPIC ${CXXFLAGS} -fno-strict-aliasing"
-
- patch -Np1 -i ${srcdir}/gcc4.5.patch
-
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ patch -Np0 -i "${srcdir}/skip-abi-check.patch" || return 1
+ # CFLAGS/CXXFLAGS as suggested upstream
+ CFLAGS="-fPIC ${CFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer" \
+ CXXFLAGS="-fPIC ${CXXFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-rtti" \
./configure --prefix=/usr \
--libexecdir=/usr/sbin \
--localstatedir=/var \
@@ -45,37 +41,22 @@
--with-embedded-server \
--with-unix-socket-path=/var/run/mysqld/mysqld.sock \
--enable-local-infile \
- --with-plugins=partition,ftexample,archive,blackhole,federated,heap,innobase,innodb_plugin,ndbcluster
+ --with-plugins=partition,ftexample,archive,blackhole,federated,heap,innobase,innodb_plugin,ndbcluster || return 1
make || return 1
-
- pushd libmysql
- make link_sources get_password.lo || return 1
- popd
-
- pushd scripts
- make mysql_config || return 1
- popd
}
package_libmysqlclient(){
pkgdesc="MySQL client libraries"
depends=('openssl' 'zlib' 'gcc-libs' 'tcp_wrappers')
- cd ${srcdir}/${pkgbase}-${pkgver}
- for dir in libmysql libmysql_r libmysqld; do
- pushd ${dir} || return 1
- make DESTDIR=${pkgdir} install
- popd
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ for dir in include libmysql libmysql_r libmysqld; do
+ make -C ${dir} DESTDIR="${pkgdir}" install || return 1
done
-
- cd include
- make DESTDIR=${pkgdir} install
- # Copy missing includes
- install -m644 *.h ${pkgdir}/usr/include/mysql
+ install -m644 include/*.h "${pkgdir}/usr/include/mysql/" || return 1
- cd ../scripts
- install -d ${pkgdir}/usr/bin
- install -m755 mysql_config ${pkgdir}/usr/bin || return 1
+ install -d "${pkgdir}/usr/bin"
+ install -m755 scripts/mysql_config "${pkgdir}/usr/bin/" || return 1
# create library symlinks in /usr/lib
ln -sf mysql/libmysqlclient.so.16 ${pkgdir}/usr/lib/libmysqlclient.so.16
@@ -90,14 +71,14 @@
pkgdesc="MySQL client tools"
depends=('libmysqlclient')
- cd ${srcdir}/${pkgbase}-${pkgver}/client
- make DESTDIR=${pkgdir} install
+ cd "${srcdir}/${pkgbase}-${pkgver}/client"
+ make DESTDIR="${pkgdir}" install || return 1
# provided by libmysqlclient
- rm -rf ${pkgdir}/usr/lib/
+ rm -rf "${pkgdir}/usr/lib/"
# provided by mysql
- rm -f ${pkgdir}/usr/bin/{mysql_upgrade,mysqlbinlog,mysqltest}
+ rm -f "${pkgdir}"/usr/bin/{mysql_upgrade,mysqlbinlog,mysqltest}
}
package_mysql(){
@@ -107,19 +88,22 @@
depends=('mysql-clients')
optdepends=('perl-dbi' 'perl-dbd-mysql')
- cd ${srcdir}/${pkgbase}-${pkgver}
- make DESTDIR=${pkgdir} install
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ make DESTDIR=${pkgdir} install || return 1
install -Dm644 ${srcdir}/my.cnf ${pkgdir}/etc/mysql/my.cnf || return 1
install -Dm755 ${srcdir}/mysqld ${pkgdir}/etc/rc.d/mysqld || return 1
# provided by libmysqlclient
rm -f ${pkgdir}/usr/bin/{mysql_config,mysql_client_test_embedded,mysqltest_embedded}
- rm -rf ${pkgdir}/usr/{include,lib}
+ rm -f ${pkgdir}/usr/lib/mysql/libmysqlclient*
+ rm -f ${pkgdir}/usr/lib/mysql/libmysqld.a
+ rm -f ${pkgdir}/usr/include/mysql/*.h
# provided by mysql-clients
rm -f ${pkgdir}/usr/bin/{mysql,mysqladmin,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap}
# not needed
rm -rf ${pkgdir}/usr/{mysql-test,sql-bench}
+ rm -f ${pkgdir}/usr/lib/mysql/plugin/*.a
}
Deleted: gcc4.5.patch
===================================================================
--- gcc4.5.patch 2010-05-28 19:05:49 UTC (rev 81344)
+++ gcc4.5.patch 2010-05-28 20:08:31 UTC (rev 81345)
@@ -1,28 +0,0 @@
---- mysql-5.1.45/Makefile.am.orig 2010-03-31 10:52:25.000000000 -0400
-+++ mysql-5.1.45/Makefile.am 2010-03-31 10:55:05.000000000 -0400
-@@ -312,24 +312,7 @@
- $(MAKE) abi_headers="$^" do_abi_check
-
- do_abi_check:
-- set -ex; \
-- for file in $(abi_headers); do \
-- @CC@ -E -nostdinc -dI \
-- -I$(top_srcdir)/include \
-- -I$(top_srcdir)/include/mysql \
-- -I$(top_srcdir)/sql \
-- -I$(top_builddir)/include \
-- -I$(top_builddir)/include/mysql \
-- -I$(top_builddir)/sql \
-- $$file 2>/dev/null | \
-- @SED@ -e '/^# /d' \
-- -e '/^[ ]*$$/d' \
-- -e '/^#pragma GCC set_debug_pwd/d' \
-- -e '/^#ident/d' > \
-- $(top_builddir)/abi_check.out; \
-- @DIFF@ -w $$file.pp $(top_builddir)/abi_check.out; \
-- @RM@ $(top_builddir)/abi_check.out; \
-- done
-+ echo "Skipping do_abi_check"
-
- # Don't update the files from bitkeeper
- %::SCCS/s.%
Modified: mysql.install
===================================================================
--- mysql.install 2010-05-28 19:05:49 UTC (rev 81344)
+++ mysql.install 2010-05-28 20:08:31 UTC (rev 81345)
@@ -11,6 +11,10 @@
}
post_remove(){
- getent passwd mysql >/dev/null 2>&1 && userdel mysql
- getent group mysql >/dev/null 2>&1 && groupdel mysql
+ if getent passwd mysql >/dev/null 2>&1; then
+ userdel mysql
+ fi
+ if getent group mysql >/dev/null 2>&1; then
+ groupdel mysql
+ fi
}
Modified: mysqld
===================================================================
--- mysqld 2010-05-28 19:05:49 UTC (rev 81344)
+++ mysqld 2010-05-28 20:08:31 UTC (rev 81345)
@@ -5,7 +5,7 @@
. /etc/rc.d/functions
getPID() {
- echo $(pgrep -u mysql mysqld);
+ echo $(pgrep -u mysql mysqld 2>/dev/null);
}
case "$1" in
@@ -43,14 +43,23 @@
stop)
stat_busy "Stopping MySQL Server"
if [ ! -z "$(getPID)" ]; then
+ timeo=30
kill $(getPID) &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
exit 1
- else
+ fi
+ while [ ! -z "$(getPID)" -a $timeo -gt 0 ]; do
+ sleep 1
+ let timeo=${timeo}-1
+ done
+ if [ -z "$(getPID)" ]; then
rm -f /var/run/mysqld/mysqld.pid &>/dev/null
rm_daemon mysqld
stat_done
+ else
+ stat_fail
+ exit 1
fi
else
stat_fail
@@ -60,7 +69,6 @@
restart)
$0 stop
- sleep 5
$0 start
;;
*)
Added: skip-abi-check.patch
===================================================================
--- skip-abi-check.patch (rev 0)
+++ skip-abi-check.patch 2010-05-28 20:08:31 UTC (rev 81345)
@@ -0,0 +1,13 @@
+--- Makefile.in.orig 2010-05-28 20:03:46.507224494 +0200
++++ Makefile.in 2010-05-28 20:04:05.737221909 +0200
+@@ -1126,10 +1126,8 @@
+ #
+
+ abi_check: $(API_PREPROCESSOR_HEADER)
+- $(MAKE) abi_headers="$^" do_abi_check
+
+ abi_check_all: $(TEST_PREPROCESSOR_HEADER)
+- $(MAKE) abi_headers="$^" do_abi_check
+
+ do_abi_check:
+ set -ex; \
More information about the arch-commits
mailing list