by howdydoo · 4y ago · 0 comments
On Windows, you can just `scoop install ripgrep fzf jq` and you're in business. And updating all installed packages is one command away.
Meanwhile on Debian, the system packages are often years out of date. So authors have started making their own custom install scripts [1], or just telling you to `curl` the binary into /usr/bin [2]. To update these manually-curled binaries you need to run a different set of steps for every one. There's no way to list outdated apps, and there's no easy way to update everything.
On top of that, many apps I use aren't even packaged (k9s, broot are two random ones I just found). Sometimes you can find a third-party repo, but that's yet another person you rely on to get updates. Whereas with scoop, it fetches straight from the source, so there's never any waiting.
Is there some alternative to `apt` that everyone is using? Or how do people generally deal with this?
Debian goes for stable versions during a release and backports security patches. It's one of their main design philosophies. It really shines for boxes you want to run something for years with minimal maintenance.
Get arch, manjaro or another rolling distro and you'll have what you want :)
Or perhaps Ubuntu which is Debian based, but they put a lot of effort into decoupling the OS packages and libs from third party software using snap. It does have some drawbacks though like launching speed and integration. Personally I go the rolling way for my daily drivers.
Snap is a nonstarter for me for many reasons. Startup speed is important for shell pipelines, and also it's insane to bundle that much stuff just to run a statically-linked binary. And it wouldn't even solve the version problem, it looks like ripgrep on Snap is two years old. https://snapcraft.io/ripgrep
It looks like manjaro is the most recommended arch distro so I'll give it a try.
That's a good point, but it's kind of part of the structure of a traditional linux system. Every library is provided only once in the system. Also, the line between what is "the OS" and "the userland apps" tends to be pretty blurry on Linux.
It has big advantages too. That libSSL vulnerability? apt dist-upgrade and all your apps that use it are patched. No need for each app developer to incorporate it. And the dynamic shared memory can do the things it's supposed to. Great for efficiency.
Solutions like snap indeed trade off that efficiency and single point of patching for easier deployment by devs, but it has too many drawbacks for me too. Though snap is exceptionally bad in terms of startup speed compared to FlatPak and AppImage so perhaps you could look at a distro that does that.
Actually, Fedora may be better for your usecase. Assuming no proprietary drivers are required, it's a very simple install process, and tends to keep quite up to date software while remaining more stable than Arch.
But indeed Debian has a very different perception of the term 'stable' than Arch.
But seriously: Arch-based or Fedora is what you want. They’re up to date.
# /etc/apt/preferences
Package: *
Pin: release o=Debian Backports,a=bullseye-backports
Pin-Priority: 500
Package: *
Pin: release o=Debian,a=stable
Pin-Priority: 100
Package: *
Pin: release o=Debian,a=testing
Pin-Priority: 98
Package: *
Pin: release o=Debian,a=unstable
Pin-Priority: 50
Then: $ apt-cache policy ripgrep fzf jq
ripgrep:
Installed: (none)
Candidate: 12.1.1-1+b1
Version table:
13.0.0-2 98
50 http://ftp.us.debian.org/debian unstable/main amd64 Packages
98 http://ftp.us.debian.org/debian testing/main amd64 Packages
12.1.1-1+b1 100
100 http://deb.debian.org/debian bullseye/main amd64 Packages
fzf:
Installed: (none)
Candidate: 0.24.3-1+b6
Version table:
0.29.0-1 98
50 http://ftp.us.debian.org/debian unstable/main amd64 Packages
98 http://ftp.us.debian.org/debian testing/main amd64 Packages
0.24.3-1+b6 100
100 http://deb.debian.org/debian bullseye/main amd64 Packages
jq:
Installed: 1.6-2.1
Candidate: 1.6-2.1
Version table:
*** 1.6-2.1 100
100 http://deb.debian.org/debian bullseye/main amd64 Packages
50 http://ftp.us.debian.org/debian unstable/main amd64 Packages
98 http://ftp.us.debian.org/debian testing/main amd64 Packages
100 /var/lib/dpkg/status
PS. Don't curl into /usr/bin, the distro owns that. Downloads go to $HOME/bin or /usr/local/bin.Personally, I just use Nix plus a Home Manager "flake". [2] It's completely self-contained so on any new computer I can install Nix, then build this flake manifest and have my entire developer environment ready to go in a few minutes. Having clean installed or adopted so many computers, at home or work, I have become obsessed with the fewest number of steps to productive environment.
Sure is something is new or under heavy develoent it might be an issue but having a 3 year old version of jq vs a 3 day old version has rarely come up for me.
With that said you have plenty of choice:
Flatpacks provide the latest versions of lots of things.
Homebrew is available for Linux (I have never tried it)
Don't use Debian as many people have already suggested
Compile yourself/manage your own version. Like people have been doing for decades.
For this while I would highly suggest putting things in `~/bin` or `/opt` and adding it to your $PATH, never put things in `/usr/bin`, that's is what apt manages and you could easily shoot yourself in the foot if you fuck about there.
I absolutely agree that manually installing software leads to a maintainability nightmare.
How does scoop solve the problem? Is it simply by moving faster (which one could do with the less stable Debian repos), or is it doing something like isolating all shared dependencies for every package (I know this is in style these days, but I'm not a huge fan of it).
> How does scoop solve the problem?
It skips intermediate packaging steps and goes directly to the source. e.g. if the author publishes on GitHub, Scoop will request `github.com/ripgrep/releases/latest` (or whatever) and then download `ripgrep-$version.exe`. It has very primitive dependency handling, but I don't think that matters because I mostly install Go/Rust tools which are statically linked.
I honenstly think it's a genius solution. There's no wait time for updates, and you don't have to trust whatever user created the package on every version update.
Debian stable is not a good desktop OS.
For example I see that Scoop runs best with "portable" apps and links directly to those third-party binary web resources. But what does the Scoop ecosystem do about third-party platforms that require special compile-time flags? Typically that's where a third-party repo maintainer would come in.
I guess that's ironic to hear considering my original question, but I appreciate a different update cadence between the OS (I want LTS, stable) and things like `ripgrep`, which if there's a bug, it won't keep me from booting my system and I can just downgrade if I notice it.
Been using arch for ~5 years. Maybe once a year something goes funky and I have to check the news page to see if any manual interventions are required.
They give you the exact command to run most (all?) of the time.
a bit complicated at first sight but if you value your freedom and is a poweruser then it is the panacea, and you can do this on any linux or unices...
alternatively nix,
Remember apt packages have a rigorous review process. Scoop installs every program in user space, which is very good, but it’s nothing like what apt’s review process offers. The comparison on convenience alone is naive.
I think scoop is really nice. It’s a near perfect solution for the problem it solves, but the only problem it solves is convenience, and you’re still stuck using Windows.
Ultimately, I’ve found the most hassle-free solution is a default Ubuntu installation with a maintained dotfiles repo that has a ./scripts directory to document installation methods when necessary.
Or, do one better and make Dockerfiles for your dev environments and barely install anything on your local machine.
I am tempted by Manjaro, but I generally like to stick to the beaten path as much as possible so I don’t run into too many snags that slow me down.