denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
98.05k stars 5.39k forks source link

Ubuntu PPA / Pop!_OS main repository #10872

Closed mmstick closed 2 months ago

mmstick commented 3 years ago

I'm packaging this for Ubuntu via a PPA and will be including it in Pop!_OS's main repository. I think this project is extremely valuable and would be a great asset to our massive developer community. Would it be okay to make note of this somewhere in the project? Or perhaps I can hand over the debian packaging files so that you can maintain the packaging if you wish.

I can provide instructions for uploading packages to Launchpad. Getting packages included in Debian proper is a bit trickier because they have some exotic requirements for Rust software. We're cool with just creating a tarball with vendored dependencies during the source generation phase.

lucacasonato commented 3 years ago

Ref #1583

Getting deno available via apt (either main or PPA) would be fantastic! It has been on our backlog for a long time now. The best for us would be if we could integrate packaging the .deb & pushing it to Launchpad into our CI release process. I am not experienced with creating deb packages (and I don't think anyone else on the core team is either), so guidance would be very much appreciated :-)

From my understanding of your comment this would start out as a PPA, and then be pulled into the Pop!_OS main repository?

MarkTiedemann commented 3 years ago

Would it be okay to make note of this somewhere in the project?

Such notes could be placed in the installation section of the manual, in the package manager section of the installer docs, as well as the installation section of the website.

https://github.com/denoland/deno/blob/main/docs/getting_started/installation.md#download-and-install https://github.com/denoland/deno_install/blob/master/README.md#install-via-package-manager https://github.com/denoland/deno_website2/blob/923ac3cd7335203afcf5c64cdc3373dfbc0e52da/pages/index.tsx#L242

mmstick commented 3 years ago

What's a good way of fetching the V8 sources pre-build, and then building it offline from this repository? That's the only hangup I currently have.

lucacasonato commented 3 years ago

If you want to build V8 from source, just set V8_FROM_SOURCE env var.

mmstick commented 3 years ago

So far I have

export V8_FROM_SOURCE = 1
export GN = /usr/bin/gn
export NINJA = /usr/bin/ninja
export CLANG_BASE_PATH = /usr

But get an error of

deno/vendor/rusty_v8/.gn" couldn't be loaded

I assume that rusty_v8 module doesn't contain the .gn file when it's published, as I can't find the file anywhere.

lucacasonato commented 3 years ago

Are you sure the vendored deps are actually in that deno/vendor/rusty_v8 folder? We definitely publish the .gn file too.

mmstick commented 3 years ago

Vendoring with

cargo vendor \
        --sync bench_util/Cargo.toml \
        --sync cli/Cargo.toml \
        --sync core/Cargo.toml \
        --sync runtime/Cargo.toml \
        --sync serde_v8/Cargo.toml \
        --sync test_plugin/Cargo.toml \
        --sync test_util/Cargo.toml \
        --sync extensions/console/Cargo.toml \
        --sync extensions/crypto/Cargo.toml \
        --sync extensions/fetch/Cargo.toml \
        --sync extensions/file/Cargo.toml \
        --sync extensions/timers/Cargo.toml \
        --sync extensions/url/Cargo.toml \
        --sync extensions/web/Cargo.toml \
        --sync extensions/webgpu/Cargo.toml \
        --sync extensions/webidl/Cargo.toml \
        --sync extensions/websocket/Cargo.toml \
        --sync extensions/webstorage/Cargo.toml \
        | head -n -1 > .cargo/config
echo 'directory = "vendor"' >> .cargo/config

Which is then wrapped into a tarball to survive debian's tooling that strips a lot of artifacts

tar pcf vendor.tar vendor

The rusty_v8 module is definitely there. But the .gn file in that module is not.

Screenshot from 2021-06-09 02-29-19

lucacasonato commented 3 years ago

cc @ry @piscisaureus

rektide commented 3 years ago

@mmstick do you have a WIP branch you might be able to share?

mmstick commented 3 years ago

https://github.com/mmstick/packaging-deno

lucacasonato commented 2 months ago

Closing in favour of a main repository build (#1583)