From 3ec8cd0abb450f9d31c5b7a48ea521ef013fce87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Furkan=20T=C3=BCrkal?= Date: Mon, 2 Dec 2024 18:34:12 +0300 Subject: [PATCH] fix(repmgr): create missing dir and provide lib dir (#35639) * Provide the missing `/opt/bitnami/postgresql/lib` dir * Symlink every binary under `/usr/libexec/postgresql` * Add `pgaudit` runtime dep Signed-off-by: Dentrax --- repmgr.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/repmgr.yaml b/repmgr.yaml index 957f8dae4f8..997bd7232df 100644 --- a/repmgr.yaml +++ b/repmgr.yaml @@ -1,7 +1,7 @@ package: name: repmgr version: 5.5.0 - epoch: 2 + epoch: 3 description: "A lightweight replication manager for PostgreSQL" copyright: - license: GPL-3.0-only @@ -36,6 +36,9 @@ vars: # https://github.com/bitnami/containers/tree/main/bitnami/postgresql-repmgr # When newer versions are supported, this should be updated to the latest version # along with the postgresql-dev and libpq dependencies above. + # NOTE: Even though upstream has the 17 version as of now, it still doesn't run properly, + # their Helm Chart throws the following error: (Let's wait a fix from upstream) + # "The data directory was initialized by PostgreSQL version 16, which is not compatible with this version 17.2." PG_VERSION: 16 pipeline: @@ -121,6 +124,7 @@ subpackages: - gmp - postgresql-16 - postgresql-16-client + - pgaudit-16 pipeline: - uses: bitnami/compat with: @@ -142,8 +146,8 @@ subpackages: # conflicts with the bitnami dirs that owned by this package. mkdir -p ${{targets.contextdir}}/bitnami/postgresql mkdir -p ${{targets.contextdir}}/opt/bitnami/postgresql/conf + mkdir -p ${{targets.contextdir}}/opt/bitnami/postgresql/conf/conf.d mkdir -p ${{targets.contextdir}}/opt/bitnami/postgresql/conf.default - mkdir -p ${{targets.contextdir}}/opt/bitnami/postgresql/bin mkdir -p ${{targets.contextdir}}/opt/bitnami/postgresql/share mkdir -p ${{targets.contextdir}}/opt/bitnami/postgresql/tmp mkdir -p ${{targets.contextdir}}/opt/bitnami/postgresql/logs @@ -162,10 +166,8 @@ subpackages: find ${{targets.contextdir}}/opt/bitnami -type f -exec sed 's#${{targets.contextdir}}##g' -i {} \; # Link binaries used by Bitnami config - ln -sf /usr/libexec/postgresql${{vars.PG_VERSION}}/initdb ${{targets.contextdir}}/opt/bitnami/postgresql/bin/initdb - ln -sf /usr/libexec/postgresql${{vars.PG_VERSION}}/pg_ctl ${{targets.contextdir}}/opt/bitnami/postgresql/bin/pg_ctl - ln -sf /usr/libexec/postgresql${{vars.PG_VERSION}}/pg_rewind ${{targets.contextdir}}/opt/bitnami/postgresql/bin/pg_rewind - ln -sf /usr/libexec/postgresql${{vars.PG_VERSION}}/pg_isready /${{targets.contextdir}}/opt/bitnami/postgresql/bin/pg_isready + ln -sf /usr/libexec/postgresql${{vars.PG_VERSION}} ${{targets.contextdir}}/opt/bitnami/postgresql/bin + ln -sf /usr/lib/postgresql${{vars.PG_VERSION}} ${{targets.contextdir}}/opt/bitnami/postgresql/lib test: environment: environment: