Search Results: "tar"

30 August 2009

Aigars Mahinovs: Debconf9 photos and banter

A bit more than a week after Debconf9 ended here is a post summarising what I remember about it for myself to look back to later, for others that were there for a good memory, for those that were not there for insight and for organisers of future Debconfs to improve. Let s start with something most people know I took photos, a lot of photos. The main photo naturally was the Debconf9 group photo (also http://tr.im/dc9group and an annotated version). Please look for people that are missing their IRC nicknames. I have uploaded the best of my photos on Flickr and all good photos in full resolution on the Gallery site. All of these photos are licensed CC-BY 2.0 or 3.0 or GPL v2 or v3 (your choice). Now about the organisation. The place reasonably easy to get to but not particularly fast or cheap from airport to the venue it took 1 hour in metro, 3 hours in a bus or train and a half an hour walk (or 5 minutes in a taxi) for the sum of 22 and 4.5 hours or 27 and 4 hours one way. While we all accept the time waisted in airports, getting from the airport to the venue should be easier and cheaper than this. While it was crazy hot outside (38-40 C) there was great air conditioning everywhere, so we did not feel the heat most of the time (except if you walked from bus/train to the venue or did the climb during the day trip). Having air conditioning in the room was a godsend I do not think I would be able to sleep otherwise. Also free water from a drinking fountain where you could also refill your water bottle was a great touch. The rooms were great two beds, air conditioning, bathroom, shower, desks and closets where one could unpack their things. And we did not have to move to other rooms in the middle, it allowed us to unpack and feel comfortable instead of living out of the suitcase the whole time. I m not sure if it will be possible for future Debconfs to get rooms with only two beds, but I think that even with 4 people per room would have been fine, provided that there are enough bathrooms/showers, enough space to unpack everyone s clothes, enough sockets to charge some stuff overnight and enough WiFi coverage in rooms to get some late emails without going to the hacklab. Which brings me to Internet and hacklabs. I must say that Internet was great this year it was fast enough not be a major problem, it was almost everywhere (a bit more signal in the sleeping rooms would be better), it was up and running from day one of the Debcamp and it was stable through (I think there was one or two interruptions). It would be nice to see people write a blog entry about how exactly it was done. As far as I know it was very helpful to have several kilometres of CAT5 cable, several large switches and a huge amount of identical WiFi routers all flashed with OpenWRT (and then some more smaller routers also flashed with OpenWRT to plug some holes). I heard there were two Internet connections joined together and a complex firewall/transparent proxy/traffic shaper and also a local Debian mirror that was DNS-redirecting people to it from all the regular Debian mirrors people use at home. The hacklabs were also nice when the Debcamp started the second hacklab was lacking most tables and chairs, but when those arrived there was plenty of space. Other common issues such as access to a free switch port for people without wireless and access to power sockets were also handled well and fast. It was very nice that organisers always had a few spare power strips or a spare patch cable at hand. This year there was a siesta break in the proceedings. While it was in line with local traditions (take a several hour break during the hottest hours), it did not do much for the secondary stated reason to get out and see the surrounding, because half of the attraction of getting out (shops and bars) were all closed during the same siesta time. IMHO we should have used the great aircon of the venue and continued the talks from mid day to 18:00 (when the siesta ends) and then make a break until dinner so that we could go out and enjoy shops and bars and historic places during a cooler time of day. If there is a break in proceedings, then it should be at the time when people are most likely to enjoy the surroundings. I doun t know the schedules in NY, but if the museums close at 18:00, then there should be a break during the day to allow people to get to those museums. Food was there and it was there every day, but it was not particularly great. Aside from typical problems with vegetarians and vegans (even salads had pieces of meat in them), I did not find the food to be compelling most of the time. I do not like fish and there was a lot of fish. Mostly it was good fish and sometimes it was so well done that even I enjoyed eating it, but other times it was full of fish bones and/or tasteless. Too often the dinner consisted of a salad, a deep-fried piece of meat and spoonful of dry fries. It would not kill them to put more fries on the plate and have some kind of sauce for them. One thing that was great in food were the fruit deserts apples, oranges, peaches and nectarines were fresh and juicy and then there were melons! I typically hate melons because the ones I can get in shops in Latvia are dry and bitter, but the melons here were bursting with sweet juice heavenly stuff. In the future it would be nice if the food selection and amounts per portion could be checked and agreed upon with the caterer in advance. Also the timing should be adjusted it is too early to end breakfast at 10:00, especially with dinner starting at 21:30 there is way too little time to socialize with other people after dinner and then to get a decent sleep. Talks can start at 10:00, but breakfast should go up to 11! I did like the water bottles and wine jugs on the tables and the beer being served as part of the food that was a nice touch that many people enjoyed. The daytrip was a nice distraction in the middle of the conference a trip to a swimming pool made from a river bed blocked by a damn with an optional hike up a mountain to a spectacular cascade of natural water pools and slides that a river has carved in the solid rock or the mountain valley. Most people did the hike it was steep and hot and rocky, but the payout (the water fun) was there at the end, and it was great! Wonderful warm water and unexpectedly deep pools that both locals and us jumped into from rocks of differing heights. I am more of a climber than a jumper so instead of jumping off a cliff, I spidermanned up the cliff up from the water. I did not have any safety, but if I did fall I would have fallen into the water, so felt almost safe :) After the hike, the jumps and a hike back downhill we went into the buses and joined up with the people relaxing in the pool or in the bar right next to it. And after an hour or two later the day trip was over. While this was fun I would have preferred if after the hike we would have gone to some castle or other tourist attraction for more of a trip experience than sitting by a pool chatting. Formal dinner was another traditional thing that we did this year. We walked over to a restaurant overlooking the city, sat down at many different tables occupying most of the place and then the waiters brought us plates with bits of food. Each plate was basically a set of 4 snacks for 4 people a plate of cheese, a plate of ham cuts, a plate of steamed vegetables and a plate of grilled meat. After that was coffee and desert. In my opinion the grilled meat was overcooked, the vegetables were passable, 1 of 5 cheeses was great (the local soft speciality) while other were ok and the ham cuts were ok. Desert was average. In all I was neither impressed by the food nor filled by it. There was also entertainment a singer with two dancers. They ware way too loud, so loud in fact that police came and shut the performance down, I did get a few interesting photos but otherwise I did not like them. They came to our venue the next night to continue the performance, luckily it was in an isolated patio and did not disturb people sleeping. Wine and cheese party on the other hand was simply great this year there was a huge selection of wine and cheese as we were in the right part of the world for that. There were 7 tables full of cheese, wine and bread and also some extra stuff such as a barrel of peanuts and some great tea from Taiwan. People were walking around for hours eating cheese, cleaning the taste off with bread and wine, chatting and doing it all over again at another table. I left the patio at around 2am and there were still several dozen people around chatting, eating, drinking wine and tea. I m not sure how to get an event of similar size in NY as it is not allowed for travellers to bring cheese into US, only commercial import with an appropriate licence is allowed. I also have my praise for the video team, but I ll hold on to that and the feedback about the talks until I see the recordings of talks that I missed, so I can also recommend the must see recordings. All in all it was a great event meeting all the great Debian people again, coding some stuff, having fun and talking about the future of Debian in a more relaxed atmosphere than an IRC chat room. Debconf 9 was great, see you all next year at Debconf 10 in New York!

7 June 2009

Martin-Éric Racine: When can we have a balanced and meaningful debate on immigration?

This question keeps on popping up in many recent newspaper articles, on discussion boards and in seminars debating immigration issues in Finland. At the core of the question is a general impression that, between the enthusiastic supporters of multiculturalism and the pessimistic nationalist rednecks, very little constructive discussion is possible in Finland. At one end, humanitarian help organizations, as well as politicians from the Green Party and the Swedish Folk Party, keep on taking excessively generous initiatives towards refugees and asylum seekers, all while labeling their detractors as racists. At the other end, nationalist candidates in the National Coalition Party and True Finns Party keep on painting every immigrant as a refugee who is abusing social security and label their detractors as turning Finland into the easiest country to abuse social security, at the Finnish taxpayer's expense. In between, candidates from the Christian Democrats and Center Party spread equally among these two camps. Meanwhile, while the Left is currently avoiding discussions on this topic, Social Democrats have previously shown that they tend to side with the nationalists in labeling all immigrants as social security abusing refugees. One interesting point is that, no matter at which end of the political spectrum one looks, the whole Finnish immigration debate keeps on focusing exclusively on refugees and asylum seekers, despite the fact that migrant workers and foreign spouses of Finnish nationals make up for a good 70% of the foreign population residing on Finnish soil. This recalcitrance to discuss immigration from any other perspective than refugees is rather painfully noticeable. Some recent examples: What's remarkable about all these examples is how public opinion is so persistently hardwired into thinking that all foreigners living in Finland came here as refugees from 3rd-world countries whose culture is radically different from Finland's and that they all became perpetually unemployed, forever living off social security, to the point that even politicians who ought to know better go along with it. When will we be able to have a balanced and meaningful debate on immigration, you ask? The day both multicultural hippies and nationalist rednecks will have been kicked off the podium. Of course, it would also help if the refugees themselves stopped monopolizing the podium, whenever the opinion of immigrants is solicited. Then again, perhaps these 3 groups benefit so much from the current status quo that they'd rather not see the day when others can participate in this debate on equal footing with them, so that a balanced and meaningful debate can finally take place?

Enrico Zini: Voice-controlled waypoints

Voice-controlled waypoints I have it in my TODO list to implement taking waypoints when pressing the headset button of the openmoko, but that is not done yet. In the meantime, I did some experiments with audio mapping, and since I did not manage to enter waypoints while recording them, I was looking for a way to make use of them anyway. Enter findvoice:
$ ./findvoice  --help
Usage: findvoice [options] wavfile
Find the times in the wav file when there is clear voice among the noise
Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -v, --verbose         verbose mode
  -p NUM, --percentile=NUM
            percentile to use to discriminate noise from voice
            (default: 90)
  -t, --timestamps      print timestamps instead of human readable information
You give it a wav file, and it will output a list of timestamps corresponding to where it things that you were talking clearly and near the FreeRunner / voice recorder instead of leaving the recorder dangling to pick up background noise. It does not use sound statistics because I have no background whatsoever in audio processing, but it basically finds those parts of the audio file where the variance of the samples is above a given percentile: the higher the percentile, the less timestamps you get; the lower the percentile, the more likely it is that it picks a period of louder noise. For example, you can automatically extract waypoints out of an audio file by using it together with gpxinterpolate:
./findvoice -t today.wav   ./gpxinterpolate today.gpx > today-waypoints.gpx
On the timestamps that it outputs, it will add the modification time of the .wav. This means that if you touch -d "@timestamp" the .wav file with the date you started recording, then you can get decently accurate waypoints provided your system clock is decently synchronized. For example:
START= date +%s 
arecord file.wav
^C
touch -d "@$START" file.wav
./findvoice -t file.wav   ./gpxinterpolate today.gpx > today-waypoints.gpx
In record-audio-on-freerunner I even set the .wav mtime using the GPS time at the start of the recording.

6 June 2009

Enrico Zini: Recording audio on the FreeRunner

Recording audio on the FreeRunner The FreeRunner can record audio. It is nice to record audio: for example I can run the recording in background while I keep tangogps in the screen, and take audio notes about where I am while I am doing mapping for OpenStreetMap. Here is the script that I put together to create geocoded audio notes:
#!/bin/sh
BASENAME=~/rec/rec-$(date +%Y-%m-%d-%H-%M-%S)
alsactl -f /usr/share/openmoko/scenarios/voip-handset.state restore
echo "Getting GPS info..."
getgps > $BASENAME.info
arecord -D hw -f cd -r 8000 -v -t wav $BASENAME.wav
echo "Setting wav timestamp to GPS start of recording"
TS=$(cat $BASENAME.info   grep time_tstamp   cut -f2 -d' ')
touch -d "@$TS" $BASENAME.wav
echo "Done"
It works like this:
  1. It loads mixer settings to record from the handset, but the same could in theory be done for the headset.
  2. It gets all sort of information from the GPS and stores them into a file.
  3. It records audio until it gets interrupted.
  4. It retrieves the GPS timestamp from the beginning of the audio recording, and uses it to set the file timestamp
And the following is the getgps script, adapted from a mailing list post: it can be generally useful to save information about a fix from the GPS.
#!/usr/bin/env python
import dbus
from time import gmtime, strftime
obj = dbus.SystemBus().get_object('org.freesmartphone.ogpsd', '/org/freedesktop/Gypsy')
constatus = obj.GetConnectionStatus(dbus_interface='org.freedesktop.Gypsy.Device')
print "connection_status:", constatus
print "connection_status_name:", (constatus and 'TRUE' or 'FALSE')
fixstatus = obj.GetFixStatus(dbus_interface='org.freedesktop.Gypsy.Device')
print "fix_status:", fixstatus
names = ["INVALID", "NONE", "2D", "3D"]
if fixstatus < 0 or fixstatus > len(names):
    print "fix_status_name:", names[0]
else:
    print "fix_status_name:", names[fixstatus]
def yesno(val):
    return val and "yes" or "no"
(fields, tstamp, lat, lon, alt) = obj.GetPosition(dbus_interface='org.freedesktop.Gypsy.Position')
print "pos_fields:", fields,
print "pos_tstamp:", tstamp
print "pos_time:", strftime('%F %T', gmtime(tstamp))
print "pos_lat: %f" % lat
print "pos_lat_valid:", yesno(fields & (1 << 0))
print "pos_lon: %f" % lon
print "pos_lon_valid:", yesno(fields & (1 << 1))
print "pos_alt: %f" % alt
print "pos_alt_valid:", yesno(fields & (1 << 2))
(fields, pdop, hdop, vdop) = obj.GetAccuracy(dbus_interface='org.freedesktop.Gypsy.Accuracy')
print "accuracy_fields: %d", fields
print "accuracy_pdop: %f" % pdop
print "accuracy_pdop_valid:", yesno(fields & (1 << 0))
print "accuracy_hdop: %f" % hdop
print "accuracy_hdop_valid:", yesno(fields & (1 << 1))
print "accuracy_vdop: %f" % vdop
print "accuracy_vdop_valid:", yesno(fields & (1 << 2))
(fields, tstamp, speed, heading, climb) = obj.GetCourse(dbus_interface='org.freedesktop.Gypsy.Course')
print "course_fields:", fields
print "course_tstamp:", tstamp
print "course_time:", strftime('%F %T', gmtime(tstamp))
print "course_speed: %f" % speed
print "course_speed_valid:", yesno(fields & (1 << 0))
print "course_heading: %f" % heading
print "course_heading_valid:", yesno(fields & (1 << 1))
print "course_climb: %f" % climb
print "course_climb_valid:", yesno(fields & (1 << 2))
time = obj.GetTime(dbus_interface='org.freedesktop.Gypsy.Time')
print "time_tstamp:", time
print "time_time:", strftime('%F %T', gmtime(time))
satellites = obj.GetSatellites(dbus_interface='org.freedesktop.Gypsy.Satellite')
for satIndex, sat in enumerate(satellites):
    print "sat%d_prn: %u" % (satIndex, sat[0])
    print "sat%d_used: %s" % (satIndex, yesno(sat[1]))
    print "sat%d_used_value: %u" % (satIndex, sat[1])
    print "sat%d_elevation: %u" % (satIndex, sat[2])
    print "sat%d_azimuth: %u" % (satIndex, sat[3])
    print "sat%d_snr: %u" % (satIndex, sat[4])

Biella Coleman: Commemorating Alice Ramsey!!

Alice s Drive from Bengt Anderson on Vimeo. My partner Micah is pretty good with his hands, well, so long as they are attached to a computer. Otherwise, he is a bit lost. His father, however, is a master craftsman, rebuilding old cars, making his own houses, you know, the sort of stuff that really puts me in awe. Thanks to his efforts, his family, notably his sister Emily Anderson, are about to kick off and commemorate Alice Ramsey who in 1909, did the unconventional, which is somewhat an understatement, and drove across the United States in what then was called a horseless carriage. Apparently, she loved to race cars and took that love to trek across what were really gnarly roads and earned the distinction as the first woman to do so. Using the same model (Maxwell Model DA) that Alice drove, one that Emily s Dad, Richard, restored (and it is the very last one in existence!), she will be starting off the drive in just a few days. The whole family is pretty involved, so Bengt Anderson is making a film (short clip featured above), Micah has helped with the website side of things, and the rents will be in the trailer (especially since Emily just had a baby). Anyhow, more to write about cars and this trip but thought some folks might be interested in following her across the US. I am super bummed I am not in NYC to watch her go, but I will be watching with a lot of excitement from the Internets!

Martin Michlmayr: Fan control on the D-Link DNS-323

The kernel in Debian doesn't have support for the fan control chip on the D-Link DNS-323. Since some people said that their device runs quite hot after installing Debian, I've prepared a 2.6.29 based kernel that includes the fan driver. If you want to install this kernel, edit the file /etc/apt/sources.list and add the following line:
deb http://people.debian.org/~tbm/orion lenny main
Now you can install the new kernel:
apt-get update
apt-get install linux-image-orion5x
After a reboot, you can control the fan this way:
echo   0 > /sys/class/hwmon/hwmon?/device/pwm1  # turn it off
echo 255 > /sys/class/hwmon/hwmon?/device/pwm1  # turn it to full speed
Any values between 0 and 255 will work. According to Anselmo Luginbuhl, you should also be able to use the lm-sensors package to automatically control the fan: "Execute pwmconfig, it will make some tests and generate the fancontrol config file. At the end of the procedure it will ask you to "Select fan output to configure, or other action:", just be sure to pass through choice "1" or it would not fill in the configuration file, save the configuration and start the daemon /etc/init.d/fancontrol. Probably the only thing that needs some attention to get an optimal result is to choose the right parameters for max and min temperature at which the fan should start or stop to minimize the C and the noise." Finally, this kernel also includes some performance patches from Marvell, so you might see some performance increases too.

Martin-&#201;ric Racine: Killing the console bell on Jaunty?

Every once in a while, rewrites in ALSA drivers or in desktop audio components (GNOME mixer or Gstreamer) result in an impossibility to completely mute the console bell. Until recently, ALSA offered a separate channel to control this. Since Jaunty (kernel 2.6.28, ALSA 1.0.18r3) came out, not anymore. As such, I was wondering how else could I mute the console bell? Some people on Ubuntu Forum suggested blacklisting the pc-spkr kernel module, but this is entirely the wrong approach, as it completely kills sound output on this laptop's built-in speakers. I don't wanna completely lose sound support, I just wanna get rid of that annoying console bell! Others recommended setting set bell-style none in /etc/inputrc but that only works for interactive shells. The console bell still rings e.g. whenever rebooting, probably because bash gets called as a non-interactive shell by init scripts. Actually, since Jaunty, restarting the system makes the bell ring not just once, but twice! Can anyone think of any more permanent way of disabling the console bell in some global system setting?

5 June 2009

Stefano Zacchiroli: turbogears 2 packaging - take 3

TurboGears 2 packaging - (another) status update Brief status update on TG2 packaging. As expected, this week has been very busy and I'm writing the update offline on a train, but nevertheless I've good news to share: ... the last item above would theoretically mean that TG2 is already usable, but it is not the case due to the infamous #507909 which breaks both TG2 and TG1 in unstable (the latter was working in Lenny, and I had to resort to a Lenny chroot for a recent course I've taught about web development). In short, turbojson is in unstable, in spite of the lack of several of its dependencies, making impossible any import of it. ..., stay tuned, keep faith, bear with me, almost there, ... etc.

Joachim Breitner: Third place in AI programming contest

My contribution to the programming contest held by the German FreiesMagazin got a third place out of 13 submissions. This is quite good, considering that I only wrote a small wrapper around the generic game-tree Haskell library by Colin Adams, and hardly gave any serious thought into the problem.All entires are available for download. I have annotated the table containing the results with the line count as given by ohcount:
W D L Points Language Code lines
1. Kroschinsky 904 242 54 2954 Python 589
2. Schulz 858 263 79 2837 Python 544
3. Breitner 837 281 82 2792 Haskell 264
4. Jackermeier 754 306 140 2568 Perl 183
5. Roth 574 338 288 2060 C++ 1731
6. Eitel 567 355 278 2056 Ruby 352
7. Reichel 342 328 530 1354 Python 266
8. Zimmermann 303 400 497 1309 Java 1070
9. Apensiv 190 353 657 923 Perl 410
10. Maraun 150 300 750 750 C++ 690
11. Golemo 131 319 750 712 Python 104
12. Ziegelwanger 120 337 743 697 C++ 868
13. Fuest 32 254 914 350 Python 645
Note that the line count for my haskell program includes the game-tree library, which I bundled in my submission. Without it, it s 156 lines of code I had to write, which is second best in the code golf category.If you look at the timing statistics, you will see that my program took the longest. When the contest was started, the timelimit was one minute per round which I of course tried to use as much as possibly, by increasing the search tree depth. Later into the contest, the rules were changed to limit it to one minute for a whole game, and that long-running programs will get points deducted. I did some minor changes based on a profiling run, but did otherwise not care too much about performance. I would have tried to improve the runtime by using Haskell s good ability for parallelization. But when I asked on what kind of machine the code will be run, but they would not tell me. They said that this is a hobby programmer s contest where allowing for parallelization were not fair, so I did not work in that direction.All in all it was a positive experience, showing of Haskell s qualities as a language that you can quickly get good results with.

Brett Parker: And summer bites again!

So, summer has arrived - how can I tell? The heat is killing the servers in our office again, the poor little AC unit can't keep up when the temperature outside is getting to summer weather. So the door to the magical cupboard is open for the moment, as the office temperature is slightly lower (but still, not great), and it's keeping the cupboard at somewhere around 26, which is still a little higher than I'd like, but better than the 32/33 that knocks the main firewall out. I'll be replacing the main firewall over the weekend with a lower power (and thus less heat generating) soekris box (which should have enough grunt to shift the packets), and means that we'll go from OpenBSD 4.3 -> OpenBSD 4.5 at the same time. Also, it's time to finally get the workstations on to lenny - as they're all NFS root, it becomes slightly tricky to get the setup just right for them... hopefully we can start rolling it out to the developers early next week, and then we should be in business...

Martin Michlmayr: Corporate participation in open source communities

Someone recently asked me a few question about corporate participation in open source communities and I thought I'd share my thoughts on this topic here. Are there differences between an open source project done for a corporation and one done for personal reasons? There are many different ways to run an open source project, led by a corporation or by someone else. Some projects that are run by corporations have few outside contributors. This is often the case with projects that require copyright assignment (i.e. contributors have to assign their copyright to the corporation). These projects may not gain all the benefits of a true open source community, such as outside contributions or high levels of peer review. However, they may still be very successful projects and may have high levels of quality. Projects done by a corporation may have better planning and may have more resources than other projects. When a corporation, especially a large one, starts or becomes involves in a project it can also give credibility to the project and attract a lot of interest to the project. This means that projects done by corporations may have a bigger impact and might also be more visible in terms of publicity. How do corporations successfully utilize an open source community? Corporations can benefit from an open source community in many ways. For example, they can often find people who will review their code or make code contributions. If people become excited about what the corporation does, they might also spread the word and create viral marketing for the corporation. Establishing a community around one's project is often also a good way to identify people to hire since you already have experience working with them and know their capabilities. How do open source communities successfully utilize their corporate relationships? Corporations can make several unique contributions. For example, large corporations can use their name to attract attention to a project and give it credibility. Furthermore, corporations have some capabilities that personal contributors often don't have access. They may have special testing equipment (such as servers with thousands of CPUs or hard drives) or access to a testing lab where a professional usability test can be done. Finally, corporations can sponsor developer conferences, which are typically very effective means for the community to come together and work on activities together. It is important for projects to remember that corporations are not charities and that they will invest in an open source project for a reason. Therefore, they have to ensure that the corporation will get tangible outcomes from their involvement or sponsorship, otherwise they may not stay involved in the long run. What are the risks for a corporation when working with an open source community? One risk is that the code (or other form of contribution) is not accepted. However, this is a risk any contributor to a project faces. Before making any sort of contribution, it is therefore important to become familiar with the project and its culture. Every project has their own "do's" and "don'ts" that have to be followed. Another risk is that a corporation will invest in a community project that later on is abandoned by the community. However, in this case, the corporation could take the lead and continue to maintain the project. What are the risks for an open source community when working with a corporation? One potential risk is that the corporation will assert too much control over the project. It's important for projects to ensure that the community as a whole has influence over the direction of a project rather than one particular player. Are certain certifications needed in order for someone to participate in open source projects for a corporation? Certifications are not needed to get involved in or start a project. However, it is important to become familiar with the open source community and the project one wants to contribute to. A good first step is to read the book Producing Open Source Software by Karl Fogel which is available online. As a next step, the community in which someone wants to get involved in should be studied, for example by reading the mailing list archives. This will help to become familiar with the culture of a project as well as the mechanisms to contribute to the project. How do open source communities communicate and collaborate with corporations? In the best case, employees from corporations would interact in the project like any other contributor. That is, they should use the existing communication channels, such as mailing lists, IRC or developer gatherings. Many companies are good at working "with the community" but the ideal scenario is for a company to be part of the community and to work "in the community", just like other contributors. This is the most effective way for them to make changes to the code and project. Of course, not every corporation will get involved in a project directly. That's why it makes sense for projects to collaborate with corporations in other ways. For example, projects can talk directly to companies to get samples of their hardware in order to add support for them in their software. Projects can also work directly with corporations to find out how their project can better meet the needs of enterprise users.

4 June 2009

Russell Coker: Linux Rate-Limiting of an ADSL Link

After great pain I ve got tc working on some Linux routers. The difficulty with limiting an ADSL link is that the ADSL modem has significant buffers and the link between the Linux machine and the modem is significantly faster than the ADSL upstream channel. This means that the transmission speed needs to be artificially limited, a speed of about 95% the maximum channel speed is often recommended. As ADSL upstream speed often varies (at least in my experience) that means that you must limit the transmission speed to 95% of the lowest speed that you expect to see - which of course means a significant drop in performance when the ADSL link is performing well. I use the HTB queuing discipline to limit the transmission rate. My transmission speed varies between 550kbit and 680kbit in my rough tests. So I start by limiting the overall device performance to 550kbit. Then I have three different classes with IDs 1:10, 1:20, and 1:30 with rates of 64kbit, 480kbit, and 128kbit respectively. It is often recommended that the inferior classes have a total bandwidth allowance that is equal to the allowance for the overall link, but I have the three inferior classes allocated with 672kbit - I think that this will work as it will be quite rare that all classes will be in operation at the same time and fairly unlikely that I will ever have all three classes running at maximum speed. I will be interested to see any comments about this, I might have misunderstood the issues related to this. Each class has a SFQ queue discipline associated with it for fair queuing within the class. It might be a bit of overkill, I expect to only have one data channel in operation on the VOIP class so it probably does no good there and my usage pattern is such that if the 480kbit connection is anywhere near busy then it s due to a single large transfer. But with the power of a P3 CPU applied to the task of routing at ADSL speeds it really doesn t matter if some CPU time is wasted. Then the tc filter lines associate iptables marks with the classes. Now this is only a tiny fraction of what tc can do. But I think that this basic configuration with the rate limits changed will suit many ADSL router configurations, it may not be an ideal configuration for most ADSL routers but it will probably be a viable configuration that will be better than having no traffic shaping. Below is the shell script that I am using: #!/bin/bash -e DEV=ppp0 tc qdisc del dev $DEV parent root handle 1:0 2> /dev/null true
tc qdisc add dev $DEV parent root handle 1:0 htb default 30 # limit the rate to slightly lower than DSL line speed
tc class add dev $DEV parent 1:0 classid 1:1 htb rate 550kbit prio 1 # sub classes for each traffic type
# 10 is VOIP, 20 is default, 30 is the test network
tc class add dev $DEV parent 1:1 classid 1:10 htb rate 64kbit burst 6k prio 2
tc class add dev $DEV parent 1:1 classid 1:20 htb rate 480kbit burst 12k prio 3
tc class add dev $DEV parent 1:1 classid 1:30 htb rate 128kbit burst 12k prio 4 # use an sfq under each class to share the bandwidth
tc qdisc add dev $DEV parent 1:10 handle 10: sfq
tc qdisc add dev $DEV parent 1:20 handle 20: sfq
tc qdisc add dev $DEV parent 1:30 handle 30: sfq tc filter add dev $DEV parent 1: protocol ip prio 1 handle 1 fw classid 1:10
tc filter add dev $DEV parent 1: protocol ip prio 2 handle 2 fw classid 1:20
tc filter add dev $DEV parent 1: protocol ip prio 3 handle 3 fw classid 1:30 iptables -t mangle -F POSTROUTING
iptables -t mangle -A POSTROUTING -j MARK --set-mark 2
iptables -t mangle -A POSTROUTING -p tcp --sport 22 -j MARK --set-mark 3
iptables -t mangle -A POSTROUTING -d $VOIPSERVER -j MARK --set-mark 1

3 June 2009

Chris Lamb: Checklist for configuring a Debian system

In the spirit of Thomas Limoncelli's Time Management for System Administrators, this is my checklist for setting up a new Debian system. I have added a few notes to the original list to justify their existence and to provide some background information. Whilst you should avoid performing repetitive interactive configuration and defer to the multitude of tools designed for this task, constructing and sharing a checklist can still be an instructive step. It can also be useful in situations where a machine has already been partly configured for you.
Software
  • /etc/apt/sources.list

    • Choose a sensible primary mirror
    • Ensure use of release codenames (eg. "lenny") instead of synonyms
    • Confirm security mirror is enabled
    • Remove references to contrib and non-free
  • Disable installation of Recommends:

    echo 'APT::Install-Recommends "0";' > /etc/apt/apt.conf.d/90recommends
    
  • Ensure we are up to date security-wise:

    apt-get update && apt-get dist-upgrade
    
  • Setup and configure locales first to avoid annoying Perl warnings. Don't choose All locales; you almost certainly don't want that.

    apt-get install locales
    dpkg-reconfigure -plow locales
    
  • Install some essential utilities:

    apt-get install vim-nox ntp openssh-server screen most tree bzip2 unzip moreutils dnsutils htop pwgen telnet manpages manpages-dev vrms acl gawk strace curl tcpdump
    
Users
  • Before we create any real users, we configure PAM to reject weak passwords. Custom banned passwords can be added to the dictionary by editing /usr/share/dict/cracklib and running update-cracklib.

    apt-get install libpam-cracklib
    sed -i -e 's ^password # \0 ' /etc/pam.d/common-password
    echo 'password required    pam_cracklib.so retry=3 minlen=6 difok=3' >> /etc/pam.d/common-password
    echo 'password required    pam_unix.so use_authtok nullok md5' >> /etc/pam.d/common-password
    
    (Edit: Please read this response from Steve Langasek regarding this modification on squeeze and Ubuntu 8.10)
  • Configure sudo. I prefer to create a new group instead of re-using adm as that is already used by logfiles.

    addgroup rootusers
    adduser myuser
    adduser myuser rootusers
    apt-get install sudo
    echo 'User_Alias ROOTUSERS  = %rootusers' >> /etc/sudoers
    echo 'ROOTUSERS, root     ALL=(ALL) ALL' >> /etc/sudoers
    
Mail relay Email remains the primary method to asynchronously inform the system adminstrator that their attention is required. It is assumed that the machine will not handle your day-to-day email (or indeed accept any external mail) but will instead simply forward it elsewhere. We also assume a preference for Exim, but the configurion for Postfix is almost identical.
  • First, install the mail packages:

    apt-get install exim4-daemon-light bsd-mailx
    dpkg-reconfigure exim4-config
    
  • During the Exim configuration, choose Internet site and follow all the defaults, ensuring that you only listen on 127.0.0.1 and you are not relaying mail for any other domains.

  • We then configure forwarding to another email address so we don't have to continually poll this machine for issues:

    echo 'root: you@example.com' >> /etc/aliases
    newaliases
    
  • Finally, we test mail delivery:

    echo "Test 1 from $(hostname)"   mail root -s "Test 1 from $(hostname)"
    
The d-i manual has some further advice on this, including the use of "smarthosts".
Miscellaneous
  • Stop Emacs creating backup files everywhere:

    mkdir -p /etc/emacs/site-start.d
    echo '(setq backup-inhibited t)' > /etc/emacs/site-start.d/10no-backup.el
    
  • Configure Munin:

    apt-get install munin-node
    echo 'allow ^123\.123\.123\.123$' >> /etc/munin/munin-node.conf
    /etc/init.d/munin-node restart
    
    For baroque network configurations, you can generate the regular expression line with this script.
  • Configure molly-guard, a tool for preventing accidental shutdowns. As molly-guard cannot detect shutdowns initiated within a combination of GNU screen and SSH, we configure it to always query the hostname:

    apt-get install molly-guard
    echo "ALWAYS_QUERY_HOSTNAME=true" >> /etc/molly-guard/rc
    
  • Monitor disk S.M.A.R.T. attributes:

    apt-get install hddtemp smartmontools
    sed -i 's ^#start_smartd=yes start_smartd=yes ' /etc/default/smartmontools
    /etc/init.d/smartmontools start
    
  • Setup backups - I'm quite partial to backupninja because it automates most of the tedious SSH configuration. I adjust the time of the backup to when I'm likely to be around to fix issues and cut down on email noise by not reporting successful backups:

    apt-get install backupninja hwinfo debconf-utils rdiff-backup
    sed -i -e 's ^when = everyday at 01:00 when = everyday at 9:30 ' /etc/backupninja.conf
    sed -i -e 's ^reportsuccess = yes reportsuccess = no ' /etc/backupninja.conf
    ninjahelper
    
  • Filesystems

    • In /etc/fstab, check noatime is enabled on all filesystems, and acl where needed.
    • Use tune2fs to adjust how much of the disk is reserved for the superuser - the default of 5% is excessive for large volumes.
  • Reboot. You should be prompted by molly-guard before your computer restarts.

Aigars Mahinovs: Google Wave

So, the latest buzz on the web is all about Google Wave. I would urge everyone developing stuff for the Internet and technological people depending on the Internet for their daily work, to watch that introductory video. The concept is frankly mind-blowing. If this is done right and embraced by all the right people, Google Wave could be the new platform concept that could be used to create new generation of email, instant messaging, collaboration software (CMS, wiki, Sharepoint, workflow, ), blogging software and forum software and do all that while integrating back with current technologies, like Twitter and RSS feeds. It remains to be seen what parts will be open source and federated and what parts will remain Google-only services. For example, I am convinced that Spelly the spellchecker bot and Rozy the automatic translation bot will be hard to impossible to federate. This being Google, it is practically a given that the code will be good, but a bit hard to understand and contribute to. Management of the free software community and proprietary community relations will likely be the key to the success of this technology. I love the technology itself - imagine that you have a web blog. The blog software makes each your blog post a wave. When people leave comments on the post, these comments show up in your email inbox. You can reply to people right from there. By default your replies will show up on your blog and also show up in the email inboxes of the commenter, but you also have the option to mark your reply private and only send it to the commenter. Also it looks to be possible to choose to host all the data yourself or to make Google host all your blog and comment data and make your blog just be a frame where this data is displayed in, possibly allowing you to use very, very minimal system resources to maintain the blog even in a case of Slashdotting. I hate blogs without comments, let s replace them all. I would also love to see replacements to Microsoft Exchange and Microsoft Sharepoint be built using Wave technology with a full support to ODF if possible. Imagine collaborative document editing in OpenOffice using this technology in the backend. It would be one huge project, but it should be possible. Companies currently pay hundreds of thousands of dollars to set up MS Exchange+Sharepoint+Active Directory to be able to simply share documents in their Intranet and see who edited a document (no live editing, no change tracking). It is possible to make a much better product with ODF and Google Wave and it is possible to earn a bunch of money supporting such a product for companies that need support contracts. If it would be possible to licence spellchecking and translation services from Google in a way where a box is installed in customers data centre and the data to be spellchecked and translated never leaves that data centre, then I believe that people would be willing to pay for this superior spellchecking and translation experience. We need open source products that people can depend on. We also need ways for business people to sell services with an easily visible added value so that they can make money and contribute their developer work hours back to the open source projects. We (the free software community) have great ways to get a positive feedback loop with users that can develop software, but when our users have no interest in developing anything, the feedback loop breaks and free software growth slows down. There is a lot of untapped potential in this area - we just need to find a way to convert needs and demands of non-developers into code. I m gonna stop this rant before it diverges even further off topic, but the main point is - go watch the Google Wave demo, read the tech specs and think how you could integrate that into your free software project. Useful wave discussions (will update as I find more):

2 June 2009

Christian Perrier: On localization

An old friend is ranting about localization. I first considered not really reaction to Joey's post, mostly because he has very true points...and particularly when he has about the same reaction than mine about a recent post in ou mailing lists. So, I will stick to react to one part of Joey's post...the one I consider really inaccurate. "everyone uses the software in English anyway" Really, Joey, really, that's completely untrue. Of course, I do live in a country that very well known (or at least that has the reputation) for being deeply ignorant in English language. But, really....*all* computers I see around me, both in my personal life *and in my professionnal life* are nearly completely localized. It's probably now well know that I spend most of my professionnal time....providing desktop systems (or managing the people who provide them) to users in ONERA, "the French Aerospace Lab". That means about 2000 users in a scientific environment where the use of English is much more developed than the average environment. Most of these users speak a fairly decent English and are perfectly able to understand that language in some way. About 80% of these systems are Windows-based and 20% are Linux-based. Probably more than 95% of them are localized in French. Even on Windows systems, we mostly integrate free software. And for *each* of them, the most important feature we need, besides software being free, is it to be localized in French. I bet our friends from Extremadura can say the same. The success of Linux-based free systems there also happened because the software is available in Spanish. And, of course, there are tons of similar stories and counter-examples (M nchen, Bhutan, Venezuela, etc.). So, really, please don't spread out that idea. Oh, yes, geeks *do* use their software in English (and, even here, I need to be convinced if I remember well what I saw at conferences in Germany or Spain, for instance). And, yes, it's very well widespread among geeks that using software in English is "better" or "easier". Which I indeed always fight and will fight until I die..:-). We certainly agree that these l10n needs put a high load on development and sometimes slow it down. and, for sure, we sometimes need to make a balance and I really thank you for giving me the credit to try doing that balance. Anyway, all this (including your rant) had to be said and it's interesting to have that small discussion (I just should not start writing down a blog entry at 23:00...:-)) See you soon, hopefully, Joey !

Steve Kemp: What day is it? What year?

For the past few days Edinburgh has been experiencing a mini-heatwave. This is mostly pleasant, but the downside is that I've become sunburnt and bitten by many insects. Happily I've discovered that the mint plants I've got growing beneath my bedroom window are antipruritic ("anti-itch") which solves both problems. Aside from the heat I've had a busy weekend wiring up some Lisp code to serve as an XML-RPC server, so that I can carry out some functions remotely. I'm almost tempted to package the s-xml-rpc library if only locally, but I'm not confident I know what I'm doing. I mostly unpacked the source beneath /usr/share/common-lisp/source/s-xml-rpc and fiddled until things started working by magic. In addition to getting more hooked upon Lisp I've spent a while tidying up obsolete pages on my websites, unifying services, and giving a minor overhaul to the appearance of things. ObFilm: Terminator Salvation

Holger Levsen: motivational mails for debian-edu-doc

This weekend I implemented an idea I had some weeks ago: sending regular mails with the translation status and the contents status of debian-edu-doc to the Debian Edu mailinglist, in the hope this would motivate people to finish the documentation and its translations. Currently the package contains four different manuals, translated in up to 6 languages: the old Debian Edu etch manual, the new Debian Edu lenny manual and manuals for teachers using Rosegarden and Audicity. All four are being written on wiki.debian.org, then exported to Docbook, then .po files are created with the great po4a tool suite. Those .po files are kept in svn of the the debian-edu-doc package, for translators to edit. Detecting missing or half finished content is done by putting the string "FIXME" plus a description what to fix in the wiki text. Then a small script is run by cron every 2nd and 4th sunday of the month, which outputs the translation status and greps for FIXME and formats this nicely. The result looks like this:

The (translated) debian-edu-lenny manual as PDF or HTML is available at http://maintainer.skolelinux.org/debian-edu-doc/

To understand this mail better, please read /usr/share/doc/debian-edu-doc/README.
This mail is automatically send by a cronjob run by Holger Levsen every two weeks. Please send feedback, suggestions, flames and cookies via this list.


debian-edu-lenny-manual.de.po: 545 translated messages, 193 fuzzy translations, 220 untranslated messages.
debian-edu-lenny-manual.es.po: 85 translated messages, 204 fuzzy translations, 669 untranslated messages.
debian-edu-lenny-manual.fr.po: 447 translated messages, 279 fuzzy translations, 232 untranslated messages.
debian-edu-lenny-manual.it.po: debian-edu-lenny-manual.it.po:7683: end-of-line within string
debian-edu-lenny-manual.nb.po: 711 translated messages, 159 fuzzy translations, 88 untranslated messages.
----------------------------------
http://wiki.debian.org/DebianEdu/Documentation/Lenny//Features
FIXME: describe new features in 5.0.1+edu0 here.
----------------------------------
http://wiki.debian.org/DebianEdu/Documentation/Lenny//Requirements
FIXME: a description of main-server and thinclient-server is missing.
----------------------------------
http://wiki.debian.org/DebianEdu/Documentation/Lenny//Installation
FIXME: probably each paragraph on this page needs to be (slightly) rewritten for lenny.
FIXME: describe PXE installation here, if its only two sentences, then they should be here.
FIXME: path to preseed file location missing
----------------------------------
[...]
====================
24 FIXMEs left to fix
====================


I'm quite happy with the result, now we we just need to fix those FIXMEs :-)

The same tools will probably be used for the illustrated Lenny installation guide and maybe others. I've described the requiered structure for such a manual on wiki.d.o in an email to debian-boot (as the discussion about that guide happened there), in case you are interested.

In mostly unrelated news, I've started running everyday again six days ago (slowly running a bit further each day) and yesterday I've also started with doing gymnastics. It was high time to realize and to change some stuff in my life, and it looks like I finally heard the call. And doing sports is by far not the only thing I want to do very differently again, it's just the most visible atm and it's also quite easy to do. Also I can feel it in my legs today :-) Now I "just" need to keep going forward, change is a continuous process, and nothing to be done with. Ever. The day I stop changing myself, the day I stop learning, I consider myself to be dead. I'm glad I woke up, thanks for contributing to making me wake up and for bearing with me sometimes.

1 June 2009

Stephan Peijnik: sphinx-aware Enums in Python

As I promised to keep you updated on recent developments on update-manager I am writing this article. Just as a disclaimer: I am not going to write about any recent developments here, but would rather like to point at a piece of code I added to update-manager that could be useful in other applications too. Now, as the title suggests there are sphinx-aware Enums in update-manager. Enums are common constructs in other programming languages like C and allow simple creation of constants with, for example, ascending values (first constant has value 0, second has value 1 and so on). Python unfortunately does not include support for Enums itself, but I found it rather easy to write classes that emulate such a construct. Nothing is new about Enums in Python and there are probably quite a few different implementations out there, but I believe mine is different. The sphinx-aware part means that my implementation automagically updates the docstrings of the created instances and thus allows sphinx autodata method to include sensible information in generated API documentation. I could go on writing about and praising my method, but I believe a short example gives you a better idea how my implementation works and what I wanted to achieve with this. Have a look at this page, which is part of update-manager s new API documentation. You should see rather well-looking documentation of the UpdateManager.Backend.RELOAD_CACHE_STATUS NegativeEnum, the defined constants, their values and some additional information about each value now. Still, nothing too fancy, HTML documentation generated from docstrings. What makes this special is the code from which it was generated:
RELOAD_CACHE_STATUS = NegativeEnum(
  BEGIN = "Started reloading package cache",
  DONE = "Finished reloading package cache")
This not only gives us a RELOAD_CACHE_STATUS enum, along with the RELOAD_CACHE_STATUS.BEGIN and RELOAD_CACHE_STATUS.DONE, but also some documentation, included in RELOAD_CACHE_STATUS docstring, that can be used by sphinx. You can find the Enum code, which is rather short and should be quite easy to understand, here. I hope you find this code as useful as I do.

Gustavo Noronha Silva: My first patch to WebKitGTK+ committed!

Well, not really my first patch. But the first thing I tried to mess with when I first started looking at WebKitGTK+ was the WebKitNetworkRequest object, because I was fancing the idea of writing stuff such as HTTP transactions monitoring, and things like that. So I wrote a big patch which exposed the internal WebCore object (ResourceRequest) fully through our own object. That was back in early 2008. We have come a long way since, and through all these months I got a broader perception of what kind of APIs we need, and how WebCore works. We also decided on going soup-only, which had a huge impact on what the final patch actually looks like. The patch which finally got committed this week is, how can I put it, VERY different from what I had originally written. You can take a look at the long discussions about it in the bug report I used to track progress. I think I should point out that Marco Barisione and Christian Dywan were crucial in helping me get going with my contribution to WebKit at that time. What this change gives us is basically the fact that a WebKitNetworkRequest now carries more than just the URI for the request (it actually carries with it a reference to the SoupMessage that will be used later in the request processing, which we are planning to expose in the near future), meaning that when WebKit API gives you a request, and you use it to cause a new load (for, say, opening in a new tab), you still get all the headers that were supposed to go with the request, so you don t lose things such as, for instance, Referer. So, now, after more than 5 years, the bug that complained that Epiphany did not set Referer (and Galeon before that) for new tabs is finally closed. By the way, this problem has been fixed for Mozilla s browser back in 2002, but the embedding API is still buggy up to now. There is still hope, since there s an attached patch that fixes the issue to be reviewed, and landed. If anyone is reading, it might be a good oportunity to get this fixed in there as well, so that users of applications that use Gecko s embedding API can also benefit!

31 May 2009

Stefano Zacchiroli: turbogears 2 packaging - take 2

TurboGears 2 packaging - status update Brief status update about my TurboGears 2 packaging efforts, after some evening work of today: Here is my ex-virgin /usr/local/lib/python2.5/site-packages/ as it looks now:
    zack@usha:~$ ls /usr/local/lib/python2.5/site-packages/ -1
    AddOns-0.6-py2.5.egg
    BytecodeAssembler-0.3-py2.5.egg
    Catwalk-2.0.2-py2.5.egg
    easy-install.pth
    Extremes-1.1-py2.5.egg
    PEAK_Rules-0.5a1.dev_r2582-py2.5.egg
    prioritized_methods-0.2.1-py2.5.egg
    sprox-0.5.5-py2.5.egg
    SymbolType-1.0-py2.5.egg
    tg.devtools-2.0-py2.5.egg
    tgext.admin-0.2.4-py2.5.egg
    tgext.crud-0.2.4-py2.5.egg
    TurboGears2-2.0-py2.5.egg
    tw.forms-0.9.3-py2.5.egg
    zope.sqlalchemy-0.4-py2.5.egg

At this point, it should be already possible to install the 2 main eggs composing TurboGears 2 (tg.devtools and TurboGears2 itself) relying only on Debian-package dependencies. ... modulo some "details": This evening's motto: ci siamo quasi. Next week I'll be pretty busy, but I guess some night work (or some of you, fellow readers :-) ) will come to the rescue.

Next.

Previous.