summaryrefslogtreecommitdiff
path: root/community/percona-server
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-07-14 00:01:45 +0000
committerroot <root@rshg054.dnsready.net>2012-07-14 00:01:45 +0000
commite0f65a739c6445de07de1585e72c230958d8f011 (patch)
treed6cfcd449768dbc82f5d5d539ea02333340652b7 /community/percona-server
parent2aa5510e030a6ac8ec723dfd915a394b888e21c1 (diff)
Sat Jul 14 00:01:45 UTC 2012
Diffstat (limited to 'community/percona-server')
-rw-r--r--community/percona-server/PKGBUILD18
-rw-r--r--community/percona-server/mysqld-post6
-rw-r--r--community/percona-server/mysqld.service21
-rw-r--r--community/percona-server/tmpfiles.conf1
4 files changed, 42 insertions, 4 deletions
diff --git a/community/percona-server/PKGBUILD b/community/percona-server/PKGBUILD
index cadb09300..7466e57c2 100644
--- a/community/percona-server/PKGBUILD
+++ b/community/percona-server/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 71873 2012-06-02 15:23:50Z mtorromeo $
+# $Id: PKGBUILD 73641 2012-07-12 13:35:50Z mtorromeo $
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
pkgname=percona-server
pkgver=5.5.24_rel26.0
-pkgrel=1
+pkgrel=3
pkgdesc="A backwards-compatible drop-in replacement for MySQL that provides improved performance, diagnostics and instrumentation, and manageability of the server"
arch=('i686' 'x86_64')
@@ -20,7 +20,10 @@ backup=('etc/mysql/my.cnf')
install=percona.install
source=("http://www.percona.com/downloads/Percona-Server-${pkgver%.*_*}/Percona-Server-${pkgver/_rel/-}/source/Percona-Server-${pkgver/_/-}.tar.gz"
'mysqld'
- 'my.cnf')
+ 'my.cnf'
+ 'mysqld-post'
+ 'mysqld.service'
+ 'tmpfiles.conf')
build() {
cd "${srcdir}/Percona-Server-${pkgver/_/-}"
@@ -97,8 +100,15 @@ package() {
rm "${pkgdir}"/usr/share/man/man1/mysql-test-run.pl.1
install -dm700 "${pkgdir}"/var/lib/mysql
+
+ install -Dm644 "$srcdir/tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/mysqld.conf"
+ install -Dm644 "$srcdir/mysqld.service" "$pkgdir/usr/lib/systemd/system/mysqld.service"
+ install -Dm755 "$srcdir/mysqld-post" "$pkgdir/usr/bin/mysqld-post"
}
md5sums=('76f835e98ad3c71fcaa33794ee187630'
'243864805611764a7e5883c1dba7afd8'
- '1c949c0dbea5206af0db14942d9927b6')
+ '1c949c0dbea5206af0db14942d9927b6'
+ '5143dadeaac15f1ff88ea16716588554'
+ 'e2e21a54c1aa1d6ab83a3dd0629aac52'
+ '7af72b49f943bd52defce8bc4e804e64')
diff --git a/community/percona-server/mysqld-post b/community/percona-server/mysqld-post
new file mode 100644
index 000000000..8c404f4c4
--- /dev/null
+++ b/community/percona-server/mysqld-post
@@ -0,0 +1,6 @@
+#!/bin/sh
+while true; do
+ response=`/usr/bin/mysqladmin -uUNKNOWN_USER ping 2>&1` && break
+ echo "$response" | grep -q "mysqld is alive" && break
+ sleep 1
+done
diff --git a/community/percona-server/mysqld.service b/community/percona-server/mysqld.service
new file mode 100644
index 000000000..15802b226
--- /dev/null
+++ b/community/percona-server/mysqld.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=MySQL database server
+After=syslog.target network.target
+
+[Service]
+User=mysql
+Group=mysql
+
+ExecStart=/usr/bin/mysqld --pid-file=/var/run/mysqld/mysqld.pid
+ExecStop=/bin/kill -15 $MAINPID
+PIDFile=/var/run/mysqld/mysqld.pid
+WorkingDirectory=/usr
+
+# We rely on systemd, not mysqld_safe, to restart mysqld if it dies
+Restart=always
+
+# Place temp files in a secure directory, not /tmp
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/community/percona-server/tmpfiles.conf b/community/percona-server/tmpfiles.conf
new file mode 100644
index 000000000..d621cd9df
--- /dev/null
+++ b/community/percona-server/tmpfiles.conf
@@ -0,0 +1 @@
+d /var/run/mysqld 0755 mysql mysql - \ No newline at end of file