Unable to find postgresql-client-10 on Debian Stretch ARM - postgresql

I am trying to build docker image on Apple M1 chip Mac and one of the steps include installing postgresql-client-10 package. The base image is ruby-2.6.5-stretch and I have added file repository configuration and repo signing key as listed on postgresql documentation page for Debian. In the last step, when I am trying to install a specific version postgresql-client-10, the build errors out because it is not able to find this package.
This was working fine on AMD Debian Stretch build but not finding this client on ARM Debian stretch. If I install postgresql-client (without specifying version), it installs version 9. Is it possible that the client is not available for versions 9 and above? Where can I get the list of available client versions for postgresql based on Debian releases?
There's one more caveat, when I try to install it on Buster release, the installation is successful but since I need to have libproj12 (due to gem dependency), libproj.so.12 file is not found. Since the libproj package list for version 12 shows only stretch release, I think I am confined to using stretch release only and have to make it work for postgresql 10.

Related

How to build GStreamer 1.20.1 from source on Ubuntu 20.04

For a video streaming project, I need to install GStreamer version 1.20.1 on Ubuntu 20.04.
If I install the latest stable release from here then it will install the version 1.16.2. So, I need to build it from source to get the required version. The official documentation has two different ways of building from source.
I first built using Cerbero after git checkouting to 1.20.1 but after finishing the installation process, it still shows that the stable version (1.16.2) has been installed.
Then I tried the other method using Meson
However, it keeps going and it seems to be in a loop. The last two lines in the screenshot are repeated every few minutes:

postgresql/postgis looking for wrong version folder when creating extension in Azure DevOps pipeline

I'm building a pipeline on Azure DevOps with a Linux image as a base (ubuntu-latest). Here I'm installing PostgreSQL version 12 with PostGIS.
Here's what I install:
sudo apt-get install -y postgresql-12 postgresql-client-12 postgresql-12-postgis-3 postgresql-12-postgis-3-scripts
First I tried to install it without mentioning any version numbers, but then I got the error mentioned below and I followed recommendations to specifically do it like this.
Hence the specifically mentioned version numbers
No special additions, just a plain installation of Postgres.
Installation is going fine without any errors.
Then when I create my database and connect to it, I do CREATE EXTENSION POSTGIS; and I get this error:
psql:./create_tables.sql:3: ERROR: could not open extension control file "/usr/share/postgresql/14/extension/postgis.control": No such file or directory
I'm pulling my hair for some time now about this and I totally don't get where it gets that reference to a version 14 folder from. There is absolutely no version 14 installed.
I also tried to pull the Debian packages from the Postgres.org instead of the Ubuntu libraries, I tried to install PostGIS 2.5 and PostGIS 2.5 scripts packages. But whatever I do, I get the same result. Once I start the pipeline, the image gets built and Postgresql and PostGIS installed and then I get the same error as a result.
Did anyone have this same experience? Where could this library folder reference for version 14 come from?
EDIT 2022/05/21: I've added some checks to the scripts and when checking the version of PostgreSQL(via SELECT version(); ) it gives version 14 (!), which at least explains the error. Apparently version 14 indeed IS installed and runs on the default port 5432. Version 12 that is explicitly installed also runs, it runs on port 5433 (checked via cat /etc/postgresql/12/main/postgresql.conf ). I now explicitly start version 12 and connect in my scripts to port 5433, so I can continue, but I still wonder where that version 14 installation comes from.
Postgres 14 is pre-installed on the Microsoft Hosted agent for ubuntu-20
Reference:
https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md#postgresql

Up-to-date recommendations for yocto build host version

Because the documentation recommends Ubuntu 15.10 as a yocto build host, we went to considerable effort to set this up, only to find that Bitbake still tells us that this is not a supported version.
What is the latest recommended Ubuntu version, please? I'm thinking we may as go with the latest LTS.
If you use Warrior Yocto version, you can use Ubuntu 18.04 as stated here. For older Yocto version, you'll need an older host distribution due to GCC support.
Anyway, I suggest you to build Yocto within a Docker environment, for example this one.

PostgreSQL 9.6.9 on Alpine Linux (arm32v6) in Docker container - how to install correct postgresql-contrib package?

I need to install PostgreSQL 9.6.9 with uuid-ossp support in a Docker container on a 32-bit ARM system (its a QNAP NAS, CPU: Annapurna Labs Alpine AL-314).
I found the arm32v6/postgres images and installed arm32v6/postgres:9.6.9-alpine. This is working smoothly, but lacks the postgresql-contrib package. As far as I understand, I need to install postgresql-contrib to get uuid-ossp support.
I opened a CLI in the container and tried:
# apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/armhf/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/armhf/APKINDEX.tar.gz
v3.7.0-215-g16971064c0 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-207-gac61833f9b [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
OK: 8879 distinct packages available
# apk add postgresql-contrib=9.6.9-r0
ERROR: unsatisfiable constraints:
postgresql-contrib-10.4-r0:
breaks: world[postgresql-contrib=9.6.9-r0]
How can I install the correct version of postgresql-contrib? Or can I just use postgresql-contrib-10.4-r0 with PostgreSQL 9.6.9?
Just use base alpine image and install PostgreSQL completely from Alpine's official packages: postgresql and postgresql-contrib. The last stable Alpine providing PostgreSQL 9.6 is v3.6, which is two versions behind, but still supported. Alpine v3.7 provides only 10.4.
Also don't specify exact version to apk add. Alpine provides only single version of the package per branch (e.g. v3.7, v3.8, edge). Once we release postgresql-contrib 9.6.9-r1 or 9.6.10-r0 (e.g. fixing some security issue), 9.6.9-r0 will not be available anymore and your apk add postgresql-contrib=9.6.9-r0 will fail.
These specialized Docker images “packaging” something that is already properly packaged in Alpine are mostly totally useless and just causes confusions and problems. I can't even count how many times I'm responding to this type of issue on SO.
I found out that the arm32v6/postgres:9.6.9-alpine Docker image does have uuid-ossp support out of the box. The image seems to be compiled with (some?) postgres-contrib modules. A look into the Dockerfile might help.

Install package depending on OS

We have been testing with Platform.sh this weekend, which uses debian as its OS. The deployment of the application was easy, until we started testing some of the core functionalities like creating a PDF.
The PDF is generated using wkhtmltopdf, which has different binaries depending on OS. Our own platform consists of CentOS7 machines, so we let composer install the Centos7 specific package: https://github.com/rvanlaak/wkhtmltopdf-amd64-centos7 For Debian this package is needed: https://github.com/h4cc/wkhtmltopdf-amd64
So basically the problem is the inconsistency in plaform. Saw that composer allows you to define specific versions for PHP and extensions, but config.platform unfortunately can not solve this problem.
Unfortunately the following hooks did resolve into a deployment error too:
composer remove rvanlaak/wkhtmltopdf-amd64-centos7 --no-update
composer require h4cc/wkhtmltopdf-amd64:~0.12 --no-update
composer update
As we can not choose the OS on platform.sh, how can we let composer check for a specific OS?