The best kittens, technology, and video games blog in the world.

Showing posts with label gentoo. Show all posts
Showing posts with label gentoo. Show all posts

Friday, May 19, 2006

Beating a dead Gentoo


You thought I'm done with Gentoo bashing ? You thought wrong. Unfortunately they delayed a new Ubuntu release till June, so expect a few more posts about Gentoo before I can finally get away from it.

So first, automerging configuration changes broke at least 2 packages - apache and dictd. Both are kinda funny - Gentoo version of Apache is the only version ever made in which one cannot reload the configuration without stopping Apache first. Well, the Gentoo guys got a bright idea that instead of using regular configuration files, it's better to have configuration in /etc/conf.d/apache2, and pass that to the Apache server when it starts. Of course those files, unlike the regular Apache configuration, won't get reloaded on /etc/init.d/apache2 reload. Oh yeah, and they decided to break the configuration files on automerging and not even save a backup of the files before the automerge. That's one of the candidates for the biggest Gentoo annoyance, and the competition here is very tought.

And it broke dictd. Well, it got an idea that it should switch from Unicode to C. A short information for the dictd package maintainers - dictd does not work at all unless it's run in UTF-8 locale. The damn error message in /var/log/messages even tell me to switch to UTF-8 locale because dictd doesn't work in locale C. And does the unicode USE flag mean anything ? Not much apparently.

Let's forget the configuration mess for a moment. I wanted to check out high level languages for JVM. To my surprise, jRuby, Jython and Groovy were all available in portage. Wow, I thought, I doubt even Debian has them all, now Gentoo finally has a chance to shine. And guess what ? Not a single of them was installable. I even emerge sync'ed, but it didn't help any.

jRuby:


BUILD FAILED
java.lang.UnsupportedClassVersionError: org/apache/bsf/BSFManager (Unsupported major.minor version 49.0)


Jython:

>>> Compiling source in /var/tmp/portage/jython-2.1-r6/work/jython-2.1 ...
org/python/util/ReadlineConsole.java:23: cannot access org.gnu.readline.ReadlineLibrary
bad class file: /usr/share/libreadline-java/lib/libreadline-java.jar(org/gnu/readline/ReadlineLibrary.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
Readline.load(ReadlineLibrary.byName(backingLib));


and a similar one for Groovy.

Just one last thing. Among the broken packages are pam-login and shadow. Should I uninstall them both and break the system in hope that the new versions compile correctly (and I don't have to login in the meantime) ?

# emerge -av pam-login shadow

These are the packages that would be merged, in order:

Calculating dependencies... done!
[blocks B ] sys-apps/pam-login (is blocking sys-apps/shadow-4.0.15-r1)
[blocks B ] >=sys-apps/shadow-4.0.14-r2 (is blocking sys-apps/pam-login-4.0.14)
[ebuild U ] sys-apps/shadow-4.0.15-r1 [4.0.7-r4] USE="nls pam -nousuid -skey" 1,264 kB
[ebuild U ] sys-apps/pam-login-4.0.14 [3.17] USE="nls -livecd -skey%" 1,217 kB

Monday, May 15, 2006

Gentoo upgrade


(A cute image from CuteOverload for about as much particular reason as the last time)

So it spite of all the ranting about Gentoo being essentially impossible to upgrate, I tried to upgrade it. By going over the list of the packages and selecting those that were upgradable by hand, but I did it. Well, sort of ^_^.

And now I'll tell you what happened during the upgrade. First I rsynced the portage tree and svn-up'ed an "overlay" (equivalent of an extra repository in Debian) with Eclipse. That is, I did an equivalent of apt-get update.
Now every time I run emerge it tells me something about a parse error in one of the Eclipse ebuilds, but it doesn't seem to have any ill effects so let's skip that.

As full upgrade is impossible, I did some emerge magic, like emerge -about -seven -options -pasted -from -#gentoo -on -freenode that was supposed to tell me what can I upgrade. Of course it didn't work. It thinks that my version of mod_php is bad and I need to uninstall my mod_php and install a different mod_php if I want to keep using Gentoo. I still don't get it how mod_php is related to portage but anyway.

On the other hand emerge --pretend --update --newuse world did work, well kinda. It showed a list of packages that weren't 100% new, and I could hand pick from this list the ones that I wanted upgraded. About 200 package upgrades ones, two days and 3 emerge crashes (can't compile this or that) later, the system was it a kinda more up-to-date state. I even felt like maybe I was overreacting a little the last time. Then I rebooted ...

Now something came that I've never seen in Debian, even with all the unstable and experimental packages. The upgrades broke the configuration files ! lo interface was down, /etc/init.d/net.lo start gave a parse error, oh and half of the thing did not work because lo was down. I kinda remembered that I'm supposed to run etc-update after each upgrade. etc-update "automerged trivial changes" to about 20 configuration files and gave me a list of 49 others that I was supposed to merge by hand ! Well, /etc/init.d/net.lo was on the list so I just told it to use the new version from the package. Now lo works and I have only 48 broken config files on the system.

Was it over ? Not at all. svn was down because of library issues. Oh yeah, I'm supposed to reinstall all packages that use library X after I upgrade library X (like I ranted before about Perl and Python). Upgrading svn fixed it.

Now the funny thing, Gentoo has an automatic fixer. One just have to say revdep-rebuild, and it goes through the system, finds all executables with broken library dependencies, and reinstalls their packages. Now, it found that KDE ioslave for SVN is broken. However, it could not reistall KDE because the old version was not in portage any more, and I couldn't upgrade to the the new KDE because of some unrelated broken dependency on libfaad2. So I'll have to live with broken SVN ioslave in KDE. But I'm not complaining, compared to other problems I've had with Gentoo a broken ioslave is like a flu added to a cancer.

Summary for users of Debian and other sane systems - Gentoo is like Windows 98, you're not supposed to upgrade it, it is far easier to backup your /home, format your hard drive and reinstall it from scratch. Or switch back to Debian, what I plan to do as soon as possible.

Friday, May 12, 2006

apt-get upgrade


(this is pretty rantish, don't read if you're easily offended. I added the hamster pic from CuteOverload for no particular reason ^_^)

I've seen quite a few Linuces in my life. Most of the time I used Debian (unstable or later testing) or something based on Debian (kUbuntu). However, needing new Eclipse/Firefox/(million other things that weren't in anything Debian-based at that time) and having kinda broken my Ubuntu by mixing it with too many packages from Debian unstable, I decided to give Gentoo a try.

The good things



The most important one - Gentoo packages stuff much faster than Debian. Usually it has more and more recent packages than Debian, but there are a few exceptions (like dictd dictionaries).

Also, Gentoo has nice online documentation, Gentooers on IRC are usually more friendly and clueful than the average.

Lack of global packager lock is nice - I can install a small package in the middle of major system upgrade. In Debian, I had to wait for the upgrade to finish.

The not-so-good things



Initial install wasn't that bad. Sure it took about ten times longer than with other distros, but that's ok.

There are many quirks that are annoying but passable, like:

  • extremely minimalistic default USE flags. Right now I have 131 USE flags set. I'm not kidding you, here's the full list: 3dnow 3dnowext 7zip X a52 aac accessibility alsa apache2 asf avi bash-completion berkdb blas browserplugin bzip2 cairo canna cdparanoia chasen cjk crypt curl dba divx4linux doc dv dvd dvdread emacs encode esd examples exif fam fame fastcgi fftw firefox flac glitz gnutls gs gsl guile haskell imagemagick immqt-bc ipv6 ithreads jack java javascript jbig jce joystick jpeg jpeg2k kde kerberos krb4 latex ldap matroska mmap mmx mmxext mono mozdevelop mozilla mozsvg mp3 mpeg mplayer musicbrainz mysql network nls nodrm nptl nsplugin nvidia odbc offensive ogg opengl pdf perl php png postgres python quicktime rar real rtc ruby samba sasl sdl slang spell sql sqlite sqlite3 sse ssl subtitles subversion svg symlink tcltk tetex theora threads tiff truetype unicode usb utf8 visualization vorbis win32codecs wmf xanim xine xml xml2 xprint xvid zlib. Why the heck 90% of them are needed totally loses me. If someone doesn't want png support, they should be the ones to have to explicitly say it. It completely breaks the "Zero Config" principle.
  • Upgrading Perl (or Python etc.) means one has to reemerge all Perl libs by hand, or they won't be available in the new version. So emerge perl can break various installed programs. I think there is a message about that somewhere in the emerge output, but when more than one package is being upgraded at the same time, it will be lost in the flood of compiler messages.
  • Lack of testing-like distribution. It's either x86 (kinda like Debian stable) or ~x86 (kinda like the original Debian unstable, before they got testing). So either I have to put up with very old packages or accept a high possibility of random breakages. Many ebuilds from ~x86 did not build on my system.
  • Upgrades are really slow. Compiling is about 100 times slower than installing a binary package.


The bad thing



Gentoo doesn't have apt-get upgrade.

Gentoo does have emerge --av --update --newuse world, but it's not even close. It's about as far behind apt-get upgrade as Turbo Pascal is behind Ruby.

Now, the Gentooers (and Turbo Pascal users) deserve some explanation, as they probably don't believe me the difference is so big. So here it is.

apt-get upgrade checks all the packages in the system. Then, it checks those packages that can be upgraded without either breaking/uninstalling anything or installing anything fancy (other than trivial package rearrangment). Then it downloads and installs the upgrades. In the end, you have an upgraded system, and the packages that couldn't upgrade automatically are simply left in their original state. You can even add apt-get upgrade to the crontab. Every once in a while you spend about 30 seconds dealing with the packages apt doesn't upgrade automatically (which of course don't block the rest of the upgrade).

Let's compare it with emerge --av --update --newuse world. It checks all the packages in the system. Then it checks those packages that can be upgraded. So far so good. Now, if anything looks out of order - it tells you that it won't upgrade anything and thet you can go to hell. It cannot upgrade X, you have to uninstall them and install the new X. Because everything is being compiled on install, compilation can fail and it often does with ~x86. It can break your system (see above about Perl libraries). It takes forever, using a lot of CPU cycles. I don't think even one person has it added to crontab. Most Gentooers seem to have awfully out-of-date systems in spite of Gentoo packages often being more up-to-date than Debian's.

Now, excuse my rant and go back using your favourite distribution, whatever it is. I was simply annoyed by emerge and had to write something to calm down. ^_^