aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Liske <thomas@fiasko-nw.net>2020-08-08 12:34:12 +0200
committerLeo <thinkabit.ukim@gmail.com>2020-08-11 04:45:55 +0000
commit01423694310e8bb03426a785f3acd3a0ff5bbd8a (patch)
tree54c03920177e15540edccef9b2448ff895d43306
parent26c15e1eb8f0128a46b5f302bdb90ff9d762618b (diff)
downloadaports-01423694310e8bb03426a785f3acd3a0ff5bbd8a.tar.gz
aports-01423694310e8bb03426a785f3acd3a0ff5bbd8a.tar.bz2
aports-01423694310e8bb03426a785f3acd3a0ff5bbd8a.tar.xz
main/postgresql-bdr: use checkpath in initd to create non-public files
-rw-r--r--main/postgresql-bdr/APKBUILD4
-rw-r--r--main/postgresql-bdr/postgresql-bdr.initd4
2 files changed, 3 insertions, 5 deletions
diff --git a/main/postgresql-bdr/APKBUILD b/main/postgresql-bdr/APKBUILD
index 438c4b25c8..0953032a88 100644
--- a/main/postgresql-bdr/APKBUILD
+++ b/main/postgresql-bdr/APKBUILD
@@ -2,7 +2,7 @@
pkgname=postgresql-bdr
pkgver=9.4.14_p1
_pkgver=${pkgver/_p/_bdr}
-pkgrel=7
+pkgrel=8
pkgdesc="A sophisticated object-relational DBMS with bidirectional replication support (BDR)"
url="https://www.2ndquadrant.com/en/resources/postgres-bdr-2ndquadrant/"
arch="all"
@@ -130,7 +130,7 @@ _submv() {
sha512sums="cd8fec782c201270270d4abfa59296083889bf22f63b4e18f758e8262ee52deeae247d813a3e8633861819d803cb369157854de446affdde65c1e12477bbc0b8 postgresql-bdr-9.4.14_bdr1.tar.bz2
6f7fdceb1a5aba3f00894ae88afdf25e5f9c7a0ffc00b11211011a6415ea73639d6a67f516cab66c6487484bab26ded3c93471d6d41ac0d3822926c22274f2ba initdb.patch
1973863bfc208ce20ca2dd82557ebbd4fcddd1219d6a80f2e83550d0110d39f034cb829cca3ee9208f513a24b032267b94559c740ddddb10a4f24c630194eb5e postgresql-bdr-osxflags.patch
-85b863cfcae1db37ee914721fc9eb7e85ab90a77a65879bccb0bbf34eb044329425fae0411baff1d769a700ca63b4ab4040d145ca90e2d3728c3a74e61d9b4ff postgresql-bdr.initd
+7aa4e5746f6b9b5f6a1b56c0f18f9506a576fafa7037727d94591948394e7dc158c438927b8359127913c88c1a9ffa9ddb4e89353c4e98c47903a27311b6f502 postgresql-bdr.initd
e906e23241bed2624719c1e7e5305695cce1cb520f26f6a4c6bbb994f59db3cc4c63afcfe0e7fb705ad4691dd0a911770012fc16819e4c2686c7029e1e4a4a45 postgresql-bdr.confd
a20f4b2f7f6e2500b6f2b649d8e27a59d82f07768d7a1ee503cea3a88d21d86344f3b7e89ea10f9ce8509b44d71dbee1c9d8ca60ec0c968f36867270120c913f pgbdr-restore.initd
c14a5684e914abb3b0ee71bbf15eed71a9264deacaa404a6e3af6bfc330d93e7598624d0ed11a94263106cc660f7f54c8ff57e759033cf606a795f69ff6c1c7c pgbdr-restore.confd"
diff --git a/main/postgresql-bdr/postgresql-bdr.initd b/main/postgresql-bdr/postgresql-bdr.initd
index 673cd7b2af..90959bc92d 100644
--- a/main/postgresql-bdr/postgresql-bdr.initd
+++ b/main/postgresql-bdr/postgresql-bdr.initd
@@ -133,9 +133,7 @@ setup() {
echo mv "${PGDATA}"/* "${tmpdir}"
mv "${PGDATA}"/* "${tmpdir}" 2>/dev/null
- rm -rf "${PGDATA}"/* 2>/dev/null
- chown -Rf postgres:postgres "${PGDATA}"
- chmod 0700 "${PGDATA}"
+ checkpath -Dm 0700 -o postgres:postgres "${PGDATA}"
cd "${PGDATA}" # to avoid the: could not change directory to "/root"
su -c "/usr/bin/initdb --pgdata ${PGDATA}" postgres
local res=$?