ubuntu-pro-client-l10n translations are stripped

Bug #2037584 reported by Grant Orndorff
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pkgbinarymangler (Ubuntu)
In Progress
Undecided
Grant Orndorff
Xenial
New
Undecided
Unassigned
Bionic
New
Undecided
Unassigned
Focal
New
Undecided
Unassigned
Jammy
New
Undecided
Unassigned
Lunar
New
Undecided
Unassigned

Bug Description

[ Impact ]

In the upcoming version of ubuntu-advantage-tools, we will ship translation files in a new separate binary package called ubuntu-pro-client-l10n.

If you build ubuntu-pro-client-l10n with the current version of pkgbinarymangler, then translations are stripped and tarballed for inclusion in the langpack. We specifically don't want these translations included in the langpack for any release because pro-client gets updates (including strings) more frequently and many more times than langpacks get built.

In order to ship those translation files in ubuntu-pro-client-l10n we need to stop pkgbinarymangler from stripping them at build time. pkgbinarymangler has striptranslations.blacklist specifically for this purpose, so the fix is to add ubuntu-pro-client-l10n to that list.

[ Test Plan ]

Since the ubuntu-pro-client-l10n package is only getting introduced in the next version of ubuntu-advantage-tools (v30), the fixing and testing of this bug needs to be closely coordinated with the release of u-a-t.

Once u-a-t v30 is fully reviewed and ready to move to -proposed, we will first upload the fix of this bug to -proposed and wait for the binary proposed publication of pkgbinarymangler to complete. Then we will accept u-a-t v30 to -proposed.

In order to test that this bug is fixed, we will check that the binary ubuntu-pro-client-l10n package built from u-a-t v30 in -proposed contains the appropriate translation files. We will also verify that translations are working in u-a-t when ubuntu-pro-client-l10n is installed.

After showing all of that working together, we can mark this bug as verification-done

[ Where problems could occur ]

striptranslations.blacklist is a list of regexes, so if `ubuntu-pro-client-l10n` accidentally matches some other package, then that package would not have its translations stripped either.

Generally, new packages in -updates on ESM releases such as xenial and bionic (perhaps aside from u-a-t) are surprising and unexpected to users.

Related branches

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

@Grant: There is a variable which disables pkgbinarymangler completely, and which can be set in debian/rules:

export NO_PKG_MANGLE=1

It's used by some other packages for this very purpose, and in this case it would mean that we could avoid all those pkgbinarymangler uploads.

Does pkgbinarymangler do anything important with ubuntu-advantage-tools (besides translation stripping)? If not, I think using the NO_PKG_MANGLE variable instead is worth considering.

Revision history for this message
Grant Orndorff (orndorffgrant) wrote :

Hi Gunnar, that's a great suggestion!

I've been using NO_PKG_MANGLE=1 for testing, but was worried about what else we'd miss if pkgbinarymangler was completely disabled. I believe it is at least stripping debug symbols from our apt-hook binary and also trimming our changelog on older releases.

But like you say, it would be nice to avoid all these uploads. I'll do some tests today to see exactly what the impact will be. If it is small enough then we can probably just use NO_PKG_MANGLE=1 and save us some trouble :)

Revision history for this message
Grant Orndorff (orndorffgrant) wrote :

I ran some tests and this is what I found:

I wasn't exactly right in thinking pkgbinarymangler is stripping debug symbols from our binary. It is dh_strip that is doing that, but on xenial, dh_strip honors the NO_PKG_MANGLE environment variable. However in this case the difference in resulting binary size is negligible (<1kb).

I found two things that pkgbinarymangler is doing for us:

1. it truncates the ubuntu-advantage-tools changelog to the latest 10 entries.
2. it links the ubuntu-advantage-pro changelog to the ubuntu-advantage-tools changelog.

So by setting NO_PKG_MANGLE=1 we end up with a u-a-t binary package that is 20kb larger (all from the changelog) and an ubuntu-advantage-pro binary package that is also 20kb larger (also all from the changelog since it is neither truncated nor linked). ubuntu-advantage-pro is only installed on Cloud Pro images, though, so is less important than ubuntu-advantage-tools which is everywhere.

It feels a bit wrong to ship a 20kb changelog when its not necessary, but maybe it's okay.

I think we should get an SRU team decision to decide which is preferable:

A. NO_PKG_MANGLE=1 and 20kb u-a-t changelog for x, b, f, j, l
B. SRU the striptranslations.blacklist update to x, b, f, j, l

Revision history for this message
Robie Basak (racb) wrote :

Speaking for myself as a member of the SRU team, and not the SRU team as a whole:

It seems to me that since pkgbinarymangler is designed to do multiple things, some of which we have no reason to disable, we should aim to disable just the translation handling since that's exactly what we want to do. And the package has a mechanism to do that so we should use it. Even if a little unwieldy by requiring a pkgbinarymangler upload, using this mechanism seems like it would be relatively risk-free in an SRU because it is very specifically targetted. Even if it does potentially impact every build, its behaviour should be able to be fairly easily checked. We could verify that its behaviour hasn't changed against an unrelated package during SRU verification easily and confidently enough. Using NO_PKG_MANGLE sounds like it has other side effects that might have more implications that need consideration and therefore more risk of missing something.

For the development release, perhaps a finer-grained control in pkgbinarymangler that can be operated from the build of a package itself rather than changing pkgbinarymangler would be appropriate. But for an SRU I think using striptranslations.blacklist seems like the minimally impactful way to do it.

Revision history for this message
Grant Orndorff (orndorffgrant) wrote :

Thanks Robie!

We'll stick with the plan to update striptranslations.blacklist via pkgbinarymangler SRUs then.

Since this is tightly coupled to the upcoming u-a-t release, we'll handle the uploads as part of the u-a-t release process.

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.