Monday, March 5, 2007

gentoo domination postponed

Gentoo has been my favorite distribution for some time (found my first post on gentoo forums around 18th March 2002). Before that I was switching between RedHat, Suse and Mandrake based on the current level of applications that came with it. Later, I started to compile packages from source (because the most recent version was not in the repository yet). This had led me to the LFS (Linux From Scratch) and I learned a lot there. I'm not sure about current status of LFS, but it was sometimes pain to have it up to date and not break when something basic needed update. Then I saw post from Daniel Robbins (the father of gentoo) and quickly realized Gentoo is all I need.
Great support, innovative, excellent documentation and perfect source of skills and knowledge for all Unix admins. Gentoo brings some BSD ideas (ports) to Linux. User compiles the whole system from scratch with possibility to customize the system on a level that I didn't see in any other distribution yet all that in fully automated form.
Gentoo is great for servers. Through past few years I've learned how to maintain Linux Desktop as well, but there are other distributions that focus on End user and they do their work much better (e.g. Ubuntu Linux). One thing I think is not finished in Gentoo is the handling of binary packages. Binary packages becomes handy when one have to maintain multiple servers. Why to compile the same package on all servers and waste CPU time (lets cool the planet!) on this redundant task? Sometimes (mainly when we talk about security) it is desired to have gcc removed and perform update of machine via pre-compiled packages. Emerge can handle this (sharing the PKGDIR over network) but with flaws.
  • metada - when central machine creates new package and store it on the shared drive, there is no way to notify slave machines to update its metada file about packages. I believe we solved this by also installing http server on the core machine and using PORTAGE_BINHOST variable on the slave machines. We still utilize shared drive for /usr/portage and /srv/packages as PKGDIR (eliminating the download of binary packages).
  • USE flags - this seems to be bigger issue we haven't find solution yet. Generally, packages can use this variable to determine additional functionality provided by the package (i.e. linking to Qt, Kde and not GNOME and vice versa). Sometimes it is handy to compile apache with LDAP USE flag and sometimes not. However both binary packages have very same name (e.g. apache-2.0.58-r2.tbz2) and what USE flags were used is determined after the package was downloaded and unpacked (too late) and then update is failing on machines based on their package.use settings.
I haven't found any clever idea how to solve the issue yet. Perhaps different naming convention for use flags in binary packages is needed and server daemon running on core machine. Client machine would then ask the Core machine for binary package with specific USE flags and Core would either look it up in its repository or compile. This would rock, really. Gentoo domination would be unstoppable, until then it is postponed.

Today when I was surfing the web to see whether paludis (C++ replacement for emerge) is handling things differently I discovered that Daniel Robbins is coming back to gentoo. Congratulations and welcome back, you've made my life a lot easier (maybe not easier, but definitely more enjoyable ). Rock on!

No comments: