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

rpm & repository for Fedora Linux #229

Closed
fnkr opened this issue Nov 19, 2015 · 44 comments · Fixed by javifelices/vscode#4 · May be fixed by chjkw/vscode#4
Closed

rpm & repository for Fedora Linux #229

fnkr opened this issue Nov 19, 2015 · 44 comments · Fixed by javifelices/vscode#4 · May be fixed by chjkw/vscode#4
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
Milestone

Comments

@fnkr
Copy link

fnkr commented Nov 19, 2015

No description provided.

@mackenza
Copy link

see #269 for further discussion on this

@jwulf
Copy link

jwulf commented Nov 22, 2015

You could maintain the package and have it in the main Fedora repository:

https://fedoraproject.org/wiki/Packaging:Guidelines

@egamma egamma added the feature-request Request for new features or functionality label Nov 22, 2015
@ncoghlan
Copy link

For a relatively standalone application like this, a COPR repo would likely be a better fit than the main Fedora package repos: https://developer.fedoraproject.org/deployment/copr/about.html

@joaomoreno joaomoreno self-assigned this Nov 23, 2015
@1dot75cm
Copy link

I just packaged vscode. Can you help me test it? @fnkr
https://copr.fedoraproject.org/coprs/mosquito/vscode/

@bgse
Copy link
Contributor

bgse commented Dec 10, 2015

Edit: Ignore this comment, apparently I've managed to consistently misspell mosquito quite many times... sorry for the inconvenience.

@egamma egamma modified the milestone: Backlog Dec 10, 2015
@bgse
Copy link
Contributor

bgse commented Dec 10, 2015

Works fine, installs without any apparent issues.

I see you've decided to go for 'vscode' as command instead of 'Code' or 'code', this had me confused at first but I actually like it, I've always felt that 'code' was a little ambiguous to have in my path.

@egamma egamma changed the title [Feature Request] rpm & repository for Fedora Linux rpm & repository for Fedora Linux Dec 10, 2015
@bgse
Copy link
Contributor

bgse commented Dec 13, 2015

@1dot75cm Tested on F21 and F23, looking good so far.

@1dot75cm
Copy link

Thanks test. @bgse
In fact, I refuse to 'Shift' key. My little finger is very fragile. :)))))))))

@1dot75cm
Copy link

Hi, @bgse
I try to stripping electron from vscode package (1. rpm size reduced to 4.2 MiB; 2. share electron binary files). But the vscode do not support electron 0.36.x. It return following error.

RPM spec: http://copr-dist-git.fedorainfracloud.org/cgit/mosquito/test/vscode.git/tree/vscode.spec?id=17ce85d650470e023ff37e7412d62c5aa222b304
RPM: https://copr.fedorainfracloud.org/coprs/mosquito/test/build/163492/

Version 0.10.11
Commit 8b7f21e10bf69745bde4330a337e9501972e983b
Shell 0.36.8
Renderer 47.0.2526.110
Node 5.1.1
$ dnf install https://copr-be.cloud.fedoraproject.org/results/mosquito/test/fedora-23-x86_64/00163492-vscode/vscode-0.10.11-1.fc23.x86_64.rpm
$ export ELECTRON_ENABLE_LOGGING=1
$ export ELECTRON_ENABLE_STACK_DUMPING=1
$ electron /usr/lib64/vscode
[6978:0227/175217:INFO:CONSOLE(133360)] "IRequestService.makeRequest: Url is required.: Error: IRequestService.makeRequest: Url is required.
    at RequestService.makeRequest (file:////usr/lib64/vscode/out/vs/workbench/workbench.main.js:137627:23)
    at GalleryService.queryCache (file:////usr/lib64/vscode/out/vs/workbench/workbench.main.js:121102:40)
    at GalleryService.query (file:////usr/lib64/vscode/out/vs/workbench/workbench.main.js:121057:30)
    at ExtensionTipsService._getAvailableExtensions (file:////usr/lib64/vscode/out/vs/workbench/workbench.main.js:92773:41)
    at ExtensionTipsService._init (file:////usr/lib64/vscode/out/vs/workbench/workbench.main.js:92735:46)
    at new ExtensionTipsService (file:////usr/lib64/vscode/out/vs/workbench/workbench.main.js:92705:18)
    at create (file:////usr/lib64/vscode/out/vs/workbench/workbench.main.js:5252:14)
    at file:////usr/lib64/vscode/out/vs/workbench/workbench.main.js:61565:45
    at AccessLock.runUnlocked (file:////usr/lib64/vscode/out/vs/workbench/workbench.main.js:61393:24)
    at ServicesMap.createInstance (file:////usr/lib64/vscode/out/vs/workbench/workbench.main.js:61564:31)", source: file:////usr/lib64/vscode/out/vs/workbench/workbench.main.js (133360)
......
[6978:0227/175219:INFO:CONSOLE(109401)] "%c[Plugin Host]", source: file:////usr/lib64/vscode/out/vs/workbench/workbench.main.js (109401)

I think, we needs to solve this problem for Linux platform. However, the PR is marked as cla-not-required. @bpasero

@bgse
Copy link
Contributor

bgse commented Feb 28, 2016

@1dot75cm The cla-not-required label just means the contributor does not need to sign a license agreement, for example when it is a small change, in the case of @bpasero because he's Microsoft.

I'm sure it's pretty high up on the agenda though.

@1dot75cm
Copy link

1dot75cm commented Mar 8, 2016

Just now, I try to update electron to 0.36.10. It seems to work fine. How to conduct a comprehensive test? @bgse

Version 0.10.10
Commit 97d4ad1c55a82369f65078406ed770e8a34055fc
Date 2016-03-07T21:55:23.885Z
Shell 0.36.10
Renderer 47.0.2526.110
Node 5.1.1

https://copr.fedorainfracloud.org/coprs/mosquito/vscode/build/166475/

@Tyriar Tyriar self-assigned this Mar 8, 2016
@Tyriar
Copy link
Member

Tyriar commented Mar 8, 2016

FYI an official rpm file is going to be provided with the March release #3595, the repository will likely come later.

@bgse
Copy link
Contributor

bgse commented Mar 9, 2016

@1dot75cm I've tried updating to the latest F23 build, but didn't get far, dnf skipped the package due to dependency issues. Might be able to investigate more towards the weekend.

@Tyriar
Copy link
Member

Tyriar commented Feb 19, 2017

A yum repo is now available for stable only, insiders needs to wait until our signing story is automated. Here are the key links:

This is how you can install using yum:

# Install key
wget -O- -q https://packages.microsoft.com/keys/microsoft.asc > microsoft.asc
sudo rpm --import microsoft.asc
# Install repo
​​sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
# Update yum's cache
yum check-update
# Install
sudo yum install code

Please test it out and let me know how it goes.

Follow ups

@Tyriar Tyriar closed this as completed Feb 19, 2017
@Tyriar Tyriar modified the milestones: February 2017, Backlog Feb 19, 2017
@jrick
Copy link

jrick commented Feb 19, 2017

@Tyriar appears to work (tested with dnf on F25) although your example to install the repo is missing a double quote.

@Tyriar
Copy link
Member

Tyriar commented Feb 19, 2017

@jrick fixed, thanks 😅

@ismail
Copy link

ismail commented Feb 20, 2017

Should I open a new bug to create an openSUSE repo?

@Tyriar
Copy link
Member

Tyriar commented Feb 20, 2017

@ismail you should be able to use this repo, I'm hoping someone familiar with zypper can suggest the right script based on the yum one above.

@ismail
Copy link

ismail commented Feb 20, 2017

@Tyriar you are right, after installing the Microsoft signing key, just put a vscode.repo file under /etc/zypp/repos.d with the content

[vscode]
name=vscode
enabled=1
autorefresh=1
baseurl=https://packages.microsoft.com/yumrepos/vscode/
type=rpm-md
keeppackages=0

@LenzGr
Copy link

LenzGr commented Feb 20, 2017

@Tyriar rpm can actually import the GPG key via http directly, simply run:
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc

@LenzGr
Copy link

LenzGr commented Feb 20, 2017

Turns out the GPG key import can be skipped altogether, if the .repo file contains the key's URL in the gpgkey configuration variable. dnf install code will notice that the key is missing and prompts the user about downloading it:

Downloading Packages:
code-1.9.1-1486597190.el7.x86_64.rpm                                                                                                                           1.9 MB/s |  50 MB     00:26    
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                          1.9 MB/s |  50 MB     00:26     
warning: /var/cache/dnf/code-1a27fa61fdd77ffb/packages/code-1.9.1-1486597190.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID be1229cf: NOKEY
Importing GPG key 0xBE1229CF:
 Userid     : "Microsoft (Release signing) <[email protected]>"
 Fingerprint: BC52 8686 B50D 79E3 39D3 721C EB3E 94AD BE12 29CF
 From       : https://packages.microsoft.com/keys/microsoft.asc
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Installing  : code-1.9.1-1486597190.el7.x86_64                                                                                                                                           1/1 
  Verifying   : code-1.9.1-1486597190.el7.x86_64                                                                                                                                           1/1 

Installed:
  code.x86_64 1.9.1-1486597190.el7                                                                                                                                                             

Complete!

@LenzGr
Copy link

LenzGr commented Feb 20, 2017

I wrote a short HOWTO for Fedora (and other yum-based distributions): Installing Microsoft Visual Studio Code on Fedora Linux

@Tyriar
Copy link
Member

Tyriar commented Feb 20, 2017

@LenzGr Apparently dnf understands yum repos, that's cool! That's pretty similar to the setup for the apt repo, see #2973 (comment)

Not sure it would work with plain yum though on older OS's.

@bgse
Copy link
Contributor

bgse commented Feb 20, 2017

@Tyriar Should work, my guess is that something else will break on a 10 year old distro before yum refuses to play.

@LenzGr
Copy link

LenzGr commented Feb 21, 2017

@Tyriar dnf is actually the "next upcoming major version of yum" (according to the man page), so this should not be surprising ;)

And SUSE's zypper is capable to work with plain yum repos as well. Less work on your end. ;)

@ncoghlan
Copy link

I can confirm @LenzGr's variant works for dnf. I'm not sure older versions of yum have the automatic GPG key import feature though, so it probably makes sense to keep that step separate in any yum-specific docs.

@iavael
Copy link

iavael commented Feb 23, 2017

@ncoghlan

I'm not sure older versions of yum have the automatic GPG key import feature though

yum had this feature for a long time

@Tyriar
Copy link
Member

Tyriar commented Mar 1, 2017

Thanks for the help everyone!

If anyone would like to contribute tested instructions similar to the the new RHEL install section for zypper (use heading "openSUSE and SLE based distributions") that would be awesome. This could be done via a PR to the vnext branch of vscode-docs 😃

@hughsie
Copy link

hughsie commented Mar 8, 2017

Would it be possible to export the AppStream metadata on this repo too? This will make the app show up in the software center when the repo is installed. See https://blogs.gnome.org/hughsie/2016/04/27/3rd-party-fedora-repositories-and-appstream/ for the fix. Please yell if you have any questions or worries. Thanks!

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
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
Projects
None yet
16 participants