[arch-commits] Commit in mysql/repos/extra-i686 (PKGBUILD mysql.install mysqld)

Andrea Scarpino andrea at archlinux.org
Wed Nov 18 10:14:19 EST 2009


    Date: Wednesday, November 18, 2009 @ 10:14:19
  Author: andrea
Revision: 58957

upstream release; create group and user in .install; fix /var/run/mysql permission

Added:
  mysql/repos/extra-i686/mysql.install
Modified:
  mysql/repos/extra-i686/PKGBUILD
  mysql/repos/extra-i686/mysqld

---------------+
 PKGBUILD      |   11 ++++++-----
 mysql.install |   17 +++++++++++++++++
 mysqld        |   18 ------------------
 3 files changed, 23 insertions(+), 23 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-11-18 15:09:53 UTC (rev 58956)
+++ PKGBUILD	2009-11-18 15:14:19 UTC (rev 58957)
@@ -1,12 +1,12 @@
-# $Id: PKGBUILD 58953 2009-11-18 12:07:26Z andrea $
+# $Id: PKGBUILD 58956 2009-11-18 15:09:53Z andrea $
 # Maintainer: Andrea Scarpino <andrea at archlinux.org>
 # Contributor: Douglas Soares de Andrade <douglas at archlinux.org>
 # Contributor: judd <jvinet at zeroflux.org>
 
 pkgbase=mysql
 pkgname=('libmysqlclient' 'mysql-clients' 'mysql')
-pkgver=5.1.40
-pkgrel=2
+pkgver=5.1.41
+pkgrel=1
 pkgdesc="A fast SQL database server"
 arch=('i686' 'x86_64')
 license=('GPL')
@@ -17,8 +17,8 @@
         'mysqld'
         'my.cnf'
         'mysqld.conf.d')
-md5sums=('32e7373c16271606007374396e6742ad'
-         '09f64b1da689f0bc60e17172f9aa0b38'
+md5sums=('b5d39e8789174753f3c782959729e68c'
+         '7e1c46ccbd91553cc11df7199fbfca32'
          '26589ea08b78fc38dd174caeb93b810c'
 	 '4a9077fc95ec6db1d5420e0cdc74d31c')
 
@@ -108,6 +108,7 @@
 
 package_mysql(){
   backup=('etc/my.cnf' 'etc/mysql/my.cnf' 'etc/conf.d/mysqld')
+  install=mysql.install
   depends=('mysql-clients')
   optdepends=('perl-dbi' 'perl-dbd-mysql')
 

Added: mysql.install
===================================================================
--- mysql.install	                        (rev 0)
+++ mysql.install	2009-11-18 15:14:19 UTC (rev 58957)
@@ -0,0 +1,17 @@
+post_install(){
+  groupadd -g 89 mysql &>/dev/null
+  useradd -u 89 -g mysql -d /var/lib/mysql -s /bin/false mysql &>/dev/null
+  usr/bin/mysql_install_db --datadir=/var/lib/mysql --user=mysql
+  chown -R mysql:mysql var/lib/mysql &> /dev/null
+  chown mysql:mysql var/run/mysqld &> /dev/null
+}
+
+post_upgrade(){
+  chown -R mysql:mysql var/lib/mysql &> /dev/null
+  chown mysql:mysql var/run/mysqld
+}
+
+post_remove(){
+  userdel mysql &>/dev/null
+  groupdel mysql &>/dev/null
+}

Modified: mysqld
===================================================================
--- mysqld	2009-11-18 15:09:53 UTC (rev 58956)
+++ mysqld	2009-11-18 15:14:19 UTC (rev 58957)
@@ -12,24 +12,6 @@
    echo $(pgrep -u mysql mysqld);
 }
 
-if [ ! `egrep '^mysql:' /etc/group` ]; then
-  stat_busy "Adding mysql group"
-  groupadd -g 89 mysql
-  stat_done
-fi
-if [ ! `egrep '^mysql:' /etc/passwd` ]; then
-  stat_busy "Adding mysql user"
-  useradd -u 89 -g mysql -d $MYSQLD_ROOT -s /bin/false mysql
-  [ -d $MYSQLD_ROOT ] && chown -R mysql:mysql $MYSQLD_ROOT
-  stat_done
-fi
-
-if [ ! -d $MYSQLD_ROOT ]; then
-  mkdir $MYSQLD_ROOT
-  /usr/bin/mysql_install_db --datadir=$MYSQLD_ROOT --user=mysql
-  chown -R mysql:mysql $MYSQLD_ROOT
-fi
-
 case "$1" in
   start)
     stat_busy "Starting MySQL"



More information about the arch-commits mailing list