Open ry opened 5 years ago
@waldyrious Strange, don't work in linux (Debian 10 tested) because MacOS is required.
@SandHilt good point. That's because Deno depends on Python 2, which Homebrew does not package anymore. So they add that dependency as a way to use the macOS-provided python2, as is indicated in the formula code.
So to fix that, Deno needs to support Python 3 — that's being tracked in #2893. I'm sorry for my misleading comment above. I've edited it to clarify that Linuxbrew is not yet a viable installation method.
Update on Linuxbrew: in https://github.com/Homebrew/linuxbrew-core/pull/21209 there was an attempt to get the Homebrew formula to work on Linuxbrew as well, but it was put on hold pending some changes to be merged on Deno's side; I believe those changes are now in place, as described in the discussion thread there, but I don't think anyone has retried the formula adaptation again since then.
Would makedeb be of any interest? It's a project I've personally created, but it would greatly aid in the maintainability of a Debian package imo if you guys wanted to adopt it for your packaging. It's already being used by quite a few package maintainers and directly by upstream projects alike, including some fairly well-known ones.
Some personal notes about makedeb
:
When it comes to apt
, maintaining a .deb
file by adding a proper debian/
directory to your sources is the very least problem. The key problem is, how to maintain your own, trustworthy, apt
-repository and - possibly best - how to bring this upstream into Debian and Ubunty later on.
So if you need some tool like makedeb
to even create a proper .deb file, please do not even try to do so. And it will not help you to push your package to Debian or Ubuntu later on!
Well, Debian packaging is not easy at the first glance, but after a proper debian/
directory was added to a project, usually everything sorts out very nicely and powerful. Solving this is a one-time issue.
OTOH keeping the apt
-repository secure is something you must live with each day, each time you update it. Here, ease usually is a contradiction to security. You must keep your key safe and, best, offline from any cloud. This is the real challenge to solve.
For everything else there are existing tools. For example: https://github.com/chrlutz/apt-repos
apt-repos
is an example for some tool which might help you in future to keep an eye on all the repositories involved, when there is a package for Debian/Ubuntu and you want to provide early upgrade which is compatible to what is found there before it makes it into Debian (Debian has strict rules on how packages must be maintained after release). But I am not sure if apt-repos
helps to setup your own secure apt
repository (it was mainly designed to maintain apt
repositories which are a derivative/mirror of a bunch of other upstream repositories like Debian/Ubuntu and QGIS, a challenge you probably do not have because you are no Linux distro).
But these are future challenges. The immediate challenge to solve when you provide your own repository, is that you need to keep your own secure build base (sbuild
is probably your friend here) and also keep an eye on your keys to keep them secure. This is, where all the effort will go into, and I doubt, tools like makedeb
can be here of any help or offer some headstart.
FYI: I know the creator of apt-repos
myself from Munich's Limux project, for which this tool was used to maintain Munich's fork of Ubuntu (called Limux
). But sorry, I cannot help further on this matter, as the Limux project was shut down, sadly.
PS: YMMV, but I am a die hard Debian user and think, luckily Debian does not promote Snap like Ubuntu. So if you would do a favor to people like me, stay with pure apt
and try to bring deno into Debian the traditional way. Thanks!
Is this any closer to fruition in 2023 than it was in 2019?
Just posing it as an option, but I could add this into the Prebuilt-MPR, which would give APT repositories for any distros that would be needed. The Prebuilt-MPR only officially supports Ubuntu 20.04/22.04 and Debian 11, but since Deno is largely a static binary the .deb
files should be distro-independent.
There has been discussion about this from the Debian side as well: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961337
Though building a .deb
locally is straightforward (using cargo-deb, you can run cargo deb -p deno
and it will create one), integrating deno into Debian's upstream build process is not. From https://wiki.debian.org/Rust (emphasis added):
Due to the way Rust and the Rust crates are packaged in Debian, packages shipping Rust crates are only useful when packaging other crates or Rust-based software for Debian. While you can use them for everyday development with Rust, their main use is as dependencies for other applications since Debian doesn't allow downloading source code at build-time.
So deno's dependencies would need to be packaged for Debian, and their dependencies, and so on. For an idea of the scope of work here, https://github.com/denoland/deno/blob/main/Cargo.lock has around 600 packages.
My Debian post-installation is in TS/Deno, this would my script(s) cleaner.
Just for reference, deno is currently installable via Homebrew,
Linuxbrew, AUR (of course) and a few other package managers: https://repology.org/project/deno/versionsUpdate: Installing with Linuxbrew does not work yet, see below.