From 5decdce4f65a2f520b5cf26d6a1563ff5ef86b26 Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Fri, 28 Feb 2025 19:33:45 +0200 Subject: [PATCH 1/4] Postgresql 16 --- .github/workflows/release.yaml | 3 ++- snap/snapcraft.yaml | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c023259..b3c0db8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,6 +10,7 @@ on: push: branches: - 14/edge + - 16/edge paths: - snap/** workflow_dispatch: @@ -25,7 +26,7 @@ jobs: - build uses: canonical/data-platform-workflows/.github/workflows/release_snap.yaml@v30.1.3 with: - channel: 14/edge + channel: ${{ github.ref_name }} artifact-prefix: ${{ needs.build.outputs.artifact-prefix }} secrets: snap-store-token: ${{ secrets.SNAP_STORE_TOKEN }} diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 5f8ae7b..59011b7 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,6 +1,6 @@ name: postgresql -base: core22 -version: '14.15' +base: core24 +version: '16.6' summary: PostgreSQL in a snap. description: | PostgreSQL is a free and open-source relational database management @@ -126,7 +126,7 @@ parts: postgres-debs: plugin: nil stage-packages: - - postgresql=14+238 + - postgresql=16+257build1 - util-linux - locales-all organize: From fa57071c78150e85d35b211753ebfd76eb49b894 Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Fri, 28 Feb 2025 19:40:33 +0200 Subject: [PATCH 2/4] Switch to platforms --- snap/snapcraft.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 59011b7..dfe3f1b 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -6,11 +6,9 @@ description: | PostgreSQL is a free and open-source relational database management system emphasizing extensibility and SQL compliance. -architectures: - - build-on: [amd64] - build-for: [amd64] - - build-on: [arm64] - build-for: [arm64] +platforms: + amd64: + arm64: grade: stable confinement: strict From daf2563e3ac5c85271737849b1062c5bee61ba55 Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Fri, 28 Feb 2025 19:48:09 +0200 Subject: [PATCH 3/4] Refs to pg14 --- snap/hooks/install | 2 +- snap/local/start-postgresql.sh | 2 +- snap/snapcraft.yaml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/snap/hooks/install b/snap/hooks/install index e8177d6..e99e0aa 100644 --- a/snap/hooks/install +++ b/snap/hooks/install @@ -16,4 +16,4 @@ chown -R 584788:root $SNAP_DATA/* export LOCPATH="${SNAP}"/usr/lib/locale export PGDATA=$SNAP_COMMON/pgsql/data -"${SNAP}/usr/bin/setpriv" --clear-groups --reuid snap_daemon --regid snap_daemon -- "${SNAP}/usr/lib/postgresql/14/bin/initdb" -U postgres -D "${PGDATA}" +"${SNAP}/usr/bin/setpriv" --clear-groups --reuid snap_daemon --regid snap_daemon -- "${SNAP}/usr/lib/postgresql/16/bin/initdb" -U postgres -D "${PGDATA}" diff --git a/snap/local/start-postgresql.sh b/snap/local/start-postgresql.sh index 31e5039..5c128f2 100755 --- a/snap/local/start-postgresql.sh +++ b/snap/local/start-postgresql.sh @@ -4,4 +4,4 @@ export LOCPATH="${SNAP}"/usr/lib/locale export PGDATA=${SNAP_COMMON}/pgsql/data -"${SNAP}/usr/bin/setpriv" --clear-groups --reuid snap_daemon --regid snap_daemon -- "${SNAP}/usr/lib/postgresql/14/bin/postgres" -k /tmp -D "${PGDATA}" +"${SNAP}/usr/bin/setpriv" --clear-groups --reuid snap_daemon --regid snap_daemon -- "${SNAP}/usr/lib/postgresql/16/bin/postgres" -k /tmp -D "${PGDATA}" diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index dfe3f1b..a32c8fe 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -40,8 +40,8 @@ layout: bind: $SNAP/usr/share/perl /usr/local/lib/site_perl: bind: $SNAP/usr/local/lib/site_perl - /usr/lib/postgresql/14: - bind: $SNAP/usr/lib/postgresql/14 + /usr/lib/postgresql/16: + bind: $SNAP/usr/lib/postgresql/16 /var/cache/postgresql: bind: $SNAP_COMMON/var/cache/postgresql @@ -94,7 +94,7 @@ apps: pg-conftool: command: usr/bin/pg_conftool pg-ctl: - command: usr/lib/postgresql/14/bin/pg_ctl + command: usr/lib/postgresql/16/bin/pg_ctl pg-ctlcluster: command: usr/bin/pg_ctlcluster pg-dumpall: From a427def13c532b8551805e76121419b00c8c7882 Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Fri, 28 Feb 2025 20:30:25 +0200 Subject: [PATCH 4/4] Missing perl --- snap/snapcraft.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index a32c8fe..941044d 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -20,6 +20,8 @@ plugs: private: true layout: + /usr/bin/perl: + symlink: $SNAP/usr/bin/perl /usr/lib/python3/dist-packages: bind: $SNAP/usr/lib/python3/dist-packages /etc/perl: