electron-builder icon indicating copy to clipboard operation
electron-builder copied to clipboard

fix: Update snapcraft.yaml to use gnome-3-38-2004

Open eeickmeyer opened this issue 3 years ago • 9 comments

The core18 and plug gnome-3-28-1804 lose standard (free/community) support in less than a year in accordance with the Ubuntu LTS timeline as these both correspond with Ubuntu 18.04 LTS, which loses standard support in April 2023 and moves to paid-only support. To continue to have secure builds for Electron apps, new snap builds should move to core20 and use plug gnome-3-38-2004.

As an added bonus, this will also allow Ubuntu and official Ubuntu flavors to seed Electron snaps built with core20 and gnome-3-38-2004 because gnome-3-38-2004 provides the proper facility for this process.

eeickmeyer avatar Jun 30 '22 23:06 eeickmeyer

🦋 Changeset detected

Latest commit: 7da6b86851e2d424c86bac2347e128dacf10356f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
app-builder-lib Patch
dmg-builder Patch
electron-builder-squirrel-windows Patch
electron-builder Patch
electron-forge-maker-appimage Patch
electron-forge-maker-nsis-web Patch
electron-forge-maker-nsis Patch
electron-forge-maker-snap Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Jun 30 '22 23:06 changeset-bot[bot]

Deploy Preview for car-park-attendant-cleat-11576 ready!

Name Link
Latest commit 7da6b86851e2d424c86bac2347e128dacf10356f
Latest deploy log https://app.netlify.com/sites/car-park-attendant-cleat-11576/deploys/62c2682af74a5c00085039ee
Deploy Preview https://deploy-preview-6976--car-park-attendant-cleat-11576.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Jun 30 '22 23:06 netlify[bot]

electron-builder also do other weird things for snap; for example it opens a multipass on arm64 snap builds

JPeisach avatar Jun 30 '22 23:06 JPeisach

@ItzSwirlz Perhaps, but that's unrelated to this pull request.

eeickmeyer avatar Jun 30 '22 23:06 eeickmeyer

I actually now realize that this might not alone do the job. There are several 18.04-based dependencies that are being distributed as well that would need to be updated (as I tried a snap build with just updating the yaml file and the snap wouldn't run). Of course, I could be wrong there as well, but the long and short of it is that 18.04 dependencies should be moved to 20.04 ASAP.

eeickmeyer avatar Jul 01 '22 15:07 eeickmeyer

What are the 18.04-based dependencies?

mmaietta avatar Jul 04 '22 03:07 mmaietta

What are the 18.04-based dependencies

That would be pretty much everything listed under app: stage:.

eeickmeyer avatar Jul 04 '22 04:07 eeickmeyer

Oh jeez, I have no idea how one would transition it to 20.04, I'm not familiar with snaps or linux tbh. Happy to review a PR though 🙂

mmaietta avatar Jul 04 '22 04:07 mmaietta

FYI, I am patching this for my electron build, simply changing base: core18 to base: core20 in app-builder-lib/templates/snap/snapcraft.yaml and it seems to work correctly.

MikeJerred avatar Aug 26 '22 08:08 MikeJerred

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Nov 02 '22 03:11 stale[bot]

Changing the base alone works, but I also need to update the gnome extension to fix bugs e.g. this one: https://forum.snapcraft.io/t/snapped-app-not-loading-fonts-on-fedora-and-arch/12484/116

When I update to gnome-3-38-2004 by doing this:

app-builder-lib/templates/snap/snapcraft.yaml

-base: core18
+base: core20
...
plugs:
- gnome-3-28-1804:
+ gnome-3-38-2004:
    interface: content
    target: $SNAP/gnome-platform
-   default-provider: gnome-3-28-1804
+   default-provider: gnome-3-38-2004

app-builder-lib/out/targets/snap.js

        const appDescriptor = {
+           extensions: ["gnome-3-38"],
            command: "command.sh",
            plugs: plugNames,
            adapter: "none",
        };

The snap will not run, giving errors like:

g_module_open() failed for /snap/.../usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: librsvg-2.so.2: cannot open shared object file: No such file or directory
/snap/.../usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0: error while loading shared libraries: libharfbuzz.so.0: cannot open shared object file: No such file or directory

MikeJerred avatar Feb 27 '23 13:02 MikeJerred