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
. Kenneth Prugh
. 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 Lauer
. Patrick McLean
. Paul de Vrieze
. Peter Weller
. Petteri Räty
. Pieter Van den Abeele
. 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:
January 08, 2009, 23:06 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 Gentoo Universe, an aggregation of weblog articles on all topics written by Gentoo developers. For a more refined aggregation of Gentoo-related topics only, you might be interested in Planet Gentoo.

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

Zhang Le Actually I 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. :)

Jeremy Olexa a.k.a. darkside (homepage, stats, bugs)
Logitech Quickcam Pro 9000 on Gentoo (January 08, 2009, 19:49 UTC)


Since there isn’t anything extremely relevant in google when searching for “gentoo quickcam pro 9000″ - I hope this helps someone.

I solicited advice from the community for a webcam a couple months back and my girlfriend used the comments to buy me this model for Christmas. It works great, so thanks for recommending it people. =)

As Marcus Hanwell wrote some 7 months ago, it is easy to setup. To set this cam up, make sure you have a recent kernel (>=2.6.26 - don’t quote me on exact version. I used 2.6.27.10 at the time of this writing) and then make sure you have at least these two things enabled:

  1. CONFIG_USB_VIDEO_CLASS
  2. CONFIG_SND_USB_AUDIO

After that, plug the cam in and verify that the drivers pick up the cam and usb mic with dmesg. That’s it. You can test the webcam by installing a tool called media-video/luvcview, I have found that this tool tends to crash while resizing the window or for random reasons - this is not of concern because it still allows us to verify the cam is working.

As for skype, I just had to change the ’sound in’ device to the usb mic on this thing and then it worked fine.

      

Steve Dibb a.k.a. beandog (homepage, stats, bugs)
skating in winter (January 08, 2009, 05:22 UTC)

Steve Dibb

For some reason or another, skateboarding has been on my mind a lot more recently, and I’m really starting to get bummed since I can’t go out and do anything.  I imagine it has to do that things are stepping up at work a bit more since I’m finishing up a months old project, and whenever I need a break, YouTube is one of the first places I go, and I watch a lot of skating videos.

Anyway, tonight after I left work the sun was actually shining and the roads were dry, and I thought there might just maybe be a chance that the park was dry as well.  I dunno what it is, but the place has this type of concrete that water evaporates on it really quickly… even after it rains, it will all completely dry up within half an hour or so, so you can go out all you like.

Well, that idea was way out there, but I figured it was worth checking into, so I went over to the park, and it was completely snowed under.  I guess the sun wasn’t out as much as I thought it was.  Oh well.  What was interesting, though, is someone had shoveled out one of the bowls, so it was pretty dry.  I’m not really up for a bag of LOLhurt so I passed on that one.

I still miss skating though, I wish I could do something.  I’m not agile enough for some indoor skating since they are usually just big ramps … or at least, the ones I know about in Utah.  Maybe there’s some more.  One thing I saw an article about the other day that talked about practicing in your house.  I’m in a downstairs apartment all by myself, so I don’t have a garage or anything (which is where, I imagine, most people have done all their practicing), but since I’m on the ground floor, I could screw around on my carpet and not bother any of the neighbors.  Just before winter set on, I was starting to get shuv-its and ollies.  Well, standing ollies.  It’s a start.

Leave a comment

January 07, 2009
Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)

Diego Pettenò

A new sub-series of For A Parallel World, to give some development pointers on how to make software make better use of parallel computing resources available with modern multicore systems. Hope some people can find it interesting!

While I was looking for a (yet unfound) scripting language that could allow me to easily write conversion scripts with FFmpeg that execute in parallel, I’ve decided to finally take a look to OpenMP, which is something I wanted to do for quite a while. Thanks to some Intel documentation I tried it out on the old benchmark I used to compare glibc, glib and libavcodec/FFmpeg for what concerned byte swapping.

The code of the byte swapping routine was adapted to this (note the fact that the index is ssize_t, which means there is opening for breakage when len is bigger than SSIZE_T_MAX):

void test_bswap_file(const uint16_t *input, uint16_t *output, size_t len) {
  ssize_t i;

#ifdef _OPENMP
#pragma omp parallel for
#endif
  for (i = 0; i < len/2; i++) {
    output[i] = GUINT16_FROM_BE(input[i]);
  }
}

and I compared the execution time, through the rdtsc instruction, between the standard code and the OpenMP-powered one, with GCC 4.3. The result actually surprised me. I expected I would have needed to make this much more complex, like breaking it into multiple chunks, to be able to make it fast. Instead it actually worked nice running one cycle on each:

A bar graph showing the difference in speed between standard serial bswap and a simple OpenMP-powered variant

The results are the average of 100 runs for each size, the file is on disk accessed through VFS, it’s not urandom; the values are not important since they are the output of rdtsc() so they only work for comparison.

Now of course this is a very lame way to use OpenMP, there are much better more complex ways to make use of it but all in all, I see quite a few interesting patterns arising. One very interesting note is that I can make use of this in quite a few of the audio output conversion functions in xine-lib, if I was able to resume dedicating time to work on that. Unfortunately lately I’ve been quite limited in time, especially since I don’t have a stable job.

But anyway, it’s interesting to know; if you’re a developer interested in making your code faster on modern multicore systems, consider taking some time to play with OpenMP. With some luck I’m going to write more about it in the future on this blog.

Can you make it? (January 07, 2009, 17:53 UTC)

Diego Pettenò

After my post about AppleTV conversion with FFmpeg I’ve been working on trying to streamline my conversion procedure even further. The low-quality of the conversion is rarely an issue for me since what I’m uploading in there is usually something I watch before I can get to the DVDs. I have sometimes to add borders or subtitles would disappear over the edge of the TV, but not always since the content might not be subtitled.

Unfortunately it seems like GNU make has issues where paths with spaces are involved, and there are some other things that are clumsy and require me to write the same rule twice to get it to properly work. At the end it doesn’t seem like GNU make is the right tool for the job, so I gone looking for something different.

The rake option was discarded right away since rake does not parallel-execute, so I went on looking for something. I just needed a make-workalike, rather than a build system, or even a scripting language with proper support for parallelising, something like bash’s for construct but having a number of concurrent jobs applicable to it.

Looking for that in Google I came through an article about Make alternatives on freshmeat. It looked promising at the start but then committed the mistake of confusing make itself and higher level build systems, and went on for most of the time to speak about alternative build system. It still had a few names, among which I took out cook that at first looked interesting.

The syntax seems to be similar enough to make to be easy to grasp, and still allows much more flexibility than the standard make. So what’s the catch? Well, the catch begins with it using yet another strange SCM (like Pidgin’s monotone wasn’t annoying enough), but it doesn’t stop here.

Out of habit I check the ebuilds when I want to try new software, it helps to know whether the original code is so messy that we have to patch the hell out of it; in addition to this for buildsystems, having complex ebuilds means that the build system architects themselves don’t have very clear ideas on what it’s needed. Seems like this was a good idea:

src_compile() {
        econf || die "./configure failed"
        # doesn't seem to like parallel
        emake -j1 || die
}

src_install() {
        # we'll hijack the RPM_BUILD_ROOT variable which is intended for a
        # similiar purpose anyway
        make RPM_BUILD_ROOT="${D}" install || die
}

So a make-replacement that on its homepage declares to be able to build in parallel… has a build system that does not build in parallel? Indeed the makefile is an absolute mess; while it’s true that you don’t need to know one tool to write a replacement for it (that is not a drop-in replacement), it still would help. I could understand the mistake with multiple output rules since the cook syntax diverges from make’s in that regard; I started understanding much less the mistakes about temporary file creation, but I was really put off by the fact that it does not even know how to use the -o switch at the compiler to get it to output to a filename that is different from basename.o.

Let me say one thing: before you decide to write a tool that is better than $something, try at least to know $something well enough so that you don’t reinvent the wheel, squared.

Steve Dibb a.k.a. beandog (homepage, stats, bugs)
lcd tvs (January 07, 2009, 16:33 UTC)

Steve Dibb

I was really bored the other night, so I went over to RC Willey (a rare experience) to look around.  I of course ended up in electronics pretty quickly, looking at the TVs.  They had a lot on sale there, and most all of them were LCDs.  For the life of me, I can’t figure out why people buy these things.  It might just be me, but the picture looks crappy on almost all of them.

I could only find one that looked decent, but even that one I wouldn’t get if I had a choice.  I don’t remember exactly what it was, but I know it was a Sony Bravia 40-something inch with the newer display engine, about 9000:1 contrast ratio and running at 120hz.

Everything else, they were all fuzzy.  I had to stand far, far away (about 24 feet) so I couldn’t see it, but any closer than that and it just stood out horribly.  On one 40″ I looked at, they were playing a standard-def DVD of National Treasure 2, which should have looked nice (since it’s a recent film),  but even that, all I could notice was the fuzziness.

I imagine it’s probably just me… I’m pretty picky when it comes to my TVs and I have a real eye for picking up even the smallest artifacts.  For my recommendation, though, if you want a TV, either get a rear projection (they all look gorgeous) or a regular CRT tube TV.

Actually, there is one area the LCDs do start to look nice — if they are small.  Anything 22″ or less actually looks decent.

Leave a comment

Ryan Hill a.k.a. dirtyepic (homepage, stats, bugs)
yay and boo pt. 2 (January 07, 2009, 01:35 UTC)

Ryan Hill i started my first programming class today. we're learning VB.Net.

Leave a comment

January 05, 2009
Ryan Hill a.k.a. dirtyepic (homepage, stats, bugs)
yay and boo (January 05, 2009, 23:41 UTC)

Ryan Hill ahh. finally got the laptop fixed. now i just have a wee bit of catching up to do.

Leave a comment

Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
PAM authentication for paranoids (January 05, 2009, 11:28 UTC)

Diego Pettenò

Before I resume working on PAM (I need to implement a change to pam_lastlog to fix a pernicious bug), I wanted to just write a quick entry for the paranoid of you who still use PAM for system login.

Since, as you most likely already know, MD5 is once again considered insecure, one obvious concern would be the fact that passwords saved in MD5 on a system are not secure either. For this reason if you’re using Linux-PAM, you can make use of the SHA512 hashing of system password keys, which I already wrote about.

Remember that to use that you have to make sure your Linux-PAM (sys-libs/pam) is built against a recent enough version of glibc. Unfortunately the version of pambase with this feature hasn’t hit stable yet, the bug above is blocking it, and I’m going to have to hack at pam_lastlog to fix that.

What I didn’t write last time, is that you can easily spot if your system is using md5 passwords by using this simple command from root:

# fgrep '$1$' /etc/shadow

Of course one has to access your /etc/shadow file to breach your passwords, so your system has to have been compromised before, but it’s still not nice if they can find out what your basic passwords are.

Moving on.

January 04, 2009
Stuart Longland a.k.a. redhatter (homepage, stats, bugs)
The puzzle of handheld radio antennas (January 04, 2009, 14:47 UTC)

Stuart Longland

Well, lately I’ve been tinkering around with antennas again for use whilst mobile.  By mobile, I mean public transport mobile, and pedestrian mobile… I don’t own a car.

Most handheld radios come with rubber ducky antennas.  My Kenwood TH-F7E is no exception.  Rubber ducky “dummy loads” as I call them, are quite dismal performers against an efficient and resonant dipole — however they are usually much more convenient size-wise than a resonant antenna.  It’s a similar story for mobile HF antennas… they’re a negative gain antenna.

Naturally, the way I’ve improved it, is to construct my own.  So far, I’ve built a number of these antennas.  The first version was a bit of stainless steel fencing wire with a SMA connector soldered to the botto and a few turns of a coil.  It was about 50cm long… roughly cut, so possibly not that well tuned… but it performed quite well… allowing me to reach repeaters up to 80km away on 2m with minimal line-of-sight.  The SMA->antenna interface proved to be a fragile component however.

A later version attempted to be a half-wave 2m, and could extend (fold out) to become a full-wave 70cm antenna.  This again, had similar mechanical issues to its predicessor, but performed excellent otherwise.

It was pointed out to me that trying to match a full-wave antenna is asking a bit much of the power-amp in my radio, and that an odd multiple of 1/4 wavelength was better.

Thus, the third revision, I made using some surplus solid core electrical copper cable, and a BNC connector, was constructed at a length of 52cm.  52cm was calculated according to the rule v=f?… the frequencies I had in mind were 146.500MHz (2m FM calling frequency)  and 439MHz (near to the input frequency of most 70cm repeaters).  52cm was calculated approximately as being 1/4 wavelength on 2m, and 3/4 wavelength on 70cm.

This antenna performed exceptionally well, and with the BNC connector, showed less mechanical problems than its predicessors.  It did however, put a lot of strain on the BNC->SMA adaptors I was using, and I had to be extra careful with the antennas length.

Using MMANA-GAL, I tried modelling this antenna, just to see how well it infact should work in theory.  Well I was right… about 6dBi gain on 70cm… it wasn’t bad at all! However, SWR was through the roof, 1:several hundred thousand.

I’ve since found a long forgotten RC car remote that operated on 40MHz, which had a 40cm long antenna.  I’ve stretched the base coil out a bit to make it 42cm and added a SMA connector to the bottom of it… I may have to extend it a bit, but this seems like a closer match to what I’m looking for… but my modelling of it is just as dismal in terms of SWR.

Now, as far as improving SWR… the ways I know of to fix this problem are:

  • To make the antenna a dipole, effectively doubling its length
  • Adding a ground plane or counterpoise radial
  • Adding a matching section (like a J-pole)
  • Using some sort of matching network

The thing that has me curious, is the rubber ducky antenna.  Now granted, I know those things do not radiate well.  They must however be doing something to keep the finals from blowing.  My understanding is that they’re little more than a spring in a plastic jacket… I can’t see how that is meant to match to the 50? source impedance.

The antenna design I use is apparently very similar to one used by Motorola for some of their professional radio antennas, according to this post.  Now I’m not sure how 19.5″ is arrived at — it doesn’t fit with the maths I used above, there is something I’ve missed.  Surely though, an antenna of this type would have the same impedance matching issues as the ones I’ve designed.  Either there’s other magic involved, or the finals in many handheld radios are more hardy than I thought.

At some stage I might borrow a SWR meter or antenna analyser for VHF/UHF… it’d be interesting to see just how far off the mark I am.  I haven’t blown my finals…yet.  The radio seems to still have plenty of life in it.  I’d be interested to know however, some of the background on this topic.  There is something I am missing, and I can’t quite put my finger on it.

Leave a comment

Joshua Nichols a.k.a. nichoj (homepage, stats, bugs)
Stop Net::HTTP dead in its tracks with fakeweb (January 04, 2009, 07:24 UTC)

Joshua Nichols

It's a well known fact that you should be testing all the time. You know you should be stubbing out external network traffic too, but sometimes it's easy to forget. The consequences of not stubbing out network connections are that your test suite becomes slow, you are forced to be tethered to a network, and you generally find yourself in a dark, dark place.

Enter fakeweb: it stops Net::HTTP dead. To get started, add this to your test_helper.rb:

require 'fakeweb'
FakeWeb.allow_net_connect = false

This loads fakeweb, and then prevents Net::HTTP from actually hitting the network. If you have any tests that use the Net::HTTP, you are going to see a lot of tests errored out. Here's an example backtrace:

FakeWeb::NetConnectNotAllowedError: Real HTTP connections are disabled. Unregistered URI: http://github.com:80/api/v1/json/defunkt?
    /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/chrisk-fakeweb-1.1.2.6/lib/fake_net_http.rb:64:in `request'
    /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/httparty-0.1.3/lib/httparty.rb:127:in `send_request'
    /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/httparty-0.1.3/lib/httparty.rb:73:in `get'
    ./test/../lib/github-party.rb:10:in `user'

At this point, you use FakeWeb.register_uri to record a URI and response. I found it best to use curl to capture the response, save it to a fixture, and then load it during testing.

$ mkdir -p test/fixtures
$ curl -is http://github.com/api/v1/json/defunkt > test/fixtures/user.json

Now we can use the saved response:

class GithubPartyTest < Test::Unit::TestCase
  context "user lookup" do
    setup do
      FakeWeb.register_uri('http://github.com/api/v1/json/defunkt', :response => File.join(File.dirname(__FILE__), 'fixtures', 'user.json'))
      @user = GitHubParty.user('defunkt')
    end
    # tests go here
  end
end

Not only does this pass, but it runs faster and you can take it offline at your discretion.

For my example, my code is using Net::HTTP, so it makes sense to use fakeweb to register allowed URIs. It gets more complicated if you are using a library which is making the Net::HTTP calls. Imagine something like flickr_fu or youtube-g. Registering the precise URIs the library uses would break encapsulation, not to mention being annoying and tedious.

I found a better approach is to capture the result of the library call to YAML and then use a mocking library, such as mocha, to return the deserialized YAML. Dan Croak wrote about this approach a few weeks ago, but now we add fakeweb to the mix.

To capture the output, open script/console or irb:

>> videos = client.videos_by(:most_viewed, :query => 'Bruce Springsteen')
>> FileUtil.mkdir_p 'test/fixtures/videos'
>> File.open('test/fixtures/videos/bruce_springsteen.yml', 'w') {|f| f.write videos.to_yaml}

To facilitate using this fixture, we can make a small helper in test_helper.rb:

def load_yaml_fixture(path)
  adjusted_path = File.join File.dirname(__FILE__), "fixtures", path
  YAML::load_file adjusted_path
end

We can now reply the captured results using this helper and mocha:

class VideoTest < ActiveSupport::TestCase
  context "Video.refresh_for!(@topic)" do
    setup do
      @topic  = Factory(:topic, :name => "Bruce Springsteen")
      @videos = load_yaml_fixture "you_tube/bruce_springsteen.yml"
      YouTubeClient.stubs(:search).with(@topic.name).returns(@videos)
      Video.refresh_for! @topic
    end
    # tests go here
  end
end

Using fakeweb and these two methods, we should be all set for preventing any outgoing Net::HTTP connections. Be wary, though. Your tests will be faster and let you go offline, but they are just snapshots of a HTTP request or library call, so may change over time.

January 03, 2009
Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)

Diego Pettenò

After a longish time, here for you a new chapter of my widely read series For A Parallel World, improving buildsystems to reduce build time on modern multiprocessor, multicore systems.

This time, rather than the usual build failures, I’m going to speak of a parallel install failure. Even though one can think of install as a task that rarely can fall into problems like race conditions and the such, and even though it’s probably the part that gets less boost when using parallel make on a multicore system (since it’s usually I/O bound rather than CPU bound), it’s actually one very fragile part of many packages.

One of the common failures is due to old install-sh script used to simulate the install command on systems too old to have a POSIX-compatible one, and which is also used to create directories recursively if mkdir -p is missing. For a series of reason, this hits pretty often on FreeBSD, but this is beside the point. This can be easily solved by replacing the old faulty script with an updated copy out of automake or libtool, which does not have problems at all.

A few times, the problem is instead due to a broken Makefile.am. Let’s take a practical example from some software I fixed recently after being called in action by nixnut: gramps . Please note that if you look at the bug now you’re going to spoil the post, since it contains the solution straight away, while I’m going to explain it step by step.

Let’s start from the reported build log:

test -z "/usr/share/gramps/docgen" || /bin/mkdir -p
"/var/tmp/portage/app-misc/gramps-3.0.3/image//usr/share/gramps/docgen"
 /usr/bin/install -c -m 644 'gtkprintpreview.glade'
'/var/tmp/portage/app-misc/gramps-3.0.3/image//usr/share/gramps/docgen/gtkprintpreview.glade'
 /usr/bin/install -c -m 644 'gtkprintpreview.glade'
'/var/tmp/portage/app-misc/gramps-3.0.3/image//usr/share/gramps/docgen/gtkprintpreview.glade'
/usr/bin/install: cannot create regular file
`/var/tmp/portage/app-misc/gramps-3.0.3/image//usr/share/gramps/docgen/gtkprintpreview.glade':
File exists
make[3]: *** [install-docgenDATA] Error 1
make[3]: *** Waiting for unfinished jobs....

As usual, the first thing we’re looking for when there is a parallel build (or install) failure are repeated commands. As I’ve shown in Case Study n. 2, when the same command is repeated multiple times it’s often due to mistakes in the Makefiles, thus before thinking of a problem with the dependencies, I check for that. It’s way more common especially on automake-based build systems.

So indeed we can see there are two calls to the install command for the file gtkprintpreview.glade (this also shows us that it’s not a problem of old and faulty install-sh script since the call is directly to the system command). Contrary to what happens when it’s a build rule that is wrongly expressed in the makefile, the double-call during install phase is usually present both using parallel jobs and not. The difference is that when the two calls happen sequentially, the second just overwrites the results of the first; wastes time but it’s successful. On the other hand when parallel jobs are used, the two calls are often enough happening at the same time, and thus we have a race condition.

Okay so next step as usual is to look at the incriminated Makefile.am:

[snip]
docgen_DATA = \
        gtkprintpreview.glade

dist_docgen_DATA = $(docgen_DATA)
[snip]

Here we’re at the core of the problem. The gtkprintpreview.glade file is part of the sources, and it has to be installed as part of the docgen class of files (thus in $docgendir). But the data installed in that path is listed twice, once in the docgen_DATA variable and one in dist_docgen_DATA, causing the file to be installed twice on two independent targets. Since the two targets are independent, when using parallel jobs they both will run at the same time the same command.

Let me try to explain what the mistake has been. By default the sources are packaged up in the final tarball, if they are not generated by rules from the make process; sometimes you wish files that are built by make to still be distributed, and thus you either have to use EXTRA_DIST or prefix dist_ to the class of the installed files, to explicit that the files have to be distributed. Unfortunately the gramps developers didn’t know automake well enough, and thought that dist_docgen_DATA worked quite a lot like EXTRA_DIST (maybe it actually used EXTRA_DIST in the past, for what I know), and thus duplicated the variable content.

The solution? Just replace the use of docgen_DATA with dist_docgen_DATA and remove the second definition, the problem is solved at the source.

Tobias Klausmann a.k.a. klausman (homepage, stats, bugs)
A tale of too many parameters (January 03, 2009, 14:12 UTC)

With 2.6.28 came ext4, which I've been using on several not-so-important filesystems for a while now. Also, I had switched the root file system on my laptop to non-encrypted quite a few months ago. I do recognize the problem of stolen laptops and had started running an encrypted rootfs years ago, but I lent my laptop to my flatmate and didn't want to bother her with the whole cryptfs thing. Anyway, I thought I'd kill two birds with one stone and switch back to ext4 on a crypted volume. Shouldn't be all that hard, right?

The first problem I ran into is that very few live CDs support ext4. No matter, I can mount a backup disk and the laptops disk in my amd64 workstation, copy stuff around, not that hard. I also made sure I had an ext4-capable 2.6.28 on the laptop. So I copied the stuff to a spare disk, created the crypto volume, made a filesystem, copied everything back and re-activated the initrd script for cryptofs. Put the disk back into the laptop and… it didn't work.

cryptsetup told me that there was no slot available with the passphrase I had entered. Had I mistyped something? Ok, back to the amd64 workstation. Hm. The config of the kernel looks ok, all the cryptmodules are there. So I replaced all the binaries with those from laptop installation (the passphrase I used wasn't wrong). I figured that maybe I did something wrong with the kernel after all and decided to rebuild it from scratch. But I can't build a 32-bit kernel on the amd64 machine because it's a pure 64-bit installation there[1].

Fortunately, my router/fileserver is a PIII so it can build a kernel for my Pentium-M laptop. Also, it already has a cryptofs-aware kernel. I mounted everything as needed, chrooted into the filesystem and started rebuilding the kernel. But at the very end of the kernel build, there's a call to awk which resulted in a SIGILL. Ok, so then I changed out of the chroot, did a make mrproper and proceeded to build the kernel with the fileserver's toolchain. That went well and I also copied over a different version of cryptsetup to try out.

Using the new kernel (and cryptsetup), I still had no joy. I even added strace and sundry other programs to the initrd (which was getting cramped). I saw crypsetup open the device, read the first few blocks and then decide it didn't like it. Was cyptsetup arch-aware? I couldn't imagine that the on-disk format depended on the arch used to make the cryptodev and filesystems[2]. That couldn't be the problem since I could read the filesystem on both my amd64 and the PIII fileserver.

Had I manipulated the wrong kernel all the time? I renamed the kernel image on-disk (to vmlinuz-2.6.28a) and changed the grub config to call the new kernel. Upon boot, I used grubs "e"dit command and sure enough, the new kernel name. So the grub.conf was used as it should be, what about the kernel? I booted the renamed kernel and still cryptsetup refused to open the filesystem.

In desparation, I decided to build an dynamically linked cryptsetup, hoping that some code blob was missing and the linking infrastructure would do a better job of telling me what was missing.

Success at last, I could open the cryptodev with the correct passphrase! Apparently, something in the interface between cryptsetup and the kernel changed with 2.6.28 and neither of them thought it fit to tell me in an understandable way. Interestingly, the fileserver never showed any of this behaviour (and yes, I switched to 2.6.28 there a while ago).

Home free? Not really. The kernel refused to mount the rootfs since it wanted CONFIG_LSF to be set (that's Large Single File support). Ok, so I rebuilt the kernel again. No joy. I was getting a tad annoyed by this point. Fortunately, I took the time to make some tea and when I was staring at the tea infusing, it hit me: had I copied the new LSF-aware kernel to the changed name in grub.conf (vmlinuz-2.6.28a)? No, I hadn't. Fixed that and finally everything worked.

Now you've read this post over the course of maybe a few minutes. Keep in mind that for every single change, I had to ipull the disk from the laptop, shutdown the other machine, plug the disk into that machine, boot it, make the change, shut the machine down, put the disk back in the laptop, boot the laptop, doesn't work, repeat. Also, I had to do stuff like fixing typos, do some (ultimately useless) reordering in the initrd, checksumming, etc. In all, I spent several hours trying to fix this "simple matter".

Lesson learned: Don't change too many things at the same time or you'll never know which one spit in your soup.

Footnotes:

  1. Yes, I know, I could have. But it would have been more effort (or at least it seemed that way at the time).
  2. Stuff like that used to be the case way-back-when. Good riddance.

Comments

Kevin Bowling writes:

Take a look here for my and another Gentoo user's ext4 experience. http://www.kev009.com/wp/2008/12/how-to-upgrade-to-ext4-in-place

Mine was fairly painless, but I'm not trying to do encryption (laptop disks are slow enough already!). The other Kevin's was a bit more involved but he is doing crazy encryption stuff like you :-P.

Branko Badrljica writes:

I'm deferring having encrypted notebook disks to the moment when it will be possible to do it with GPU, not CPU.

As it is now, it taxes CPU quite considerably. This might be acceptable for some apps that are not that CPU intensive, but becomes bottleneck when you decide to stretch that multitasking a bit...

Well, my laptop isn't the thing I do heavy computing on. Mostly, it's a rather oversized MP3-Player, fallback storage for my digital camera, trusted access point for Internet and fallback machine when my main workstation croaks. As such, I don't mind the impact of cryptofs on the overall performance. In other words: even with a crypted disk, it's fast enough for what I need.

Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
Free virtualisation - not working yet (January 03, 2009, 02:27 UTC)

Diego Pettenò

If you’ve been following my blog for a while you probably remember how much I fought with VirtualBox once it was released to get it to work, so that I could use OpenSolaris. Nowadays, even with some quirks, VirtualBox Open Source Edition is fairly usable, and I’m using it not only for OpenSolaris but also for a Fedora system (which I use for comparing issues with Gentoo), a Windows install (that I use for my job), and a Slackware install that I use for kernel hacking.

Obviously, the problem is that the free version of VirtualBox come with some disadvantages, like not being able to forward USB devices, having limited type of hardware to virtualise and so on. This is not much of a problem for my use, but of course it would have been nicer if they just open sourced the whole lot. I guess the most obnoxious problem with VirtualBox (OSE at least, not sure about the proprietary version) is the inability to use a true block device as virtual disk, but rather having to deal with the custom image format that is really slow at times, and needs to pass through the VFS.

For these reasons Luca suggested me many times to try out kvm instead, but I have to say one nice thing of VirtualBox is that it has a quite easy to use interface which allows me to set up new virtual machines in just a few clicks. And since nowadays it also supports VT-x and similar, it’s not so bad at all.

But anyway, I wanted to try kvm, and tonight I finally decided to install it, together with the virt-manager frontend although there are lots of hopes for this, it’s not yet good enough, and it really isn’t usable for me at all. I guess I might actually get to hack at it, but maybe this is a bit too soon yet.

Continue reading on my blog for the reasoning, if you’re interested.

One thing I really dislike of the newer versions of VirtualBox is that it went the VMware route and decided to create its own kernel module to handle networking. They said it’s for performance reasons but I’d expect the main reason is that it would allow them to have a single interface between Linux, Windows, Solaris and so on. The TUN/TAP interface is Linux-specific so supporting that together with whatever they have been doing on the other operating systems is likely a cost for them. Although I can understand their reasoning, it’s not that I like it at all. More kernel code means more code that can crash your system, especially when not using the Open Source Edition.

Interestingly enough, the RedHat’s Virtual Machine Manager is instead doing its best to avoid creating new network management software, and uses very common pieces of software: dnsmasq as DHCP server, the Linux kernel bridging support, and so on. This is very good, but it also poses a few problems: first of all, my system already runs a DHCP server, why do I have to install another? But it’s not just that; instead of creating an userspace networking bridging software, like VirtualBox does, it tries to use what the kernel provides already, in the form of the bridging support and iptables to forward requests and create NAT zones. This is all fine and dandy, as it reduces the feature duplication in software, but obviously requires more options to be enabled in kernels that might not otherwise have it enabled at all.

As it happens, my system does have bridging support installed, but not iptables nor masquerade targets and similar. Up to now I never used them so it had no reason to be there. I also sincerely can’t understand why it does need it if I don’t want a NAT, but it doesn’t seem to allow me to set up the network myself. Which would include me being able to just tell it to create a new interface and add it to a bridge I manage myself, leaving to me all the details like dhcp, and thus not requiring iptables at all.

Also, even though there is a way to configure an LVM-based storage pool, it does not seem to allow me to choose directly one of the volumes of that pool when it asks me what to use as a virtual disk. Which is kinda silly, to me.

But these are just minor annoyances, there are much bigger problems: if the modules for kvm (kvm and kvm-amd in my system) are not loaded when virt-manager is loaded, it obviously lack a way to choose KVM as hypervisor. This is nice, but it also fails to see that there is no qemu in the system, and tries to use a default path, that is not only specific to RedHat, but also very not existing here (/usr/lib64/xen/bin/qemu-dm, on x86-64, just checking the uname!), returning an error that the particular command couldn’t be found. At least it should probably have said that it couldn’t find qemu, rather than the particular path. It would have also been nice to still allow choosing kvm but then telling that the device was missing (and suggested loading the modules; VirtualBox does something like that already).

To that you have to add that I haven’t been able to finish the wizard to create a new virtual machine yet. This because it does not check the permission to create the virtual machine before proposing you to create one, so it let you spend time to fill in the settings in the wizard and then fails telling you don’t have permission to access the read/write socket. Which by default is accessible only by root.

Even though it’s obvious by the 0-prefix that the software is still not production-level, there are also a few notes on the way the interfaces are designed. While it’s a good idea to use Python to write the interface, since it allows a much faster test of the code and so on, and speed is not a critical issue here, as the work is carried out by C code in the background, every error is reported with a Python traceback, one of the most obnoxious things to do for users. In particular for the permission problem I just listed, the message is a generic error message: “Unable to complete install: ‘unable to connect to ’/var/run/libvirt/libvirt-sock’: Permission denied’”; what is the user supposed to know here? Of course virtualisation is not something the user at the first tries with Linux is going to use, but still, even a power user might be scared by errors that appear this way and have attached a traceback (that most users would probably rationally link with “the program crashed” like bug-buddy messages, rather than “something wasn’t as the software expected”, which is what happened.

On a very puny level, instead, I have to notice that just pressing Enter to proceed to the next page on the wizard fails, and using ESC to close the windows too. Which is very unlike any other commonly-used software.

So to cut the post short now, what is the outcome of my test? Well, I didn’t get to test the actual running performance of KVM against VirtualBox, so I cannot say much about that technology. I can say that there is a long road ahead for the Virtual Machine Manager software to become a frontend half as good as VirtualBox’s or VMware’s. This does not mean that the software was badly written, at all. The software by design is not bad at all; of course it’s very focused on RedHat and less on other distributions, which explains lots of the problems I’ve noticed, but in general I think it’s going the right way. A more advanced setup for advanced users would probably be welcome by me, as well as an ISO images management like the one VirtualBox has (even better if you can assign an ISO image to be of a specific operating system, so that when I choose “Linux”, “Fedora” it would list me the various ISO for Fedora 8, 9, 10 and then have a “Other” button to take a different ISO to install, if desired.

I’ll keep waiting to see how it evolves.

January 02, 2009
Steve Dibb a.k.a. beandog (homepage, stats, bugs)
another mythfrontend, part two (January 02, 2009, 23:16 UTC)

Steve Dibb

I managed to solve my little sound card problem from the other day with my new frontend.  Well, actually, I solved the problem of which box to use and what hardware to get at the same time.  I just asked myself what would be the simplest, cheapest way to get something working, and the answer was to pick up a  $15 SoundBlaster card at the used parts computer store … so that’s what I did.

I popped it in my amd64, and I already had most of myth installed, so I was up and running in no time.  I lugged the little bugger into my bedroom, anxious to see how noisy it would be.  It turns out that it was actually very quiet.  I keep forgetting that I bought a really nice PSU a long time ago for the case (thanks, Josh), and it is near silent.  In fact, hours later, I forgot it was on completely, and went to power it up only to find it was already running.  So I might not even need to get a Mini for now.

I also picked up a USB sound device from Craigslist today for $10.  I’m gonna try that on my Mini-ITX and see if there’s any latency issues.  Of course, that means building a new kernel and rebooting my box, and that makes me cranky.  Rawr.  No wanna touchy!  Maybe I should look into using kexec.

Leave a comment

the day the earth stood still (January 02, 2009, 23:03 UTC)

Steve Dibb

I went and caught The Day the Earth Stood Still in theaters while I was on Christmas vacation.  I really wasn’t expecting that much — the acting looked horrible, but the special effects looked awesome.  I liked it, though.  I’d give it a nod.

This is a remake in a loose sense .. it’s really nothing like the original from oh-so-many years ago.  I saw the classic recently for the first time, last year, I think, and I was expecting it to be epic awesome, but it was instead pretty meh.

The new one was decent.  I figured it would be nothing more than a good popcorn movie, and I was right.  I’d give it three stars.

The acting was alright.  Certainly better than Twilight, that’s for sure.  It was weird seeing Keanu be so stoic the whole time.  It really made it kind of dull, actually.  But it also surprised you when he’d do something unexpected since there weren’t any kind of physical cues.

I dunno.  I’d place this as one of those that is just interesting to watch, but not much more than that.  Worth watching, at least once.

Leave a comment

new year’s predictions (January 02, 2009, 19:28 UTC)

Steve Dibb

I thought it might be kind of fun to see what kind of predictions I can set for myself for the upcoming year.  I’m a creature of habit, so this shouldn’t be too hard for most of them. :)

  • I’ll finally cancel Comcast and switch over to watching Netflix movies (in the mail and on demand on my Tivo) and everything from my massive library
  • I’ll eventually buy that Mini-ITX motherboard I’ve been wanting for so long, only to find out something really simple (like sound) isn’t supported in Linux.
  • I’ll think about getting surround sound again, but will shrug it off because of the high costs of speakers
  • I’ll find even more PS2 games that I’ll fall in love with (I’m already blown away by how many I’ve found, I figured I’d be lucky with 2, but its more like 12 so far)
  • I’ll finally go to Disney World for a vacation
  • I’ll think about driving down to DisneyLand but shrug it off
  • I’ll spend an entire day setting up an extra box to run Windows so I can play with and test streaming to and converiting for Tivo, PS3, PSP etc. and then never use it 5 minutes after setting it up.
  • I’ll get tired of LOLcats.  Maybe.
  • I’ll think about retiring from Gentoo again, but instead just disappear for a month or two and take a hiatus.
  • I’ll break something major in the tree post-hiatus.
  • I’ll finally find a decent place to host my webpages for cheap (need postgres 8.3, php5, mysql5 and cron)
  • I’ll merge GPNL and Packages websites into one, and have it use AJAX everywhere and break permanent URLs
  • I’ll finally finish GPNL backend to read ebuilds directly (almost done, actually)
  • I’ll think some more about learning C++ so I can rewrite bend / drip to access discs directly.
  • I’ll buy Mr. Belvedere on DVD the second it comes out and have a marathon watching at least 4 hours of it in a row (hey, it happened with Silver Spoons .. and Super Friends).
  • I’ll finally buy the last 3 seasons of Voyager (my favorite Star Trek series, ironically … and I have all 7 seasons of TNG and DS9).
  • I still won’t upgrade my ancient version of MythTV
  • I still won’t switch to Blu-Ray, but I’ll buy a few discs just because they look awesome in HD (Batman Begins, Kung Fu Panda).
  • I’ll finally finish writing my MPlayer Gentoo documentation (halfway done)
  • I’ll finally write my howto on creating an embedded Gentoo MythTV frontend under 220 MB (works great, SSD ftw!)
  • I’ll really love it when skating weather comes around and I’ll get into it much more this year.  I’ll start to learn how to balance properly and get a decent kicturn in.  It’ll be a great summer, and I’ll spend every night going out.

I’m pretty predictable, so I think most or all of those will come true.  Lots of stuff I wanna get accomplished, that’s for sure.  I left out the more personal stuff since I don’t really touch on that here anyway.

Leave a comment

Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
Bundling libraries for despair and insecurity (January 02, 2009, 16:30 UTC)

Diego Pettenò

I’ve been told quite a few times that my posts tend to be too long, and boring for most basic users, so for a time I’ll try to use the “extended content” support from Typo, and see how people react. What this means is that the blog post is just summarised on feeds, and on aggregators like Planet, while the complete text can be read by accessing the article directly on my blog.

When I started my work reporting bundled libraries almost an year ago, my idea had a lot to do with sharing code and just to the side to do with the security issues related to bundled libraries. I had of course first hand experience with the problem, since xine-lib has (and still in part had) bundled a lot of libraries. When I took over maintainership of it in Gentoo, it was largely breaching policy, and the number of issues I had with that was huge. With time, and coordination with upstream (to the point of me becoming upstream), the issues were addressed, and nowadays most of xine-lib bundled libraries are ignored in favour of the system copies (where possible; some were largely modified to the point of not being usable, but that’s still something we’re fighting with). Nowadays, the 1.2 branch of xine-lib already doesn’t have a FFmpeg copy at all, always using the system copy (or an eventual static copy built properly).

But nowadays I started to see that what is obvious to me about the problems with bundled copies of libraries is not obvious to all developers, and even less obvious to “power users” who proxy-maintain ebuilds and just want them to work for them, rather than complying with Gentoo policies and standards. Which is why I think that sunrise and other overlays should always be scrutinised carefully before being added to a system.

At any rate, for this reason I’m going to explain in this post why you should not use bundled internal copies of libraries for packages added to Gentoo, and why in particular these packages should not be deemed stable at all.

The first issue to discuss is why do upstreams bundle libraries, since knowing the reasoning behind that is often helpful to identify whether it makes sense at all to keep them or not. The first most obvious answer is: to reduce dependencies. For a long time this was the major reason behind xine-lib usage of internally bundled libraries. As it turns out, with time this reason became moot: distributions started packaging xine-lib directly reducing the number of users wishing to build it from sources; even those wanting to build xine-lib from sources would find all the needed libraries in the distributions, most of the times. When this is the sole reason for libraries building, upstream should be very well open to add a configure option (or anything similar to that) to use the system copy, optionally or by default, with fallback to the bundled copy.

A second reason might be that the library is being unstable when it comes to API; this is probably the first reason why FFmpeg is often bundled in software rather than using the copy on the system; while this is a concern that makes more sense then the one before, it’s still mostly a moot point since it really just requires to fix the issue at the source: get the original project to maintain API compatibility, to provide an API compatibility layer, or to finalise its API. Even when it cannot be helped, because the API is in flux, maintained software fears not the API break; it might be a bit of an hassle but in general it’s feasible to keep the use and the library in sync.

Thirdly, more worrisome, is when the library is modified, slightly or heavily, after bundling; in this case using the system copy might be quite a burden because it will lack the specific changes as made by the project. In this case there is a lot of work involved, sometimes more work that it can be taken care by distributions, and requires coordination of the project’s upstream together with the higher level upstream. This is what happened with xine-lib and FFmpeg: the copy in the xine-lib sources was heavily modified to suit both the build system and the interface requirements of xine, which made it also very difficult to update the internal snapshot. All the interface changes needed have then been pushed upstream to FFmpeg, and the buildsystem changes were made moot by using the default buildsystem (with needed changes pushed upstream) embedded in autotools; and then FFmpeg was entirely removed from xine-lib’s sources.

Now, on the other hand, the disadvantages of using bundled libraries are probably worse: code duplication means that there is more data to process (both at build time to compile and at load time to store in memory), there is more space used by the binaries, and there are duplicated bugs that need to be fixed twice. A lot of time in xine-lib the problems with decoding something with FFmpeg were solved by just using a newer FFmpeg; why keeping one then?

The most important issue though is about security: when a vulnerability is found in a library like zlib, fixing the library alone is not enough: while that fixes the majority of the software in a system, it’s not going to fix those who bundle it, both closed-source and open source. For instance, take dzip it uses an ancient internal version of zlib; if somebody knows the format well enough, it’s far from impossible to craft a dzip file that contains a deflated stream that can executed malicious code.

For this latter issue alone, I’d say that any software bundling source code is not good enough to go stable on its own. Of course sometimes one has to bend the rules because of past mistakes, for instance even though Ruby bundles stuff, we cannot stop newer versions to go stable; this problem is not a regression. But should stop other broken software from entering portage or at least the stable tree.

But it’s not just security, subtle bugs might actually be quite a problem. For instance, you might remember all Java applications failing when libX11 was built with XCB support some time ago. The problem was due to some stricter checks in libxcb compared to what libX11 have been checking before, but the source of the problem was Xinerama. The problem with that was that Sun bundled an internal copies of libXinerama sources in the JRE sources, and even though libXinerama was since then fixed regarding that particular issue (the crash with XCB), it was never updated in the JRE before the issue became a nuisance for users.

A very similar issue, also involving X11 (just by chance, it’s not that all the issues involve X11) is this particular bug in Xorg that is triggered when launching SDL-based applications, because libSDL bundles ancient versions of X11 libraries.

As I said earlier, unbundling is rarely easy; there are subtle issues to be checked out, for instance one has to check if there are changes at all beside eventual build-system related things (for instance to avoid using a full-fledged ./configure), but altogether it’s usually not tremendously impossible. Of course one has to stop thinking “Oh my, what if a library changes and the software breaks?”, otherwise the task gets impossible. Software changes, software bitrots. It’s not by bundling internal copies of libraries that you can stop that. When the compiler gets upgraded, you’re going to have your software break, and you should fix your software; if the C library cleans up the includes, your software might not compile or might misbehave, deal with it. Sometimes the bundled libraries implement protocols and formats that need to work together with some other piece of software; if that changes, the bundled libraries are just going to break further.

Your software is rarely special enough that you can be exempted from following the rules. Even OpenOffice is using lots of system libraries nowadays!

Bundling and modifying libraries is just like forking a project, and forking might not always be the best approach sometimes with dead upstream for a project, forking is your only hope; but even in those cases there are nice ways to bundle libraries. If you look at the way nmap bundles libdnet, you can see that they not only document all the changes they made to the library, but also provides splitted down and commented patches for the various changes, making it possible to adapt it to their need.

For proprietary software packages, of course, the matter is different, since you cannot usually unbundle the libraries yourself; but it’s a good idea to ask upstream nicely if they can use system copies instead of internal ones. Mind you, some might be happy to fix their packages not to be vulnerable any longer. Although I guess lots of them might actually prefer to keep them as they are since it’s a cost to them. One more reason not to trust them, to me.

So bottom line, if you’re working on an ebuild for a new piece of software to submit for Portage addition, please look well to see if the software is bundling libraries, and if it is, don’t let it enter portage that way. And if you’re a developer who wants to push some ebuild to the tree, also remember to ensure that it complies with our policies and doesn’t bundle in libraries.

January 01, 2009
Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
The canonical target (January 01, 2009, 17:00 UTC)

Diego Pettenò

I’ve already written about the common mistake of using AC_CANONICAL_TARGET in software that is not intended to be used as compiler. Since I’m now using my tinderbox extensively, I’ve thought it might have been a good idea to try checking how many packages actually do call that, that shouldn’t.

The test is really a quick and dirty bashrc snippet:

post_src_unpack() {
    find "${S}" -name configure.ac -o -name configure.in | while read acfile; do
        acdir=$(dirname "$acfile")
        pushd "$acdir"
        autoconf --trace AC_CANONICAL_TARGET 2>/dev/null > "${T}"/flameeyes-canonical-target.log
        if [[ -s "${T}"/flameeyes-canonical-target.log ]]; then
            ewarn "Flameeyes notice: AC_CANONICAL_TARGET used"
            cat "${T}"/flameeyes-canonical-target.log
        fi
        popd
    done
}

This provides me with enough information to inspect the software, and eventually provide patches to correct the mistake. As I said this is a very common mistake, and I’ve fixed quite a few packages for this. Not only it wastes time to identify the target system, but it also provides a totally misleading --target option to the configure script that confuses users and automatic systems alike; if we were to write a software to generate ebuilds out of the source tarball of a software with some basic common options, it would probably be confused a lot by the presence of such an option.

Since the whole build, host and target situation is often confusing, I’d like to try explaining it with some images, I think that might be a good way to show users and developers alike how the three machine definitions interact between each other. Since this is going to be a long post, in term of size, rather than content, because of the images, the extended explanation won’t be present in the feed.

Continue reading on my site for that.

To try explaining this in a very visual way, let’s say we have only three systems, a PowerBook laptop, a standard x86 computer, and a build service using x86-64 servers. The choice of PoweBook as smallest device has been conditioned by the fact it was the only decent image I could find on OpenClipart for a system that would have been easily seen as having a different architecture than the other two. I would have liked an ARM board, but it was wishing too much.

The first obvious case is having a native compiler, no cross-compiling involved at all:

In this case, both gcc’s configure script, the powerpc-linux-gnu-gcc compiler and the hellow program are executed on the same system: the laptop. This is the standard case you have on a Gentoo system when building stuff out of most ebuilds. In this case host, build and target machines are all one the same: powerpc-linux-gnu.

Then there is a very common case for embedded developers, cross-compilers:

In this case gcc’s configure (and thus build) is executed on a PC system, which also will run the powerpc-linux-gnu-gcc compiler, but the hellow program is still executed on the laptop. Host and build machines are i686-pc-linux-gnu while target is powerpc-linux-gnu.

The next scenarios is uncommon for standalone developers but is somewhat with binary distributions for smaller systems:

In this case there is a build service that starts up the build for the compiler, that will then be executed by the laptop directly. In this case the build machine is x86_64-pc-linux-gnu while both host and target are powerpc-linux-gnu.

The final scenario involves all three systems at once and shows exactly the difference between the three machine definitions:

In this case the build service prepares a cross-compiler executed on a PC that will build software to run on the laptop. The build machine is x86_64-pc-linux-gnu, the host machine is i686-pc-linux-gnu and the target is powerpc-linux-gnu.

Now, this works pretty well and sleek for compilers, but what about other software? In most cases you got just two systems involved at most, one that will run the software and one that will build it, so there is no need for a target definition, it’ll all be completed between build and host. And this is why you should not be calling AC_CANONICAL_TARGET unless you can figure out a far-fetched scenario where you can involve three computers with three different architectures, like in the last scenario.

Gunnar Wrobel a.k.a. wrobel (homepage, stats, bugs)
layman-1.2.3 is out (January 01, 2009, 08:52 UTC)

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

  • Support setting the terminal screen width (#253016)
  • layman -S fetches each overlay twice (#253241)
I can't seem to get layman bug free these days. I already wanted to mark the newer version stable months ago. Let's hope there'll be a longer bug free period now ;)

Get involved: Bugday coming up Saturday (January 01, 2009, 00:02 UTC)

Gentoo News

What: Gentoo contributors get together to help each other fix bugs

Where: irc.freenode.net, #gentoo-bugs

When: Saturday, January 3, in a timezone near you

What do you need to bring?

  • A Gentoo system, an Internet connection and an IRC client
  • Your bug. If you don't have one, we will find you one to suit your area of interest and your skills
  • Your favorite editor
  • A way to test that your bug is fixed (asking people counts!)
  • You don't need to know C, C++, or bash

What's a bug? Gentoo's way of tracking change requests. A change request can be anything from "I've found a typo in foo" to "I've built this really useful program called bar but there's no ebuild for it." Bugs have various levels of helpfulness, from identifying the existence of a problem to localizing the problem to providing the patch to fix it.

There are bugs in documentation such as man pages as well as ebuilds and the source code that Gentoo distributes. These bugs are problem reports. Bugs for things Gentoo doesn't do yet but you think should be done are feature requests. Bugday is more about fixing problems than adding features, but you won't be turned away if you want help with a new feature.

Want to know more about Bugday? It's held on the first Saturday of every month. It's an opportunity for everyone to contribute to making Gentoo better, and eventually you might even become a Gentoo developer. See the Bugday project page for more details.

Bugday is about community spirit. Gentoo is a community—there is no "me" and "them", there is only "we," so instead of lobbying for "them" to fix your particular bug, work together to fix it! Bugday is an opportunity to get help to help yourself.

If you've been wanting to get involved but weren't sure how, Bugday is a great way for you to see what goes on in making a distribution and get involved in Gentoo.

Discuss this!

Roy Bamford contributed the draft for this announcement.

December 31, 2008
Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
I'm glad I'm not a DBA (December 31, 2008, 21:20 UTC)

Diego Pettenò

Today, even though it’s the new year’s eve, I’ve spent it working just like any other day, looking through the analysis log for my linking collisions script, to find some more crappy software in need of fixes. As it turns out, I found quite a bit of software, but I also confirmed to myself I have crappy database skills.

The original output of the script, already taking quite a long time to process, didn’t sort the symbols by name, but just by count, so to show the symbols with most collisions first and the ones that related to one or two files later. It also didn’t sort the name of the objects where the symbols could be find, which caused quite an issue as from time to time the list changed sorting so the list of elements wasn’t easy to compare between symbols.

Yesterday I added sorting to both fields so that I could have a more pleasant og to read, but it caused the script to slow down tremendously. At which point I noticed that maybe, just maybe, PostgreSQL didn’t optimise my tables, even though I had created views, in the hope of it being smart enough to use them as optimisation options. So I created two indexes, one for the name of the objects and one for the name of the symbols, with the default handler (btree).

The harvesting process now slowed down of a good 50%. Instead of taking less than 40 minutes, it took about an hour, but then when I launched the analysis script, it generated the whole 30MB log file in a matter of minuts rather than requiring me hours, I never have been able to let the analysis script complete its work before, and now it did it in minutes.

I have no problem to say that my database skills suck, which is probably why I’m much more of a system developer than a webapp developer.

Now at least i won’t have many more doubts about adding a way to automatically expand “multimplementations”: with the speed it has now I can well get it to merge in the data from the third table without many issues. But still, seeing how much my SQL skills are pointless, I’d like to ask some help on how to deal with this.

Basically, I have a table with paths, each of which refers to a particular object, which I call “multimplementation” (and groups together all the symbols related to a particular library ignoring things like ABI versioning and different sub-versions). For each of the multimplementation I have to get a descriptive name to report to users. When there is just one path linked to that object, that path should be used; when there are two paths, the name of the object, plus the two paths should be used; for more than two paths, the object name and the path of the first object should be used, with ellipses to indicate that there are more.

If you want to see the actual schema, you can find it on ruby-elf’s repository in the tools directory.

There are more changes to the database that I should do to make it much more feasible to connect the paths (and thus the objects) to the package names, but at least now with the speed it took it seems to be feasible to run these check on a more stable basis on the tinderbox. If only I could find an easy way to have incremental harvesting, I might as well be able to run it on my actual system too.

Steve Dibb a.k.a. beandog (homepage, stats, bugs)
another mythfrontend (December 31, 2008, 20:39 UTC)

Steve Dibb

I’ve been poking on and off at the idea of getting a second frontend for MythTV.  I already have my Mini-ITX all setup in my living room, but since I also have a TV in my bedroom as well, I’d like to get one in there as well.  The problem is, I’m not really sure if I’d use it, so I don’t know if I want to jump into spending the $600 to $800 to buy all the hardware.

I never thought I’d really use my other one either, and it actually wasn’t until a few months after I set it all up completely that I finally started playing with it.  That’s a bit of an odd thing about me — I enjoy the challenge and the possibility of setting something up more than using it.  Practicality really does take about the third or fourth position on the list of priorities when it comes to setting something up.  Filling a void is usually number one. :)

Since this idea costs a lot of money, and it’s not something I can throw together lightly, I want to experiment a bit first, and see if I’ll ever actually use the thing before committing.  My first frontend actually came together quite by accident — I had both the motherboard and the HTPC case, but for some reason I had it in my mind that they would never work together because of the cabling or something.  One day it dawned on me that maybe I should actually try, and when I did, it came together great, and I’ve been using it ever since.

Interestingly enough, though, once I got it working, I still wasn’t interested in playing with it … something was always missing.  But since I got my main objective complete, I was happy anyway.  It wasn’t until a few weeks later that I took a closer look at what was stopping me from using it, and I realized it was all the navigation issues that I had with mythvideo, which I patched.  Now I use it on a regular basis — it’s great to have a lot of media on demand and nicely categorized and accessible.  It’s still not perfect, but at least now it’s more of a software issue than hardware.

I actually like the setup so much, in fact, that I’m thinking about cancelling my cable TV altogether and just watching stuff from my library.  That kind of reinforces the idea of getting a second frontend, though.

So, the idea I have so far is to find a cheap frontend that I can play with to see if having a second frontend is even worth all the hassle.  That’s easy enough … it’ll cost me less money, and while it won’t be elegant, I’ll at least be able to see if it’s something I’d actually use or if I’m just looking for a project to play with.

I also have some spare parts that I can put things together, so that makes things helpful.  Unfortunately, I also have the kiss of death whenever it comes to hardware, and everything I touch inexplicably stops working sooner or later for some reason.  I don’t know why, but apparently it works doubly effective when it comes to sound cards.  The onboard sound on my Mini-ITX board died, and I have no idea why.  Well, no idea other than it’s a VIA chipset.  There’s room for one PCI slot, so I put an older SoundBlaster in there, which works great.  I’d much rather have that slot open to use something else …. say, a PCI nvidia VGA card that’d put out a much better picture than the cheap VIA one, but whatever.

I have an extra desktop, which is an old ASUS amd64 motherboard with an nvidia chipset that has worked really well for me.  In fact, I think it was the first 64-bit computer I put together way back in the day.  Somehow, the onboard audio died on this one too.  I have no idea how it happened here, either.  I found a computer store nearby my house that sells used computer parts, so I went there and found an old PCI sound card for only $10.  I bought that, figuring that the older it is, the better it would be supported in Linux.  My bad luck paid me a visit again though, and I managed to find one of the few cards that ALSA never supported.  Whoops.  So now I’m back to square one when it comes to audio.

I could try buying another PCI card, or I can try and find a USB sound device instead.  I’m a bit nervous about those, as I worry that something might happen where either ALSA has issues with it or there is just some small latency that would drive me insane.  Plus, I’m factoring in even more money to support an old piece of hardware, that could instead be invested towards a newer machine which I know would work flawlessly.

I went on Craigslist to see if I could find any cheap sound cards, and instead I found a cheap computer.  I picked up a Gateway Pentium3 for $20.  It has an Intel chipset (sound, VGA) and an onboard NIC (3com).

Ah, crap, I just realized something.  I thought I’d save all this money, after all … $20 for a whole new box instead of just a sound card, but I’m gonna have to get a new PCI video card with S-Video out, which is gonna cost me another $40 anyway.  Dangit.

Oh well, maybe I can use the box for a noisemaker for New Year’s.  The hard drive sounds like someone threw a cat in the washing machine.

Leave a comment

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?

      

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
Kenneth Prugh a.k.a. ken69267 (homepage, stats, bugs)
The 2.6.28 kernel (December 30, 2008, 21:10 UTC)

So I finally got around to updating my kernel on my thinkpad to 2.6.28, the latest release from kernel.org. I’ve seen nothing but good things so far.

  • My media keys work again! Sound and Brightness keys are now actually working properly with Gnome. I don’t know if it is an exact result from the new kernel, but either way I am happy.

  • I can still suspend. I usually screw up my kernels each release so I can’t suspend to ram or wake properly. WiFi seems the same, was hoping for some improvements but I can’t see any for now.

I still don’t see the added benefits of GEM yet. Perhaps some of my stuff is not upgraded to a new enough version to use GEM. I assume this because glxgears still says

Failed to initialize TTM buffer manager. Falling back to classic.

Meh, I guess I can wait awhile longer for my Intel graphics to stop sucking massively. I just wanna play starcraft but it craps out on “Blah Unsupported visual” even though an earlier X/mesa/driver combo worked.

I’m also pondering the venture into using EXT4 on my / partition. I don’t know how to proceed though. Does one run tune2fs from a livecd or can one do it on the running system? I assume livecd is required as one will need to fsck before mounting EXT4.

I plan to try EXT4 following this advice. Any comments or suggestions before I take to the leap to EXT4 would be appreciated.

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
Marcus Hanwell a.k.a. cryos (homepage, stats, bugs)
I am Going to Camp KDE! (December 29, 2008, 21:16 UTC)

Marcus Hanwell

I just wanted to let anyone who has not spotted it already know that I am going to Camp KDE in January! I am really looking forward to it and hope to be able to talk with lots of developers and users. I will be giving half of the talk about KDE and Distros. Specifically Gentoo, but also adding my viewpoint as a downstream consumer of KDE.

I am not officially talking about Avogadro, Kalzium and all the work I have been doing there. Unfortunately there was not enough time in the schedule to fit that in too. I would be very happy to talk to people about it, and will have slides, videos and screenshots with me. So, if you are interested and we can find a corner of a room let me know!

I am registered, have flights and a room booked. So much to do - I did all that weeks ago but only just found time to announce it.

Leave a comment

Git and Automatic ChangeLog Generation (December 29, 2008, 12:10 UTC)

Marcus Hanwell

After our move to use Git and GitHub to host our repository I got thinking about ChangeLogs. Having a version controlled file, where you manually add details about what the version control system should be recording seems like it should not be necessary. I searched and couldn't find a solution that generates ChangeLogs in the style we prefer, which is a variant of the GNU ChangeLog.

So I wrote a quick Python script to try and accomplish this task. It may not be the prettiest Python code as I have never written more than five or six lines of Python before. ChangeLogs always seemed to be the biggest source of merge conflicts whenever we would work in branches, or just all be working at the same time. This is why I think it is necessary to automatically generate something like this that can be generated with source tarballs.

I called it gitlog2changelog.py and it has all of the basics down already. It may not be the most general script but works pretty well for us. I need to add some extra parsing for file creation/deletion so that we can add the + or - in front of the file names. Is there a general need for this? Are there better scripts out there that I dd not spot?

2008-12-29  Tim Vandermeersch <email@protected>

  ∗ libavogadro/src/pluginmanager.cpp: replace getenv(...) with
  QProcess::systemEnvironment()

  ∗ libavogadro/src/elementtranslate.h: Replace "A_DECL_EXPORT extern ..." with
  "A_EXPORT extern ..."

  ∗ CMakeLists.txt: use /MD compiler flag for MSVC

2008-12-28  Marcus D. Hanwell <email@protected>

  ∗ libavogadro/src/molecule.cpp, libavogadro/src/molecule.h,
  libavogadro/src/python/molecule.cpp: Lots of documentation updates,
  reorganised the functions and grouped in Doxygen tags. Some minor changes
  too, more are needed for const correctness.

  ∗ testfiles/multicubes.cube.gz: Removed from our source as it is the same
  size as all the other files put together. May be we should provide a more
  extensive sample of files in a separate distribution.

  ∗ libavogadro/src/engines/bsdyengine.cpp: Ported to use the new bond position
  functions.

  ∗ libavogadro/src/bond.cpp, libavogadro/src/bond.h: Added functions to
  retrieve bond positions, still need to implement the mid-point function.

  ∗ libavogadro/src/bond.h: Documentation updates.

  ∗ libavogadro/src/python/bond.cpp: Added missing Atom include.

  ∗ libavogadro/src/atom.cpp, libavogadro/src/atom.h: Documentation updates,
  added member function groupings and a destructor.

  ∗ libavogadro/src/atom.cpp, libavogadro/src/bond.cpp, libavogadro/src/bond.h:
  Added some atom accessor functions to the Bond class. This should make using
  bonds easier. Fixed assignment order in Atom constructor.

Leave a comment

Ryan Hill a.k.a. dirtyepic (homepage, stats, bugs)
obligatory xmas post (December 29, 2008, 01:17 UTC)

Ryan Hill Yay, exactly what everyone wants to read, another xmas post.

Too bad, i'm doing it anyways.

Xmas kind of sprung itself on me this year, or rather i wasn't paying attention as usual and December just went and ended on me. Shopping was done on the 23rd while driving home. Despite that i managed to get everything i was looking for. We had xmas at our house this year and it was pretty nice - about 20 people and way too much food. I ended up with some very nice DVD's and some much welcomed new clothes.

Altus dropped off a seriously expensive and hardcore winter parka and a nice bunnyhug ("hooded sweatshirt" for you non-Skatchewainians). I guess they're trying hard to keep me around. I've already agreed to go back to work for them this summer for an as-yet-undetermined signing bonus and a decent pay hike. I may still decide to stay with them for my co-op work term later in my fifth semester, but there are a ton of other companies that would pay much more, probably even cover my full tuition, so we'll see.

I decided to park the beater I've been driving and take the new car that I've been trying to sell the last six months back to MJ with me, and in the process of emptying it out I found my old O2 in the trunk. Just for the hell of it I decided to mess around and see if i could figure out what killed it a year ago. After it defrosted and i wiped everything down and pieced it back together, I plugged it in and to my surprise it booted! Well, kinda - for some reason it goes into init 6 as soon as it hits init 3, giving me a nice reboot loop - but the hardware itself seems fine, the disk is intact, i was able to start kde, etc. by interrupting the boot and bringing everything up manually. So if I can figure out what's screwed in the startup sequence I might be back in business.

But for now I'm going to play Persona 4, watch my new MST3k DVD's, and enjoy some time off.

Leave a comment

December 28, 2008
Gunnar Wrobel a.k.a. wrobel (homepage, stats, bugs)
layman-1.2.2 is out (December 28, 2008, 23:58 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
Diego Pettenò a.k.a. flameeyes (homepage, stats, bugs)
The mailing lists problem (December 27, 2008, 19:43 UTC)

Diego Pettenò

For a while I’ve been using GMane for almost all the mailing list I’m following. This made it much easier to deal with it because it mean that I didn’t have to download a local copy of all the messages and it also allowed me for a much cleaner access to archives. Unfortunately this has a downside, as it requires me to use an NNTP client, which is something that hasn’t been much cool to do lately.

In the last few few months I’ve used gnus as my client, but the problem with that is that it still needs a separate software from Evolution (which is my mail client0, and it had the nasty issue of not saving the read messages when emacs closed unexpectedly, say when X died, and because of a bug, emacs daemon died with it.

Now of course I could use mailing lists like most of the other people in the world do, by receiving them on my mail account, but I’d rather not fill my GMail “All Mail” folder with all the messages coming from mailing list, especially for when I have to access that data from an UMTS connection where I pay the traffic.

What other solutions are there for me? I’m considering the idea of doing what I did when there was a limit of 20MB on an email account from my provider, but no limit on the number of accounts, having one account per mailing list. Now the limit is 1GB but I haven’t been using those accounts in quite a long time. Even if they are available in IMAP when I’m on their connection they are only available through webmail from outside; not like that’s too much of an issue for me, since I need mailing list mostly when I’m not around hospitals or stuff like that, so I could just use that.

For this to work, though, I need a few tools working on IMAP, for instance I’d need a script that could expunge old archives, when the threads haven’t been updated in the last few months; I’ll also need a script that would automatically filter the mailing list as they arrive in Inbox (waiting with the IDLE command), since my provider does not allow me to filter the messages server-side. And such a script will have to run on Yamato since it has to be on their network.

Then there is the problem that Evolution saves its cache in my home directory, which is under RAID6; there is no need for the cache to be on my home, when XDG_CACHE_DIR is pointing to a private subdirectory in /var/cache. This includes the 200MB of SQLite database that is currently using. Does anybody know if there is a way to get Evolution to respect the XDG_CACHE_DIR variable?

To-Do lists, tasks, what to do (December 27, 2008, 17:45 UTC)

Diego Pettenò

These holidays really sucked, for a long series of reasons, and in general, I’m not feeling well neither emotionally nor physically. But they offered me the time to think about what I want to do. I’ve been working on my collision detection script lately and I’m now confident I can make it work as a proper tool to identify issues, and I’d love to work on fixing those issues with upstream, but the problem is I lack the time to do that.

Even if I do improve a project a day, it’s never going to be enough, because in a few months I’m going to need to do it again because code would have rot and stuff like that. I need help for this. One thing I’m going to do is working on a personal archive of autoconf macros I can use on different projects; the attributes.m4 file that comes with xine, lscube and Lennart’s projects is already a personal archive of macros under some aspects, the problem is that its history is shared among different repositories which is very nasty. I’ve avoided up to now to create a repository for that, splitting it up in different macro files (since it’s far from being just attributes checking any longer), but I think i should look for a solution for that problem rather than continuing to procrastinate that.

Today I stopped procrastinating on getting rid of JFS for my root filesystem: since kernel 2.6.28 was released, I’m now starting the long awaited conversion of my partitions to ext4, starting from the repositories (and here git wins against Mercurial big time: once the git repositories are repacked, copying them over is very very quick), while copying over openjdk, icedtea and xine repositories that use Mercurial take so much longer.

Talking about xine, I’m going to do some more work on that in the next days, mostly code cleanup if I can, but I’m also planning on setting up a Transifex instance on this server for xine (and my own projects); hopefully it’ll make it simpler to provide translated versions of xine-lib, xine-ui and gxine. As well as of my own tools that need to be translated one way or another.

There are so many things I’d have to do that I haven’t been able to in months, reading is one of those, but I’m going to preserve that for when I’m going to the hospital next month for check ups; I’m not going to bring my laptop with me this time, nor any handheld console. I’ll be around on the cellphone a bit maybe, but that’ll be it. For the rest of the time I’ll be reading and listening to music (I’m not going to leave the iPod at home, knowing hospitals it will come handy). Actually, since I just have to have a CT scan, a chest X-Ray and an MRCP (MRI), I don’t strictly need to stay in the hospital; but not having a driving license does not help; although I guess even if I had one, I’d better not be driving after they have tests on me.

I’m going to spend the new year’s eve alone at home, maybe with my mom and my sister with her husband and my nephew. On the whole, it’s not going to be holiday either, so like it happened on Christmas, I’m going to spend most of the day working on some analysis or similar. I’ve seen that some of the issues I’ve brought up lately have started being taken care of, which is very good.

I know this post sounds pretty incoherent, I guess I’m incoherent myself at the moment. Anyway if you wish to help out with anything at all, feel free to drop a line.

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 26, 2008
Stuart Longland a.k.a. redhatter (homepage, stats, bugs)

Stuart Longland

Open letter to Minister Stephen Conroy regarding the proposed internet filter.

Over the last year, we’ve heard a number of people step up, complaining about this proposal, and what it will mean in terms of freedom-of-speech, and internet speeds.  I also heard a rumour that mentioned the blocking of peer-to-peer traffic.

Now, it is very noble of the government to be that concirned with the issues involving pornography and other objectionable material, that they are pushing forward with developing and introducing this filter to the masses.  Others have already pointed out many of the ethical and technical issues with the proposal, which I note, to date, are still not addressed.

The latest proposal however, has been to block peer-to-peer traffic.  I strongly urge those in the government to carefully consider the consequences before taking on such a drastic action.  Ignoring the fact that Bit-Torrent and similar protocols can, and are, used for legal purposes (such as distribution of open source software) as well as for piracy… a lot of other peer-to-peer protocols exist, that many people expect to be able to use freely.

Consider the following applications/protocols:

  • Skype
  • MSN Messenger
  • Ekiga
  • Yahoo! Messenger
  • TeamSpeak
  • EchoLink
  • IRLP
  • IRC DCC
  • VNC
  • RDP
  • SIP (most VoIP systems)
  • Hamachi
  • … etc

All of these, rely on peer-to-peer traffic to operate, and are used lawfully.  Blocking SIP could be disasterous to our telecommunications, since many people rely on this protocol as their primary home phone service! Such a move could proove highly unpopular with the voting public, and deadly to businesses that rely on VoIP services.  In a time of global economic crisis, is this really what you want?!

It is true that many of us absolutely hate it, when a politician breaks an election promise.  However, we are more than too happy to forgive politicians for breaking such promises, when such promises are mearly implementing bad policy.  I urge this government to consider the above, in addition to the comments made by others on this topic, before going ahead with such disasterous propositions.

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

Marcus Hanwell a.k.a. cryos (homepage, stats, bugs)
Avogadro Has Moved to GitHub and Git (December 24, 2008, 00:15 UTC)

Marcus Hanwell

After some discussion on IRC the Avogadro Project has moved its version control over to GitHub. Our new repository can be found here. Most of us are old Subversion users, and a few of us started out with CVS. I think we are still getting our head around the workflow but feel it is worth the effort for all the advantages the move will bring.

There are some great visualisations from GitHub. I have always loved the speed of Git when compared to other version control I have used. It is also great for adding in bigger changes and not having to halt development in other areas for fear of merge issues. We shall see over the coming months how positive the move was, but I am confident it will be. I have been using Git locally through git svn for over a year now I think.

For those who might wonder, the conversion was not totally automatic. The branches and tags git-svn leaves you with are not Git branches and tags. It basically required me to manually create the branches and tags. So for our repository I ran the following,

mkdir avogadro-git
cd avogadro-git
git svn init https://avogadro.svn.sourceforge.net/svnroot/avogadro --stdlayout
git config svn.authorsfile ../avogadro/authors.txt
git svn fetch

At that point I went and grabbed a coffee, took care of the dog...

git remote add origin git@github.com:cryos/avogadro.git
git push origin master

This got us most of the way there but lacked all of our tags and branches. I found that none of the push options worked as the tags and branches needed to be made into full Git entities first.

git branch -a (show all the branches)
git branch 0.8 0.8
git branch 0.6 0.6
git branch primitive primitive
git tag -f 0.6.0 tags/0.6.0
git tag -f 0.6.1 tags/0.6.1
git push --all origin
git push --tags origin

After all that we have our tags as Git tags and our branches as Git branches. You can browse them and clone the repository. A few of us have been experimenting and everything looks good. Adding current developers as collaborators enables them to push directly to the repository. There are also some web interfaces that allow for pulling from forks.

So if all goes to plan now, there will be no more commits to our old Subversion repository. We have preserved all of our history and I made sure the author metadata was improved. Hopefully this will make our development process more streamlined. We appreciate any and all tips, this looks like a good guide to keeping a fork in sync, pushing and pulling where necessary.

Now back to coding - we want to get a new release out!



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

Marcus Hanwell a.k.a. cryos (homepage, stats, bugs)
Avogadro, Git, GitHub and New Toys (December 23, 2008, 10:55 UTC)

Marcus Hanwell

I have been using Git and Git SVN for quite some time now. It took me a little while to get into Git and see what all the fuss with DVCS was about. Now I find myself enjoying using Git more and more when it is the only version control in use in a project.

Git SVN is certainly a great compatibility layer, and it has allowed me to use Git as my version control system locally without requiring that the projects I contribute to switch. I had heard lots of good things about GitHub, but had not found the time to check it out until Geoff showed me Avogadro after he had pushed it to GitHub. There are some great stats and it looks like is has some great features. I was originally put off by the 100MB limit on storage as it seemed a little low.

When I got home yesterday evening I started playing with it and ultimately made three Avogadro repositories - the third one looks like it is the charm. I had not been worried about importing author metadata previously as I had just been using it locally, but after reading this short guide to migrating to Git I had all the tools I needed. A short trawl through our mailing lists, web pages and history to update author information and I had a shiny new Avogadro git repository.

I am still getting the hang of how all this works. I have added several other committers it matched up as collaborators, but did not spot what exactly that means yet. I was able to get CIA working in our IRC channel, pushed some changes and even synced up a commit from this morning. So I think all is well and I will likely keep this repo up to date with our development. It only has trunk in it, but shows photos of your friendly Avogadro developers and a really nice visualisation of development over time. I think it should open up with the latest stats first, but other that that am impressed. It complements some of the ohloh analysis quite nicely too.

Now can we all please move our source over to some kind of Git repository please!

Leave a comment

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.

Daniel Drake a.k.a. dsd (homepage, stats, bugs)
XO laptop on The Gadget Show (December 21, 2008, 16:56 UTC)

The XO is hitting mainstream UK TV! The laptop will be reviewed on The Gadget Show, 8pm on Monday 22nd December, on Five.

Update: It got rescheduled at last minute. It’ll hopefully be aired after Christmas.

Leave a comment