Open Bug 1498413 (thunderbird-snap) Opened 6 years ago Updated 1 month ago

[meta] Repackage Thunderbird as a Snap package

Categories

(Thunderbird :: Build Config, enhancement)

enhancement

Tracking

(thunderbird123 fixed, thunderbird125 fixed)

ASSIGNED
124 Branch
Tracking Status
thunderbird123 --- fixed
thunderbird125 --- fixed

People

(Reporter: rjl, Assigned: dandarnell)

References

(Depends on 1 open bug, )

Details

(Keywords: leave-open, meta)

Attachments

(2 files, 6 obsolete files)

Attached file thunderbird-snapcraft.yaml (obsolete) —
Tracking bug for Thunderbird Snap builds,
Depends on: 1498677

Is there anything I can do to help with this?

I managed to help with Firefox on their snap builds.
https://bugzilla.mozilla.org/show_bug.cgi?id=1591751

Would you be able to work on the snapcraft file?

(In reply to Krish De Souza from comment #2)

Is there anything I can do to help with this?

I managed to help with Firefox on their snap builds.
https://bugzilla.mozilla.org/show_bug.cgi?id=1591751

Depends on: 1615932
No longer depends on: 1498677
Attached file thunderbird.snapcraft.yaml.in (obsolete) —

My latest WIP version of a snapcraft config for Thunderbird

Attachment #9016480 - Attachment is obsolete: true

Hi Rob,
I think the only comments I have so far initially is the following.

I don't think the attached file needs gpg-keys as currently the whole enigmail/gpg element is broken in snapcraft itself. As such, it may not be a good idea to expose gpg-keys unnecessarily until this is fixed.

The second aspect is that the snapcraft.yaml may need to have some mechanism for disabling updates in thunderbird. This can be quite annoying for users who won't be able to update the build outside of snap. The current snap version of thunderbird has this mechanism defined in the snapcraft.yaml here https://bazaar.launchpad.net/~ubuntu-desktop/thunderbird/snap/files/27.

Would it be possible to setup this as well?

I'll let you know if there are any other glaring issues i could point out.

Kind regards,
Krish

Hi Krish,

Thanks for your input.

I'm still working out some of the automation details with the Firefox team, but we will be using the same process Firefox does. Bug 1615932 has the changes to the build script to support Thunderbird Snap packages. The policies.json file is part of the build script, so we'll inherit that piece from there.

I was planning to remove the GPG integration.

Hi Rob,

Thanks for letting me know and for working on this.

Is this build currently working or are there issues?

I found a few more issues maybe if there are still problems.
So I noticed for all the builds of Firefox snap and thunderbird snap they seem to obey some strange aspects for the browser-sandbox plug. I may not understand fully why this is the case, but is it worth exploring here?

In this version for example. https://bazaar.launchpad.net/~ubuntu-desktop/thunderbird/snap/view/head:/snapcraft.yaml

The plugs is noted as '-browser-sandbox'. And a separate plug section is set with the following.

browser-sandbox:
interface: browser-support
allow-sandbox: true

https://snapcraft.io/docs/browser-support-interface
Looking at the docs, it seems that there needs to be additional parameters maybe for the allow-sandbox parameter.

Would it be possible to try this to see if it has an effect.

I think I am also curious about this common-id, external meta-data stuff. I found with the firefox snap this didn't seem necessary however I am happy to be told I am wrong about it. Is that necessarily the case here as well? I think for the Firefox snap, I only needed to define the dbus-daemon slot.

It works now :) The browser-support/sandbox thing was all jumbled up.

But, the allow-sandbox attribute is only allowed for certain vendors apparently, so at the moment it's necessary to install with --devmode to disable all of the security confinement which kind of defeats the purpose. Nothing that can't be worked out though.

You are right, the external metadata isn't necessary. But it's common data between Snaps, Appimages, and Flatpaks. It reduces duplicate data between the different app formats.

Attached file thunderbird.snapcraft.yaml.in (obsolete) —

Hi Rob,
When I was testing my own version of thunderbird. I was able to get confinement enforced by adding the --jailmode flag.

So sudo snap install --dangerous --jailmode thunderbird_<blah>.snap

That seemed to work with the allow-sandbox attribute too and seemed to confine just as much as the 'official' thunderbird snap.

Would that help in testing at least?

Kind regards,
Krish

Geoff, this isn't quite ready but I wanted to get your opinion before I go too much further with it.

These files are going to be used to build the Snap package. I don't really want to put them in M-C with Firefox's versions for obvious reasons. The docker image itself doesn't derive from the normal base images with all of the Taskcluster tools to grab build artifacts, so I'm proposing adding them to the linux tar ball that it repacks.
I'm not sure I like them being in the branding directory, I could put them under mail/installer perhaps.
Other ideas?

Assignee: nobody → rob
Attachment #9128003 - Flags: feedback?(geoff)
Comment on attachment 9128003 [details] [diff] [review]
Package freedesktop files on Linux

Review of attachment 9128003 [details] [diff] [review]:
-----------------------------------------------------------------

I'm not sure that I know enough about what's going on here to be useful. Do you plan to change the taskcluster/docker/firefox-snap code so that "firefox" isn't hard-wired in, then have it use our files where appropriate? And if so would comm/taskcluster/docker/thunderbird-snap be the appropriate place?
Attachment #9128003 - Flags: feedback?(geoff)

Yes sorry, more context.

I've been working on M-C changes in bug 1615932. The "firefox-snap" docker image is getting renamed to "snap-repackager" and the script inside that Docker image that does the actual build is getting modified to do what we need (within reason). There is a revision in Phabricator on that bug that makes the minimal changes to runme.sh, basically changing "firefox" strings to "${PRODUCT}". What's there works and has r+, but we have to keep our config files in the Docker image along with Firefox's.
Before I submit the rest of the changes to M-C, I'd like to figure out how to get our config files into the running Snap builder job, kind of keeping in mind that Flatpaks are coming along as well, and we will likely have the same sort of situation to solve.

Hi Rob,

Is there anything else I can do to help with this issue? It seems most of the stuff is somewhat in place at present.

Kind regards,
Krish

Hi Krish, Thanks for asking. Right now there isn't much, but as soon as I get things set up on the Snap store and get some builds going absolutely.

Depends on: 1665414
Severity: normal → S3
Assignee: rob → daniel
Keywords: leave-open
Attachment #9182108 - Attachment is obsolete: true
Attachment #9182107 - Attachment is obsolete: true
Attachment #9128003 - Attachment is obsolete: true
Attachment #9127185 - Attachment is obsolete: true
Attachment #9126998 - Attachment is obsolete: true

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/e89204033f34
Implement repackaging Thunderbird as snap. r=rjl

Status: NEW → ASSIGNED
Target Milestone: --- → 124 Branch

Comment on attachment 9378102 [details]
Bug 1498413 - Implement repackaging Thunderbird as snap. r=#thunderbird-build-system-reviewers

[Approval Request Comment]
User impact if declined: no snap build artifacts for snap testing
Testing completed (on c-c, etc.): on c-c
Risk to taking this patch (and alternatives if risky): low

Attachment #9378102 - Flags: approval-comm-beta?

Comment on attachment 9378102 [details]
Bug 1498413 - Implement repackaging Thunderbird as snap. r=#thunderbird-build-system-reviewers

[Triage Comment]
Approved for beta. Back out if any problems.

Attachment #9378102 - Flags: approval-comm-beta? → approval-comm-beta+

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/cfe1442a5528
Move redundant files from tb-snap Docker image to recipes directory. r=rjl

Comment on attachment 9388752 [details]
Bug 1498413 - Move redundant files from tb-snap Docker image to recipes directory. r=#thunderbird-build-system-reviewers

[Approval Request Comment]
User impact if declined: None (snap is only for testing)
Testing completed (on c-c, etc.): on c-c
Risk to taking this patch (and alternatives if risky): very low

Attachment #9388752 - Flags: approval-comm-beta?

Comment on attachment 9388752 [details]
Bug 1498413 - Move redundant files from tb-snap Docker image to recipes directory. r=#thunderbird-build-system-reviewers

[Triage Comment]
Approved for beta

Attachment #9388752 - Flags: approval-comm-beta? → approval-comm-beta+
Summary: Thunderbird Snap packages → [meta] Build Thunderbird as a Snap package
Summary: [meta] Build Thunderbird as a Snap package → [meta] Repackage Thunderbird as a Snap package
Depends on: 1894191
Blocks: snap

Note there is a launchpad bug for the migration to snap issues: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/2062133

No longer blocks: snap
Keywords: meta
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: