pgadmin4 icon indicating copy to clipboard operation
pgadmin4 copied to clipboard

Add support for Debian trixie

Open marcingretl opened this issue 1 year ago • 20 comments
trafficstars

Hi, the following error appears after upgrading pgadmin4-desktop (I've tried both: 'https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/noble pgadmin4 main' and 'https://ftp.postgresql.org/pub/pgadmin/pgadmin4/snapshots/2024-09-12/apt/noble pgadmin4 main':

sudo apt -f install Summary:
Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 0 1 not fully installed or removed. Space needed: 0 B / 29.4 GB available

Setting up pgadmin4-desktop (8.11) ... Load apparmor pgAdmin profile... AppArmor parser error for /etc/apparmor.d/pgadmin4 in profile /etc/apparmor.d/pgadmin4 at line 4: Could not open 'abi/4.0': No such file or directory dpkg: error processing package pgadmin4-desktop (--configure): installed pgadmin4-desktop package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: pgadmin4-desktop Error: Sub-process /usr/bin/dpkg returned an error code (1)

Cheers, Marcin

marcingretl avatar Sep 16 '24 07:09 marcingretl

@marcingretl What was your previous version?

yogeshmahajan-1903 avatar Sep 16 '24 10:09 yogeshmahajan-1903

Not sure but presumably the one before 8.11, since I upgrade installed packages on a daily basis.

marcingretl avatar Sep 16 '24 10:09 marcingretl

@marcingretl Snapshot builds are not tested. You should only install released version of pgAdmin. I am not able to reproduce the issue when I have upgrade from 8.10 to 8.11 May you can try complete uninstall and install released 8.11

yogeshmahajan-1903 avatar Sep 16 '24 13:09 yogeshmahajan-1903

Well, as stated I also used 'https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/noble'. So this is not a night build issue.

marcingretl avatar Sep 16 '24 13:09 marcingretl

Last daily snapshot (https://ftp.postgresql.org/pub/pgadmin/pgadmin4/snapshots/2024-09-18/apt/noble) doesn't fix the issue.

marcingretl avatar Sep 18 '24 07:09 marcingretl

Can you please try complete uninstall and install released 8.11

yogeshmahajan-1903 avatar Sep 18 '24 08:09 yogeshmahajan-1903

And I did it today in the morning for the latest snapshot -> no success.

marcingretl avatar Sep 18 '24 08:09 marcingretl

I think I know what's going on: you're trying to use AppArmor with ABI 4.0, while in Debian there is only 3.0 available: https://packages.debian.org/search?keywords=apparmor&searchon=names&suite=all&section=all (or for trixie directly: https://packages.debian.org/trixie/amd64/apparmor/filelist)

marcingretl avatar Sep 18 '24 08:09 marcingretl

Hi @marcingretl,

When we tested, Noble (24) and above versions had ABI 4.0. I'm not sure why its still 3.0 on your OS.

adityatoshniwal avatar Sep 18 '24 08:09 adityatoshniwal

Ahh OK! So you're using Ubuntu Trixie. pgAdmin is not supported on trixie yet. https://www.pgadmin.org/download/pgadmin-4-apt/

adityatoshniwal avatar Sep 18 '24 08:09 adityatoshniwal

Hi, I'm using Debian trixie/sid (yes, mixed distos). And as I wrote: each Debian version supports only 3.0, so 8.1(2) is basically unavailable for Debian users then.

marcingretl avatar Sep 18 '24 08:09 marcingretl

Hi, I'm using Debian trixie/sid (yes, mixed distos). And as I wrote: each Debian version supports only 3.0, so 8.1(2) is basically unavailable for Debian users then.

No, app armor changes are only for Ubuntu 24 and above:

# Ubuntu 24 requires apparmor profile to work.
OS_ID=$(grep "^ID=" /etc/os-release | awk -F "=" '{ print $2 }')
OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F "=" '{ print $2 }' | sed 's/"//g' | awk -F "." '{ print $1 }')

if [ "${OS_ID}" == 'ubuntu' ] && [ "${OS_VERSION}" -ge "24" ]; then
  cat << EOF > "${DESKTOPROOT}/DEBIAN/conffiles"
/etc/apparmor.d/pgadmin4
EOF

  mkdir -p "${DESKTOPROOT}/etc/apparmor.d"
  cp "${SOURCEDIR}/pkg/debian/pgadmin4-aa-profile" "${DESKTOPROOT}/etc/apparmor.d/pgadmin4"

  cat << EOF > "${DESKTOPROOT}/DEBIAN/postinst"
#!/bin/sh

echo "Load apparmor pgAdmin profile..."
apparmor_parser -r /etc/apparmor.d/pgadmin4
EOF
  chmod 755 "${DESKTOPROOT}/DEBIAN/postinst"
fi

adityatoshniwal avatar Sep 18 '24 09:09 adityatoshniwal

Ok, maybe what I've said was a little misleading.

The newest supported Debian is Bookworm and you're right, the pgadmin4 8.11 is available for this release. However, Bookworm uses Python 3.11 which is unavailable in Trixie (Debian testing release). That makes any 8.1(1/2) unavailable for users of Debian higher than Bookworm (released on 2023-06-10), since there is neither Python 3.11 nor AppArmor 4.

marcingretl avatar Sep 18 '24 09:09 marcingretl

Hi @marcingretl, Yep, pgAdmin doesn't support Debian Trixie yet. We will take this as a feature request to support it. Thanks.

adityatoshniwal avatar Sep 18 '24 09:09 adityatoshniwal

postgresql already supports Trixie, and pgAdmin should

https://apt.postgresql.org/pub/repos/apt/dists/

liaohongxing avatar Sep 19 '24 08:09 liaohongxing

No, it does not. This is because in Trixie there is no: a) Python 3.11 (required by pgAdmin for Bookworm); b) AppArmor 4 (required by builds for Ubuntu).

So, if pgAdmin is expected to work on Debian-s newer than Bookworm please either change Python to 3.12 or AppArmor to 3 (ABI 3.0).

marcingretl avatar Sep 19 '24 12:09 marcingretl

Any chance for PgAdmin4 8.(1/2) for Debian Trixie or newer?

marcingretl avatar Sep 21 '24 09:09 marcingretl

Workaround for those, who use Dabian not Ubuntu:

  1. install pgadmin4-server 8.12 for Ubuntu Noble (works with Python 3.12, not 3.11)
  2. install pgadmin4-desktop 8.12 do Debian Bookworm (needs AppArmor 3, not 4)

marcingretl avatar Sep 22 '24 08:09 marcingretl

Any chance for PgAdmin4 8.(1/2) for Debian Trixie or newer?

We're already in the middle of 8.12 release which is most probably going to be released today. We can plan it for next release.

adityatoshniwal avatar Sep 23 '24 04:09 adityatoshniwal

In case anyone would accept a dirty hack: I was able to install it on Ubuntu Noble running in a container without AppArmor by the following procedure in the Dockerfile:

RUN touch /bin/apparmor_parser && chmod 755 /bin/apparmor_parser \
    && apt-get -y --no-install-recommends install pgadmin4-desktop pgadmin4 \
    && rm /bin/apparmor_parser

It makes the install script think that apparmor_parser is available just long enough to pass installation.

sverrehu avatar Oct 02 '24 11:10 sverrehu

Why must pgadmin4 use a specific, and no other, Python version? Are there breaking changes in higher Python versions that fundamentally make pgadmin4 incompatible?

bordenc avatar Aug 09 '25 05:08 bordenc

Why must pgadmin4 use a specific, and no other, Python version? Are there breaking changes in higher Python versions that fundamentally make pgadmin4 incompatible?

Hi @bordenc, There is nowhere mentioned that pgAdmin needs a specific python version. But there is higher limit of course since it requires full testing and may require code/package changes before adding support for new python version.

adityatoshniwal avatar Aug 11 '25 05:08 adityatoshniwal

Hi @bordenc, There is nowhere mentioned that pgAdmin needs a specific python version. But there is higher limit of course since it requires full testing and may require code/package changes before adding support for new python version.

@adityatoshniwal Thank you for your response. I'm confused, when I try to apt-get install pgadmin4-server, for example, I get pgadmin4-server : Depends: python3.11 but it is not installable, but I have 3.13 installed. So is the package configured to reject Python versions higher than 3.11?

bordenc avatar Aug 11 '25 05:08 bordenc

trixie has been released now. It would be nice if this can be fixed.

tob123 avatar Aug 12 '25 17:08 tob123

First of all, thank you for all of your hard work! ❤️

Secondly, I concur: Debian Trixie is now released as stable (Debian 13), and having formal support for that would be excellent.

And finally, just to add to earlier comments: The released version of Trixie actually contains AppArmor 4.1 and Python 3.13.

jakobmoss avatar Aug 14 '25 07:08 jakobmoss

Verified in candidate build.

yogeshmahajan-1903 avatar Sep 04 '25 09:09 yogeshmahajan-1903