[arch-commits] Commit in pgbouncer/trunk (PKGBUILD pgbouncer.install)

Dan McGee dan at archlinux.org
Sun Feb 21 03:57:14 UTC 2016


    Date: Sunday, February 21, 2016 @ 04:57:13
  Author: dan
Revision: 260107

upgpkg: pgbouncer 1.7.1-1

Modified:
  pgbouncer/trunk/PKGBUILD
  pgbouncer/trunk/pgbouncer.install

-------------------+
 PKGBUILD          |    8 ++++----
 pgbouncer.install |   14 ++++++++++++--
 2 files changed, 16 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-02-21 03:42:29 UTC (rev 260106)
+++ PKGBUILD	2016-02-21 03:57:13 UTC (rev 260107)
@@ -1,22 +1,22 @@
 # Maintainer: Dan McGee <dan at archlinux.org>
 
 pkgname=pgbouncer
-pkgver=1.6
+pkgver=1.7.1
 pkgrel=1
 pkgdesc="A lightweight connection pooler for PostgreSQL"
 arch=('i686' 'x86_64')
 url="https://wiki.postgresql.org/wiki/PgBouncer"
 license=('BSD')
-depends=('libevent>=2.0' 'c-ares' 'postgresql')
+depends=('libevent>=2.0' 'c-ares')
 makedepends=('asciidoc' 'xmlto')
 backup=('etc/pgbouncer/pgbouncer.ini' 'etc/logrotate.d/pgbouncer')
 install=$pkgname.install
-source=("https://pgbouncer.github.io/downloads/$pkgname-$pkgver.tar.gz"
+source=("https://pgbouncer.github.io/downloads/files/$pkgver/$pkgname-$pkgver.tar.gz"
         pgbouncer.ini
         pgbouncer.logrotate
         pgbouncer.service
         pgbouncer.tmpfiles.conf)
-sha256sums=('d0aec755afcdcff0538b513f71ba4de03041f21ed5548171df9de53099efa916'
+sha256sums=('f72bcdfd8a8d1ee22f509cebc59fb50d394063ce0175f0deea07b5fb2849e8a1'
             '4f30e4a3eb76acdd233ebc7dd099dff6976299ba958e40a8429b74112e804b05'
             '8da38746d9c9dfc2433a8cfe22fdaf517e14492672d09e3c48cd4745fc03e9bd'
             '274a3d447c151323f2d297aae881ec69be1477f16e30b0bba469afe68c2d122a'

Modified: pgbouncer.install
===================================================================
--- pgbouncer.install	2016-02-21 03:42:29 UTC (rev 260106)
+++ pgbouncer.install	2016-02-21 03:57:13 UTC (rev 260107)
@@ -1,4 +1,14 @@
 post_install() {
+  if [ ! -d '/var/lib/postgres' ]; then
+    mkdir -p '/var/lib/postgres'
+  fi
+  if ! getent group postgres >/dev/null; then
+    groupadd -g 88 postgres
+  fi
+  if ! getent passwd postgres >/dev/null; then
+    useradd -c 'PostgreSQL user' -u 88 -g postgres -d '/var/lib/postgres' -s /bin/bash postgres
+    passwd -l postgres >/dev/null
+  fi
   if ! getent group pgbouncer >/dev/null; then
     groupadd -r pgbouncer
   fi
@@ -8,9 +18,9 @@
   fi
   chown pgbouncer:pgbouncer /var/log/pgbouncer
   systemd-tmpfiles --create pgbouncer.conf
-  post_upgrade
+  gpasswd -a pgbouncer postgres
 }
 
 post_upgrade() {
-  gpasswd -a pgbouncer postgres
+  post_install $1
 }



More information about the arch-commits mailing list