Subject: Install Postgresql12-client in Alpine 3.19

From: Jan Kohnert <[email-masked]>
Date: Sun, 17 Dec 2023 14:06:39 +0100

Hello,

I'm using an Alpine-based Python container for automatic building/testing of 
my backup and restore tool for various sources. The tool internally uses tools 
provided by upstream database vendors such as pg_dump for database sources. As 
- at least for Postgres - the tools can change quite damatically between major 
versions, I try to CI-test all upstream-supported versions, so I install 
postgres16-client down to postgres12-client and test my tool using the correct 
client tools for the corresponding Postgres-Servers within the pipeline runs.

With the current release of Alpine 3.19 postgres12-client is not longer found. 
In 3.18, I could add postgres16-client using the edge repository; now I'm 
looking for a way to install postgres12-client using an older repo. I tried

apk add postgresql12-client --repository=https://dl-cdn.alpinelinux.org/
alpine/v3.18/main

but that doesn't work.

Is there a way to get the old version installed in current Alpine or do I need 
to stick with 3.18 for the time being?

TIA

-- 
MfG Jan

---

From: Tomas Volf <[email-masked]>
Date: Sun, 17 Dec 2023 14:27:29 +0100

> to stick with 3.18 for the time being?

You could (and likely should) just create a package for it.  You can very likely
use the APKBUILD for the 12 version, and try to build it using 3.19, I suspect
is should work?

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

---

From: Jan Kohnert <[email-masked]>
Date: Sun, 14 Jan 2024 14:51:31 +0100

Hi,

Am Sonntag, 17. Dezember 2023, 14:27:29 CET schrieb Tomas Volf:
> You could (and likely should) just create a package for it.  You can very
> likely use the APKBUILD for the 12 version, and try to build it using 3.19,
> I suspect is should work?

I finally managed to create the packages using postgresql12 APKBUILD from the 
3.18 stable aports git branch and building it in a 3.19 containerized environment.

Just in case anyone likes to have a look, the project is hosted on my gitlab 
instance:

https://git.jan-kohnert.de/alpine/postgresql12[1]

Packages are available in the package registry:

https://git.jan-kohnert.de/alpine/postgresql12/-/packages[2]

-- 
MfG Jan

--------
[1] https://git.jan-kohnert.de/alpine/postgresql12
[2] https://git.jan-kohnert.de/alpine/postgresql12/-/packages