Search Results: "will"

25 December 2009

Steve Kemp: 907

It was interesting to see Clint Adams describe love and dissatification with configuration management. At work I've got control of 150(ish) machines which are managed via CFEngine. These machines are exclusively running Debian Lenny. In addition to these hosts we also have several machines running Solaris, OpenBSD, and various Ubuntu releases for different purposes. Unfortunately I made a mistake when I setup the CFEngine infrastructure and when writing all the policies, files, etc, I essentially said "OK CFEngine controlled? Then it is Debian". (This has been slowly changing over time, but not very quickly.) But in short this means that the machines running *BSD, Solaris, and non-Debian distributions haven't been managed as well via CFEngine as the rest, even though technically they could have been. A while back I decided that it was time to deal with this situation. Looking around the various options it seemed Puppet was the way of the future and using that we could rewrite/port our policies and make sure they were both cleanly organised and made no assumptions. So I setup a puppetmaster machine, then I installed the client on a range of client machines (openbsd, debian lenny, ubuntu, solaris) so that I could convince myself my approach was valid, and that the tool itself could do everything I wanted it to do. Unfortunately using puppet soon became painful. It has primitives for doing various things such as maintaining local users, working with cronjobs, and similar. Unfortunately not all primitives work upon all platforms, which kinda makes me think "what's the point?". For example the puppet client running upon FreeBSD will let you add a local user, setup a ~/.ssh/authorized_keys file but will not let you setup a password. (Which means you can add users who can login, but then cannot use sudo. Subpar) At this point I've taken a step back. As I think I've mentioned before I don't actually do too much with CFEngine. Just a few jobs: (i.e. I don't use cron facilities, I add files to cron directories. Similarly I don't use process monitoring, instead I install the monit package and drop /etc/monit/monitrc into place.) There is a pretty big decision to make in the future with the alternatives being: If we ignore the handling of local users, and sudo setup, then the tasks that remain are almost trivial. Creating a simple parser for a "toy-language" which can let you define copies, edits, and package operations would be an afternoons work. Then add some openssl key authentication and you've got a cfengine-lite. For the moment I'm punting the decision but I'm 90% certain that the choice is CFEngine vs. Chef vs. In-House-Fu - and that puppet is no longer under consideration. Anyway despite having taken months to arrive at this point I'm going to continue to punt. Instead my plan is to move toward using LDAP for all user management, login stuff, and sudo management. That will be useful in its own right, and it will coincidentally mean that whatever management system we do end up using will have on less task to deal with. (Which can only be a good thing.) ObFilm: Terminator II

24 December 2009

Julien Blache: Packard Bell OneTwo all-in-one with touch screen

I ve just bought a Packard Bell OneTwo (M3700), a 600 Euros all-in-one computer with a 20 multipoint touch screen (there are bigger models with 23 touch screen, wifi and some other options). This machine will be used to run OpenBravoPOS, a free (libre) point of sale software. So far, I think this machine is just perfect for the job. Getting it to run smoothly under Linux is not a walk in the park, however. There are some quirks and some assembly is required, but once you re done (that takes a couple of hours at most once you ve got all the info, which you have if you re reading this) this machine is just great. It s fast, with a 2.1 GHz Pentium Dual-Core (T4300) CPU, 4 GB of RAM, an Intel GM45 GPU with up to 256 MB of shared RAM, gigabit networking, a fast 320 GB SATA disk and a combo DVD-drive (not a slot-in, too bad). The screen is nice, and the touchscreen is incredibly smooth, precise and sensitive. The sound is good, the webcam is great and it works out of the box, too! Update: added a note about the card reader. Before you go Enter the BIOS and bump the amount of memory allocated to the GPU to 256 MB. By default, the machine ships with only 64 MB allocated to the GPU, which is low and ridiculous considering it is equipped with 4 GB Installing Debian Forget about installing Lenny with debian-installer on this machine. The standard installer with its 2.6.26 kernel doesn t support the network interface properly. Upgraded installer images with 2.6.28 or 2.6.30 kernels end up locking the machine solid before the first installer screen. Your best friend: System Rescue CD. Your other best friend: debootstrap. Before rebooting, install the 2.6.30 kernel from backports.org. It works like a charm, even if the 2.6.30 on the upgraded installer locked up solid. Go figure :) While you re at it, install X from Testing. You need a recent enough version of the intel driver that will support the GM45 chip. Configuring X This is the first and the biggest quirk on this machine. The LCD is actually wired up to both the VGA and the LVDS outputs on the graphic card, and advertises different resolutions on both. The native resolution (1600 900 on this model) is only advertised on the LVDS output. While fiddling with X, it becomes obvious that the VGA output is used as the boot video device. If you disable the output in X with xrandr, you loose the text consoles. My un(?)educated guess is that this setup allowed them to use a standard desktop PC BIOS instead of using a more expensive laptop BIOS. I may be wrong, but that s pretty much the only thing that makes sense to me. Anyway. If you want X to work properly, you ll have to tell it to ignore the VGA output entirely.
Section "Device"
 Identifier  "Intel X4500"
 Option  "Monitor-LVDS"  "Panel on LVDS"
 Option  "Monitor-VGA"  "Panel on VGA"
EndSection
Section "Monitor"
 Identifier  "Panel on LVDS"
EndSection
Section "Monitor"
 Identifier  "Panel on VGA"
 # The LCD panel is wired up on both VGA and LVDS
 # Ignore the VGA output as far as X is concerned
 Option  "Ignore"  "True"
EndSection
If you don t tell X to ignore the VGA output, you ll end up with a mirror setup and your desktop will use the smallest size so as to fit on both monitors. It isn t pretty, it s plain silly and we want those 20 used fully, dammit! See the full xorg.conf. Touch screen The touch screen is an infrared multipoint touch screen from Quanta. No kernel driver is needed, only an input driver for X is required. Start by adding an udev rule like this one:
SUBSYSTEM=="usb", ATTRS idVendor =="0408", ATTRS idProduct =="3000", SYMLINK+="usb/quanta_touch"
The touch screen will now appear as /dev/usb/quanta_touch, which is more handy and stable than /dev/usb/hiddevN. Grab xf86-input-hidtouch from HidTouch Suite on SF.net, and apply this patch. The aim of the patch is to ignore anything but the first reported pressure point. The touch screen is a multipoint touch screen and as such can report 2 or 3 (not sure) pressure points at the same time. The driver can t handle that yet. The patch also fixes a bad comment and an API difference with newer X versions. Build and install the driver, then edit xorg.conf:
Section "InputDevice"
 Identifier  "Optical Touch Screen"
 Driver  "hidtouch"
 Option  "SendCoreEvents"  "true"
 Option  "ReportingMode"  "Raw"
 Option  "Device"  "/dev/usb/quanta_touch"
 Option  "PacketCount"  "13"
 Option  "OpcodePressure"  "852034"
 Option  "OpcodeX"  "65584"
 Option  "OpcodeY"  "65585"
 Option  "CalibrationModel"  "1"
 Option  "CornerTopLeftX"  "0"
 Option  "CornerTopLeftY"  "0"
 Option  "CornerTopRightX"  "1600"
 Option  "CornerTopRightY"  "0"
 Option  "CornerBottomLeftX"  "0"
 Option  "CornerBottomLeftY"  "900"
 Option  "CornerBottomRightX"  "1600"
 Option  "CornerBottomRightY"  "900"
 Option  "CornerScreenWidth"  "1600"
 Option  "CornerScreenHeight"  "900"
EndSection
There you are. Working touch screen! Credit: the above touch screen setup instructions, including the patch (which I reworked slightly ) were taken from this post on the Ubuntu-fr.org forum. The instructions cover the Packard Bell Viseo 200T touch screen, which is identical to what s used on the OneTwo. If you re looking for a 20 touch screen, go for it; at 200 Euros it s a good deal. Sound The Realtek ALC268 codec as used in the OneTwo isn t properly supported yet, however using model=acer-aspire works for the integrated speakers and the headphone jack. Line out and the integrated microphone do not work. Webcam The webcam is a UVC webcam and the image quality is stunning. I m seriously considering stealing that webcam to replace the iSight in my MacBook Pro. It works out of the box without any firmware. Quite a good surprise :) Flash card reader The integrated flash card reader also works out of the box, for the card formats supported by Linux.

Clint Adams: Muppetry

I'm a notoriously late adopter of new technologies. Sure, if I think that something is potentially a good idea, I'll go for it, but for the most part, I assume that things are stupid. I refused to use the WWW for many years, thinking it was idiotic. Now I use the WWW. I find microblogging to be inane and narcissistic at best, but I have derived mild amusement from Shaq on Twitter. Microsoft Windows is something I thought would be ridiculously unsuccessful, because it didn't do anything I would find useful. The list goes on and on, and includes something known in the popular vernacular as configuration management . I've been hearing about BladeLogic and Opsware for quite some time, and idly wondering who the incompetent fools are that need something like this. Back in my day we could manage 100 servers with relative ease; no centralized authentication (because it was a running argument about whether NIS sucked more than NIS+ or vice-versa), no cfengine, no prebuilt server images or any of that jazz. If, for some reason, we needed to make the same change to all servers at once, or some subset thereof, we would just script it. So when one of my acquaintances started raving about Puppet, I assumed it was equally pointless. We'll call him Downs. Downs exhibits a pattern of behavior where he will rave about something for a few weeks, sometimes without having even tried it first, and then eventually become disillusioned with it and start ranting with the same fervor with which he had insisted that whatever fad of the week was the greatest thing ever. It came as no surprise to me when he fell out of love with Puppet and started raving about how much better Chef is. In case you're wondering, he still has not tried Chef to this day. Finally someone convinced me of the value of Puppet. I do not think it is the Way and the Light, but I do see a few situations wherein it makes sense to sacrifice efficiency, flexibility, sanity, and system resources to gain a way of building a near-identical machine from scratch. Now, beyond the flaws inherent to a solution like this, Puppet does have some annoying flaws which I find unnecessary, and which Downs ranted about back when I had absolutely no idea what he was talking about. I disregarded his alleged preference for Chef, but I have heard intelligent people extoll the virtues of Chef, and to a lesser extent Bcfg2. So I took a very brief look at each of those, and was pretty much horrified by what I found. If I need something Puppet-like in the very near future, I will probably be choosing Puppet. I have no intention of running Puppet on machines I manage all by myself though. For that eventuality I am NIHing something with what I consider a better design. The current code is published, but it does not do very much, and requires linking with libdpkg.a which does not exist in any package (but Guillem's working on that, I think). I have no idea whether or not I'll have the motivation to finish it all by myself, but it is Free Software. This post is intentionally weak on details, or deets as the kids call them.

Ingo Juergensmann: Frohes Fest - Merry Christmas

Allen Lesern w nsche ich ein Frohes Fest, fr hliche Weihnachten, viele Geschenke oder einfach nur einen sch nen 24. Dezember!
To all readers: Merry Christmas, Buon Natale, Joyeux Noel, Vrolijk Kerstfeest or whatever you will celebrate these days in your culture!

Weihnachtlicher Gru aus Warnem nde

Mark Brown: EIFF 2009

The Edinburgh Film Festival finished a couple of weeks ago. As ever, I went along and saw a bunch of films and stage interviews. The programme had been a little disappointing, mostly due to feeling a little constricted some things that are usually present were dropped (Mirrorball being the most obvious example) and the late night movies weren t very late night, starting about 10:30 for the most part. That said, it was a lot of fun I was more successful than normal in avoiding duds and there were several things that really stood out. Two films I saw early on that really stood out were Moon and Exam, two low budget indie science fiction films. Moon has had an awful lot of publicity already so I won t repeat what other people have said about it. Exam is a very tight, taut thriller eight people in a room in the final test of a long interview process, one of whom will get the job. Both films looked great a testament to how affordable good CGI has become. I ll be interested to see what follows them now there s some examples of low budget SF out there, and I m not sure what to make of the fact that both of the films were British. Pontypool was also excellent, a zombie movie about the dangers, or possibily salvation, of talk radio. If you see it (which you should) make sure you stay for the end of the credits. Also good was Modern Love is Automatic. It s a low budget indie flick which reminded me an awful lot of The Unbelievable Truth partly in terms of visual design but more in the way it decided to just jump off and handle things in a totally non-naturalistic fashion. It s a really tricky thing to pull off without looking like you just don t care about the audience (witness a lot of experimental films) but it s very impressive when it works and it worked here. On the down side Dario Argento s Giallo had the audience laughing, and I m fairly sure it was an at laugh rather than a with laugh. There came a point in the film where it felt like they d just run out of enthusiasm for the whole thing and were just throwing anything on the screen to tie up the loose ends. Very disappointing at a film festival. That was the only real blip, though overall it was good though there was cost cutting in evidence.

Jonathan McDowell: Neat find of the day: inputlirc

I've recently been fixing up my VDR setup to work with FreeSat and make it brother/parent friendly. I've applied the EPG patches to get the 7 day guide, setup an autologging in user under gdm with vdr-sxfe running and that left getting the remote working. For some reason my old serial dongle wasn't happy with lirc - it got detected ok, and would show some signal when buttons were pressed but didn't work with the old config. The entire hardware of the box has changed, so it seems likely something isn't quite right (in particular the lirc drivers spew out warnings about SMP bits so I should probably try the dongle under a single core setup to rule that out, but there's also a move to 64 bit involved).

The easy solution to have something sorted for Christmas was to pickup a cheap remote from eBay. This ended up being a Cyberlink remote + USB dongle combo. Worked just fine when plugged in, turning up as a normal input device and the obvious keys doing the obvious things. I wanted all the keys to work though, as I'd got used to having a lot of the VDR functions instantly accessible rather than having to work my way through the menus. Various searches suggested I'd need to use LIRC to access the odder keys. That seemed a lot of hassle for something that was doing the decoding itself. Some playing with xev turned up keycodes for a number of the keys, but there were still a few missing (and important ones at that, such as Red/Green/Yellow/Blue). Further digging found me a suggestion of an Xorg keyboard map that would map the KEY_RED etc from the evdev device into something workable under X. And then I found inputlirc via the Debian package. This is really bloody neat - point it at an evdev device and it will present all of the KEY_* codes out as lirc keys. If you pass the -g parameter it makes sure the key presses only go to lirc as well. Exactly what I want and a doddle to setup - no messing with a big configuration file, just edit /etc/defaults/inputlirc to point to the correct /dev/input/by-id/ file, add the -g to the options in that file and restart.

Now the main remaining task is to get it working with BBC/ITV HD.

23 December 2009

Gerfried Fuchs: Merry Season Greetings

This poem is only in German language, but I hope you can forgive me to run it in my English language feed nevertheless. I send you the best season greetings, have a nice time, use it well, relax and think about it. :)

Weihnachtsgedicht 2009

Vor ungef hr zweitausend Jahren
glaubt man, wurde ein Mann geboren
glaubt man, dass es Gottes Sohn gewesen ist
glaubt man, der uns alle erl sen sollte

Irgendwann sp ter
dachte man, das w re ein Grund, daran zu denken
dachte man, es w re ein Grund, in sich zu kehren
dachte man, es w re eine besinnliche Zeit

Heute jedoch
stresst man, um nur ja Geschenke f r alle zu finden
stresst man, weil jeder berall mit einem feiern will
stresst man, um sich besonders g tig zu zeigen

Ich w nsche mir, dass
wir helfen, uns zur ck zu erinnern
wir helfen, uns zur ck zu besinnen
wir helfen, wieder ruhiger zu werden

Ich w nsche euch ein erl stes, besinnliches,
g tiges und ruhiges Weihnachtsfest!

Robert Collins: bzr selftest uses testtools


the emperor has new clothes bzr has just changed the base class for its test suite from unittest.TestCase to testtools.TestCase . This change has cleaned up a bunch of test logic, deleted a significant amount of code (much of which was redundant with Python unittest) and added some useful and important features. bzr has only been able to make this change due to testtools expanding its mission from a simple aggregation of proven unittest extensions into one where new extensions that *make unittest more extensible*. My deepest thanks to Jonathan for permitting me to use testtools as the vehicle to put these extension-enabling-extensions (and for his patience in reviewing said changes!). The change was pretty easy: The bulk of the changes were in bzrlib.tests and bzrlib.tests.test_selftest. I chose to cleanup an ugly API at the same time which added a little scattershot across a number of tests. And there are more changes that can be done to take better advantage of testtools the amount of deleted and cleaned up code isn t complete. Even so, its a pretty clear win:
18 files changed, 228 insertions(+), 496 deletions(-)
What went? bzr had an implementation of TestCase.run. This function is the main workhorse of Python s unittest module, and yet sadly it has to be replaced to change the exceptions that can be raised(to signal new outcomes), or to improve on test cleanup. Testtools provides an API to permit registering new exception types and handlers for them. Like python 2.7 testtools also provides the TestCase.addCleanup API, and these two things combined mean that bzr no longer needs to reimplement the run method. For expected failures, bzr uses a helper method TestCase.expectFailure to perform an existing assertion and convert the test into an expected failure if that assertion does not trigger. This was another feature testtools already provides and thus got deleted. All the custom code for skipping and expected failures got deleted, and the other outcomes bzr uses turned into extensions (as per the run discussion above). In bzr test cases generate a log (because bzr generates a log) and previously the TestResult in bzrlib inspected each test that had been executed to extract the log. This was made simpler by using the details API that testtools provides (see testtools.TestCase.addDetail), which permits tests to add arbitrary data in a semi-structured fashion. This is supported by subunit and a long standing bug with bzr selftest --parallel was fixed as a result logs from tests run in other processes are now carried across the process barrier intact and are presented cleanly. Some other minor cleanups are in unittest compatibility code, where bzr would degrade gracefully with unittest runners, and testtools provides such logic comprehensively, so all that got deleted too. Whats new? I think the most significant new facility that testtools offers bzrlib is assertThat. This assertion is inspired by the very nice assertThat in JUnit (which has changed substantially since Python s unittest was written based on it). This assertion separates the two concerns of raise an exception and decide if an exception should be raised . The separation allows for better reuse of custom checking code, because it permits composition in a cleaner way than extra assertion methods permit. Testtools does not include many matchers as yet, but matchers are easy to write, and if one were to write a small adapter to the hamcrest library, there are a bunch of ready made matchers there (though they have a very Java feel such as is not meaning is which is why Testtools did not use that library). Secondly, the addDetail API referenced above, in combination with testtools.TestCase.addOnException will permit capturing the entire working area when a test fails, something that developers currently have to fiddle about with breakpoints to achieve. This hasn t been done, but is a straight forward patch I hope to do in the new year. Lastly, Testtools offers testtools.TestCase.getUniqueInteger and testtools.TestCase.getUniqueString, which are not as yet used in bzr tests, but we may start using them soon. Beyond that, the other features of testtools are already present in bzrlib, and we simply need to find and delete more duplicated code.

Benjamin Mako Hill: What's in a name?

Over the summer, there was a bit of a tussle at the highest level of Ubuntu governance over whether or not Canonical Ltd., the company that funds the majority of work done directly in Ubuntu, should name its file syncing and backup service Ubuntu One. Canonical's service involved a freely licensed client included in the Ubuntu distribution but, as a network service running on Canonical servers, it was not clearly a part of Ubuntu (the GNU/Linux distribution) or Ubuntu (the community) in the way the term was usually used within the community. Although the network service itself was not Franklin Street Statement free, this was not the most important issue for everyone who objected to the name. The major issue for many seemed to boil down to the fact that, free or not, Ubuntu One is a service run entirely by Canonical outside the reaches of the Ubuntu governance structures. Decisions were made and not everybody -- and maybe not anybody -- was absolutely happy with the outcome. My goal is not try to revive old arguments here. As far as I'm concerned, the issues are settled and the service is called Ubuntu One. That said, the questions raised during the episode are fundamental to Ubuntu and to other firm-sponsored FLOSS projects. Now that the dust has settled, they are worth reflecting on. From a legal perspective, there never was any ambiguity. Canonical "owns" the Ubuntu trademark. In this important sense, "Ubuntu" means whatever Canonical says it means. This is hardly new. As just one example, the Official Ubuntu Book (of which I am an author) was written by community members but became official because Canonical blessed it. But despite the fact that they don't need to, Canonical has often consulted with the community and its governance structures about trademark licensing policy. This was also not a case of Canonical not listening to the community. Canonical employees approached the Ubuntu Community Council (Ubuntu's highest governance board of which I am a member), listened carefully to concerns, and responded thoughtfully. The question was not even about a clash between what Canonical and the CC thought about the issue. An unambiguous majority of the board, including all the Canonical employees and several of the community members, supported the idea of Canonical using the trademark. The question was one about who gets to make the decisions about the Ubuntu name and about what role the community and Canonical would each play. Despite the fact that a majority of the Ubuntu community council was likely to support the proposed name, the CC was told by Canonical CEO Mark Shuttleworth that a vote was irrelevant. Canonical made it clear that decisions about the Ubuntu trademark were simply not in the CC's purview. The decision on how the name was to be used was something that Canonical was not willing to delegate to an "outside" (the firm) governance body. Few businesses would. And although I don't agree with the decision as a community representative, I might have even made the same call from Canonical's shoes. In traditional firms, it's usually pretty clear where the organization's boundary lies. In FLOSS projects -- and especially in FLOSS project like Ubuntu who are sponsored in very large part by a single for-profit company -- boundaries are fuzzier. The conversation about "Ubuntu One" can be seen as a fight over what "Ubuntu" refers to, and, more importantly, who gets to answer that question. In deciding whether to call a service "Ubuntu", a decision is made on what Ubuntu is. Names are powerful. Is Ubuntu just a Canonical project? Are Ubuntu's contributors really just Canonical contributors by proxy? I think the answer to both questions is "no" but the boundary issues involved are complicated and under constant negotiation. Every time Canonical uses the Ubuntu name itself or grants others the ability to do so, these boundary issues are negotiated, one way or another. This boundary setting work reveals an important tension that firms releasing FLOSS must all struggle with. To what extent and in what ways do communities get to decide what a FLOSS project is and to what extent do sponsoring firms get to do so? How should projects and firms do this most effectively? What should we even be optimizing for? I think that any resulting balance has a huge effect on whether a FLOSS project is, on one hand, released under a free license but run like any old corporate project or, on the other, a true "bazaar" style project where no single firm dominates -- or where they fall on that spectrum. Names and trademarks are one way that projects define their own identities and act as an important frontier in this balancing act. As every firm/project negotiates their own answers to questions of names and boundaries, there are important implications for the project's ability to attract volunteers, solicit contributions from other firms, and more. The confusion around conversations about Ubuntu One shows that we still have a lot to learn.

Peter Eisentraut: Patience

Occasionally, there are concerns expressed about the adoption rate of Python 3. Now that PostgreSQL 8.5alpha3 is released with Python 3 support in PL/Python, let's see what the schedule might be until this hits real use.

Python 3.0 was released in December 2008 and was admitted to be somewhat experimental. At that point, PostgreSQL 8.4 was already in some kind of freeze, so adding a feature as signicant as Python 3 support was not feasible at that point.

In fact, we opted to do two significant rounds of fixing/enhancing/refactoring of PL/Python before tackling Python 3 support: fixed byte string (bytea) support and Unicode support. Both of those benefit Python 2 users, and they made the eventual port to Python 3 quite simple.

PostgreSQL 8.5 might release around May 2010. Debian squeeze is currently in testing and doesn't even contain Python 2.6 or Python 3.1 yet, due to some technical problems and a bit of infighting. Debian freezes in March 2010, which means without PostgreSQL 8.5 but hopefully with Python 2.6 and 3.1. The final release of squeeze should then be later in 2010, which means the earliest that a significant number of Debian users are going to look into moving any of their code at all nearer to Python 3 (via 2.6) is going to be late 2010. (Other operating system distributions will have other schedules, of course.)

The next Debian release (squeeze+1), which will presumably include PostgreSQL 8.5 or later and a solid Python 3.x environment, will then not be released before January 2012, if we believe the current 18-months-plus-slip cycle of Debian. So it will be mid-2012 until significant numbers have upgraded Debian and PostgreSQL to the then-current versions. If you are sticking to a stable and supported operating system environment, this is the earliest time you actually have the option to migrate to the Python 3 variant of PL/Python across the board for your applications. Of course in practice this is not going to be the first thing you are going to do, so by the time you actually port everything, it might be late 2012 or even 2013. Also, if you are heavily invested in PL/Python, you are probably not going to upgrade much your other Python code before PL/Python is ready.

This will then be 3 years after the PL/Python 3 code is written and 4 years after the release of Python 3.0. And 2 years before Python 2.x is expected to go out of maintenance in 2015.

So, to all users and developers: patience.

Incidentally, I fully expect to still be using IPv4 by then. ;-)

Ian Wienand: Stripping shared libraries

So, how to strip a shared library? --strip-unneeded states that it removes all symbols that are not needed for relocation processing. This is a little cryptic, because one might reasonably assume that a shared library can be "relocated", in that it can be loaded anywhere. However, what this really refers to is object files that are usually built and bundled into a .a archive for static linking. For an object in an static library archive to still be useful, global symbols must be kept, although static symbols can be removed. Take the following small example:
$ cat libtest.c
static int static_var = 100;
int global_var = 100;
static int static_function(void)  
       return static_var;
 
int global_function(int i)  
    return static_function() + global_var + i;
 
Before stripping:
$ gcc -c -fPIC -o libtest.o libtest.c
$ readelf --symbols ./libtest.o
Symbol table '.symtab' contains 18 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
...
     5: 00000000     4 OBJECT  LOCAL  DEFAULT    5 static_var
     6: 00000000    22 FUNC    LOCAL  DEFAULT    3 static_function
    13: 00000004     4 OBJECT  GLOBAL DEFAULT    5 global_var
    16: 00000016    36 FUNC    GLOBAL DEFAULT    3 global_function
After stripping:
$ strip --strip-unneeded libtest.o
$ readelf --symbols ./libtest.o 
Symbol table '.symtab' contains 15 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
...
    10: 00000004     4 OBJECT  GLOBAL DEFAULT    5 global_var
    13: 00000016    36 FUNC    GLOBAL DEFAULT    3 global_function
If you --strip-all from this object file, it will remove the entire .symtab section and will be useless for further linking, because you'll never be able to find global_function to call it!. Shared libraries are different, however. Shared libraries keep global symbols in a separate ELF section called .dynsym. --strip-all will not touch the dynamic symbol entires, and thus it is therefore safe to remove all the "standard" symbols from the output file, without affecting the usability of the shared library. For example, readelf will still show the .dynsym symbols even after stripping:
$ gcc -shared -fPIC -o libtest.so libtest.c
$ strip --strip-all ./libtest.so 
$ readelf  --syms ./libtest.so 
Symbol table '.dynsym' contains 11 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
...
     6: 00000452    36 FUNC    GLOBAL DEFAULT   12 global_function
    10: 000015e0     4 OBJECT  GLOBAL DEFAULT   21 global_var
However, --strip-unneeded is smart enough to realise that a shared-object library doesn't need the .symtab section as well and remove it. So, conclusions? --strip-all is safe on shared libraries, because global symbols remain in a separate section, but not on objects for inclusion in static libraries (relocatable objects). --strip-unneeded is safe for both, and automatically understands shared objects do not need any .symtab entries to function and removes them; effectively doing the same work as --strip-all. So, --strip-unneeded is essentially the only tool you need for standard stripping needs! See also

Dirk Eddelbuettel: RInside release 0.2.0

RInside, a set of convenience classes to facilitate embedding of R inside of C++ applications, was updated to release 0.2.0 over the weekend. Sources as well as binary packages are at CRAN; sources are also at my RInside page The biggest news is that we now support builds on Windows -- if and only if you use the R toolchain -- more on that below. Since I had first released RInside people had emailed about support on Windows. However, Richard Holbrey deserves special mention as he actually sat down and tried to build it. Over a few email exchanges we made decent progress, but stalled. More recently, I sat down and had another go and lo and behold, it works. This required a few #ifdef statements here and there, as well as a function setenv() which Windows does not have -- Richard kindly helped here and borrowed most of the code from R itself. Now, to make this plain: you need gcc (as this is how R itself is built). This gcc compiler is the native compiler on Linux and OS X. But on Windows this requires installing the Rtools compiled by Duncan Murdoch as detailed in the The Windows Toolset appendix to the R Installation manual. Do not, I repeat, do not report an error if you fail to build this with another compiler as this is not supported. That said, if you have the proper tools, things are peachy. Install the package, change into the examples directory installed with it and say make (or on Windows: make -f Makefile.win). That's it -- now run the examples (which on Windows will most likely require setting the environment variable R_HOME). Now you can run simple examples like the one from the previous blog post or any of the other ones. Happy embedding!

22 December 2009

Lior Kaplan: When software patents works against you


AP reports about Court: Microsoft violated patent; can t sell Word
A federal appeals court on Tuesday upheld a $290 million judgment against Microsoft Corp. and issued an injunction that will prevent the sale of its popular Word software.The court injunction is set to go into effect Jan. 11. Microsoft has said such a bar would prohibit the sale of all currently available versions of Microsoft Word and Microsoft Office.
Is it time to have a second thought about Red Hat statement of position on software patents ? Posted in Proprietary software

Gustavo Noronha Silva: WebKitGTK+ HackFest!

The WebKit hackfest is now over, and I think it was a very productive week. Thank you very much to all who attended, to Igalia for organizing the hackfest, and hosting us so well, to Collabora for having sponsored the event, and allowed me to spend the week working on it, and to the GNOME foundation for having payed all of my costs!
Xan blogged about day 0, and also a summary of all that was done, so I ll focus on the stuff he forgot to mention ;D. The hackfest, for me, started on day -1 with me not allowing Xan to go sleep before he had reviewed a couple patches of mine to fix DOM context menu handling. It always bothered me that Epiphany failed to open right-click menus in some pages, or let pages handle the right click. Well, this is fixed now, and Zimbra users can now have their right click menus, and WoW players can remove talent points from their calculators =P. It turns out that many of the attendees don t like pages messing with their context menus, though, and they had some good points to back up their positions (like pages making it hard to save images, for instance), so I implemented a way to force openning the custom menu: Ctrl-rightclick. We wanted to use a GtkInfoBar to display questions regarding the form saving - our initial implementation always saved all credentials, but that didn t sound good enough. Xan and I thought it would be very complicated to make this work, because there were assumptions in the code regarding which widget contains which, but it turned out to be quite trivial - making EphyEmbed a descendant of GtkVBox instead of GtkScrolledWindow, fixing a small number of assumptions, and that was it. The passwords are saved in the GNOME Keyring. It s interesting to point out that GNOME Keyring seems to be unhappy with the number of passwords a browser stores - Xan s daemon was hanging, crashing, and spawning a large number of threads. My daemon decided to take up some 300MB of RAM at one point. It s somewhat funny to see how much a browser pushes the limits of our platform. We are hoping this will improve with the new keyring APIs, and the rewrite that is ongoing. It s nice to see my browser form passwords in seahorse, though, and be able to manage them like any other. One more thing worth of notice, although this post is already a bit too big: one of the main concerns people had during the Hackfest was on making build time smaller. Touching a single file in WebCore causes a debug build of 10 minutes on my laptop. Evan Martin and Benjamin Otte made a push at removing unnecessary includes from WebCore, and WebKitGTK+ files, which brough the build time down a bit. They end up inspiring Aroben, from Apple, to go even further into this, and remove many includes from files all over WebKit. Evan was also able to bring linking time down by making it possible to link libwebkit without having to build all the intermediate libraries, which brought build time down to 1 minute, when touching a single file in WebCore. Behdad and I also started looking into breaking WebCore up into lots of shared libraries for Debug builds, since we don t care too much about speed penalties in those. None of these experiments got committed yet, but I am hoping we will be having a better time hacking on WebKitGTK+ in the near future. It was awesome meeting everyone, by the way! See you around =).

Julian Andres Klode: Nokia N900


Yesterday, an N900 I bought from Amazon Warehouse Deals arrived. The device is great, but I discovered today that the AV output only outputs sound on the right speaker and nothing on the left one. So it seems that I have to send it back and will thus not have a N900 during Christmas. Appart from that problem, the device works almost perfectly. The internet browsing experience is faboulus, the camera is good, and the device is fast; the screen is great and the speakers are great as well. The keyboard is easy to type with and you can type fast after a short time. The video player does not seem to like my H.264 files (the OpenMAX decoder fails whereas on my PC ffmpeg is able to play it). That s all for now, I ll write again when I have a N900 with working AV output. Posted in General

Andrew Pollock: [life] All that's left is to pick up the keys

Yesterday morning we went to the title company to do all of the paperwork for the condo purchase. I'm still not entirely clear on the whole process, but basically we signed a ton of disclosures and the loan documents, and the whole lot got notarised. I found the thumbprint requirement rather amusing. So the loan should fund today, and the title change will register with the county on Wednesday, and by tomorrow afternoon, we should have the keys. We then had to do a walk through to sign off that the property hadn't turned into a pumpkin since we put the offer in. It was only the second time I've been able to see the place, so it was good to take another look. Sarah's been doing lots of running around to organise quotes for the kitchen renovation and measure the windows for curtains, so she's seen it many more times. There's going to be a few little odd jobs that need doing around the place. There's a few lights that aren't working (presumably just bulb replacements. There's an outside cupboard that's falling apart. There's a little water feature that I think we'll just get rid of, as the pump is a waste of electricity and it'll just breed mosquitoes otherwise. It's going to be home.

Lior Kaplan: Oracle removes gnome packages from its database requirements


As a sysadmin I try to make sure my servers will have the minimal installation needed in order for them to work. In most cases this policy works fine, but some applications depend on too much unneeded software like GUI or sound packages. Two years ago I wrote about Why does Oracle s applications needs xscreensaver in order to run ? . It seems that finally things have changed. In it s latest version of the 10g r2 release notes (B15666-14), Oracle dropped the control-center and gnome-libs packages from the software requirements. This change is only relevant for RHEL5, as the list for RHEL4 (x86_64) haven t changed except from dropping xscreensaver and adding some other packages. Notice that for RHEL5, 3 packages were added in order to let the installer display it s graphical interface:
  • libXp-1.0.0 (i386)
  • libXt-1.0.2 (i386)
  • libXtst-1.0.1 (i386)
I m glad to see Oracle update it s software requirements as a lot of people in the databases world are afraid to make changes which are against the official documentation, regardless of how wrong it might be. Posted in Proprietary software, Red Hat Enterprise Linux, System Administration Tagged: Oracle, software requirements

21 December 2009

Robert Millan: GRUB i18n


Better late than never. We promised internationalization and here comes GRUB with gettext support. Many thanks to Carles Pina for bringing GRUB a bit closer to end users. Here s GRUB menu in Catalan: GRUB menu And here s the Catalan version of GRUB command-line interface: GRUB command-line Help is much welcome from translators who want to add their own languages! Like many other GNU projects, translation support for GRUB is coordinated by the Translation Project. If you re excited by the idea that your strings will be the very first localized message that is displayed on every user s box, or simply want to bring our cause for computer freedom further, get in touch with your language team.

Martin-Éric Racine: Wanted: a coherent, sane Finnish political party

In more than 11 years in Finland, I've been politically involved in a couple of political parties on the Right side of the spectrum - mainly because those parties tend to favor a free market economy and a work-oriented immigration. In one case, I was invited by fellow immigrants to attend the meetings of their favorite party's English section, because of my expertise on Immigration legislation and common practices. In an other case, a member of the Finnish parliament invited me to participate in his party's immigrant workgroup, which resulted in my getting involved in a number of proactive initiatives and eventually joining that party as a card-carrying member. Simultaneously, I was approached by no less than 4 Finnish political parties to become a candidate in the municipal elections (in Finland, foreigners who have lived at least 2 years on an A-status residence permit can vote and stand as a candidate in municipal elections). Despite this, I've come to the conclusion that none of these Finnish political parties is genuine: On one hand, there's politicians who claim to know everything about the Immigration question and yet their speeches tell an entirely different story than what immigrants experience. On the other hand, there's politicians who complain about the immigrants' lack of participation in political life, but who quickly add that their personal group of supporters is all they're interested in hearing from. Correlating these facts, it's been found by many politically-involved immigrants that Finnish political parties don't genuinely want to involve immigrants; all they are interested in is acquiring a few extra votes from the immigrant population and in transferring those votes to their party's star Finnish candidate, who often is someone favored by the party's old-timers but disavowed by the majority of grassroot members. In a few more extreme cases, party brasses will sheepishly admit that all they want is a couple of niggers in the candidate list to show a vague sense of adhesion to the multicultural agenda - despite the assurances they have given to often naive immigrant candidates that they "genuinely" hope that they'll be elected. As it turns out, many immigrants are actively involved at the grassroot level and receiving the praises of their Finnish colleagues for their innovative and proactive initiatives. As a result, genuinely interested Finns have joined forces with active immigrants to launch various initiatives for improving Finland's competitive position in the global economy through a thriving cosmopolitanism and a stronger culture of entrepreneurship. For instance, I am personally involved at several public and private sector initiatives. Nonetheless, grassroot initiatives can only ever accomplish so much; without the unflinching support of Finland's significant political players, several key elements of these innovative solutions cannot be implemented. However, given the grassroot's frustrating experiences of the political scene, one cannot help but wonder: Is there any Finnish political party whose actions are coherent with its stated political agenda and in sync with the grassroot initiatives being put forward by the immigrants and their Finnish associates?

20 December 2009

Steve Kemp: You're gonna need a bigger boat.

I'd like to nominate this week of the year to be : (I'd pick a single date but the only date I care about is March 10th, and that has already been assigned National Fishnet Day.) So, national backup week? This week is the week I'd like to suggest that you ensure that all the hosts, systems, and machines you care about are backed up. Maybe not today, maybe not tomorrow, but soon they will die. If you have a system die without a backup you're screwed. If this week is a quiet time at work, or if you're having time off, take an hour, take a few, and ensure you have backups .. current backups. ObFilm: Jaws

Next.

Previous.