Skip to content

Commit

Permalink
fix(repmgr): create missing dir and provide lib dir (#35639)
Browse files Browse the repository at this point in the history
* Provide the missing `/opt/bitnami/postgresql/lib` dir
* Symlink every binary under `/usr/libexec/postgresql`
* Add `pgaudit` runtime dep

Signed-off-by: Dentrax <[email protected]>
  • Loading branch information
Dentrax authored Dec 2, 2024
1 parent f763ca8 commit 3ec8cd0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions repmgr.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -121,6 +124,7 @@ subpackages:
- gmp
- postgresql-16
- postgresql-16-client
- pgaudit-16
pipeline:
- uses: bitnami/compat
with:
Expand All @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 3ec8cd0

Please sign in to comment.