Search Results: "xam"

17 May 2006

Wouter Verhelst: Linux: a means of circumventing valuable copyrights and patents.

At least according to this clueless republican:
Like all the greatest American engineering, it's an example of innovation that makes a growing group of European and Chinese hackers jealous. They hate our lead in computing technology and will stop at nothing until they have control of all our computers.
Hah. Let me tell you, Shelley, I am not jealous of anything. The only thing I feel about people using Windows is pity; you are giving away your freedom in return for some Pride.
If you see a company using Linux, it may be that they have not paid for this software. Report them to the Business Software Alliance who have the legal authority to inspect any company's computers for illegal programs like Linux.
Rotfl. First, the BSA has the legal authority to do absolutely zilch. Second, using Linux is anything but illegal. Get a life. No, really. Update: While I was sleeping, I received no less than 24 comments that the site is not real. I get the picture. Get off my back. :-)

16 May 2006

Wouter Verhelst: Linux: a means of circumventing valuable copyrights and patents.

At least according to this clueless republican:
Like all the greatest American engineering, it's an example of innovation that makes a growing group of European and Chinese hackers jealous. They hate our lead in computing technology and will stop at nothing until they have control of all our computers.
Hah. Let me tell you, Shelley, I am not jealous of anything. The only thing I feel about people using Windows is pity; you are giving away your freedom in return for some Pride.
If you see a company using Linux, it may be that they have not paid for this software. Report them to the Business Software Alliance who have the legal authority to inspect any company's computers for illegal programs like Linux.
Rotfl. First, the BSA has the legal authority to do absolutely zilch. Second, using Linux is anything but illegal. Get a life. No, really.

Ted Walther: Report from Debconf, Day Two

Photography. My roommate Aigars is quite a photographer, he came with his digital SLR and several lenses, an item I've lusted after for some time. Large apertures and manual controls are what every real photographer demands, and digital SLR's deliver. I told him my idea for a small sky recording station so that people could make movies of the paths that the stars take, and how it changes over the year. Ultimately I want a network of these stations, all uploading their pictures so I can examine them for anamolies. This is a hard problem, because stars are so faint. Aigars said to take a picture of the whole sky, a 1000 millimeter lense and a $50 computer scanner with some modifications should be able to do the job.

Me and Andreas Schuldei
Programming. Finally made progress in programming, now that I know where everything is in Oaxtepec. My IRC bot didn't handle things gracefully when the server refused to let it log in, but that is fixed now. Tomorrow I hope to add multi-channel support. Reading through the new IRC RFC, I have the information I need to make a proper configuration file for the software. The design is sketched out and feels right, finally. Weekend vs. Weekday. Oaxtepec is much quieter today. Saturday and Sunday there were far more vendors on the street, and they stayed open much later. Today everything closed down around 6pm when the church bell tolled the summons to mass. I couldn't find the coconut man; maybe he only comes on weekends. Half the stalls at the mercado were empty. During the weekend, the resort was full of vacationers swimming, barbecuing, picnicing, playing soccer, or just sunbathing while the kids ran around. Everyone, young and old, but mostly young adult men and women, were running around in bathing trunks and bikinis. The happy noises were great to wake up to. This morning the sounds were quieter, but still present. The swimming pools here get a lot of use. During the weekend, there was a large tent where some ladies were giving body massages for $10. I didn't see them today. Probably they will be here again next weekend. Food. Tried a dish called "pancita" today. I saw people eating noodles and assumed pancita was a noodle dish, like the Filipino pancit. But no. It is a type of tomato soup filled with chopped up beef rind and chunks of fat. For only P31, I bought a small chicken. It was perfectly marinated and roasted, better than Kentucky Fried Chicken. I paid the money, and the shopkeeper brought out a pair of scissors and cut the chicken into all the appropriate pieces for easy eating, just like they do in Korea (viz the use of scissors) Church. Attended mass tonight, since the church was so close. The church is magnificent. It really is a cathedral inside; to see the ceiling you have to crane your neck. And when you do, you see paintings of angels playing instruments. I went into the nave to pray, and saw a giant depiction of the ark of the covenant. It was very realistic, with the cherubim covering it with their wings. And above it, was a painting of the wine and bread offering, which were offered on the altar daily. The priest was a black man from Illinois; after a bit of attempting to speak to each other in Spanish, we realized we both spoke English, and got on famously from then on. The cathedral opens at 10am, closes for lunch from 2pm-4pm, and then is open until mass is finished. This must be what the church was like in the beginning; a place where believers could drop in any time to be with others of their kind, to meet, eat, drink, discuss, and elevate each other to a higher plane. I am sad that we don't have this in Canada. Debian. There were some Debian talks and presentations, but nothing too interesting. Finally met Mark Shuttleworth, Anthony Towns, Manoj Srivastava, and Roblimo Miller. Clifford Beshers of Linspire almost convinced me to look into the Haskell computer language. I couldn't quite tell what Haskell has that LISP doesn't, apart from forcing strong types on you and being very fast and efficient in benchmarks tests. Marga didn't give me meal tickets before, so Graham printed some up for me today. By pure serendipity, I sat at dinner with the only other Canadian developers at the conference; Simon Law and Eric Dorland from Montreal. The drinking started at 11pm and is still going strong; the atmosphere is very convivial right now, but half of us are still tapping away at our keyboards.

Aigars Mahinovs: Debconf6 day 2: Java is non-free, at last!

The first session in the morning that I attended was the BOF about Python. After an introduction to the current state by the Python maintainer (Matthias Klose) and a few other people we run overtime and the BOF was extended into another time slot. Also the session was plagued by the room switch hanging which affected both the network and the recording. It really looks that that strange situation with a bunch of python-foo, python2.3-foo and python2.4-foo packages will be fixed. Later in the day guys from Intel gave a talk about some kind of data mining stuff they were doing with hardware database from Ubuntu. The tool was called Toppler (from Dilbert) and basically was a hardware database. They pondered about possibilities of getting some useful information from the huge pool of data, but the examples that they showed were just lame. For example they showed how you can get a list of 1234 reports relating to this wireless card, but that is not what I want to know - I want to know if it works and if it does not work, what can I do to fix it. The showed an example of an OEM entering his computers hardware configuration to see what distro works on that hardware - that is completely useless: as an OEM I at that point would already have chosen a distro and what I really would like to know is what will and what will not work from my hardware configuration in that distro, why it will not work and how to fix that. That would be approaching useful status - so far they only have a SQL DB with a simplistic web fronted. At the same time to give out that kind of information you would need much more datapoints to make a correlation - datapoints most of which can not be tested automatically and require user interaction on submitting. On the other hand the more user interaction they need, the less users will want to submit that data. They already have at least 10 times too many questions (there were 30 + options) if they really want this to be something that users will want to contribute to. Also there is no real direct motivation for users to contribute to that database - maybe OEM's have that kind of motivation, but they must decide to use Linux first. In short I only saw mountains of social and technical problems with this project and really little in terms of benefit. That's what you get when you have too much money to burn. After that there was a "yearly" Ubuntu report from Mark Shuttleworth. Most of what Mark said was already widely known if you followed Ubuntu's development a bit. Dapper will release on 1st of June and will be supported for 3 years on the desktop and 5 years on the servers. Edgy Eft will be a developer driven highly experimental release that will be done in 4 months and its planning will be done in Ubuntu conference in Paris (18th-23rd June). In Dapper KDE is given equal weight to Gnome and in Edgy the same will be done to XFCE. There is a graphical installer - Ubiquity and a graphical upgrader that works around strange things that APT has not been designed to handle. Mark can only guess what will be in Edgy as developers will decide this one, but most probably Xen and XGL will be integrated, startup will be reworked by adding paralel init scripts with dependencies and maybe even APT will be replaced by some kind of SMART tool. I have not heard anything about it before and Mark also gave no further detail. but in any case Edgy promises to be "the Ubuntu equivalent of a release of Debian experimental". Way to go not to stick into the enterprise stability. I am really looking forward to that. Another announcement came from Sun - thanks to hard work of many people the license of Sun Java was changed to allow it to be included in Debian non-free repository. FHS and Debian Policy compilant packages have been produced and are uploaded to Debian sid non-free. Congrats to all involved! Now we only to move it to main somehow. Unfortunately I missed two BOF that I wanted to see due to scheduling changes that I did not follow at the time: i18n BOF and Debian representation BOF. I have been doing quite a bit of both during last years, so I wanted to be there, but missed it. Doh. In the afternoon I was twice recruited by the organizers to do the group photo. Last year there was a huge collection of dSLR's around Debconf5, but this year either the dSLR owners did not come or did not want to lug their cameras across half the globe, so I with my Canon 350D and a few (cheap) lenses have become the de-fact photographer of the Debconf6. It was only natural that the group photo also had to be taken by the best camera around. I, naturally, am very honored by the opportunity even if that would mean that I myself am not on the group photo. I could just gimp myself into the corner of it after the fact :) In any case the place to take the picture had to be found. The amphitheater where the Debconf5 group photo was taken was a perfect place, but lacking that a trick all the way back from Debconf3 could be employed - standing at a high place and take the picture at a sharp angle down. The best place for this that I found around here is the 10m diving tower - there is a platform aprx. 8 meters from the ground where one can clearly see to the back area of the tower where a large grass area is located. I still need to confirm whether I can take the group photo from there with my best lens (Canon 50mm f/1.8 II) and what amount of light will we have on time point when we have the ability to actually take the picture (18:00). There will still be a bit of a chance with the weather, so an alternate group photo time should also be planned. There will be an announcement mail that will probably go public before this email will. Oh and later in the evening I found a guy (sorry, names escape me is seconds) who has a Canon 17-40mm f/4 L lens which I will borrow from him for the group photo. That will make the photo a lot sharper and make us much more flexible to the group size which is very helpful. Just before the dinner I want to see the saunas that i was told long ago. Basically it was a headed room 3x1 meter with a temperature control outside that was set to 0. Nobody uses the sauna here and that is no wonder - the whole place is like a large sauna. In the same club (just above the restaurant where we have all the meals now) there was a ping-pong table, two pool tables and a gym. In the gym I found a Mexican Gentoo spy who's mom was born in Riga, Latvia. The world is truly small. After the dinner I sent out the group photo announcement email and then took a look at the Joey Hess's BOF about debian-installer. I snook into the talk to take a few photos and watched the rest via the webcast. Unfortunately all the people spoke very quietly there, so it was hard to distinguish their voices from the background noise. Please, do not do that! Speak up, people! The tango practice took place between hacklabs tonight. Looked fun, but I would rather take a lot of pictures of it :) On a final note I witnessed a Mao game in Spanish. That was only a bit more disturbing then the same game in English. Even while I do not speak any Spanish. P.S. If you really like what I do with photos in this blog, it would be very nice if you would sponsor me a Pro account at Flickr. Otherwise my monthly traffic limit there (20 Mb) is nearly up with only select photos of two days of Debconf uploaded. I have now almost 2 Gb of photos stored on my laptop and the conference is only starting.

13 May 2006

Aigars Mahinovs: Debconf6 days -2 and -1: Internet or Inter-Net?

There have been not too many exiting events in the real life here in Oaxtepec, Mexico. The main reason for that is the return of the drug of choice around here - the Internet. In order not to overwhelm people that were withdrawn from the cruel drug for several days, the first day the service was a bit shaky - we only got Internet from noon until 16:00 and then some more later in the evening. In the evening there was a bit of a storm around here and after that I noticed that could not get wireless in the hotel anymore and also noticed that the AP on the roof of the hotel has moved, so I figured that it must have been blown by the wind into the wall and does not work because of that which I promptly reported to Ganneff. So we went to check that out by walking the roofs of the resorts walkways. The view is really much nicer from up there and the amount of cables that the organizers had to put up to get some connectivity around here is astonishing - more then 1.7 kilometers of CAT5 cable has been used so far and a lot of wireless hotspots were installed in waterproof containers on roofs. On the day -1 the bags were ready and started to be distributed. It was really useful, for example I found out that I should have changed my room two days ago and that I am changing it again today. One hour with Marga at the registry fixed that problem. In other news we had: stable Internet, romantic hacking, impossibly small notebooks and taped switches. A really crazy game of Mao ensued late in the evening - there were more then 20 discard piles at the same time! We also had several newcomers to the game and it was fun even if they were a bit unobservant (in the beginning). Major part of people started arriving this evening, including a person from Intel and Ted The Krooger. Fun should start tomorrow with the Debian Day.

12 May 2006

Erich Schubert: A bug in the UML 2.0 OCL spec?

I think I've found a bug in the UML 2.0 OCL spec. It's actually a well-known issue for C++, documented e.g. in the C++ FAQ. It's not so obvious in Java, since Java didn't have Templates for a long time. The UML 2.0 OCL spec says on page A-22, Definition A.27 (Type Hierarchy)
If t' ≤ t then Set(t') ≤ Set(t)
With ≤ having the meaning "conforms to" for types.
[Update: newer UML 2.0 OCL document, the latest I could find, page 38 still says the same] Any good C++ programmer should know that this doesn't work. From the C++ FAQ "Is a parking-lot-of-Car a kind-of parking-lot-of-Vehicle?":
"A Bag-of-Apple is not a kind-of Bag-of-Fruit." If a Bag-of-Apple could be passed as a Bag-of-Fruit, someone could put a Banana into the Bag, even though it is supposed to only contain Apples!
Note that the converse, Set(t) ≤ Set(t'), also doesn't hold. While you can put Apples into a Bag-of-Fruit just fine, you may still find a Banana in there. This has an obvious reason: when passing data to the object it can be "downcasted", and when retrieving data it can be "downcasted", too. But it can never be upcasted. This should occur in OCL, too. A "Set(Apple)" doesn't conform to "Set(Fruit)" by the usual interpretations that I can call "put(Banana)" on any "Set(Fruit)"! Can anyone enlight me, if this really is a bug in the OCL spec, maybe has already been corrected, or if there is some magic in OCLs definition of "conforms to" or interfaces that solves this problem? (Yes, I think there might be something in OCL that solves this problem, for example if this hierarchy is only used in condition checking, then in fact all operations are "get" operations... but I've just started reading on OCL, I don't know much about its expressiveness yet...) [Update: Onne Gorter has some good thoughts on this. He basically notes that this is not a problem if you don't have any references to the "uncasted" list. For example if the cast is a function like in a functional language that actually returns a new set. I'll have to consider this for OCL, but given that OCL and UML are somewhat designed for Java - and Java suffers from this problem, too - I'm not so sure about it.]

Uwe Hermann: OS Install Experiences - Introduction

Over the next few days or weeks I intend to install quite a bunch of free (as in beer) operating systems on one of my machines. This has several reasons and benefits: On the list I plan to install are most major (free) Unix-like operating systems, e.g. Debian, Ubuntu, Gentoo, Fedora Core, OpenSuSE, OpenBSD, FreeBSD, NetBSD, PC-BSD, OpenSolaris, and whatever else I can find out there. Basically, if I can download a CD image for free off the net, it's fine. I'll be writing one small blog article per OS, stating my experiences, gotchas, pros and cons I noticed etc. If you have any suggestions for OSes or distributions I should look at, or ideas about other aspects of the OSes I could compare, please leave a comment. [1] It has been pointed out that /usr/sbin/nologin or something similar is probably better than /bin/false, because it logs login attempts at these accounts (/bin/false doesn't).

11 May 2006

Erich Schubert: Texas backwards.

When you play this song backwards, do you get "I don't want a friend, I just need a lover"? That's how I feel every so often. I have so many close dear friends, I'd trade them in 10:1 for my true love... I'm heading towards my final exams - around one month to go - but I'm caring more about not having to wake up alone than about my finals. :-( I wish I would just be happy with the friends I have. That I go dancing with. That I chat with every day. That I can snuggle against. And then actually prepare for my finals.

10 May 2006

Wouter Verhelst: Kerberos II

So about two weeks ago I started playing with Kerberos. And I'm still not finished with it, kerberizing one service after the other. Really fun, that. Kerberizing a network protocol involves somehow sending the Kerberos ticket in-band with the rest of the conversation. This is not entirely defined by the Kerberos protocol, and indeed, different network protocols have come up with different ways of sending the Kerberos ticket to the service. So far, I've encountered SPNEGO for HTTP, GSSAPI for IMAP and SSH, and SASL for LDAP. It sounds like a complex mess, but it really isn't; in general, kerberizing a service involves three steps:
  1. Installing the Kerberos plugin (if any) for both the server and the client;
  2. Generating the service principal, and adding it to a/the keytab;
  3. Configuring the service so that it knows it can do Kerberos, and so that it knows how to act when a Kerberos request is sent
Yes, in the cases I've seen it's really that simple. Although I'm skipping step 0 here–reading the documentation. But I've done that for you already ;-) The hardest part is the initial setup. But even that isn't very hard, because the process is very well documented. For starters, install the krb5-doc package, and read the excellent /usr/share/doc/krb5-doc/README.KDC which explains just enough of the system to get you started. The rest will be explained to you through debconf and the like; and if you want more, the krb5-doc package also contains three info files which explain concepts and usage very well. There's an alternative implentation called heimdal, which I presume works similar; but I haven't tried it, so I don't have much details on that one. The process of installing krb5 is very straightforward; the only thing I'll let you know is that you should ensure that any host you're going to kerberize should have reverse name lookups configured and working correctly; otherwise, you're going to run into a bunch of serious problems. After the initial setup, you'll have a Kerberos realm, usually your domain name in upper case (GREP.BE in my case). You'll now want to set up principals for your users and principals for your hosts. Now, let me show you how to configure Kerberos for LDAP, PAM, HTTP, IMAP, and SSH:
PAM
By installing and using the libpam-krb5 package, you'll log in to kerberos and receive your TGT immediately at login time; the alternative would be having to use kinit (in the krb5-user package) afterwards. pam_krb5.so also takes care of destroying your tickets when you log out, so that you don't have to worry about that. This is very handy, but not really required; you could just use kinit all the time. Of course, using pam_krb5.so also means you have only one password for everything—and that is a very good argument to use it.
Anyway; our three steps:
  1. Installing the plugin
  2. As you've guessed, libpam-krb5 is the package you'll need. That, or the heimdal implementation.
  3. Generating and installing the service principal
  4. In the case of any service such as PAM that will give you a shell (thus, as we'll see later on, also SSH), the principal is supposed to be host/<hostname>@<REALM>. For instance, on rock.grep.be, the principal PAM will use is host/rock.grep.be@GREP.BE. We'll create it with kadmin (which can be done on any kerberized host):
    wouter@rock:~$ sudo kadmin
    Password for root/admin@GREP.BE:
    kadmin:  addprinc -randkey host/rock.grep.be@GREP.BE
    WARNING: no policy specified for host/rock.grep.be@GREP.BE; defaulting to no policy
    Principal "host/rock.grep.be@GREP.BE" created.
    kadmin:  ktadd host/rock.grep.be@GREP.BE
    Entry for principal host/rock.grep.be@GREP.BE with kvno 3, encryption type Triple DES cbc mode with HMAC/sha1 added to keytab WRFILE:/etc/krb5.keytab.
    Entry for principal host/rock.grep.be@GREP.BE with kvno 3, encryption type DES cbc mode with CRC-32 added to keytab WRFILE:/etc/krb5.keytab.
    kadmin:  q
    
    Generating the principal can really be done as any /admin user; but as the same isn't true for writing the keytab, I'm using sudo in the above example to become root.
  5. Configuring
  6. account	required	pam_krb5.so ignore_root
    auth	sufficient	pam_krb5.so ignore_root forwardable
    password optional	pam_krb5.so ignore_root
    session	optional	pam_krb5.so ignore_root
    
    After adding the above lines to the relevant files in /etc/pam.d, you should log off, then log on again, run 'klist', and marvel. If you add the lines to your passwd file as shown above, and don't remove the pam_unix.so lines, then local passwd-based authentication will still work. This can be nice if, for example, the Kerberos server is down, or you're working on a laptop that isn't always within reach of the Kerberos server. It doesn't do any harm; the worst that can happen is that at some point you happen to be on a network where there's a firewall which drops packets on the floor rather than sending you an ICMP port unreachable; in that case, you need to wait for the Kerberos login to time out, which takes half a minute or so (I haven't timed).
SSH
  1. Installation
  2. If you're running unstable, you don't need to do anything. The OpenSSH packages in unstable are all set to understand Kerberos. If, however, you're running stable, you'll want to replace your ssh package by the ssh-krb5 package, which is the regular SSH package plus some patches to enable GSSAPI (read: Kerberos) authentication.
  3. Service principal
  4. If you've done the PAM setup above, you're all set; SSH, being a service which gives you a shell, also uses the host/ service principal.
  5. Configuration
  6. Make sure both the server and the client have the GSSAPIAuthentication option enabled. After you've done so, restart the server.
IMAP
I'm using dovecot as my IMAP server, which has builtin support for GSSAPI authentication (at least in unstable; haven't checked stable in this regard).
  1. Installation
  2. As dovecot comes with everything compiled in, there is no need for installing extra packages.
  3. Service principal
  4. You'll need the imap/ principal (e.g., imap/rock.grep.be@GREP.BE). Note that the host name which is found by doing a reverse lookup on the ip of the server is what counts, not the name of the server as you're using it (so not, e.g., imap/imap.grep.be@GREP.BE)
  5. Configuration
  6. Edit your dovecot.conf, and find the line that starts with "mechanisms" in the auth default stanza. Make sure it contains at least the word gssapi. Restart dovecot. I haven't found a Free (as in speech) IMAP client that supports GSSAPI authentication. My client of choice, offlineimap, doesn't seem to support it; mutt doesn't either (unless I'm missing something); and while thunderbird in unstable is supposed to support it, I haven't been able to configure it correctly yet. Probably me. I have, however, been able to verify that it works by using a non-free software package. Obviously, this isn't good enough. In addition, I found that horde and imp don't like an IMAP server that has GSSAPI enabled if they don't, while enabling GSSAPI in horde requires a PHP extension that isn't packaged in Debian. So I've disabled it for the time being. Stay tuned.
LDAP
  1. Installation
  2. LDAP requires uses SASL for authentication, which doesn't have GSSAPI modules in the default package; for those, you need the libsasl2-modules-gssapi-heimdal package. Attentive readers will have noticed that this package contains the string heimdal in it, rather than krb5, and that this is not the same implementation that I've been using previously. Yes, true. But since there's no libsasl2-modules-gssapi-krb5, and since Kerberos is, after all, a well-defined protocol, this is not an issue—except in that you need a bit more diskspace for the additional libraries. Note that the modules have to be installed on both the client and the server.
  3. Service principal
  4. You need a service principal that starts with ldap/, obviously followed by the hostname and the realm.
  5. Configuration
  6. For those people whom you want to allow to authenticate themselves using Kerberos, make sure they have ' SASL <principal>' in their userPassword attribute set (e.g., I have userPassword: SASL wouter@GREP.BE). You can have that in addition to a regular encrypted password; the userPassword attribute is a multi-value attribute. Now if you use ldapsearch or anything similar, it will try to negotiate GSSAPI authentication as the SASL mechanism. If it doesn't do so, you can force it by adding -Y GSSAPI to the command line.
HTTP
  1. Installation
  2. You need the libapache-mod-auth-kerb or libapache2-mod-auth-kerb modules on the server. For the client, you need a browser which has SPNEGO support; Konqueror and Firefox are two examples of browsers that do.
  3. Service principal.
  4. The prefix here should be HTTP/. That's right, in upper case, contrary to previous examples where this wasn't the case. HTTP is also different in that apache usually isn't running as root. This is a good thing; however, it does mean that the kerberos authentication module is unable to read /etc/krb5.keytab. You'll have to write the service principal to a different keytab for apache; I've used the -k option to the ktadd command in kadmin to specify the keytab as /etc/apache2/keytab; I'll assume you do the same.
  5. Configuration
  6. Something like this, on the server:
    <Location /some/URL>
    	AuthType Kerberos
    	KrbMethodNegotiate on
    	Require valid-user
    	Krb5Keytab /etc/apache2/keytab
    </Location>
    
    This will enable SPNEGO authentication; and if SPNEGO authentication fails for some reason (for example, because the used browser doesn't support SPNEGO, or because the user isn't logged in to Kerberos), it will fall back to Basic Authentication. While the latter is usually a good idea, it's less of a good idea if you're not using SSL, since then your password would be sent over the wire in cleartext. Luckily, the basic authentication can be switched off, by using KrbMethodK5Passwd off. If you go to my webserver logs, you'll see that you'll get a 401 right away, while the HTTPS version of the same allows you to try to log in by using basic authentication. On the client side, if you're using Firefox, you need to go to about:config, and set the option network.negotiate-auth.trusted-uris to a string that will identify the servers that may do SPNEGO authentication in your realm. In my case, I've set it to grep.be. For konqueror, doing something similar is not required—it'll do SPNEGO authentication out of the box.
So, that's what I've got set up on my network currently. Next on the list: NFS4 kerberos auth (requires updated nfs utilities, which aren't in Debian yet because of issues with NFS2, IIRC), PostgreSQL (it does seem to support it), and finding out if or how I can create principals can't be used for one authentication scheme or the other. Phew, that was a long post. I'll stop now.

8 May 2006

Wouter Verhelst: Traffic shaping and iptables

Someone just asked something on be.comp.os.linux for which I spent quite some time on reading relevant documentation to find a working solution. It's not hard if you know it, but since it's hidden in a lot of documentation, some of which only partially relevant, I thought it'd be nice to show it here. The question was about how to do some traffic shaping based on the process which is sending out the data. This is not directly possible; however, it is possible to match packets based on the PID by using iptables' -m owner. The nice thing about this solution is that it doesn't have to be the PID you're selecting on; you can really use anything (yes, anything) in iptables to decide on traffic shaping later on. The trick is to use the -j MARK stuff from iptables. In our example:
iptables -t mangle -A PREROUTING -m owner --owner-pid <some PID> -j MARK --set-mark 1
Now our packets are marked based on what PID is sending them out. Next, we'll have to make sure those packets are given lower priority over other packets:
tc qdisc add dev $OUTIF root handle 1: htb default 10
tc class add dev $OUTIF parent 1: classid 1:1 htb rate 256kbit burst 15k
tc class add dev $OUTIF parent 1:1 classid 1:10 htb rate 100kbit burst 15k
tc class add dev $OUTIF parent 1:1 classid 1:20 htb rate 50kbit burst 15k
tc qdisc add dev $OUTIF parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev $OUTIF parent 1:20 handle 20: sfq perturb 10
tc filter add dev $OUTIF protocol ip parent 1:0 prio 1 u32 match mark 1 0xffff flowid 1:20
Et voila, you have traffic shaping based on the iptables -J MARK stuff. Nice, huh?

Jacobo Tarr&#237;o Barreiro: The DFSG, a promise to our users

Every once in a while, there is an argument in the debian-legal mailing list: a particular package was rejected because its license didn’t comply with the DFSG, and someone asks for Debian to relax its interpretation of the DFSG. This package, they say, is very important and useful, and the Social Contract states that users are our priority, and, after all, the DFSG are only guidelines and can be skipped every once in a while. I don’t subscribe to this line of thinking. The DFSG are not only a set of “features” the license of a work must have to consider that work “free”: they are a list of promises to our users about what they will be able to do with everything they receive from us. For example, when DFSG#2 says that “the license must allow modifications and derived works, and must allow them to be distributed under the same terms as the license of the original software”, this means to our users: “everything you get from Debian you’ll be authorized to modify, and then give your modified copy to anyone under the same terms as when you received your copy”. That’s why when someone says “the DFSG are just guidelines, we can bypass them just for this very useful package” it would not be proper to actually do it, as we would not be living up to our own promises. This post was not triggered by any particular event; I just wanted to write something not containing a doctored photo or a joke :-)

6 May 2006

Gergely Nagy: Narnia in Warcraftian light

Tonight, we've watched Chronicles of Narnia, girlfriend and I, and we came to a few interesting observations. Really, they're quite amazing! Someone has been playing World of Warcraft decades before it was released! Spoilers ahead, beware! For example, let us have a look at the Witch. She was surely a mage, as she could conjure food and water. However, she appeared to be buffed a lot, as she could dual wield swords as well - and she wasn't all that bad at that, either. She also had an instant-cast frost spell.. This latter lead to a little debate among us, as I was asserting she must have been a shaman, using frost shock. Would have fit quite well, if only she wouldn't have been able to conjure food... And the fact, that after Aslan killed her, she didn't self-res. I doubt there's any worthy shaman out there who doesn't have a stack of ankhs in the bags. That's just not possible, really. Not to mention she always wore cloth, while we all know, shamans wear mail. Next on the table - the stone-table, hah! - is Aslan. Unlike the witch, he really was a shaman. The best proof: he self-ressed.. Albeit it took him a while. However, he did not appear to have any durability loss - on the contrary, he had his mane grown back! What kind of armor he wore, I do not know, he was in ghost lion form all through the movie, sadly. We also saw him resurrect others, that part fits too. Totems - we missed those, yes... But... if a shaman is fighting in ghost lion form, he must be so powerful, decked out in epics, he does not need them anyway. And this is where we come to the part of investigation where we have a look at the levels of the characters. Aslan and the Witch were skull-level bosses for sure. Most of the armies must have been lowbies, judging by their puny equipment - and most of the time, their puny skills aswell. Thus, it is no wonder that a single boss - the Witch - could tear through almost a whole army of poor newbies. It took another boss to stop her for good. Kinda like summoning your side's bosses in Alterac Valley. With the exception that in Alterac Valley, a raid is enough - here, one needed a whole lot more than a single 40-man raid. So far, this is what we figured out. I expect more details will see the light as we watch the film over and over again, in the hope of discovering more connections between the Chronicles and Warcraft.

Martin F. Krafft: "Ubuntu Certified Professional"

I realise this newsbit is now a month old, but I only just saw it, and wasn't exactly pleased. Ubuntu has announced the launch of an Ubuntu-specific certification exam, based on the LPI certifications. LPI was alwats supposed to be an independent certification. With Canonical pushing in, this may well be the end of it. In related but other news, I wonder of what a "Ubuntu Certified Professional" is supposed to be capable. It's a single exam on top of LPIC 1, but does passing that make anyone a "professional"? It's the old experience vs. certification debate, and so far, LPI has steered clear of either side (or at least done their best). With Canonical entering the picture, the LPI certifications will now inch closer and closer to the pool of the certifications offered by all the commercial vendors. And those pretty much accomplish the exact opposite of what their trying to do. At least in my experience, it's always been a direct correlation: those eager to display their certifications were mostly unsuitable for anything. Those without certifications were the ones to hire. Also see this thread...

5 May 2006

Erich Schubert: More on your Google SoC applications

I'd just like to point out that using Debian is not sufficient for sending us your application. Apparently some projects were submitted with minimal wording changes to Debian, Python, Postgres, Gentoo and Apache. If you send us your project, it should have some extra relationship to our project... it should be something our users or our community needs and that is somehow related to Debian. There is nothing wrong with being useable by other projects as well, but the relationship to Debian needs to be a bit more than just "Debian is my favourite distro." For example the SELinux policy module dependency handling is obviously something all distributions would like to have to ease installation. But when integrated with some nice magic of autoselecting policy modules based on the Debian packages installed: go for it. I've been asked about details on the Debtags SoC ideas. Here are some mails for you to read:

4 May 2006

Erich Schubert: Google alerts broken

Google alerts, which are email notification on new sites being added to the google index for a certain query, broke these days. Seems like they just "upgraded" their software. The alerts are still sent, however they list web pages that don't match the query. For example, my alert on "layered-subversion svn" just turned up some generic hits with "svn" "subversion" and "layered" in them. A pity. I really liked this function, but it's not too useful anymore now. I hope they fix that again. [Update May/5: todays alert mails had only correct results.] It's also a shame that there are some restrictions with google on combining e.g. site: and link: matches. Especially with negative prefix... For example I'd like to see all links to my homepage, but not those from my blog. You can do that with Altavista, MSN search, for example. Exalead also gives much more valueable search results than Google...

Erich Schubert: On system init

I've been investigating alternative system inits from time to time the last few years. With the advent of bootchart, there was quite a hype around improving boot times with parallelization and such. Recently this topic has manifested itself in the initscripts-ng group on alioth, and some to-be Google Summer of Code projects. I've been using a modified version of minit for a long time, just lately I was to lazy and switched back to regular init. Since I use suspend2, I don't really reboot my system often anyway. However, minit has more features than being parallel and small. It offers service monitoring and respawning. Which brings me to something missing totally from current linux init systems: service state tracking. Right now, when you start a service, e.g. the web server, you pretty much hope it will never die. Agreed, apache does a good job here. Others may or may not. Mysql uses a really hackish shell script to respawn. And then there are of course tools like monit that check your services and respawn them when needed. There are a couple of things wrong with starting services via SysVInit style scripts from the shell. For example, in order to start a service you need root rights. And then this will "leak" file descriptors from your shell to the daemon (thats why some apps need to be started with "nohup"). Which also causes extra errors with SELinux, for example. And this is just one of the differences from services being started by manually running their init script from the script being run by runlevel changes. Therefore, I think we should move to a new init that can offer full state tracking for services, and is actually used for all services (and not just initial start and getty respawning...) Here's a fairly extensive state diagram I came up with:
state model for sysvinit Some features I'd like to have in a new init: Sorry, no comments on my blog, intentionally. Please use the initscripts-ng mailing list for discussion, thats what the list is for!

3 May 2006

Jacobo Tarr&#237;o Barreiro: CC-ff-sp

14:29 <jacobo> ains, Joey's confession
14:29 <jacobo> that is always happening to me, but worse
14:29 <jacobo> should I put “confession++” in my nametag?
14:29 <jacobo> or something like that
14:29 <jacobo> I could create the Confession Commons
14:29 <jacobo> and then I would say that I’m CC with some options
14:29 <jacobo> for example
14:30 <jacobo> CC-ff
14:30 <jacobo> Confession Commons - Forgets Faces
14:30 <jacobo> CC-fn (Forgets Names)
14:30 <jacobo> CC-hp (Has Prosopagnosia)
14:30 <jacobo> CC-sp (Scared of People)
14:31 <jacobo> and combine
14:31 <jacobo> CC-ff-sp
14:32 <jacobo> this is so big a load of nonsense that it’s well-suited for
                  my weblog

2 May 2006

Andres Salomon: openswan vs openvpn speed tests

I’ve been using OpenSWAN for a little while now, and have been quite unhappy w/ it. Aside from being poorly documented and a pain in the ass, we’ve run into kernel bugs and stability issues; the various SWAN implementations feel very cobbled together. I also firmly believe that network stacks should be implemented in userspace, and linux’s IPSec stack confirms that belief (Van Jocobson’s network channels display a nice example of how an efficient userspace tcp stack would work). Layering GRE tunnels and using OSPF over the tunnels simply adds to the complexity. Playing around w/ OpenVPN was such a pleasant experience. It has excellent documentation, and was a breeze to configure/set up. I was concerned with speed issues, however; OpenSWAN uses the kernel’s IPSec stack, while OpenVPN has to copy packets between kernelspace and userspace, and uses SSL + Linux’s tun device. I experimented w/ two machines; a dual opteron and a single processor 2.4GHz p4, both w/ Debian’s 2.6.15-1-686-smp kernel. Doing a straight netcat of /dev/zero between the two machines yielded 98mbit/s (according to iptraf). Using an OpenSWAN tunnel and a GRE tunnel [0], I got about 81mbit/s sustained between the two machines. The load on the slower machine hovered around 0.30 while this was happening. Using OpenVPN in UDP mode, I got about 15mbit/s, w/ a load avg of 1.84. Very disappointing results. I was curious if using OpenVPN in TCP mode made a difference; it did. With it, I got about 17mbit/s, w/ a load avg of 2.10. This wasn’t very satisfactory; replacing OpenSWAN w/ OpenVPN when it could only do 17mbit/s over a 100mbit connection, and drove the load way up while doing it was not going to work. Looking at the config, I tried another change; disabling compression [1]. This made all the difference. With OpenVPN in UDP mode and compression disabled, I got 98mbit/s between the two machines, w/ a load avg of about 1.90. This made me much happier; looks like I’ll be replacing OpenSWAN. No need for GRE tunnels over top of the OpenVPN tunnels, either; OSPF works just fine between the tun devices. [0] There are a number of reasons to use GRE tunnels over OpenSWAN IPSec tunnels; Ken Bantoft’s Linux Symposium paper on the subject summarizes them nicely. [1] Most of the traffic that goes across our tunnel links is compressed already, anyways. No sense recompressing it.

Andres Salomon: rock n roll professionals

I was listening to a DJ Shadow album, “Preemptive Strike”, and recognized one of the songs. The track “High Noon” was from (or included samples of) a Therapy? album called Lonely, Cryin’, Only. I was curious whether Therapy? had originally written the song, or whether both were covers, so I dug around Therapy?’s site a bit and discovered this gem: “Here’s an example of how strange it can be. About a month ago we got a call from DJ Shadow’s management. He’s releasing a DVD and wanted to know if we would give permission for him to include a section of our cover of ‘High Noon’, a song he wrote! Apparently he uses it in his live set and needed clearance from us. How screwed is that? He’s asking us if we allow him to use a section of a cover of a song he wrote! Bizarre.” The music industry is a strange place.

27 April 2006

Ross Burton: LFTP, I Love You

lftp rocks. I always loved it in the past as it let me do tab completion in FTP, but now I discover that it not only handles HTTP and SFTP, but has a mirror command.
lftp -c mirror sftp://o-hand.com/srv/foo/bar ftp://user:pass@ftp.example.com/pub/bar
That is very, very useful right now. NP: The Antidote, Mocheeba

Next.

Previous.