summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2019-10-29 11:06:49 +0100
committerMiroslav Šulc <fordfrog@gentoo.org>2019-10-29 11:06:49 +0100
commitf8b5e0608623c3a20ba0ebe84b8182493a5f7122 (patch)
treeaa3d4a05e3d98707dd32fd1afd48c312ff74e27c
parentdev-db/postgresql-9.3.25: added missing files (diff)
downloadfordfrog-f8b5e0608623c3a20ba0ebe84b8182493a5f7122.tar.gz
fordfrog-f8b5e0608623c3a20ba0ebe84b8182493a5f7122.tar.bz2
fordfrog-f8b5e0608623c3a20ba0ebe84b8182493a5f7122.zip
dev-db/postgresql-9.3.25: added missing files
Package-Manager: Portage-2.3.78, Repoman-2.3.17 RepoMan-Options: --force Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
-rw-r--r--dev-db/postgresql/Manifest1
-rw-r--r--dev-db/postgresql/files/postgresql-check-db-dir35
2 files changed, 36 insertions, 0 deletions
diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest
index 7772376c6..e42c7cc12 100644
--- a/dev-db/postgresql/Manifest
+++ b/dev-db/postgresql/Manifest
@@ -1,4 +1,5 @@
AUX postgresql-9.3-no-server.patch 3809 BLAKE2B 9022fe8000bff070ee5a4752fcbf9db06e6f83fec9451e5b3a391336a50a9a394a3ab2bfcde21f9462126973e83451e684110c1a1446dc0d6fb4ad7016c90df6 SHA512 5a8e6c5989f27e6b9a55ccc696578b109bc7d2b6c39f8364ceffed07add13f741d21803fa8eebfa6814eb7f997740c1831201b688487710d9275e212c3760d21
+AUX postgresql-check-db-dir 1010 BLAKE2B 9a9143f4f6481a09374fc306b4a20a90249293d24888e02a3d4150e8618c59a11b2b71f8a52c6304f478ead2bcb63400bb897f4913212e5f1a1c82b3a3da5104 SHA512 39708ac9870239429cd247e05dc83476339b1b69398b9919aad4ae67e5bbeb8cfb75211bc50744c0f47150346f8cc1c800d5769d99a3f8e1c6d8971334c97df0
AUX postgresql.confd-9.3 2477 BLAKE2B 0d42eedb99c951c8c60ed02abb5d4526bc288e8dd50b048cb3ab374239f1929aa80d10306037e45188a81593163121c029b91f9149365bff02ff7bfd0fe52ac4 SHA512 6c9e7c2de31eace2b3ce771a29eb354b143ea81f85d9d7ef601f302b7ae71c1c3badde8765fb7757dadcf0c49dcfa1116977e8b7f1e238350d3732962267147f
AUX postgresql.init-9.3-r1 4996 BLAKE2B 60a3669a8566700babaa7ffa3e45a6954017a71da9d587814c6b5312c3596c1e2d4ecb3e83b67016292ed72ec3ed3366048c22df3988b82ff335765debddb7e8 SHA512 16c6d88b695575f5ca8f708abb0706845901f2445600cf4e28315add9c3e819df42e1112859e9f9529bc22fe0b2d1bdcff0ab6f9c39ce29d1fbaca1a91a065d1
DIST postgresql-9.3.25.tar.bz2 17067593 BLAKE2B fd9ca5685e5511dcaa72da882b674846dcd5a16227e5b33ae06701fe7881df71847666c37925033c6cb01c916111a8f76df134491645f4d1e1dd48a008bd2831 SHA512 319e12b73853b74f5ef2c520d64795bb586ffd495ceab6518f7844de6e0a054aea821976c470108d346f8090c7d3949920d9c435432e33004b7caa7a77a5cdca
diff --git a/dev-db/postgresql/files/postgresql-check-db-dir b/dev-db/postgresql/files/postgresql-check-db-dir
new file mode 100644
index 000000000..15b2cb569
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-check-db-dir
@@ -0,0 +1,35 @@
+#!/bin/sh
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+eerror() {
+ echo "$@" >&2
+}
+
+# Check that DATA_DIR has been set
+if [ -z ${DATA_DIR} ] ; then
+ eerror "DATA_DIR not set"
+ exit 1
+fi
+
+# Check that DATA_DIR exists
+if [ ! -d ${DATA_DIR} ] ; then
+ eerror "Directory not found: ${DATA_DIR}"
+ eerror "HINT: Ensure that DATA_DIR points to the right path."
+ eerror "HINT: Or perhaps you need to create the database cluster:"
+ eerror " emerge --config dev-db/postgresql:@SLOT@"
+ exit 1
+fi
+
+# Check for the existence of PostgreSQL's config files, and set the
+# proper mode and ownership.
+# Only three files should be checked as potentially other files
+# may be in PGDATA that should not be touched.
+for file in postgresql pg_hba pg_ident ; do
+ file="${PGDATA%/}/${file}.conf"
+ if [ ! -f ${file} ] ; then
+ eerror "${file} not found"
+ eerror "HINT: mv ${DATA_DIR%/}/*.conf ${PGDATA}"
+ exit 1
+ fi
+done