Gentoo Linux 2022 Retrospective
gentoo.org
gentoo.org
On Nix either the install - and occasional build - succeeds and I enter the new environment, or it fails and I don't. In the worst case scenario where the build succeeds but something is funky I can just roll it back.
Now I have all this free time to lose to the time sink that is learning how to package applications in the Nix language.
One of the best aspects of Gentoo is how easy it is to understand its working parts (portage, openrc), and to customize/modify a working system. This is in contrast to, e.g., Debian/Ubuntu, which I used for years, and which bring in a lot more complexity to do the same things.
I'll also admit that while the theory of Nix always seemed to hold promise, I've never actually went through with installing it as a distro on a base system. To me, the premise of Nix---essentially, that it can provide an abstraction of pristine system state transitions---doesn't seem to mesh with the reality of physical computer systems; which is to say, state and mutability are not bugs, but features of your computer.
On source-based/"ports"-style package management: I think the way to approach portage is to put yourself in the role of a sysadmin in charge of maintaining a set of Gentoo installations. So, if you want binary packages, you will need to ensure it is set up right yourself (possibly using portage's own binpkg tools, or some other way). There's a certain DIY/rugged-individualism to this approach; but the design and implementation of Gentoo enable and encourage opening the engine hood.
Similar thoughts about Nix too. Messed around with it in limited ways but it's not a good match for how I like to run my systems and I don't find the extra layer of complexity to be a good enough trade-off.
Frankly I am a bit surprised that I am still on Gentoo after all these years (decades), you'd think that something better[1] would come along. But if it's out there I have yet to find it.
[1] ...better for my personal preferences and use cases
We uniformly agreed that mutating machine code and source code (git) is a bad idea — why should our system’s binaries/configs be any different?
I don't _think_ I've encountered any such thing in the past 10+ years, but my assumption of what you mean might be incorrect.
(Other than rebuilding the three(!) copies of Chromium I have installed on my desktop, I don't remember encountering any notable packaging-related time sinks since the days of that nasty libpng upgrade way back when. IIRC, it was some terrible breaking change after an upgrade to 1.2 or 1.4 or some shit.)
Basically, portage only ensures package consistency at the start and the end of a portage package transaction (upgrade, install, removal). Anywhere in the middle, if anything fails, or your package upgrades take too damn long and you need to use your system in the meantime, the programs you use can be subtly broken.
This is especially painful when upgrading between ecosystems of packages with modules that are version-bound to eachother. Think for example python upgrade, Qt upgrades and KDE upgrades, that will simply not run until the entire stack has finished upgrading.
This is a problem that many distributions deal with, but the chances of failure in binary distributions are much smaller, and the time taken between the two states wherein your system is "consistent" is significantly shorter.
It'd be nice if portage was able to use a temporary system to build packages in, and only install onto the running system once everything has finished upgrading. Unfortunately, designing machinery for this is complicated, and most veteran gentoo users will suggest you use a chroot or a separate system to build packages for the system you're using.
As you mention, this is true of every major Linux distro out there. In fact, in the nearly twenty years (ugh) that I've been using Gentoo, the only upgrade troubles I've run into are
* Temporary KDE screen locker problems (that is, the screen locker thinking it's "broken" and instructing me on how to manually unlock the session. (It didn't used to do this, and it was better when it didn't, because it would actually work.))
* Other KDE issues that are always solvable by some combination of restarting 'plasmashell' or 'kded'. (I'm super glad that both of those programs have a '--replace' flag. (And I haven't seen these particular problems in a very long time.))
* Firefox noticing that it got upgraded and refusing to let me work with anything that kicks off a new process
> ...most veteran gentoo users will suggest you use a chroot or a separate system to build packages for the system you're using.
Wild. I definitely fit the criteria for "veteran Gentoo user", and I would never, ever suggest that as a way to avoid the problem you're talking about.
AIUI, it won't work, or will be _complicated_ to set up (as programs not-infrequently need to build against new versions of libs, so you must _install_ those library packages in order to correctly build the packages that require them), or is identical to a binpkg build box (which -last I checked- was only encouraged if you had either a _very_ underpowered machine as your daily driver and a beefy build-box somewhere, or many, many systems that all could make use of the same set of packages, so saving time and power by having those packages built only once made sense).
EDIT: I looked at your forum post. I think you're inferring _way_ too much from the fact that two people that the forum software has given the tag 'Veteran' suggested "building in a chroot and then copying the packages over" (which closer inspection reveals to be either an overly-complicated binpkg build box, or a binpkg build box running in a chroot), and "set up a binpkg build box". Two people recommending this to you as a possible solution is _not_ "most" of the userbase... and the forum software's rating of them has no direct bearing on how good of a Gentoo admin they are. (I'm pretty sure the forum software still rates me as a "Newbie", as I've only ever made like four or ten posts. Most of my conversation happened over email, IRC, and the bug tracker.)
The rank shouldn't be seen as a qualifier of how much you know about the distribution.
> ...most veteran gentoo users will suggest you use...
That's doesn't really agree with the claim that
> ...[I didn't claim that] most gentoo users actually maintain their systems like that.
You can build binaries for all of the packages that need to be updated by running the normal update command and adding "--buildpkgonly".
This is an interesting problem for sure. I don't know enough about portage internals to know whether it could be fixed easily, but it would be very nice to have.
So far I haven't really ran into any consistency issues caused by non-atomic upgrades. The only thing that comes to mind is needing to restart a zsh instance that was running during an upgrade that included it, and Firefox will sometimes tell me it needs to restart!
I have a fairly fast CPU (ryzen 3900x) so the time spent in an inconsistent state is probably much shorter than it is for others, I suppose this is why it's never bothered me before.
Turns out I really like the ability to decide to just randomly edit some file to fix an issue, and also shellscripts.
Or even worse - the source code itself
If you build on the same machine you use it and there are no other machines it is mostly pointless. It should not come as a surprise that Yocto's bitbake was inspired by Portage. Other fun fact: ChromeOS is built on top of Portage.
The trauma of that experience has left me with WSL as my sole Linux PC at home.
A masked package is generally caused by something not being stabilized yet, which can be fixed by adding the package to the package.accept_keywords file.
Sometimes a package with known issues, such as security vulnerabilities will also be masked. These can also be installed by adding the package to the package.unmask file.
Your issues were caused by not reading the documentation and taking advice from random people on forums. Ironically portage will actually tell you what you need to do to unmask a package if you read it's output too!
I hope this doesn't come off as too rude, but it's wrong to blame the distro for your misuse of it, especially when there are heaps of documentation and help messages in the output!
Out of curiosity, what is your use case for this particular Gentoo install? 15+ years is a long time to keep the same machine running.
Physically there is nothing left of the original hardware as it has gone through many generations of part replacements, Ship of Theseus style. It's the OS image that has survived through all this. My /home which I keep separate is another 10 years older.
Th only thing that sometimes requires a bit of elbow grease is the update process (emerge @world) which can throw up large lists of "blockers", especially when some major component changes (like say the transition from python2 to python3). "eselect news" gives ample warning beforehand.
This is the reason I never advise new linux users to use it, but I also don't see myself using any different distribution.
With all but the most popular hardware you are pretty much on your own. It usually drops down to getting some debian drivers and understanding your system. It's all doable, but it's time consuming.
Still I don't think any distribution comes close to being so well organized and nice overall. It seems to take security seriously. It's just too bad that it became so unpopular. It's really hard to use it to a full potential without becoming a contributor nowadays. Which is fine if that's what you want to do but there are times when you want your OS to be your tool not your hobby. With more popularity it could be a very productive tool.
If you want server grade stability and Debian/Ubuntu-like feel, then go with Debian. Basic install is quite clean (not gentoo/arch level but very clean compared to *buntu).
I really, really, really wanted to be able to recommend Ubuntu, and for a long while it was REALLY good, so I could. But then something happened inside Canonical, (I guess they turned into clowns?) and they started releasing software that would just break _bad_ on upgrade. (In fact, had I not spent so much time developing my sysadmin skills with Gentoo, I would have been unable to recover from the upgrade problems I ran into.)
Upgrading Ubuntu LTS scars me and CentOS just wasn’t upgradable at all.
That was the last time I used Ubuntu.
> ... after all if you need the compiler is it that painful to run `apt install -y build-essential`?
No, of course not. But that's when it became obvious to me that I was not the target audience for that distribution, and had switched to Gentoo shortly after.
Not mentioned: Gentoo Prefix project is useful for managing a Gentoo installation that is at a path other than /. We use it for building our Linux development environment.
See [1] to give it a try. Warning! It will compile almost everything so it's going to take a bit of time!
[1]: https://wiki.gentoo.org/wiki/Project:Prefix/Bootstrap#Perfor...
Still, good to see that it's still around, and there's an active community! I might even install it on some box I've got lying around.
Is there a solution to cache the build artefacts and/or share them between a fleet of machines?
(inb4 nix)
Yea, it's miserable to wait on building QT, or Boost to name a few. And, a while back I think emerged something that required Rust, so it wanted to build the version of llvm used to build rust, and then build rust. No thanks, rust-bin will do just fine for me.
I have a hetzner server that compiles ~all packages (ports) 24x7, optimized and customized for home and the business machines (Laptops, Servers(x64 and arm64), Workstations and jail-templates(x64 and arm64)) for two FreeBSD versions 12.x and 13.x RELEASE.
Then on the machines i point the pkg-repo to it (the hetzner-server) and install it as binary pkg's ala ArchLinux.
[1]
As an old Gentoo Dev, its remarkable to see so many people giving love to this project. Too bad it lost popularity over the years but it has a very special place in my heart. I don't have any machine currently running Gentoo for many reasons but i'm sure sooner or later will find a machine to make some rice, -funroll-loops and relive some good moments from my youth.
RedHat wanted to install X for an update to mpg123 and that was the end for me.
It was also super annoying to have to constantly keep updating or risk system breakage when you finally did try to update. That meant that my computer had to virtually never stop compiling to keep up with the endless updates. It was a complete waste of power, compute resources, and wear on my computer's components.
I hate to admit it, but switching to a binary-only distro made almost all these headaches go away.
I miss having the flexibility of Gentoo, but I don't miss endlessly compiling from source.
If you are not a "power user" perhaps gentoo is not for you. I teach at a uni, and feel like if you are not a developer, perhaps most modern linux distros are for you... but if you are a developer, then perhaps something like Gentoo or Arch might be a good fit. NOT because you will be doing more work, but because a lot of the others are going towards spoon-fed operating systems that make too many choices for you, or phone home / make search suggestions too much for you.
OTOH, perhaps you can stop emerging bloated apps. Or get something newer than a "old laptop". No one said you should recompile every dang linux package on machine that has a slower than everything else storage and bus because it is portable. Recall, you normally sacrifice for portability.
I hope you continue to use linux, no matter the flavor, and to each his own, but I think many comments here are along the same thread: "I tried this free thing, where I could design it myself, build it all myself, and it was _work_ and I did not like it", when in reality the idea is "you have ultimate control, and it will cost you a little _work_, are you OK with that?"
The only solution I found was to compile another kernel with the correct extensions loaded and put a big fan under the laptop during that process.
Anyway, the situation was really funny for my coworkers but I learnt a lot of things thanks to Gentoo.
I wound up writing a cronjob that does "echo 1 > no_turbo" every minute... although it only really needs to be done once per boot, or every time you plug/unplug.
I also built my own kernel as Gentoo favors that. I remember tailoring the kernel to my hardware (picking only the kernel modules needed to my peripherals), my resulting kernel was about 2 MB in size, while the corresponding kernels at that time for Ubuntu or Fedora were around 20 MB (because they need to blindly include all peripherals which any user may have) that meant 18 MB less memory in RAM permanently (good for embedded and systems with constrained memory).
After some years I end up switching to Fedora because I could not spend so much free time just maintaining my Gentoo distro (it's fun and you have so much control over your distro, but at the expense of more time spent on that).
I've been using Gentoo on the server and every sync I pray that something doesn't change so that I'll have to spend a day dealing with the broken crap of package manager.
Otoh my provider increased the server cost by 10 eur/ month so I'm recompiling packages just to drive up its energy cost, previously I did only necessary updates, now I'm running wild with compling weekly. Freaking Hetzner. 13 year old hardware renting for full price.
Anyhow I wouldn't do Gentoo on the server again, but I'm stuck with it now, as it pretty much runs everything, mail, git, all kinds of databases, over 50 domains... If cloud wasn't so expensive compared I would've had a vps for each project. But migrating to cloud would cost 4 times as much and I'd have way less storage.
Anyhow I digress, one of those days ... I'll habe to unweed my system so that depclean doesn't remove half the installed packages.
I don't know what "the server" is referring to but this almost feels irresponsible. If it is your personal server that's great but I can't remember a time I've been in a position professionally (where time is a resource/of the essence/being billed/we're up against a clock for a deadline) where tinkering at the distribution configuration level was ever a good idea.
It's not irresponsible, I'm not a scrub and I won't be indirectly insulted.
I particularly enjoy the liveGUI iso and the clang as system compiler.
RIP Griz64
What is the rationale behind this?
Now Clang is an option, too.
OpenRC, https://wiki.gentoo.org/wiki/OpenRC
Thanks
I dislike systemd as much as the next person who's gotten burned in production by systemd "quirks", but the correct epithet is "Poetteringware". systemd predates Poettering's hire by Microsoft, and Poettering's projects have a very particular style to them.
(Namely, when they break, they break _badly_ and provide effectively-zero information to help you understand what went wrong and how to fix it... and advocates for the project that's giving you grief today either dismiss your questions as anti-$PROJECT FUD, or are just as helpless to understand why you're running into trouble as you are.)
The specifics of the systemd breakage were subtle, complex, undocumented, and came out as part of working on proprietary software at my day job... so even if I could remember enough about the particulars to satisfy you, I'm not sure if my NDAs would permit me to talk about it.
I do remember the NetworkManager breakage that caused me to notice that just using wpa_supplicant and friends was more than good enough, and the PulseAudio breakage that made me realize how much easier setting up jackd was than attempting to understand what was going wrong with PulseAudio.
NetworkManager: For some damn reason, the software wouldn't stop attempting to assign an MTU of zero to my interfaces that had IPv6 enabled. This caused them to get the smallest-permitted MTU (IIRC, something like 1260), and -IIRC- some rather loud complaining in the logs. I found the relevant bug report, noticed the quality of developer conversation surrounding it, and decided to find alternatives. I did... wpa_supplicant + wpa_gui/wpa_cli for my wireless interfaces and the built-in Gentoo networking config files for my wired interface (which -in practice- means "use dhcpcd to get an IPv4 address, and SLAAC to get an IPv6 address").
PulseAudio: For some reason, after a PA upgrade, it started adding in an unpredictable and variable > 100ms of latency to my audio. This required manual adjustment to mplayer playback. Burned a long time (a week? more?) verifying that the problem was just in PA, and attempting to find out what might be causing it and how to fix it. PulseAudio users were utterly unhelpful. Decided to try using jackd, which -though initially difficult to understand- I found to be far, far easier to learn to configure and troubleshoot than PulseAudio.
I've found that with Poetteringware, you're a fan... right up until the point at which it breaks and leaves you with effectively-zero information on what is going wrong and how to fix it, and/or you have a "use case" that the devs don't want to go to the trouble of handling. (This latter thing is often accompanied by assertions that the thing you want to do is a totally invalid thing that noone in their right mind would ever do, so do go away now.)
> and advocates for the project that's giving you grief today either dismiss your questions as anti-$PROJECT FUD, or
How about NFS shares that need to explicitly closed lest both server and client get stuck forever when trying to shut down later leading to a laptop needing to call the server via ssh when the lid is closed to initiate this because anything else is inexplicably broken for no reason discernible?
https://forum.garudalinux.org/t/during-boot-i-have-to-wait-a...
https://www.reddit.com/r/linuxquestions/comments/3vc526/how_...
Okay; in my last job, servers would randomly get stuck shutting down, as far as we could ever tell because systemd was getting stuck in some sort of circular dependency.
Even in insert current year.
Here's the bug if anyone is interested: https://bugs.gentoo.org/724314
Used to be Clang was faster than gcc (both compiling and the apps generated), but according to Wikipedia they now trade blows.
Some people are very much against the GPL. I don’t know why they put corporate interests over users interests. I assume it’s a cousin to “temporarily embarrassed millionaire” thought processes.
N=1, I like it when people make non-GNU systems work because I'm the kind of pendant who firmly believes that GNU!=Linux is a real and important distinction, and building Linux distros that aren't GNU forces the point. Unfortunately it appears that Gentoo relies on GNU coreutils, so this is just a baby step in that direction. On the other hand, Gentoo happily runs a prefix install on a lot of things that aren't Linux, and they have historically even run fully on a FreeBSD kernel, so they're still contributing from the other direction (Gentoo GNU/kFreeBSD, I guess). For nonGNU/Linux, Alpine is the reigning champion and Chimera looks super promising, but I'd love to see Gentoo as a good option.