Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Debian trixie #7928

Open
marcingretl opened this issue Sep 16, 2024 · 20 comments
Open

Add support for Debian trixie #7928

marcingretl opened this issue Sep 16, 2024 · 20 comments
Labels

Comments

@marcingretl
Copy link

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

@yogeshmahajan-1903
Copy link
Contributor

@marcingretl
What was your previous version?

@marcingretl
Copy link
Author

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

@yogeshmahajan-1903
Copy link
Contributor

yogeshmahajan-1903 commented Sep 16, 2024

@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

@marcingretl
Copy link
Author

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

@marcingretl
Copy link
Author

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

@yogeshmahajan-1903
Copy link
Contributor

Can you please try complete uninstall and install released 8.11

@marcingretl
Copy link
Author

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

@marcingretl
Copy link
Author

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)

@adityatoshniwal
Copy link
Contributor

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
Copy link
Contributor

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

@marcingretl
Copy link
Author

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.

@adityatoshniwal
Copy link
Contributor

adityatoshniwal commented Sep 18, 2024

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

@marcingretl
Copy link
Author

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.

@adityatoshniwal
Copy link
Contributor

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

@adityatoshniwal adityatoshniwal changed the title Debian trixie/sid: unable to install pgadmin4-desktop Add support for Debian trixie Sep 18, 2024
@liaohongxing
Copy link

postgresql already supports Trixie, and pgAdmin should

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

@marcingretl
Copy link
Author

marcingretl commented Sep 19, 2024

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
Copy link
Author

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

@marcingretl
Copy link
Author

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)

@adityatoshniwal
Copy link
Contributor

adityatoshniwal commented Sep 23, 2024

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.

@sverrehu
Copy link

sverrehu commented Oct 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

5 participants