Gentoo Logo
Gentoo Logo Side
Gentoo Spaceship

Contributors:
. Alec Warner
. Alexis Ballier
. Ali Polatel
. Anant Narayanan
. Andreas Proschofsky
. Andrew Gaffney
. Ben de Groot
. Benedikt Boehm
. Bernard Cafarelli
. Bjarke Istrup Pedersen
. Brent Baude
. Caleb Tennis
. Christian Faulhammer
. Christian Zoffoli
. Damien Krotkine
. Daniel Drake
. Daniel Gryniewicz
. Daniel Ostrow
. David Shakaryan
. Davide Italiano
. Dawid Węgliński
. Diego Pettenò
. Donnie Berkholz
. Doug Goldstein
. Fernando J. Pereda
. Gentoo News
. Grant Goodyear
. Greg KH
. Gunnar Wrobel
. Gustavo Felisberto
. Hanno Böck
. Hans de Graaff
. Ioannis Aslanidis
. Jan Kundrát
. Jeffrey Gardner
. Jeremy Olexa
. Joe Peterson
. Jonathan Smith
. Jorge Manuel B. S. Vicetto
. Joseph Jezak
. Josh Saddler
. Joshua Jackson
. Joshua Nichols
. José Alberto Suárez López
. Krzysiek Pawlik
. Lance Albertson
. Luca Barbato
. Luis Francisco Araujo
. Marcus Hanwell
. Marius Mauch
. Mark Kowarsky
. Mark Loeser
. Markus Ullmann
. Mart Raudsepp
. Matthias Geerdsen
. Michael Marineau
. Michal Januszewski
. Mike Doty
. Mike Pagano
. Ned Ludd
. Olivier Crête
. Patrick Kursawe
. Patrick McLean
. Paul de Vrieze
. Peter Weller
. Petteri Räty
. Piotr Jaroszyński
. Remi Cardona
. Renat Lumpau
. Rob Cakebread
. Robert Buchholz
. Robin Johnson
. Ryan Hill
. Serkan Kaba
. Shyam Mani
. Steev Klimaszewski
. Stefan Schweizer
. Steve Dibb
. Stuart Longland
. Sune Kloppenborg Jeppesen
. Sven Vermeulen
. Sven Wegener
. Thilo Bangert
. Thomas Anderson
. Timothy Redaelli
. Tiziano Müller
. Tobias Klausmann
. Tobias Scherbaum
. Yuval Yaari
. Zack Medico
. Zhang Le

Last updated:
December 31, 2008, 23:04 UTC

Disclaimer:
Views expressed in the content published here do not necessarily represent the views of Gentoo Linux or the Gentoo Foundation.


Bugs? Comments? Suggestions? Contact us: planet@gentoo.org

Powered by:
Planet

Welcome to Planet Gentoo, an aggregation of Gentoo-related weblog articles written by Gentoo developers. For a broader range of topics, you might be interested in Gentoo Universe.

December 31, 2008
Jeremy Olexa a.k.a. darkside (homepage, stats, bugs)
Today’s rant: What is ‘bikeshedding’ ? (December 31, 2008, 18:08 UTC)


I knew the general concept of this word but it was thrown around today so I decided to research it.

Parkinson’s Law of Triviality (also known as the bicycle shed example, and by the expression colour of the bikeshed) is C. Northcote Parkinson’s 1957 argument that organisations give disproportionate weight to trivial issues. source

Made famous in software development by Poul-Henning Kamp (FreeBSD dev)

“The really, really short answer is that you should not. The somewhat longer answer is that just because you are capable of building a bikeshed does not mean you should stop others from building one just because you do not like the color they plan to paint it. This is a metaphor indicating that you need not argue about every little feature just because you know enough to do so. Some people have commented that the amount of noise generated by a change is inversely proportional to the complexity of the change.” source

Seems to be true to me. We shouldn’t needlessly argue about trivial details.

I leave you with this..Is there a software development group in existence that does not bikeshed?:

Futile investment of time and energy in marginal technical issues, often including annoying propaganda. (as defined by Wiktionary)

I doubt it, but is it always a bad thing? Comments?

      

app-emacs/gentoo-syntax 1.10 released (December 31, 2008, 12:03 UTC)

Christian Faulhammer

The Gentoo GNU Emacs team just released version 1.10 of app-emacs/gentoo-syntax which is a minor update in general but has some interesting new features:

  • Support EAPI 2 (to be found in Portage 2.2 and 2.1.6)
  • Make use of the menu to make it easier for beginners
  • The code has been revamped and reworked in some important parts (not user-visible)
  • Update some eclasses (no PHP4 support anymore and some more changes to other exisiting eclasses)
  • Support the new eclasses bzr and gems

Enjoy! We will get it into stable as soon as possible.

Josh Saddler a.k.a. nightmorph (homepage, stats, bugs)
Graphics shuffle (December 31, 2008, 08:01 UTC)

Josh Saddler

On Christmas Eve, a special present arrived from UPS: the HIS Radeon X1950 Pro I purchased on eBay. For the week prior to Christmas I removed the discrete nVidia 7600GT and ran off the integrated nVidia Geforce 8200 chip in my motherboard. Utter pain!

Drawing the screen, whether compositing was on or off, was painfully slow. Running any kind of game was out of the question. UT2004 was impossible. I managed to gain a bit of 2D speed by adding GlyphCache and InitialPixmapPlacement options to xorg.conf, but the desktop was still slow as molasses. Made using the computer quite painful. I can personally verify all the reports that nVidia's drivers for the Geforce 8000 series suck balls are quite true. The only thing I gained was being able to run the framebuffer console at 1440x900, my monitor's native resolution. The Geforce 8200 supports this framebuffer mode; the 7600GT only supports up to 1024x768. Not that it matters once Xorg is launched. Anyway, that was a miserable failure, so I was really happy when the HIS Radeon card showed up.

To be honest, I spent a few more bucks on it than I'd like. With shipping, it was about $51. But I figured this could be a tech toy for the next several months. After this fall's debacle with that HIS RadeonHD 4670, I picked up an older R500 card for half the cost, and this one is at the top of the line for its generation. It should have been an upgrade on my nVidia 7600GT even with the FOSS drivers. With all the documentation ATI has released, the developers of the FOSS driver (xf86-video-ati in my case) were able to get working 2D and 3D acceleration some months ago. So, emboldened by all the articles and forums posts over at Phoronix on the exciting things happening to the FOSS Radeon/Xorg/Mesa stack, I gave it a whirl.

The Good

1. There is indeed 3D acceleration. It's partly usable.
2. The 2D acceleration is the fastest of any chip I tried, faster than even the 7600GT with the proprietary driver. Once I switched from XAA to EXA acceleration, it was even faster!
3. Running at my monitor's native resolution at the framebuffer console is possible.
4. It was nice to be able to remove all proprietary kernel modules.
5. The whole desktop stack loads a bit faster, with less modesetting flicker.
6. 3D performance is actually better with the FOSS drivers than it is with ATI's Catalyst (fglrx) driver.

All the stuttering and lockups I'd run into with the RadeonHD 4670 card a few months ago? Yeah, I now believe those weren't hardware issues at all, but shitty, shitty fglrx driver code. I ran into the exact same thing when trying to use fglrx with the X1950 Pro. UT2004 was a constant stutter-fest. Absolutely unusable. When it comes to the proprietary vs. FOSS drivers for usability, there's no contest. FOSS wins across the board.

The Bad

1. Keywording 70 packages or so in package.keywords is a tedious chore. I was after the latest X-server, Radeon, and Mesa updates, which necessitated moving to ~arch for most of the required X packages.
2. I can't switch virtual terminals. The monitor shuts off if it's running on anything but VT7 once X is loaded. Apparently I'm not the only one to experience this issue with this card.
3. Poor 3D performance. I had to turn down all settings to minimums in UT2004, though I kept the resolution maxed. And even with all the minimizing, framerates grew pretty choppy throughout the game. Though the R500 performance has come a long way in the Radeon driver, it's still nowhere near the level offered by my 7600GT and the proprietary nVidia driver. I dunno if the RadeonHD driver would offer any improvement; it shares a large part of its codebase with the Radeon driver.
4. The "gotchas" involved with switching from the proprietary nVidia driver to anything else. If you switch from one proprietary driver to an open-source driver, or a proprietary (nVidia) to proprietary (ATI), you'll have to manually delete a few libGL files, as the symlinks get shattered in a way that eselect doesn't know how to handle. Let's hope that bug gets fixed soon.

The Ugly

1. The fan. I think the video card's fan may have been damaged in transit. I took out the card after just a week because the noise from the fan was so damned annoying. Now, it's not that it's particularly loud; it's not all that much louder than the system fans (which are pretty quiet even when at max). No, what really grated on me was the hideous noise character of this fan. I've asked for some help from folks in the know, so we'll see where this goes. Too bad too; it uses the same IceQ cooler that the 4670 uses, and the 4670's cooler was amazing. I couldn't hardly hear it no matter the load on the card. It had a smooth, pleasant noise character, blending right in with my system fans at low RPMs.
2. Running into the ALSA and OpenAL updates at the same time I was trying to upgrade my hardware and its drivers. ALSA cannot compile. Bug still not fixed.

The new OpenAL version seems to be from a different upstream, one who has no idea what he's doing as far as documentation goes. I had a working config file for .0.0.8, and 1.5.304 broke it. There's nothing but an extremely sparse sample config to suggest what to do. No matter what I put in the new .ini-style config file, I couldn't make it pick up my microphone. When it finally did seem to be able to identify plughw:0,0, it then petulantly died with the message that the requested buffer size was too large. Based on IRC logs I found via Google, upstream suggests that's ALSA's fault, not OpenAL. Whatever, man. All I know is that the previous versions of OpenAL have always worked regardless of my ALSA version. The new one doesn't. So I added 1.5 to package.mask and downgraded. Presto, working microphone. Just the thing for the upcoming UT2004 tourney.
3. Spending $50 just a week before ATI releases the long-awaited R600/R700 programming documentation. Yeah, I'm kicking myself a bit. I'm wishing that I still had that HIS RadeonHD 4670, something that should have better performance than even an X1950 Pro, no matter which drivers are used. But as it is, the FOSS driver devs don't really expect to get a working driver with any kind of OpenGL acceleration for another few months. Approximate feature parity with the R500's current driver codebase is expected in another 8 months or so. So it'd be a long wait, but one that I'm starting to think is worth it.
4. Did I mention the fan? I can't stick that thing back in the case until I've found a cheap solution to silencing the beast. It's not worth pouring a lot of money into it. I mean, if money is being tossed about, I may as well pick up a silent low- to mid-range 4000 card off NewEgg (again).

* * *

The X1950 Pro is currently stored in the closet. I'll dig it out again once I find some solutions to various bugs. Or when more 3D performance improvements are merged. I'd like to use it for UT2004 as well as general desktop work, but I need better 3D performance. And I need to fix that fan! Maybe I can find a decently priced Arctic Cooling Accelero S1 rev 2 someplace.

I'm also really looking forward to the coming KMS and GEM support for R500 cards, hopefully that will all be merged into the 2.6.29 kernel. Just a few more months . . .

Leave a comment

December 30, 2008
Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
Avoid LDPATH pollution (December 30, 2008, 13:35 UTC)

Diego Pettenò

There is one thing I noticed working on my linking collision script. While most of the software properly creates subdirectories to put plugins in, so that they don’t clash with others and it does not pollute the LDPATH space, there are quite a few packages that don’t do that at all and install their plugins straight into the libdir.

Not only that, some packages install static archive versions of their own plugins, with no good reason since they are never linked in statically, but always dlopen’d.

Please don’t pollute LDPATH, if you can, make sure the plugins are installed in “pkglibdir” (that is /usr/lib/packagename) and make sure that they only install the shared object file, and eventually the libtool archive if the software uses libltdl to load them. The static archive is almost always unneeded and just a waste of time.

Also please remember that if you install core libraries in a path outside of the standard libdir (which is very good if the libraries are not to be linked against!), you should probably make sure that there is a proper runpath in the executables. What runpath does is to tell the linker to look for libraries in a path that is otherwise not accessible through the standard configuration files (/etc/ld.so.conf). A common mistake here is to install an env file that makes LDPATH (or even worse LD_LIBRARY_PATH) to the directory where the core internal libraries are installed.

While this works, it does not make much difference than having it in the standard library path: both the runtime linker and the link editor will use the path from the configuration file anyway, so the library is not going to be hidden like you’d want it to for a private library. On the other hand, if just the executable provides their own runpath, then the two linkers will ignore the libraries altogether.

So please, be careful with what you push in the library path, okay?

December 29, 2008
Zhang Le a.k.a. r0bertz (homepage, stats, bugs)

Zhang Le Actually I was intended to send this to LKML, but just before I was about to send I found there was already some discussions about this: http://marc.info/?l=linux-sparc&m=122956478603612&w=2. So instead I decided to just post it here.

To make long story short, please take a look at these two files first:

http://sourceware.org/cgi-bin/cvsweb.cgi/libc/string/endian.h?rev=1.10&content-type=text/x-cvsweb-markup&cvsroot=glibc
This file will become part of /usr/include/endian.h.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=include/linux/byteorder.h;h=29f002d73d989c577f0e79a8100d6fb7e0abb188;hb=bc2aa80e18a1b43ea2b8066500006b729c4ba4a7
This file will be /usr/include/linux/byteorder.h

Obviously, this test in linux/byteorder.h will fail:

#if defined(__LITTLE_ENDIAN) && defined(__BIG_ENDIAN)
# error Fix asm/byteorder.h to define one endianness
#endif
Because linux/types.h will include sys/types.h, which will in turn include endian.h, and in endian.h both of them are defined, but as a value not a flag.

It seems that there is an inconsistency on handling __LITTLE_ENDIAN/__BIG_ENDIAN between Linux and glibc. Linux treats them like a flag, while glibc treats them like a value. glibc uses __BYTE_ORDER to determine the endianness.

This problem must be solved, or any userland program including kernel headers which include {asm,linux}/byteorder.h will fail to build, e.g. glibc.

It seems to me that the most straight forward way, but also very intrusive way is to make the handling of these two marco consistent in the two projects. That'll be a very large changeset. Also it will suddenly change a convention in a project that has already been followed for a long time. So I don't think people will accept this.

How this problem will be solved is still remained to be seen.

EDIT: someone reported that it worked well on ~amd64. So I modified the title and removed the last sentence. I will see if this problem still exists on my x86 notebook.

EDIT 2: I confirm that this problem does not exists on x86. I will find out what exactly is going on loongson, or rather mips. :)

December 28, 2008
Gunnar Wrobel a.k.a. wrobel (homepage, stats, bugs)
layman-1.2.2 is out (December 28, 2008, 23:02 UTC)

Gunnar Wrobel The next layman version has been released and fixes a few minor bugs:

  • layman -L: better use of screen real estate for source URLs (#251032, submitted by Martin von Gagern)
  • Execute subprocesses in a shell. (#235165)
  • layman/overlays/git.py (GitOverlay.sync): app-portage/layman - 'layman -S --quiet' yields "git: 'pull-q' is not a git-command." (#247964)
Thanks to all the contributers!

Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
Blockers abuse (December 28, 2008, 14:18 UTC)

Diego Pettenò

I’ve already written about some of the differences between my and Patrick’s tinderboxes, one of which is that my tinderbox does not only install one package, but tries to install all of them at once. This is a necessity for me to have enough material to work on with my library collisions script, and still have so many side effects that makes it funny to work with.

The first problem is that sometimes packages don’t get merged together because of file collisions, which most of the time are caused by packages that install commands with name too generic, and some other times because they regenerate files that should not be present in the final image (like iconv’s charset.alias that gets generated on Gentoo/FreeBSD systems with no good reason at all).

The second problem derives from the way the first problem is handled. When two packages install a file with the same name, rather than renaming one of them or both, it’s customary to actually “fix” the problem by adding blockers to each of the two packages so that they cannot get installed together. While it’s certainly better to have it expressed that way rather than having the merge to fail after the compilation and install phases, it’s not really a solution since it still disallows having the two packages on the same system. While this is acceptable for packages like the different GhostScript implementations that apply for the same task, this is not much of a solution when the packages are entirely independent one from the other and have very different tasks.

I also have found one particular package (pnet) which had a very funky solution to the collision between that and boehm-gc, considering that it was installing a private copy of that. Obviously this was not the proper fix by a mile’s look.

If you have two packages that block each other you have a few different ways to deal with that; if they provide the same function, you might as well install them with a prefix and then write an eselect module to choose between one or the other (which is something that ghostscript could very well be doing); if they only install executables with generic name, they might be changed to prefix the command name with the package name. But sometimes these commands are not to be used by the users at all, and are rather internal commands used by the scripts for processing; in those cases, it would be a nice idea to make those get into /usr/libexec/$PN/ so that they are taken out of the users’ path, and won’t collide one with the other.

While dealing with packages that install colliding files is not so easy, there is need for developers to deal with them in a less “works for me” way, and think more of the general picture, as it is, there are enough packages in the tree that blocks each other with no real good reason, and this is upsetting.

December 27, 2008
Stuart Longland a.k.a. redhatter (homepage, stats, bugs)
Gentoo/MIPS uClibc Stages (December 27, 2008, 03:38 UTC)

Stuart Longland

Hi all…

Well, after a long hiatus, I’m working on new stages for the Gentoo/MIPS port.  These new ones will be based on uClibc, and are a compliment to the existing glibc-based stages.  At the moment, the initial seed environment is still being cross-compiled from my i686 host, and for now I’m focussing on mipsel but will soon turn my attention to MIPS.

These stages initially will not operate with a page size of 16KB or more, so unfortunately aren’t much good for Lemote users (I’m working with the uClibc people on this) but Cobalt and SGI users will soon once again be able to use uClibc as their system libc.  The new stages will be based on uClibc 0.9.30… which is yet to be keyworded.

Leave a comment

December 25, 2008
Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
Reinventing the wheels for fun and.... (December 25, 2008, 23:41 UTC)

Diego Pettenò

So it’s Christmas day, and I’m skimming through the 32+ MB of logs generated by my elven script and I found some nice nuggets:

Symbol getopt_long@@ (32-bit UNIX System V ABI Intel 80386) present 35 times
  /usr/bin/graph
  /usr/bin/ebzipinfo
  /usr/bin/spline
  /usr/bin/double
  /usr/bin/uupick
  /usr/bin/autotrace
  /usr/bin/uustat
  /usr/sbin/ndtpd
  /usr/bin/ode
  /usr/sbin/ndtpcheck
  /usr/bin/ebrefile
  /usr/bin/uucp
  /usr/sbin/ndtpcontrol
  /usr/bin/uulog
  /usr/sbin/uuxqt
  /usr/bin/ebzip
  /usr/bin/faad
  /usr/bin/lha
  /usr/lib/libsox.so.1.0.0
  /usr/sbin/uucico
  /usr/bin/ebinfo
  /usr/sbin/uuconv
  /usr/bin/plot
  /usr/bin/tek2plot
  /usr/lib/libc.so.5
  /usr/bin/uuname
  /usr/bin/uux
  /usr/bin/ebstopcode
  /usr/bin/stklos
  /usr/bin/cu
  /usr/bin/plotfont
  /usr/bin/ebfont
  /usr/bin/ebunzip
  /usr/bin/pic2plot
  /usr/sbin/uuchk
Symbol strncasecmp@@ (32-bit UNIX System V ABI Intel 80386) present 5 times
  /usr/bin/xpilots
  /usr/bin/gargoyle-agility
  /usr/lib/libc.so.5
  /usr/bin/xedit
  /usr/bin/xpilot
Symbol strnlen@@ (32-bit UNIX System V ABI Intel 80386) present 5 times
  /usr/bin/tarsync
  /usr/lib/libCw.so.1.0.0
  /usr/lib/libmba.so.0.9.1
  /usr/lib/python2.5/site-packages/numarray/_chararray.so
  /usr/bin/linksys-tftp
Symbol stricmp@@ (32-bit UNIX System V ABI Intel 80386) present 5 times
  /usr/bin/qemacs
  /usr/lib/libraidutil.so.0.0.0
  /usr/lib/openbabel/2.2.0/inchiformat.so
  /usr/lib/libxerces-c-3.0.so
  /usr/lib/libIL.so.1.0.0

Now if you ignore the references to the old compatibility libc.so.5 you can still find that there are quite a few programs that reinvent the wheel, reimplementing some functions that the C library already provides. Now, this would be fine and dandy if the implementation was subtly different, or was done with some particular purpose in mind, like glib’s functions, but I really can’t find the reason for the situation above to happen.

These are usually smaller functions, but still there is no reason for them to be present since anyway it’s more than likely that most of their use is replaced away by the compiler itself; more interesting is their presence in shared objects, since that would interpose around other calls, although this most likely won’t happen on glibc based systems since they provide versioned symbols which wouldn’t then interpose by default. That’s still a problem for *BSD systems though.

This has a much lower priority in my list than identifying all libraries bundled by various packages (even when they cannot be fixed, because they are proprietary or something else), because these are unlikely to turn out being security issues. On the other hand, the idea of doing such pointless duplication of common functions might as well caus security issues to be hidden, for instance if a package was to reimplement mktemp, then it would most likely be a problem.

Anyway for those interested to find out what’s duplicating code in their system, the new hit parade, derived directly from the Bug shows SQLite3 trying to climb up the ladder, together with boehm-gc. Why people can’t understand that there are libraries in the system already?

Zhang Le a.k.a. r0bertz (homepage, stats, bugs)

Zhang Le I got a donation of a Lemote Loongson 2F box somewhere around July this year and have been working on it in my spare time since I got it.

The other day I made a summary about what I have done so far and posted it on Lemote's bbs. The links is http://www.lemote.com/bbs/viewthread.php?tid=20134
My work involves toolchain, kernel, xorg-server MIPS or Loongson support and userland library/application gcc 4.4 patch.

The most prominent achievement so far is an N32 ABI stage3 (well, actually just a tarball, not made using catalyst) optimized for Loongson 2F with MIPS PLT support. It is actually not that easy as you would've imagined, N32 has many problems as you can see from the above posted link. I posted it on Lemote's bbs along with some instructions of how to use it: http://www.lemote.com/bbs/viewthread.php?tid=20125

According to some testers, performance of some applications in this system has an up to 30% increase comparing with the performance of the same apps in system Using O32 ABI without optimization for Loongson 2F and MIPS PLT support.

I have just got laid off by my former employer (however no need to worry for me, new jobs will find me soon), that means currently I have a lot of time doing things I'd like to do, like Loongson. Now I am still working on the problems I have encountered so far, currently xulrunner for N32 ABI, which will lead ultimately to firefox on MIPS N32 ABI userland system.
https://developer.mozilla.org/en/xptcall_FAQ
http://mxr.mozilla.org/mozilla/source/xpcom/reflect/xptcall/porting.html
I wish I could finish it before 2009 comes, ;)

Thomas Anderson a.k.a. gentoofan23 (homepage, stats, bugs)
My Christmas present to the Gentoo community (December 25, 2008, 16:06 UTC)


After testing with Markus, I’ve stabilized linux 2.6.27 for amd64. Markus has stabilized it for x86. A few notes:

1) You’ll likely need to upgrade nvidia-drivers, because we needed to stabilize new versions of that

2) openafs 1.4.8 and qc-usb-messenger went stable with it as well, so upgrade that.

3) I fixed up lirc-0.8.3-r2 so it now has compatibility with 2.6.27.

So that’s my Christmas present to Gentoo users.Have fun with it!

      

Hanno Böck a.k.a. hanno (homepage, stats, bugs)

Hanno Böck The free software projects for media playing did a good job in the past on supporting a wide variety of formats. From the common to many very obscure formats, current versions of the free software mediaplayers were usually able to play them. Today it's even common to suggest vlc for Windows users if they can't play unusual media formats.

Though there were a few exceptions, the most notable probably the long-time missing support for many of the Real formats. While these are rarely used today, many archived videos in the Internet still rely on it. For example, many german television stations provide real video files on their webpages.

Recently and without much public notion, ffmpeg first got support for RV40, some weeks later also for RV30. This fills a long time gap in free software support for video formats. ffmpeg is used by all major free software video players (vlc, xine, mplayer), so you should get the support within some time in all of them. For now, it's quite easy to checkout mplayer from subversion and build it on your own.

Want something to try out? Here's a video from Desert Planet in real format.

The only gap I know of a format that really got usage in the wild and that is not yet supported by free software is WMA3.

Leave a comment

December 24, 2008
Jeremy Olexa a.k.a. darkside (homepage, stats, bugs)
Gentoo Prefix now supports FreeMiNT (December 24, 2008, 17:40 UTC)


So..what does this mean? In a nutshell..Gentoo Prefix works on the OS that runs on an Atari. Cool, eh?

We owe this to the hard work of AlanH, as seen here and here.  As always, we are at #gentoo-prefix and the gentoo-alt mailing list if you are interested.

      

Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
Library on a collision course! On the screen! (December 24, 2008, 14:55 UTC)

Diego Pettenò

So after almost an year, I returned working on the library collision detection that comes with ruby-elf. I now have a much more powerful system to work on, but I also have a much bigger set of samples to scan, in my tinderbox.

Beside a few issues that I’ve had to taken care of, I’ve now got a database that contains a huge amount of data to process and useful information to derive. Just to give some statistics, the script harvested 24602 ELF files, counting 2713395 symbols, of which 326399 are duplicate between objects. These statistics have already counted out all the suppressed symbols known up to now, but obviously there are more yet unknown.

To stick with statistics for now, rather than actual results, it’s interesting to know that about 1365671 C++ ABI symbols, I sincerely wonder how many of these should be hidden instead.

On a more interesting note, Samba confirms itself sub-optimal by now having yet a convenience library for its shared functions, and copying over the symbols between the various pieces of the puzzle, included six different Python modules, whose total size would probably be cut in half I guess.

Sticking with the Python side, there is one damn issue that is really upsetting me: about thirty different packages link the Python interpreter statically rather than dynamically, resulting in around 30 different copies of Python itself in the full of Portage. Nasty. The problem is that the ebuild installs the shared and static libraries in two different paths, one of which being private “config” path for Python. The packages picking that up will explicitly request it at link time, causing Python to be linked in statically rather than dynamically:

Symbol PyBaseString_Type@@ (32-bit UNIX System V ABI Intel 80386) present 30 times
  /usr/games/bin/diameter
  /usr/bin/vim
  /usr/bin/gedit
  /usr/lib/root/libPyROOT.so.5.22
  /usr/lib/python2.5/site-packages/opencv/_highgui.so
  /usr/lib/libpython2.5.so.1.0
  /usr/bin/eog
  /usr/games/lib/mcl/plugins/python.so
  /usr/sbin/bextract
  /usr/bin/zapping
  /usr/lib/python2.5/site-packages/opencv/_cv.so
  /usr/bin/gvim
  /usr/bin/gwp
  /usr/bin/cooledit
  /usr/lib/planner/plugins/libpython-plugin.so
  /usr/sbin/bacula-fd
  /usr/sbin/bacula-sd
  /usr/lib/dia/libpython_plugin.so
  /usr/lib/xchat/plugins/python.so
  /usr/lib/xchat-gnome/plugins/python.so
  /usr/sbin/bacula-dir
  /usr/lib/gnumeric/1.8.3/plugins/python-loader/python_loader.so
  /usr/games/bin/adonthell
  /usr/games/bin/kiki
  /usr/lib/libgnt.so.0.0.0
  /usr/bin/epiphany
  /usr/lib/python2.5/site-packages/_lcms.so
  /usr/lib/perl5/vendor_perl/5.8.8/i686-linux/auto/Inline/Python/Python.so
  /usr/lib/apache2/modules/mod_wsgi.so
  /usr/lib/apache2/modules/mod_python.so

As you can see this includes two Apache modules, and quit a few pieces of GNOME. This is quite nasty. My suggestion until this is sorted out is not to enable python USE flag unless you really really really need it. The nastiest bit is that since there has been a Python vulnerability if you didn’t rebuild these packages after the bump, you’ll have them using a vulnerable interpreter, still. Do I really have to spell out how bad that is for stuff like Apache modules?

Josh Saddler a.k.a. nightmorph (homepage, stats, bugs)
December public service announcement (December 24, 2008, 07:01 UTC)

Josh Saddler

For all the forumites, bloggers, wikifolks, mailing list members, bugzilla commenters, and general Gentoo netizens:

Please stop spreading bad advice such as ebuild foo digest. It does not exist. Digests have not been present in the Portage tree for a year, ever since the tree was converted to Manifest2 format.

If you've made a local modification to an ebuild, patch, or added anything else to your local overlay and need to make Portage aware of the changes so the package can be properly merged, do not use the "digest" command. Use "manifest" instead. For example:

ebuild foo-1.0.17.ebuild manifest

Digests have been dead for a long time. Please don't encourage bad practices.

This has been a December public service announcement. Thank you for flying Gentoo Air, and please enjoy the rest of your Christmas!

Leave a comment

December 23, 2008
Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)

Diego Pettenò

Short preamble: I’m in a very depressed mood, like I haven’t been in month; this is very bad for my health but usually means I can focus on things much better, so you might actually find out I’m doing more than usual. Of course there is also to count in that I’m working during holidays so it’s not going to be all nice at all, even counting my depression off.

As I’ve written, I don’t trust closed-source software even the slightest even though it does not really mean that free software is much better, process-wise, dealing with bundled libraries (like the bundled libs bug shows), with free software, or at least open-source software, there is the chance to check the sources out to fix the eventual issues.

This means that I won’t be using closed source software where security is a major concern, but since sometimes I have to use closed-source software, like Skype, or Sun’s compiler, it’s obvious that I have to find a compromise so I can still use them and yet feel reasonably safe. This is what is usually called having a mitigation strategy.

One of the most complex and well known mitigation strategies is of course SElinux, which makes a Linux system more like an APC than a computer. But such a system is probably safe to consider overkill for most systems, especially power user desktop systems.

Since this is, as I said, overkill, I’m more prone to look at smaller strategies, one of which I already discussed about: pam_mktemp . This module allows to create per-user private directories that make it much harder to exploit insecure temporary files vulnerabilities. Which is very nice since this seems to be a very common class of vulnerabilities, and my data shows that there is way too much software that still uses insecure functions to create temporary files, closed and open source alike.

Unfortunately, as you can read in my earlier blog post, this is not automatically a way out of the problem. The start-stop-daemon command from OpenRC plays nice with this just in the last release, and even with that, there are problems. The first problem is that the way pam_mktemp works, there is a need for the software calling PAM to open the session to properly set up the environment with its changes (which is what s-s-d lacked in previous versions). This causes for instance the gnome-keyring daemon to start with the wrong temporary directory when started by the PAM session chain. Even though pam_mktemp is invoked before the daemon, by the time it’s started the TMPDIR variable is not set in the environment. The reason for this is that the variable should not be changed if the session chain aborts the login.

The second problem is that not all software supports TMPDIR properly; Emacs has been fixed recently and now the emacs daemon starts up properly, but other software ignores TMPDIR altogether. VirtualBox (of which I still have things to say beside this) does not respect it for instance, which means that the module wouldn’t have spared you from the recent vulnerability that involved the software.

The third problem is that sometimes software expects TMPDIR to be world-readable, which is a bad assumption; Samba does this, and since s-s-d is now fixed, it now fails to work on my system. I still haven’t found out whether the PAM session chain was called at that point, and it’s just duplicating the problem with s-s-d with a different symptom, or if it fails to call it entirely. In either case, it’s a thing that has to be fixed to make sure that mitigation strategies like this one get in the default spirit of users.

But again this is just one part of the problem, and one part of mitigation. Other problems relate to the way we run some of the services, a lot of which still run as root rather than under a unprivileged user; while the git-daemon issue is now solved and the default install does not run as root any longer, there are more daemons that have the same problems.

Just as an example, I noticed that the iSCSI daemon ietd still runs under root, and I’ve added that to the list of software I have to check to see if I can improve it. Similarly, the init script for mpd does not use s-s-d to switch user but leaves it to mpd itself, spawning it by default with unneeded root privileges, and additionally not allowing pam_mktemp to create a new temporary directory for the mpd user (I have to spend some time on that since I’d also like to provide an alternative init script with multiplexing, which would then allow to run multiple mpds for different users, and in my case to just have the single mpd running as my own user rather than a different user entirely).

At any rate, I’m going to continue my best to make sure that secure defaults are in place in Gentoo, and that further mitigation strategies can be made available so that the users forced to use proprietary closed-source software don’t need to just accept whatever comes their way. Please join my efforts, if you can, by checking which software ignores TMPDIR and asking nicely upstream to fix the issue.

It’s Alive! (December 23, 2008, 18:17 UTC)

Daniel Gryniewicz

32-bit userland in KVM

That is totem playing an ogg in a Gnome desktop in KVM on my 32bit-userland image.  It works!  Woo hoo!

Now all that’s left is to try it on real hardware, and figure out why the kernel fails to build.

Leave a comment

Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
When upstream lacks a testsuite (December 23, 2008, 16:28 UTC)

Diego Pettenò

... you can make your own, or try at least.

I maintain in portage a little ebuild for uif2iso; as you probably already know, the foo2iso tools are used t convert various type of proprietary disk images from Windows proprietary software into ISO9660 images that can be used under Linux. Quite obviously, making unit testing out of such a tool is pointless, but regression testing at tool level might actually work. Unfortunately for obvious reasons upstream does not ship testing data.

Not exactly happy with this, I started considering what solution I had, and thus my decision: if upstream does not ship with any testsuite, I’ll make one myself. The good thing with ebuilds is that you can write what you want for the test in src_test. I finally decided to build an UIF image using MagicISO on my Windows XP vbox, download it together with the MD5 digest of the files I’d put in it conditionally to the test USE flag, and during the test phase convert it to ISO, extract the files, and check that the MD5 digest is correct.

Easier said than done.

To start with I had some problem deciding what to put on the image; of course I could use some random data, but I thought that at that point I could at least make it funny for people to download the test data, if they wanted to look at it. My choice fell on just finding some Creative Commons-licensed music and use a track from that. After some looking around, my choice went to the first track of Break Rise Blowing by Countdown on Jamendo.

Yes I don’t like Flash either but this was worth it, sorry.

Now, the first track is not too big so it’s not a significant overhead to download the test data, but there is another point here: MagicISO has three types of algorithms used: default, best compression and best speed; most likely they are three compression levels in lzma or something along those lines, but just to be safe I’d just put all three of those to the test. The resulting file with the three UIF images and the MD5 checksums was less than 9MB, so an acceptable size.

At that point, I started writing the small testsuite, and the problem started: uif2iso always returns 1 at exit, which means you can’t use || die or it would always die. Okay good enough, just check that the file was created. Then you have to take the files out, nothing is that easy when you got libarchive that can extract ISO files like they were tarballs; just add that as a dependency with the test USE flag enabled, a bit of overhead but at least I can easily extract the data to test.

It seems instead that the ISO file produced by uif2iso is going to be a test for libarchive instead, since the latest release fails to extract it. I mailed Tim and I hope he can fix it up for the next release (Tim is fantastic with this, when 2.5.902a was released, I ended up finding a crasher on a Portage-generated binpkg, I just had to mail it to him, and in the next release it was fixed!). The ISO file itself seems fine, since loop-mounting it works just fine. The problem is that I know no other tool that can extract ISO images quickly and without having to command it file by file (iso-read from libcdio can do that, it’s just too boring); if somebody has suggestions I’m open to them.

This is the fun that comes out of writing your own test cases I guess, but on the other hand I think it’s probably a good idea to keep the problematic archives around, if they have no problems with licenses (Gentoo binpkgs might, since they are built from sources and you’d have to distribute the sources with the binaries, which is why I wanted some Creative Commons licensed content for the images), since that allows you to test stuff that broke before to ensure it never breaks again. Which is probably the best part of unit, integration and system testing: you take a bug that was introduced in the past, fix it and write a test so that, if it is ever reintroduced it would be caught by the tests rather than by the users again.

Has anybody said FATE ?

December 22, 2008
Tobias Klausmann a.k.a. klausman (homepage, stats, bugs)
Inside an Alpha, Part I (December 22, 2008, 14:13 UTC)

As part of a miniseries, I'll describe the insides of the more common Alphas. Nothing too technical, just nice pictures and a word or two regarding the pitfalls and unique features of the Alpha machines I have access to.

The images in this post are rather small. If you'd like to have a peek at larger versions of them, you can browse the gallery.

First in the series is my trusty Compaq AlphaStation XP1000. Here it is, with the front door closed:


Note that it's about the size of a midi tower, but way heavier. I guess it's close to 15kg in all. And there's not much hardware in it: aside from the necessities just a few extra PCI cards, one disk and two CD-Rs. It's also relatively short (in depth) for a midi tower. How that turns out to be of disadvantage, we'll see later on.

Here's the back side of the unit. As you see it has one Ethernet port, two USB connectors, Line/Headphone in/out, PS/2 mouse and keyboard, two serial ports and a parallel port. At the bottom right are the PCI cards: one 53c895, an ELSA GLoria II, a cheap PCI audio card and a cheap Ethernet card. Audio and Ethernet I added because the default ones work sort of ok, but those two work way better. The same goes for the 895 vs the on-board ISP logic SCSI HBA. The two blanked slots on the left are for purposes unknown to me. As we'll see later, there is little to support any cards there, so I suspect it's intended for additional ports that don't fit the PCI/ISA slot back-end. Also note at the top left the indentation and two small slot blanks. On a PWS 500au, which has a very similar case, those two are used for the audio and network connector boards. Finally, the power supply you see at the center is not anything compatible with an ATX or AT power supply, at least connector-wise. It's rated at 300 Watts when running on 230V.


This class of workstations opens to the right, that is, opposite of the common PC case. At the top there is the CPU board (more on that later), left middle are the two CD-R drives and floppy drive. At the middle right there's the power supply and below it a cage for two 3.5" hard drives. below all this are the PCI and ISA connectors and the on-board connectors for IDE, SCSI, Floppy etc.


As you can see, the whole case is rather cramped. The sheet metal barrier between the middle and lower parts has a rather small hole for cabling, so it's always fiddly to install more than just a hard-disk and a CDR. Also, the rear end of the CD-Rs is quite close to the power supply and hard drives, so it's very easy to cinch cabling. On top of that, access to the PCI and ISA cards is rather difficult, especially if you have cabling going to one of the cards (as I do).

From the top, we see the CPU fan (black rectangle at the front) and air duct (grey) and the CPU right behind it. Behind that are the memory banks. Obscured in this picture is the chipset, we'll see that later on.


The CPU board slides out horizontally as you can see here. Note that while the levers help pulling the board out, they do nothing for pushing it back in. You have to be extra careful to get it to seat properly. At the top center you can make out the NVRAM battery. It's easily accessible and of a readily available type. You can also see the two holes in the CPU heat sink. Those provide access to two hex nuts that hold the sink in place. The bolts are part of the CPU packaging.


The CPU board from the rear end. The four metal-plated chips on the right are the chip set (memory controller etc.). Those chips run very hot (by spec). I've measured them running at up to 65C under full load.


This concludes our tour of the XP1000. As you can see, the machines while nice to work with from the software/OS side are not ideal if you swap around hardware a lot. Especially the drive cages could have used more room around them. Still, I like the machines. They're built like tanks and the fans still are the first ones the machine came with and there is no rattling or grinding.

December 21, 2008
Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
A couple of thoughts about package splitting (December 21, 2008, 22:17 UTC)

Diego Pettenò

In my post regarding remote debugging (which I promised to finish with a second part, I just didn’t have time to test a couple of things), I’ve suggested the idea I’d like to have some kind of package splitting in Portage, to create multiple binary packages out of a single source package and ebuild, similarly to what distributions based on RPM or deb do (let’s call them RedHat and Debian, for historical reasons).

Now, I want to make sure nobody misunderstand me: I don’t intend to propose this as a way of removing the fine-grained control USE flags give us; I sincerely love that; and I also love not having to worry about installing -dev and -devel packages on my machines to be able to build software, even outside of the package manager’s control. I really find these two are strengths of Gentoo, rather than weakness, so I have no intention to fiddle with them. On the other hand, I think there are enough uses that would allow for an even finer control on binpkg level.

I’ve already given a scenario in my post about remote server debugging, but let’s try to show something different, something I’ve actually been thinking about myself. Yes I know this is a very vested interest for me, but I also think this is what makes Free Software great most of the time; we’re not solutions looking for problem, but usually solutions to problem one had at least at one point in time. Just like my writing support for NFS export on the HFS+ filesystem in Linux.

So let me try to introduce the scenario I’ve been thinking about. As it happens, I tend to a series of boxes in many offices for friends and friends of friends in my spare time, on the side. It’s not too bad, it does not pay my bills, but it does pay for some side things, which is good. Now since these offices usually use Windows, even though I obviously install Firefox as the second step after doing the system updates, it’s not unlikely that every other time I go there I have to clean up the systems. I think there are computers I’ve wiped up and reinstalled a few times already. I’ve now been thinking about setting up some firewalls based on Snort or similar. Since I am who I am, these would end up being Gentoo-based (as a side note, I’m tempted to set it up here so I can finally stop having trouble with Vista-based laptops that mess up my network). Oh and please, I know it might sound very stupid considering there are solutions good for this already, but considering how much I’m paid and the amount of money they are ready to spend (read: near to none), I would find it nicer to be paid to work on some Gentoo-related stuff than be paid to just look up and learn how to use already made equipment. Of course if you have suggestion, they are welcome anyway.

So anyway, in this situation I’d have to set up boxes that would usually feel very embedded-like: a common basis, the minimum maintenance possible, upgrades when needed. Donnie’s idea of using remote package fetching and instant deletion is not that good for this because it still requires a huge pipe to shove the data around; not only I don’t have so much upload bandwidth to employ for binpkging a whole system with debug information, it would also be a hit that most of my users wouldn’t like to have, on their bandwidth (if they want to use BitTorrent or look up p0rn from the office is not my problem).

With this in mind, I’d sincerely find it much nicer to be able to split packages, Portage-side, into multiple binary packages that can be fetched, synced, or whatever else, independently, as needed. As I proposed, a binpkg for the debug information files, but also a binpkg for documentation (including man and info pages), one for development data (headers, pkg-config), and maybe one for the prepared sources, that I want to talk about in a moment. With an environment variable it shouldn’t be much of a problem to choose which ones of these split binary packages to install in the system without explicit request; with a default including all of them but the debug informations and the sources. This would also replace the INSTALL_MASK approach as well as noinfo, noman, nodoc FEATURES. It wouldn’t be like a logical split of a package in multiple entries in the system, but rather a way to choose which parts to install, complementary to USE flags.

As for packaging the sources as I said above, there are two interesting points to be made for that, or maybe three. The first problem is that when you have to distribute a system based on Gentoo, you cannot just provide the binaries; since many packages are released under the GNU GPL version 2, even if you didn’t change the sources at all you should be distributing them alongside the binaries; and we modify a lot of sources. For license compliance we should also provide the full set of sources from which the code is derived. This is especially tricky for embedded systems. By packaging up the sources used for the builds, embedded distributors would be able to just provide all the -src subpackages as the full sources for the system.

The second point is that you can use the source packages for debugging too. Since there is, as far as I know,no way to fully embed the source code of software in the debug section of the files generated from that, the only way for GDB to display the source code lines during debugging is having the source files used for build available during the debugging session. This can easily be done by packaging up the sources and installing them in, say, /usr/src/portage/ when they are needed, from a subpackage.

A final point would be that by packaging sources in sub-packages, and distributing them, we could be reducing the overhead for users to unpack (maybe with uncommon package formats) and prepare sources (maybe with lots of patches and autotools rebuilding). Let’s say that every 6 hours a server produces md5-based source subpackages for all the ebuilds of the tree, or a subset of them. Users would then use those sources primarily, but still having the ebuilds to provide all the data and workflow so that the original untouched source would be enough to compile the package. Of course this would then require us to express dependencies on a per-phase basis, since then autotools wouldn’t be required at buildtime at all.

Okay I guess I’m really dreaming lately, but I think that throwing around some ideas is still better than not doing so, they can always be picked up and worked on; sometimes it worked.

December 20, 2008
Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
Why a tinderbox is not enough (not even two) (December 20, 2008, 21:40 UTC)

Diego Pettenò

I’ve already written something about automation for Gentoo bug search, but I think sometimes it’s not easy to understand that just using a huge tinderbox, even distributed, is not going to help much to make sure that software works. The problem is that sometimes, even if software builds fine, it’s just going to break at runtime, and even though tests help, when they are handled properly, they are far from complete solutions.

Problems like the one described in the post above for hfsplusutils are just impossible to gather at build time without running the tests on sample data (which reminds me of the uif2iso problem but this can get even more subtle: while it’s true that most --as-needed failure happen at buildtime, there are quite a few that will not hit until runtime; one such cases happened to me with libcompizconfig, compizconfig-python and fusion-icon: this last one software wouldn’t start because Python failed to load the second, because the first one wasn’t linking to libX11.

Now of course this could have been found if either libcompizconfig or compizconfig-python had a testsuite, but since I already said that running a tinderbox run with testsuite is probably not something that I would like to do on a daily basis.

Especially for old software, there are problems like endianness issues, 64-bit arches and PIC code that are almost impossible to figure out at buildtime, and that need to be checked during software use. But it’s not just that. For binary packages, especially those of proprietary software, there usually isn’t a testsuite, for this reason, their executables are rarely checked at runtime for consistency. This becomes a problem because sometimes you have software that links against old versions of libraries. This is the same reason why adding VirtualBox 2.1.0 binary package in the tree is going to take a while for Alessio: it uses the old ABI of libcap, which will require resurrecting, and maintaining, an old verison of libcap just for that. (I have a few more issues to talk about regarding the new VirtualBox release but I’ll get to that in another moment).

And yet, the reasons why neither my nor Patrick’s tinderbox can be a replacement for a more throughout approach to packages testing are not finished here. But before proceeding to more, I have to make a distinction between the different approaches me and Patrick took. Patrick’s tinderbox removes all the superfluous packages from the system when installing a new one, which is very good to test for missing dependencies; my method instead iterates over each of the packages in the tree and installs them one by one in the system, filling up the space, which can easily ignore missing dependencies but provides more interesting results regarding iteration of particular ebuilds.

So while my method glosses over broken runtime and buildtime dependencies, like pkg-config not depended upon and similar, Patrick’s method is not going to hit problems like dev-scheme/chicken breaking most of the Mono packages (that would pick up /usr/bin/csc as the C# compiler rather than mcsc), or collisions between unrelated packages.

This means that either one of the two tinderboxes is just not enough to find all the issues, and even the two of them together won’t be enough. Even adding AutoTua to that, it’s just not going to cut it. As Jeremy said on a blog post of mine, we need humans (developers and users) to report issues. I start to feel we also have a need for some real numbers of how many users use packages. Yes I know that’s going to be a popularity contest, and it’s likely that there will be people that would just go on to submit fake results, but even for tree cleaning, it’s important to know whether packages don’t have bugs failed against them because they are good, or just because nobody has used them in so much time.

Oh and so that you know, I currently have little less than 1500 bugs open that I reported (and over 3000 bugs that I reported since I started contributing to Gentoo), and all of them are reported by hand, there are still issues that force me not to use scripts like pybugz. I’ll see to write about them, maybe Zac can see to find a solution to those, like he has been doing quite a while lately for me. Thanks Zac!

Gentoo News

The time has come! Our release engineers have been refining their automated builds of the minimal CD and stage3 tarballs, and the first builds are uploaded to our mirrors. Select your favorite mirror and navigate to the /experimental/ directory. Under the x86, amd64, ia64, alpha, and sparc64 architectures, the autobuilds directory contains stages. So far, minimal CD images are only available for x86 and amd64.

We're still working to add automated builds for ppc, ppc64 and hppa as well as CD images for architectures lacking them. We built the stage3 tarballs from the latest stable packages. Fresh builds will show up every week, although sometimes we might skip a week if build problems crop up.

Because these builds are automated, they have not been rigorously tested as the old releases. Occasionally, you might run into problems. If that happens, just try a file from a different week.

Please try out these new builds and leave your feedback on the forums. As always, please report any bugs on Bugzilla.

Happy holidays!

Discuss this!

Ben de Groot contributed the draft for this announcement.

32bit-userland on Gentoo amd64 (December 20, 2008, 00:00 UTC)

Daniel Gryniewicz

For the past couple of weeks, I’ve been working on getting 32bit-userland working on Gentoo amd64.  It’s at least partly working now;  it boots, you can log in, and I’m in the process of emerging gnome.

However, it’s not a smooth road.  I had to use catalyst to make my own stages.  No amount of massaging or editing or copying or screaming got me from a 64-bit stage3 to a 32bit-userland.  In addition, there’s something wrong with my toolchain somehwere.  I can’t build sandbox, for example, and had to use a binpkg from my 64-bit system.  Also, the kernel fails to build it’s config programs, so I can’t configure a kernel.

Finally, there are a number of broken packages; that is, packages that detect in some way or another what bitness they think you’re running and then use ASM coded for that.  This, obviously, fails.  Fortunately, this is so far only 3 packages: glib, libgcrypt, and mesa.  We’ll see how many more I hit before I get a working system.

Just a note: I’m not posting any of my profiles yet.  It’s not yet working, and it’s not for faint of heart.  If you are really interested, give me a ping on IRC and I’ll see if I can help you.  Otherwise, just wait until I can lick it into shape.

Leave a comment

December 19, 2008
Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
Debug code and debug information (December 19, 2008, 23:59 UTC)

Diego Pettenò

There are many different but common misconceptions about debugging that are spread among those users who, having never learnt a programming language, cannot understand properly the difference between debug code and debug information. Some of these misconception causes misunderstanding with Gentoo’s way of handling the two things as separate and distinct feature of a software.

First of all, let’s start with what the -g, -ggdb and -g3 options are supposed to do. These three flags are used to add debug information, in form of either stabs or DWARF data, depending on the architecture, to the compiled files, may they be object files, shared objects or final executables. This data is used by debuggers like gdb to provide a meaningful backtrace, and is added to some special sections of the file. The difference between a file that is built with these options and a file that is built without those can be removed by using the strip command, since they don’t go touching the actual executable code or data entries. The only software that is susceptible to break with -g3 is the dynamic loader, and even that I’m not sure why.

The various level of debugging information are used to provide various level of backtracing, starting from giving the name of the functions called, and arriving to have the line numbers, the source lines, and macro expansion (which is especially useful when debugging stuff like scanelf, that is composed of a huge amount of macro-based meta-functions. Even when the full debug information is enabled in files, it’s not hindering performance, if not during the first scan and read of the ELF files, since the loader does not load the debug information by default, they are not in sections that are allocated in memory at runtime at all. (This is something you can easily understand once you know the difference between allocated and non-allocated ELF segments).

Debug code, instead, means adding special instruction in the executable code for debugging purposes; the most simple example is the assert() macro used to make sure that unexpected code paths are not taken; although this is often misused as a way to enact limitations in functions, the original idea behind assertions was to make the program die in a way easy to debug when a condition supposed to be always true was instead false. These checks wouldn’t be needed during standard usage, or should be handled gracefully if they indeed happen, so the assertions would just need to be taken out of the built code at that point, which is exactly what -DNDEBUG does. (On an autotools-related note, the AC_HEADER_ASSERT autoconf macro not only checks for the correct header, but also provides an easy to use --disable-assert option for the configure script to disable assertions altogether). Unfortunately nowadays assertions are often used to check the behaviour of code at runtime, even though an error would then cause the abort of the software, which makes it more difficult to just disable them altogether for final users.

But debug code can be much more complex, and might slow down operation a lot; it might be logging data extensively, it might fill the terminal with pointless information, it might check every and each step during processing. This type of code must certainly not be enabled for users’ runtime or their work would be greatly hindered.

Now that the distinctions are made, you can see why splitdebug/strip FEATURES are distinct from the debug USE flag. If you want to just get a backtrace for a crash you got during execution, you need debug information, you don’t need debug code; if possible, debug code might actually stop the software from crashing; as could reducing the optimisation flags. For users, it’s more than likely than the debug USE flag wouldn’t be useful at all; for developers who know what to do, this fine-grained control is most likely the best option they have.

So please next time you think about mixing the debug USE flag and the splitdebug/strip FEATURES in the same idea, try to think of what exactly you want to achieve. And no, disabling -O2 is not always a good idea to have a meaningful backtrace, especially since as I said, -O0 might make stuff not build, so you shouldn’t be ready to just enable that unconditionally to get a backtrace for a bug report.

December 18, 2008
Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)

Diego Pettenò

If you follow my blog since I started writing, you might remember my post about imported libraries from last January and the follow up related to OpenOffice you might know I did start some major work toward identifying imported libraries using my collision detection script and that I postponed till I had enough horsepower to run the script again.

And this is another reason why I’m working on installing as many packages as possible on my testing chroot. Now, of course the primary reason was to test for --as-needed support, but I’ve also been busy checking build with glibc 2.8, and GCC 4.3, and recently glibc 2.9 . And in addition to this, the build is also providing me with some data about imported libraries.

With this simple piece of script, I’m doing a very rough cut analysis of the software that gets installed, to check for the most commonly imported libraries: zlib, expat, bz2lib, libpng, jpeg, and FFmpeg:

    rm -f "${T}"/flameeyes-scanelf-bundled.log
    for symbol in adler32 BZ2_decompress jpeg_mem_init XML_Parse avcodec_init png_get_libpng_ver; do
    scanelf -qRs +$symbol "${D}" >> "${T}"/flameeyes-scanelf-bundled.log
    done
    if [[ -s "${T}"/flameeyes-scanelf-bundled.log ]]; then
    ewarn "Flameeyes QA Warning! Possibly bundled libraries"
    cat "${T}"/flameeyes-scanelf-bundled.log
    fi

This checks for some symbols that are usually not present without the rest of the library, and although it gives a few false positives, it does produce interesting results. For instance while I knew FFmpeg is very often imported, and I expected zlib to be copied in every other software, it’s interesting to know that expat as much used as zlib, and every time it’s imported rather than used from the system. This goes for both Free and Open Source Software and for proprietary closed-source software. The difference is that while you can fix the F/OSS software, you cannot fix the proprietary software.

What is the problem with imported libraries? The basic one is that they waste space and memory since they duplicate code already present in the system, but there is also one other issue: they create situations where even old, known, and widely fixed issue remain around for months, even years after they were disclosed. What preserved proprietary software this well to this point is mostly related to the so-called “security through obscurity”http://en.wikipedia.org/wiki/Security_through_obscurity. You usually don’t know that the code is there and you don’t know in which codepath it’s used, which makes it much harder for novices to identify how to exploit those vulnerabilities. Unfortunately, this is far from being a true form of security.

Most people would now wonder, how can they mask the use of particular code? The first option is to build the library inside the software, which hides it to the eyes of the most naïve researchers; by not loading explicitly the library it’s not possible to identify its use through the loading of the library itself. But of course the references to those libraries remain in the code, and indeed most of the times you’ll find the libraries’ symbols as defined inside executables and libraries of proprietary software. Which is exactly what my rough script checks. I could use pfunct from the seven dwarves to get the data out of DWARF debugging information, but proprietary software is obviously built without debug information so it would just waste my time. If they used hidden visibility, finding out the bundled libraries would be much much harder.

Of course, finding which version of a library is bundled in an open source software package is trivial, since you just have to look for the headers to find the one defining the version—although expat often is stripped out of the expat.h header that contains that information. On proprietary software is quite more difficult.

For this reason I produced a set of three utilities that, given a shared object, find out the version of the bundled library. As it is it quite obviously doesn’t work on final executables, but it’s a start at least. Running these tools on a series of proprietary software packages that bundled the libraries caused me some kind of hysteria: lots and lots of software still uses very old zlib versions, as well as libpng versions. The current status is worrisome .

Now, can somebody really trust proprietary software at this point? The only way I can trust Free Software is by making sure I can fix it, but there are so many forks and copies and bundles and morphings that evaluating the security of the software is difficult even there; on proprietary software, where you cannot be really sure at all about the origin of the software, the embedded libraries, and stuff like that, there’s no way I can trust that.

I think I’ll try my best to improve the situation of Free Software even when it comes to security; as the IE bug demonstrated, free software solutions like Firefox can be considered working secure alternatives even by media, we should try to play that card much more often.

Bernard Cafarelli a.k.a. voyageur (homepage, stats, bugs)
X2go ebuilds status update (December 18, 2008, 21:34 UTC)

Bernard Cafarelli

In a previous post, I spoke about new ebuilds for X2go client and server, a GPL remote desktop solution that's based on NX technology, but in a different way compared to nxserver. With lots of help from Joachim Langenbach in bug #249600, I'm glad to say now that ebuilds in the NX overlay for both client and server work fine, and will probably moved to portage soon (ldap management ebuilds will probably wait a bit longer in the overlay, as I cannot test them for now).

For pros and cons, X2go does not need a special "nx" user on the server, you can use your ssh private key (as you log in directly as your real user), both client and server are GPL are not limited in number of connections, remote mounting of directories is easy (via sshfs/fuse), administration of the server can be done via kde control panel elements (including ldap accounts, if you use it). However x2go requires a running postgresql database on the server, does not support VNC/rdesktop proxying or shadow sessions, and some of the nice advanced features seem reserved to dedicated thin clients setups (like saving your session on a usb key, ...).

Anyway, if you're curious to try it, 'layman -a nx' and then emerge either x2goclient or x2goserver depending on which computer you are ;)

Leave a comment

Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
Filesystems -- ext4dev fails (December 18, 2008, 18:45 UTC)

Diego Pettenò

flame@yamato ~ % touch /var/tmp/portage/test
touch: cannot touch `/var/tmp/portage/test': No space left on device
flame@yamato ~ % df -h | grep /var/tmp
                       32G  7.2G   23G  25% /var/tmp
flame@yamato ~ % df -i | grep /var/tmp
                     2097152  419433 1677719   21% /var/tmp

Now, a mount cycle later it worked fine, but it’s still not too nice since it caused all the emerge running to fail, just like XFS did, but without leaving trace on the kernel log, which makes it obnoxious since it’s hard to debug. I hope 2.6.28 is going to be better, certainly the tinderboxing is a nice way to stress-test filesystems.

I start to consider the idea of OpenSolaris, NFS, and InfiniBand…

Stuart Longland a.k.a. redhatter (homepage, stats, bugs)
Gentoo/MIPS Update (December 18, 2008, 10:34 UTC)

Stuart Longland

Hi all… figured I better update everyone on what’s happening on the MIPS front.

Kumba has been working on newer kernel ebuilds to support various platforms, specifically IP30, which has been troublesome of late. At present, the best kernel revision to use is still 2.6.23 on Cobalt, Loongson 2E and O2.

Another alternative, is to download your own kernels from the Linux/MIPS website (not kernel.org), and research the patches needed to get things running yourself… in fact… Lemote Loongson 2E, Cobalt Qube2 and SGI Indy/O2 users should find minimal to no patching is necessary as the vast majority of changes have already been accepted into the mainline kernel.

Stages… there have been no further stages built at the moment from the 2008.0 ones. Partly because some of us have been just too busy. I’ve started to make inroads into a uClibc-based set of stages however, having got a uClibc-0.9.30 toolchain built the other day targetted at mipsel-unknown-linux-uclibc. It is hoped a workable environment can be constructed in the coming months that may turn into a new set of stages available for this platform.

Desktop Applications… have been lagging quite a bit. I have some patches for Thunderbird 2.0 that gets things rolling again… and may just work for big-endian MIPS (which was broken at last check) but due to lack of time, I haven’t been able to investigate further. A similar set of patches got Firefox 3.0 partially working… more work needs to be done.

My own status… I’m not planning on leaving anytime soon… just been extremely busy. As it is now, I’m passed my 8:00PM bed time (need to be up at 4:00AM tomorrow, currently it is 8:35PM AEST), so I’ll leave it at that.

Leave a comment

Ben de Groot a.k.a. yngwin (homepage, stats, bugs)
Supporting Songbird (December 18, 2008, 01:47 UTC)

One of the Songbird developers wrote a good blogpost about the problems that distros meet when trying to support Songbird, an open source iTunes competitor. The post concentrates on Ubuntu, as one of the most popular distros, but the concerns raised there in essence are the same for all distros. We have our own bug open for this new package, and it’s not really going anywhere. For us a similar compromise as for other distros exists: we do have a songbird-bin ebuild in Sunrise overlay.

But nobody wants to maintain an extra copy of xulrunner, or backport Songbird’s patches to the system xulrunner (which is used by Firefox among other packages). The whole idea seems very Windows-like to me: take existing packages, patch them to bits, mash it together with your own application into one big binary package. This is certainly not the way things are normally done on the Linux side of things.

I would urge the Songbird developers to work with upstream (Mozilla in the case of Xulrunner) to get their patches accepted, or some other kind of solution to make Songbird and vanilla Xulrunner to work together nicely. That would make it a lot easier for us, and any other Linux distro, as well as the BSDs, to import this package into our official repositories and give it proper support.

In the comments to that post you can read that OpenSuse and Fedora have the exact same problems. With such a unanimous voice from the distributions, I would say the ball is now in Songbird’s court, if they care about Linux support.

December 17, 2008
g-ctan (December 17, 2008, 20:04 UTC)

Christian Faulhammer As Diego already wrote, there are special installation tools for language specific packages, like Gems for Ruby. TeX Live 2008 (which is in Portage) brings a package manager to update the system until the next release, although it circumvents the Gentoo package managers and is thus disabled in our current setup. Inspired by g-cpan I started creating a similar tool for TeX Live: Create ebuilds for the TeX Live packages and install them using a package manager suited for Gentoo, so fitting it into the normal Gentoo environment: I call it g-ctan.

There isn't really more than the name at the moment. I produced some code, which is not usable at the moment, as it lacks a proper user interface and is really untested as I develop it without an internet connection. If you are really brave take a look at the Bazaar repository set up for it. It is not ready, I say it again: NOT READY. Don't use it or it might eat your dog, but maybe have a look and comment on it, it is written in Bash, so understanding it should be feasible.

Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
Remote debugging with GDB; part 1: Gentoo (December 17, 2008, 18:52 UTC)

Diego Pettenò

In the last couple of days I had to focus my attention on just one issue, a work issue which I’m not going to discuss here since it wouldn’t make much sense either way. But this brought me to think about one particular point: remote debugging, and how to make it easier with Gentoo.

Remote debugging is a method commonly used when you have to debug issues on small, embedded systems, where running a full blown debugger is out of question. With GDB, this consists of running on the target system a tiny gdbserver proces, which can be controlled by a master gdb instance via either serial port or TCP connection. The advantages don’t stop at not needing to run the full blown debugger: the target system may also be equipped with stripped programs with no debug information, and keep the debug information entirely on the system where the master gdb instance is being executed.

This is all fine and dandy for embedded systems but it also does not stop to this, you can easily make use of this technique to debug issues on remote servers, where you might not want to upload all the debug symbols for the software causing the trouble, it then becomes a nice Swiss Army knife for system administrators.

There are a few issues you got to work with when you use gdbserver though, some of which I think should be improved in Gentoo itself. First of all, to debug a remote system that is running a different architecture than yours, you need a cross-debugger; luckily crossdev can build that for you, then you need the actual cross-built gdbserver. Unfortunately, even though the server is small and self-sufficient, it is currently only being built by sys-devel/gdb which is not so nice for embedded systems; we’d need a minimal or server-only USE flag for that package or even better a dev-util/gdbserver standalone package so that it could be cross-built and installed without building the full blown debugger which is not useful at all.

Then there is the problem of debug information. In Gentoo we already provide some useful support for that through the splitdebug feature, which takes all the debug information from an ELF file, executable or library, and splits it out in a .debug file that only contains the information useful during debugging. This split does not really help much on a desktop system, since the debug information wouldn’t be loaded anyway, my reasoning to have it separated is to make sure I can drop them all at once if I’m very short on space, without breaking my system. On the other hand, it is very useful to have it around for embedded systems for instance, although it currently is a bit clumsy to use.

Right now one common way to achieve proper archiving of debug information and stripping them in production is using the buildpkg feature together with splitdebug, and set up an INSTALL_MASK variable for /usr/lib/debug when doing the build of the root. The alternative is to simply remove that directory before preparing the tarball of the rootfs or stuff like that. This works decently, since the binary packages will have the full debug information, and you’d just need to reinstall the package you need debug information for without the INSTALL_MASK. Unfortunately this will end up replacing the files from the rest of the package, which is not so nice because it might change the timestamps on the filesystem, as well as wasting time, and eventually flash too.

This also does not play entirely nice with remote server administration. The server where this blog is hosted is a Gentoo vserver guest, it was installed starting from a standard amd64 stage, then I built a local chroot starting from the same stage, setting it up exactly as I wanted it to be; finally, I synced over the Portage configuration files, the tree and the binary packages built of all it, and installed them. The remote copy of the packages archive is bigger than the actual used packages, since it contains also the packages that are just build dependencies, but the overhead of this I can ignore without too much problems. On the other hand, if I were to package in all the debug information, and just avoid installing it with INSTALL_MASK, the overhead wouldn’t be this ignorable.

My ideal solution for this would involve making Portage more aware of the splitdebug feature, and actually split it out on package level too, similarly to what RPM does with the -dbg package. By creating a -debug or -dbg binpkg to the side of each package that would otherwise have /usr/lib/debug in it, and giving the user an option on whether to install the sub-package, it would be possible to know whether to merge on the root filesystem the debug information or ot, without using INSTALL_MASK. Additionally, having a common suffix for these packages would allow me to just ignore them when syncing them to the remote server, removing the overhead.

Dreaming a bit more, it could be possible to design multiple sub-package automatic generation, to resemble a bit what binary distributions like Debian and RedHat have been doing all these years, to split documentation in its -doc package, the headers and static libraries in -dev and so on. Then it would just require to give the user ability to choose which subpackages to install by default, and a per-package override. A normal desktop Gentoo system would probably want to have everything installed by default, but if you’re deploying Gentoo-based systems, you probably would just have a chroot on a build machine that does the work, and then the system would just get the subset needed (with or without documentation). Maybe it’s not going to be easy to implement, and I’m sure it’s going to be controversial, but I think it might be worth looking into it. Implementing it in a non-disruptive way (with respect to the average user and developer workflow) is probably going to make it feasible.

Tomorrow, hopefully, I’ll be writing some more distribution-agnostic instructions on how to remotely debug applications using GDB.

Petteri Räty a.k.a. betelgeuse (homepage, stats, bugs)
Binary package for icedtea6 (December 17, 2008, 17:01 UTC)

Petteri Räty

Quite a few people have reported problems building icedtea6 or needed dependencies on our IRC channel and as the build is quite resource intensive, Caster has now made binary builds for icedtea6. The package is available via layman using:

layman -a java-overlay
emerge icedtea6-bin

The binary package should also make it easier to bootstrap the from source build. The binaries are built in stable chroots so they should run for our stable users too. Please report any problems to https://bugs.gentoo.org with [java-overlay] in the subject. For amd64 users this should be the easiest way to get a 64 bit browser plugin.

Leave a comment

Hanno Böck a.k.a. hanno (homepage, stats, bugs)
Interview on FSFE webpage (December 17, 2008, 16:28 UTC)

Hanno Böck As an FSFE fellow, I got interviewed for their webpage.

You can read it here.

Leave a comment

December 16, 2008
Robin Johnson a.k.a. robbat2 (homepage, stats, bugs)

Robin Johnson

Now for the second set of statistics. These aren't directly useful to mirrors in estimating their traffic, but instead gives a good overview of how our mirroring setup works internally, and now much traffic is involved in the fan-out stage. Distfiles are the main content moved around by this system, but it is also used for the other directories for releases, experimental and snapshots.

A very quick overview of the existing setup:

  1. Developer uploads new distfile directly to dev.gentoo.org.
  2. The master-distfiles box pulls from dev.gentoo.org hourly.
  3. The master-distfiles box checks every ebuild, and downloads missing distfiles from their primary URI if they do not exist. The daily distfile report is also created at this point.
  4. Every hour, the cluster master of ftp.osuosl.org pulls the latest content from master-distfiles. (Averages 240MB/day of traffic).
  5. The OSL FTP cluster master (in Oregon) pushes to it's slave locations in Atlanta and Chicago.
  6. All distfiles mirrors pick up their content from one of the FTP nodes - Internet2-connected hosts are directed via DNS to an Internet2-connected slave for performance.

Each of the distfiles mirrors has about 140-160MB of upstream traffic every day (including both the new files and the rsync overhead for scanning). If there are no files changed, the rsync traffic for a directory scan is 1-2MB. While this isn't a lot of traffic, it's very spiky, as mirrors tend to be on fast links.

The new weekly builds from the Release Engineering team will probably be adding another 1.3GB per week, staggered as one arch per day.

I got a small subset of the logs from the OSU FTP cluster for processing some of these statistics. They cover the 24 hour period of 2008/08/07 UTC. It does not have data of which traffic went via Internet2, and I've grouped the sources by country code (using IP::Country::Fast from CPAN).

CC OutBytesCount, [Notes]
South America
AR 1498379141
BR 1498405221
==2996784362
Europe
AT 3202290562
BA 1498404221
BE 1464739661
BG 2199886072
CH 1496743121
CZ 8062803705
DE 149092997310
DK 2295154041
EE 1360037741
ES 4493037003
FI 1387115261
FR 7996356615
GB 3960190613
GR 4172227743 [1]
IS 1360037741
LV 1499118641
NL 4519136003
NO 1499088261
PL 6957242141
PT 2840207112
RO 3668540933
SE 4496643343
SK 1498405681
== 868367059055
Asia/Oceania
AU 2974020902
JP 4493696853
KR 4509289423
RU 1972457562
SG 1356810941
TH 1358357761
TW 4927311704
== 215919451316
North America:
CA 7429692847
US 317491485824
== 391788414231
Middle East:
IL 1935272832
KW 1497725501
== 3432998333

Grand Total:
==15403727514 bytes107

[1] One Greek mirror was excluded from the traffic and counts, as this was their catchup sync with 7Gb of traffic after some hardware-related downtime.

As a bit of analysis, I think that more than half of our mirrors (Europe, Middle East, RU) would benefit from having a box to sync against in Europe.

Leave a comment

gentoo mirrors stats: a rsync.gentoo.org box (December 16, 2008, 21:37 UTC)

Robin Johnson

I was doing some statistics about Gentoo mirrors to see about future plans, and thought that the indirect crowd that read my blog via the various aggregators might be interested in numbers.

These are the traffic for boobie.gentoo.org, which is a newer box in the official rsync.gentoo.org box directly maintained by the Infrastructure team. Hardware specs are 2x Xeon 3050 @2.13Ghz, 4GB RAM. Disk is mostly irrelevant - the rsync workload is served purely from RAM (tail-packing reiserfs, backed via loop device pointing to a file on tmpfs).

Inbound traffic is spiky, but does not exceed 10Mbit by more than a little bit - we can the inbound rsyncs from the rsync1 master to 10Mbit. Outbound traffic varies between 4Mbit and 9Mbit, with an average around 6-7Mbit.

DateInBytesInBPSOutBytesOutBPS
2008-12-0124510353412836859523455410688928
2008-12-0223251768542691154877643699635157
2008-12-0321678292492509050850785431588550
2008-12-0422273424352577950823673845588236
2008-12-0521820142142525450558268814585165
2008-12-0620394684352360447476164351549492
2008-12-0719065284552206650327689263582496
2008-12-0821277927972462752759944753610647
2008-12-0923277314192694156661069093655799
2008-12-1022462625702599852107127647603091
2008-12-1123025726732665053602727876620401
2008-12-1220771853122404147108235487545234
2008-12-1321621937092502550807583749588050
2008-12-1416987667881966143678479520505537
2008-12-1523701326092743258353939353675392

Leave a comment

Steve Dibb a.k.a. beandog (homepage, stats, bugs)
mplayer-resume-1.6 (December 16, 2008, 20:41 UTC)

Steve Dibb

I just finished updating and pushing mplayer-resume-1.6 into the tree.  I’ve actually been sitting on the update for a long time, just never got around to releasing it.

There has only been a small change — the script will check mplayer’s exit code to see if it died on something.  I added it since I hit a bug on my frontend where some files wouldn’t resume, and it would delete my resume point anyway.  Kind of annoying.  This update fixes that, and really, that’s it.

Leave a comment

Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
Follow up on the tests; looking for CC-BY content (December 16, 2008, 20:24 UTC)

Diego Pettenò

I’ve written about my idea of writing my own testsuite for uif2iso and using CC-BY-NC-SA music from Jamendo to do the trick, unfortunately it seems like I cannot do that:

If your project is non commercial, you can use the music without paying for a license as long as your project respects the rules of the Creative Commons (http://www.jamendo.com/en/creativecommons). It means that Gentoo has to be distributed under a Creative Commons License. If not, then you do have to buy a license, even if it is a non-commercial project.

Seems like mere aggregation becomes a problem too. Coincidently there was a poll on the Creative Commons site about the NC clause the other day, and I already expressed there my doubts about the “mere aggregation” case.

As it is, it becomes a problem for me to use the album by Countdown for my testsuite project, which actually makes me a bit sad since I really liked the album and would have liked to give the testsuite a fun character with something I liked. I guess I’ll have to find something else.

So if somebody knows where I can find some CC-BY content, I’d be glad to hear it; my idea was to use an image and an audio file, just to have two different size magnitudes. Metal would probably be more acceptable, but I guess anything at this point works. My reason for looking for those is that they can be easily used for other type of tests, for instance mp3 or OggVorbis files can be used for tag reading/writing programs for testing purposes.

On a different note, thanks a lot to the (anonymous) user who sent me The Hitchhiker’s Guide To The Galaxy radio series, tonight I have something to look forward to when I’m done filing bugs!

Steve Dibb a.k.a. beandog (homepage, stats, bugs)
planet admin stuff (December 16, 2008, 17:49 UTC)

Steve Dibb

I’m working on cleaning up some planet stuff again, and for Planet Larry I made a small policy shift — if your feed is spitting out partial feeds, I’m not gonna accept it anymore.  Currently it only affected like two people, I think (unless I missed someone), so if you wanna get back on … fix it. :)

I realize it’s a small case of me shoving my own preferences down the pipe, which is something I avoid as much as possible.

If I’m going to add on one more asinine policy requirement, I figure it’s fair that I take one away as well, though most people probably don’t notice or care about this one. I prefer to have the blogger’s name show up as the blog title, and have in just about every case (minus one) forced them to be that way.  But, I’ve changed my mind there as well, so if you want to customize the name on the feed, I can do that for you.

An example would be that my blog (wonkablog) shows up in the list as Steve Dibb (my name).  So, if you wanna change it from displaying your name to something else, just drop me an email.

And, as always, more bloggers are welcome to sign up. :)

Leave a comment

Tobias Klausmann a.k.a. klausman (homepage, stats, bugs)
Leading the pack (December 16, 2008, 14:45 UTC)

So about two days ago, Jose Luis Rivero (YosWinK) stepped down as the Alpha Arch Team Lead. This is mostly due to a lack of time. Looking at what's left of the Alpha Arch Team (me, Raúl Porcel (armin76) and Fernando J. Pereda (ferdy)), it was a question if I or Raúl steps up. Since Raúl already has the honor of being the Arch Lead for both Sparc and Itanium, The answer is a no-brainer: I get to do it.

So the question is how much leading I'm going to do. For one thing, I'll try to update this blog more often. Also, the state of Alpha Linux needs addressing. That last link brings me to another thing I feel the need to mention: Matt Turner (mattst88) has been doing a ton of work for Alpha, both in bugging people about fixes and in generally doing community work. On top of that he has fixed several long-standing bugs and is part of the reason why we have less than twenty open bugs where Alpha is CCed or directly concerned. His blog post also outlines several of the more pressing problems we face today: 2.6.28-rc* does not compile on Alpha, glibc >2.6.1 has a test regression (actually a kernel bug) and Xorg-X11-1.5 does not work at all on Alpha (this is a problem between the X server and the kernel).

While we're talking about community stuff, I'd like to recommend the Alpha Linux Wiki. It's not overly Gentoo-centric but rather tries to be a central repository of knowledge concerning Linux on Alpha.

Finally, I'd like to ask the users out there what they want to see in Alpha in the future. This question may seem vague at best, but I really wonder what people use Alphas for today and what they hope they will be able to do with them tomorrow. Feel free to brainstorm wildly, we can always ignore the more impossible tasks. Most of all, I hope we can fill the community with new vigor.

Ryan Hill a.k.a. dirtyepic (homepage, stats, bugs)
package testing (December 16, 2008, 02:07 UTC)

Ryan Hill Recently, Diego brought up a subject that I've been meaning to talk about for a while.

Besides arguing at people on mailing lists, the majority of my time in Gentoo is spent on gcc-porting work; basically, making sure that the packages in the tree build with the next upcoming GCC release. Right now we're working on getting stable ready for GCC 4.3 (huge thanks to everyone that's helped w/ this), and I've also been building the tree with 4.4. As I've mentioned here before, the 4.3 transition has been a bit of a bitch, and judging by Patrick and Diego's efforts that even now continue to unearth packages that are broken by 4.3 (and even 4.2 and 4.1(!)) we still have a long way to go.

Generally with 4.3, broken packages are immediately obvious as the vast majority of errors happen at compile time (usually missing header includes). For whatever reason, however, with 4.4 I've found the majority of issues I've hit have not exposed themselves during the compile, but later at runtime. Because of this, I've become increasingly dependent on package testsuites to catch these errors. Unfortunately, the state of FEATURES=test has been and continues to be a pet-peeve of mine - more-so now than ever.

I keep a running list of testsuites that are known to be broken so I can disable tests on a per-package basis with an ugly hack*. I don't have access to my laptop at the moment, but last I remember it was over 40 pkgs. I have 19 masked here on the desktop but I'm in the process of rebuilding it as a stable box and don't have a lot of stuff installed yet.

Now I don't mind finding these and filing bugs. The more of this stuff that gets fixed, the less trouble for me and for everyone else in the long run. But I do end up spending a lot of time chasing down failures, determining if they're caused by GCC or some unrelated error, checking if they've been reported or not, seeing if it's an upstream problem or something Gentoo-specific, tracking down patches, etc. etc. On my first run of building @system with 4.4, I ended up with ~15-20 failed testsuites. After I spent a couple days weeding out the failures already reported and filing bugs for those that weren't, I was left with 2 packages that were actual errors caused by GCC 4.4 - glib and flex (and a handful of stuff broken due to glib).

This can get kinda frustrating.

I'm not sure what the point of this post is, except to rant I guess. It would definitely help if people took testsuites seriously (though this has gotten much better over time). If your testsuite fails, report it upstream. If it's Gentoo-specific, fix it or RESTRICT tests if you can't. Run with FEATURES="test" and report the failures you find. I think the end result of doing these things will be a more robust and stable tree, which is good for everyone.

Every so often someone starts a thread on g-dev about enabling tests by default. But until these tests actually /work/ they're worse than useless - it just perpetuates the idea that testsuites are pointless and encourages people to turn them off.

Enabling them for the dev profiles on the other hand...



*

kali ~ # cat /etc/portage/env/media-libs/gstreamer-0.10.21 
FEATURES=" ${FEATURES}"
FEATURES=${FEATURES/ test/}

Zac has shown me a nicer approach in bug #44796 that I haven't gotten around to scripting yet.

Leave a comment

December 15, 2008
Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
I'd rather keep myself away from gems (December 15, 2008, 15:51 UTC)

Diego Pettenò

Update: since Reddit an DZone picked this up, and people still look at this post and just this post, please also check my followup on RubyGems thanks.

I’m obviously referring to Ruby Gems.

If you follow Debian developers blogs at Planet Debian, you probably already know that some of them are on a crusade against RubyGems. I happen to agree wholeheartedly with that.

While the idea behind gems is pretty cool to standardise installation of libraries among heterogeneous systems, it has one big drawback: it takes the control out of a system’s standardised package manager, like Portage, like apt-get, like yum, and so on. While certainly a non-system package manager might be better than no package manager at all, and thus saves the hordes of Ruby on Rails users from having to install all the dependencies by hand, it should really allow for proper packaging of the libraries through the distribution, rather than taking over entirely.

There are even more arguments against gems when it comes to source distributions like Gentoo; one nice thing that Gentoo allows developers and users alike to implement is checking and changing the code around, like applying custom patches, or checking for particular type of code we might not want to have on our system. This can be folded up in further QA checks or particular checks for known broken boilerplate code (a similar situation happens – or at least happened – on the Gentoo/FreBSD profile, where I added code to check for one particular piece of gnulib that would have caused known runtime errors). RubyGems take those features away.

Because of the way these features are implemented (with phases) and the way RubyGems can only get installed, it is basically impossible to patch them before compiling, check the sources after unpack for known broken or insecure code, and much worse it is impossible to properly implement the test features!

This is particularly nasty since, as I said in my previous post, the test feature already saved me from committing a broken ruby-prof into ~amd64 last week, thanks to the fact that I switched that ebuild from gem to tarball, installing it “by hand” on the ebuild, so that the src_test function could be properly implemented. This is probably the best reason for not using gems I can think of, but certainly not the only one.

You can add to that that gems always install the tests code rather than just using it during test and then leaving it a part, you can add that they all install in their own subtree not meshing well with the rest of the system, you can add that a copy of the gem is kept on the system as “cache”, but not in /var/cache a sone would expect it to be but in /usr/lib (and lib64 for multilib).

If you take for instance rake, that installs through gem on Gentoo, you can find, among other things, that there is a rake.1.gz file that contains rake’s man page. But it does not get installed because it’s part of the gem, rather than being handled through doman.

Now, all that has been written about gems is probably true of many other similar technologies, like Python Eggs or Maven, as far as I know, and it shouldn’t be taken as a critique of Ruby as a whole. Just to say, Ruby is my favourite language. It just needs to be more polished around and to work more closely with vendors (distributors) so that it gets seamless with the rest of the system.

December 14, 2008
Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
RubyGems, CPAN and other languages (December 14, 2008, 15:15 UTC)

Diego Pettenò

I’m surprised that my previous post about rubygems got so much coverage, since I really didn’t find I added much to the common knowledge about RubyGems shortcomings. It’s not like I’m just piling up together with the Debian guys on the “gems bashing” just for fun. My switch away from gems for the packages I maintain started a few weeks ago already, and I’ve spoken with Hans about this at the time too. Now, let me try to address some of the concerns that people seem to bring up, since I’m not the kind of person who throws a rock and then hide to see the results.

As Alex said, it is actually possible to patch up Ruby Gems; and indeed I knew how to do that myself, but… it takes unpacking and repacking the files, which is generally a waste of CPU time and that is not really something that I would call “feasible” just to fix the code, when we do the same thing without any kind of issues for a huge amount of software already. Also, as he also pointed out, log4r and other gems don’t really use the tar format, instead it seems to contain some YAML-formatted list of base64-encoded files. Not nice, no.

On the other hand, Elias added that the problem is shared by all common toolkit-specific package managers: PHP/PEAR, Ruby/Gem, Python/Egg, Perl/CPAN, TeX/CTAN. This is probably right, although I think I have something to add here since lots of people seem to think that CPAN and RubyGems are on the same page, when they certainly are not, as Debian developers already pointed out. As for what concerns Python Eggs, and PHP PEAR, I have no experience working with them, while I know the Gentoo Python team does not like Eggs for just about the same reason why Ruby team does not like Gems.

As Wouter Verhelst points out:

There’s CPAN.pm, which does much the same thing as RubyGems; but much of CPAN can be easily turned into a Debian (or RPM, or whatnot) package. The few cases where it can’t, you’re usually dealing with a broken CPAN package, anyway.

He’s perfectly right here, CPAN modules can be easily turned into distribution-specific packages, included ebuilds thanks to g-cpan. The reason for this is that instead of inventing its own freaking file format, CPAN uses standard tarballs or ZIP packages, and a specific structure of the files inside of the package. Once you know how the structure for a package is, implementing downstream-specific packaging of such tools is very quick, and still allows for all the versatility that downstream package manager require.

For the little I know about it, I think CTAN does just the same, and indeed Wouter states that too:

There are similar things for Python (egg), and, heck, even TeX (CTAN). The fact that other scripting languages have proper and working packaging systems only outlines that there really isn’t an excuse for the horrors of RubyGems.

I think that Wrobel’s post is indeed a very important reading because it summarise the fact that the argument that Gentoo and Debian have against RubyGems is not that there shouldn’t be a language-specific package manager for Ruby, but rather that we would have certainly liked a better-designed package format that could suit both the system-independent packaging and the downstream packaging at once, allowing for proper integration between modules installed by users and by the distribution.

The fact is that beside gems there is no vast and common standardisation of practises between Ruby packages, which makes the role of distributions much more complicated than it has been historically for Perl, Python, TeX and the like. What do I mean? Well, take extconf.rb and setup.rb files that are often used to build binary C-based extensions for Ruby: they are not generated by tools like autotools or distutils, and instead they are copied and morphed from package to package, causing them to have subtly different syntax and stuff like that. To use a DESTDIR-like parameter (to install in a subtree before packaging) some require you to specify that during install phase only, others will require you to pass it on all the parameters. One would expect that Rake could have brought some more standardisation in packaging, but it’s not the case either.

For once, Rake does not usually have an “install” task, and even less one that taking a DESTDIR parameter to install in an offset. This is something I’ll probably try to find a solution for once Ruby-Elf arrives to a point where a release is needed, because I don’t intend to use RubyGems as my primary form of distribution, quite obviously. But it does not limit to that: even the tasks that are usually common between packages don’t follow the same interface. Some packages will use “rake test” for running the testsuite, others “rake spec” and others “rake rspec” because they don’t use Test::Unit but rather Spec. Some packages will build the HTML documentation with “rake doc” and others with “rake rdoc”.

I think that the underlying problem here is that Ruby has been really the most “magic” of the languages. While this is very nice for the developers, it is not always good; sometimes having too much magic around can make integration or debugging very hard, just like automagic dependencies make it difficult to properly package software, Ruby magic can be a hinderance when doing something that goes a bit away from what the mainstream developers do.

Now, since just criticising software is rarely useful, let me try to explain what is my plan to resolve, or work around, the issue. First of all, I’ll see to work with Hans and Alex, as soon as I have time, to find a way to simulate the presence of a gem when the package was installed by the ebuild using a tarball, so that there is no loss of magic when using the ebuilds themselves. Then I’m going to try preparing a distribution-friendly “install” task for Rake, as I said first and foremost for RubyElf but I’m going to release it as-is so that other projects can use it too, and try to standardise it.

But these are little steps; what I’d like to do, but I lack the time to, is writing a specific about packages installation and design for Ruby so that a project following that specific can not only build gems for “magic” installation on heterogeneous systems, but also prepare tarballs that distribution can turn into proper packages without having to deal with black magic. This would not mandate a particular file format like gems are doing, but rather a particular directory structure or Rake-based interface. Once the same exact steps can be run for any given package following the specification, it’s going to be just enough for the distributions.

Daniel Drake a.k.a. dsd (homepage, stats, bugs)
libusb-1.0.0 released (December 14, 2008, 12:14 UTC)

I have released libusb-1.0.0. libusb is a library which allows you to write applications that interact with USB devices, without the requirement of writing a kernel device driver.

The new libusb-1.0 branch includes new features and improvements over previous versions of the library. Here is a brief run-down, see the release announcement for more details:

  • Support for isochronous endpoints.
  • Asynchronous I/O for advanced users.
  • A simple, synchronous I/O interface also exists (in the style of libusb-0.1).
  • Lightweight with very few dependencies
  • Thread safety
  • Power saving
  • Reduced CPU usage and power drain
  • Increased USB throughput
  • Detailed API documentation
  • Compatibility with libusb-0.1 through the libusb-compat-0.1 compatibility layer

Leave a comment

Josh Saddler a.k.a. nightmorph (homepage, stats, bugs)
Benchmarks: gtk+ engines (December 14, 2008, 06:12 UTC)

Josh Saddler

Here are some fast and dirty benchmarks of various gtk+ engines installed on my system, using app-benchmarks/gtkperf-0.40.

Notes on the hardware:

CPU: Athlon 64 X2 4600+
Graphics: nVidia 7600GT, DVI 1440x900 @ 60Hz
RAM: 4GB DDR2-667
Mobo: ASUS M3N78-VM

Notes on the testing environment:

OS: Gentoo Linux (duh)
Kernel: Linux 2.6.27-gentoo-r2 #3 SMP PREEMPT x86_64
nvidia-drivers: 177.82
CFLAGS: -march=athlon64 -O2 -msse3 -fomit-frame-pointer
DE: Xfce 4.4.3
- Xfwm4 with Composite enabled, effects: drop shadows & transparency
- Open applications: 1 instance each of www-client/mozilla-firefox, app-editors/gvim, xfce-extra/terminal
- Cairo: 1.6.4, compiled with glitz support. Not all engines use Cairo, but those that do should benefit from a small speed increase.

The gtk+ engines are all available in Portage. If you're not on Gentoo, look in your distribution's repositories or check here. Custom themes are noted with *. These are personal themes I've made, nothing more than simple color modifications of an existing freely available theme. No additional images are used, so rendering time should not be affected.

All tests were conducted 3 times, using a Test Round setting of 100. I picked the best score of the 3, as I was looking for best-case usage conditions. The results are ranked in order from fastest to slowest.

Engine: Mist
Theme: Mist

GtkEntry - time: 0.01
GtkComboBox - time: 0.53
GtkComboBoxEntry - time: 0.47
GtkSpinButton - time: 0.09
GtkProgressBar - time: 0.03
GtkToggleButton - time: 0.13
GtkCheckButton - time: 0.06
GtkRadioButton - time: 0.24
GtkTextView - Add text - time: 0.28
GtkTextView - Scroll - time: 0.13
GtkDrawingArea - Lines - time: 0.28
GtkDrawingArea - Circles - time: 0.35
GtkDrawingArea - Text - time: 0.29
GtkDrawingArea - Pixbufs - time: 0.16
---
Total time: 3.07

Engine: Xfce
Theme: Xfce

GtkEntry - time: 0.03
GtkComboBox - time: 1.12
GtkComboBoxEntry - time: 0.50
GtkSpinButton - time: 0.06
GtkProgressBar - time: 0.04
GtkToggleButton - time: 0.14
GtkCheckButton - time: 0.07
GtkRadioButton - time: 0.06
GtkTextView - Add text - time: 0.27
GtkTextView - Scroll - time: 0.17
GtkDrawingArea - Lines - time: 0.27
GtkDrawingArea - Circles - time: 0.35
GtkDrawingArea - Text - time: 0.31
GtkDrawingArea - Pixbufs - time: 0.16
---
Total time: 3.56

Engine: Rezlooks
Theme: Blue Ink*

GtkEntry - time: 0.07
GtkComboBox - time: 0.95
GtkComboBoxEntry - time: 0.65
GtkSpinButton - time: 0.06
GtkProgressBar - time: 0.03
GtkToggleButton - time: 0.28
GtkCheckButton - time: 0.28
GtkRadioButton - time: 0.39
GtkTextView - Add text - time: 0.34
GtkTextView - Scroll - time: 0.15
GtkDrawingArea - Lines - time: 0.27
GtkDrawingArea - Circles - time: 0.36
GtkDrawingArea - Text - time: 0.29
GtkDrawingArea - Pixbufs - time: 0.17
---
Total time: 4.31

Engine: Industrial
Theme: Industrial

GtkEntry - time: 0.08
GtkComboBox - time: 1.52
GtkComboBoxEntry - time: 1.04
GtkSpinButton - time: 0.12
GtkProgressBar - time: 0.05
GtkToggleButton - time: 0.59
GtkCheckButton - time: 0.35
GtkRadioButton - time: 0.39
GtkTextView - Add text - time: 0.39
GtkTextView - Scroll - time: 0.21
GtkDrawingArea - Lines - time: 0.28
GtkDrawingArea - Circles - time: 0.36
GtkDrawingArea - Text - time: 0.28
GtkDrawingArea - Pixbufs - time: 0.17
---
Total time: 5.86

Engine: Glider
Theme: Glider

GtkEntry - time: 0.04
GtkComboBox - time: 1.93
GtkComboBoxEntry - time: 1.62
GtkSpinButton - time: 0.42
GtkProgressBar - time: 0.02
GtkToggleButton - time: 0.25
GtkCheckButton - time: 0.19
GtkRadioButton - time: 0.32
GtkTextView - Add text - time: 0.37
GtkTextView - Scroll - time: 0.29
GtkDrawingArea - Lines - time: 0.28
GtkDrawingArea - Circles - time: 0.36
GtkDrawingArea - Text - time: 0.31
GtkDrawingArea - Pixbufs - time: 0.17
---
Total time: 6.59

Engine: Pixmap
Theme: Elegant Autumn*

GtkEntry - time: 0.09
GtkComboBox - time: 1.64
GtkComboBoxEntry - time: 1.34
GtkSpinButton - time: 0.24
GtkProgressBar - time: 0.17
GtkToggleButton - time: 0.52
GtkCheckButton - time: 0.48
GtkRadioButton - time: 0.89
GtkTextView - Add text - time: 0.69
GtkTextView - Scroll - time: 0.22
GtkDrawingArea - Lines - time: 0.26
GtkDrawingArea - Circles - time: 0.36
GtkDrawingArea - Text - time: 0.28
GtkDrawingArea - Pixbufs - time: 0.17
---
Total time: 7.37

Engine: Clearlooks
Theme: Glossy

GtkEntry - time: 0.08
GtkComboBox - time: 1.93
GtkComboBoxEntry - time: 1.45
GtkSpinButton - time: 0.40
GtkProgressBar - time: 0.29
GtkToggleButton - time: 0.61
GtkCheckButton - time: 0.50
GtkRadioButton - time: 0.59
GtkTextView - Add text - time: 0.41
GtkTextView - Scroll - time: 0.32
GtkDrawingArea - Lines - time: 0.27
GtkDrawingArea - Circles - time: 0.35
GtkDrawingArea - Text - time: 0.31
GtkDrawingArea - Pixbufs - time: 0.18
---
Total time: 7.68

Engine: Candido
Theme: Graphite Light

GtkEntry - time: 0.08
GtkComboBox - time: 2.10
GtkComboBoxEntry - time: 1.86
GtkSpinButton - time: 0.17
GtkProgressBar - time: 0.26
GtkToggleButton - time: 0.63
GtkCheckButton - time: 0.53
GtkRadioButton - time: 0.60
GtkTextView - Add text - time: 0.48
GtkTextView - Scroll - time: 0.25
GtkDrawingArea - Lines - time: 0.28
GtkDrawingArea - Circles - time: 0.36
GtkDrawingArea - Text - time: 0.29
GtkDrawingArea - Pixbufs - time: 0.17
---
Total time: 8.05

Engine: Aurora
Theme: Aurora

GtkEntry - time: 0.47
GtkComboBox - time: 3.78
GtkComboBoxEntry - time: 3.50
GtkSpinButton - time: 0.96
GtkProgressBar - time: 0.31
GtkToggleButton - time: 1.53
GtkCheckButton - time: 1.29
GtkRadioButton - time: 1.66
GtkTextView - Add text - time: 0.58
GtkTextView - Scroll - time: 0.46
GtkDrawingArea - Lines - time: 0.31
GtkDrawingArea - Circles - time: 0.38
GtkDrawingArea - Text - time: 0.32
GtkDrawingArea - Pixbufs - time: 0.19
---
Total time: 15.73

As you can see, the older engines are generally the fastest, with the more modern Rezlooks engine coming in close behind. Though they're generally not as attractive, the old Mist and Xfce engines turn in very respectable rendering times. The Pixmap engine actually doesn't score too well, coming in at the lower middle of the pack. This is despite many reports I found via Google that suggest it's one of the best-performing engines out there. Not so much; it's about average.

But by far the worst performing engine is Aurora. Now, to be fair, Aurora does many graphical tricks the other engines do not. It came along some time after old engines like Pixmap, Industrial, Mist, and Glider. It features animated scrollbars, gauges, and many possible styles of dropdowns and arrows. In short, it's fully loaded. Yet it also doesn't seem to be optimized; at 15.73 seconds, it's almost twice as slow as the nearest contender, Candido.

The results for the Aurora engine were so dismal that I re-ran gtkperf another 3 rounds, thinking something was amiss. Every result turned in times between 15 and 16 seconds. Clearly, Aurora isn't the engine to use if you're on old hardware.

Conclusion:

Remember, these are down and dirty benchmarks. Cherry-picking the best time out of 3 runs may not be the most fair way of measurement, but since no single result varied more than 2 seconds either way, it can be considered pretty well representative of the engine's overall capabilities.

If you're on less capable hardware, the Mist and Xfce engines will go far. If you want something prettier, stick with Rezlooks. I have several screenshots of Rezlooks-based environments in my devspace. It's quite flexible, and it's still in the top three fastest engines, despite including goodies like subtly animated progress bars and gauges.

But even on my fairly powerful workstation, newer engines like Candido and Aurora were noticeably slower, suggesting they might not be a good fit for older hardware. Clearlooks and Pixmap are middle-of-the-road choices; neither has much of an advantage. It comes down to which engine you think has prettier themes.

Me? I stick with Rezlooks. And occasionally Clearlooks (the Glossy theme makes for a good wintry desktop foundation), and very occasionally I'll find a decent Pixmap theme that's worth modding for my system. Otherwise, it's Rezlooks all the way.

Leave a comment

December 13, 2008
Jeremy Olexa a.k.a. darkside (homepage, stats, bugs)
Gentoo Prefix Updates (December 13, 2008, 14:51 UTC)


It has been awhile since I last wrote about the Gentoo Prefix project. I will update the inquiring minds that want to know…

  • Gentoo Prefix’s irc channel is now #gentoo-prefix. We use to inhabit #gentoo-alt but had some reports that new users were looking for us in -prefix. Also no one involved with the Prefix project had administrative powers over the old channel either. Since we were the only users of the -alt channel, I also had a redirect set up from there to the new channel.
  • New style profiles are done. Before I joined the Prefix project, our Linux support needed some love. The old profiles were mimicking the default-linux ones in gentoo-x86 but they didn’t do inheritance very well. The new style profiles for Linux inherit the 2008 Gentoo profiles and allow Gentoo Prefix users to exploit the work done by the x86 & amd64 arch teams automatically. The old profiles contained a static multilib mask and other files.  Since Gentoo Prefix is anything but ‘default’ we chose a new root directory in $PORTDIR/profiles/ called ‘prefix’ - this seemed to make the most sense. The new profiles are designed to go into the portage tree when appropriate without any major structure changes. Long story short, soon we will be deprecating the default-prefix/ profiles in favor of the new style.
  • We set up another rsync mirror. As expected, the load is balanced pretty well now.
  • Over 2000 packages in the Prefix tree.  Roughly 15% of the Gentoo portage tree.

I’m excited for this project (still). It seems that we have a new active user or two every week, submitting bug reports, helping out in irc, etc.

Thanks for listening.

      

December 12, 2008
Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
Have you tested that? (December 12, 2008, 02:07 UTC)

Diego Pettenò

Even though I’ve heard Patrick complaining about this many times, I never would have been able to assess how much of the tree goes untested if I didn’t start my little own tinderbox. Now, I’m probably hitting more problems than Patrick because I’m running ~arch (or mostly ~arch) with --as-needed enabled, but it still shows that there is a huge amount of stuff that needs to be fixed, or dropped.

Up to now I’ve been using GCC 4.1, and still hit build failures with it; now I’ve switched to GCC 4.3, even though the tracker shown a bad situation already; and of course there are packages that didn’t have bugs opened just yet, because nobody built them recently.

Still, supporting the new compilers is not my main concern sincerely; there are packages that won’t build with GCC 4.3 just yet, like VirtualBox, as there are packages that still don’t compile with GCC 4.0. What concerns me is that there is stuff that hasn’t been tested at all. For instance, sys-fs/diskdev_cmds which was marked ~amd64 was totally broken, with fsck.hfs causing a Segmentation Fault as soon as it was executed (the version that is now available works, the old one has been taken out of the keyworded tree).

Since even upstream sometimes fail, one should also take into consideration the packages’ tests, possibly ensuring their failures are meaningful, and not just “ah this would never work anyway”. If you check dev-ruby/ruby-prof, the test suite is executed, but a specific test, which is known to fail, is taken out of it first. This is actually pretty important because it saves me from using RESTRICT to disable the whole testsuite, and executing the remaining tests helped me when new code was added to support rdtsc on AMD64, which was broken. The broken code never entered the tree, by the way.

Unfortunately doing a run with FEATURES=test enabled is probably going to waste my time since I expect a good part of the tree to fail with that; with some luck, if Zac implements me a softfail for tests, I’ll be able to do such a run in the next months. I wonder if the run this time will be faster, I’ve moved my chroots partition to use ext4(dev) rather than XFS, and it seems to be seriously faster. I guess once 2.6.28 is released I’ll move the rest of my XFS filesystems to ext4 (not my home directory yet though, which is ext3, nor the multimedia stuff that is going remain HFS+ for now).

My build run also has some extra bashrc tests, beside the ones I already written about, that is the checks for misplaced documentation and man pages. One checks for functions from the most common libraries (libz, libbz2, libexpat, libavcodec, libpng, libjpeg) that gets bundled in, to identify possibly bundled-in copies of those, another checks for the functions that are considered insecure and dangerous by libc itself (those for which the linker will emit a warning). It is interesting to see their output, although a bit scary.

Hopefully, the data that I gather and submit on the bugzilla for these builds will allow us to have a better, more stable, and more secure portage tree as the time goes by. And hopefully ext4 won’t fry my drives.

December 09, 2008
Ryan Hill a.k.a. dirtyepic (homepage, stats, bugs)
gone (December 09, 2008, 23:35 UTC)

Ryan Hill offline until i can find a replacement ac adaptor for the laptop. if you need me to see something, send it to gmail. i can check that at school.

Leave a comment

December 07, 2008
Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
Again PIC, and executables this time (December 07, 2008, 17:21 UTC)

Diego Pettenò

At the end of November, I’ve read an interesting in-deep look at what PIC code is on Planet Debian; although it wasn’t really perfect in my opinion (as I commented on that post in particular it seems to give the impression that x86 text relocation option is better than AMD64 pc-relative approach, which in my opinion is not the case at all) it is a good explanation for most power users still unsure of what the problem is.

Now, as you can see on that post, the problem with PIC and text relocation is usually related to just shared libraries, since executables get loaded always at the same address in memory and thus require no relocation for their symbols. While this is the case for most common scenarios, there are cases when you want to relocate executables, too. For instance if you enabled randomisation of the load address as a security mitigation strategy. When that is the case, we say that PIE was enabled: Position Independent Executables.

in PIE-enabled systems, the address used to load an executable can vary between executions, which means that the references to jumps and data will not be at a fixed address in memory any longer, just like a shared library. Again you have the option of using text relocations (but since they conflict with other security mitigation strategies, it’s quite silly to do that) or you just build PIC code for the executable too. Now, this does cause a hit in performance since the symbols need to be resolved, once again, but it’s still better for the memory compared to text relocations, too.

It’s for this reason that I try my best to make sure that even code that is not going to be built into shared libraries is optimised so that it does not cause relocations either if possible.

Now, I’m sure that most users don’t need or want a PIE-enabled setup on their desktops; while the issue of how much mitigation strategies are useful on a desktop is a debatable topic that can go on and on for months, I just accept the fact that most users don’t want that, and that they should thus not be forced to use PIE for their software if they don’t want to. Indeed, it can cause extra dirty RSS pages for the processes using those executables, which is not something you wish especially on embedded systems.

On Gentoo, we don’t enable PIE by default, which means one would expect all the binaries installed by Portage to not be built with PIC code, but this does not seem to be the case, at least not always. While I was working on my size(1) replacement last night, I found that there are binaries in /usr/bin of my system with .data.rel.ro sections. The point is that .data.rel.ro only exists when the software is built with PIC, otherwise it makes no sense and the constants are emitted in .rodata, so I was not expecting any .data.rel.ro on /usr/bin.

So I started looking at the issue; while none of the files are Position-Independent Executables, some of them are built with -fPIC compiler flag, by mistake mostly, when added to properly build shared objects. Add to that the other two possible causes: --with-pic passed to the ./configure rather than leaving it to be figured by libtool, and -fPIC being used to compile static archives, so that they could work to link statically shared libraries too.

One of the packages doing this was Avahi, for which I sent a patch to Lennart, but it’s far from being the only one; I’m going to work on a few more patches in the next weeks, hopefully I’ll be able to reduce that. I also will have to work on an extra check for my bashrc system for the tinderbox, and consider adding that to Portage. Unfortunately just checking for .data.rel.ro is not enough: if a binary built with -fPIC does not have constants, but only variables, it will all be merged in .data, with the proper relocation entries. So to decide whether an ELF file is PIC or not one has to check the relocations, too, and even that is not going to be an absolute certainty, I’m afraid.

At any rate, I’m going to do my usual best to find out how to mitigate these problems, at least for the most common packages. As usual I strive to ensure that free software gets the best coverage even for these small little things that are important only once seen in the grand scheme of things. I guess I’ll have to find time to fetch a copy of Linkers and Loaders and read it so I can design some more interesting optimisation tests. Maybe one day I’ll be able to find enough time to start adding some of my common tests to binutils itself.

Tobias Scherbaum a.k.a. dertobi123 (homepage, stats, bugs)
A couple of numbers … (December 07, 2008, 10:48 UTC)

  • 5 years since I’ve joined Gentoo as a developer on December 7th, 2003
  • 2605 forums posts in the past 6 six years
  • CIA counted 5072 commit messages for me (plus the commits CIA missed)

oh … and

  • We’ll have 2 tables for our FOSDEM stand. Sadly our dev-room request has been declined :(
  • 105 (out of 245) voters participated in the election for Council’s open seat. Congratulations Tiziano! Interesting to see that voters reconfirmed the last election and ranked the (again running) candidates exactly the same like in the last election. Also the newly running _reopen_nominations candidate was ranked last!
  • bug 250000 reported in Gentoo’s Bugzilla (which is in fact only the 217642th bugreport). Andreas Proschofsky reported that “wonderful bug number“.

So, yeah … I still think Gentoo is about having fun :) Speaking of “fun” … there’s a quiz taking place on gentoo.de (targeted at German speaking users) where you can test your knowledge on Gentoo and maybe win an interesting book.

Leave a comment

Petteri Räty a.k.a. betelgeuse (homepage, stats, bugs)
Stable Candidates Feed Now With Bug Counts (December 07, 2008, 01:10 UTC)

Petteri Räty

http://gentoo.petteriraty.eu/stable.rss

I updated the Stable Candidates bug feed to have open bug numbers for ${CATEGORY}/${PN} and ${PN}. It will of course be a little behind actual bugzilla data as the feed is updated daily but that's good enough in my opinion. I think the next item for the feed is to add a link you can use to file the actual bug. That should make it dead simple for you to file stable bugs on stuff you use.

Leave a comment