I am trying to help the foliate upstream maintain and upkeep the foliate snap as they were going to ditch it due to build errors etc.
As my first step i upgraded the existing foliate snap yaml to core 22 from core18, plus since foliate github repos current main branch is for the upcoming dev version, i changed the source to a tar file of the latest stable release here is the error i get afte building it with above mods, i have kept the snap use gjs from gnome-sdk through layouts but the snap builds but wont run, producing the following error ;
(gjs:9140): Gjs-ERROR 11:14:34.073: JS ERROR: Error: Requiring GjsPrivate, version none: Typelib file for namespace ‘GjsPrivate’ (any version) not foundrequire@resource:///org/gnome/gjs/modules/esm/gi.js:14:24@gi://GjsPrivate:3:25
You need to set GI_TYPELIB_PATH to include the location of the GjsPrivate typelib. Also note you are renaming the snap in your yaml from what’s published and it doesn’t match the path in your prefix. To fix the typelib issue:
The celluloid error is because you are staging something that depends on a different harfbuzz. You should look at the libs that are bundled in your snap and removed things that aren’t needed.
Can you recheck the proposed YAML and ensure i have done everything alright ??
I think desktop file should be added but it wasnt present in the original yaml
This is the new error, after adding that env variable ;
(com.github.johnfactotum.Foliate:12782): Gjs-CRITICAL 12:24:36.087 JS ERROR: ImportError: No JS module ‘main’ found in search path@/snap/foliate-gtk/6/usr/bin/com.github.johnfactotum.Foliate:9:1
(com.github.johnfactotum.Foliate:12782): Gjs-CRITICAL : 12:24:36.087: Script /snap/foliate-gtk/6/usr/bin/com.github.johnfactotum.Foliate threw an exception
This isnt the case in mine, am using Lubuntu 22.04, and using the yaml as approved by you, gives the following error when triggering from terminal, is this problem distro specific ?? (I am building the snap as foliate-gtk for test purposes)
(com.github.johnfactotum.Foliate:8826): Gjs-CRITICAL : 09:00:29.796: JS ERROR: ImportError: No JS module ‘main’ found in search path@/snap/foliate-gtk/7/usr/bin/com.github.johnfactotum.Foliate:9:1
(com.github.johnfactotum.Foliate:8826): Gjs-CRITICAL : 09:00:29.797: Script /snap/foliate-gtk/7/usr/bin/com.github.johnfactotum.Foliate threw an exception
Exactly, you have a mix of foliate and foliate-gtk. Your prefix and organize lines weren’t changed to match. I don’t see the reason for testing it as a different snap name from what you have proposed to the snap maintainer. If they accept the change, you’ll need to ensure it’s named foliate and you’ll need thorough testing of what you are submitting.
Ok, got it, i will ensure all this errors gets fixed before submitting to the upstream
Update: It now works and i have submitted it to upstream, i also added the desktop file as the snap ran but no desktop file or entry was available in the menu
The snap is build and also the upstream has accepted it and published the latest revision to the snap store, only one to-do is to make the snap build for only three archs-arm(64 & hf) and amd64