Search Results: "tach"

22 November 2010

Michal Čihař: Strange Monday

Today was quite strange day for me - at the morning I felt quite bad so I took sick day to rest a bit. During afternoon I turned on the computer to see announcement that Novell agrees to be bought in $2.2b deal. As this is company where I work, it of course has attracted my attention. Novell was bought by Attachmate, a company with one quarter of our employees, and over a third of our revenue, what sounds strange. And this is the first time I hear of this company... The information is now very scarce (we as employees were not really given more information than is available publicly), so all what remains to people is to speculate. What does it mean for openSUSE? What is the "certain intellectual property" transferred to CPTN Holdings LLC (owned by Microsoft Corp.)? And some people just comment on current situation of Novell and some of it's products :-).

Filed under: Suse 1 comments Flattr this!

Petter Reinholdtsen: Migrating Xen virtual machines using LVM to KVM using disk images

Most of the computers in use by the Debian Edu/Skolelinux project are virtual machines. And they have been Xen machines running on a fairly old IBM eserver xseries 345 machine, and we wanted to migrate them to KVM on a newer Dell PowerEdge 2950 host machine. This was a bit harder that it could have been, because we set up the Xen virtual machines to get the virtual partitions from LVM, which as far as I know is not supported by KVM. So to migrate, we had to convert several LVM logical volumes to partitions on a virtual disk file. I found a nice recipe to do this, and wrote the following script to do the migration. It uses qemu-img from the qemu package to make the disk image, parted to partition it, losetup and kpartx to present the disk image partions as devices, and dd to copy the data. I NFS mounted the new servers storage area on the old server to do the migration.
#!/bin/sh
# Based on
# http://searchnetworking.techtarget.com.au/articles/35011-Six-steps-for-migrating-Xen-virtual-machines-to-KVM
set -e
set -x
if [ -z "$1" ] ; then
    echo "Usage: $0 <hostname>"
    exit 1
else
    host="$1"
fi
if [ ! -e /dev/vg_data/$host-disk ] ; then
    echo "error: unable to find LVM volume for $host"
    exit 1
fi
# Partitions need to be a bit bigger than the LVM LVs.  not sure why.
disksize=$( lvs --units m   grep $host-disk   awk ' sum = sum + $4  END   print int(sum * 1.05)  ')
swapsize=$( lvs --units m   grep $host-swap   awk ' sum = sum + $4  END   print int(sum * 1.05)  ')
totalsize=$(( ( $disksize + $swapsize ) ))
img=$host.img
#dd if=/dev/zero of=$img bs=1M count=$(( $disksize + $swapsize ))
qemu-img create $img $ totalsize MMaking room on the Debian Edu/Sqeeze DVD
parted $img mklabel msdos
parted $img mkpart primary linux-swap 0 $disksize
parted $img mkpart primary ext2 $disksize $totalsize
parted $img set 1 boot on
modprobe dm-mod
losetup /dev/loop0 $img
kpartx -a /dev/loop0
dd if=/dev/vg_data/$host-disk of=/dev/mapper/loop0p1 bs=1M
fsck.ext3 -f /dev/mapper/loop0p1   true
mkswap /dev/mapper/loop0p2
kpartx -d /dev/loop0
losetup -d /dev/loop0
The script is perhaps so simple that it is not copyrightable, but if it is, it is licenced using GPL v2 or later at your discretion. After doing this, I booted a Debian CD in rescue mode in KVM with the new disk image attached, installed grub-pc and linux-image-686 and set up grub to boot from the disk image. After this, the KVM machines seem to work just fine.

13 November 2010

Julien Blache: pommed v1.35: October 2010 MacBook Air

I ve just release pommed v1.35, adding support for the October 2010 MacBook Air machines. Kernel support for these machines has been submitted during the 2.6.37-rc cycle, so it will appear in 2.6.37 or 2.6.38 depending on maintainers, merge window and patch readiness. The machines have new keyboard assemblies (WellSpring IV and IVa) requiring new quirks in the HID layer, new trackpads, need sound & applesmc configurations of their own and the backlight module needs to know about them. So, make sure your kernel has all of that, otherwise your machine will be hard to use and pommed will not work at all. Update: #603395 filed against linux-2.6 with all the needed patches attached. It looks like we ll have all of this in Squeeze, thanks to our kernel team.

9 November 2010

Matt Zimmerman: Management and information distortion

It ain t what you don t know that gets you into trouble. It s what you know for sure that just ain t so
attributed to Mark Twain
There is a lot that I don t know about what goes on in my organization. This isn t only because I can t observe everything, or because it s too complex, or because I make mistakes. These are all true, of course, but they re also obvious. Much more devious is the way the flow of information to me is distorted. It s distorted by me, and by the people around me, whether any of us are aware of it or not. This is most apparent in considering how people feel about their managers: this is why I have a deeply flawed view of what it s really like to work for me. My theory is that power bends information like gravity bends light. The effect is more pronounced with people of greater mass (more authority), and lessened with distance (less direct influence). The more directly you influence someone else s fate, the more it is in their self-interest to be guarded around you. This means that the people closest to you, who you receive the most information from, may have the most difficulty being open with you, especially if it s bad news. It also means that the higher your standing in the corporate hierarchy, the more influence you wield, the more people are affected by this. Pretty scary, right? Some managers respond to this terrifying reality by trying to collect more information. They ll quietly cross-check what people are telling them, asking people in different levels of the organization, routing around managers, hoping to get the real story . This usually backfires, because it signals distrust to the people involved and makes the distortion worse. Another common response is to check in constantly, trying to monitor and control the work as closely as possible (so-called micro-management). This is even worse; not only does it signal distrust, but managers who do this become more personally attached to outcomes, and lose perspective on progress and quality due to information overload, self-enhancement bias, and neglect of managerial work. The more it becomes your work rather than the team s, the harder it is to see it objectively. So what s a better way to respond to this phenomenon? Here s what I try to do: I was inspired to think and write about this today after listening to Prof. Robert Sutton s speech at the California Commonwealth Club, which Lindsay Holmwood shared with me.

John Goerzen: A Scary Day, and A Walking Miracle

I had been planning to write today about my great uncle Milt Goerzen. Milt passed away last Thursday after a long struggle with dementia, and his funeral was this morning. I was there, and was inspired by a few things I heard. But that will have to wait, because today brought one of those few moments in life that s a sense of an impending possible great loss. I can remember two others: one was when Terah passed out, and the other was when we heard that our place was on fire and our house had burned down (it turned out the house hadn t, but much of the rest had). I got a call during Milt s funeral. I didn t answer because I was, well, at a funeral, and the phone was on vibrate. When I had the chance to check the voicemail, it went something like this: I think we have an emergency with Jacob. He got run over by a tractor. He says he s OK, but I m taking him to the doctor right now. I tried to return the call, but cell phone reception wasn t cooperating. The most I got was he s OK . It s hard to describe how a moment like that feels. My mind jumped to telling Jacob I love you , and how lately when he hears that, he will snuggle in for a big hug, and say, Dad, I love you toooooooooo! On the one hand, I heard the he s OK part, and on the other hand I couldn t forget the tractor running over him part, and my mind leapt at the worst. It turns out that, while I was at the funeral, Jacob had been standing on his usual spot on the tractor, sort of to the side of the driver. He was enjoying himself like usual. The tractor hit a large hole that wasn t really visible. The combination of the jolt and the dip the tractor took towards Jacob s side knocked him off and he went directly under the big rear wheel before the tractor could be brought to a stop. I caught up with him and his grandpa after he had seen the doctor and just as he was being admitted to the hospital. He saw me and crawled over, making his sort of sad and scared sound he sometimes doesn t want to verbalize things when he s in that mood. I held him close and he seemed to appreciate it. He had to have blood drawn, and he was scared of that. I remembered his inquisitive mind, and reminded him how much he liked watching the tube fill up with blood last time he had a blood test (which he calls a blood shot ). That wasn t helping, until the actual blood test started. He cried when the needle went in, but then calmed down as the nurse, getting into the act, pointed out that there was blood filling up the tube. Hmmm! said Jacob. Then she gave him a band-aid. It has an airplane, said the nurse. Um-hmm! said Jacob. I pointed out that it looked like the airplane we were on when we flew home from New York. Jacob got a big smile and said, Yes, it IS that one! He got a sticker there too. Then it was off for an x-ray to check for broken bones and a CT scan to check for internal injuries the tractor had gone right over his abdomen. He had to get an IV at the CT scan, which he certainly didn t like. After it happened, however, he found it very interesting especially when the nurses explained that they would give him a drink through the hose attached to his hand. After that, we went to his room, with orders for him not to eat or drink anything until it was clear he didn t have digestive problems. While we waited at various steps along the way, Jacob wanted to sit on my lap and watch train videos on YouTube on my phone. He loves train videos, and brought my phone s battery nearly to depletion through the course of the afternoon. Jacob eventually seemed to get back to a bit of his usual self. At one point, while Terah had made a run home to pack an overnight bag and grandpa ran some errands of his own, Jacob wanted to leave the room. He had gone exploring in the hospital with me before: when Oliver was born, and when Terah had her thyroid surgery. So this was something he just associated with the hospital. That and lemonade, which is free any time of the day or night in the cafeteria. So we went exploring, even ventured outside into a courtyard for a bit. He was walking fast and seemed good. We had several visitors: grandparents and his aunt and uncle. Jacob got a stuffed rabbit and a colorful bug box with windows (for putting bugs inside for observation). Eventually the doctor came by and gave us the results: the x-rays showed no problems. The labs showed some elevated liver enzymes, which he expected, but no serious trouble. The CT showed contusions on his lung and bruising on his heart which would heal completely in time. He allowed Jacob to have a liquid supper (so I quickly got him the lemonade he had been wanting while the nurses got him some Jello). The doctor examined Jacob, pushing at various places, asking Does it hurt here? No. Does it hurt here? No. Here? No. Are you hungry? Yes. Does it hurt here? No. He gave me a look that said: really? It doesn t hurt ANYWHERE? What could I do but shrug my shoulders? Jacob has some abrasions on his face, arms, and back, which will probably eventually hurt (and sure enough, about 10 minutes later he started getting a little pain when he tried to move, which the doctor checked out) Then the doctor said, I hope you know you have a walking miracle today. This is just amazing. You have some thanking to whatever guardian angels you like tonight all I can say about this is that the Lord must have had some other plan for him. There s no way he could have survived that. Jacob s doctor is one that we really respect: he s scientific in his analysis, cites studies as a matter of routine, doesn t prescribe antibiotics for things that he knows they have a small chance of helping, is common-sense about not over-treating things and yet always engaged in an emergency. That little speech from him was something I d never expected to hear from him. He went on to add that I always visit my sickest patients first. You were my last visit this evening, so that should tell you something. Any other kid as healthy as he is, I might discharge already but I m just not justified doing that with a boy that s, well, been driven over by a tractor this morning. He also wanted to monitor Jacob s progress throughout the coming day, especially his digestive system. They wanted to measure his urine output, which he, predictably, found to be very interesting. Terah said I think it is about 150 ml. Jacob said, No mom, it is closer to the two hundred line. Me: Since when does Jacob know about the number 200? Terah: I don t know . he s 4, where would he have gotten it? Between that, and using every opportunity to tell people that there were not one but TWO red light switches in the x-ray room, Jacob s definitely himself in some ways already. So, that feeling of some impeding great loss is gone, replaced by being more than a bit overwhelmed by how fortunate we were today. We also appreciate all the help we ve had with Jacob and Oliver today.

5 November 2010

Vincent Sanders: Keeping kindling dry

I, along with a great number of people I know, now posses a 3rd generation Kindle. It seems Amazon have found a feature set and price point which makes this device a winning solution.

My bookshelf complete with covered kindle
I did look at a huge number of alternatives like the Sony PRS600 and others but they were all more expensive than the 110 for the Kindle and did not have enough features to make a compelling argument for spending more.

Yes it has DRM. Yes it "only" supports PDF, MOBI and mp3. Yes it will not win any style or usability awards. But I went into this eyes open the device is "good enough".

The device lets me read books from a reasonable display. The integration with amazon.com is so seamless it poses a serious danger to my bank account. I should expand on that last point :-) Amazon have got the whole spending money for a book thing executed so well that you do not think twice about a couple of pounds here and there, this soon adds up. I have set myself a rigid budget.

My main complaints are really just niggles:

  • Another different USB connector! Wahh, I thought everyone had agreed on mini USB? seems that I now have to have yet another lead for micro USB

  • The commercial book selection is a bit limited and missing a surprising number of popular titles. Some of this appears to be the publishers and authors simply clinging to their old business model. I fear some of them might not survive and early indications are they are behaving like the music industry did...Guys you are selling an infinite good a scarcity model is going to fail!

  • The price of some of the books is absurd...they are asking hardback prices for the electronic edition! Seriously? how on earth can that possibly be justified? I can see that a hardback book with its print run could cost 5 per physical item (going from hulu print on demand prices as a worst case) plus shipping and stocking fees. So how can you possibly justify charging the same price for a pile of bits where none of that applies? Also the pile of bits cannot be lent or sold, not impressed.

  • eBook formatting is generally dreadful. I do not know who is mastering these books but they need to do a better job. If they tried to pull this in the physical editions they would get a seriously large number of returns.

  • I still have to pay for whispernet delivery fees even though, because its the wi-fi model, I am providing the bandwidth myself. I can see that differentiating between 3G and wi-fi delivery is a bit hard for them though.
However my one and only real complaint with the offering as a whole is the astronomical asking price for the leather cover. The cover is currently 25% of the price of the kindle itself! ( 30 cover 110 kindle) which is just silly. It is a pretty nice cover and the clever clip attachment means it does offer an integrated solution to protecting your kindle, but not 30 nice.

Kindle in a sock cover
So my lovely wife (her kindle was bought with the cover) made me a sock for mine. This is great for casual round the house usage to stop me scuffing the screen but was a bit lightweight for protecting the kindle when out and about.

One day last week I had an idea. I would make my own protective cover by crafting something I had wanted to do for ages. And the (unoriginal I am sure) project of a hollowed out book for housing my kindle was implemented.


My hollowed out book kindle cover
A quick Google later and I had a set of plausible instructions to follow. I used possibly the most out of date book ever (published 1981) on electronic test equipment, partly because it was a ex library sell off book which cost 10pence back in 1995 but mainly because it was the right size to just enclose the kindle without adding to much size.

I learnt a couple of things doing this:
  • Do not let your pva (white) glue mix get too runny, you want it fluid enough to be easily absorbed but not watery - this is important because otherwise the paper absorbs too much water and crinkles
  • Do not use a book where the binding has gone bad already and select a "clean" book. The spine of this book was yellowed and cracking before I started. This means the book spine simply cracks open at the hollowed out bit and it is very obvious.
  • Work out where the "solid" part at the back is going to be and treat that separately so you get a nice solid base at the back of the hole. In mine its not all stuck together and is a bit wavy. Do be sure you left enough depth for the kindle though.
  • Take your time and be careful with the glue, it is amazing how obvious even a simple splash of glue in the wrong place is. Use a small brush for this a paint brush is fast but sloppy.
  • Measure carefully and cut only a few pages at a time, it takes a bit longer but looks much better. Also I did not drill the corners of my hole which means they are a little scruffy.
  • Use the sharpest thinnest knife you can, this really helps. I started with a small stanley knife but switching to my hobby scalpel gave much better results.
  • If you have some, use woodworking clamps to clamp a bit of timber (I had some offcuts of shelving) around the book to compress it while the glue dries. Do not clamp the spine if you can avoid it. This method ensures:
    1. Heavy things do not fall off the book while it dries.
    2. An even strong pressure is applied.
    3. The book does not warp or bend while the glue dries
All in all I kinda like the results and I think I will try again with a more modern book where the spine is not so broken to begin with.

4 November 2010

Gintautas Miliauskas: Living a monastic life for 10 days

About a month ago, at the end of August, I finished a 10-day Vipassana meditation course. This was probably one of the more extreme activities I have ever participated in, and it's well worth a blog post. I found out about the course in a ridiculously trivial way, by following a link in a Reddit comment (I wonder if I could track down that comment...). The website referenced by the comment contained (almost) no new-agey mumbo-jumbo and looked legit in general. I also appreciated the fact that this was a relatively serious and intensive course, which should be enough to form a reasonably founded opinion on meditation in general. When learning sporadically, in small bits, it is hard to say whether the material itself is no good, or you just do not understand it yet and need to study more; I was quite skeptical towards the practice, but wanted to give it fair trial. I was quite impressed that there was a course available in Lithuania, a few hours by train from where I live. Finally, the course was free (by tradition Vipassana is taught without monetary compensation). I went ahead and signed up for a standard introductory 10-day course. Vipassana (also called insight meditation) is a meditation technique allegedly coming back from Gautama Buddha himself (well, all the traditions like to claim that origin...). It has been experiencing a renaissance, partly due to an organization set up by a meditation teacher S. N. Goenka which has founded meditation centers all over the world. The essence of Vipassana is a method of teaching your mind to act instead of merely reacting to outside stimuli such as pain, anger of other people or hardships. The technique provided is to monitor your sensations, watch them with equanimity and suspend any reaction, and slowly it sinks in that all things are temporary and you can choose what to react to and how. That's the basic idea; I don't want to go deep into exposition of Vipassana as there is plenty of information about that (also at the same time the information is almost useless because you have to experience it to really understand it). Instead, I will sure some of the more personal remarks and experiences. The course took place in an cottage near Kretinga, housing around 50 people. The living conditions were absolutely great, and this would have been a true holiday if not for the regime and the rules. The day would start very early, at 4 AM (ending at around 9:30 PM), and we'd do about 12 hours of meditation in total inbetween, with occasional breaks, but the most gruesome part is that no communication at all was allowed with anyone except the manager of the camp (and the teacher during a specified time). That gets to you after a few days, but still, there are people around you, so it's bearable; on the other side, the senses (touch, smell) become very acute. The food was taken care of by volunteers (students who have finished the course), and I could say it was quite good actually. The goal, of course, was to keep the environment from interfering with meditation, and I think it was done very well. The presentation of the actual technique also did not disappoint. Each day a new step would be introduced, with the whole day to practice before moving on. Looking back, the pacing worked well. Every day in the evening there were lectures on theory. They were somewhat informative, but also sometimes annoyingly primitive and verbose. The little mistakes, holes in logic and slight doses of mumbo-jumbo almost drove me nuts by the middle of the course, until I learned not to react to them. Despite the shortcomings of presentation, the simplicity and lucidity of the practice and lightness of theoretical baggage really appealed to me. The whole organisation in general gave the impression of complete transparency, with no strings attached, no financial interests in play and no agitation for further involvement. While there are many meditation techniques, I am happy that I've gone with Vipassana in particular for one reason: Vipassana meditation uses no artificial tools to help you concentrate, such as mantras, visualisations, counting, etc. Such methods make concentration much easier, but they also create a dependence on the methods themselves. I appreciate the purity of Vipassana in this regard. Not everything in the practice is roses though. First, a particular worldview supported by Vipassana is presented as "scientific" and supposedly "the right way to live", and if even if you don't agree, "the truth" of Vipassana will become obvious to you with time. This is a distinctive mark of ideologies. The thing that makes everything break is the reincarnation, which is generally assumed as true, even if it's not shoved down the student's throat. Every rationalization of a world view has a "white lie" (usually related to the concept of eternity somehow) at the core, and in this context reincarnation is it. Given what we know now about the relationship between the mind and the body, reincarnation is absolutely ridiculous and completely untenable, and that breaks all "moral" reasoning for practicing meditation as opposed to doing something else. I'm not the first to bring up this problem, there's plenty of material about it online. The second slippery idea is that the concept of "negative happiness" is central in Vipassana, that is: happiness is defined as lack of suffering. This point is not that unreasonable actually, from personal experience I could indeed call the state of non-suffering happiness, but there is definitely something missing when compared to the state of mind when I'm truly, positively happy. Whether you consider that something important or not, it's definitely there. Third, Vipassana suggests that it is only you who is at fault when your inner state is disturbed; the world affects you as much as you let it, and in order to find happiness you should learn to control the "interface" rather than the outside world, which will usually not behave as you want. This may be correct, but sometimes it could just be easier to fix the world rather than change yourself, and I have the suspicion that it this is much more frequently the case in the modern world compared to the pre-modern environment. (This is one of the points which break when reincarnation is rejected, as with reincarnation you have the whole eternity to fix yourself.) While the complaints are serious, they do not mean complete rejection of Vipassana but rather integration among the various other techniques available. The actual meditation technique is still great for gaining and maintaining mental composure, reducing anxiety and improving well-being. Now, if I could only get used to meditating regularly... If you have the chance, I highly recommend you try out an introductory 10-day course. There is little to lose and a lot to gain. And if you do go ahead, I have two hints. First, do not even think about leaving the course before it's over. Any hardships are temporary and will be overcome quickly. Second, use the time with the teacher, those interactions were very helpful to me. Also, given the "noble silence", talking to someone once in a while will not hurt.

29 October 2010

Rapha&#235;l Hertzog: Nice OpenOffice.org template for Debian presentations

OpenOffice.org Impress Template for Debian Presentations While preparing for the upcoming mini-debconf Paris, I noticed that we don t have any good presentation template for OpenOffice.org Impress. I spent a few hours browsing Debian presentations put online by many speakers and was unable to find one that would suit me. This situation was clearly unacceptable and I decided to spend a few hours to fix this. I selected a very nice wallpaper created by Alexis Younes, used The Gimp to add a translucent white box so that the text can still be read, and combined all this in a OpenOffice.org Impress template. Click here to download the template. You can also get the Gimp XCF file for the background image. By the way, the same wallpaper has been used by Sam Hocevar to create nice-looking Debian business cards. PS: I contacted Alexis Younes by mail and he agreed to put the wallpapers under GPL-2+. It has been clarified on his webpage.
Follow me on Identi.ca, Twitter and Facebook.

Flattr this Share/Bookmark 6 comments Support my work

26 October 2010

Sergio Talens-Oliag: Debian Squeeze, PowerPC and the Linux Containers

Two kids, their really busy mother and my paid job leave me without much time to blog or do Debian related work lately (well, at least on my free time, I do Debian related things at work, but mostly as a user, not as a developer). Anyway, a couple of weeks ago I decided it was time to upgrade my home servers to Squeeze and I did it, but it was harder than expected. At home I'm using two old laptops as servers, an old Aluminium PowerBook and an Asus EeePC; the Asus was installed to replace an older PowerBook (a really old one, BTW) that I was using as home server since my father gave it to me. The plan was to use OpenVZ on the Asus to move all the PowerPC services to a couple of Virtual Environments, but as I wanted to migrate and change almost all the services I never got enough free time to finish the job and when the old PowerBook hardware failed I replaced it with another PowerBook that I wasn't using anymore, but instead of reinstalling the machine I did a clean Lenny install using a kernel with support for linux-vserver (OpenVZ does not work on PowerPC) and transformed the old machine installation (it was an Etch installation at the time) into a Virtual Private Server that run on the new hardware. Having both systems running I upgraded the VPS to Lenny and, as usually happens, left the things as they were without consolidating the services into only one machine, as I initially planned. With this state of affairs I upgraded the Asus to Squeeze without much trouble (in fact I installed a kernel without OpenVZ support, as the services I use from this laptop were running on the host and not on a VE) and did the same with the PowerPC host, but to my surprise the linux-vserver VPS failed to start with a message that seemed to imply that the VServer support was not enabled. I should have filled a bug on the BTS then, but as I looked into how to solve the issue I found bugs saying that the meaning of the message was that I had no support for linux-vserver and I needed to start the VPS ASAP, as it was the machine that runs my SMTP server. Before doing a restore of my last backup I did some digging and found a lot of messages recommending to move OpenVZ and Linux-VServer virtual machines to LXC and decided to give it a try. First I built a container on the Asus and it worked OK, after that I did the same on the PowerPC, but the script failed; luckily the patch was trivial, the problem was on the /usr/lib/lxc/templates/lxc-debian script; it uses arch to get the Debian architecture, but for powerpc it gives ppc instead of powerpc, so it needs to be fixed on the script (Note to self: I have to submit bug + patch to the lxc package to fix it). After creating this container and trying it I tried to boot my old VPS with a LXC configuration: After a couple of tries I noticed that the system was not booting because it was missing the devices files needed; to fix it I copied the /dev directory of my first LXC test and using a chroot I also removed the udev packages from the container. After that last changes the machine booted as expected and all services were running OK. To summarize, I decided to do the move to LXC and fixed the configuration to boot the virtual machines on each restart: I know that LXC is still missing some functionality (I hate the way the container stop function kills everything instead of doing a run-level change, I guess I'll be using hacks until I move to a newer kernel with the proper support enters into Debian), but having the code on the mainline kernel is a great bonus and the user level utilities are good enough for my home needs... and I hope they'll arrive to a point where we'll be able to migrate the OpenVZ containers at work (we are using Proxmox and the support of the OpenVZ patchset is starting to worry us). On my next post: The Freak Firewall or The Story of a HA Firewall based on OpenBSD's pf running on Debian GNU/kFreeBSD hosts.

22 October 2010

Erich Schubert: Gnome panel applet alignment

Dear Gnome people. Is there a reliable way to right-attach panel applets? May laptop screen and my external monitor have different resolutions, and I havn't found a reliable way (except making two panels) of getting some of my applets to stick to the right. I usually keep my launchers on the left, while vairous system status icons on the right part. But when switching to a higher resolution, at most one will move to the right end of the panel at the new resolition, while the others just stay in place (i.e. left-attached at a given pixel position). There are so many smart layout managers, GTK pretty much always uses flexible layout managers, why is the Gnome panel relying pixel offsets? It has been suggested to me a couple of times that I could achieve this via gconf. However, since the gconf changes are not reflected at runtime but frequently overwritten I did not get this to work reliably even just for two applets. Thank you. If you have any comments, please email me via erich () debian org. On a side note, this is also the first true post to my new blog. :-)

14 October 2010

Russell Coker: Links October 2010

Bruce Schneier wrote an insightful post about why designing products for wiretapping is a bad idea [1]. It seems that large parts of the Internet will be easy to tap (for both governments and criminals) in the near future unless something is done. The bad results of criminal use will outweigh any benefits of government use. Sam Watkins wrote an informative post about Android security [2]. Among other things any application can read all stored data including all photos, that s got to be a problem for anyone who photographs themself naked Rebecca Saxe gave an interesting TED talk about how brains make moral judgements [3]. Somehow she managed to speak about the Theory of Mind without mentioning Autism once. The Guardian has an amusing article by Cory Doctorow about security policies in banks [4]. He advocates promoting statistical literacy (or at least not promoting a lack of it) as a sound government policy. He also suggests allowing regulators to fine banks that get it wrong. Steven Johnson gave an interesting TED talk about Where Good Ideas Come From [5]. It s a bit slow at the start but gets good at the end. Adam Grosser gave an interesting TED talk about a fridge that was designed for use in Africa [6]. The core of the Absorption Refrigerator is designed to be heated in a pot of water in a cooking fire and it can then keep food cool for 12 hours. It s a pity that they couldn t design it to work on solar power to avoid the fuel use for the cooking fire. Josh Silver gave an interesting TED talk about liquid filled spectacles [7]. The glasses are shipped with a syringe filled with liquid at each side that is used to inflate the lenses to the desired refractive index. The wearer can just adjust the syringes until they get to the right magnification, as there are separate syringes the glasses work well with people who s eyes aren t identical (which is most people). Once the syringes are at the right spots the user can tighten some screws to prevent further transfer of liquid and cut the syringes off to give glasses that aren t overly heavy but which can t be adjusted any more, I guess that a natural extension to this would be to allow the syringes to be re-attached so that the user could adjust them every year to match declining vision. One thing that this wouldn t do is counter for Astigmatism (where the lens of the eye doesn t focus light to a point), but I guess they could make lenses to deal with a few common varieties of Astigmatism so that most people who have that problem can get a reasonable approximation. The current best effort is to make the glasses cost $19, which is 19 days salary for some of the poorest people in the world. Glasses in Australia cost up to $650 for a pair (or a more common cost of $200 or about $100 after Medicare) which would be about one day s salary. Eben Bayer gave an inspiring TED talk about one of the ways that mushrooms can save the planet [8]. He has designed molds that can be filled with Pasteurised organic waste (seed husks etc) and then seeded with fungal spores. The fungus then grows mycelium (thin fungal root fibers) through the organic waste making it into a solid structure which fits the shape of the mold. This is currently being used to replace poly-styrene foam for packaging and can apparently be used for making tiles that are fire retardant and sound proof for constructing buildings. The main benefits of the material are that it can be cheaply made without petrochemicals and that it is bio-degradable, I m not sure how the bio-degradable part would work with constructing buildings maybe they would just replace the panels every few years. Annie Lennox gave a TED talk about her Sing foundation to care for women and children who are affected by AIDS [9]. She describes the effect of AIDS in Africa as Genocide. Robert Ballard gave a very informative TED talk about exploring the oceans [10]. This was one of the most informative TED talks I ve seen and Robert is also one of the most enthusiastic speakers I ve seen, it s really worth watching! We really need more money spent on exploring the oceans. Jessa Gamble gave an interesting TED talk which suggests that the best thing to do is to go to bed at about sunset and then have a couple of hours of relaxing time during the middle of the night [11]. Apparently the subjects of body-block experiments who live for a month in a bunker without natural light or access to a clock get better sleep in this manner than they ever had in their life and feel fully awake for the first time. World Changing is a blog that has a lot of interesting articles about climate change and related issues [12]. It s worth a read. Cynthia Schneider gave an interesting TED talk about how reality competition TV is affecting reality [13]. Shows that are derived from the American Idol concept are driving a resurgence in some traditional forms of performance art while also promoting equality among other things it s apparent that winning is more important than misogyny. The Ritual of the Calling of an Engineer is an interesting concept [14]. I think it would be good to have something similar for Computer Science. Benjamin Mako Hill wrote an interesting and insightful essay about Piracy and Free Software [15].

6 October 2010

Lior Kaplan: a very good day for bidi in openoffice.org

As a follow up on my report from last month about bidi status in openoffice.org 3.3, today was a very good day for bidi in openoffice.org. The short story: two important bugs were fixed for 3.3, and we now have the bidi keyword for IssueZilla system. It began with the fix to a cosmetic bug in the openoffice.org main screen which caused the icons to repaint improperly. While this isn t critical at all, it just looks really bad to have it on the main screen. And I don t want people to get the wrong impression. Thanks you Philipp Lohmann for fixing #97556.
Costmetic bug in oo.org RTL UI

Costmetic bug in oo.org RTL UI

The second bug was that AutoFilter isn t working for RTL sheets (regards whether the UI is LTR or RTL). This issue was reported yesterday and got fixed in 24 hours. Thank you Niklas Nebel for fixing #114944. It took us longer to isolate the bug than to get a patch for it. I wish this will happen more (: For closing, and in response to the bidi meta issue, a new keyword was created in the issuezilla: bidi. Till now, there was a bidi sub component in the UI, but this isn t always helpful as sometimes it s better to report against the actual component. The keyword will help us to better tag the issues for easy listing. The thank you list is long, as there were more than a few people behind the scenes today. I ll only mention Netanel, my partner to the Hebrew l10n team.
Filed under: Israeli Community, LibreOffice, Openoffice.org Tagged: bidi, openoffice

John Goerzen: Amateur Radio Excitement

I ve been keeping up with my amateur radio activities lately. The big news is that I passed the amateur extra exam at a hamfest in Wichita on Saturday. That s the highest level of amateur radio licensing available, and only about 17% of hams have it. I passed it with 100% correct, as I did with my other two exams as well. Pretty happy with that. I m also getting ready to get a radio installed in my car. My FT-857D, which I ve been using in the house, is really a mobile. I picked up antennas and cables for that at the Wichita hamfest. My brother, who is great with cars, will probably help me do that. I m excited about that. I also think I can get radio going on my bicycle. I need a half-wave vertical antenna to mount on it. Really the only challenge is how to attach that to the bicycle, as there isn t exactly a thriving antenna mount industry for bicyclists.

5 October 2010

Joachim Breitner: Multi-Pointer Zaz

A while ago, I found the nice arcade game Zaz. The goal is to sort rolling marbles by color to make them vanish before they fall down a hole. I enjoyed playing it in turn with my girlfriend, but it was not nice that one of us always had to wait and watch. Also, Zaz is quite hard and my girlfriend (who is better at the game) did not manage to finish all levels. So I thought, that it would be great if we could play the game together! I recently read that the version of the X server on my laptop supports XInput2 and thus multi-pointer-input, so I thought I give it a shot. The main problem with making the change was SDL, a very common library used by Zaz to interact with the system. The SDL code fetches the events from the X server, handles them (e.g. mapping button presses to unicode characters, remembering mouse positions to calculate relative movement). SDL itself does not know anything about multi-pointers, or the events generated by XInput2. So once I started to listen to XInput2 events, no regular events would come through any more and the game stops reacting. The SDL supports passing unknown X events in a SDL_SysWMEvent. This would have helped, but XInput2 passes its data in X s new GenericEvents where additional data needs to be fetched with XGetEventData before the next X event is handled. SDL does not know that and thus, when more than one event is waiting, the event data is lost before SDL passed them to the application. Therefore I completely bypass the SDL event handling and only use XNextEvent myself. This meant re-implementing some logic, especially relative mouse movements and keeping the mouse within the window, guided by the SDL code. I did not worry about text input, so you need to enter the name for the highscore with an unpatched Zaz :-). The game logic site was surprisingly easy to adjust to more than one player. Just replaced the Player object by an array of Player objects, and the game machinery still works. This is a sign of very good design, kudos to Remigiusz Dybka. At first, when the laser pointer bonus was picked up, only the first player would get it. I changed that so both players benefit from the bonus. It would make more sense if only the player who actually killed the bonus ball would get it, but that would be hard to track. In the end, the result is very satisfying. And together, we managed to finish the game at once. Enough words. Here is a demonstration of us two playing the first level, as a HTLM5 video (alternatively watch it on YouTube):
<video controls="true" height="480" src="http://www.joachim-breitner.de/various/zaz/zatlantiz.ogv" tabindex="0" width="640"> </video>
If you want to try it yourself, you can either grab the Debian packages (v0.2.9, source package and binary built for amd64), the patch against version 0.2.9 or the patch against version 1.0.0. Then you need to plug in two mouses and use the xinput command line program to create a new master and reattach one of the mouses to the second master, before starting the game. And of course, you need a partner (unless you want to play the game bimanually good luck). PS: Why is my Ogg/Theroa video, created with recordmydesktop, all green when uploaded to YouTube? I hat to locally convert it to MPEG4 first...

3 October 2010

Colin Watson: Pipeline library

When I took over man-db in 2001, one of the major problems that became evident after maintaining it for a while was the way it handled subprocesses. The nature of man and friends means that it spends a lot of time calling sequences of programs such as zsoelim < input-file tbl nroff -mandoc -Tutf8. Back then, it was using C library facilities such as system and popen for all this, and I had to deal with several bugs where those functions were being called with untrusted input as arguments without properly escaping metacharacters. Of course it was possible to chase around every such call inserting appropriate escaping functions, but this was always bound to be error-prone and one of the tasks that rapidly became important to me was arranging to start subprocesses in a way that was fundamentally immune to this kind of bug. In higher-level languages, there are usually standard constructs which are safer than just passing a command line to the shell. For example, in Perl you can use system([$command, $arg1, $arg2, ...]) to invoke a program with arguments without the interference of the shell, and perlipc(1) describes various facilities for connecting them together. In Python, the subprocess module allows you to create pipelines easily and safely (as long as you remember the SIGPIPE gotcha). C has the fork and execve primitives, but assembling these to construct full-blown pipelines correctly is difficult and error-prone, so many programmers don't bother and use the simple but unsafe library facilities instead. I wrote a couple of thousand lines of library code in man-db to address this problem, loosely and now quite distantly based on code in groff. In the following examples, function names starting with command_, pipeline_, or decompress_ are real functions in the library, while any other function names are pseudocode. Constructing the simplified example pipeline from my first paragraph using this library looks like this:
pipeline *p;
int status;
p = pipeline_new ();
p->want_infile = "input-file";
pipeline_command_args (p, "zsoelim", NULL);
pipeline_command_args (p, "tbl", NULL);
pipeline_command_args (p, "nroff", "-mandoc", "-Tutf8", NULL);
pipeline_start (p);
status = pipeline_wait (p);
pipeline_free (p);
You might want to construct a command more dynamically:
command *manconv = command_new_args ("manconv", "-f", from_code,
                                     "-t", "UTF-8", NULL);
if (quiet)
	command_arg (manconv, "-q");
pipeline_command (p, manconv);
Perhaps you want an environment variable set only while running a certain command:
command *less = command_new ("less");
command_setenv (less, "LESSCHARSET", lesscharset);
You might find yourself needing to pass the output of one pipeline to several other pipelines, in a "tee" arrangement:
pipeline *source, *sink1, *sink2;
source = make_source ();
sink1 = make_sink1 ();
sink2 = make_sink2 ();
pipeline_connect (source, sink1, sink2, NULL);
/* Pump data among these pipelines until there's nothing left. */
pipeline_pump (source, sink1, sink2, NULL);
pipeline_free (sink2);
pipeline_free (sink1);
pipeline_free (source);
Maybe one of your commands is actually an in-process function, rather than an external program:
command *inproc = command_new_function ("in-process", &func, NULL, NULL);
pipeline_command (p, inproc);
Sometimes your program needs to consume the output of a pipeline, rather than sending it all to some other subprocess:
pipeline *p = make_pipeline ();
const char *line;
line = pipeline_peekline (p);
if (!strstr (line, "coding: UTF-8"))
	printf ("Unicode text follows:\n");
while (line = pipeline_readline (p))
	printf ("  %s", line);
pipeline_free (p);
man-db deals with compressed files a lot, so I wrote an add-on library for opening compressed files (which is somewhat man-db-specific, but the implementation wasn't difficult given the underlying library):
pipeline *decomp_file = decompress_open (compressed_filename);
pipeline *decomp_stdin = decompress_fdopen (fileno (stdin));
This library has been in production in man-db for over five years now. The very careful signal handling code has been reviewed independently and the whole thing has been run through multiple static analysis tools, although I would always welcome more review; in particular I have no idea what it would take to make it safe for use in threaded programs since I generally avoid threading wherever possible. There have been a handful of bugs, which I've fixed promptly, and I've added various new features to support particular requirements of man-db (though in as general a way as possible). Every so often I see somebody asking about subprocess handling in C, and I wonder if I should split this library out into a standalone package so that it can be used elsewhere. Web searches for things like "pipeline library" and "libpipeline" don't reveal anything that's a particularly close match for what I have. The licensing would be GPLv2 or later; this isn't likely to be negotiable since some of the original code wasn't mine and in any case I don't feel particularly bad about giving an advantage to GPLed programs. For more details on the interface, the header file is well-commented. Is there enough interest in this to make the effort of producing a separate library package worthwhile? As well as the general effort of creating a new package, I'd need to do some work to disentangle it from a few bits and pieces specific to man-db. If you maintain a specific package that could use this and you're interested, please contact me with details, mentioning any extensions you think you'd need. I intentionally haven't enabled comments on my blog for various reasons, but you can e-mail me at cjwatson at debian.org or man-db-devel at nongnu.org.

27 September 2010

Steve McIntyre: Armel buildds and porter box hosted at ARM

One of the nice things that I've been involved with since starting to work at ARM in Cambridge is setting up newer, faster machines to help with the armel port. We have six machines hosted in the machine room here now: arne All of these machines are Marvell DB-78x00-BP development boards, each configured with a 1GHz Feroceon processor (ARM v5t), 1.5GB of RAM and a 250GB drive attached via SATA. They're nice machines, reasonably powerful yet (as with many ARM-based machines) they draw very very little electrical power even when working hard. These very boards were used for a while by the folks at Canonical to help build the Ubuntu armel port, but now we've got them. In terms of configuration, these machines are not quite fully supported in Debian yet, though. The kernels we're using are locally-built, based on the Debian linux-source-2.6.32 package but with a .config (marvell.config) that's tweaked slightly to add the support for these boards. There aren't any source changes needed, so I'm hoping to get support added directly in Debian, either as a new kernel flavour or (preferred) as a patch to an existing flavour. I've had conflicting advice about whether the latter is possible, so I'm going to have to experiment and find out for myself. UPDATE 2010-09-28: I've tested, and it seems that the boards will need a new flavour after all, as the config is incompatible with the closest other config (kirkwood). Ah well... I had no end of trouble trying to get make-kpkg do the right thing, so on advice from Ben I built the kernel using "make deb-pkg", a standard target in the Linux kernel's build system: fakeroot make -j2 deb-pkg DEBEMAIL=93sam@debian.org DEBFULLNAME="Steve McIntyre" KDEB_PKGVERSION=buildd23 Annoyingly, that wouldn't work when cross-compiling either so I had to build the kernel natively. To make the resulting kernel image package install properly (and, just as importantly, allow for future easy upgrades for the DSA folks), I also needed the following tweaks to the Debian system: Finally, I've tweaked the uboot config on the machines to use the uImage and uInitrd files that are generated:
Marvell>> setenv IDE ide reset
Marvell>> setenv loadkernel ext2load ide 0:1 0x2000000 /uImage
Marvell>> setenv loadinitramfs ext2load ide 0:1 0x3000000 /uInitrd
Marvell>> setenv bootboth bootm 0x2000000 0x3000000
Marvell>> setenv bootcmd setenv bootargs \$\(bootargs\)\;$(IDE)\;$(loadkernel)\;$(loadinitramfs)\;$(bootboth)
Marvell>> saveenv
And that's it, as far as I can see. I'll now wait for people to tell me what I've got wrong above... :-)

25 September 2010

Jonathan Wiltshire: The new, open Facebook

After the famous Facebook outage a few days ago, Facebook Engineering made a to be fair, reasonably detailed statement on what went wrong and how it affected the service. One particular comment attached to it drew my attention:
It s great to hear and see that big companies like Facebook are so open with what they do. That s rare, very rare. Thanks!
Huh? Did I miss some announcement of openness and freedom?
Comments<script type="text/javascript"> var flattr_wp_ver = '0.9.16'; var flattr_uid = '32970'; var flattr_url = 'http://www.jwiltshire.org.uk/content'; var flattr_lng = 'en_GB'; var flattr_cat = 'text'; var flattr_tag = 'blog,wordpress,rss,feed'; var flattr_btn = 'large'; var flattr_tle = 'jwiltshire.org.uk'; var flattr_dsc = 'The public face of jwiltshire'; </script> <script src="https://api.flattr.com/js/0.5.0/load.js?mode=auto" type="text/javascript"></script> flattr this!

Mike Hommey: eSATA FTW

I ve had external disks supporting all of firewire, usb and eSATA for a while now, but only recently got a machine supporting eSATA (as well as the two others). I was previously preferring firewire over usb, for good reasons: But I didn t expect this 3 years old disk (possibly more, I don t remember precisely) to perform that well over eSATA: (All results as given by hdparm -t) Interestingly, smartctl is unable to gather the vendor specific SMART attributes when the disk is attached on eSATA, while it can when on usb.

21 September 2010

Daniel Kahn Gillmor: hotmail thinks powerpc means mobile

Apparently, live.com thinks that any browser coming from a ppc architecture is a mobile device. This sucks for the users of the hundreds of thousands of powerpc desktops still in service. I don't use hotmail myself, but i do support people who use it. I set one of my clients up with debian squeeze on their PPC machine because all the proprietary vendors have basically given up on that architecture -- debian represents the best way to get modern tools on these machines (and other machines too, but that's a different argument). However, this client couldn't get to their hotmail account, despite using the latest version of iceweasel (3.5.12). They were directed to a crippled interface that didn't include the ability to attach files, and was a gross waste of the desktop screen space. It appears to be the "mobile" version of live.com's services. However, the same version of iceweasel on an i686 test machine could access the standard version of hotmail with no trouble. My friend jeremyb helpfully suggested fiddling with the User Agent string exported by the browser. Some experimentation shows that the presence of the string "ppc" within any parenthetical expression in the UA makes live.com show the crappy interface. You can try it yourself (if you have a hotmail account) on your x86 or amd64 machine by adding (ppc) to the default valule of general.useragent.extra.firefoxComment in about:config. Stupid stupid stupid. I'd like to have fixed this by overriding the browser's reported architecture (or simply by removing it -- why does a web server need to know the hardware architecture of my client?). But there doesn't appear to be a way to do that with the way that mozilla constructs the UA. Instead, i needed to add a new string key named general.useragent.override which is not exposed by default in about:config. This raises some questions: Any ideas?Tags: browser, hotmail, powerpc, ppc, useragent, wtf

19 September 2010

Joerg Jaspert: FTPMaster meeting, III - discovering new Restaurants for fun and profit

And there, another day come and passed, still no real breakage, only some small things here and there. We are doing something wrong, definitely. Ok, granted, providing everyone who has experimental in their sources.list with a free upgrade path due to us suddenly forgetting that apt actually really wants this NotAutomatic: yes flag in the release instead of just looking it up in our database, later on doing the same to all of the backports user (accidently, happens when you have identical codebases), does count enough for a small icecream. But we didn t have anything serious, which is great. Alex finished patching dak rm in a way that we can now actually close all bugs attached to a (source) package we remove and was thinking of enhancing it to actually also be able to close wnpp bugs attached to it (think of O: bugs for example). Mark had design work on g-p-s, which actually is how do we generate packages and sources and how to move the config sanely into a database . Sounds easy, but trust me, it isn t, when you consider all the special cases Debian has. He also jumped in helpfully whenever there was a question around some coding and stuff, at one time turning up with the insanity/genius/younameit code that allows us to transfer even more of dak.conf into the database. This gets us a good way along the way that should end up with a dak.conf consisting of only the database details and nothing else. My job today looked similar like yesterday. Merge code I got, eat, remove lots of values from dak.conf. This weekend besides totally missing out on Baklava, had us change our dak code quite a bit: 46 files changed, 982 insertions(+), 1060 deletions(-). Besides that we do have about 18 points on our meeting notes, a mail going off to one debian lists sometime the next days summarizing it a bit more.

Next.

Previous.