QubesOS / qubes-issues

The Qubes OS Project issue tracker
https://www.qubes-os.org/doc/issue-tracking/
536 stars 47 forks source link

(Debian) Directly versioned python dependencies for qubes-core-agent #5785

Open jharveyb opened 4 years ago

jharveyb commented 4 years ago

The problem you're addressing (if any) I run debian testing in one qube, where the python3 metapackage was recently updated from 3.7.5 to 3.8.2. qubes-core-agent 4.0.55 depends on python3-qubesdb, which depends on python3 with version >=3.7~ and <<3.8. Since python3 is now at version 3.8.2, even though I have python3.7 installed, I would have to downgrade python3 to update qubes-core-agent.

Describe the solution you'd like Change the python3-qubesdb (and other qubes packages that use python) dependencies for Debian systems to directly reference the needed Python3 metapackage vs. restricting the version on the Python3 metapackage (ex. python3.7 vs. python3 with constraints on the version).

Where is the value to a user, and who might that user be? Allows the Python3 metapackages to be newer than the version required by Qubes packages.

Describe alternatives you've considered Downgrading the Python3 metapackage, keeping Python3.8 installed, and then calling python3.8 directly instead of python3 whenever using Python 3.

Additional context Debian testing updated the python3 metapackage to 3.8.2 on 28/03/2020 - I have not observed similar problems before, even though testing updates the python3 package every few months.

Relevant documentation you've consulted Viewing dependencies for qubes packages via apt.

Related, non-duplicate issues

Rattkener commented 4 years ago

Is there a bandaid fix a user could implement in the meantime?

edit: Specifically if a user is trying to do package installs that are being interrupted due to held packages (the qubesdb packages) that can't be pushed ahead because of the python3.8 issues. There doesn't seem to be a way around it at the moment, not documented at least

jharveyb commented 4 years ago

I looked into downgrading the system/Debian python3 version, as I had previously suggested as a solution. It seems like you could use update-alternatives to redirect the system python3 version from 3.8 to 3.7 or some other version (and vice-versa), but that won't change how apt checks dependencies. I also tried downgrading the python3 package with apt to 3.7, but that breaks many other packages that depend on having the most recent version of python3.

It seems like the only solution is to modify the package to check for the specific required python version - I'll try and develop a patch for this and see if that works out.

Rattkener commented 4 years ago

I was working on the same, I still have some issues but maybe you can make more progress than i did. I had to download the package directly using apt, then install it using dpkg, ignoring deps, then remove dependencies from the /var/lib/dpkg/status file . It didn't yield the exact results I was looking for but then again, I'm more RHEL than Debian. The result was the updates were still held back by the package because qubedb wanted to update to the one in the repo, creating the same issue all over again.

On Wed, May 20, 2020 at 10:54 AM Jonathan Harvey-Buschel < notifications@github.com> wrote:

I looked into downgrading the system/Debian python3 version, as I had previously suggested as a solution. It seems like you could use update-alternatives to redirect the system python3 version from 3.8 to 3.7 or some other version (and vice-versa), but that won't change how apt checks dependencies. I also tried downgrading the python3 package with apt to 3.7, but that breaks many other packages that depend on having the most recent version of python3.

It seems like the only solution is to modify the package to check for the specific required python version - I'll try and develop a patch for this and see if that works out.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/QubesOS/qubes-issues/issues/5785#issuecomment-631525930, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHBRI6WSHSJV2PVV7DBYVI3RSPVLTANCNFSM4MSECQKQ .

marmarek commented 4 years ago

The right thing to do is described here: https://www.debian.org/doc/packaging-manuals/python-policy/module_packages.html#specifying_versions And this is also what is implemented in the package: https://github.com/QubesOS/qubes-core-qubesdb/blob/master/debian/control#L16 Note the python3-qubesdb package was rebuilt just today: https://github.com/QubesOS/updates-status/issues/1808 and it has this set of generated dependencies:

 Depends: libqubesdb (= 4.0.13-1+deb11u1), libc6 (>= 2.4), python3 (<< 3.9), python3 (>= 3.8~)