vscodium icon indicating copy to clipboard operation
vscodium copied to clipboard

`Snap` Ported to core22

Open soumyaDghosh opened this issue 2 years ago • 15 comments

Also, kindly check #1657. The workflow can be improved and armhf and other architectures can also be supported in that way. If you want, I can elaborate on how the workflow can be managed.

soumyaDghosh avatar Sep 23 '23 06:09 soumyaDghosh

@soumyaDghosh Can you use core20 instead of core22 since VSCode is also using core20

daiyam avatar Sep 26 '23 12:09 daiyam

Well, core22 is based on the LTS release of Ubuntu 22.04. core20 is also same, based on Ubuntu 20.04. It's always better to be on the latest core as you get better packages and better performance, especially support with wayland and pipewire. core24 is gonna come soon next year. If vscode is on core20, I'll send the same PR there also.

soumyaDghosh avatar Sep 26 '23 12:09 soumyaDghosh

I am rethinking on this PR. This probably needs some more changes. Classic snaps are big thing to test.

soumyaDghosh avatar Dec 07 '23 19:12 soumyaDghosh

Following the discussion #1748 (I've looked on how flatpacking is done) and some about the AUR, I'm wondering several thinks...

  • Is it possible to a channel for each version core18, core20, core22?
  • What about a channel for X11 or Wayland
  • Or which Electron to use? system or builtin? And firstly, is it possible to reference a specific version of Electron installed system wide?

Is it done by any app? Should we do it (12 versions...)?

daiyam avatar Dec 07 '23 22:12 daiyam

@daiyam

  • Is it possible to a channel for each version core18, core20, core22?

We don't need to support extra cores, these are always downloaded with the snap, so, it will work everywhere. Also, these are not versions, but base snaps that're used by this snap.

  • What about a channel for X11 or Wayland

X11 and Wayland is a separate thing I'll work on later. x11 working in X11 and Wayland in wayland and if someone wants to run x11 in Wayland, just run it with $DISABLE_WAYLAND.

  • Or which Electron to use? system or builtin? And firstly, is it possible to reference a specific version of Electron installed system wide?

It's probably the electron from the core that's always used. Let's stick to that, because it's far more stable than any other electron.

EDIT: Also, don't compare Snap packaging with any other package, simply because this snap is packaged as a classic snap, means no confinement, host machine as the usr namespace and a lot more. We just need to figure out the proper way for dependencies.

soumyaDghosh avatar Dec 08 '23 05:12 soumyaDghosh

It will be very cool to support armhf and to run it on a Linux phone XD

guyluz11 avatar Dec 08 '23 08:12 guyluz11

Okay, @daiyam The initial porting is done. Now needs some testing before merging this. We can have some discussions on how to publish these snaps on store. We definitely don't need two different snaps for stable and latest builds. Also, this is from my last commit.

  1. remove content snap(can't be used with classic snaps)
  2. patch the rpath of the elf files to allow it run properly without depending on host libraries
  3. readded the apt packages and added a part to remove duplicate files that are in the core snap.

I am still unsure if all these packages are necessary.

soumyaDghosh avatar Dec 15 '23 21:12 soumyaDghosh

I will be using my local build as my daily driver from now, on my Ubuntu 23.10. If some other OS guys can also have some testing, we can merge this.

soumyaDghosh avatar Dec 15 '23 21:12 soumyaDghosh

Does it work on Ubuntu 20?

daiyam avatar Dec 15 '23 22:12 daiyam

@daiyam Thanks for recalling this. As suspected, it didn't. It needs more investigation.

soumyaDghosh avatar Dec 19 '23 07:12 soumyaDghosh

Also, kindly check #1657. The workflow can be improved and armhf

I've just opened the issue supports snap arm. The comments you added was for the pr with core22.

Is it also relevant for core20?

guyluz11 avatar Dec 19 '23 07:12 guyluz11

Yup. It's same for all.

soumyaDghosh avatar Dec 19 '23 11:12 soumyaDghosh

@soumyaDghosh I'm migrating to core20, looking at your code you have lot of changes... I'm wondering what you are trying to fix with the custom LD_LIBRARY_PATH, can you tell me? Thx

daiyam avatar Feb 03 '24 18:02 daiyam

@daiyam That's a try to pick gtk related files from the gnome-42-2204 snap.. but it's not supported for classic snaps. So, I have been looking into alternative ways. I actually have a core22 port, which I am using now.. it ran fine on 20.04.. but in my latest 23.10, I get this error message when I run it.. so, I didn't push it.

/snap/core22/current/usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so)
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so

EDIT: forgot to add that even though it shows this error, it works fine.

soumyaDghosh avatar Feb 03 '24 18:02 soumyaDghosh

I can't figured out my issue. I'm able to build on local (with the latest insider branch) but CI don't want to do it... I would be great if you can take a look! (I'm not even on Linux...) Also, the size of the snap is quite big (currently 380Mo but with, I think, vscodium's files in double... 300Mo without). Is it normal?

daiyam avatar Feb 08 '24 19:02 daiyam

@daiyam Sorry, was off due to exams. So, should I push the changes I have with core22? The only issue is what I shared with you. But can you guess, why is libgvfsdbus.so file getting called there? If we can solve that, I hope that we can fix the whole issue

soumyaDghosh avatar Feb 26 '24 13:02 soumyaDghosh

@soumyaDghosh No, we just moved to core20. We stay on it until MS move to core22.

Have you tried the latest version?

daiyam avatar Feb 26 '24 14:02 daiyam

Have you tried the latest version?

If you mean with core20 probably not. But if you meant the latest release with my changes, then yes. I did.

soumyaDghosh avatar Feb 26 '24 14:02 soumyaDghosh

But if you meant the latest release with my changes, then yes. I did.

Yes, it was what I meant. Do you have any issue with it?

daiyam avatar Feb 26 '24 14:02 daiyam