aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-12-18 15:34:15 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-12-18 15:36:31 +0000
commitc467afc6754584e901ba177a66365fa31f254a44 (patch)
tree5caa11309ab5d58262456dcba8854feb99b87ca1
parent857d0b3dfd0dbe08369242e2e181635512a1c347 (diff)
downloadaports-c467afc6754584e901ba177a66365fa31f254a44.tar.gz
aports-c467afc6754584e901ba177a66365fa31f254a44.tar.bz2
aports-c467afc6754584e901ba177a66365fa31f254a44.tar.xz
main/postgresql-bdr: create user from pre-install
postgres user was removed from alpine-baselayout in commit eed389c20a19, (main/alpine-baselayout: remove postgres account), so we need create it from pre-install scripts
-rw-r--r--main/postgresql-bdr/APKBUILD4
-rw-r--r--main/postgresql-bdr/postgresql-bdr.pre-install10
2 files changed, 12 insertions, 2 deletions
diff --git a/main/postgresql-bdr/APKBUILD b/main/postgresql-bdr/APKBUILD
index 4bad380d86..438c4b25c8 100644
--- a/main/postgresql-bdr/APKBUILD
+++ b/main/postgresql-bdr/APKBUILD
@@ -2,13 +2,13 @@
pkgname=postgresql-bdr
pkgver=9.4.14_p1
_pkgver=${pkgver/_p/_bdr}
-pkgrel=6
+pkgrel=7
pkgdesc="A sophisticated object-relational DBMS with bidirectional replication support (BDR)"
url="https://www.2ndquadrant.com/en/resources/postgres-bdr-2ndquadrant/"
arch="all"
license="PostgreSQL"
depends="bash libpq"
-install="$pkgname.pre-upgrade"
+install="$pkgname.pre-install $pkgname.pre-upgrade"
depends_dev="readline-dev openssl-dev zlib-dev libxml2-dev"
makedepends="$depends_dev perl bison flex-dev"
subpackages="$pkgname-dev $pkgname-contrib $pkgname-client $pkgname-openrc
diff --git a/main/postgresql-bdr/postgresql-bdr.pre-install b/main/postgresql-bdr/postgresql-bdr.pre-install
new file mode 100644
index 0000000000..dd34706224
--- /dev/null
+++ b/main/postgresql-bdr/postgresql-bdr.pre-install
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Fixed GID/UID values as this users was previously included in the
+# default /etc/passwd as shipped by main/alpine-baselayout.
+
+addgroup -g 70 -S postgres 2>/dev/null
+adduser -u 70 -S -D -H -h /var/lib/postgresql -g "Postgres user" \
+ -s /bin/sh -G postgres postgres 2>/dev/null
+
+exit 0