247 points · by jackhalford · 6y ago · 335 comments
I wonder if there are others who support this opinion that desktop Unix has very complicated future unless complex apps will begin to bundle their own libraries.
It's funny, from your point of view having a centralized repository with a (usually) single (usually) latest version of a library is a bad thing that may be (and probably isn't) justified by the goal of saving space.
From my point of view having a centralized repository with a (usually) single (usually) latest version of a library is an awesome thing that I would leave any other ecosystem to get, and the space savings is just a bonus that doesn't much matter.
Most dependency maintainers don't provide updates for more than a few versions of their software. When one piece of software depends on -latest and another piece of software depends on -legacy, you can ship both with the central repository model. In the Linux distributions I've used this is a solved problem. Arch Linux has five different versions of the JRE that are separately installable.
This reasoning assumes that future versions of software are always better. This is certainly not the case. I would like that a working program does not spontaneusly break because a third party "upgrades", thus introducing a new bug. I am willing to give up anything else to be assured that working programs continue to work no matter what.
The conversation in the two posts you replied to isn't about whether you always want to be on the bleeding edge all the time, it's about whether it makes sense to have a centralized repository that contains the latest version on some supported channel, which isn't necessarily the same thing as the latest -nightly. I take the position that it is; that shipping a (potentially) different version of a library with every application is a bad approach which is often less secure and harder to maintain.
To counter with anecdata: I've been running Arch Linux testing repositories for over a year now with no issues whatsoever.
Also, personally I've stuck with Arch Linux for 6-7 years now because it's the first distribution I found that consistently works for me, so I don't know that anecdotes will get us very far either way.
So, your comment is 180 degrees off the mark. Arch exists for people who don't want breakages to happen.
(On the other hand, if you're conditioned by Windows to reinstall the system every year, then Ubuntu might work fine for you.)
I think the main issue/benefit with arch linux is that it wont try to do anything for you, except give you extra instructions for when a package change requires "manual intervention".
I put that in quotes because I don't think of that as breakage, I think of that as normal upkeep. We'll, as long as it's listed.
Anyway, the implications are that things can be stable longer on arch because there is no magic under the hood. But there will be times (though I haven't experienced it myself), where something unexpectedly breaks, and it'll be hard to recover unless you know what your doing... though maybe it's actually easy with the rolling back packages? The package manage does keep copies of old versions of packages, I've just never needed them.
As an example if this, my co worker and I have very similar thinkpad laptops. His graphics start doing wierd things that hes has to go fix after every update (Fedora or Ubuntu, can't remember). I took 4+ hours to get mine working how I want, with research and experimentation, but nothing has broke it since.
You may want to check out Nix. It's a package manager which isolates each program's dependencies; so you can have multiple versions of the same package.
> or a security fix
having a centralized repository like this helps in case a it's a library that needs a security fix, because you only need a single update to apply the fix to all applications. Applications that bundle their own deps (including Docker images) will need to publish their own update with the updated version of the lib.
In principle true, yes. But it comes with a cost. Even the nixpkgs Firefox maintainers are considering to only ship Firefox ESR starting with NixOS 20.03:
https://discourse.nixos.org/t/firefox-on-19-09-could-be-mark...
Nix is a fantastic concept, and I hope it takes over the world. But the NixOS packages are a mess. I tried it for a few months last year before giving up after several packages and even whole collections of packages became unusable even in the stable repository. The repository needs some serious reworking before Nix can really shine.
If you allow every application to choose its own version then they all choose a different one, which means someone then has to continue to maintain every different version of the library separately. Doing that isn't much if any of a reduction in workload compared with getting every application to use the version the distribution ships, and is much more likely to end up with a situation where dozens of versions of the same library exist and half of them are broken in some way.
The better solution is for libraries to only break compatibility between major versions. Then the packager can ship some suitably recent minor version for each major version of the library, at most two or three major versions are supported at any given time which keeps the maintenance overhead feasible, and every application can successfully link against one of those major versions or another.
[2] https://guix.gnu.org/manual/en/html_node/Reduced-Binary-Seed...
I think that's because Snap is also meant to be used in IOT where disk space is limited but it definitely should be optional on work machines with lots of disk space.
I fully agree with what OpenBSD has decided, I think the only thing worse that compiling Firefox is Gnome 3 :)
Threads have nothing to do with that and don't increase memory usage due to dependencies.
I also think that large projects should just vendor their dependencies, including compilers, so you git clone the thing, type "bazel build", and have a working binary. (I am fine if the dependencies are not checked in to the repository, a bazel WORKSPACE file is fine with me. It records a checksum for all dependencies, so even if you reach out to the Internet to get it, you get the same bytes as the developers working on the code.)
Building and distributing software should be very simple. But it's not, because of an accumulation of legacy tools (shared libraries) and practices ("please install these 6000 dependencies to build our project").
If you're saying "your distribution can't automatically update you if libc is vulnerable to something", that's true. More CPU time is required to react to major vulnerabilities, as everything has to be recompiled. However, it's not much CPU time, and the downsides of requiring more compute time are lower than the upsides of knowing exactly where your dependencies come from. And having your "getting started" instructions be "1) install bazel 2) bazel run //your:binary".
My point here is to be able to install a new package when it's out, without disrupting the whole environment. For FreeBSD, for example, the new Firefox is already available. I have installed it, and it wouldn't run. I had to auto-update 300 MB of other stuff, including LibreOffice, PyCharm and even TeXLive, to get the system up to date for the new Firefox to be able to run.
For example, Chromium. Any BSD developer would know that attempting to upstream their port there is dead in the water. AFAICT, They Chromium devs only care about Win, Mac, Linux and nothing else. Likewise for Firefox, which is why the BSDs don't get official releases.
I feel some sympathy for OSes like the BSDs that for "some" software they are limited by the arrogance of other open-source maintainers who would rather go for maintaining the convoluted distros and testing with a huge disintegrated software-stack than testing a single unified OS which the BSDs maintain themselves.
Firefox does maintain ports for the BSDs. https://bugzilla.mozilla.org/show_bug.cgi?id=1598511, an OpenBSD-only issue, was fixed less than a month ago.
The BSDs qualify as "Tier 3" in Mozilla's build terminology, which means that the onus is on external contributors to identify problems and propose fixes, as there is no continuous integration support for these architectures.
In other words, Firefox doesn't maintain the port for OpenBSD, OpenBSD developers do.
We mostly don't want official releases, we prefer our package managers.
Firefox is absolutely not like Chromium, Mozilla is very good at accepting patches and the upstream repo pretty much always works on FreeBSD. Just git/hg clone and ./mach build and here it is.
However, the default way an AppStream is made eschews parallel installation support.
Red Hat will make parallel-installable AppStreams whenever it is needed. And they can incorporate the content of one AppStream in another if need be.
It's a good idea in general, and it would be cool to solve this problem, but modular "streams" as they currently exist have so many edge cases that I don't really suggest using them if you can avoid it.
The whole "centralized, trusted repository that has all your apps" system is wrong at a fundamental level.
The way shared libraries are used in Linux is built upon the assumption that package managers and centralized repositories are the right way to do things.
I've done it both ways. Centralized works a LOT better. It's not even close.
You get a more stable system, and you get security bugs fixed faster, and more reliably.
What you lose is access to the "latest and greatest", because it takes time for the new stuff to filter in. And that's OK.
Depends on the distro. Archlinux is pretty fast to update packages.
The work done in Nix and Guix is interesting in this regard.
I don't want a middleman, I want to get my programs from the developer, and store them using the tools I know (regular files on a filesystem).
Are package managers easy to use (most of the time)? Yes.
Are package managers (as they exist today) a universal, well designed way to distribute software? No, because they impose a middleman.
As a Debian user, I appreciate that the stuff I install had at least gone through some minimal vetting first. And if I have to add a third party repository or download something myself to run, I'm much more likely to view that as the possibly-dangerous action that it is, and try to actively assess the reputation and trustworthiness of what I'm installing.
That's certainly not an average, noon-technical user thing, though. Vetted app stores are there to help average users avoid malware, assuming they're doing their job properly.
You assert that, but is that really true? Updating "stable" distro should be non-event, the very opposite of disruptive.
Imagine you're rolling out *nix 5000 endpoints; change is going to make the problem hard, so the idea is stables ABI/APIs should be the same, so it can like a platform you can build against.
The problem is, browsers pretty much have to be the latest versions, or websites won't work, and most hardware improvements are going to need a new kernel (which to be fair, given linus don't break user space position, is a probably safer than updating userspace), so it doesn't necessarily work for all use cases.
A common approach in webdev has been to keep current, but run a test suite so you know what breaks, and deal with it when it happens, but I don't think the average infrastructure person has kept up with web dev here, and unless you're running containers, you're probably still on a stable OS.
(The problem with bundling isn't disk space, but composition. Individual applications can compose fine, but libraries can't if they link other libraries at different versions, and use those library's types (ABI) in their own interface (ABI). To solve this problem you need to distinguish between public vs private dependencies in your package manager.)
Oh good, I'm not the only one thinking about this:) My last idea was basically "run nix on top of a BSD (replacing the package manager), then make nix package(s) for the base system". Which sounds doable, actually.
> praying my Python and other projects survive [...]
And this is exactly why I never update. Every 10 years or so I go through the pain of installing a new version of the OS, mostly because the browser no longer works on most websites. But then, now that the web becomes more and more uninteresting to me, I might as well keep the current version until the hardware breaks down.
Security? Sure, but not at the cost of ruining half of my installed software on a regular basis!
If there was a statically linked version of BSD, I would switch to it in the blink of an eye.
(I’m trying to do something similar by downgrading to an old version of macOS more-or-less permanently, because I don’t like where the platform has gone.)
[1]: https://appimage.org
I really feel it should support containerisation in a similar way as Flatpak does. In my opinion, the idea that any application on your system can can touch all your files and access all your other applications is really problematic. You're always just one broken (intentionally or not) application form having your entire system compromised.
As best as I can tell, the only solutions that even tries to address this is Qubes OS and Flatpak.
Nowadays (for almost 20 years actually), Windows supports and encourages programs to deploy their dependencies in their own folder.
It is trivial to do for developers and works perfectly for users.
Some people claim security updates are a problem, but many apps do not deal with untrusted input for starters. For those that do, like browsers, servers or your office suite, you really should be using one that is supported and updated automatically.
In contrast on linux I have exactly one updater and can be certain my software uses the fixed version. I don't care about disk space saving or RAM savings (though those are nice), I care that stuff gets fixed and is secure. If you don't enforce that you trade convenience (for the developers, not the user) for security.
EDIT: And of course for security reasons - but then you only upgrade the affected player and not huge parts of your installed base. What I want to say - this is all about the ruling design philosophy.
This is really sad. It seems that we are moving from the complexity of shared libraries to the complexity of "docker images" and the like, where the whole OS is embedded in each program for convenience. The sweet spot of static executables has been shamefully bypassed.
I think that there is in general no technical problem to have multiple versions of the same library installed (files in /usr/lib are versioned anyway and for other data the libraries can be compiled with prefix including version).
Then, package system could handle different major/minor versions of libraries as different entities, handle upgrade of major/minor versions through dependencies from installed/upgraded packages, and only upgrade library directly for patch-version change (i.e. security bugfix).
In such setup, there would be several instances of a popular library installed on a system, but not say hundreds partial instances statically compiled-in to applications. And it still allows simple updates of libraries for patch fixes.
I have no problems with the standard approach. Actually, it makes me feel safe: a maintainer fixes a vulnerability in a shared library and all apps are fixed. If all apps shipped their own libraries I'd have to download a new version of all apps, if they ever care to fix their code.
The specific notice mentions rust dependencies. Rust does not have shared libraries, so a Rust [security] update means all rust binaries must be completely rebuilt. That seems to be part of OpenBSD's concern, and perhaps this has "triggered" the poster.
user blackhaz random forum post found:
> mariourk, you're definitely not alone. The same breakage happens to FreeBSD desktops as well. I have been vocal around the forum a few times about this. Not every desktop user wants to upgrade all their packages every X months. The way the default repositories are structured, the upgrades are forced onto users. I am a huge proponent of using application bundles, like on Mac OS, as quite often those upgrades break complex desktop apps too. I don't mind upgrades but sometimes I need to stick with a specific version of software, or roll back after something went wrong, and if it came as a bundle with its own dependencies, it wouldn't have to depend on other stuff that is being "force-upgraded" periodically.
So his complaint is about the way FBSD handles updates; he is generally incorrect about shared libraries; and his comment is completely OT for this thread.
You mean you aren't familiar with Python's virtual environment system exactly intended for isolating development dependencies from system ones but you're blaming the distribution. Please.
Even virtualenvs themselves can cause the breakage. Take "pylibtiff". It embeds a copy of libtiff. But, it's old and incompatible with other libraries on the base system. This can be libraries it depends upon, or it could be another copy of the same library. Either way, virtualenvs can cause more problems than they solve.
If you want to use multiple versions of Python and pin them, you should use something like asdf [1] and its Python plugin [2]. It's a version manager with support for many languages and more. I used it for Elixir, Node, PHP, Ruby and even PostgreSQL (I need different database versions in different projects.) I never used it for Python because I'm OK with being on the latest version so far.
With asdf I would expect to do something like this
asdf install python 3.7.5
mkdir my375project
cd my375project
asdf local python 3.7.5 # pick the version to use here
python3 -m venv py375 --python=~/.asdf/installs/python/3.7.5/bin/python
~/.virtualenvs/py375/bin/activate
This virtualenv is going to stay on 3.7.5 forever.I heard it can tolerate two different applications using different versions of the same dependency...
I use this not as my main browser, but only when I can't avoid visiting "the wild web", meaning unknown or untrusted sites, or even sites that use too much javascript for me to feel safe allowing in my main browser.
Firefox, Libreoffice and others big applications typically take a long time to compile because they have so much stuff built-in instead of depending on the system libs. They gain a lot of stability and predictability but you can have dependent libs with security issues too.
I spoke to the gentoo firefox package maintainer last night. He even has firefox building on aarch64 with musl, so things are pretty good. For more common targets, there's also the option of using the official binaries from Mozilla.
Gentoo policy is to attempt to provide a way to use system libraries where possible except when those libraries are too heavily modified. If something breaks, they use the bundled package. You can see that's currently happening with harfbuzz in firefox until they bringup the patch: https://github.com/gentoo/gentoo/blob/master/www-client/fire...
From experience, it's usually fine to use system libs when available unless those system libs are unstable or development releases. Then all bets are off.
Can anyone explain what is behind? Is it symptomatic for any programs with those dependency? Especially curious about rust because it seems to be hyped very much lately (I have almost zero rust experience and even less bias about it, just being curious)
Which honestly sounds like a totally awesome and legit reason to use -esr. Keep -current current with upstream, stable branch gets patches from firefox-esr.
Keep in mind stable patches to the ports tree are pretty rare on OpenBSD. They didn't do them as binary packages until fairly recently, either.
The security patch is actually quite severe and has been reported to be in active use.
https://www.mozilla.org/en-US/security/advisories/mfsa2020-0...
https://www.cisecurity.org/advisory/vulnerability-in-mozilla...
In a stable branch you want the size of changes to be small and targeted despite how severe the issue is. You don't want to take on new bugs from patches that aren't related to issues you want to see fixed.
Modern packaging has changed the approach to bundle dependencies-- using more disk space and bandwidth but isolating apps from each other and allowing independent upgrade cycles. Flatpak and Snap work like that and the title wave of interest in containers on servers is related, as server containers are also used to isolate dependency stacks.
Flatpak and Snap are Linux-specific, though. If the BSDs had a comparable solution to package GUI apps along with their dependencies, I presume that Firefox would be one of the first apps to get that treatment.
That way, the users always have working applications. Some applications may take more time to be up to date with their dependencies, but at least some of them can be updated asap without worrying about the others.
For example, I use Debian 10 stable on my laptop, on which I installed Snapd. I then installed Firefox with Snap, and I can be confident that Firefox will have the latest security updates, while keeping the system stable (some parts of the system are probably unsecure, but at least everything still work, they will be updated later)
Although, I would like to point that, while the storage space issue is solved with current tech, the bandwidth is still an issue when on mobile data.
The fast releae cycle of Rust might not help though.
now if the complaint is solely about rust, not specifically FF, then that's a different story. it might indeed be that FF is the only package using Rust right now?
If you don't know about Pledge and Unveil you can think of it as similar to Firejail sandboxing from Linux but on steroids. It dynamically limits the types of kernel calls and filesystem addresses a process can make use of so if a rogue thread causes a process to perform an illegal operation under the Pledge rules OpenBSD will kill the process with SIGTERM. Whats more Pledge and Unveil allow the process to execute whatever calls are needed when the program initializes itself but it will relinquish the privilege to run those calls for the remainder of the program's runtime once it no longer needs them (after init).
- Firefox is hard to package so they won't package it (on stable).
- OpenBSD-current users are not affected as firefox has already been committed.
- Firefox-ESR is still maintained.
> (thanks to cbindgen and rust dependencies) on the stable branch (as this would require testing all rust consumers)
Can someone explain what they mean with this? What have other non firefox rust consumers to do with firefox being packaged?
The best guess I have is that to package firefox they need to package cbindgen and rust. And if they package cbindgen and rust officially all packages using it would now need to be tested as now (potentially) all their dependencies have been packaged?? But this seems strange TBH.
EDIT: So I guess they still will package Firefox-ESR on stable? Which will have (or maybe already has) all that dependencies, too? So it's just about having to do that packaging less often?
Through I wonder a bit why they don't automate the tests (maybe the computation cost?). (E.g. rust automatically runs the tests of all libraries/programs published on crates.io to find regressions, through that takes a day or so to complete).
Now what?
Spend two weeks investigating all the test failures? Backporting updates to these packages as well, all while users are patiently waiting for their Firefox to have its zero‐day fixed? Are the tests even correct? Were they failing before and nobody noticed?
And all this to only get automated tests passing. Any regressions in behavior not tested are not noticed (or more likely, noticed by users much later, requiring further investigation at that point in time to narrow down the Rust backport as the cause).
In the meantime, this packager’s work on other OpenBSD packages in -current (what most OpenBSD developers actually use day‐to‐day) completely stops.
That’s some insight into the mindset of a software packager. Non‐security backports to language runtimes are a serious maintenance burden.
[0] https://support.mozilla.org/en-US/kb/switch-to-firefox-exten...
No.
Building a good browser is hard. Typically you can get something "safer" (from a privacy/business model perspective) and/or "simpler" (from a development perspective) relatively easily - see KHTML and other niche efforts. But when it comes to "more secure" while supporting modern web features, you need a lot of skilled eyeballs on code and a lot of people trying to break things. You achieve that either with tons of visibility, or with tons of money. Those small projects have neither. Mozilla has both.
Brave and Vivaldi are still forks of Chromium, Waterfox is a fork of Firefox. Thus you are not going to find any updated alternatives like those on the BSDs anytime soon.
Meanwhile, WebKit-based browsers doesn't seem to suffer from the overuse of dependencies and multiple languages nor does it have packaging hell unlike Chromium and Firefox.
why is that?
I don't think there is a viable alternative to Firefox unless you accept a simple web experience and use eg w3m
My biggest problem with most browsers is tied to how they handle tab management and lacks basic features that should be there without installing an extension.
Example - stacking, auto closing, filter, finder etc. Not hiding tabs after certain number of them.
edit: more info here at https://vivaldi.com/features/tab-management/
It's basically a lightweight interface to webkit. There's only so light one can go, however; a browser basically ships an entire rendering stack and big chunks of an OS, and with all the weird features and backwards compatibility issues that have accumulated, one can only go so small.
KDE has "Falkon".
Both are quite good.
Blocks all trackers, fingerprinting and mining scripts by default, based on Chromium. Built-in IPFS, Webtorrent and Tor: https://brave.com/
Pale Moon and the like aren't just ancient Firefox code. And without all the 'features' Firefox keeps adding in that are irrelevant to a browser that renders html and executes JS they're just as secure.
The up shot is Pale Moon's maintainers decided they don't trust Let's Encrypt for spurious reasons. But if you use Pale Moon you've probably never noticed this because Let's Encrypt is cross-signed, and so even though Pale Moon claims not to trust them, the cross-signature makes everything still work because they didn't intervene.
So that's a bad decision, combined with total incompetence to produce the appearance where everything looks fine.
That's exactly the sort of thing in a browser that should make people run away screaming.
In the years that followed Pale Moon wanted to keep StartSSL (the outfit which straight up lied to us about issuing clearly bogus certificates for money, Pale Moon's maintainers apparently feel that this shows "integrity") and described Mozilla's distrust decision as a "foot gun". How did that work out? Oh right, it turns out that everybody else doesn't trust liars either and so Pale Moon eventually went along with this because as others explained in practice they're mostly just applying patches blind to core Firefox subsystems like NSS.
1. https://www.palemoon.org/technical.shtml
2. https://wiki.hyperbola.info/doku.php?id=en:project:iceweasel...
Please, prove it.
1. https://www.palemoon.org/releasenotes.shtml
In the C/C++ world, you specify the language version using a flag passed to the compiler. e.g. -std=c++98
In most other programming languages, you specify language version by installing multiple copies of the compiler/interpreter and running the corresponding version.
The C/C++ way works fine if your language spec is updated once every 3 years. It does not work fine for anything much more frequent than that. Until recently C and C++ were popular enough that the other approach didn't need to be accommodated. Now it does.
It's true that C/C++ compilers usually have a flag that gates language features. However, you're still using the same libc not matter which standard you've picked. For example, there were some changes made to format strings in C99, like parsing hexadecimal numbers with scanf. If you have a C99 libc, you'll always get that behavior, even if you specified "-std=c89".
https://doc.rust-lang.org/nightly/edition-guide/editions/cre...
Every new version of the Rust compiler brings changes to the language, so the language you're actually using depends on the tuple (compiler version, edition), not just on the edition.
But you are correct to point out that old Rust editions will get new language features if they do not break existing code.
https://hacks.mozilla.org/2018/12/rust-2018-is-here/
The release process claims that the changes in new Rust releases are purely additive and backward compatible; the only exception is soundness fixes, which I'd expect affect a negligible amount of code.
Also broken is maintaining multiple packages that package multiple versions of the same package with combinations of external, frequently changing platform packages like rubygems that are packaged manually. Multiple versions of the same package should share common recipe declarations as much possible and be managed more cleanly. Native extensions should be built automatically in CI/CD using polling or notifications rather than manual methods that too often lead to outdated, vulnerable dependencies and create too much pointless, repetitious busywork.
- it's much bigger and resourceful than openbsd maintainers.
- it decided to adopt this fancy update policy, and instead of making it easy/seamless, left it up to the whole open source community to play catch up.
Well played.
If you are maintaining a large number of machines in an enterprise environment, you're not keen on updating half of the installed system just because you update your browser, simply because the necessary testing and fixing of regressions costs a lot of time and money for no real gain for both users and administrators.
Have you ever heard of any program requiring a 6-weeks-old-or-newer version of GCC or Clang, and failing to build on older ones?
"Stable" is just a name -- Rust stable is anything but.