summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-07-25 02:18:30 -0300
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-07-25 02:18:30 -0300
commit6740bfa28d86a8ea5d2f051c0c215156c3914e6e (patch)
treee1e149d0551a6e3f50d24c139c222cfceab63327
parent52a175ab2e683d8dcb8400c054b96d37db0f3d20 (diff)
galera replication for mariadb
-rw-r--r--pcr/galera/PKGBUILD9
-rw-r--r--pcr/mariadb-galera/PKGBUILD109
-rw-r--r--pcr/mariadb-galera/mariadb.install14
3 files changed, 89 insertions, 43 deletions
diff --git a/pcr/galera/PKGBUILD b/pcr/galera/PKGBUILD
index 282dc3d4d..13e5c4937 100644
--- a/pcr/galera/PKGBUILD
+++ b/pcr/galera/PKGBUILD
@@ -1,8 +1,8 @@
-# Maintainer (Arch): Rustam Tsurik <rustam.tsurik@gmail.com>
-# Contributor (Arch): Nico Suarez <nicodoggie@gmail.com>
+# Maintainer: Rustam Tsurik <rustam.tsurik@gmail.com>
+# Contributor: Nico Suarez <nicodoggie@gmail.com>
pkgname=galera
-pkgver=25.3.2
+pkgver=25.3.5
pkgrel=1
pkgdesc='Galera WSREP provider'
arch=('i686' 'x86_64')
@@ -12,10 +12,9 @@ makedepends=('check' 'scons' 'patch')
url='http://www.codership.com'
options=('!libtool')
source=(https://launchpad.net/galera/3.x/$pkgver/+download/galera-$pkgver-src.tar.gz)
-sha256sums=('5dd54364720f8854088590bdfea1e3a7f3e37fda3dfe8a5f58ebcc987cc6788d')
+sha256sums=('9e6d718bac9608c69cbfc0662963b29c13659c576aaa8469b6a325d75603f7a3')
build(){
- cd "$srcdir"
cd "$pkgname-$pkgver-src"
scons
}
diff --git a/pcr/mariadb-galera/PKGBUILD b/pcr/mariadb-galera/PKGBUILD
index 950d077fd..1fc602d3b 100644
--- a/pcr/mariadb-galera/PKGBUILD
+++ b/pcr/mariadb-galera/PKGBUILD
@@ -1,39 +1,30 @@
# $Id$
-# Maintainer (Arch): Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
+# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
-pkgname=mariadb-galera
pkgbase=mariadb-galera
-pkgver=5.5.33a
+#pkgname=('libmariadbclient' 'mariadb-clients' 'mytop' 'mariadb-galera')
+pkgname='mariadb-galera'
+pkgver=10.0.12
_pkgver=${pkgver/.a/a}
pkgrel=1
arch=('i686' 'x86_64')
license=('GPL')
url='https://mariadb.com/kb/en/galera/'
-pkgdesc='Fast SQL database server, drop-in replacement for MySQL with Galera Cluster'
-backup=('etc/mysql/my.cnf')
-install=mariadb.install
-depends=('mariadb-clients' 'inetutils' 'libaio' 'galera')
-conflicts=('mysql')
-provides=("mysql=$pkgver" "mariadb")
-options=('emptydirs')
-makedepends=('cmake' 'openssl' 'zlib' 'libaio')
-source=(http://ftp.wa.co.za/pub/mariadb/${pkgname}-${pkgver}/kvm-tarbake-jaunty-x86/${pkgname}-${pkgver}.tar.gz
+makedepends=('cmake' 'openssl' 'zlib' 'libaio' 'libxml2' 'openssl' 'pcre' 'galera')
+source=(http://ftp.wa.co.za/pub/mariadb/${pkgbase}-${pkgver}/source/${pkgbase}-${pkgver}.tar.gz
mariadb.service
mariadb-post.sh
mariadb-tmpfile.conf)
-sha256sums=('1b49e41e677d95f7a5b548771a81c6430ec6f0ee16e7ee624fb2fe2b278183b8'
- 'a6cf5446159fff16598d0d787dd3a3c30a53a656a5f876ddb608bc60e234d334'
- '368f9fd2454d80eb32abb8f29f703d1cf9553353fb9e1ae4529c4b851cb8c5dd'
- '2af318c52ae0fe5428e8a9245d1b0fc3bc5ce153842d1563329ceb1edfa83ddd')
-
-prepare() {
- mkdir build
-}
+md5sums=('4d142630c565a75d1b1b44246beb2923'
+ 'd488fffa9f62f9949c4aa1bb6e6db692'
+ 'b79e65a5aa536e6b5bc60988eb0b78a2'
+ '2fa6e456964d4ff5e6d4f9ff0126aed6')
build() {
+ mkdir -p build
cd build
- cmake ../mariadb-$pkgver \
+ cmake ../mariadb-$_pkgver \
-DBUILD_CONFIG=mysql_release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DSYSCONFDIR=/etc/mysql \
@@ -55,6 +46,7 @@ build() {
-DWITH_READLINE=ON \
-DWITH_ZLIB=system \
-DWITH_SSL=system \
+ -DWITH_PCRE=system \
-DWITH_LIBWRAP=OFF \
-DWITH_EXTRA_CHARSETS=complex \
-DWITH_EMBEDDED_SERVER=ON \
@@ -65,19 +57,72 @@ build() {
-DWITH_TOKUDB_STORAGE_ENGINE=1 \
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
-DWITHOUT_FEDERATED_STORAGE_ENGINE=1 \
- -DWITHOUT_OQGRAPH_STORAGE_ENGINE=1 \
-DWITHOUT_PBXT_STORAGE_ENGINE=1 \
- -DCMAKE_C_FLAGS="-fPIC ${CFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer" \
- -DCMAKE_CXX_FLAGS="-fPIC ${CXXFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-rtti" \
- -DWITH_MYSQLD_LDFLAGS="${LDFLAGS}" \
- -DWITH_WSREP=ON \
- -DWITH_INNODB_DISALLOW_WRITES=1
-
+ -DWITHOUT_TOKUDB=1 \
+ -DCMAKE_C_FLAGS="-fPIC $CFLAGS -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer -fno-delete-null-pointer-checks" \
+ -DCMAKE_CXX_FLAGS="-fPIC $CXXFLAGS -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-rtti -fno-delete-null-pointer-checks" \
+ -DWITH_MYSQLD_LDFLAGS="$LDFLAGS"
make
}
-package() {
+package_libmariadbclient() {
+ pkgdesc='MariaDB client libraries'
+ depends=('openssl' 'libaio' 'zlib' 'pcre')
+ conflicts=('libmysqlclient')
+ provides=("libmysqlclient=$pkgver")
+ options=('staticlibs')
+
+ cd build
+ for dir in include libmysql libmysqld libservices; do
+ make -C $dir DESTDIR="$pkgdir" install
+ done
+
+ install -Dm755 scripts/mysql_config "$pkgdir"/usr/bin/mysql_config
+ install -d "$pkgdir"/usr/share/man/man1
+ for man in mysql_config mysql_client_test_embedded mysqltest_embedded; do
+ install -m644 "$srcdir"/$pkgbase-$_pkgver/man/$man.1 "$pkgdir"/usr/share/man/man1/$man.1
+ done
+
+ rm "$pkgdir"/usr/lib/libmysql{client,client_r,d}.a
+}
+
+package_mariadb-clients() {
+ pkgdesc='MariaDB client tools'
+ depends=('libmariadbclient' 'zlib' 'openssl')
+ conflicts=('mysql-clients')
+ provides=("mysql-clients=$pkgver")
+
+ cd build
+ make -C client DESTDIR="$pkgdir" install
+
+ # install man pages
+ install -d "$pkgdir"/usr/share/man/man1
+ for man in mysql mysqladmin mysqlcheck mysqldump mysqlimport mysqlshow mysqlslap; do
+ install -m644 "$srcdir"/$pkgbase-$_pkgver/man/$man.1 "$pkgdir"/usr/share/man/man1/$man.1
+ done
+
+ # provided by mariadb
+ rm "$pkgdir"/usr/bin/{mysql_{plugin,upgrade},mysqlbinlog,mysqltest}
+
+}
+
+package_mytop() {
+ pkgdesc='Top clone for MariaDB'
+ depends=('perl' 'perl-dbd-mysql' 'perl-term-readkey')
+
+ cd build
+ install -Dm755 scripts/mytop "$pkgdir"/usr/bin/mytop
+}
+
+package_mariadb-galera() {
+ pkgdesc='Fast SQL database server, drop-in replacement for MySQL with Galera replication'
+ backup=('etc/mysql/my.cnf')
+ install=mariadb.install
+ depends=('mariadb-clients' 'inetutils' 'libaio' 'libxml2' 'pcre' 'galera')
+ conflicts=('mysql' 'mariadb')
+ provides=("mysql=$pkgver" "mariadb=$pkgver")
+ options=('emptydirs')
cd build
make DESTDIR="$pkgdir" install
@@ -91,9 +136,9 @@ package() {
cd "$pkgdir"
rm -f usr/bin/{mysql_config,mysql_client_test_embedded,mysqltest_embedded}
rm -f usr/lib/libmysql*
- rm -rf usr/include/
+ rm -f -r usr/include/
rm -f usr/share/man/man1/{mysql_config,mysql_client_test_embedded,mysqltest_embedded}.1
-
+
# provided by mariadb-clients
rm -f usr/bin/{mysql,mysqladmin,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap}
rm -f usr/share/man/man1/{mysql,mysqladmin,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap}.1
@@ -102,6 +147,6 @@ package() {
rm -f usr/bin/mytop
# not needed
- rm -rf usr/{data,mysql-test,sql-bench}
+ rm -f -r usr/{data,mysql-test,sql-bench}
rm -f usr/share/man/man1/mysql-test-run.pl.1
}
diff --git a/pcr/mariadb-galera/mariadb.install b/pcr/mariadb-galera/mariadb.install
index 7d3c2ce5c..595bc4c4d 100644
--- a/pcr/mariadb-galera/mariadb.install
+++ b/pcr/mariadb-galera/mariadb.install
@@ -14,9 +14,6 @@ post_install(){
fi
usr/bin/systemd-tmpfiles --create mysql.conf
-
- echo ">> If you are migrating from MySQL, don't forget to run 'mysql_upgrade'"
- echo " after mysqld.service restart."
}
post_upgrade(){
@@ -31,16 +28,21 @@ post_upgrade(){
fi
if [[ "$(vercmp $2 5.5.25-5)" -lt 0 ]]; then
- echo ">> mysql.service has been renamed to mysqld.service to keep"
- echo " consistency with MySQL package."
+ echo ":: mysql.service has been renamed to mysqld.service to keep"
+ echo " consistency with MySQL package."
+ fi
+
+ if [[ "$(vercmp $2 10.0)" -lt 0 ]]; then
+ echo ":: Major version update. Consider restarting mysqld.service and"
+ echo " running mysql_upgrade afterwards."
fi
}
post_remove(){
if getent passwd mysql >/dev/null 2>&1; then
userdel mysql
-
fi
+
if getent group mysql >/dev/null 2>&1; then
groupdel mysql
fi