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

Build and distribute Snappy packages #5458

Closed
Tyriar opened this issue Apr 18, 2016 · 44 comments
Closed

Build and distribute Snappy packages #5458

Tyriar opened this issue Apr 18, 2016 · 44 comments
Assignees
Labels
feature-request Request for new features or functionality install-update VS Code installation and upgrade system issues linux Issues with VS Code on Linux snap Issues related to the snap package verified Verification succeeded
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Apr 18, 2016

Ubuntu 16.04 is going to include a new type of package that installs the application in a more isolated manner.

@Tyriar Tyriar self-assigned this Apr 18, 2016
@Tyriar Tyriar added feature-request Request for new features or functionality linux Issues with VS Code on Linux labels Apr 18, 2016
@Tyriar Tyriar added this to the Backlog milestone Apr 21, 2016
@sergiusens
Copy link
Contributor

sergiusens commented May 16, 2016

Hello there, I have something sort of working.

It is not on the store yet, but you can download it from http://people.canonical.com/~sergiusens/snappy/vscode_1.0_amd64.snap

There are two snappy related bugs still open for this (which are being worked on):

So it would need to be installed by running

sudo snap install --devmode vscode*.snap

The most important thing that I still need to resolve it plugin installation. That is an area I could use pointers for btw.

I have 4 commits here https://github.com/sergiusens/vscode/commits/release/1.0.0

This branch has:

  • a gulp task to create the snap layout.
  • snapcraft specific assets.
  • a launcher (shell) specific to snapcraft (this won't be necessary for future builds though).
  • a local plugin (parts/plugins/x-nodejs) until I (or someone else) adds support for either gulp as a top level plugin or clean up what I did here to also support gulp.

sergiusens@a840a34 you might want to cherry pick regarless.

@Tyriar Tyriar added the install-update VS Code installation and upgrade system issues label Jun 2, 2016
@Tyriar
Copy link
Member Author

Tyriar commented Jun 2, 2016

Hey @sergiusens, thanks a lot for your work on this. The snap file size is 92mb compared to 30-45 for the other package types, are snaps not compressed by default or was this just left out?

We probably won't delve into distributing a snap until at least #1577514 is fixed. It sounds like it will be an Electron fix that will then take time for us to uplevel to.

I only thing I can see that's preventing your commits landing in master is moving the build resources (parts, snapcraft.yaml) to resources/linux/snap and the build artifacts to .build/linux/snap. If you get around to upleveling your branch and making those changes we'd be glad to merge a PR and add it to the CI build.

@sergiusens
Copy link
Contributor

@Tyriar ok, sounds like a plan, I'll work on that

@sergiusens
Copy link
Contributor

@Tyriar about size, we need to include things in which are not part of the core os which is the common dependency for everything. This could be much smaller but isn't yet as I haven't trimmed down all of it yet.

I'll get to the other items as soon as I look at it. I also based out of release/1.0.0 which I guess the intenton is to get this into master/devel instead?

@Tyriar
Copy link
Member Author

Tyriar commented Jun 10, 2016

@sergiusens yeah if you update your work to work on master with the tweaks I mentioned then we can push this and I'll get notified if it breaks. It will also make it convenient for anyone who wants to use snappy packages from an OSS build.

@flexiondotorg
Copy link
Contributor

@Tyriar Microsoft Visual Studio Code is published as a snap in the store as vscode using classic confinement in the beta channel. We'd love for your team to take ownership of this snap and publish new versions directly to the store :-)

The rationale for using classic confinement is that vscode is a code editor and users may reasonably expect to be able to edit files anywhere on the system. Use classic confinement means that LP: #1577514 is no longer relevant and neither is LP: #1577520, although the later issue is also now resolved in snapd when applications are strictly confined.

Snaps have a number of useful characteristics such as being simple to create, support multiple Linux distributions, enable very simple installation instructions and provide access to install metrics via the Snap store. There are also various hooks and services [3] available to automate the build and publish pipeline.

@Tyriar
Copy link
Member Author

Tyriar commented May 11, 2017

@flexiondotorg thanks for reaching out again, could you email me the process for taking ownership and publishing?

@Ads20000
Copy link

Ads20000 commented May 19, 2017

Update for those interested:
VS Code now in the snappy store in the stable channel.
Can't be installed from Ubuntu/GNOME Software...yet (use sudo snap install vscode --classic for now), ownership needs to be transferred and it potentially needs to be renamed code (but there's already a snap called code in the store).

@vannitotaro
Copy link

Moreover there is no reference to Microsoft in snap detailed information. I think it should be there, to give a hint to the user that it is the right package to install.

me@pc:~$ snap info vscode
name:      vscode
summary:   "Code editing. Redefined."
publisher: flexiondotorg
contact:   snappy-canonical-storeaccount@canonical.com
description: |
  Visual Studio Code is a new choice of tool that combines the
  simplicity of a code editor with what developers need for the core
  edit-build-debug cycle.
  
channels:                                 
  latest/stable:    1.12.2-1494422229 (8) 122MB classic
  latest/candidate: 1.12.2-1494422229 (8) 122MB classic
  latest/beta:      1.12.2-1494422229 (8) 122MB classic
  latest/edge:      1.12.2-1494422229 (8) 122MB classic

@Ads20000
Copy link

@vannitotaro once Martin has transferred ownership to Microsoft, it will hopefully read
publisher: microsoft

@cossio
Copy link

cossio commented Jul 29, 2017

Any news on this? Do we still need the --classic?

@Ads20000
Copy link

Ads20000 commented Aug 21, 2017

Classic is still needed (and will be until confinement is further improved, which requires further work on snapd by the snappy developers) and Martin has yet to transfer ownership to Microsoft. Also the snap is out-of-date but Martin has been informed about this so hopefully the existing vscode snap will be updated soon (should just require changing the version numbers referenced in the snapcraft.yaml for the snap) :)

@Tyriar
Copy link
Member Author

Tyriar commented Aug 21, 2017

Update from my side is that I've been a little stuck on the ownership transfer as I haven't had enough time to get around to setting this up.

@phillipsj
Copy link

Any updates? This would be awesome to have.

@Tyriar
Copy link
Member Author

Tyriar commented Sep 14, 2017

I'll be working on this in a couple of weeks, expect another update soon 😃

@ghisvail
Copy link

The current snap for vscode still lists Martin as publisher and is lagging behind upstream (Snap version is 1.15.1, current is 1.16.1). Is there anything else preventing the snap package to be updated to the latest version besides the transfer of ownership to Microsoft?

@Tyriar
Copy link
Member Author

Tyriar commented Sep 27, 2017

@ghisvail the new snap name is code to be consistent with the CLI. I'm currently at Ubuntu Rally with @flexiondotorg and the rest of the team working on the snap package build and integrating it into our CI.

@ghisvail
Copy link

@Tyriar Oh, I heard about the rally. So great your team is collaborating with Canonical directly.

@Tyriar
Copy link
Member Author

Tyriar commented Sep 28, 2017

PR to build snap packages: #35317


To build it in our CI we would need to run:

apt install -y snapcraft
export SNAPCRAFT_SETUP_CORE=1
export LC_ALL=C.UTF-8
export LANG=C.UTF-8

And then

npm run gulp -- "vscode-linux-$ARCH-build-snap"

@ghisvail
Copy link

ghisvail commented Oct 4, 2017

I saw the PR was merged. Does it mean we'll be getting an official snap package from the next release onwards then?

@Tyriar
Copy link
Member Author

Tyriar commented Oct 4, 2017

We need to verify some legal stuff and get it integrated into our CI, expect movement on this in the next 1-2 months 😃

@DarkLite1
Copy link

@Tyriar how is going with the integration in CI regarding the legal matters? The fix for the IME bug seems to be merged.

@Tyriar
Copy link
Member Author

Tyriar commented Mar 26, 2018

@DarkLite1 unfortunately we got blocked by a snap issue (which is now resolved) and other priorities took over. It's on hold currently as we enter endgame for the March release.

@chyzwar
Copy link

chyzwar commented Apr 24, 2018

can we somehow help with snap package?

@Tyriar
Copy link
Member Author

Tyriar commented May 12, 2018

Update: I've had too much other work to focus on to take this to the finish line. One of the things that was really bugging me is that every time I went to get some work done on it I would run into another major issue that needed help from the snapcraft team like random crashes or things not working.

can we somehow help with snap package?

Potentially, here's the branch: https://github.com/Microsoft/vscode/tree/tyriar/snap

I think this is a complete list of current work left to do:

@DarkLite1
Copy link

Thank you for working on the snap @Tyriar , I've just received the following update:

sudo snap list
vscode                  1.23.0-1525361119  34    stable    flexiondotorg  classic

So it seems like the integration into the CI is working now, unless someone else packaged a new snap manually.

@ghisvail
Copy link

ghisvail commented May 12, 2018 via email

@Tyriar
Copy link
Member Author

Tyriar commented May 13, 2018

Yes that's not the one published by us, @flexiondotorg derives that one from the deb

@tomByrer
Copy link

tomByrer commented Jul 9, 2018

At this time, the snap package is stuck at v1.24 while the main distos have had v1.25 for four days now. I know this is a US holiday weekend, but unfortunately my usual distro that I build VSCode manually crashes, since yarn won't build there.

@Ads20000
Copy link

@flexiondotorg

@Tyriar Tyriar added the snap Issues related to the snap package label Aug 24, 2018
@Tyriar
Copy link
Member Author

Tyriar commented Aug 24, 2018

I reopened issues related to snap package and labelled them here: https://github.com/Microsoft/vscode/labels/install-update-snap

@joaomoreno
Copy link
Member

This is now in master, planning to release for March.

@aeschli aeschli added the verified Verification succeeded label Apr 1, 2019
@mightyiam
Copy link

Do you mean April, @joaomoreno?

@joaomoreno
Copy link
Member

joaomoreno commented Apr 1, 2019

Actually, March! 🎆

No April Fools here. 😉

@vscodebot vscodebot bot locked and limited conversation to collaborators May 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality install-update VS Code installation and upgrade system issues linux Issues with VS Code on Linux snap Issues related to the snap package verified Verification succeeded
Projects
None yet
Development

No branches or pull requests