[arch-commits] CVS update of extra/daemons/postgresql (PKGBUILD postgresql)

Paul Mattal paul at archlinux.org
Sun Dec 30 17:57:14 UTC 2007


    Date: Sunday, December 30, 2007 @ 12:57:14
  Author: paul
    Path: /home/cvs-extra/extra/daemons/postgresql

Modified: PKGBUILD (1.41 -> 1.42) postgresql (1.2 -> 1.3)

upgpkg: postgresql 8.2.5-2
adds su - and configurable data directory, closing #5297 and #4435


------------+
 PKGBUILD   |   15 ++++++++++-----
 postgresql |    9 ++++-----
 2 files changed, 14 insertions(+), 10 deletions(-)


Index: extra/daemons/postgresql/PKGBUILD
diff -u extra/daemons/postgresql/PKGBUILD:1.41 extra/daemons/postgresql/PKGBUILD:1.42
--- extra/daemons/postgresql/PKGBUILD:1.41	Sat Oct 20 02:05:32 2007
+++ extra/daemons/postgresql/PKGBUILD	Sun Dec 30 12:57:13 2007
@@ -1,18 +1,19 @@
-# $Id: PKGBUILD,v 1.41 2007/10/20 06:05:32 eric Exp $
+# $Id: PKGBUILD,v 1.42 2007/12/30 17:57:13 paul Exp $
 # Maintainer: Paul Mattal <paul at archlinux.org>
 pkgname=postgresql
 pkgver=8.2.5
-pkgrel=1
+pkgrel=2
 pkgdesc="A sophisticated object-relational DBMS"
 arch=(i686 x86_64)
 license=('BSD')
+backup=('etc/conf.d/postgresql')
 url="http://www.postgresql.org/"
 depends=('postgresql-libs>=8.2.5')
 options=('!makeflags')
 source=(ftp://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-base-${pkgver}.tar.bz2 \
-        postgresql build.patch)
-md5sums=('5879b205b635f3fb905f6015c50f4edd' 'd19658ac1b00ff51e3335386ed6c262f'\
-         '4d74f4227dc5e12bf95b3490758d86c9')
+        postgresql postgresql.confd build.patch)
+md5sums=('5879b205b635f3fb905f6015c50f4edd' '7d8ea2abb6a8cdacf35604bda659a34a'\
+         'df6ddf9e2ab4700a3415f17c0f4f4172' '4d74f4227dc5e12bf95b3490758d86c9')
 
 build() {
   cd ${startdir}/src/$pkgname-$pkgver || return 1
@@ -45,4 +46,8 @@
 
   # install license
   install -D -m644 COPYRIGHT $startdir/pkg/usr/share/licenses/$pkgname/LICENSE || return 1
+
+  # install conf file
+  install -D -m644 $startdir/src/postgresql.confd \
+    $startdir/pkg/etc/conf.d/postgresql || return 1
 }
Index: extra/daemons/postgresql/postgresql
diff -u extra/daemons/postgresql/postgresql:1.2 extra/daemons/postgresql/postgresql:1.3
--- extra/daemons/postgresql/postgresql:1.2	Wed Oct  6 23:29:12 2004
+++ extra/daemons/postgresql/postgresql	Sun Dec 30 12:57:13 2007
@@ -2,8 +2,7 @@
 
 . /etc/rc.conf
 . /etc/rc.d/functions
-
-PGROOT=/var/lib/postgres
+. /etc/conf.d/postgresql
 
 case "$1" in
   start)
@@ -22,14 +21,14 @@
     fi
     if [ ! -d $PGROOT ]; then
       mkdir -p $PGROOT/data && chown postgres.postgres $PGROOT/data
-      su postgres -c "/usr/bin/initdb -D $PGROOT/data"
+      su - postgres -c "/usr/bin/initdb -D $PGROOT/data"
     fi
     if [ ! -e /var/log/postgresql.log ]; then
       touch /var/log/postgresql.log
       chown postgres /var/log/postgresql.log
     fi
     # start the process
-    su postgres -c \
+    su - postgres -c \
      "/usr/bin/pg_ctl -D $PGROOT/data -l /var/log/postgresql.log -W start"
     if [ $? -gt 0 ]; then
       stat_fail
@@ -40,7 +39,7 @@
     ;;
   stop)
     stat_busy "Stopping PostgreSQL"
-    su postgres -c \
+    su - postgres -c \
       "/usr/bin/pg_ctl -D $PGROOT/data -l /var/log/postgresql.log -w stop"  
     if [ $? -gt 0 ]; then
       stat_fail




More information about the arch-commits mailing list