
Loyola University Chicago Loyola eCommons Computer Science: Faculty Publications and Other Works Faculty Publications 9-2004 Gentoo Linux: The Next Generation of Linux George K. Thiruvathukal Loyola University Chicago, [email protected] Follow this and additional works at: https://ecommons.luc.edu/cs_facpubs Part of the Computer Sciences Commons Recommended Citation George K. Thiruvathukal, "Gentoo Linux: The Next Generation of Linux," Computing in Science and Engineering, vol. 6, no. 5, pp. 66-74, Sep./Oct. 2004, doi:10.1109/MCSE.2004.37 This Article is brought to you for free and open access by the Faculty Publications at Loyola eCommons. It has been accepted for inclusion in Computer Science: Faculty Publications and Other Works by an authorized administrator of Loyola eCommons. For more information, please contact [email protected]. This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License. Copyright © 2004 George K. Thiruvathukal PROGRAMMINGS CIENTIFIC P ROGRAMMING Editors: Paul F. Dubois, [email protected] George K. Thiruvathukal, [email protected] GENTOO LINUX: THE NEXT GENERATION OF LINUX By George K. Thiruvathukal PARTICULARLY INSPIRED EPISODE OF reliability. In my experience, most Linux distros are weak in certain areas: A THE AMERICAN TV SHOW FRASIER, • Binary packages. Virtually all OSs—and most Linux dis- “THEY’RE PLAYING OUR SONG,” FEATURES THE tros—are shipped with precompiled binaries. This means that upgrading a particular tool usually requires a full OS TWO BROTHERS, FRASIER AND NILES CRANE, upgrade because most packages have numerous depen- dencies. talking about a new jingle Frasier is composing for his radio • Kernel compilation. Linux distros typically have a kernel pre- talk show, a project whose scope has evolved into a minor compiled to run on all of a particular architecture family’s symphonic work: machines. On the Intel x86 platform, for example, the ker- nel is typically configured for the 386 or 586 variants. How- Niles: Whatever happened to the concept of “less is more”? ever, many processors run less than optimally when running Frasier: Ah, but if less is more then just think how much more “more” these instruction sets. In particular, Intel’s latest Pentium 4 will be. and Itanium are hobbled when the kernel doesn’t use newer instructions and optimization opportunities. One of the reasons scientific programmers love Linux is its • Differing platform use. Most Linux distros allow optional less-is-more philosophy. We can configure it to be anything desktop setups, but different approaches to managing the from a desktop replacement with USB port support to a blade OS exist, depending on intended use. A desktop system, in a large SMP compute engine to a powerful Web server. Al- for instance, requires USB devices that have the ability to though Linux’s market penetration in these various sectors re- plug or unplug a device at any time, as well as other pe- mains to be seen, plenty of people are pumping resources into ripherals to provide a more user-friendly experience. the Linux world. The first item of business when installing a Linux system Gentoo Linux is a significant distro for several reasons. is to pick a distribution, or distro. The plethora of options First, the entire OS is maintained from source code. Even includes Red Hat, Lindows, Debian, SuSe, Mandrake, Gen- when binary packages are directly installed, metadata shows too, and even the emerging Chinese standard, Red Flag. I’ve precisely how the package was configured and built. Second, used just about every version of Linux and found that almost we need install the OS only once. We can get upgrades of the all suffer at some point from the same management com- latest packages from one of the myriad Gentoo mirrors. Fi- plexity found in Microsoft Windows. This is important for nally, it’s completely free, regardless of intended use and con- those of us who don’t want to spend a lot of time becoming figuration. Unlike Red Hat Linux, Gentoo Linux doesn’t Linux experts. have a commercial edition, meaning users don’t have to In this article, I’ll explain why Gentoo Linux is a good worry that something might be missing in the free version. choice for scientists, and how its structure gives us the flexi- Let’s look at some of Gentoo’s salient features. bility and ease of management we need. Metadata and Portage Gentoo Linux Perhaps the Gentoo distro’s most significant feature is its I should point out early on that I’m the pickiest of users. I want use of metadata—particularly to let us answer questions my systems to run optimally for scientific and computer- about what version of a package is installed, how that pack- science research; toward this goal, I want the OS and its appli- age was built, and whether a newer version is available. cations to do nothing that affects my setup’s performance and Metadata itself is not an altogether new concept in Linux 66 Copublished by the IEEE CS and the AIP 1521-9615/04/$20.00 © 2004 IEEE COMPUTING IN SCIENCE & ENGINEERING distros, but Gentoo takes it to a new, network-centric level. make install Let’s look at an example: Only a handful of packages can be built from source code without downloading and building several dependent pack- $ emerge —search gcc ages beforehand. Take, for example, the world-famous (well, at least among us geeks) Emacs editor. We can build Emacs * sys-devel/gcc in two ways: as a console application or as a graphical appli- Latest version available: 3.3.3-r6 cation using several different widget sets. Latest version installed: 3.3.3-r6 In the past, the system administrator would download Size of downloaded files: 23,203 kB Emacs source code from ftp.gnu.org and then invoke the Homepage: http://www.gnu.org/software/ configure command with several options to include pro- gcc/gcc.html gramming libraries for the desired functionality. By default, Description: The GNU Compiler Collection. Emacs is designed to be compiled as a console application. Includes C/C++, java compilers, pie and Today, however, most users want the ability to run a graph- ssp extentions ical version on their desktops. Linux users typically use License: GPL-2 LGPL-2.1 Emacs with their favorite desktop (Gnome or KDE), so they want this support compiled into the Emacs binary. This example shows that I have the latest version of the gcc With Gentoo Linux, the administrator can query the compiler installed (the latest version available versus installed Portage metadata to determine what flags can be set to di- is 3.3.3-r6). The command used to obtain the information, rect the build. You can find the entire list of flags (known af- emerge, is part of the Gentoo system, which maintains pack- fectionately as USE flags) on the Gentoo site in the Docu- age information and keeps the packages up to date. This com- mentation section (www.gentoo.org/doc/). Let’s look at the mand’s most brilliant aspect is that we can use it at any time to flags we can use to build the Emacs package, which is already discover the latest available packages. We do this with emerge installed on my system: sync, which synchronizes our local Portage database with one hosted at a randomly selected Gentoo mirror site. Gentoo has gkt@develop gkt $ etcat -u emacs invested significant effort in ensuring that its mirroring scheme [ Colour Code : set unset ] is highly reliable, regardless of the selected mirror. [ Legend : (U) Col 1 - Current USE flags ] For the most part, we can install any package of interest sim- [ : (I) Col 2 - Installed With USE flags ] ply by using emerge –search to find it. (Obviously, we need U I [ Found these USE variables in : app- to have an idea of what we’re looking for—at least part of its editors/emacs-21.3-r1] + - X : Adds common name.) Once we know the name, we can pretend to support for X11 install it (by using emerge –pretend) and then install it for + + nls : unknown real, using emerge with the package name as the lone argu- + - motif : Adds motif support ment. (The core idea behind pretending is twofold: one, to see (x11-libs/openmotif x11-libs/lesstif) what packages will be installed as a result of emerge, and two, - - leim : Adds input methods support to to see how many packages will be installed. Unlike most in- Emacs staller programs out there today, emerge lets you see the po- + - gnome : Adds GNOME support tential effect of something before you actually do it.) - - Xaw3d : Adds support of the 3d athena widget set Package Build Complexity - - debug : Tells configure and the makefiles Typical system administration in Linux requires ongoing to build for debugging. maintenance of multiple packages. Most seasoned system administrator/hackers, such as yours truly, tend to download The etcat command is part of the Gentoo Linux toolkit, packages from the Web and build them by hand: which lets us examine the metadata. The U column indicates how the package would be built if we used the default USE ./configure -{}-prefix=/usr/local flags (specified in the configuration file /etc/make.conf); (myriad of options) the I column indicates how the package was actually built. make On my system, which is running the etcat command, I dis- SEPTEMBER/OCTOBER 2004 67 S CIENTIFIC P ROGRAMMING # Copyright 1999-2004 Gentoo Technolo- >=media-libs/tiff-3.5.5-r3 gies, Inc. >=media-libs/libpng-1.2.1 # Distributed under the terms of the GNU !arm? ( General Public License v2 Xaw3d? ( x11-libs/Xaw3d ) # $Header: /var/cvsroot/gentoo-x86/app- motif? ( editors/emacs/emacs-21.3-r3.ebuild,v 1.5 lesstif? ( x11-libs/lesstif ) 2004/06/10
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages10 Page
-
File Size-