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

Include freebsd-vscode in ports tree #3

Closed
mateuszkwiatkowski opened this issue May 15, 2019 · 13 comments
Closed

Include freebsd-vscode in ports tree #3

mateuszkwiatkowski opened this issue May 15, 2019 · 13 comments

Comments

@mateuszkwiatkowski
Copy link

It would be super convenient to include freebsd-vscode in ports tree. Did you try this? Anything is missing?

@tagattie
Copy link
Owner

Hi, thanks for your interest in this port. I hope it'll become an official port eventually.

One issue is yarn command, which accesses network to download files, executed during build phase. FreeBSD doesn't like this behavior so there must be some other way to pre-download files and check their integrity with distinfo.

So far no luck unfortunately... ☹️

@0mp
Copy link

0mp commented May 16, 2019

The easiest way to work around it is to prepare a release tarball with all the source code. This way the ports framework just downloads a prepared package with all the source code it needs from things like yarn.

This is a solution that was suggested to me by other ports committers.

@tagattie
Copy link
Owner

Thanks for the tip.

I found yarn install has the --offline option. So preparing a tarball containing all node_modules dependencies from yarn's cache and using it for port building may solve the problem. I will try that way.

@mateuszkwiatkowski
Copy link
Author

HI @tagattie,

Did you have a chance to give it a try?

@tagattie
Copy link
Owner

Hi @mateuszkwiatkowski,

Yes I tried yarn install with --offline option and it was a success. However, there are still some build steps trying to download files from the internet. I'm trying to figure out where they are and how to deal with them.

@lapo-luchini
Copy link

What is missing to make this a Port?
Can I help with anything?
Could this be depending on the existing electron4 Port instead of bundling its own?

@tagattie
Copy link
Owner

Now the port can be built with poudriere, it is good enough to be an official one IMO. I will work with port committer(s).

Could this be depending on the existing electron4 Port instead of bundling its own?

I'm not sure if I'm following. The port now depends on devel/electron4 for building instead of downloading and using a custom binary distribution file. Do you mean something other than that?

@lapo-luchini
Copy link

Yeah sorry, I meant if ti was possible to run with the electron executable (RUN_DEPENDS) instead of linking it (and bundling much of it).
I guess this is blocked by VSCode#72298 though.

@lapo-luchini
Copy link

(Has been done in Arch Linux though.)

@andersbo87
Copy link

I tried to copy vscode to /usr/ports/editors/vscode. But quite early on, I got an error message saying

$ yarn --frozen-lockfile --offline
yarn install v1.19.1
warning package.json: No license field
warning vscode-extensions@0.0.1: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
error Can't make a request in offline mode ("https://registry.yarnpkg.com/typescript/-/typescript-3.6.3.tgz")
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/editors/vscode
*** Error code 1

Stop.
make: stopped in /usr/ports/editors/vscode

When going back to my original location and install it (and create a package), it works fine.

@frostygoth
Copy link

frostygoth commented Dec 24, 2019

@andersbo87 I got this to work on my healty version of GhostBSD by making a change to the Makefile at /usr/ports/editors/vscode/Makefile

If you delete the --offline switch on line 161 it will allow you to complete the build by pulling the packages from online resources. Not an optimal solution, but once I made the change it built without issue.

diff /usr/ports/editors/vscode/Makefile.old /usr/ports/editors/vscode/Makefile
161c161
< 	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} yarn --frozen-lockfile --offline # --no-progress
---
> 	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} yarn --frozen-lockfile # --no-progress

@grahamperrin
Copy link

@mateuszkwiatkowski would you like to close this issue?

The port was added around two years ago: https://cgit.freebsd.org/ports/commit/?id=719fc2047bd9f7823509944bd1e856ac8da71fed

Thank you

@mateuszkwiatkowski
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants