Add a way to repackage development builds as Snaps for testing
Categories
(Firefox Build System :: General, enhancement)
Tracking
(firefox128 fixed)
Tracking | Status | |
---|---|---|
firefox128 | --- | fixed |
People
(Reporter: jld, Assigned: gerard-majax)
References
Details
Attachments
(2 files, 2 obsolete files)
There's a feature I wanted a while ago, and wrote some code for, and now that several other people have found themselves wanting it it's probably time to check it in: Repackaging the local build (or, optionally, a downloaded CI build) as a Snap, to work on bugs that are specific to the Snap environment.
This is different from the official Canonical Snap builds, because those build everything from scratch, including LLVM/Clang; this is just a repack, so it won't be exactly the same, but it's mostly the same and a lot more convenient for development.
In addition to mach repackage snap
, I've also written mach repackage snap-install
to install the resulting snap, because installing an unsigned snap like this doesn't auto-connect its plugs (ranging from optional hardware access features to the distinctly non-optional :browser-support
) and that was getting annoying to do by hand. Also, there's mach repackage snap --install
to run both commands in sequence.
The main problem that I've seen people run into so far is that snapcraft
(the snap build tool) currently wants to run itself inside a VM (using multipass
), which can cause problems if building Firefox under a VM monitor that doesn't support nested VMs. However, snapcraft
can also use LXD containers, and that will become the default once we migrate our snap to use core22
, so that will eventually stop being a problem.
Reporter | ||
Comment 1•1 year ago
|
||
The mach repackage snap
command creates a Snap named firefox-devel
(currently only Firefox is supported), in order not to interfere with
the official package. We ignore the SNAP_NAME
env var if it names
a different app (assuming it was an unconfined Snap that launched a
non-Snap Firefox as a helper), so we need to recognize our own name with
the "-devel" suffix to avoid potential odd behavior (see bug 1825181 for
an example).
Reporter | ||
Comment 2•1 year ago
|
||
We already have a snapcraft.yaml
to repack a Firefox build, but
mach repackage snap
will want the resulting Snap to use the name
firefox-devel
to avoid interfering with an install of the real Firefox
snap, so this patch allows changing it.
Reporter | ||
Comment 3•1 year ago
|
||
This adds the command mach repackage snap
, which packages the current
build as a Snap (with the app name firefox-devel, to not interfere with
installs of the normal firefox package). It can also accept a tar file
as input, for example to repack a build from Taskcluster.
It also adds mach repackage snap-install
, which installs the package
and connects its plugs with snap connect
(normally done by default,
but not for an unsigned package like this).
Building a Snap package requires the snapcraft
command, which is
available as a Snap (and maybe from other package managers). Currently,
by default snapcraft runs itself inside a VM, which can cause problems
if building under a VM monitor that doesn't support nested VMs, but that
may change in the future.
Updated•7 months ago
|
Assignee | ||
Comment 4•7 months ago
|
||
Updated•7 months ago
|
Updated•7 months ago
|
Assignee | ||
Updated•7 months ago
|
Updated•7 months ago
|
Updated•7 months ago
|
Updated•7 months ago
|
Updated•7 months ago
|
Updated•6 months ago
|
Comment 6•6 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/170705f2b5ba
https://hg.mozilla.org/mozilla-central/rev/051187f2c76e
https://hg.mozilla.org/mozilla-central/rev/4580ec06b018
Description
•