pgadmin4
pgadmin4 copied to clipboard
Add support for Debian trixie
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 What was your previous version?
Not sure but presumably the one before 8.11, since I upgrade installed packages on a daily basis.
@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
Well, as stated I also used 'https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/noble'. So this is not a night build issue.
Last daily snapshot (https://ftp.postgresql.org/pub/pgadmin/pgadmin4/snapshots/2024-09-18/apt/noble) doesn't fix the issue.
Can you please try complete uninstall and install released 8.11
And I did it today in the morning for the latest snapshot -> no success.
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§ion=all (or for trixie directly: https://packages.debian.org/trixie/amd64/apparmor/filelist)
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.
Ahh OK! So you're using Ubuntu Trixie. pgAdmin is not supported on trixie yet. https://www.pgadmin.org/download/pgadmin-4-apt/
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.
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
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.
Hi @marcingretl, Yep, pgAdmin doesn't support Debian Trixie yet. We will take this as a feature request to support it. Thanks.
postgresql already supports Trixie, and pgAdmin should
https://apt.postgresql.org/pub/repos/apt/dists/
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).
Any chance for PgAdmin4 8.(1/2) for Debian Trixie or newer?
Workaround for those, who use Dabian not Ubuntu:
- install pgadmin4-server 8.12 for Ubuntu Noble (works with Python 3.12, not 3.11)
- install pgadmin4-desktop 8.12 do Debian Bookworm (needs AppArmor 3, not 4)
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.
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.
Why must pgadmin4 use a specific, and no other, Python version? Are there breaking changes in higher Python versions that fundamentally make pgadmin4 incompatible?
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.
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?
trixie has been released now. It would be nice if this can be fixed.
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.
Verified in candidate build.