[LUG.ro] El pinguino francés se la banca....! ;-)

lugro@lugro.org.ar lugro@lugro.org.ar
Mon, 27 Oct 2003 11:52:32 -0300


The Great Package Management Experiment
September 24, 2003 
This article was contributed by Ladislav Bodnar 
Last week's Revisiting RPM Package Management in the distribution section of LWN was quickly followed by a heated debate about software management in various distributions. Predictably, the discussion soon evolved into a full-scale "distro war", where each distribution was vigorously defended by its respective vocal fans. This heated feedback resulted in an attempt to conduct a practical experiment. It will examine the package management tools in five major binary Linux distributions (Debian, Mandrake, Red Hat, Slackware, SuSE) and provide examples of 1) installing a package not officially supplied by the distribution itself and 2) upgrading the entire distribution to a newer version. Without any further ado, let's get on with the show, in alphabetical order. 

Debian GNU/Linux 

I chose MPlayer for the test of installing a third-party package. MPlayer is a popular media player for Linux, but most distributions do not supply it due to potential legal issues with certain codecs included in the package. Debian is no exception. Luckily, visiting apt-get.org and typing "mplayer" into the site's search engine reveals the availability of MPlayer from a number of unofficial repositories, as well as instructions for adding the repository to one's sources.list. In case of Debian Woody, this is a simple matter of adding 'deb http://marillat.free.fr stable main' to /etc/apt/sources.list, then executing the following: 

    apt-get update
    apt-get install mplayer

That's all to it, MPlayer is now installed and ready for use. 

As far as upgrading the Debian distribution to the latest version, this is done with a single command: 

    apt-get dist-upgrade

This is a well-tested, well-documented and reliable procedure for upgrading a Debian system. The ease of package installation (whether native or third-party) and system upgrades are often considered to be some of the most pleasant aspects of using Debian GNU/Linux and this is hard to argue. Overall score (on a scale from 1 to 10): third-party package installation: 10, distribution upgrade: 10. 

Mandrake Linux 

Like Debian, Mandrake does not supply MPlayer as part of the distribution. A quick trip to Penguin Liberation Front (PLF) reveals availability of the package, together with instructions on how to add the necessary sources to Mandrake's package manager - urpmi. The site also provides a well-designed three-step wizard, which enables users to specify a Mandrake version, select official Mandrake mirrors and choose to add other third-party repositories, such as PLF itself, Texstar's RPMs and Java RPMs. The wizard outputs a number of urpmi.addmedia commands that need to be executed from the command line - a simple copying and pasting those into the Konsole does the trick. As soon as the execution completes, MPlayer can be installed with: 

    urpmi mplayer
    uprmi mplayer-gui

The first command gives an option to choose between a stable or development version of MPlayer, which is followed by a prompt to confirm installation of dependent files. Mandrake's package manager then goes on to fetch and install all the necessary files. In the test, everything installed flawlessly and typing "gmplayer" on the command line launched MPlayer in its full glory. 

That was nice, but let's try something more challenging - such as updating the entire distribution. At the time of the experiment, Mandrake Linux 9.2 was not yet released, but the distribution's development branch called "Cooker" was very close to what the final Mandrake 9.2 would look like, sans some last minute bug fixes. I followed the instructions in Cooker HOWTO and How to Upgrade Mandrake, updated the urpmi sources to point to a fast local mirror and executed the following commands: 

    urpmi.update -a
    urpmi --auto-select --no-verify-rpm --auto
    urpmi kernel

The entire upgrade procedure was a surprisingly pleasant experience. All completed without a single hitch and when I rebooted the system, I found myself in a brand new Mandrake Linux 9.2, almost final. Comparing the upgrade process to Debian, the only downside is that three commands are needed to upgrade Mandrake, as opposed to a single command for upgrading Debian. The overall score: third-party package installation: 10, distribution upgrade: 9. 

Red Hat Linux 

Red Hat Linux 9's only package updating tool with dependency resolution is up2date. This was primarily designed for updating an existing installation with critical bug fixes and security patches, rather than as a general purpose package management tool. It is not possible to add third-party repositories to up2date and non-subscribers require to fill in a lengthy registration form every few months. But even paying subscribers have reported frequent failures to connect to up2date servers shortly after Red Hat's security advisories. 

Currently, there are two third-party tools with dependency resolution capabilities for Red Hat Linux - apt-get and yum. For the MPlayer installation experiment, I settled on apt, which is trivial to set up on any recent Red Hat installation - a quick trip to freshrpms.net was all that was required to download the relevant RPM package and install it manually. Afterward, installing MPlayer and all of its dependencies was also a no-brainer: 

    apt-get install mplayer

As soon as the installation process completed, MPlayer was ready for use. 

Next came the task of upgrading a vanilla Red Hat 9 to Rawhide, which is Red Hat's development branch, probably fairly close to a new beta expected to be released shortly. Here I chose yum for the job, mainly because yum is now included in the Rawhide and presumably it will be included in the next official Red Hat Linux release. The package is also available from freshrpms.net. After configuring the sources, I issued the following commands: 

    yum check-update
    yum -t -y upgrade

Perhaps being spoiled by a very easy Mandrake upgrade, I expected a similarly smooth flow while upgrading Red Hat. Unfortunately, it wasn't the case. The upgrade proved to be a lot of hard work and here is the summary of my observations: 

One of the main disadvantages of the yum package manager is that it only works with a Red Hat mirror, which has been "yumified". A yumified mirror contains a separate directory with header files of every available RPM package. At present, not many mirrors appear to have been yumified. 

The upgrade process aborted with errors on countless occasions. Even a simple error such as a failure to download a package for whatever reason brought the upgrade to a halt and had to be manually restarted. Once restarted, yum went through a lengthy dependency checking period, despite the fact that no change had been made to the package selection. Also, yum does not seem to have the ability to re-try fetching a package in case the first attempt fails. 

A major upgrade such as this one can take many hours, but unlike Debian or Mandrake's package managers, yum gives no indication about the progress or estimated time left. 
Nevertheless, the upgrade eventually completed and I was able to boot into a newly upgraded development version of Red Hat Linux. Perhaps another detailed comparison of yum with apt would be useful here, but I'll leave it for another time when we know more about Red Hat's (or Fedora's) direction in terms of its package management. Worth mentioning here is an interesting comment by one of the readers in last week's forums, which deserves to be quoted here: 

Although yum is now in rawhide, I don't expect to see it in a released version of RHL or RHEL. Why do I say this? Because the newest up2date that will ship with the upcoming RHEL and RHL now supports remote "yum" and "apt" repositories in addition to the native "rhn-style" repositories. Since up2date now speaks all languages (rhn, apt, yum) there is no need to ship those other tools. 
Overall score (2 points were deducted for having to use a third-party package manager): third-party package installation: 8, distribution upgrade: 3. 

Slackware Linux 

Slackware's package manager does not have the ability to resolve dependencies. The MPlayer experiment started with a trip to LinuxPackages, where I located and downloaded the necessary package, then executed installpkg: 

    installpkg mplayer-1.0pre1-i686-2rob.tgz

Although no errors were reported during installation, MPlayer failed to launch due to missing libraries. Back to LinuxPackages to download alsa-lib, lame and libdvdread (the dependent packages were clearly listed on the MPlayer download page), before installing them with installpkg. This has satisfied all requirements and MPlayer was ready for action. 

There are three third-party packages that handle Slackware package updates - these are swaret, slackpkg and slapt-get. Both swaret and slackpkg have now been officially included in the "extra" directory of Slackware Linux, but between the two of them only swaret has the ability to resolve dependencies, while slackpkg is generally used to keep a Slackware system synchronized with the "current" branch (i.e. development branch, equivalent to Sid, Cooker or Rawhide). At this point, it is perhaps interesting to note a recent comment by Slackware's creator Patrick Volkerding, which indicates that not everybody thinks highly about advanced package management tools: "I'm not a big believer in automated dependency handling." 

As with all other distributions in this experiment, I wanted to upgrade a vanilla Slackware 9.0 installation to the latest available development version, which at the time of writing was Slackware Linux 9.1-beta2. This can be done with Slackware's native tools, but the process is fairly involved, it requires manual download of all upgraded packages, which then need to be upgraded with upgradepkg in a certain correct order. After downloading and installing swaret, the same could be achieved with two commands: 

    swaret --update
    swaret --upgrade -a

Again, the process took time, but completed with no errors. Several newly upgraded packages required extra packages to satisfy dependencies and this is the only place where user intervention was called for to confirm the action. But the overall experience was very similar to upgrading Mandrake, except that it required a third-party tool. 

Overall score (2 points were deducted for having to use a third-party package manager): third-party package installation: 5, distribution upgrade: 7. 

SuSE Linux 

As many readers correctly pointed out, SuSE's native package manager called YOU (YaST Online Update), does indeed have dependency resolution capabilities. My apologies to SuSE users for the erroneous claim to the contrary. The reason which led me to believe otherwise was the frequency with which questions about apt-get come up on SuSE's mailing lists. Upon some investigation, it would appear that the main reason for apt-get's proliferation and preference among SuSE users is that certain third-party repositories of SuSE packages encourage users to make use of it. The popular usr local bin, which provides up-to-date GNOME packages is a good example. Another major advantage of APT for SuSE is its ability to upgrade the entire distribution with a single command and without re-installing. According to this comparison chart YOU cannot be used for this purpose. 

Keeping uniformity in the package installation experiment proved difficult, because SuSE is the only distribution in this list that does ship with MPlayer. However, some of the useful, but legally questionable components and plugins are missing from it, so let's try to install a more useful version, such as the one found at links2linux.de. Unfortunately, attempting to add the source of the MPlayer package to Software Source Media in YaST resulted in a "ERROR(InstSrc:E_no_instsrc_on_media)" message. But after installing apt and its dependencies, and updating apt's sources, MPlayer installed with a single command: 

    apt-get install MPlayer

The test of upgrading the entire SuSE 8.2 distribution to a newer version could not be done, simply because a newer version of SuSE Linux has yet to be released. It will probably be another two months before SuSE 9.0 directories appear on mirrors to give apt-get a chance to do its magic. Overall score: third-party package installation: 6, distribution upgrade: not rated. 

Conclusion 

To conclude this lengthy and time consuming experiment involving package installations and distribution upgrades, we have two clear winners - Debian and Mandrake. Debian is hard to beat when it comes to overall convenience, but Mandrake has made a lot of effort and its urpmi package management and underlying technology has just about succeeded in catching up with Debian's. The other three distributions have a long way to go. Red Hat is currently in a major transition and the question of package and distribution upgrades is probably being addressed as I write this. Slackware is easy to upgrade with swaret, a tool which will be included in the upcoming Slackware 9.1, but it doesn't handle installing packages from third-party repositories. As for SuSE, it falls short of all other distributions. YOU has a pleasant interface and it works extremely well within its official package set, but as a software management tool, it has too many shortcomings to compare well with either apt-get or urpmi. 


-- 
Yahoo User Account (Augusto) <asdfg_ar_2000@yahoo.com.ar>