Search Results: "ana"

29 March 2008

Martín Ferrari: Six (more) reasons to hate Java

There are many reasons to hate Java, it's like shooting fish in a barrel. But in the last weeks I found some more, half of them aren't even fault of the standard API (the usual culprit), and I want to share my frustration with the rest of the world. It has no unsigned types Say you want to manage binary protocols, files, etc. You'd like to store and retrieve bytes and words in machine format, of course, but you'll have a hard time finding the right value because you can't have a goddamn unsigned byte! So if you want —for example— to read the length of a string which can be bigger than 127 as a single byte, you'll end doing some aberration like this:
byte strl = foo_retrieve_byte();
int real_strl = strl < 0 ? 256 + strl : strl;
You can't inherit constructors Maybe there's something in the OOP dogma that mandates this, but if I want to define a new exception that does nothing, but allows me to differentiate a custom class of errors, I don't want to explicitly write dummy constructors instead of writing an empty class —which is simpler and cleaner— and have the four standard exception constructors for free. So, you'll have to do this:
public class FooException extends BarException  
	public FooException()   super();  
	public FooException(String s)   super(s);  
	public FooException(Throwable t)   super(t);  
	public FooException(String s, Throwable t)   super(s, t);  
 
Instead of this:
public class FooException extends BarException    
You can't declare destructors Say you've coded a nifty jdbc wrapper that automates most of the boring stuff, like automatically freeing the connection to the connection pool when there was an exception thrown, logs errors and maybe queries, handles auto-commit settings, etc. In the simple case, you'd create an instance, do some work, and then close the connection; if there was an SQL exception, you little class will take care of it and re-throw. BUT, if in the middle of your work in the calling code, you have an unrelated exception, you need to catch it or you'll leak connections, because the wrapper class doesn't have a way of handling this, even if the object gets garbage collected! In the end, I had to write tons of times the same stupid code:
try  
	j = JdbcWrapper.new(foo);
	j.doSelect(bar);
	unrelatedObject.unrelatedMethod();
	j.doUpdate(baz);
  finally  
	j.close();
 
You don't have a sane way of controlling the terminal Most of the time, when dealing with web applications, you won't need this. But when you're doing some serious stuff, you might need to write a CLI application (oh, noes!); and then do some stupid thing like asking the console to stop echoing characters so you can ask for a password. You'd think that the smart guys that designed Java would have devised an portable library to handle this trivial task, but no! Guess what I found when looking at a way of doing this? Some idiot at SUN recommending (and many dummies following) a background thread that spits backspaces faster than the user can write! Of course, SUN will tell you that using Strings is insecure for storing passwords, because they cannot be wiped out like byte arrays. But they fail to mention something as basic as not showing the fucking password in the first place, or something as important as wiping the object after using it: you can't lock memory from Java, so you risk that it could end in some slack in the swap file. No, you can't leave stdin/stdout/stderr fscking alone! When dealing with the previous problem, you say fuck portability and just call stty -echo to do the job. Well, you'll find a little surprise! Even if you don't ask for the process' reader/writer streams, the Runtime class will pipe(2) and dup(2) your child process' standard streams. With this excellent approach you cannot have a child process output stuff to the user, nor even errors; you cannot allow the child process access the tty (stty obviously can't do shit with a piped stdin). And there's no fucking way to tell it to stop crippling your standard streams! The only solution I could find was a very ugly shell hack:
Process p = Runtime.getRuntime().exec(
	new String[] "sh", "-c", "stty echo > /dev/tty < /dev/tty 2>&1" 
);
No, you can't handle signals After doing the previous hack, you find that if you interrupt your process while waiting for user input, your console will remain in noecho state. So the obvious thing is to catch SIGINT and friends and call stty again to restore the console. HA! You will find that there's no standard way of doing that, and if you really need it, you have to resort to undocumented com.sun.* classes which aren't even guaranteed to be present in every JVM. My solution was to set up a shutdown hook, which solved this problem, but would not solve other very common problems that are solved usually with signal handlers. I'm going to DebConf8, edition 2008 of the annual Debian 
       	developers meeting Tags: Planet Lugfi, Planet Debian

David Pashley: Bad Decompression Errors in OpenSSL 0.9.8a

Recently, we rolled out a Shibboleth Single Sign On service to protect one of our services. However, we started recieving intermittant login failures, both on our automated monitoring and from customers. Curiously these failures tended to happen mostly in the evening, which isn't a peak time for us. Debugging showed that the authentication worked, but the authorisaton was failing. Shibboleth works as an apache module and daemom that protects a service, which communicates with a webservice that does the authenication processing. The log files were showing an occasional SSL error in this communcation link.
INFO shibtarget.SessionCache [43005] sessionGet: trying to get new attributes 
      for session (ID=_d0cd2f93840bb92050b28fa73d19ce4f)
INFO SAML.SAMLSOAPHTTPBinding [43005] sessionGet: sending SOAP message to 
      https://login.example.com/shibboleth/AA
ERROR SAML.SAMLSOAPHTTPBinding [43005] sessionGet: failed while contacting   
      SAML responder: error:1408F06B:SSL routines:SSL3_GET_RECORD:bad 
      decompression
ERROR shibtarget.SessionCache [43005] sessionGet: caught SAML exception 
      during SAML attribute query: SOAPHTTPBindingProvider::send() failed 
      while contacting SAML responder: error:1408F06B:SSL 
      routines:SSL3_GET_RECORD:bad decompression
ERROR shibtarget.SessionCache [43005] sessionGet: no response obtained
We didn't manage to find any suitable solutions on the internet, so we pulled out the trusty wireshark and started looking to see what was going on. We could see that the client was advertising deflate and null compression, and that the server was responding by asking for deflate compression. However the client would then claim that there was a decompression error in the servers response. This opened a few lines of enquiry. I made sure that both ends of the connection were running the same version of OpenSSL and they were both using 0.9.8a from Ubuntu Dapper. Interestingly 0.9.8a is the first version that had compression support. We found a couple of suggestions including forcing connections to be SSL2, which lacked compression or recompiling openssl without zlib support. As the former was easier, we tried that first by putting
SSLCipherSuite SSLv2:-LOW:-EXPORT:RC4+RSA
in /etc/apache2/mods-enabled/ssl.conf as suggested by Debian bug #338008, and this seemed to work for around an hour. Packet sniffing showed that it was still negotiating SSL3 including deflate compression. Clearly we had to try something else. Rather than recompile OpenSSL without zlib support, I thought I'd try upgrading the version of OpenSSL to something later in case that fixed the decompression bug. the version in Hardy is 0.9.8g, which sadly required recompiling and disabling the Ubuntu change to enable -Bsymbolic-functions during linking. Installing this on the client end didn't fix the problem, however installing it on the server end seemed to fix it. So far it's been running for 24 hours without an error, so fingers crossed that this has fixed it for good.
Read Comments (0)

Jonathan McDowell: Archos 705 media player

El Reg reviewed the Archos 705 yesterday. They only gave it 50%, which I think is a little harsh. I bought one of these back in November when they first came out, as something to help easy my daily commute by train. I have to say I don't regret the purchase; while there are various niggles that annoy me it basically does what I want. My main drive was the size of the screen. There are plenty of options available if you want in the region of 4", but I wanted something bigger that could still be shoved in a bag without any hassle. The 705's 7" screen is great. I can sit it on the tray table on the train and it gives a clear viewable image that doesn't leave me squinting trying to see it. The second concern was the battery life. At 7" you start to get into the UMPC area. However there didn't seem to be anything around that both offered enough battery life and had the grunt to decode DivX. I need a guaranteed 2hrs (ideally a bit longer) so I can watch something without being interrupted. I've certainly had over 3hrs on the Archos and various reviews claim it'll do 5hr for video without problems. Archos call the 705 a DVR. I've no idea why; I certainly wouldn't consider it one. I have the DVR station, but I've only used it to connect the Archos up to a hotel room TV and never for actually recording anything. There's no tuner (neither analog nor digital), so you need a Freeview/cable/satellite or similar box to provide a signal. Plus it seems pointless to convert a digital TV signal to analog and then for the Archos to have to re-encode it. Much more sane to record TV on your PVR and pull the file off that and onto the 705. Except there you hit a bit of a problem. By default the Archos supports DivX and WMV. To get MPEG2 or H.264 support, or indeed AC3 audio, you need to pay extra for a license that will enable the appropriate codec. This is annoying and I've ended up just using mencoder to convert Freeview records to an Archos friendly format rather than shelling out more for the codecs. Archos do seem to have dropped the ball here. The MPEG2 license fee seems to be $2.50 per device. The TI licensing seems to be about $2 for MPEG2 + AC3. Archos sell the plugin for €19.99. I doubt AC3 licensing is over $15, which rules out Archos merely keeping the cost down for customers by allowing them to pick and chose which codecs they want to avoid paying license fees. The 705 also comes with a web browser. Which, of course, you have to pay for. I ended up getting this thrown in with my 705 + DVR station bundle. It's powered by Opera and reasonable enough. The only time I've really made use of it is while staying in a hotel; it was quite nifty to have the 705 hooked up to the TV and be able to lie on the bed with the keyboard remote control and lookup film times or interesting places to go. Internet access is provided by wifi; if it had bluetooth as well then I might make use of it on the train, but as it is it's not really something I use much. As I said at the start I'm still happy with my purchase. It's not a cheap item, but it has the screen size and battery life I wanted and there wasn't a lot else out that offered both. Having to pay for codecs is a bad move on Archos' part, but I've avoided doing so by re-encoding. If you want something that's a decent media player of this size then the 705 is definitely worth considering; if you're not sure about the size aspect you may be better off with a 605 (the 4.3" screen version) or even something from Cowon (who unfortunately don't seem to have anything in the 7" range). Finally, if you already own a generation 5 Archos device, you might be interested to know that shell access has been obtained. The device is pretty locked down (signed kernel modules, no /dev/mem, signed root cramfs filesystem), but there's an arcwelder exploit to get an ssh login over wifi and an Archos Hacking forum on Archosfans.

28 March 2008

Vincent Fourmond: Thoughts about statsvn

Some time ago, I packaged statsvn, a pretty neat SVN repository analysis tool based on statcvs. To be truthful, I was quite amazed that no one had packaged it before, as I find it quite handy. It is currently in contrib, as it depends on statcvs that depends on libjfreechart-java that currently only works with Sun's java on AMD64 machines (at least, see the bug report). A few comments about it: though it can work fine with remote repositories, it is highly recommended that you either take down the number of -threads, as many repositories out there do not like too many concurrent ssh accesses, or you rsync the whole repository to your local hard drive and work from a checkout of the local copy, as it will burn much less bandwidth and server time. Of course, statistics of this kind are not to be taken too seriously, as they can be seriously biased by commit mistakes for instance, but they give the impression that work is being done, and that is pleasant ;-)...

John Goerzen: A Realistic View of the Economy

Yesterday, I read an article on CNN called From $70K to food bank.

It describes a woman who was laid off in February from a job paying $70,000 a year. "Weeks later", with bills "piling up and in need of food for her family", she went to a food bank.

The article proceeds to talk about the subprime lending situation at great length, which is largely irrelevant to this person's situation.

Then we learn she applied for food stamps, but was denied. There's a quote from this person about how frustrating that was, and general "tugging at the heartstrings" trying to make us feel sorry for this woman with two children whose mother moved in to help make the house payment. It seems to me that this is a correct decision; someone that can pay a $2500 mortgage each month ought to move into an apartment before trying to leech food or money from social service agencies.

And that's where this story gets interesting.

She has an interest-only mortgage, and is managing to pay the $2500 bill each month.

If you're not familiar with an interest-only mortgage, here's how it works. The bank loans you money to buy your house -- say, $200,000. This is a loan, and you have to pay interest on it each month, just like a regular mortgage. But with an interest-only mortgage, you never pay off the loan. You could be making monthly payments for 30 years and still owe $200,000. In general, the only ways to "pay off" this kind of loan is to sell your house, or get a conventional mortgage that pays off the interest-only loan.

Interest-only mortgages were largely banned after the Great Depression. Prior to that time, they were how mortgages normally worked. But there are several problems with them. One is that you have to pay on them forever, even after you retire. Another is that you can't move unless you can sell your house for at least as much as the bank financed, even if you've lived there for 20 years. In times of declining housing prices and unemployment, that really stinks. People often default on the loans, and from a bank's perspective, that really stinks, too.

Interest-only mortgages are usually used by banks financing construction (we had one for a few months when we renovated our farmhouse) or other short-term projects such as professional real-estate investors that buy old houses and fix them up to sell at a profit. Except for these things, in general, they should never be used for a primary house. It's not in the interest of the bank or the homeowner.

But since you never pay off the principal, the monthly payments can be lower. It seems likely that this woman took a knowing gamble, buying a home more expensive than she could afford, and somehow found a bank willing to finance this. Problem is, both she and the bank took a knowing risk. If she ever ran into financial difficulties, she'd have to sell the house quick. But now the house is probably worth less than the value of the mortgage, so selling it won't remove the loan -- BUT it would let her pay off a large part of the principal, reducing her monthly payments and giving her some wiggle-room to buy food and pay off the rest of it.

It seems to me that she is unwilling to own up to the calculated risk she took, and wants society to help bail her out. Don't get me wrong; I think we need to help people that run into hard times. We need to help make sure they still have the tools they need to find a job and a place to stay. But bailing out people that take huge financial risks shouldn't be the job of society. Let's help them land softly, but not be enablers keeping them in a home they never could -- and still can't -- afford. Fortunately, I don't think anyone in government (or running for president) is suggesting we should.

Not only that, but her bank shouldn't have ever made that loan. Banks should be held accountable to not sell unwise products to people that rely on them for their primary residences.

Here's another interesting point: in just a few weeks, she had burned through her entire savings.

This, unfortunately, is a quite typical situation for many Americans. My financial planner, and I think most experts, suggest that everyone ought to have 6 months of income in liquid non-retirement assets (savings accounts, investments, etc.) in case something like a layoff happens. Very few Americans have this.

And when it comes down to it, isn't that part of the problem? The economy thrives on consumer spending. Or, put more starkly, overconsumption. If people start saving like they ought to, and stop feeling like they're outcasts just for not keeping up with the Joneses and buying every last gadget or the biggest house, we'd all be in better shape -- but the economy wouldn't have grown as much.

The growth it would have seen, had we all been more responsible, would have been a lot more durable and recession-proof, I think.

Erinn Clark: inarticulate

I always thought it would be interesting to write an essay on why exactly this article is relevant to Debian, but since I never got around to it, I should just share the link: Fetishizing Process.

Jos Parrella: No comments

Today we had the opportunity to be part of a very important event: Venezuela’s final meeting on DIS 29500 fast-tracking. Even though we’re working on this matter since 2007, and we weren’t approved official participation as a community, we managed to be there today. There was a strong discussion; and we had our chance to participate. I believe we were welcomed by the NB and hopefully we, as a community, can be part of future discussions in a very constructive way. Thanks again to all the committee members and our NB who made it possible for us to participate today.
From: "FONDONORMA" <...@fondonorma.org.ve>
To: <brannon@...>, <takahashi@...>, <gaillen@...>, <...@fondonorma.org.ve>
Subject: Modification to the vote on DIS 29500 - Venezuela (FONDONORMA)
Date: Fri, 28 Mar 2008 14:04:26 -0430
(snip) Venezuela wishes to modify its position on DIS 29500 (snip)
(snip) from Approval with comments to Disapproval with comments.

27 March 2008

Andrew Pollock: [tech] LugRadio Live USA 2008

LugRadio Live USA 2008 I've never been much of a podcast listener, largely because I haven't gotten my act together and downloaded any on a regular basis, and partly because the iPod is tied to Sarah's iTunes on her laptop, so it's not convenient to go fiddling with the iPod. If I ever manage to get back into the swing of things and get to the gym regularly, I think I'd prefer to listen to a podcast rather than straight music, so I can hopefully expand my brain while I'm slogging my guts out on the treadmill. Kynan and Shona have both talked about LugRadio events from when they lived in the UK, and I've been vaguely aware of it as a podcast (it's probably the first podcast I'd name if you asked me to name one). I vaguely knew that Kynan had been trying to organise something LugRadio related in the Valley for a while now. Well, it turns out he's succeeded, and it's good to see he's gotten some credit for it as well. Onya Kynan! So I got all excited when I went and looked at the schedule and discovered it was going to be something vaguely like a mini-linux.conf.au, I scurried off and bought a couple of tickets. Then Sarah pointed out that it's the weekend that we're going to San Diego for a four-day weekend. Oh well, at least the tickets were pretty cheap. So, if, unlike me, you'll actually be in the Bay Area on April 12th and 13th, check it out, it sounds like it'll be fun.

Jordi Mallach: Interview in El Pa s

Today's edition of El Pa s, the most read Spanish newspaper, celebrates the 10th anniversary of it's weekly technology section Ciberpa s with a special edition which takes a look back at the last 10 years of computing, and also looks forward to what the future will bring us. Merc Molist interviewed Carlos Atar s, my mate at Softcatal Jordi Mas and myself, on what happened during the last 10 years of Free Software and where we are heading. The paper edition features a *gasp* half page picture of me laying on the grass, but is otherwise identical to the online version. I need to add, this feels a bit strange. :) It's the first time I see myself refered to as just Mallach , but I realise I'm getting old...

26 March 2008

Joey Hess: my anti-platform: followup

A year ago I posted an anti-platform with some things I wanted to work on over the next year or three. This is a followup to see what, if anything, has been accomplished. constantly usable testing CUT generated some discussion in the project, but I've done nothing toward it myself. The only real progress in this area over the last year has been increasing improvements in the testing security team, and the release team, both of which I'm not currently active in. deprecating www.debian.org This continues to happen organically, for example, Debian Weekly News stopped and http://wiki.debian.org/DeveloperNews took its place. Aside from pointing out that this is happening, I haven't done much to push it. double the archive sync frequency again Sadly, this has not happened yet. automated whole system testing HP donated a test machine, which I set up to run emulated tests of installations of i386, amd64, s390, mips, and mipsel. (Arm and armel should be added soon.) I don't always manage to keep all the tests working at all times by myself, but they have been valuable. developer (virtual) machines My test machine spits out disk images for 5 architectures that have debian pre-installed on them, but due to hosting issues I have not been able to share those images with others yet. find the next nslu2 I was pretty sure this would be OpenMoko's Neo phone, but I have only briefly had access to one, and it's not clear it will be easy enough to get the hardware to make it worthwhile to target it. Meanwhile, tbm has found a more nslu2-like next nslu2, the QNAP Turbostation NAS device, and there's work underway to fully support it from d-i onwards. Others have also worked on running Debian on various related AP hardware, including the ASUS WL-500g and Linksys WRTSL54GS, using OpenWRT to boot Debian. There's instructions and downloads on a wiki page. It would be good to get this fully supported without the hacks.

Nico Golde: streaming from your fileserver using mpd and icecast

My mobile music player is often missing the files I want to hear right now if I'm under way because my music collection is too big to fit on it.
Long time ago I used gnump3d which seems to be unmaintained in Debian for quite some time and then I often listened to some live streams, network connections are available nearly everywhere.
But I always wanted my own live stream with music I want to hear. There are several solutions out there for this task but they all require the creation of a playlist before the streaming starts.

Fortunately mpd provides the possibility to define different output targets and also one for streaming to a shoutcast or compatible server like icecast.

So after apt-get install mpd icecast2 (on a Debian box) you have to edit /etc/mpd.conf
There is not much to do, be sure to set music_directory to the place your music is located and the configure the output part.
Add the following to your mpd.conf and adapt some values:
  1. audio_output {
  2.         type "shout"
  3.         name "foobar stream"
  4.         port "8000"
  5.         host "localhost"
  6.         format  "44100:16:2"
  7.         mount "/stream.ogg"
  8.         password "somepass"
  9.         quality "2"
  10.         user "source"
  11. }

The type defines that this output will be streamed to a shoutcast target. The name will be displayed by the client you use to play your stream. 8000 is the port icecast2 will listen on host "localhost" (in this example the icecast2 server is on the same host). format specifies the audio format of the stream, the first number is the sample rate in Hz, the second number is the number of bits per sample and the last number defines the number of channels (2 is stereo here). Those values should work for most of you. mount specifies the path under which the stream is available later from the server root, in this example http://localhost:8000/stream.ogg.
quality defines the ogg encoding "quality". You can also specify the bitrate instead of it. The user and password values are used to authenticate mpd at the source input for icecast2.

There seems to be a bug in the 0.13 release (which is also in Debian) of mpd that prevents this from working. I don't know the details about this bug but adding
  1. audio_output {
  2.         type "alsa"
  3.         name "fake out"
  4.         driver "null"
  5. }
fixes it.

Make sure to set START_MPD=true in /etc/default/mpd to enable mpd.
That's all that needs to be done for mpd.

The next step is to edit /etc/icecast2/icecast.xml.
The default configuration nearly ready to use. Configure the authentication part:
  1. <authentication>
  2.       <source-password>somepass</source-password>
  3.       <admin-user>admin</admin-user>
  4.       <admin-password>someadminpass</admin-password>
  5. </authentication>

The source password is the one we specified in the mpd configuration. This is needed to authenticate mpd with icecast. source is the default user name icecast uses here. Additionally we define an admin-user that can be used to add users to icecast later because we want to protect the stream by a username and a password.
Then set
  1. <hostname>you.somehost.org</hostname>
.
This hostname is used to generate URLs in icecast that a user receives.

Because we want a very simple authentication for the stream we need to add some options for the mount (/stream.ogg):
  1. <mount>
  2.     <mount-name>/stream.ogg</mount-name>
  3.  
  4.     <max-listeners>1</max-listeners>
  5.     <authentication type="htpasswd">
  6.             <option name="filename" value="/etc/icecast2/htpasswd"/>
  7.             <option name="allow_duplicate_users" value="0"/>
  8.     </authentication>
  9.     <on-connect>/home/icecast/bin/stream-start</on-connect>
  10.     <on-disconnect>/home/icecast/bin/stream-stop</on-disconnect>
  11. </mount>

I think the xml tags are pretty much self-explanatory. Keep in mind to set the filename to a location the icecast daemon has access to, that's why I used /etc/icecast2. Then you can add users with htpasswd or using the web interface on port 8000 and add a user there.

The last thing to do is to adjust the <alias source="/" dest="/status.xsl"/> setting. Change status.xsl to auth.xsl people need to authenticate if they connect to the web interface before seeing the stream information.

Now you can login via ssh on your home server and use your favorite mpd client to configure playlists on the fly, I use ncmpc for this. Of course the authentication is not secure, people who sniff your traffic can see your login data.
One thing to keep in mind is to restart mpd after restarting icecast otherwise mpd will hang and not continue to stream, this seems to be a bug.

After routing through your NAT, you should be able to play your stream via http://you.somehost.org:8000/stream.ogg.

25 March 2008

Tollef Fog Heen: pkg-config, sonames and Requires.private

This post is both an attempt at replying to a bug against telepathy-glib, but also an attempt at explaining what Requires.private do (and don't). I am using Evolution as my example here, not to pick on Evolution or its authors in any way, but because it's a convenient example. Currently, on Ubuntu Hardy, evolution links against 75 different libraries. Amongst those, we find libz.so.1, libXinerama.so.1 and many more. I'll go out on a limb here and claim that Evolution does not call any of the functions in libXinerama directly. Let that be the assumption from here on. An obvious question then is, why does evolution link against libXinerama.so.1 if it doesn't use it? To answer that question, we need to go back in time to before we had dynamic linking. If you wanted to build a binary like evolution you had to have 75 -l statements when you linked and you ended up with the whole code for Xinerama embedded in your email and calendar client. For various reasons, we stopped doing that and switched to dynamic linking where the evolution binary just contains a reference to libXinerama. At some point we also grew the ability for libraries to contain those references to other libraries, so you don't have to hunt down all the dependencies of libfoo when you are linking with it. We also got tools such as libtool which try to abstract away a lot of the problems of building on older platforms which don't support inter-library dependencies. Now, since evolution still doesn't use anything directly in libXinerama.so.1 but just uses a library which in turn links against libXinerama.so.1, it shouldn't be linking against it. Then why is it linked with it? Again, we need to look back at history, and for this part I am at least partially responsible. pkg-config was originally written as a replacement for gnome-config and various other -config utilities. Lots of libraries and applications now ship .pc files and we have a standardised interface for querying those files. One of the problems the original authors of pkg-config faced was the problem of dependencies. They added dependencies so the authors of gst-python-0.10 could say "We need pygtk-2.0 too" and so the compilation flags needed for gst-python-0.10 would also include those for pygtk-2.0. Note that I'm using "compilation flags" loosely here, I am not just talking about CFLAGS. This did not fix the problem of inflated dependencies. Not at all. I talked with some of the Debian Release Managers back in 2004/2005 and we worked out a solution which should help us have correct, uninflated dependencies since the then-current way of handling dependencies caused big problems for migrations of packages between unstable and testing. The plan was to introduce a new field, Requires.private which would not show up unless you passed --static to the pkg-config invocation (since you need all libraries if you are linking statically). This definition of Requires.private was mostly useless since GNOME and GTK+ have a habit of including each other's headers. To make a long story short, I changed the semantics so the Cflags field from private dependencies were included even when not linking statically. A problem which pkg-config does nothing to guard against in this case is if you have libfoo.so.2 linking against libbar.so.1 and libfoo.so.2 exports some of libbar's types in its ABI (and not just as pointers, but actual structs and such). If libbar's soname is then bumped to libbar.so.2 and libfoo is rebuilt, libfoo's ABI has changed without a soname bump. This is bad and will cause problems. If your application is linked against both libfoo.so.2 and libbar.so.1, you'll still get problems since libfoo.so.2 then suddenly pulls in symbols from libbar.so.2. If you used symbol versioning, you would at least not get symbol conflicts and your application would continue to work, but you would have a spurious dependency and the package containing libbar.so.1 would be kept around until your application was recompiled. With this background, you might ask the question why we still have Requires since it is seemingly useless. For C, it is useless in all but the most special cases, just use Requires.private instead (and its sibling Libs.private). Other languages have different semantics. Some people use .pc files for other purposes such as gnome-screensaver having variables defining where themes and screensavers go. Hopefully this blog post has explained a bit about why we have Requires.private and what the difference between this and their regular counterpart is. If there's anything unclear, please do not hesitate to contact me.

24 March 2008

Joerg Jaspert: SSH known_hosts for cluster environments

Something I always forget where it’s written in (sshd(8)), but which is pretty useful when you have a cluster setup where heartbeat manages failover and stuff. And you want to use ssh to connect to the cluster. Whenever heartbeat switches the cluster-ip to the second machine and you try to ssh to it, ssh will reply with a nice WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! - which isn’t helpful. But SSH knows how to deal with it, the user just needs to tell it about that. Imagine you have the two machines foo1 AKA 192.168.1.1 and foo2 AKA 192.168.1.2 and the clustername foo AKA 192.168.1.10. Adding the following to your .ssh/known_hosts will keep your ssh happy if you ssh foo, no matter on which machine the cluster-ip is:
foo1,foo,192.168.1.1,192.168.1.10 ssh-rsa AAAAB3Nsomething[...]
foo2,foo,192.168.1.2,192.168.1.10 ssh-rsa AAAAB3Nsomethingelse[...]

23 March 2008

Steve Kemp: Make anyone cry today?

I've spent a lot of hours over the weekend stripping out markup on my personal website, so that I can regenerate it from a templating system. My template-compiler is horribly hacky, but it produces reasonably good results from simple input files. The only motivation for this was to finally transition my site to a consistant layout, and allow me to easily change the layout again in the future. I looked over WML, htmlpp, and a few other static web-compilers before writing my own tiny processor. I guess most of them are more powerful than mine, but similarly more complex to get started with. I'll share the code if there is any interest. (Primarily it is template expansion of a body, optional per-page menus, and per-page HTML header inclusion.) The only significant thing that has changed in my website is a tiny RSS feed of updates (also compiled!) and the removal of many sections from the top-level menu. (For example my body piercing section has been obsolete for years. It is still present, but I see no point in advertising it. Better resources exist.. The plus side is that I've managed to do all this whilst watching "Dead Like Me" over the Easter weekend. Both series from start to finish. Good show.. Obquote: 10 Things I Hate About You

Julien Blache: TomTom: Internet standards do not apply

In June last year, I bought a TomTom GPS device. Their use of Linux on the device was a clear plus in their favour, but it was only that, given that overall they’re the best devices available. Unfortunately, the TomTom HOME software that is needed to manage the device is not as good as the device itself. An account on their website is needed for updates and the online shop, and as I usually do, I used an email address in the form jb+something@jblache.org. That’s a trick most of us use to trace back the origin of spam, usually revealing that some company sold its customer database. I’ve been doing that for years. I was quite happy that the website did not reject the address as being invalid; that’s something that happens everytime the random web developer maintaining the site decides to start “validating” email addresses, for some value of email addresses. For the following 8 months I’ve been using this address as the account login (don’t really have the choice, anyway) with the TomTom HOME software. Last month, the v2 of the said software was finally made available for Mac OS X. Where the v1 used to accept my email address, the v2 would now reject it. You guessed it, Joe Random developer decided to start validating email addresses in TomTom HOME. I reported the regression (and here, something must be said about their infamous support website), with pointers to the relevant RFCs. In the following email ping-pong, they managed to: Last but not least, their last reply was: “we found that the standard does not apply to us. Please change your email address for a valid one.” Now, I’m left wondering: does the GPS standard apply to TomTom devices? I truly hope so.

MJ Ray: Annoying Judge Resurrects Software Patents in the UK

Programs themselves cannot be patented. They're explanations of mathematical relationships, not inventions. Paul Russell mentioned this ruling to me and Alex Hudson mentioned it to fsfe-uk. There's been some BBC coverage and very silly coverage in Computing which summarises it as as
"Symbian's win could benefit UK software makers"
You what? Shouldn't we be enabling other UK companies to compete in a free market with Symbian, which is a consortium of foreign companies after all, instead of granting Symbian a monopoly here? *fume*

Christian Perrier: [sports] F1...and anthems

Nobse, why insist on watching such a boring spectacle? :-) The only good moment in a F1 Grand Prix happens when a Ferrari car wins and we can listen to "Fratelli d'Italia", the italian national anthem and, by far, my favourite national anthem. At least the music is among my favourites...the words, as often in national anthems, carry a nationalist philosophy which I don't really share. This includes our French "Marseillaise" and its "Make impure blood soak our fields' furrows". We should use a "lalala" version, just like they're doing in Spain for the "Marcha Real". The French version of Wikipedia gives interesting explanations about the controversy for La Marseillaise words. Strangely, the English version does not.

22 March 2008

Matthew Garrett

Because you all love me and deeply want to know what on Earth I'm doing with my life/want to hire me, I'll put you out of your misery and let you know that I've just accepted an offer from Red Hat to save the universe work on kernel and userspace power management. With luck, it'll go some way to making up for the ridiculous amount of flying I'm still due to do this year.

Sune Vuorela: Moving web and mail and stuff

Over the last days I have moved my email and web and stuff from a simple web and email hotel to a virtual server managed by me. So now I got a nice setup with But most important for me: I can write my own spam filtering rules serverside and I can easily make sure all passwords are sent encrypted. What’s left on my todo, partly because I haven’t figured out how yet is And I also still haven’t moved all my domains, but it is coming soon.

Neil Williams: GVfs and http://

Update
After contacting Sebastian Dr ge, I've found that the problem with GVfs isn't in the deb-gview code, it is a permission problem within GVfs - the current deb-gview CVS code works with remote URIs when run under sudo which isn't ideal but at least indicates the nature of the problem. Once I have confirmation and/or gvfs is fixed, I'll skip deb-gview 0.1.6 and upload 0.2.0.

** (deb-gview:31002): WARNING **: file-read:http://ftp.debian.org/debian/pool/main/g/gpe-tetris/gpe-tetris_0.6.4-1_i386.deb:The specified location is not supported

Hmm. This is with current CVS of deb-gview, already substantially modified to work with GIO and GVfs as libgnomevfs is deprecated. I wanted to look at the port because quicklist and gpe-filemanager will need similar ports.

$ dpkg -l 'gvfs*'
ii gvfs 0.2.1-1 userspace virtual filesystem - server
ii gvfs-backends 0.2.1-1 userspace virtual filesystem - backends

I have an RC bug in deb-gview that I need to fix and I wanted to do the two jobs in one but it's looking now as if I'll need two uploads, 0.1.6 with a trivial fix to unstable just to fix the existing bug and 0.2.0 to experimental with a lot more changes but partially broken functionality. It's a shame because I've got everything else working using GIO - it is only the GVfs part that is giving errors.

Anyone else using GIO and GVfs with http:// in Sid?

Next.

Previous.