Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Snap to core22 #96

Closed
wants to merge 1 commit into from
Closed

Conversation

sonjoonho
Copy link
Contributor

@sonjoonho sonjoonho commented May 29, 2023

Migrates the base Snap to core22. core22 is bundled with Python 3.10 so I've had to update various dependencies. There's also quite a few issues with the Gnome extension so I've had to implement a couple of workaround (marked by comments). I've also removed a number of package dependencies because I couldn't figure out what they're for, but lmk if they are required (also halves the size of the snap).

Related to #48 and #63, hopefully unblocks new releases.

As a side note, we should be able to stop bundling the font file and instead use the user's system font instead. This would fix/alleviate issues like #83, #86, #71, and #67.

Due to https://forum.snapcraft.io/t/core22-gnome-extension-and-broken-symlinks/32900 it's necessary to use a pre-release version of Snapcraft to deploy the snap.

snap refresh --candidate snapcraft

@sonjoonho
Copy link
Contributor Author

Successfully deployed to the Snap store: https://snapcraft.io/emote-sonjoonho. Will remove when/if the primary Snap is updated.

@tom-james-watson
Copy link
Owner

Hi @sonjoonho - thanks so much for working this out. I had thought that I had already responded, but it looks like I didn't! We have an ongoing migration to flatpak in the works, which is on the flatpak branch. This is mostly being done by @vemonet. We had actually removed snap in this branch, but given you have worked out how to upgrade to a newer core version, we're currently adding support for snap back in (#100).

Given the fact that that branch has diverged quite a bit, it looks like we won't actually directly merge this PR but instead are reworking it into flatpak, which will soon be merged back to master. You should make a PR that adds yourself to the authors list here though - https://github.com/tom-james-watson/Emote/blob/flatpak/emote/picker.py#L348!

@tom-james-watson
Copy link
Owner

When I build a new snap package with this branch locally and try and run it, the app looks like this:

image

Console output for running it:

~/P/Emote > emote
/snap/emote/x1/gnome-platform/usr/lib/x86_64-linux-gnu/glib-2.0/glib-compile-schemas: symbol lookup error: /snap/emote/x1/gnome-platform/usr/lib/x86_64-linux-gnu/glib-2.0/glib-compile-schemas: undefined symbol: g_task_set_static_name
Cannot load module /snap/emote/x1/gnome-platform/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-wayland.so: /snap/emote/x1/gnome-platform/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-wayland.so: undefined symbol: g_string_free_and_steal
/snap/emote/x1/gnome-platform/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-wayland.so does not export GTK+ IM module API: /snap/emote/x1/gnome-platform/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-wayland.so: undefined symbol: g_string_free_and_steal
ERROR: /snap/emote/x1/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0 exited abnormally with status 1
ERROR: compile_schemas /snap/emote/x1/gnome-platform/usr/lib/x86_64-linux-gnu/glib-2.0/glib-compile-schemas exited abnormally with status 127
Launching emote daemon

(emote:67647): Gdk-CRITICAL **: 14:12:31.104: gdk_window_get_state: assertion 'GDK_IS_WINDOW (window)' failed

This is on Debian 12.

@tom-james-watson
Copy link
Owner

The currently published emote works fine by the way.

@tom-james-watson
Copy link
Owner

These changes here seem to fix that problem - vemonet#4.

@tom-james-watson
Copy link
Owner

tom-james-watson commented Jun 20, 2023

This has been merged via the flatpak branch and is now pushed to the stable snap channel. Thank you for your contribution 💪🏼.

@sonjoonho
Copy link
Contributor Author

Ah cool! I'm actually still encountering the g_string_free_and_steal issue when building, installing, and running the snap; but when I restart and try to run it again it seems to work fine... quite mysterious.

@sonjoonho sonjoonho deleted the core22 branch June 20, 2023 11:00
@sonjoonho
Copy link
Contributor Author

This happens with the published 4.0.0 Snap too. I'll look into this at some point this week.

@tom-james-watson
Copy link
Owner

It works fine locally on my computer. I will double check it on a couple more machines.

@sonjoonho
Copy link
Contributor Author

It works fine when I log out and log in again. I guess some environment variables need setting on log in or something. I'll look for a workaround.

@sonjoonho
Copy link
Contributor Author

Oh sorry I was trying to run from the command line, opens normally when I open it from the desktop file. Sorry for the red herring; will split off any other bugs I find into separate issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants