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
ci: switch to core20 for snap #127320
ci: switch to core20 for snap #127320
Conversation
|
Relevant: #119436 |
|
Hi @anonymouse64, I was informed that this change might be of interest to you. Thoughts ? I chose Side note: Should I revert #119478 in favor of #118116 in this PR, since we are using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this makes sense to me but would like to wait for someone else to sign off as well
|
If the snap that is built here is working correctly, then +1 from me, I'm happy to test a .snap file built from this PR if someone can make it available for download, I don't have the time or expertise to build VS code unfortunately. I do use the VS code snap on a daily basis however :-) |
|
@anonymouse64 here is the snap package for testing https://az764295.vo.msecnd.net/insider/cebe99f55eee750bfa53ef644c00762ad2d21e22/code-insider-x64-1625157141.snap |
|
unfortunately I don't think this is ready/working yet: did anyone manage to run this version of VS code successfully when built as a snap with core18 base ? seems like a $LD_LIBRARY_LOAD path issue where it is using the wrong glibc from the host and not from the base snap |
|
Can confirm the crash and that the dynamic libraries are linked to the host OS, @anonymouse64 any thoughts what can cause this to happen, we are not messing with ld paths in the build. |
|
@deepak1556 I will defer to @sergiusens or @igorljubuncic for more help on that, I think that it might actually be that previously snapcraft was setting some paths for you, and it stopped doing this when you switched to using a base in the snapcraft.yaml. |
|
Thanks @anonymouse64 , in case it helps we are using |
|
I successfully built vscode with core20 - but you need to build it in a 20.04 container. Launching the 16.04 docker container will lead to the core dump issue as you see above. Here's the yaml that I used - but you need to edit the CI workflow to create a different snapcore container. https://github.com/snapcore/snapcraft/blob/master/docker/Dockerfile Similarly, if you want to use 18.04, you need an 18.04 build env. The yaml (ignore the version, as I built it locally): |
|
@igorljubuncic to clarify, the snap packaging is done in two steps: First we build vscode application on a custom 18.04 container https://github.com/microsoft/vscode-linux-build-agent/blob/main/bionic-x64/Dockerfile and create a ci artifact of the build. This is the reason I chose core18 as we cannot move to 20.04 here yet. Next in a separate pipeline we use
If I am reading https://github.com/snapcore/snapcraft/blob/master/docker/README.md correctly, |
|
Yes, it is 16.04 - I am not aware of an existing 18.04 image. But you can spin off your own - just change the image declaration to download the right image. |
|
Thanks for the clarification, that helps! |
cebe99f
to
32c66f4
Compare
|
@igorljubuncic I am trying to switch to use |
|
One thing you can do is expand a snapcraft.yaml that has a declared extension - and then you can manually declare all the pieces that are automatically hidden behind the scenes.
|
|
note that you can't use the gnome extension with a classic snap, and furthermore you also can't use the gnome content interface providing snaps with a classic snap as well. Has anyone tried changing this snap to just use |
|
@igorljubuncic thanks for the pointer, expanding it shows that the extension adds some plugs to use the gnome content interface which I don't think will work with classic snaps as mentioned by @anonymouse64 ? @anonymouse64 we definitely want to use Does the above findings imply that we need strict confinement to use core18 base ? Or is there a way to use gnome-3-34 without snap interface ? |
|
@deepak1556 well not necessarily, you can keep using classic and use a core18 base, but the gnome extension is our preferred way of setting up the environment variables and other such things so that most strictly confined applications "just work" out of the box without special fiddling in the YAML. You can of course setup everything that is setup by the extension manually, and without the content interface connections. The content interface simply shares the files from these other snaps with your snap so that your snap does not need to ship those files and there is less duplication across different graphical gnome apps. There are a few options to move forward if you determine that you do indeed need the libraries and files from these gnome content snaps. 1.) You can simply copy the files from these other snaps into your own snap and put them in equivalent locations, for example the files that gnome-3-34-1804 content plug shares are put at I would recommend experimenting a bit with 1 as a start |
|
Thanks @anonymouse64 , I will give 1) a try looks like it might get this PR moving again. |
58f1b0f
to
5b064cd
Compare
|
Hi @deepak1556, thanks for all of the work on that, it looks like you made some good progress. At this point I would say you should go with option 1b, I think sorting out the libgvfsdbus.so error is likely easier than attempting to follow through my suggestion in 2, since that was more of a hypothetical technical idea than a concrete plan since there are many gotchas when dealing with mount namespaces you probably don't want to dig into. I can't say for sure what the problem is or how to fix it, but I can say that this statement:
Suggests that the right thing to do is to ship that library with your snap so that you can be sure that the version of that library that is used matches/works with what you ship in your snap. This is the general policy of snaps and their dependencies, to ship what you need with the snap.
I'm curious, what are the two measurements here for? I just want to see if you are comparing "shipping libs in the snap + using lzo" to "not shipping libs in the snap + using xz" because that's not a great comparison for size purposes, it would be better to get 4 measurements if possible:
Because the switch from lzo -> xz does itself increase the size of the snap demonstrably, usually on the order of +30-40% for most snaps I've looked at |
deepak1556
mentioned this pull request
Evpok
mentioned this pull request
deepak1556
mentioned this pull request
filfreire
mentioned this pull request
deepak1556
mentioned this pull request
|
This blocks #168427. |
deepak1556
mentioned this pull request
a468471
to
e996283
Compare
|
This iteration I tried to revamp this PR and update our snap base to core20, although overall build is looking good there are a couple of issues that needs to be addressed before getting to the finish line. Following test was made on Fedora 36
$ cd /snap/code-insiders/current/
[parallels@fedora current]$ find . -name libEGL*
./gnome-platform/usr/lib/x86_64-linux-gnu/libEGL.so
./gnome-platform/usr/lib/x86_64-linux-gnu/libEGL.so.1
./gnome-platform/usr/lib/x86_64-linux-gnu/libEGL.so.1.1.0
./gnome-platform/usr/lib/x86_64-linux-gnu/libEGL_mesa.so.0
./gnome-platform/usr/lib/x86_64-linux-gnu/libEGL_mesa.so.0.0.0
./usr/share/code-insiders/libEGL.so
[parallels@fedora current]$ find . -name libcurl*
./usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.3
./usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4
./usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.6.0
./usr/lib/x86_64-linux-gnu/libcurl-nss.so.3
./usr/lib/x86_64-linux-gnu/libcurl-nss.so.4
./usr/lib/x86_64-linux-gnu/libcurl-nss.so.4.6.0
./usr/lib/x86_64-linux-gnu/libcurl.so.4
./usr/lib/x86_64-linux-gnu/libcurl.so.4.6.0
|
e996283
to
0346e2b
Compare
|
@joaomoreno this is now good to go Build for verification: Insiders snap x64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great @deepak1556, thanks for all the hard work! After my round of testing I didn't hit any blockers, so let's go ahead with this.


Fixes #116690
Fixes #119436
Fixes #147166
Fixes #155094
Fixes #168427
Fixes #133856
Fixes #146890