Gentoo, 8 months and on.

This article has been long pending. LONG Pending. It’s been almost 8 months since I shifted over to Gentoo. I’ve had a huge number of confusions, goof-ups, troubles, horrors. It’s been whacky to say the least. But I had expected this. It’s no way near the regular Linux experience you’ve had.

I’ll begin with the (really short and stupid) list of reasons I shifted from Arch Linux, my faithful, never betraying Arch Linux:

  • Gentoo is basically, Linux nirvana (there’s a comic about this). You would never feel more close to your Linux (except if you’re running an LFS, which wasn’t that practical a thing for me, given that my time is limited).
  • I wanted to stick a Powered by Gentoo Linux sticker I had on my laptop. :)
  • Had been 8 months since I tried a new Linux :)
  • I had heard a lot about it’s package manager Portage. A really powerful and massively complex (at least for me) piece of code. More on this later.

Lot’s of different systems in use are basically developed off Gentoo. For instance, Chrome OS used in Chromebooks is developed on Gentoo to ensure system stability, and later stripped off of portage. The same stands for CoreOS, Knopperdisk, and many others listed here.

The upsides of using Gentoo

That is, other than Portage. Gentoo quite much changed the way how thought about Linux.

May the source be with you!

The single biggest advantage (and also the disadvantage) is that all packages are compiled from source. How’s this useful, you ask?

Here’s a scenario. You are working on a project, which requires php 5.5, but your distro officially has php 7 (Example: Arch, or Ubuntu 16.04). Let’s see what’s going to happen in various distros (Assuming they had php 7 in their stable repositories):

  • Ubuntu You try to install an older version. Find an older .deb file, and install it with dpkg -i I believe.
  • Debian Same as above.
  • Arch Finding an older binary is itself an issue. You either have it in your portage cache, and you hold the package version. Or, you install it from source / AUR. Well.
  • Fedora Mix of all the above. Not really sure about this.

Now there’s one issue which all the above fail to tackle. Since you’re using php 5.5, other packages also need to know that. Sadly, since the package repositories are stabilized according to php 7, and all binaries were compiled according to that. Now you suddenly have downgraded your php. There’s the issue! They’ll simply assume php to be the normal one, and function. The moment there’s some call which depended on php 7, they’re going to crash.

Gentoo tackles this issue by compiling everything from source. So, if you want to downgrade php, it’ll let you, and also calculate which other packages depend on a recent php. Along with downgrading php, it’ll also recompile those packages with support for php 5.5. There’s some incredible work behind the curtains, but the end effect is that you get a really stable system, however much you tinker with package versionings.

Of note, Arch allows source based installs, but they are very sketchy, more of a way to allow packages to progress fast rather than a way to manage package compatibility.

I hear you like to USE Flags?

Apart from this, Gentoo has this concept of USE Flags. They are basically feature flags. To explain, I’ll provide another scenario. Assume you are running a system based on GNOME. Of course there’s no point having KDE features in your packages. A regular binary based distro will just put in the generic binary for you, riddled with all non-essential features as well.

In Gentoo, you would declare beforehand what all features you want your system to have, and what all should not be. Its as simple as USE="gnome systemd -kde -openrc ...".

This will tell the package manager (did I mention portage?) to ensure all the packages in the system adhere to these rules, unless overridden otherwise. Even with overrides, you cannot break your system, and it’ll ensure that those overrides cannot break the package consistency.

Scratch?

A scary thing, you build Gentoo from scratch up. You just get a bare installation with GCC etc, and you build up from that, without a GUI (Graphical User Interface) to begin with. It’s fun, and really exciting. Gets that hacker mode on as well. Well Arch does qualify for this too, so do a few others.

Gentoo Wiki

Perhaps not as good as Arch’s, but the Gentoo Wiki is certainly very detailed and helpful. While using Gentoo you tend to find solutions, rather than search Stack Overflow. This itself is a very good learning experience.

The downsides?

Honestly, compiling takes ages. And compiling every single package is certainly time consuming. Regular upgrades take quite some times. Thankfully, most huge packages have binary versions aswell, for example Firefox (which takes more than half an hour to build usually).

Another issue is that Gentoo usually needs some careful maintainence. You need to figure out some version conflicts at times, which can be fairly complicated. It’s not rocket science, but it sometimes isn’t easy.

Conclusion

There are some things which I wish Gentoo had implemented. There are other things which are really good in other operating systems, like the super fast installations in Arch (I used to time them and show off). But once you get to tinkering with multiple packages all the time, you’re going to need some proper package mananagement.

Going anywhere from Gentoo is going to be a hard choice, if I ever make it. It has a really nice developer community, and quite a lot of support online as well.

Oh did I mention, we have a Gentoo mirror inside IIT Kanpur? It’s here! So download times are not bottlenecks (they were anyway not going to be, thanks to the compile times).