]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3418] remove os check before Postgres ddb grant
authorMarcin Godzina <mgodzina@isc.org>
Mon, 20 May 2024 14:15:40 +0000 (14:15 +0000)
committerMarcin Godzina <mgodzina@isc.org>
Mon, 20 May 2024 14:15:40 +0000 (14:15 +0000)
hammer.py

index 584852c0c47d566d01c307ea447c8260d71fbfbc..17182bef4a319e3a859256984d98892ca2beb87c 100755 (executable)
--- a/hammer.py
+++ b/hammer.py
@@ -1555,15 +1555,12 @@ def _configure_pgsql(system, revision, features):
     cmd += 'EOF\n"'
     execute(cmd, cwd='/tmp')
 
-    if system == 'fedora' and int(revision) >= 38 or \
-        system == 'debian' and int(revision) >= 12 or \
-        system == 'alpine' and float(revision) >= 3.17:
-        #TODO it needs detection of pgsql version, and apply this only for postgres >= 15
-        cmd = """bash -c \"cat <<EOF | sudo -u postgres psql postgres
-            GRANT ALL ON DATABASE keatest TO keatest;
-            ALTER DATABASE keatest OWNER TO keatest;\n"""
-        cmd += 'EOF\n"'
-        execute(cmd, cwd='/tmp')
+    # This is needed for postgres >= 15
+    cmd = """bash -c \"cat <<EOF | sudo -u postgres psql postgres
+        GRANT ALL ON DATABASE keatest TO keatest;
+        ALTER DATABASE keatest OWNER TO keatest;\n"""
+    cmd += 'EOF\n"'
+    execute(cmd, cwd='/tmp')
 
     cmd = """bash -c \"cat <<EOF | sudo -u postgres psql -U keatest keatest
         ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO keatest_readonly;\n"""