[arch-commits] Commit in pgbouncer/repos (7 files)

Felix Yan felixonmars at archlinux.org
Fri Nov 9 21:16:28 UTC 2018


    Date: Friday, November 9, 2018 @ 21:16:25
  Author: felixonmars
Revision: 338546

archrelease: copy trunk to testing-x86_64

Added:
  pgbouncer/repos/testing-x86_64/
  pgbouncer/repos/testing-x86_64/PKGBUILD
    (from rev 338545, pgbouncer/trunk/PKGBUILD)
  pgbouncer/repos/testing-x86_64/pgbouncer.ini
    (from rev 338545, pgbouncer/trunk/pgbouncer.ini)
  pgbouncer/repos/testing-x86_64/pgbouncer.install
    (from rev 338545, pgbouncer/trunk/pgbouncer.install)
  pgbouncer/repos/testing-x86_64/pgbouncer.logrotate
    (from rev 338545, pgbouncer/trunk/pgbouncer.logrotate)
  pgbouncer/repos/testing-x86_64/pgbouncer.service
    (from rev 338545, pgbouncer/trunk/pgbouncer.service)
  pgbouncer/repos/testing-x86_64/pgbouncer.tmpfiles.conf
    (from rev 338545, pgbouncer/trunk/pgbouncer.tmpfiles.conf)

-------------------------+
 PKGBUILD                |   54 ++++++++++++++++++++++++++++++++++++++++++++++
 pgbouncer.ini           |   52 ++++++++++++++++++++++++++++++++++++++++++++
 pgbouncer.install       |   25 +++++++++++++++++++++
 pgbouncer.logrotate     |    8 ++++++
 pgbouncer.service       |   11 +++++++++
 pgbouncer.tmpfiles.conf |    1 
 6 files changed, 151 insertions(+)

Copied: pgbouncer/repos/testing-x86_64/PKGBUILD (from rev 338545, pgbouncer/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2018-11-09 21:16:25 UTC (rev 338546)
@@ -0,0 +1,54 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Dan McGee <dan at archlinux.org>
+
+pkgname=pgbouncer
+pkgver=1.9.0
+pkgrel=1
+pkgdesc='Lightweight connection pooler for PostgreSQL'
+url='https://pgbouncer.github.io/'
+arch=('x86_64')
+license=('BSD')
+depends=('libevent>=2.0' 'c-ares' 'systemd' 'pam')
+makedepends=('asciidoc' 'xmlto')
+checkdepends=('postgresql-libs')
+backup=('etc/pgbouncer/pgbouncer.ini'
+        'etc/logrotate.d/pgbouncer')
+install=${pkgname}.install
+source=(https://pgbouncer.github.io/downloads/files/${pkgver}/pgbouncer-${pkgver}.tar.gz
+        pgbouncer.ini
+        pgbouncer.logrotate
+        pgbouncer.service
+        pgbouncer.tmpfiles.conf)
+sha512sums=('b127f4cb60ca5cdf339da76727918f0a3797a3e0a89f8ed6fdcaa80f3391d2c5bb51e19731915775210c0e5070dd611ee2e410c9a947624e45b5cf11aecdacf9'
+            '39abc7b11c9d7a2593941b4d2a82db998ac1b1e3da131ae276da73c7afc4eda7b69bbfd0acd39f7bce20ecb911baf0adba341ff58dcab1a57e419708e7c8d26f'
+            '1dc86704fce211b23afe7962c947c7de80a15bef219928acbf486b915d80d44a6590fbc509fe650c97b694a508bcf95d2152663863f0c372323286e644c6d60a'
+            '2b4baaaa7129eda54b34405aa4e15a4d37b2173b529ecae070e766f1dcebd0af8f6898ee1b665a60d5f633036a52662e89967f33caacf2841dad441960230ef7'
+            '4e5bcb7690335b43a017795b377857c241ce571465363e01e35829c2c210781fefd6880d085e5928db417b69458d1e79069b5494f6be6f0ae19e0894522e7971')
+
+build() {
+  cd ${pkgname}-${pkgver}
+  ./configure \
+    --prefix=/usr \
+    --disable-debug \
+    --with-pam
+  make
+}
+
+check() {
+  cd ${pkgname}-${pkgver}
+  make -C test run_test
+}
+
+package() {
+  cd ${pkgname}-${pkgver}
+  make DESTDIR="${pkgdir}" install
+  install -Dm 644 NEWS.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -Dm 644 ../pgbouncer.ini "${pkgdir}/etc/pgbouncer/pgbouncer.ini"
+  install -Dm 644 ../pgbouncer.logrotate "${pkgdir}/etc/logrotate.d/pgbouncer"
+  install -Dm 644 ../pgbouncer.service "${pkgdir}/usr/lib/systemd/system/pgbouncer.service"
+  install -Dm 644 ../pgbouncer.tmpfiles.conf "${pkgdir}/usr/lib/tmpfiles.d/pgbouncer.conf"
+  install -d "${pkgdir}/var/log/pgbouncer"
+}
+
+# vim: ts=2 sw=2 et:

Copied: pgbouncer/repos/testing-x86_64/pgbouncer.ini (from rev 338545, pgbouncer/trunk/pgbouncer.ini)
===================================================================
--- testing-x86_64/pgbouncer.ini	                        (rev 0)
+++ testing-x86_64/pgbouncer.ini	2018-11-09 21:16:25 UTC (rev 338546)
@@ -0,0 +1,52 @@
+[pgbouncer]
+logfile = /var/log/pgbouncer/pgbouncer.log
+pidfile = /run/pgbouncer/pgbouncer.pid
+
+;; ip address or * which means all ip-s
+;listen_addr = 127.0.0.1
+;listen_port = 6432
+
+unix_socket_dir = /run/postgresql
+unix_socket_mode = 0777
+
+; any, trust, plain, crypt, md5
+auth_type = trust
+auth_file = /etc/pgbouncer/userlist.txt
+
+; comma-separated list of users, who are allowed to change settings
+admin_users = postgres
+
+; comma-separated list of users who are just allowed to use SHOW command
+stats_users = stats, postgres
+
+; total number of clients that can connect
+max_client_conn = 100
+
+; default pool size.  20 is good number when transaction pooling
+; is in use, in session pooling it needs to be the number of
+; max clients you want to handle at any moment
+default_pool_size = 20
+
+
+;; database name = connect string
+;;
+;; connect string params:
+;;   dbname= host= port= user= password=
+;;   client_encoding= datestyle= timezone=
+;;   pool_size= connect_query=
+[databases]
+
+; foodb over unix socket
+;foodb =
+
+; redirect bardb to bazdb on localhost
+;bardb = host=localhost dbname=bazdb
+
+; acceess to dest database will go with single user
+;forcedb = host=127.0.0.1 port=300 user=baz password=foo client_encoding=UNICODE datestyle=ISO connect_query='SELECT 1'
+
+; use custom pool sizes
+;nondefaultdb = pool_size=50 reserve_pool=10
+
+; fallback connect string
+;* = host=testserver

Copied: pgbouncer/repos/testing-x86_64/pgbouncer.install (from rev 338545, pgbouncer/trunk/pgbouncer.install)
===================================================================
--- testing-x86_64/pgbouncer.install	                        (rev 0)
+++ testing-x86_64/pgbouncer.install	2018-11-09 21:16:25 UTC (rev 338546)
@@ -0,0 +1,25 @@
+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
+  if ! getent passwd pgbouncer >/dev/null; then
+    useradd -c 'PGBouncer user' -r -g pgbouncer -d '/etc/pgbouncer' -s /bin/bash pgbouncer
+    passwd -l pgbouncer >/dev/null
+  fi
+  chown pgbouncer:pgbouncer /var/log/pgbouncer
+  gpasswd -a pgbouncer postgres
+}
+
+post_upgrade() {
+  post_install $1
+}

Copied: pgbouncer/repos/testing-x86_64/pgbouncer.logrotate (from rev 338545, pgbouncer/trunk/pgbouncer.logrotate)
===================================================================
--- testing-x86_64/pgbouncer.logrotate	                        (rev 0)
+++ testing-x86_64/pgbouncer.logrotate	2018-11-09 21:16:25 UTC (rev 338546)
@@ -0,0 +1,8 @@
+/var/log/pgbouncer/pgbouncer.log {
+   copytruncate
+   missingok
+   notifempty
+   postrotate
+      /bin/kill -HUP $(cat /run/pgbouncer/pgbouncer.pid 2>/dev/null) 2> /dev/null || true
+   endscript
+}

Copied: pgbouncer/repos/testing-x86_64/pgbouncer.service (from rev 338545, pgbouncer/trunk/pgbouncer.service)
===================================================================
--- testing-x86_64/pgbouncer.service	                        (rev 0)
+++ testing-x86_64/pgbouncer.service	2018-11-09 21:16:25 UTC (rev 338546)
@@ -0,0 +1,11 @@
+[Unit]
+Description=A lightweight connection pooler for PostgreSQL
+After=network.target
+
+[Service]
+User=pgbouncer
+ExecStart=/usr/bin/pgbouncer /etc/pgbouncer/pgbouncer.ini
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target

Copied: pgbouncer/repos/testing-x86_64/pgbouncer.tmpfiles.conf (from rev 338545, pgbouncer/trunk/pgbouncer.tmpfiles.conf)
===================================================================
--- testing-x86_64/pgbouncer.tmpfiles.conf	                        (rev 0)
+++ testing-x86_64/pgbouncer.tmpfiles.conf	2018-11-09 21:16:25 UTC (rev 338546)
@@ -0,0 +1 @@
+d /run/pgbouncer  0755 pgbouncer pgbouncer -



More information about the arch-commits mailing list