Thread: Does PGDG apt repository support ARM64?
Hello, Psycopg binary files are built on Debian Stretch images. I have noticed that, on arm64 platforms, even if the pgdg apt repository is configured, apt-get will install libpq 9.6 (from the Debian repository), not the 14 available in pgdg. As a result, certain features are not available on psycopg[binary] on the arm platform, such as SCRAM authentication. This is the latest version of the libpq installation script [1] and its log, resulting in the installation of libpq-dev 9.6 [2]. On all the other supported platforms, libpq is installed from pgdg, see [3] for an amd64 run. The installation procedure in the latest run was pretty much: source /etc/os-release echo "deb http://apt.postgresql.org/pub/repos/apt $VERSION_CODENAME-pgdg main" \ > /etc/apt/sources.list.d/pgdg.list curl -skf https://www.postgresql.org/media/keys/ACCC4CF8.asc \ > /etc/apt/trusted.gpg.d/postgresql.asc cat > /etc/apt/preferences.d/pgdg.pref <<HERE Package: * Pin: release o=apt.postgresql.org Pin-Priority: 500 HERE apt-get update apt-get -y upgrade apt-get -y install libpq-dev Are arm packages available at all? If so, what is the right procedure to install them? Cheers -- Daniele [1]: https://github.com/psycopg/psycopg/blob/70e58346913f014fd6f30a541b375e224c1885f5/tools/build/wheel_linux_before_all.sh#L19 [2]: https://github.com/psycopg/psycopg/runs/5780379688?check_suite_focus=true#step:6:365 [3] https://github.com/psycopg/psycopg/runs/5744603160?check_suite_focus=true#step:6:247
On 3/31/22 18:22, Daniele Varrazzo wrote: > Hello, > > Psycopg binary files are built on Debian Stretch images. I have > noticed that, on arm64 platforms, even if the pgdg apt repository is > configured, apt-get will install libpq 9.6 (from the Debian > repository), not the 14 available in pgdg. As a result, certain > features are not available on psycopg[binary] on the arm platform, > such as SCRAM authentication. > > This is the latest version of the libpq installation script [1] and > its log, resulting in the installation of libpq-dev 9.6 [2]. On all > the other supported platforms, libpq is installed from pgdg, see [3] > for an amd64 run. > > The installation procedure in the latest run was pretty much: > > source /etc/os-release > echo "deb http://apt.postgresql.org/pub/repos/apt > $VERSION_CODENAME-pgdg main" \ > > /etc/apt/sources.list.d/pgdg.list > curl -skf https://www.postgresql.org/media/keys/ACCC4CF8.asc \ > > /etc/apt/trusted.gpg.d/postgresql.asc > > cat > /etc/apt/preferences.d/pgdg.pref <<HERE > Package: * > Pin: release o=apt.postgresql.org > Pin-Priority: 500 > HERE > > apt-get update > apt-get -y upgrade > apt-get -y install libpq-dev > > Are arm packages available at all? If so, what is the right procedure > to install them? From here: https://apt.postgresql.org/pub/repos/apt/dists/ I see them in Debian: Buster on up Ubuntu Focal on up, except Impish. > > Cheers > > -- Daniele > > [1]: https://github.com/psycopg/psycopg/blob/70e58346913f014fd6f30a541b375e224c1885f5/tools/build/wheel_linux_before_all.sh#L19 > [2]: https://github.com/psycopg/psycopg/runs/5780379688?check_suite_focus=true#step:6:365 > [3] https://github.com/psycopg/psycopg/runs/5744603160?check_suite_focus=true#step:6:247 > > -- Adrian Klaver adrian.klaver@aklaver.com
Uhm... I'm not practical with apt repos, but, in the Release file, Buster has: ``` Origin: apt.postgresql.org Label: PostgreSQL for Debian/Ubuntu repository Suite: buster-pgdg Codename: buster-pgdg Date: Tue, 29 Mar 2022 13:35:36 UTC Architectures: amd64 arm64 i386 ppc64el ``` whereas Stretch has: ``` Origin: apt.postgresql.org Label: PostgreSQL for Debian/Ubuntu repository Suite: stretch-pgdg Codename: stretch-pgdg Date: Tue, 29 Mar 2022 13:35:38 UTC Architectures: amd64 i386 ppc64el ``` Does it mean that there are no arm packages on stretch? -- Daniele On Fri, 1 Apr 2022 at 06:07, Adrian Klaver <adrian.klaver@aklaver.com> wrote: > > On 3/31/22 18:22, Daniele Varrazzo wrote: > > Hello, > > > > Psycopg binary files are built on Debian Stretch images. I have > > noticed that, on arm64 platforms, even if the pgdg apt repository is > > configured, apt-get will install libpq 9.6 (from the Debian > > repository), not the 14 available in pgdg. As a result, certain > > features are not available on psycopg[binary] on the arm platform, > > such as SCRAM authentication. > > > > This is the latest version of the libpq installation script [1] and > > its log, resulting in the installation of libpq-dev 9.6 [2]. On all > > the other supported platforms, libpq is installed from pgdg, see [3] > > for an amd64 run. > > > > The installation procedure in the latest run was pretty much: > > > > source /etc/os-release > > echo "deb http://apt.postgresql.org/pub/repos/apt > > $VERSION_CODENAME-pgdg main" \ > > > /etc/apt/sources.list.d/pgdg.list > > curl -skf https://www.postgresql.org/media/keys/ACCC4CF8.asc \ > > > /etc/apt/trusted.gpg.d/postgresql.asc > > > > cat > /etc/apt/preferences.d/pgdg.pref <<HERE > > Package: * > > Pin: release o=apt.postgresql.org > > Pin-Priority: 500 > > HERE > > > > apt-get update > > apt-get -y upgrade > > apt-get -y install libpq-dev > > > > Are arm packages available at all? If so, what is the right procedure > > to install them? > > From here: > > https://apt.postgresql.org/pub/repos/apt/dists/ > > I see them in Debian: > > Buster on up > > Ubuntu > > Focal on up, except Impish. > > > > > Cheers > > > > -- Daniele > > > > [1]: https://github.com/psycopg/psycopg/blob/70e58346913f014fd6f30a541b375e224c1885f5/tools/build/wheel_linux_before_all.sh#L19 > > [2]: https://github.com/psycopg/psycopg/runs/5780379688?check_suite_focus=true#step:6:365 > > [3] https://github.com/psycopg/psycopg/runs/5744603160?check_suite_focus=true#step:6:247 > > > > > > > -- > Adrian Klaver > adrian.klaver@aklaver.com
> On 3/31/22 18:22, Daniele Varrazzo wrote: > > Are arm packages available at all? If so, what is the right procedure > > to install them? On Fri, 1 Apr 2022 at 06:07, Adrian Klaver <adrian.klaver@aklaver.com> wrote: > > From here: > > https://apt.postgresql.org/pub/repos/apt/dists/ > > I see them in Debian: > > Buster on up Ah, gotcha. Buster is more recent than Stretch. -- Daniele
On Fri, Apr 1, 2022 at 8:48 AM Daniele Varrazzo <daniele.varrazzo@gmail.com> wrote:
> On 3/31/22 18:22, Daniele Varrazzo wrote:
> > Are arm packages available at all? If so, what is the right procedure
> > to install them?
On Fri, 1 Apr 2022 at 06:07, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
>
> From here:
>
> https://apt.postgresql.org/pub/repos/apt/dists/
>
> I see them in Debian:
>
> Buster on up
Ah, gotcha. Buster is more recent than Stretch.
Stretch also goes end of life on June 30 2022, so just a few months away. You definitely shouldn't be using that.
Buster is also considered the "oldstable" version. You should probably be using bullseye. (I assume you're talking about some generic binaries and not the DEB packages of course -- DEB packages should be built on their corresponding platform)
On Fri, 1 Apr 2022 at 16:28, Magnus Hagander <magnus@hagander.net> wrote: > Stretch also goes end of life on June 30 2022, so just a few months away. You definitely shouldn't be using that. The platform is part of the Python binary packages build chain; they are purposely on the old side of the spectrum in order to create binaries which can work with as many Linux distributions as possible, making use of core libraries ABI compatibility. The rationale is available at https://peps.python.org/pep-0513/ -- Daniele
On Fri, Apr 1, 2022 at 4:52 PM Daniele Varrazzo <daniele.varrazzo@gmail.com> wrote:
On Fri, 1 Apr 2022 at 16:28, Magnus Hagander <magnus@hagander.net> wrote:
> Stretch also goes end of life on June 30 2022, so just a few months away. You definitely shouldn't be using that.
The platform is part of the Python binary packages build chain; they
are purposely on the old side of the spectrum in order to create
binaries which can work with as many Linux distributions as possible,
making use of core libraries ABI compatibility. The rationale is
available at https://peps.python.org/pep-0513/
Ah yeah, that makes sense. Then buster is likely the better choice, yeah. (But you do want to get off stretch before it goes into unsupported land)
On Fri, 1 Apr 2022 at 17:00, Magnus Hagander <magnus@hagander.net> wrote: > > On Fri, Apr 1, 2022 at 4:52 PM Daniele Varrazzo <daniele.varrazzo@gmail.com> wrote: >> >> On Fri, 1 Apr 2022 at 16:28, Magnus Hagander <magnus@hagander.net> wrote: >> >> > Stretch also goes end of life on June 30 2022, so just a few months away. You definitely shouldn't be using that. >> >> The platform is part of the Python binary packages build chain; they >> are purposely on the old side of the spectrum in order to create >> binaries which can work with as many Linux distributions as possible, >> making use of core libraries ABI compatibility. The rationale is >> available at https://peps.python.org/pep-0513/ > > Ah yeah, that makes sense. Then buster is likely the better choice, yeah. (But you do want to get off stretch before itgoes into unsupported land) TBH if the PGDG team stops publishing packages for Stretch in 3 months it would be an immense pain in the neck, at least until the build chain gets updated (which might make the task of building packages easier, but it regularly leaves a slice of users unable to use binary packages. See https://github.com/psycopg/psycopg/issues/124 for a typical case). Please remember your Python friends! -- Daniele
On Fri, Apr 1, 2022 at 5:08 PM Daniele Varrazzo <daniele.varrazzo@gmail.com> wrote:
On Fri, 1 Apr 2022 at 17:00, Magnus Hagander <magnus@hagander.net> wrote:
>
> On Fri, Apr 1, 2022 at 4:52 PM Daniele Varrazzo <daniele.varrazzo@gmail.com> wrote:
>>
>> On Fri, 1 Apr 2022 at 16:28, Magnus Hagander <magnus@hagander.net> wrote:
>>
>> > Stretch also goes end of life on June 30 2022, so just a few months away. You definitely shouldn't be using that.
>>
>> The platform is part of the Python binary packages build chain; they
>> are purposely on the old side of the spectrum in order to create
>> binaries which can work with as many Linux distributions as possible,
>> making use of core libraries ABI compatibility. The rationale is
>> available at https://peps.python.org/pep-0513/
>
> Ah yeah, that makes sense. Then buster is likely the better choice, yeah. (But you do want to get off stretch before it goes into unsupported land)
TBH if the PGDG team stops publishing packages for Stretch in 3 months
it would be an immense pain in the neck, at least until the build
chain gets updated (which might make the task of building packages
easier, but it regularly leaves a slice of users unable to use binary
packages. See https://github.com/psycopg/psycopg/issues/124 for a
typical case).
Please remember your Python friends!
I'm pretty sure they will. However, there is apt-archive that you can switch to when that happens. It won't get you any updates, but you will at least still be able to get the "latest that were. See https://apt-archive.postgresql.org/.
On 3/31/22 23:48, Daniele Varrazzo wrote: >> On 3/31/22 18:22, Daniele Varrazzo wrote: >>> Are arm packages available at all? If so, what is the right procedure >>> to install them? > > On Fri, 1 Apr 2022 at 06:07, Adrian Klaver <adrian.klaver@aklaver.com> wrote: >> >> From here: >> >> https://apt.postgresql.org/pub/repos/apt/dists/ >> >> I see them in Debian: >> >> Buster on up > > Ah, gotcha. Buster is more recent than Stretch. Yeah I should have gone with the numbers: Debian 10+ Ubuntu 20.04+, except 21.10 > > -- Daniele -- Adrian Klaver adrian.klaver@aklaver.com