News and Editorials
The Grumpy Editor didn't have enough experience with Gentoo Linux to cover it in his review of development distributions, so the time is nigh. A few commenters on the review also said they'd hoped it was about the best distributions to develop with, so I'll show you here what makes developing with Gentoo Linux a pleasure.
Many of you know Gentoo is a moving target. You may not know, however, that despite that, it's divided into two main chunks: stable and testing. All packages go through a phase in testing (a.k.a. ~arch, with the tilde designating testing status) before they go stable. Stable resembles the testing level of Debian, and Gentoo's ~arch resembles Debian Sid. Developers often want to use the latest and greatest development tools and libraries to develop against, and running Gentoo ~arch (like any good development distribution) allows you to keep all these tools and libraries under package management. First, we'll cover the same points as our Grumpy Editor's review, then we'll move into using Gentoo for development.
Although complaints about Gentoo's stability and breakages are fairly common, many of those complaints involve compile-time rather than run-time failures. Perhaps the largest complaint about run-time issues with Gentoo involves shared-library version bumps. Since you, rather than an upstream provider, are doing all the building, you need to run a program called revdep-rebuild to track down and rebuild packages that broke from a shared-library version change. While you're waiting for the rebuilds, packages using the bumped library may or may not break, depending on its maintainer's choice. Fortunately this will change in Portage 2.2, planned for release by the end of the year, with the addition of a global setting to always save the old libraries.
Tracking ~arch is possible with the --changelog and --pretend options to emerge. The --changelog option, when used in combination with a --pretend merge (which simply shows which packages would be installed or updated), displays the ChangeLog entries made since adding the new package . Other than that, the new Gentoo packages site has an Atom feed with all version bumps. There is no mailing list, however, dedicated to ~arch users. Instead, one would hope people encountering bugs would report them, and others could search Gentoo's Bugzilla for bugs filed in the past few days. Advance warnings are fairly scarce, but that may change as Portage 2.2 releases late this year with support for distributing news announcements. Last-minute warnings now show up as messages printed just before or after installing the update (and saved for later reading), but sometimes this is too late. Here's a look at --changelog output:
LWN covered in July the basics of Gentoo's package management. The basic thrust is that Gentoo has three competing low-level package managers: portage (the official one), paludis and pkgcore. Since much of package management in Gentoo is done on the command line, the CLIs are very colorful and featureful: emerge --help --verbose produces 334 lines of options and descriptions. Here's an example of colorful, verbose emerge output:
Development of GUI package-management tools has increased lately, with portato and himerge giving strong showings as fairly full-featured GUIs. Other GUIs exist for more specific purposes, for example configuration-file updating and USE flag (compilation feature) editing. One of the biggest problems with Gentoo is choosing which of the many tools you like best. For example, there are at least 5 different packages that allow you to do a package search.
Configuration-file updating is superb in Gentoo compared to many other distributions. This may be in part because Gentoo assumes some level of familiarity with the command line and with config-file editing. Again, there are a few tools: etc-update and dispatch-conf on the CLI side and etcproposals on the GUI side, among others. After each installation, Gentoo tells you how many configuration files you have to update, and the various tools help you merge the old and new configurations. Some of them even have true version control.
Gentoo has 12,037 packages in its main repository as of this writing, which puts it among the largest package collections. A quick check of my Fedora CVS checkout revealed roughly 5,200 packages, to put this in perspective. Since the state of ~arch has no relationship to Gentoo's releases, there are no freezes and packages are never artificially forced to become out of date. There are also many more packages available via overlays, additional package repositories that are easy to find using layman, which provides a centralized list of pointers to repositories and manages them for you, and easy to search (even without downloading them) with eix, which can download a pregenerated cache of information from all repositories. Here's an example of the additional repositories on my system:
Since Gentoo is a pragmatic distribution, it doesn't force any particular ideology upon users so it's easy to use patent-encumbered formats. Whether this is a good or bad thing philosophically remains open to question, but Gentoo is a tool; it tries to get out of your way to let you do what you want. For those more interested in freedom, Portage 2.2 will add license restrictions—you can refuse to install any packages with nonfree licenses. Other Gentoo package managers already allow this.
Gentoo provides a powerful set of tools for a development machine. Since it's a source-based distribution, it comes by default with the full toolchain and related tools (autotools, flex, bison, etc). Furthermore, the packages are not split up, so if you have a package installed, you have all of that package: no searching around for -devel, -headers, -debuginfo, or whatever else.
Two extremely powerful tools to speed up development are ccache and distcc, both of which Gentoo has quite well-integrated and documented. CCache is the compiler cache, which can significantly speed up compile times by caching the object files. DistCC is the distributed C/C++ compiler, which distributes parallel compilations among multiple hosts and is really handy for anything that can build in parallel and takes a while, such as a kernel.
To set up a decent development system, you often want to install debugging versions of a lot of libraries and maybe even install the source code too. Gentoo provides for that with a couple of FEATURES settings: splitdebug and installsources. The splitdebug feature installs separate debuginfo files that are automatically found by gdb, and installsources will do what it sounds like. Combined with an addition of -g or similar to to your CFLAGS setting in /etc/make.conf, that will get you off and running.
On a lower level, you might want to make sure your code compiles on a wide variety of compilers before shipping or releasing it. Gentoo's gcc-config lets you dynamically switch between multiple installed compilers, and you can even use non-GCC compilers for Gentoo packages by simply setting CC in /etc/make.conf or the environment. Here's all of the GCCs installed on my system, including cross-compiling toolchains:
Gentoo supports cross-compiling quite nicely with a tool called crossdev that integrates with Portage to make building cross-compiling toolchains completely trivial. All you have to do is pass crossdev the target and it takes care of the rest. You may want to cross-compile with distcc, too, and Gentoo also supports that. There's a draft version of the Gentoo Embedded Handbook that goes into detail on creating and using cross-compilers, but remember that it is just a draft.
Another feature that makes Gentoo excellent for development is its ability to install packages into a chroot with the variable ROOT. This makes it easy to test things independent of your development system without getting into virtualization. It also helps a lot for embedded development (when coupled with crossdev) and netbooting (when exporting the client / over NFS).
The last, most advanced and possibly most useful aspect of Gentoo for development is the ease of packaging your code. Writing ebuilds is just writing bash shell scripts. If you can build it by hand, you can make an ebuild for it. Here's an example of a simple ebuild, to wrap things up:
New ReleasesIt's close to midnight and something cool is coming through the "tubes" It's looking real tight, a distro for the experts and the n00bs With Live CDs* so you can try it out before installing Or DVDs so you can have the packages you choose No way to lose 'Cause it's Fedora, Fedora 8 We'd love to have you join us and together we'll be great Using Fedora, Fedora 8 Just click the link and rescue your computer's future today". Fedora project wiki.
FedoraThis will be a bumpy ride at first as we start to see where all these builds gets us. In the next couple of weeks we the project will work on setting a schedule for Fedora 9, start reviewing proposed Features, and come up with an overall idea of what we'd like to accomplish this time around." Using the Livna repository gives your Werewolf the ability to play all kinds of audio such as MP3 files and plays DVDs. Additionally Livna offers the ATI and Nvidia closed-source drivers in a Fedora-compatible rpm package for the Fedora users whose videocards are not yet fully supported with the stock open source drivers." Unofficial Fedora FAQ has been updated for Fedora 8. "Keep checking in for the next few days, too--new FAQs may be added, current FAQs may be changed! The FAQ always says in the top right corner when it was last updated, and there's a little "updated" notice next to questions (with a date that shows when I change them) whenever I update them." As of this morning, index page has been redirected to Fedora Project Wiki. Old contents are still available but no new content will be posted."
SUSE Linux and openSUSEthe openSUSE board to provide overall leadership for the project. Initial members are Pascal Bleser, Francis Giannaros, Andreas Jaeger, Stephan Kulow, and Federico Mena-Quintero. "The initial board has been appointed by Novell -- in the future, the board members will be elected by the community and the chair person appointed by Novell." Guiding Principles. "The Guiding Principles are a framework for the project and give everyone a clear view of who we are, what we stand for, what the project wants and how it works. The Guiding Principles document was created by the openSUSE community and is embraced by Novell - the founder and largest sponsor of the openSUSE project."
New Distributionspaldo stands for "pure adaptable linux distribution". It is a Upkg driven GNU/Linux distribution and it's a mix of a source and a binary distribution. Even though it builds packages like a source distribution it provides binary packages. The current version of paldo is 1.12, released November 5, 2007. Linux Titans has an interview with Jürg Billeter, creator of paldo.
Distribution NewslettersIn Announcements, we have 'Announcing the release of Fedora 8 (Werewolf)', 'Fedora Unity releases Fedora 8 CD Sets', 'rpm.livna.org repositories for Fedora 8 (Werewolf) now available', 'ATrpms for Fedora 8; EOL for Fedora Core 6' and 'Unofficial Fedora FAQ Updated for Fedora 8!' In Planet Fedora, we have 'Lesser-Known Fedora Contributors', 'Part 1-6, Report: LTSP Hackfest 2007', 'motd-File for your machine', 'Fedora Electronic Lab 8 - Stable release', 'Fedora Unity Spin Report', 'Fedora 8 Games Spin - Feedback Requested', 'Fedora Media Labels Howto', and 'I am a Broken Record'" DistroWatch Weekly for November 12, 2007 is out. "The Fedora project has once again risen the bar of desktop usability, especially in the area of hardware support, but what do the users think? Find out in our exclusive review of Fedora 8 by Simon Hildenbrand. In the news section, openSUSE announces the creation of openSUSE Board, Mandriva continues to fight the Nigerian Classmate PC deal, Fedora unveils the feature list for version 9, and LinuxTitans.com interviews creator of paldo GNU/Linux JÃ¼rg Billeter. Also in this issue, two sets of statistical analyses in the never-ending quest to find out which is the most popular distribution."
Distribution meetingsInstallations of Mandriva Linux One will take place all around the world, thanks to the Linux community. Major participating locations will include the Ecuador, China, Poland, Russia and France. Last year, Mandriva install fests gathered more than 2000 participants in more than 80 cities in 20 countries. This major event was covered on TV, radio and in the press."
Newsletters and articles of interestgOS 1.0.1 desktop and a Ubuntu Gutsy Samba server.
Distribution reviewstakes a look at gOS. "The operating system is based, like so many desktop Linuxes such as Mint, on Ubuntu. In gOS' case, it's built on top of the newly released Ubuntu 7.10 Linux. It includes the usual array of open-source software that users have learned to expect from a Linux desktop such as popular applications from Firefox, Skype and OpenOffice.org. The one difference that Linux users will notice immediately about it is that it uses the Enlightenment E17 desktop interface with a Google-centric theme instead of the far more common KDE or GNOME desktops." reviews the recently released Fedora 8. "Over the years, Red Hat's Fedora has made a name for itself as a version of Linux for enthusiasts, developers, and those who want to try the latest thing in open-source software. But a curious feature of the new version 8, released Thursday, is the ability to strip out the Fedora identity altogether. The reason: Red Hat wants Fedora to be a foundation for those who want to build their own Linux products on a Fedora foundation. With Fedora 8, that's easier, because all the Fedora-specific elements are wrapped up into one neatly optional package, said project leader Max Spevack."
Page editor: Rebecca Sobol
Next page: Development>>
Copyright © 2007, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds