Page MenuHomePhabricator

Bug 1950511 - part 2: add a common module to use with both deb and rpm r=gabriel
ClosedPublic

Authored by alubert on Jan 29 2025, 2:03 PM.
Referenced Files
Unknown Object (File)
Dec 28 2025, 2:43 AM
Unknown Object (File)
Oct 16 2025, 2:31 AM
Unknown Object (File)
Oct 13 2025, 12:09 AM
Unknown Object (File)
Jun 29 2025, 7:19 PM
Unknown Object (File)
Jun 24 2025, 12:04 AM
Unknown Object (File)
Jun 23 2025, 10:26 AM
Unknown Object (File)
Jun 23 2025, 6:42 AM
Unknown Object (File)
Jun 22 2025, 8:52 PM
Subscribers
None

Details

Summary

These functions come from the deb repackaging sub-module and were altered to
allow multiple repackaging system.

Diff Detail

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
gabriel requested changes to this revision.EditedFeb 5 2025, 10:34 PM

Please use these common functions in python/mozbuild/mozbuild/repackaging/deb.py to avoid duplication.

This revision now requires changes to proceed.Feb 5 2025, 10:34 PM
alubert updated this revision to Diff 981927.
python/mozbuild/mozbuild/repackaging/utils.py
140

I think what we should do here is modify repackaging.desktop_file here: https://searchfox.org/mozilla-central/source/python/mozbuild/mozbuild/repackaging/desktop_file.py#174

We can try PKG_NAME and fall-back to the DEB_PKG_NAME.

pkg_name = build_variables.get("DEB_PKG_NAME", build_variables.get("PKG_NAME"))
if not pkg_name:
    raise ValueError("Package name is missing. Ensure that 'PKG_NAME' is set in build variables.")

We could also update the callers to pass in "PKG_NAME". I think the only other thing using these repackaging.desktop file module is the Firefox Flatpak. But this is a quick way to stop perpetuating "DEB_PKG_NAME"

212

probably specific to .debs

python/mozbuild/mozbuild/repackaging/utils.py
140

Never-mind updating the callers...

It's in a few places: https://searchfox.org/mozilla-central/search?q=DEB_PKG_NAME&path=&case=true&regexp=false

Using a pkg_name variable in repackaging.desktop_file instead of looking up the hard-coded "DEB_PKG_NAME" would be an improvement.

python/mozbuild/mozbuild/repackaging/utils.py
140

I’ve start to work on using the common module with the deb repackaging system and I’ve spot this problem too. The DEB_ prefix will be removed from the files on the repackaging module.

This revision now requires changes to proceed.Feb 26 2025, 12:01 AM
alubert updated this revision to Diff 990863.
alubert retitled this revision from Bug 213920 - part 2: add a common module to use with both deb and rpm r=gabriel to Bug 1950511 - part 2: add a common module to use with both deb and rpm r=gabriel.
alubert changed the Bugzilla Bug ID from 213920 to 1950511.
This revision is now accepted and ready to land.Mar 3 2025, 4:31 PM

This revision requires a Testing Policy Project Tag to be set before landing. Please apply one of testing-approved, testing-exception-unchanged, testing-exception-ui, testing-exception-elsewhere, testing-exception-other. Tip: this Firefox add-on makes it easy!

gabriel edited the summary of this revision. (Show Details)