News for hackers. Stuff that matters.
Re:Debian Discusses Vendoring yet Again by lmm on Monday November 06, 2023 @06:43AM (#38161272)
The Debian model of an artisanal handcrafted build for every library is just not sustainable. Integrating deeply with the language's packaging ecosystem might be one answer, but they did that with Perl to (IMO) not great results, and I don't think there's much appetite for doing that with Javascript (from either side).
Re:Debian Discusses Vendoring yet Again by mrweasel on Monday November 06, 2023 @06:58AM (#38161407)
> The Debian model of an artisanal handcrafted build for every library is just not sustainable.

Yet it has functioned for 25 years (apt turned 25 this year). There has been mistakes, like the OpenSSL "fix", but not many. One issue that I, now that you mention Javascript, is stuff like npm, but to me that more a sign of npm being badly broken by design, or at least designed for a different environment. Build Python projects on Debian, using apt as you dependency manager works pretty well for systems that you expect to be stable over time.

One think so seems to forget is that you can often pull in newer versions of libraries and other packages from Backports. That does mitigate some of the issues with packages being to old.

Re:Debian Discusses Vendoring yet Again by lmm on Monday November 06, 2023 @07:27AM (#38161641)
> Yet it that functioned for 25 years (apt turned 25 this year).

Up to a point. Even 15 years ago the issues were clear and people were having to work around them.

> There has been mistakes, like the OpenSSL "fix", but not many.

That was the single worst bug in a general-purpose computer system IMO, and a predictable result of the Debian way of building packages. But they never felt the need to change their policies.

> Build Python projects on Debian, using apt as you dependency manager works pretty well

Python has notoriously terrible dependency management. It's a pretty low bar.

> One think so seems to forget is that you can often pull in newer versions of libraries and other packages from Backports. That does mitigate some of the issues with packages being to old.

The fact that there is such a big ecosystem of workarounds for linux distro packaging should tell you there's something fundamentally wrong with the basic idea.

Re:Debian Discusses Vendoring yet Again by mrweasel on Monday November 06, 2023 @08:10AM (#38162124)
> Python has notoriously terrible dependency management. It's a pretty low bar.

That's subjective. In my mind it's the only one that makes any sort of sense and isn't a freaking nightmare to use.

Re:Debian Discusses Vendoring yet Again by michaelt on Monday November 06, 2023 @08:36AM (#38162374)
Some would say the fact that venvs and conda are so widely used shows that many users encounter problems with the stock Python dependency management.
Re:Debian Discusses Vendoring yet Again by TrickardRixx on Monday November 06, 2023 @09:01AM (#38162660)
Are venvs not part of stock Python dependency management?
Re:Debian Discusses Vendoring yet Again by rcxdude on Monday November 06, 2023 @12:56PM (#38166049)
conda is now primarily a way to fuck up a python environment, at least in the hands of most useres.
Re:Debian Discusses Vendoring yet Again by lmm on Monday November 06, 2023 @08:55PM (#38172167)
The same is equally true of almost every python dependency management tool.
Re:Debian Discusses Vendoring yet Again by josephg on Monday November 06, 2023 @09:11AM (#38162793)
As a software developer who’s written a fair bit of code in JavaScript, C and recently Rust, the idea that I would look for my dependencies in apt on Debian is a bad joke. At best I’ll get some ancient version of the things I depend on. But more likely, 2/3rds of the libraries I use simply won’t be there at all. Is the rust compiler in apt? Is serde? Rand? What about the long tail of my programs dependencies?

I remember looking in apt for nodejs one time and the version it had was about 5 years out of date, and it was missing all sorts of quality of life features that I had long since taken for granted (like promises). And of course, half of the packages in npm failed to run at all as a result. It was a complete non starter. Maybe I should have searched apt for ancient versions of common JavaScript libraries from a similar vintage? Then I could install them system wide. Yay. And what would all that extra hassle get me? A JavaScript program that would only work on one crusty Linux distribution. Which is strictly worse than what nodejs ships with out of the box: npm. Up to date packages. Modern JavaScript. And compatibility a mile wide.

And I could tell the same story with rust and cargo, and plenty of other languages.

Apt really makes no sense at all to use in this context. Maybe it’s fine to install X and gvim. But that’s about it.

If Debian really wants to mirror npm and cargo and other languages’ package managers, why don’t they just automate it, and add the hundreds of thousands of packages en masse?

Manually adding specific versions of packages from npm and cargo sounds like a massive waste of human effort. At best it will only ever produce a pale imitation of the real package repositories. I just don’t see the point.

Re:Debian Discusses Vendoring yet Again by yjftsjthsd-h on Monday November 06, 2023 @09:55AM (#38163426)
The idea of Debian is to have a stable system that doesn't change if it possibly can for the life of the release. If you want to constantly get new breaking changes in your packages, switch to testing or sid.
Re:Debian Discusses Vendoring yet Again by curt15 on Monday November 06, 2023 @01:07PM (#38166226)
What if I want to develop applications using the latest dependency versions on a stable system? Are flatpak/docker/podman the recommended solutions?
Re:Debian Discusses Vendoring yet Again by tremon on Monday November 06, 2023 @01:49PM (#38166929)
If you want the latest dependencies, you don't have a stable system: if shifts with the versions of your dependencies. In Debian, you would use a chroot with the new versions (see debootstrap).
Re:Debian Discusses Vendoring yet Again by josephg on Tuesday November 07, 2023 @03:06AM (#38174356)
That’s a weird usage of the term “stable”. Is the latest rustc release unstable? Are there bugs in nodejs? It’s been years since a nodejs bug affected me.

If anything you usually have fewer problems with newer toolchains, because new features get used by your dependencies. The version of rustc or nodejs that Debian considers “stable” won’t be able to run a lot of software that I want to run.

And despite the name, “unstable” Debian is still usually 6 months behind the latest version of most packages. That’s an eternity for new things like Zig.

Re:Debian Discusses Vendoring yet Again by tremon on Tuesday November 07, 2023 @08:53AM (#38176683)
It's the Debian usage of the term "stable". Seems kinda relevant for the discussion, at least to me. From https://wiki.debian.org/DebianStability:

This is what Debian's Stable name means: that, once released, the operating system remains relatively unchanging over time.

> That’s an eternity for new things like Zig

So why isn't Zig making sure that their latest releases are available in Debian Sid? Anyone can be a Debian Maintainer, and if they don't want to invest their time in it, they just need an existing DM to sponsor their uploads.

Re:Debian Discusses Vendoring yet Again by josephg on Tuesday November 07, 2023 @03:08PM (#38182083)
Yeah it’s relevant. It’s just, not how a lot of software is made today. I don’t want my browser or my compiler to remain unchanged. I want it to be evergreen. Stop updating your web browser and in a year or two websites will stop working properly.

As for why don’t the zig developers become official Debian maintainers, gentoo maintainers, redhat maintainers, FreeBSD maintainers, homebrew maintainers and so on - well, probably because they’re too busy making zig. There are way too many unix package managers to support without help. Especially if doing so requires joining mailing lists, manual testing and so on. I wish there was a way to automate making all those packages across different unix distributions, but I can see why that’s a hard problem.

Re:Debian Discusses Vendoring yet Again by yjftsjthsd-h on Monday November 06, 2023 @03:46PM (#38168748)
Short answer: Yes.

Longer answer: In Debian's arrangement, the idea is that the distribution moves together, so it doesn't have a native idea of "fast moving packages on top of slow moving base packages". There are other systems where this isn't the case; AUIU you can run bleeding-edge packages on a stable FreeBSD base system (largely because the BSDs have a very strong separation of the base OS from everything on top), and NixOS is quite happy, especially with flakes but you could do it other ways, to go as far as "start with stable NixOS but then add packages X, Y, Z from unstable, and don't provide libFoo at all in a global context but provide libFoo 1.0 to package A, libFoo 2.1 to package B, and libFoo 3.0g straight from git for package C". But in Debian, the equivalent is probably running a newer version in a chroot or container, yes.

Re:Debian Discusses Vendoring yet Again by mistrial9 on Monday November 06, 2023 @11:11AM (#38164463)
script language development is not a great example for packaging patterns when you compare to the OS itself.

what is the constructive way forward? treat script language development and its packaging in a different way than OS base setup.

Re:Debian Discusses Vendoring yet Again by josephg on Monday November 06, 2023 @03:37PM (#38168618)
What does “script language development” mean? Despite the name, I’m not using JavaScript to write scripts. I’m largely writing networked server applications - which are very much a systems problem.

And rust is very much not a scripting language but it’s in exactly the same boat. Actually it’s probably worse because async and http support isn’t built in to rust’s standard library. A simple hello world web server with tokio and serde will probably have on the order of 40 dependencies in the dependency tree, not to mention rustc and cargo. How many of them do you think are in apt? Maybe none since, contra Debian’s policy, the final build result is statically linked anyway. The rust compiler doesn’t support dynamic linking of rust dependencies.

The reality is that apt simply doesn’t provide a stable, useful, modern software development ecosystem. The task of providing a “stable” version of rustc or nodejs is these days the responsibility of the rust and nodejs projects - which both have CI with incredible testing infrastructure. And the effect of that is that the latest stable versions are going to work more reliably to run real JavaScript and rust programs than whatever crusty version Debian ships.

And that disharmony between what Debian wants and what developers want causes real problems when shipping software to end users, and when deploying software to servers.

Re:Debian Discusses Vendoring yet Again by tremon on Monday November 06, 2023 @01:48PM (#38166919)
Debian is an end-user distribution, not a development tool. It bundles stable versions of software, which it releases at (somewhat) timed intervals. The Debian model of software development means that software developers target testing/sid for their new versions (and work to make sure the dependencies they need are in sid!) so that their software is automatically ready for inclusion when a new release is made.

There's two problems with that: many tools no longer have multiple development lines, which means that Debian can't keep its stable releases secure without manual backporting effort, and upstream developers don't care about getting their software in Debian. This means that Debian unstable already lags behind, as you notice, but also that the freeze-before-release takes longer than necessary. But in my view, those are mainly ecosystem problems, not just Debian problems.

Re:Debian Discusses Vendoring yet Again by paldepind2 on Monday November 06, 2023 @08:38AM (#38162397)
> One issue that I, now that you mention Javascript, is stuff like npm, but to me that more a sign of npm being badly broken by design, or at least designed for a different environment.

npm being "badly broken by design" is one opinion. But the fact is that almost all modern language tooling is moving in the direction of becoming more npm-like or has been created from the beginning with heavy npm inspiration. See for instance Rust's Cargo, Dart's Pub, Go's modules, Python's virtual env, Esy for Ocaml, and more. Developers love being able to easily manage and add dependencies, and this problem is only going to grow for Linux distributions across language ecosystems.

Re:Debian Discusses Vendoring yet Again by zozbot234 on Monday November 06, 2023 @08:53AM (#38162556)
What's "badly broken" is JavaScript development as a whole, and TypeScript provides the closest thing to a workable solution where library upgrades along semver lines can be expected to just work. Python is also a highly dynamic language, but there's also a lot less churn in that ecosystem and this does help to a large extent wrt. packaging libraries for a distribution.
Re:Debian Discusses Vendoring yet Again by mrweasel on Monday November 06, 2023 @09:13AM (#38162810)
Pythons virtualenv is old than npm. For me, I think what makes Pythons dependency management work for me is that there's a logical separation between the environment and the package managers. You create a new environment, using venv, pyenv, Conda, containers, whatever you like, doesn't matter, then you install packages into that environment, might be latest, might be a specific version, depends entirely on your needs.

Something like npm og Rubys Gem, are confusing because I have no idea where the packages went. Apparently they like somewhere in the current directory, maybe? What if I want to use the same environment and package elsewhere? I'm sure you can do it, but it doesn't seem logical to me that you don't need to specify which environment you're using. It's the same with Go, it's rather confusing where packages go, or which version, it's all squirreled away in the go command. In one way it is really nice that it just goes into the same project directory, but it's also a little confusing that your environment changes when you move directories.

For production and containers... you normally just have that one thing running, so into the global environment it goes and here using apt to install the packages also ensures security updates, well not in the containers perhaps, unless you rebuild them.

Re:Debian Discusses Vendoring yet Again by trey-jones on Monday November 06, 2023 @09:46AM (#38163309)
> It's the same with Go, it's rather confusing where packages go, or which version, it's all squirreled away in the go command

Something that was lost when we moved to modules - the system is still the same, it's just that if you never used the old system (GOPATH) or read the manual, then you might be confused about where things have gone.

Also of note is that vendoring was for a time Go's answer to dependency management and can still easily be done, and is supported by the tooling.

Re:Debian Discusses Vendoring yet Again by pmontra on Monday November 06, 2023 @09:53AM (#38163396)
If you use Ruby with rvm or asdf the gems go in a directory inside your home, named after the ruby version you are using for a given project and possibly a gemset you defined, so two projects with different dependencies but the same ruby don't interfere with each other. Or just use bundle and activate only the gems in the local Gemfile. Or use docker and put everything inside a container.

If I can complain about something is that there are so many ways to do it that I can't remember their details when I'm away from my laptop, as I am now. I think that I have at least one occurrence of all those 4 methods on my laptop, for different customers. They decide and everybody makes a different decision.

Other languages: same problems with different tools.

Re:Debian Discusses Vendoring yet Again by oblio on Monday November 06, 2023 @10:35AM (#38163946)
Or you could do the sane thing that Java/Maven did and have a classpath and have a single local repo and references just to stuff you need, without any conflicts (barring conflicts inherent to any package manager with transitive dependencies).
Re:Debian Discusses Vendoring yet Again by lmm on Monday November 06, 2023 @05:52PM (#38170310)
> Something like npm og Rubys Gem, are confusing because I have no idea where the packages went. Apparently they like somewhere in the current directory, maybe? What if I want to use the same environment and package elsewhere? I'm sure you can do it, but it doesn't seem logical to me that you don't need to specify which environment you're using.

I find the opposite - in theory the Python way might be more orthogonal, but in practice all that does is gives you more chance to shoot yourself in the foot. Realistically I never want to run project A's code in project B's environment or vice versa, and I certainly don't want to update project B's environment with project A's dependencies - combined with the fact that there's no way to undo a `pip install` command or recreate the previous state, you can permanently screw up your development environment by mixing up your terminals.

Re:Debian Discusses Vendoring yet Again by duped on Monday November 06, 2023 @08:40AM (#38162423)
If it's functioned for 25 years why does no one use it for their ecosystem?

There's a wide range of package managers in the wild that exist to help build software using features that apt fundamentally does not support because of its broken model of the universe.

Re:Debian Discusses Vendoring yet Again by edhelas on Monday November 06, 2023 @06:48AM (#38161319)
Yet its there today and still one of the more reliable packaging system and distro you can find.
Re:Debian Discusses Vendoring yet Again by lmm on Monday November 06, 2023 @06:53AM (#38161363)
I don't know anyone who uses Debian and actually sticks with their packaged apps. The most important programs they're using on their computers will be installed either from third-party repositories, or some other tool (whether that's snap/flatpak/nix/etc., or a language-specific package manager like NPM), or built from source themselves, because Debian's "native" packaged versions of everything are chronically out of date.
Re:Debian Discusses Vendoring yet Again by vehemenz on Monday November 06, 2023 @07:06AM (#38161466)
I use Debian versions of everything on my web server. I guess this means our anecdotes cancel out.
Re:Debian Discusses Vendoring yet Again by mschuster91 on Monday November 06, 2023 @07:35AM (#38161736)
> I don't know anyone who uses Debian and actually sticks with their packaged apps.

Many people in corporate, because that removes a lot of noise in "compliance" audits - show them that you have the main and security repository enabled and do regular update checks and installs, and that's it.

For me, the exception is Docker and Kubernetes, but that's easily explainable to auditors as a business need.

Re:Debian Discusses Vendoring yet Again by lmm on Monday November 06, 2023 @05:55PM (#38170340)
> For me, the exception is Docker and Kubernetes... business need.

Which I think proves my point.

Re:Debian Discusses Vendoring yet Again by worksonmine on Monday November 06, 2023 @07:06AM (#38161463)
I daily drive Debian stable and the few packages that aren't from the repositories are by choice. My most important programs are Neovim, Alacritty (for vim keybindings) and Firefox. Before Bookworm I had to build Alacritty from source but that's it and these days they're an apt install away.

I build dwm and dmenu as well but they exist in the repos if I didn't like patching them. If I go outside the repositories that's a choice, and I think hard if I really need it on my system, or maybe a VM for isolation makes more sense if I don't trust the developer.

If one needs bleeding edge everything maybe Debian isn't the right choice. Why does everything always have to cater to the masses? Let Debian be boring for those of us who love it for what it is.

Re:Debian Discusses Vendoring yet Again by jiripospisil on Monday November 06, 2023 @07:32AM (#38161692)
> Neovim

You're missing almost 1.5 years of bug fixes then (Bookworm+Unstable 0.7.2, Jun 26, 2022; Neovim stable 0.9.4, Oct 9, 2023). LSP support in particular has gotten much better in the meantime.

> If one needs bleeding edge everything maybe Debian isn't the right choice.

Stable versions are not bleeding edge.

Re:Debian Discusses Vendoring yet Again by worksonmine on Monday November 06, 2023 @07:44AM (#38161841)
> You're missing almost 1.5 years of bug fixes the

No I'm not, I used vanilla vim without LSP until Bram (R.I.P) decided to write another vimscript, too much NIH for my taste. I'm fine with what I use and have my workflow. I'm considering trying out how Flatpaks work for me for the isolation though.

I do use Docker and even the occasional VM for complex environments and don't notice any difference in my use.

> Stable versions are not bleeding edge

Bleeding edge as in latest features.

Re:Debian Discusses Vendoring yet Again by Roark66 on Monday November 06, 2023 @07:07AM (#38161476)
Depends what do you consider "most important". For me the most important is the kernel, the xorg, the WM, the infrastructure so to speak. And then if I run an app image on top with let's say Freecad, I don't mind.

I'd have run it anyway, because I want the latest software without of the disadvantages of keeping my entire distro rolling.

Also I make use of running software in docker a lot.

Re:Debian Discusses Vendoring yet Again by lmm on Monday November 06, 2023 @07:21AM (#38161579)
> For me the most important is the kernel, the xorg, the WM, the infrastructure so to speak. And then if I run an app image on top with let's say Freecad, I don't mind.

The way I see it Freecad - the thing that you're actually doing something with on the computer - is the point, the kernel and all the rest of it are just there to support that.

> Also I make use of running software in docker a lot.

Yeah, I didn't put it in my list but that's another one I see a lot.

Re:Debian Discusses Vendoring yet Again by huggingmouth on Monday November 06, 2023 @08:07AM (#38162082)
I use debian for work and never install anything outside their official repos unless it's not packaged or is unmaintained.

Debian's stability is legendary and well deserved.

Re:Debian Discusses Vendoring yet Again by ExoticPearTree on Monday November 06, 2023 @09:14AM (#38162825)
Maybe for your specific use - yes. And maybe your place of work only runs stable distributions for many years.

But I have a feeling for the vast majority of people this is why snap was invented, to not be stuck on old software for a few years.

Re:Debian Discusses Vendoring yet Again by bee_rider on Monday November 06, 2023 @09:31AM (#38163068)
The comment you responded to has lots of siblings.
Re:Debian Discusses Vendoring yet Again by ExoticPearTree on Monday November 06, 2023 @01:22PM (#38166493)
I am not sure what you mean, but when I responded it was a single commet, no replies.
Re:Debian Discusses Vendoring yet Again by bee_rider on Monday November 06, 2023 @02:02PM (#38167142)
Siblings, as in comments at the same level in the comment tree. A bunch of other people have responded to the original comment starting with:

> I don't know anyone who uses Debian and actually sticks with their packaged apps.

With various indications that they more or less actually do stick to the packaged apps.

Re:Debian Discusses Vendoring yet Again by ExoticPearTree on Monday November 06, 2023 @03:53PM (#38168841)
Oh, you could have said so.

Anyway, I for one don’t think that staying with for example nginx for two years on the same version is a good idea. Even if they fix security issues, you still miss out on features.

And this is for lots of other packages.

Re:Debian Discusses Vendoring yet Again by huggingmouth on Sunday November 19, 2023 @01:06AM (#38329622)
It's a tradeoff between stability and new features. You obviously favor features, we favor stability. It's as simple as that.
Re:Debian Discusses Vendoring yet Again by lmm on Monday November 06, 2023 @05:53PM (#38170322)
> I use debian for work and never install anything outside their official repos unless it's not packaged or is unmaintained.

So you're saying you do install things outside their official repos, because their official repos don't package or maintain everything you want to use?

Re:Debian Discusses Vendoring yet Again by huggingmouth on Sunday November 19, 2023 @01:04AM (#38329611)
Yes, but think application services like gitlab or matrix servers. I don't recall ever installing any forign system-level package.
Re:Debian Discusses Vendoring yet Again by wolletd on Monday November 06, 2023 @08:29AM (#38162322)
Especially for Linux, not everything is a desktop system. I have Debian installations running on embedded machines in the ten thousands.

Besides our custom kernel modules and business applications, Debian has everything these systems need and more.

I find it way cooler to use Debian on embedded systems rather than some buildroot, because it's a widely available and reproducible environment and debugging and development tools are an "apt install" away.

Re:Debian Discusses Vendoring yet Again by lmm on Monday November 06, 2023 @06:01PM (#38170426)
> Besides our custom kernel modules and business applications, Debian has everything these systems need and more.

The thing is that even in embedded, people are starting to see the value of using libraries when writing those business applications, and they end up being the same libraries that parts of the base system will use. So either you need to align how the OS approaches those libraries with how the developer wants to, or you need a user-friendly way to have OS-managed versions and developer-managed versions coexist. Current Debian does neither of those things.

Re:Debian Discusses Vendoring yet Again by hnfong on Monday November 06, 2023 @11:00AM (#38164300)
That's the tradeoff Debian users consciously make. And it's a good one IMHO. Not sure why you make it sound like a bad thing.

For the stuff that you really _need_ to have the latest version, you have options to install it yourself. For the rest of the system, if you don't care about having the latest updates, you get a relatively stable system that doesn't potentially change every other week.

Of course some people do prefer having the whole system on the bleeding edge -- in which case Debian is obviously not for them, and there are many other distributions that cater to their needs. But the people who use Debian made a conscious choice to keep most of the system "stable" except for the important programs that they know well enough to "maintain" the latest versions themselves.

Re:Debian Discusses Vendoring yet Again by lmm on Tuesday November 07, 2023 @11:10PM (#38186687)
> For the stuff that you really _need_ to have the latest version, you have options to install it yourself. For the rest of the system, if you don't care about having the latest updates, you get a relatively stable system that doesn't potentially change every other week.

Those options exist, but Debian doesn't really support or steer people towards them. IMO their approach compares pretty poorly to e.g. FreeBSD where you have an explicit packages/ports split and support for using ports. (E.g. installing a newer version of an application on Debian is relatively easy, but if that application needs a library then it becomes quite hard, to the point that people resort to vendoring or static builds in one form or another)

Re:Debian Discusses Vendoring yet Again by binkHN on Monday November 06, 2023 @02:33PM (#38167653)
This is on point for Stable releases of Debian and is working as intended. However, there are many of us that run the Testing or Unstable releases of Debian. While this might not be the ideal way to run Debian, it is a way to run Debian with far more modern packages. While it's not a rolling release like other distributions, it is slightly closer to to this with, perhaps, slightly less risk compared to a rolling release.
Re:Debian Discusses Vendoring yet Again by Barrin92 on Monday November 06, 2023 @06:58AM (#38161400)
I wish Opensuse's Build Service gained more traction. Automated, reproducible builds for most distributions, itself open source etc. One of the many underrated tools in the ecosystem.
Re:Debian Discusses Vendoring yet Again by hedora on Monday November 06, 2023 @09:28AM (#38163016)
Back when I wrote a lot of Perl code, I limited myself to the debian packages, since they were tested and API stability was enforced by the debian team. It was missing a few packages, but they were either niche or low quality.

CPAN was untested garbage by comparison. (In the same way that pip is today.)

Re:Debian Discusses Vendoring yet Again by rollcat on Monday November 06, 2023 @10:50AM (#38164161)
It's what OpenBSD ports have been doing for npm packages for a while, until they eventually gave up and just told people to install using npm.

There are very strong arguments for both approaches. Some people will tell you to use a version of a library in your distro's repo, because it's been vetted by a third party. It's nice to be able to choose an OS/distro that fits your needs.

Re:Debian Discusses Vendoring yet Again by curt15 on Monday November 06, 2023 @12:47PM (#38165913)
Besides the obvious people scaling problem, trying to create a deb package per pip package or rust crate will also explode the size of the apt metadata to download.