Failed pkgbinarymangler tests with debhelper 13.10

Bug #2002871 reported by Gunnar Hjalmarsson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
launchpad-buildd
Triaged
Low
Unassigned
pkgbinarymangler (Ubuntu)
Fix Released
Low
Shengjing Zhu

Bug Description

To be able to update pkgbinarymangler to address bug #2002845, I disabled 3 tests which would otherwise have failed at buildtime. Those tests, which were simply commented in test/run, are:

- test_debian_changelog_truncation
- test_native_changelog_truncation
- test_ppa_debian_changelog

Ideally they should be fixed rather than disabled, of course. I'm talking about this upload:

https://launchpad.net/ubuntu/+source/pkgbinarymangler/150

tags: added: lunar
tags: added: rls-ll-incoming
Revision history for this message
William Wilson (jawn-smith) wrote :

Setting importance to low but we should fix before the release.

Changed in pkgbinarymangler (Ubuntu):
importance: Undecided → Low
tags: added: foundations-todo
Revision history for this message
Shengjing Zhu (zhsj) wrote (last edit ):

The regression is not from python 3.11, it's from debhelper 13.10, notably

  * dh_installchangelogs: Trim old Debian changelog entries
    automatically. Distributions can disable this by using
    `DEB_BUILD_OPTIONS=notrimdch`.

So debhelper has the ability to trim the changelog and enables it by default. This function is duplicated to pkgbinarymangler.

pkgbinarymangler has its own logic to trim changelog. It treats ppa packages especially and has testcases to ensure their changelogs are not trimmed.

So what the expected behavior we want here?

I propose to drop the changelog handling in pkgbinarymangler, as debhelper now supports such behavior.

Do we want to keep the special logic for ppa? If we want, IMO it's better to patch debhelper. Or maybe we could just ask LP admin to add DEB_BUILD_OPTIONS=notrimdch to all PPA builders?

summary: - Failed pkgbinarymangler tests with python3.11
+ Failed pkgbinarymangler tests with debhelper 13.10
Revision history for this message
Shengjing Zhu (zhsj) wrote :

BTW if you just want the tests to keep green, just add

override_dh_installchangelogs:
        dh_installchangelogs --no-trim

to test/icecream/debian/rules... But it's meaningless.

Revision history for this message
Shengjing Zhu (zhsj) wrote :

I've pushed the changes to my git
https://git.launchpad.net/~zhsj/+git/pkgbinarymangler/commit/?id=7471627fdea19c4a3f067a702c74d89e7e11a4a9

pkgbinarymangler (152) lunar; urgency=medium

  * pkgstripfiles: no longer strip debian changelog.
    It's now enabled by default in debhelper >= 13.10. But debhelper
    strips debian changelog for PPA as well.

Please take a look. But we may need a decision first.

Changed in pkgbinarymangler (Ubuntu):
assignee: nobody → Shengjing Zhu (zhsj)
status: New → Incomplete
status: Incomplete → In Progress
Shengjing Zhu (zhsj)
tags: added: fr-3493
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks for investigating this, Shengjing Zhu. Personally I think it makes most sense to let debhelper handle the truncation and drop the equivalent parts in pkgbinarymangler. I don't see a dire need for treating PPAs specially.

Since we don't have a VCS for this package, I submitted a merge request targeting your branch with a tiny code polishing thing (which does not deserve its own upload).

https://code.launchpad.net/~gunnarhj/+git/pkgbinarymangler/+merge/437564

Can you please include that in your upload?

Revision history for this message
Shengjing Zhu (zhsj) wrote :

Hi Gunnar,

Actually I need sponsor for this upload.

But I'm not sure who should be asked to ACK the change on PPA packages. Anyway the debhelper 13.10 is already in lunar release, so the regression is already in the lunar. It shouldn't block this change.

As for the git repo, git-ubuntu blocks this package intentionally. Would you like to import my vcs repo to somewhere like ~ubuntu-core-dev? The vcs history is generated by `gbp import-dscs`.

Revision history for this message
Shengjing Zhu (zhsj) wrote :

FTR, I think the special behavior for PPA is because it doesn't have online service, like https://changelogs.ubuntu.com

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

IMHO debhelper should honor the same builder settings that launchpad already exposes for the pkgbinarymangler such that notrimdch mode is then implied there. Or we should patch dpkg to do that, like we did with noudeb.

I think it is to do with reading /CurrentlyBuilding file settings. (Purpose setting set to PPA, with some exception for some PPAs).

Separately, i'm not sure about dropping pkgbinarymangler operation mode, since not all packages use debhelper right?

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

I created a VCS repo:

https://code.launchpad.net/~ubuntu-core-dev/+git/pkgbinarymangler

Please use that from now on.

When there is a consensus on what to do, I can sponsor the upload if nobody else does it.

Revision history for this message
Colin Watson (cjwatson) wrote :

I think it would make sense for launchpad-buildd to pass debhelper's new build option for PPAs, since it's narrowly-targeted and Launchpad is in a reasonable position to know what server facilities are provided. It's true that we historically used `/CurrentlyBuilding`, but passing narrowly-targeted build options is much neater; in the (very) long term I'd like to be able to drop the `/CurrentlyBuilding` hack.

Revision history for this message
Shengjing Zhu (zhsj) wrote :

> Separately, i'm not sure about dropping pkgbinarymangler operation mode, since not all packages use debhelper right?

Right, I completely forget about it.

So I've create a new merge proposal. https://code.launchpad.net/~zhsj/+git/pkgbinarymangler/+merge/437569

It now only strip debian/changelog if it hasn't been stripped. So IMO it should be safe to upload.

Whether we want to teach debhelper or dpkg to ensure "notrimdch" is used for PPA could be another upload on corresponding package, as I don't think pkgbinarymangler should inject that env (currently pkgbinarymangler doesn't seem to have hooks before building).

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Uploaded pkgbinarymangler 152 to lunar.

Changed in pkgbinarymangler (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pkgbinarymangler - 152

---------------
pkgbinarymangler (152) lunar; urgency=medium

  [ Shengjing Zhu ]
  * pkgstripfiles: only strip debian changelog if debhelper hasn't done so.
    debhelper >= 13.10 strips debian changelog by default (LP: #2002871).

  [ Gunnar Hjalmarsson ]
  * Add VCS fields

 -- Shengjing Zhu <email address hidden> Mon, 20 Feb 2023 16:56:48 +0800

Changed in pkgbinarymangler (Ubuntu):
status: Fix Committed → Fix Released
Guruprasad (lgp171188)
Changed in launchpad-buildd:
status: New → Triaged
importance: Undecided → Low
Benjamin Drung (bdrung)
tags: removed: foundations-todo
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.