linuxmint / aptkit

Transaction based package management service
GNU General Public License v2.0
6 stars 1 forks source link

Debian packaging improvements #3

Closed Fantu closed 1 month ago

Fantu commented 1 month ago

@clefebvre I did some other fixes to packaging. After this build-deps should be ok and build also in clean env. I didn't check deep deps, so it is high possible some other deps is missing.

There are still some lintian warning remained that is good to fix, and probably should be fixed for possible Debian inclusions:

W: aptkit: dbus-policy-in-etc [etc/dbus-1/system.d/org.debian.aptkit.conf]
W: aptkit: dbus-policy-without-send-destination <policy context="default"><allow send_interface="org.debian.aptkit"/> [etc/dbus-1/system.d/org.debian.aptkit.conf:2]
W: aptkit: dbus-policy-without-send-destination <policy context="default"><allow send_interface="org.debian.aptkit.transaction"/> [etc/dbus-1/system.d/org.debian.aptkit.conf:3]
W: aptkit: icon-size-and-directory-name-mismatch 48x37 [usr/share/icons/hicolor/48x48/status/aptkit-wait.png]

And here some other minor things spotted by lintian, if someone want to fix them:

I: aptkit: acute-accent-in-manual-page [usr/share/man/man1/aptkcon.1.gz:47]
I: aptkit: acute-accent-in-manual-page [usr/share/man/man1/aptkcon.1.gz:51]
I: aptkit: typo-in-manual-page "Allow to" "Allow one to" [usr/share/man/man1/aptkcon.1.gz:48]
I: aptkit: typo-in-manual-page "Allow to" "Allow one to" [usr/share/man/man1/aptkcon.1.gz:61]
I: aptkit: typo-in-manual-page "allows to" "allows one to" [usr/share/man/man1/aptk.1.gz:10]
I: aptkit: typo-in-manual-page "allows to" "allows one to" [usr/share/man/man1/aptkcon.1.gz:10]
I: aptkit: typo-in-manual-page "allows to" "allows one to" [usr/share/man/man7/org.debian.aptkit.transaction.7.gz:188]
I: aptkit: typo-in-manual-page Dependenciens Dependencies [usr/share/man/man7/org.debian.aptkit.transaction.7.gz:148]
I: aptkit: typo-in-manual-page modifing modifying [usr/share/man/man7/org.debian.aptkit.transaction.7.gz:59]
I: aptkit: typo-in-manual-page occured occurred [usr/share/man/man7/org.debian.aptkit.transaction.7.gz:179]
I: aptkit: typo-in-manual-page recieved received [usr/share/man/man7/org.debian.aptkit.transaction.7.gz:128]
I: aptkit: typo-in-manual-page singed signed [usr/share/man/man1/aptkcon.1.gz:37]
I: aptkit: typo-in-manual-page singed signed [usr/share/man/man1/aptkcon.1.gz:41]
clefebvre commented 1 month ago

https://github.com/linuxmint/aptkit/commit/6ba054de4ba36c2f668bd3b2285d6d196c61691f

I couldn't find acute accents..

clefebvre commented 1 month ago

d/control: add missed gettext to build-deps d/control: replace deprecated priority extra with optional debian: wrap and sort

Looks good

d/control: replace obsolete policykit-1 with polkitd

Do we also need pkexec here, in addition to polkitd? the transitional pkg depends on both.

d/control: add missed dh-sequence-python3 to build-deps d/control: add missed ${python3:Depends} to

Why? I'd prefer not to use this unless we absolutely need to. This introduces technical debt for us and when we get bugs it's really hard to troubleshoot. We're chasing a bug right now for instance in xviewer-plugins, where debhelper adds /usr/share/python/runtime.d profiles on our behalf. It took us half a day to figure it out.

If we need python3 deps, I'd rather have them explicitly added in the debian/control file, not generated at build time.

clefebvre commented 1 month ago

https://github.com/linuxmint/aptkit/commit/214f08a42df2c9af1c8cbff36b7c5b71181c66ce

clefebvre commented 1 month ago

W: aptkit: dbus-policy-in-etc [etc/dbus-1/system.d/org.debian.aptkit.conf] W: aptkit: dbus-policy-without-send-destination [etc/dbus-1/system.d/org.debian.aptkit.conf:2] W: aptkit: dbus-policy-without-send-destination [etc/dbus-1/system.d/org.debian.aptkit.conf:3]

OK, so here, we need to place the file in /usr/share/dbus-1/system.d?

I'm not sure I understand what needs to be done for the destination.

clefebvre commented 1 month ago

Looks like a syntax issue. I found a fix for a similar issue: https://github.com/andrew-bibb/cmst/pull/154/files

clefebvre commented 1 month ago

I'll test these changes to the dbus file tomorrow and commit the fix.

Fantu commented 1 month ago

d/control: replace obsolete policykit-1 with polkitd

Do we also need pkexec here, in addition to polkitd? the transitional pkg depends on both.

Transition metapackage have both because before both was inside pkexec should be added only is needed, from a grep I didn't see its use, so I supposed is not needed, if it will be used should be added (I think that if possible it is better to avoid to use pkexec given the incompatibility with Wayland)

d/control: add missed dh-sequence-python3 to build-deps d/control: add missed ${python3:Depends} to

Why? I'd prefer not to use this unless we absolutely need to. This introduces technical debt for us and when we get bugs it's really hard to troubleshoot. We're chasing a bug right now for instance in xviewer-plugins, where debhelper adds /usr/share/python/runtime.d profiles on our behalf. It took us half a day to figure it out.

If we need python3 deps, I'd rather have them explicitly added in the debian/control file, not generated at build time.

dh_python3 don't add only deps but do other useful things: https://manpages.debian.org/testing/dh-python/dh_python3.1.en.html it's just a matter of seeing in some cases whether to use the override with some parameters, I have rarely used them and almost only to pass private folders where the python scripts were installed (but I don't think this is the case with this program)

I didn't check xviewer-plugins but in general: Issue or regression caused by debhelper I saw is rare, near all what I saw was for: not good packaging, upgrading compat without read the changelog (and do needed check and changes), keep obsolete packaging and don't check/change packaging based on software changes (I have seen these last cases caused issues sometimes in cinnamon related packages too).

Some useful basic information: Debian Policy Manual - Changelog of Debian Policy Debhelper tool suite dh - debhelper command sequencer When there is to update debhelper compat of package is good to check the upgrade checklist.

clefebvre commented 1 month ago

Lintian warnings fixed. Commits cherry picked. dh-python isn't needed so it was left out.