Dear Maintainer, It might be useful that lintian checked that each *.postinst contains the #DEBHELPER# string. For example, I noticed a missing #DEBHELPER# when creating a package that installed a systemd service but it did not start as expected. Thank you very much,
Hi Carles, Carles Pina i Estany wrote: […] Lintian already has a tag named maintainer-script-lacks-debhelper-token for exactly that. See also https://lintian.debian.org/tags/maintainer-script-lacks-debhelper-token The tag is though only emitted if debhelper is actually used. If in your case the tag should have been emitted but hadn't been emitted, please tell us which package at which version (or commit ID) this happened. Regards, Axel
hi, Oops... (I'm testing and reading lintian v2.104.0) I was running: $ lintian package.deb # on the binary package If I run: $ lintian package.dsc it does show the warning. I had expected that if a service is installed (in /lib/systemd/system/*.service) the postinst should have: "^# Automatically added by dh_installsystemd" But I see how is easier and more reliable to maintain lintian doing the check in the source package (I did not realise of the difference, I don't usually do packaging so all the tools are new for me :-) ) After opening the bug I started using salsa-ci/pipeline which does it in the source package and I see the warning if I "break" the package. To me the bug can be closed and sorry for the noise! Cheers,
Carles Pina i Estany <carles@pina.cat> writes: For the record (since I'm not sure this is obvious when you're new to Lintian), the best way to run Lintian is on the *.changes file generated as part of the package build. That will check everything that will be included in the upload.
Hi Carles, Carles Pina i Estany wrote: […] Yep, that's because that #DEBHELPER# token is only present in the source package and gets replaced with some code during the package build. So we can't check the binary (.deb) packages for it as it is never present there. Thanks nevertheless. Closing the bug report herewith. Russ Allbery wrote: Thanks for that! Just wanted to mention the same. :-) Regards, Axel
Hi, When I created the original bug, my thinking was that, if a package installed a systemd service, the postinst file must have: "# Automatically added by dh_installdeb" so that it could be checked. As you've seen, I hadn't realised that lintian checks in the source package and binary package differ (but it makes 100% sense!). 100% got it! And I moved it to salsa-ci pipeline that does the correct approach of course! :-) Thanks very much for the explanations and help!