In just over 1 week, FOSDEM 2012 is being held in Brussels. This flyer (PDF) is a handy guide to the Red Hat folk who will be giving talks there. (Thanks Máirín Duffy).
In just over 1 week, FOSDEM 2012 is being held in Brussels. This flyer (PDF) is a handy guide to the Red Hat folk who will be giving talks there. (Thanks Máirín Duffy).
Here:
http://people.redhat.com/~rjones/libguestfs-RHEL-6.3-preview/
These are based on libguestfs 1.16.1.
In libguestfs 1.16 we added experimental GObject bindings and support for GObject Introspection. These are experimental because we may change them a little in future. They do allow you to access libguestfs from Javascript, specifically from gjs.
Here is an example program (fixed and updated):
const Guestfs = imports.gi.Guestfs;
function inspect (filename)
{
var g = new Guestfs.Session ();
//g.set_trace (true);
var optargs = new Guestfs.AddDriveOpts ({readonly: true});
g.add_drive_opts (filename, optargs);
g.launch ();
var roots = g.inspect_os ()
if (roots.length == 0)
printerr ("inspection: no operating systems found in", filename);
else {
for (var i = 0; i < roots.length; ++i) {
inspect_root (g, roots[i]);
}
}
}
function inspect_root (g, root)
{
print ("inspecting operating system root", root);
print (" product name:", g.inspect_get_product_name (root));
print (" version:",
g.inspect_get_major_version (root),
g.inspect_get_minor_version (root));
//print (" type:", g.inspect_get_type (root));
print (" distro:", g.inspect_get_distro (root));
// Mount up the disks like guestfish -i
var mps = g.inspect_get_mountpoints (root);
var keys = [];
for (var key in mps) { keys.push (key); }
function compare (a, b) {
if (a.length > b.length) return 1;
else if (a.length == b.length) return 0;
else return -1;
}
keys.sort (compare);
for (var i = 0; i < keys.length; ++i) {
g.mount_ro (mps[keys[i]], keys[i]);
}
// Get the list of applications.
print (" applications:");
apps = g.inspect_list_applications (root);
for (var i = 0; i < apps.length; ++i) {
print (" ", apps[i].app_name,
apps[i].app_version, apps[i].app_release);
}
g.umount_all ();
}
if (ARGV.length != 1) {
printerr ("Usage: gjs test.js disk.img");
} else {
inspect (ARGV[0]);
}
One highlight is GObject bindings, which makes the API available from Javascript. More on this topic coming soon.
I am often surprised by the sort of questions asked in the forums or on irc around open source projects - it just feels as if people are going out of their way to inflict pain and suffering upon themselves by trying to find the most awkward and most complicated way to do things. So how can we better help these people ? We dont need to save them or anything as drastic like that, its just a case of being able to show or explain that there might be a better way.
The first thing that I've started now doing, when asked a strange question is ask the person 'What are you really trying to achieve?'. You might be amazed how many times the answer has nothing to do with the question being asked. Try to establish what the end goal is, and in many cases its clear that the person has been lead astray by random posts on the internet, some of which are perfectly fine in their own context, but can be quite a kludge outside that context.
Establishing, clearly what the goal is before advice or opinion is thrown at people will always result in a better overall experience. And to the people spending their time in the irc channels, web forums and mailing lists helping others out : must respect. You guys are the ones making the idea of Communities and Open Source work.
- KB
Finally I actually managed to write a blog post that wasn’t week notes. That may well be my biggest achievement of the week.
Health
Still hobbling around in a cast and on crutches. Getting a bit better at it, but my upper body strength is still almost non-existent so I’m not going very far.
I went back to the hospital on Friday. On my previous visit it took about three hours. This time I did pretty much the same things and it took about half an hour. The doctor says everything seems to be going ok. They don’t want to see me for another four weeks. At that point they hope to remove the cast and replace it with a plastic boot.
Speaking and Training
Not much going on here. Still slowly building up to the courses I’ll be running at the end of February – which it now looks like I’ll be running with a plastic boot on, so there will probably be a fair bit of sitting down involved.
A couple of enquiries came in for training sessions later in the year. Looks like it could be a good year for my training business.
General Business Stuff
I host most of my domains on servers rented from 1 and 1. They’re not the best option by some distance, but they’re really cheap. At the end of last year I noticed that they had servers available running Centos 6. I rented a new server and have been slowly moving my domains over. This is a long and rather dull process. But I expect to be finished by next weekend.
Gigs
Anther gig that I couldn’t get to this week. This time it was Ed Sheeran at the Brixton Academy. Put the ticket on Gumtree and within hours I had a huge number of replies. Guess I set the price too low.
TV Highlights
Sherlock, of course. For the record, here’s my theory.
Moriarty had a Sherlock mask that he used when he kidnapped the children (which is why the young girl screamed when she saw Sherlock). Sherlock jumped into the back of the lorry that we saw, but at the same time threw off Moriarty’s body with the mask on. The cyclist that bumped into Watson also gave him a quick squirt of the H.O.U.N.D. gas so he saw what he feared most. Molly arranged to have the body collected and misindentified as Sherlock.
Of course, this is just a synthesis of many theories that have been going round on the web this week. And Stephen Moffat says there’s a clue that no-one has spotted.
Finished series two of Lost on DVD and made a start on series three. And we’ve started to watch Mad Men against from the start. Hope to watched it all before series five starts in April.
Hmm… doesn’t sound like I’ve achieved that much this week. But that’s probably an accurate reflection of how I feel.
Today was the day that parliament had a rather long list of private members bills to debate. Originally there were sixty-four on the list. As this informative post from Kerry McCarthy tells us, they’d normally expect to get through about three of them. The MPs sponsoring the rest of the bills were pretty much wasting their time.
Number eight on the original list was Nadine Dorries bill to teach girls between 13 and 16 how to say no to sex. The Guardian’s headline was MPs to debate sexual abstinence lessons bill, which was slightly disingenuous as the chance of the debate reaching that far down the list was tiny.
But this morning, when the order of business for today in parliament was published Dorries bill was missing from the list. Everyone assumed that Dorries was responsible for this removal. As a spokeswoman for the Commons information office told the Guardian “No one would be able to remove a private members’ bill without the permission of a member”. The assumption seemed to be that Dorries had realised the futility of being so far down the list and had removed the bill. She wouldn’t have been the only one – the published list only contains forty-nine of the expected sixty-four bills.
At lunchtime, things got even more interesting. A new Twitter account called @NadineDorriesMP appeared with this tweet (in reply to a joke by John Prescott):
@johnprescott My bill has not ‘jumped off at Edge Hill’ if you care to read the order paper, it’s number eight on the list!!
Something about this timeline didn’t seem right to me. That tweet was posted at 12:47, which is almost two hours since I first saw the order of business without her bill. I assume the order of business was published some time earlier. The first hint I had that the bill had been withdrawn was this blog post by Kerry McCarthy which was published just after 10am.
On the basis that the real Nadine Dorries would have known by 12:47 that her bill was not on the order paper, I called the new Twitter account as a fake. But it seems I was wrong. People like Iain Dale confirmed that it really was her (and, yes, this is one of the few things I’d trust Iain Dale on).
All of which leaves us with a bit of a mystery. Either Dorries withdrew her bill or she didn’t. If she did then the first tweet on her new Twitter account is a complete lie. If she didn’t then we need to ask who did withdraw her bill – given that it’s only her who is supposed to be able to do that.
And even if someone else managed to withdraw her bill without her knowledge, something still doesn’t ring true. If she was expecting to debate her bill (no matter how tiny the chance) then surely she would have been hanging around in parliament all morning and I can’t believe that she didn’t see the order paper and notice her bill was missing. Or that one of her friends saw that it was missing and asked her what happened.
All in all I find it incredible that she could have got to 12:47 without knowing that her bill was not on the list. So how do you explain that tweet?
This is, I think, the third time that Dorries has joined Twitter. And with her first tweet she has already started people thinking that this time is going to be no different to the previous occasions. She will be ineptly trying to use it to promote her strange view of the world. And she will quickly make herself a laughing stock once more.
Update: At 16:37 this afternoon, @NadineDorriesMP tweeted the following:
Just to make it absolutely clear and leave no doubt whatsoever, my Bill was NOT withdrawn
Curiouser and curiouser. So, now we are left with two questions. 1/ Why wasn’t Dorries’ bill on the order paper? And 2/ At what point did she realise it wasn’t on the order paper?
Update 2: Welshracer may have got to the heart of the matter here. He points out what it says on the official parliamentary web page for Dorries’ bill.
The Bill was not printed and so was not moved for debate on 20 January 2012.
What do we make of this? One interpretation would be that Dorries didn’t withdraw the bill for debate, but that someone in her office forgot to get the bill printed so that it could be included in the debate.
But even in those circumstances you’d think that she’d get a phone call from the people who were planning the day’s business telling her what had (or hadn’t) happened. I still can’t believe that she didn’t know the bill wasn’t on the order paper when she sent her first tweet at quarter to one.
Update 3: Couple more pieces of information came in overnight.
Firstly, it seems that the new @NadineDorriesMP Twitter account was set up two weeks ago. It seems she resisted using it until goaded into it by John Prescott yesterday.
Secondly, the Independent managed to speak to Dorries about this confusion. She says:
The Bill is still live, but there was more chance of being struck by a meteor than getting it debated, so we told the Commons office not to bother printing a hard copy. What I didn’t realise was that if you don’t order it to be printed, it automatically comes off the agenda.
Of course I wouldn’t withdraw it … a lot of people had paid train fares to come and protest. It would have been churlish.
So we finally have the truth (or, at least, Dorries’ version of it). She knew it wouldn’t be debated so she decided not to have the bill printed. She didn’t know that would automatically remove it from the order paper. She didn’t withdraw the bill out of respect for the people who were coming to protest against it.
It’s also not clear to me in what sense the bill is still live. This was the final opportunity to debate private members bills before the end of this parliamentary session. Any unfinished business from this parliamentary session doesn’t get passed on to the next one, so anything that wasn’t approved is, as far as I can see, effectively dead.
You couldn’t make this up!
I answered a question on a mailing list about live migration versus copying guests between different versions of KVM on RHEL. The complainant observed that you can’t live migrate from RHEL 6.2 to RHEL 6.1. But you can shut down a guest, copy it from RHEL 6.2 to 6.1, and boot it.
Why is there this difference? It comes down to how live migration is implemented.
Live migration is completely different from shutting down and copying a guest. During live migration we must send the complete state of system RAM, virtual CPUs, and all virtual devices, over to the remote side. In qemu this is done by sending “VMState” structures over the wire, one struct for each device that the guest is using. These structures are mostly a memory dump, but so that you don’t need byte-for-byte compatible versions of qemu when live migrating, each struct is preceded by a version ID.
The receiving qemu checks that it can handle that version of the struct. In some (but not all) cases, qemu knows how to “upgrade”, say, a version 1 struct into a version 2 struct. Downgrades are never possible, and some upgrades are also rejected (eg. if version 2 is a complete rewrite over version 1, then it’s possible for a device to refuse to deal with version 1 structs at all).
Downgrades are not possible, and that’s the basic reason why live migration doesn’t work from a newer to an older version of qemu.
Why does copying work? When a VM is shut down, there is no RAM, vCPU or device state. All the state that remains is the contents of the hard disk. If the hard disk is booted on an older qemu, then the kernel, during boot, will test the available CPUs, devices, etc and adjust itself, exactly the same as if you took a physical hard disk and transplanted it between real machines.
Indirectly related to all this is the qemu machine type. If you created guests on RHEL 6.0, then you may notice the libvirt XML contains:
<type arch='x86_64' machine='rhel6.0.0'>hvm</type>
This machine type stays with the guest even when you update the host.
The machine type controls what devices and PCI slots we present to the guest at boot, and it’s mainly there so that Windows doesn’t try to reactivate itself when you upgrade your host. The newer qemu presents the old devices and PCI assignments, so Windows doesn’t “notice” the updated hypervisor.
For Linux guests this is usually not a problem you have to worry about and you can go ahead and change the machine type at will.
This was unexpected:
Write something to a partition device (eg. /dev/vda1) and immediately call blockdev --rereadpt /dev/vda to re-read the partition table of the whole device. Sometimes (about 50% for me) the blockdev command fails with:
blockdev: BLKRRPART: Device or resource busy
Nothing else is using /dev/vda, nothing from it was mounted, and the error was intermittent which indicates a race condition.
Why this happens:
udev has a rule that runs blkid -o udev -p /dev/vda1. It does this every time you close a block device so that blkid can rescan the content of the device.
The act of blkid running very briefly behind our backs causes the device to be open during the blockdev operation, causing it to fail.
Adding udevadm settle between the close and the blockdev fixed the problem for us, although this command is also inherently racy (what happens if it runs before the kernel has sent a message to udev?)
There is a new tool in libguestfs ≥ 1.15.17: virt-format lets you erase disks and make blank disks.
Usage is quite simple:
$ virt-format -a disk.img
(Note that erases any data on disk.img!)
This works for any format of disk, eg. qcow2, or you can run it on host partitions, LVs, USB storage etc. By default it just creates a partition, but using other options you can make empty filesystems and logical volumes.
This is a simple tool that doesn’t cover everything you might want to do. For more complex requirements, see virt-make-fs or guestfish.
When I said I was going to experiment with week notes on this blog, I didn’t intend that the blog would only consist of week notes. But as we’ll see below, other things have been taking my attention this week and I haven’t felt much like blogging. Hopefully normal service will resume very soon.
Health
This is the big one. A few hours after posting my last week notes I slipped down a small flight of stairs in my house and fell badly. Something went ping in my ankle and it hurt like hell. I shuffled onto my bed where I lay for twenty minutes or so before deciding it wasn’t getting any better and I should probably take myself to A&E.
Four or five hours later I left A&E with a diagnosis of a spiral fracture in my fibula, a temporary cast, crutches and an appointment to go to the fracture clinic on Friday.
I spent the week hobbling about the house on crutches and went back to the hospital on Friday. They replaced the temporary cast with a more permanent one in sexy black fibreglass which I’ll be sporting for the next five weeks or so. They also took another x-ray and confirmed that although there’s definitely a fracture, everything is still in the right place so there’s no need for surgery, pins of any of that nonsense.
Going back to see them again next Friday.
Speaking and Training
The downside of having your leg in a cast is the doctors don’t like you flying – the pressure in the cabin can lead to blood clots. So I’ve had to postpone the trip to Romania. It hasn’t been rescheduled yet, but I hope to get there later in the year.
Counting the weeks, it looks like the cast will be coming off just before my other currently scheduled classes – the public courses for FlossUK and O’Reilly at the end of February. If I don’t heal on schedule then I expect I’ll be giving the classes sitting down.
Incidentally, those lovely people at O’Reilly have arranged to give away one free ticket to each of the two courses. Full details on how to enter are in an advert in the new issue of Linux Format. There are also runners-up prizes of copies of the new camel book.
Writing
Having spent the week sitting around at home, you’d think I would have had time to do plenty of writing. But, to be honest, I just haven’t been in the mood. The most I can report here is that I’ve got an agreement write four more articles for Linux Format over the next few months. I hope to finish the first of these (which isn’t about Perl!) today.
Reading
I have at least managed some reading. I’ve picked up Bruce Tate’s Seven Languages in Seven Weeks which I started reading in August but never quite got to the end of. And I’ve started reading Build Your Own Wicked WordPress Themes because I can see myself getting deeper and deeper into WordPress this year.
Gigs
I had a ticket to see Ani DiFranco at the Union Chapel on Tuesday. But my limited mobility mean that I couldn’t get there. I sold my ticket to the very lovely (and talented) Kal Lavelle. Luckily there are lots of videos of the gig on YouTube so I’ve been able to at least see some of the show.
Film
I had a ticket to see The Iron Lady last Sunday afternoon, but I was in A&E at the time. Later in the week I finally got to see In Bruges, which I’ve been planning to watch for ages. Oh, and one morning when I was sitting on the sofa feeling a bit sorry for myself I watched Sixteen Candles. Can’t beat a bit of Molly Ringwald to cheer youself up.
TV
Sherlock was another ninety minutes of delight, of course. And I was pleased to see that The Good Wife returned to More 4. VirginMedia have half of the fourth series of Big Bang Theory on their video on demand service, so I’ve worked through that and am waiting for them to add the rest. We’re working our way through a DVD boxset of Lost – we’re currently close to the end of series two.
But the big surprise has been American Horror Story. We’ve watched all of the first series. Sure, it’s a clichéd in places, but part of the fun is spotting all the references to horror films. We love it.
Looks like I will need to get a Visa again to visit Belgium for Fosdem 2012. This is starting to get a bit irritating now, six times I've been to Fosdem and every time they have asked me to come in for an interview before they give me a visa; once again ? Surely by now it should be possible to get onto the visa-by-post process.
- KB
A new experiment on the blog this year. I’m planning to write a weekly report on what I’ve been doing. No idea how useful or interesting it will be or how long I’ll feel like keeping it going. So here’s what I did this week.
Speaking and Training
Didn’t give any talks this week, but there are a couple of things in the pipeline. I’m running four days of public Perl training courses in London at the end of next month and I’m starting to get into the marketing for that. O’Reilly have offered two free places on these courses as prizes for a competition that has been advertised in Linux Format.
As part of my marketing campaign I’ve been working on a new web site about my training business. Currently I’m working on the content. The look will come later.
Probably the most exciting thing to happen in this area is that I’ve been invited to give a talk about Perl in Transylvania. I’ve been doing some work with some Romanian Perl programmers and they’ve asked me to go over and talk to their new Perl Mongers group in Cluj. I’m going over for a couple of days at the start of February.
Programming
Over the last few months, Linux Format have been publishing a series of articles I’ve written about Modern Perl. The third and final article in the series will be published next month. The articles are about writing a web application to track a reading list. This was to replace a bodged together system or Perl programs that I’ve been using to track my reading for the last few years. This week I finally put the replacement system live at books.dave.org.uk. If you’re interested, the code is on GitHub. At some point I should probably write an article about it on my Perl blog.
General Business Stuff
About a month ago I realised that I was tired of dealing with Nat West for my business banking. It seemed that they made everything far more complex than it needed to be. I asked for advice on Twitter and most people seemed to recommend using HSBC instead. So I applied for an account with them through their web site.
Well, it wasn’t anywhere near as easy as it could have been, but last Saturday I finally opened my new business account. With a new bank account and a new accountant a few months ago it really feels like the business has started a new era.
People ask why I carried on with the HSBC application when it was all so painful. That’s because I still think they’re more efficient than Nat West were. It crystallised for me when I was thinking about the computer systems that they use. In recent months I’ve spent far too much time in Nat West branches watching the screen as an assistant tries to sort out a problem. Their internal systems are all running on what seems to be CICS-based software from the 1980s. When I was watching the chap opening my account in HSBC last weekend it looked like they were running an old version of Windows from the 1990s.
So HSBC’s software seems to be about a decade more up to date than Nat West’s. But still twenty years behind the rest of the world. Surely banking doesn’t need to be so tortuous?
House Stuff
I spent a lot of last week finishing a decluttering exercise that I started after Christmas. I’ve shredded a huge mountain of old paperwork and for the first time ever I have every piece of paper in my study filed in the right place.
Our back garden backs onto a railway embankment and there are a lot of trees there. So we get a lot of leaves covering the back garden. Yesterday I went out and swept up several months worth of fallen leaves. One of the tree has nasty small leaves which get through the grills over drains and block them. So I lifted a lot of drain covers and pulled out a lot of muddy leaves. It wasn’t fun.
TV Highlights
I’ve been watching a lot of TV. The new series of Sherlock was an obvious highlight. But I’m also enjoying the Sky version of Treasure Island and the BBC’s Public Enemies. One thing I didn’t enjoy was Eternal Law. Despite being written by the same people as Life on Mars, the premise of lawyer angels proved to be just as silly as it sounds.
Health
The scales just told me that I’m almost three pounds lighter than I was a week ago.
Over the holidays I started a new project called “wrappi”.
The name is a play on “wrapper” and “API”. And a play on what has been discussed for a very long time inside Red Hat — an API for everything that Red Hat Enterprise Linux does. A “rh-api”, if you will.
Wrappi aims to wrap up everything you can do with a Linux box:
mkfs, fsck, parted, pvcreate, cp etc
We take all of that and present it back to you as an API:
The aim is that from a PowerShell-like interface (or your own program) you could control and maintain 100s of Linux machines remotely. Like puppet/chef, but at a lower level.
Here is what a C program using the API might look like.
So this is ambitious.
An API that did all of the above might run to 10,000 different calls. To make this feasible to maintain and implement, we have to be able to generate the code for just about everything.
Each API call starts with a description. Because we need to write this description for 10,000 calls, it’s best to keep this short. In the best case, just a single line would be required, but in some cases it’ll be more complicated:
entry_point void mkdir (pathname path, fileperm perm)
system_object block_device dir_list "/sys/block/[hsv]d[a-z]*"
entry_point
struct timeval gettimeofday ()
<<
int r;
struct timeval tv;
r = gettimeofday (&tv, NULL);
if (r == -1) {
set_error_errno ("gettimeofday");
return NULL;
}
ret->tv_sec = tv.tv_sec;
ret->tv_usec = tv.tv_usec;
return ret;
>>
includes ["sys/time.h"]
From that metadata we can generate automatically everything we need, all the language bindings, all the remote access code, the implementation.
When a new shiny-thing comes along (“JSON-powered Enterprise GObject”) we can simply add a new generator backend, and we’ll support the whole API through that.
If you’ve followed my blog, you’ll know that this looks a lot like the libguestfs generator, and in many ways this is the generator done right.
There’s lots of code in the git repo. If you want to find out more, follow the blog, or ask questions below!
And here’s the second post in my review of 2011. This is a list of my favourite posts from the year. In 2010 I said it was harder to choose posts from that year as I had blogged less than in previous years. Well, I actually blogged even less in 2011 so it was even harder this year.
As usual I’ve tried to pick one post from each month, but because of the scarcity of posts I’ve had to bend the rules at times. Usually I don’t include posts that have already been mentioned in the list of most popular posts, but that has proved impossible this year so there is a small amount of repetition.
It was only while writing this review that I noticed that four of these twelve articles are about the Daily Mail. Looks like the blog might, finally, be developing a theme.
Last year was my lightest year for blogging. In fact every year has seen fewer post since I joined Twitter. Tweets are, of course, far less effort than blog posts. But nevertheless I shall, once again, endeavour to blog more often in 2012.
Thanks for reading in 2011.
As I’ve done for the last few years I’m going to spend a couple of days looking back at the year on this blog. Firstly, here’s a list of the ten most popular posts on the blog this year.
So that’s what you’ve been reading on the blog this year. At some point in the next couple of days, I’ll post a list of my favourite posts.
One of my pet hates is all that “review of the year” stuff that appears before the year is over. But I’m not planning to go to any gigs in the next three days, so I feel justified in reviewing the gigs I’ve seen this year before the end of the year.
According to Songkick I’ve seen exactly fifty gigs this year. That’s over twice as many as I saw in 2010.
There are two artists that I saw four times – Stealing Sheep and Martin Carthy, but as Carthy was a guest star on two of those appearances, I guess that Stealing Sheep are the band I saw most. Not bad for an act I first saw in August. There were two acts that I saw three times – Antonio Lulić and Ed Sheeran. I also saw Amanda Palmer twice – and as they were on a Friday and the following Monday, I expect she was the artist I saw with the shortest gap between performances.
I’ve seen gigs in rooms above pubs and one gig at Wembley Arena. Judging by my attendance at venues, my favourites are the Union Chapel and the Barbican Centre.
So what did I like? Actually let’s start with what I didn’t like. I walked out of two gigs halfway through the main act. I went to see Other Lives purely because Hannah Peel was supporting. She was great, as always, but they were terrible. Later in the year I decided to go to see Emmy the Great purely because lots of people I like say how she is. Unfortunately I chose her Christmas party gig with Tim Wheeler and it was horrible. I left after half an hour. In both cases I took a chance on liking an act and in both cases I was wrong. I suspect I’ll be doing a lot less of that next year.
There were a lot of nostalgic gigs on the list this year. Eddi Reader at the Union Chapel was great. Ian McCulloch a week later at the same venue was less great. I think I would have been better off seeing Echo and the Bunnymen instead. Later in the year I saw two great nostalgic gigs at the Bush Hall – Roddy Frame and Michelle Shocked.
I also saw some stuff from even earlier than that. Van der Graaf Generator were really good, but I didn’t really enjoy Yes that much. I even saw Hawkwind for the first time since 1982.
I’ve trying to work out what my favourite gigs were. But there such a wide range of stuff that it’s hard to compare them. Here, in purely chronological order, are ten highlights of my live music year.
All in all it’s been a good year for live music. I’ve ticked off a few more old favourites that I hadn’t previously got round to seeing and I’ve seen a lot of new and interesting bands. I’m already booking tickets for next year and hopefully it’ll be just as interesting as this year was.
What did you see that you really enjoyed this year? Did I miss any absolutely essential shows? What’s going to be great next year?
The Mail might have finally been forced to admit that Winterval wasn’t the the pagan plot they’ve always claimed it was, but that doesn’t mean they’ll stop publishing spurious “War on Christmas” stories whenever the fancy takes them. Today they turned their attention to Christmas cards and really didn’t like what they saw.
The headline was “Stores ‘ashamed’ to sell religious cards… but obscene ones litter the High Street“. The Mail have apparently had staff out on the high streets counting the number of religious Christmas cards on sale in various shops. They calculate that just half a percent of the cards for sale had a religious theme. They then took this information to “Christian leaders” for comment. This included well-known Christian nutter Stephen Green whose comments were every bit as intelligent and nuanced as we have come to expect.
I can’t believe this is being led by consumer demand.
I believe there is anti-Christian prejudice in the buying departments involved.
There’s too much of this multicultural indoctrination and too much of an idea that if they put out Christian cards they will alienate or discriminate against or offend other faiths.
There’s a kind of militant atheism and nasty secularism at work in this country which is completely opposed to Christianity.
He’s totally wrong, of course. This is completely lead by consumer demand. Shop owners aren’t stupid. If there was a demand for religious Christmas cards then they would meet it. If there aren’t many religious cards for sale it means that no-one is asking for them. Christianity is in decline in this country. That’s a simple fact that Christians (and the Daily Mail) are just going to have to accept.
But a lot of that article seemed a little familiar. And a little digging revealed Stores airbrush Christ out of Christmas cards from December 2010. Same writer, same survey, almost identical quotes from Stephen Green and other “Christian leaders”. I hope Andrew Levy wasn’t paid the full rate for both articles. Oh, and there’s another article on the same subject from 2006.
Something that was new to this year’s version of the article was the comparison to other Christmas cards that were on sale. Not only are religious cards in short supply, but the Mail was very distressed to find the shelves apparently packed with obscene cards with messages like “Merry Fucking Christmas”. With it’s useful sensitivity the Mail wanted to make sure that its readers knew exactly how disgusting these cards were so it listed plenty of examples – making liberal use of asterixes in certain words, but leaving us in no doubt what the real words were.
However, the Mail railing against these obscene cards seemed more that usually ridiculous when another article appeared on their web site later in the day. This new article was a celebration of the “bawdy” Christmas cards designed by Donald Gill at the start of the twentieth century. Surely the difference between “bawdy” and “obscene” is just the passage of time. I wonder if it’s worth searching the British Newspaper Archive for Mail stories from a hundred years ago complaining about Gill’s work?
Paolo Bonzini discovered that you can issue SCSI ioctls to virtio devices which are passed down to the host.
The very unfortunate part about this is it easily allows guests to read and write parts of host devices that they are not supposed to. For example, if a guest was confined to host device /dev/sda3, it could read or write other partitions or the boot sector on /dev/sda.
In your guest, try this command which reads the host boot sector:
sg_dd if=/dev/vda blk_sgio=1 bs=512 count=1 of=output
Swap the if and of arguments around to exploit the host.
Here’s Paolo’s write-up on LKML.
Here is the libguestfs mitigation patch. The libvirt mitigation patch.
Not being a regular library causes no end of constant build problems.
Like this crap because we did “gettextize” without doing “autoconf” (or vice versa):
make[2]: Entering directory `/builddir/build/BUILD/libguestfs-1.14.7/po' *** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version 0.17 but the autoconf macros are from gettext version 0.18
I just don’t get why gettext can’t be a regular, ordinary, plain library so we don’t have to constantly suffer from this sort of thing. There is surely no other library that needs to rewrite your entire build system.
You want to know if Android or iPhone is going to “win” in the end? It’s obviously going to be Android, because it’s the new Windows.
Exhibit (a): My Google Nexus S phone: requires rebooting every 3 days otherwise it just stops being able to receive/send calls and/or texts. Data over 3g still works during these outages.
Exhibit (b): My new Samsung Galaxy tab, a Christmas present of sorts from Red Hat: Fresh out of the box(!), this cannot connect to my wifi (absolutely everything else can connect fine to this wifi). Support forums are full of people reporting the same thing, and everyone suggesting you reboot/reinstall/press some magic key sequence/etc. Where have I heard that story before?
[Executive summary: Betteridge's Law (probably) applies]
The Twitter furore over the #GodIsNotGreat hash tag has pretty much died down now, but there’s one branch of the debate that is still getting comments and retweets. Here’s an example from johnwilander.
#GodIsNotGreat pulled from trends because christians protest. But#ReasonsToBeatYourGirlfriend was allowed. Stay classy,@Twitter.
As I mentioned a couple of days ago, the hashtag vanished from the list of global trending topics on Friday morning. And this conspiracy theory leapt up almost immediately. As far as I can see, none of the people repeating this claim have any evidence to back it up – which is more than somewhat ironic given Hitchens’ evidence-driven view of the world.
The argument seems to go like this: At one point the hashtag was trending. Then Christians got upset and starting making death threats aimed at the people who started the trend. Soon after that, the hashtag was no longer trending. Therefore Twitter must have given in to Christian bullying and censored the hashtag.
Whilst it all sounds frighteningly possible, I hope I don’t have to spell out the flaws in the logic. If you can’t work it out for yourself then I recommend the Wikipedia article on Correlation does not imply Causation.
I could be wrong here. There might be some irrefutable piece of evidence proving conclusively that Twitter deliberately censored the hashtag. If there is, then I haven’t seen it and I’d be grateful to anyone who could bring it to my attention.
There is, however, some evidence that Twitter didn’t censor the hashtag. On Friday morning, as the debate still raging, a Facebook friend in Canada pointed out that it was still trending there. In the middle of the afternoon someone pointed out that it was still trending in San Francisco. So if Twitter were censoring it, they weren’t doing a very good job. There’s even someone who apparently works for Twitter saying that they didn’t do it.
Of course, none of this is conclusive evidence that Twitter didn’t censor the hashtag. But balancing some evidence for non-censorship against absolutely no evidence at all for the censorship I know which side I come out on.
All of which leaves us searching for an explanation for the sudden disappearance. And, to be honest, I don’t think we really need to look too hard. Things stop being trending topics all the time. Things have to drop out of the list so that new things can come in. Otherwise the list would constantly be full of nonsense about Justin Bieber and Twilight. The Twitter trending topics algorithm can’t possibly just measure the popularity of topics. That would be incredibly dull. Instead, what it does is to look for changes in popularity. A steady buzz of the same few million people talking about a particular topic doesn’t get noticed, but a sudden increase in the number of people discussing the same topic does. The Buffer blog has a good explanation of this and the official Twitter blog says much the same thing.
I’m sure that this won’t convince the conspiracy theorists. “Ah,” they’ll say, “That’s all very convenient. But that just gives Twitter an easy way to cover up their censorship..” Which is true, I suppose, but hardly a basis for a rational discussion.
And that’s the most disappointing thing to come out of this affair. The people making this accusations are fans of Christopher Hitchens. You would hope they’d be from the more rational end of the spectrum. You’d hope that they would be above making accusations like this without evidence. I guess no-one is immune from irrationality.
But I’m going to go out on a limb here. And lay my cards on the table. And other clichés that Hitchens would despise.
Twitter (probably) didn’t censor the #GodIsNotGreat hashtag.
Update: The author of the tweet I quoted above seems to agree with me.
This morning I woke up to the terrible (although not completely unexpected) news that Christopher Hitchens had died. The rational community has, of course, lost one of its most erudite and interesting members. But it seems that Christopher had one last trick up his sleeve.
As with most breaking news these days, I found out about his death from Twitter. I checked my Twitter feed as I got up at about 6am. A few people that I follow were already awake and discussing it. As a mark of respect, many of those tweets were tagged with the name of Hitchens’ best known book “God Is Not Great“. And then more and more people started to do that. And before too long, the hashtag #GodIsNotGreat was listed as one of Twitter’s worldwide trending topics. At which point it started to go a bit weird.
All around the world religious people who knew nothing at all about Christopher Hitchens, his books or his death were looking at Twitter and seeing the tag #GodIsNotGreat. And that annoyed many of them immensely. So they started tweeting on the subject. Their tweets seemed to largely fall into three categories.
1/ What is this? And why is it trending?
2/ Attempts to inject their own beliefs into the stream – “God isn’t just great – he’s the GREATEST!!” (from someone called foolishdenise – you couldn’t make this up)
3/ Threats to kill whoever had started the hashtag (all very Christian) [UPDATE: Replaced a tweet with a rather NSFW background with another expressing the same sentiment]
Of course, all of these new tweets all included the hashtag. So that just helped ensure that the hashtag became even more popular. Hitchens fans replied, pointing out why the hashtag was trending (and inviting them to read the book) and the hashtag was tweeted and retweeted and commented on and argued over more than pretty much any other hashtag I’ve followed all year. For most of the morning the Tweetdeck column I set up to follow the tag was moving too fast for me to follow it.
At some point in the morning, the hashtag disappeared from the list of trending topics. Some people claimed that Twitter had removed it deliberately in response to the Christian death threats. But it seems slightly ironic for Hitchens fans to claim something like that without any firm evidence. I suspect that it’s more likely that once a hashtag reaches a plateau of activity then Twitter’s algorithm ignores it – otherwise the top trend would always be Justin Bieber (as two people pointed out to me). Apparently it’s still trending in Canada. But I’m not sure what that proves about anything.
One tweet in particular from luketadams summed things up for me.
Hitchens dies. His book
#GodisNotGreat trends. Religious people threaten violence. The point of his book is proven. Hitchens for the win.
It’s tempting to imagine Hitchens looking down on the storm that his death has caused and laughing. But that would go against everything that he believed in.
So don’t do that. Instead, reread his articles, buy his books, watch videos of him demolishing his opponents in debate. And remember the great mind that we have lost.
One Wednesday in August I went to the Barfly in Camden to see Alessi’s Ark. I knew nothing at all about the support acts for the night. The first act on were called Stealing Sheep. The first song they played was this one. It’s called “I Am The Rain”
I am the Rain by stealing sheep
Less than two minutes later I had a new favourite band[1].
Did you listen to it? Isn’t it one of the best things you’ve heard all year? The only criticism that I have is that it’s too short. It could easily be twice as long.
When I got home that night I bought all three of their EPs from Amazon and starting scouring Songkick for news of forthcoming gigs.
In the last three or four months I’ve seen them four times. And I’ve missed at least two London gigs in that time. They’re pretty easy to find in London. Most recently I saw them at The Old Blue Last on Tuesday night. They’re currently playing small venues, but that will change soon. I’d love to see them somewhere like the Union Chapel.
Their music is hard to describe. There’s certainly a modern folky vibe to it (which explains why they were supporting Alessi, I suppose) but there are wider influences than that. The first night I saw them I remember thinking of The Beta Band and The Velvet Underground. There are interesting rhythms, quirky melodies and, oh, pretty much everything I look for in my favourite music. One thing is for sure. It’s hard to dance to. You can easily pick out a rhythm to dance to, but thirty seconds later it will change completely and you’ll find yourself tripping up.
There are three women in the band. Going from left to right (as they always seem to arrange themselves on stage)…
Emily plays guitar. And she just adds to my theory that there is nothing sexier than a pretty woman in a cocktail dress who knows how to thrash an electric guitar (see also St Vincent).
Lucy plays the drums. And I think she must be responsible for the VU influences that I noticed the first time I saw them as, at times, she seems to be channelling Moe Tucker.
And Becky plays keyboards. They all sing (both together and individually) but last time I saw them I noticed that Becky’s voice can sound an awful lot like Stina Nordenstam – this is a good thing.
Those comparisons might make them sound derivative. They’re really not. I’m just trying to describe something that it’s hard to put into words. Look, just go and listen to “I Am The Rain” again.
They’ve got an extended EP[2] out now called “Noah and the Paper Moon“. I recommend that you buy it. There’s full-length album due in the spring. They also have a YouTube channel, but they haven’t put anything new there for a couple of months – they’ve probably been too busy gigging.
The only upcoming gig that Songkick know about is at Kings College London on Feb 24th, supporting Field Music but I’d be surprised if they didn’t play more shows before them.
They’ve recently signed to Heavenly Records and they’re getting a lot of promotion. So I’m sure you’ll year about them soon.
But I recommend that you check them out now. Beat the rush.
Now go and listen to “I Am The Rain” again. You know you want to.
[1] Obviously, I’m using that term in the John Peel sense – where it’s perfectly acceptable to have dozens of favourite bands at the same time.
[2] “Extended EP” – a tautological neologism.
You’ll often hear people saying that Mail writers live in a different world to the rest of us. Actually, I think that they live in the same world as us, they just like to think that they live in a different one. The fun and games start when they discover they are wrong and that the real world doesn’t appreciate their over-developed sense of entitlement.
Here’s a good case in point. Melissa Kite lives somewhere near me in Balham. Melissa is a serial parking offender. Of course, Melissa doesn’t see it quite like that. Melissa describes herself as being a victim of “bear traps” laid by councils to trick motorists who dare to park on their patch. When she parked up at Balham tube station “at 8pm for ten seconds in order to pick up a friend who was coming to stay with me and who was weighed down with luggage” she was appalled to be given an £80 fine.
And there’s that sense of entitlement. This is what really annoys me about people like Melissa. There are parking restrictions around Balham station. They have been there for as long as I can remember and they are clearly marked. But because they are inconvenient for her, she feels she is perfectly justified in ignoring them. Balham station is at junction where two busy roads cross. The parking restrictions are there for a good reason (and, no, not to make money for the council – to prevent congestion). They aren’t there to trick people like Melissa.
But we can find out more about Melissa’s parking problems with Wandsworth council. She wrote about a very similar incident in the Evening Standard a year ago. This gives more details of the offence. She was parking in a taxi rank. The taxi rank is a relatively new innovation. It’s been there three or four years. But, once again, it’s clearly marked. And, once again, Melissa chose to ignore that because it was inconvenient for her. She also mentions four other offences where she was picking someone up or dropping them off at the station and chose to park in a restricted area.
Amusingly, she even describes a telephone conversation she had with someone from Wandsworth council.
I rang Wandsworth council to tell them this but their spokesman sounded distinctly unimpressed. “Well, I don’t know what you were doing there,” he said.
“But I’ve just told you,” I said. “I was picking up a friend.”
He sighed: “People come up with all sorts of stories.”
“Excuse me?”
“You’re asking me to assume that everything you’re saying is the truth.”
At which point I confess I raised my voice a little: “Yes I am!”
“Right,” he harrumphed, “you’re shouting, I’m ending the call.” And he slammed the phone down.
So I rang the parking department, where someone called Angelo explained that when running errands I should always stop on single yellow lines
There’s that sense of entitlement again. She honestly seems to believe that “I was picking up a friend” is a reasonable excuse for ignoring the parking restrictions. Balham Station Road would be in chaos for most of the day if everyone chose to ignore the rules because they were “just picking up a friend”.
Then there’s this lovely paragraph from the end of her article.
Very soon, Westminster council will abolish free parking on a single yellow line in the evenings. And when they do so, I will stop going up West on a Tuesday night as I have done for the past six years to meet a group of friends with whom I have dinner in a Lebanese restaurant.That restaurant will lose us as regular customers forever, and goodness knows how many others.
If only she lived in a city where there was a quick and efficient public transport system. Perhaps something that whisked passengers to their destination through underground tubes. I know travelling on the tube can be a bit of a nightmare in rush hour. But on a Tuesday night, it should be fine. Or perhaps people like Melissa are too self-important to mix with the rest of us in a confined space like that.
There may, of course, be a serious point to her objections. Perhaps the parking restrictions are too draconian. Never let it be said that I object to a nice bit of civil disobedience to protest against bad laws. But you need to be prepared to take the punishment. You can’t expect to have the fine waived just because it’s inconvenient to you.
Actually, this is all academic to me. Like the vast majority of sane Londoners we don’t have a car. Most weekends I walk to the supermarket and carry the shopping home. If it’s going to be a huge shop then we’ll order on the internet and get it delivered. And if friends arrive at Balham station overburdened with luggage then we’ll offer to meet them there and help them carry it home. If we’re feeling particularly lazy we might offer to pay for them to get a taxi. From the rank right outside the station. Assuming it’s not full of idiots with 4x4s and an over-developed sense of entitlement.
Today a few news outlets picked up the confirmation of the discovery of an Earth-like planet in the habital zone of a star 600 light years away, but the closest such planet discovered so far. This has created an excited buzz as indeed it should. Life certainly exists elsewhere in the universe, and we know a planet like ours can sustain life quite well, albeit grudgingly at times, so finding a planet like our own “just” 600 light years away is indeed exciting.
Well, is it? Alas I am a bit meh about the whole thing.
Let’s assume that there’s a civilisation as advanced as ours there. The bads news is that we’re never going to visit them, and we’re never going to establish meaningful communications with them. Let’s look at the best possible timeline.
A “Hello Kepler 22-b” signal sent today will reach them no earlier them December 5th 2611 so we’ve got some finger tapping to do between now and then. And we’re assuming they’re looking for a signal, and spot it, and can decode it. If they do all that, and send us back engineering plans for their FTL communications device right away, then we’ll be getting those no sooner than December 3211, twelve centuries from now. And then we merely have to build a device designed by an alien species who almost certainly won’t be using the same engineering principles we are.
Remember what happened to the Mars Climate Orbiter?
Okay, so while we’re waiting, let’s send a ship up there. Twelve centuries is plenty of time to develop space exploration technology. At some point during this maybe we will figure how to build a useful FTL communications device, in which case we can beam the specifications over to Kepler 22-b. It’ll be at least a 600 year wait for them to get back to us, but no harm in trying.
If we’re sending a ship, and we don’t have FTL yet, manning it isn’t really an option. At light speed, it’s a 600 year trip, at half light speed it’s 1200 years, and so on. People just don’t live that long so we’d be looking at building a generation ship, currently way beyond our current technology, and beyond anything we’re likely to achieve in the next century at least.
Unmanned is easier, and we’re good at that. We’ve had probes in space for decades that are still working just fine. None of the complexities of life-support, all that’s needed is a nice big nuclear plant for electricity and a nice big antenna for talking back to Mother Earth. Cunning use of orbital slingshots, especially using the gas giants, means we could get this baby really moving through space. With the nations of the world behind the project, we could launch this inside a couple of years carrying all the knowledge we dare share with the Keplians. And then, again, we sit back and wait, and work on that FTL communications device.
The fastest speed attained by a probe launched from Earth is about 157,000 mph. This was achieved by Helios probes using the Sun’s gravity well. We have a pretty good grasp of orbital mechanics, so I don’t expect it’d be too difficult to design a slingshot approach to the Sun that would take our probe, accelerate it to this sort of speed and then send it in exactly the right direction to meet up with Kepler 22-b in a few years time. That was sarcasm. We have zero experience of sending probes into interstellar space, the existence of a planet tells us nothing about how to navigate a probe through distant gravity fields to get there. Despite the moon’s gravitational interaction with the Earth being quite well understood, Apollo spacecraft on trips to and from the moon routinely had to use course-correction burns to make sure they attained successful moon orbit and earth re-entry.
So we do build our probe, and we do manage to find a course to send it on its way at 260,000 (we got better) km/h. What next? Well what happens is we wait. A long time.
The Solar system is big, much bigger than most people realise. At the center is our Sun and one of the furthest significant objects from it we know about is Pluto. Worst case, Pluto is 48.871AU from the Sun, that’s roughly 7.38 billion kilometers. Time to get there at our probe’s speed is 28,120 hours, or 3 years. Not too shabby. Alas Pluto is not the edge of the solar system.
Voyager 1 will beat our probe to interstellar space. It’s currently about 2.5 times further away fom the sun than Pluto is. Being generous, launched today, our probe will get there around 2020. Voyager 1 was launched in 1977. So off into the inky black and on to Kepler 22-b.
Alas this is still not the edge of the solar system.
It it theorised that there is a sphere of leftover junk from the formation of the solar system called the Oort Cloud. It’s thought to be where some of our long-period comets come from. Recall that Pluto, at worst was about 49AU from the Sun? Well the Oort Cloud is thought to be 50,000AU from the Sun, and marks the edge of the Sun’s gravitational influence. Conveniently, this is quite close to the distance of 1 light year. Less conveniently, this means our probe is going to take the thick end of ten millenia to make it this far at best speed. Keppler 22-b is 600 light years away, so a mere 5 and a bit million years in space for our probe.
I would like to think that mankind will travel between the stars. But it’s not going to happen in my lifetime, nor is it likely to in the next several centuries. Looking out into the universe to see what we can learn is great science but, really, we need to focus on making sure we survive as a species, something we seem determined not to do.
We should have had a permanent manned presence on the moon by now. We have taken all the hard work done to get us to the moon and allowed it to be washed away. With the end of the space shuttle programme, the country that worked hardest to put a man on the moon now has no way of putting a man in orbit. And we watched and allowed that to happen.
I consider myself to be an orphan of the Apollo project.
Matt has just released virt-p2v and virt-v2v 0.8.5. Packages will be available in Fedora 16 updates-testing shortly. Read this for the full instructions:
https://www.redhat.com/archives/libguestfs/2011-December/msg00061.html
We’ve been using blkid successfully in libguestfs for a while, but in a piecemeal fashion. New in libguestfs ≥ 1.15.9 is that you can now get all the information that blkid knows about any device:
><fs> blkid /dev/vg_f15x32/lv_root UUID: 9293385f-3200-4694-8f4b-e20bb8d73c37 VERSION: 1.0 TYPE: ext4 USAGE: filesystem MINIMUM_IO_SIZE: 512 PHYSICAL_SECTOR_SIZE: 512 LOGICAL_SECTOR_SIZE: 512 ><fs> blkid /dev/vda1 UUID: d2cd4319-f515-4be2-9a5c-fc8b57b53723 VERSION: 1.0 TYPE: ext4 USAGE: filesystem MINIMUM_IO_SIZE: 512 PHYSICAL_SECTOR_SIZE: 512 LOGICAL_SECTOR_SIZE: 512 PART_ENTRY_SCHEME: dos PART_ENTRY_TYPE: 0x83 PART_ENTRY_FLAGS: 0x80 PART_ENTRY_NUMBER: 1 PART_ENTRY_OFFSET: 2048 PART_ENTRY_SIZE: 1024000 PART_ENTRY_DISK: 252:0
Thanks to Wanlong Gao [awesome photo!] for adding this.
Sometimes I need to test an http server that is listening on a unix socket. It’s really easy to do this using socat, but the socat man page is pretty long. Here it is for anyone who needs it in the future, and me when I inevitably forget.
In this case the server is unicorn, but this will work for any http server listening on a socket, for instance thin. The lines beginning with “–>” are lines I typed (the 4 lines at the start), remove the “–>” when you try this.
$ socat - UNIX-CONNECT:/u/apps/app/shared/sockets/unicorn.sock,crnl -->GET /session/new HTTP/1.1 -->Host: thehostname.com -->X-Forwarded-Proto: https --> HTTP/1.1 200 OK Date: Fri, 02 Dec 2011 14:37:23 GMT Status: 200 OK Connection: close Strict-Transport-Security: max-age=31536000 Content-Type: text/html; charset=utf-8 X-UA-Compatible: IE=Edge,chrome=1 ETag: "2346c47c7cb3bc37729e42fc8b20c821" Cache-Control: max-age=0, private, must-revalidate Set-Cookie: _x_session=blablabla; path=/; HttpOnly; secure X-Request-Id: c0a374f460d1b1205df450ab77dd2328 X-Runtime: 0.159219 <!DOCTYPE html> <html lang="en" data-behavior="wallpaper"> <head> etc.
For those interested in the relevance of the crnl option at the end of the socket path, this from the man page:
Converts the default line termination character NL ('\n', 0x0a)
to/from CRNL ("\r\n", 0x0d0a) when writing/reading on this
channel (example). Note: socat simply strips all CR characters.
I have to log in to post a reply to this, so I’ll write a short reply here instead:
Kevin, you are calling group 3 a “vocal minority”. But you present no hard data about how many people are actually in each group. So there is no evidence on which to say that this group is a minority, or even that the responses break down into these four groups at all. You hope that group 2 is large, but where’s the evidence that people really did check their firewalls and re-enable SELinux as a result of this pointless key change?
Here is the video, handout and transcript:
http://libguestfs.org/download/seminars/2011-11-18-introduction-to-libguestfs/
How did I do it in the end? Using ffmpeg on the command line and the editing script from my previous posting.
#!/bin/bash -
set -e
input="libguestfs-20111118 1602-1.mp4"
output="libguestfs-webinar-2011-11-18-final.avi"
codec="-b 500k -vcodec libx264 -ab 128k"
codec_novideo="-vn -ab 128k"
codec_noaudio="-b 500k -vcodec libx264"
cd /tmp
# part1: verbatim
# part2: replace video with "network failure" slide
# part3: verbatim
# part4: replace video with slide #5 from handout
# part5: verbatim
# part6: replace video with slide #1 from handout
split () {
rm -f part1.avi part2_audio.avi part3.avi part4_audio.avi part5.avi part6_audio.avi
ffmpeg -i "$input" -t 00:11:30 $codec part1.avi
# end 13:33
ffmpeg -i "$input" -ss 00:11:30 -t 00:02:03 $codec_novideo part2_audio.avi
# end 32:03
ffmpeg -i "$input" -ss 00:20:09 -t 00:11:54 $codec part3.avi
# end 34:20
ffmpeg -i "$input" -ss 00:32:03 -t 00:02:17 $codec_novideo part4_audio.avi
# end 40:46
ffmpeg -i "$input" -ss 00:34:20 -t 00:06:26 $codec part5.avi
# end 49:32
ffmpeg -i "$input" -ss 00:41:55 -t 00:07:37 $codec_novideo part6_audio.avi
}
static_slides () {
# to replace part2 video
rm -f part2_video.avi
ffmpeg -loop_input -i /tmp/network_failure.png -t 00:02:03 \
-vf pad='1024:768' -r 8 $codec_noaudio part2_video.avi
# to replace part4 video
rm -f part4_video.avi
ffmpeg -loop_input -i /tmp/slide6.png -t 00:02:17 \
-vf pad='1024:768:iw/2' -r 8 $codec_noaudio part4_video.avi
# to replace part6 video
rm -f part6_video.avi
ffmpeg -loop_input -i /tmp/slide1.png -t 00:07:37 \
-vf pad='1024:768:iw/2' -r 8 $codec_noaudio part6_video.avi
}
combine () {
# combine audio and video
rm -f part2.avi
ffmpeg -i part2_audio.avi -i part2_video.avi $codec part2.avi
rm -f part4.avi
ffmpeg -i part4_audio.avi -i part4_video.avi $codec part4.avi
rm -f part6.avi
ffmpeg -i part6_audio.avi -i part6_video.avi $codec part6.avi
}
assemble () {
rm -f "$output"
# Concatenate parts into final video. Note no transcoding here.
mencoder part{1,2,3,4,5,6}.avi -ovc copy -oac copy -o "$output"
}
split
static_slides
combine
assemble
The final video isn’t a fully open format, in that it uses patented (in the US) H.264 and MP3. However it is fully playable with free software, particularly outside the US. The other advantage of using libx264 is it resulted in the smallest file size of all the codecs I tried.
Yesterday, LoveFilm announced that they are changing the technology which powers their film streaming service. From early in January the existing Flash-based system will be replaced by one which uses Microsoft’s Silverlight technology. This is extremely disappointing for a couple of reasons.
Firstly, there’s the immediate technological fallout. Silverlight doesn’t run on as many platforms as Flash does. Anyone running an older (non-Intel) Mac will no longer be able to use this service. Neither will people running Linux on their PC. This also means that people trying to access the service on an Android device will be out of luck. I don’t know how many of LoveFilm’s customers this will affect, but it can’t be a trivial number.
But it’s the second reason that makes me even more depressed. And that’s the reasoning behind the decision. Paul Thompson, the project manager for the streaming service says this:
We’ve been asked to make this change by the Studios who provide us with the films in the first place, because they’re insisting – understandably – that we use robust security to protect their films from piracy, and they see the Silverlight software as more secure than Flash.
Simply put: without meeting their requirements, we’d suddenly have next-to-no films to stream online.
This is a change that the company have been forced into by the studios who make the films that LoveFilm want to stream. The studios believe that their content needs to be protected from piracy and that Silverlight provides a higher level of security than Flash does.
They’re probably right. But they’re fighting the wrong battle.
Remember when all the digital music that you could buy had DRM? Remember what a pain it was keeping track of how to play particular tracks or which devices your were allowed to play them on? Or perhaps you don’t remember that because you were sensible enough to steer clear of that madness. Perhaps you did what most people did and just ripped your CDs or *ahem* “acquired” music from elsewhere. Eventually the record companies realised that they were fighting a battle that they couldn’t win and now we all happily buy MP3s with no DRM. Well, I say “all”, but one of the fallouts from this battle is that a generation grew up with no experience of paying for music. There are still a large number of people who think nothing of downloading music of dubious provenance rather than buying it from Amazon or iTunes. If the record companies had seen sense earlier, they might have not lost an entire generation’s worth of income.
And that’s apparently where we see ourselves again now. The film studios think they are protecting their content, but actually they are training people to go elsewhere. I would love to be able to buy digital copies of films to download or to rent access to streaming versions, but they need to be DRM-free versions that I can use as I want to use them. Not crippled versions that I can only use on devices and in ways that are approved by the studios. And if the studios are going to stop suppliers from giving me what I want, then I’ll go elsewhere. It’s not as if it’s hard to track down versions of any film or TV show that has ever been released on DVD. Or shown on a digital TV channel. We all know where to get these things, right? And we all use them. Because we’re being trained to believe that it’s the easiest way to get hold of this content. And when the easiest way is also the cheapest way, the studios lose out.
It’s not just the film studios who are re-fighting the same battle. Book publishers are doing the same thing. Pretty much any Kindle book that you buy from Amazon will have DRM. The publishers are following exactly the same short-sighted logic and reaching the same flawed conclusions. They have a slight advantage over the record labels and film studios as their old-style product is a lot harder to rip into digital format. But the arguments against what they’re doing are just as valid. Kindle book DRM has been broken repeatedly. And once the DRM is removed from just one copy of a product, the producer of that product has lost the game.
Those who do not learn from history are condemned to repeat it. The film studios and the publishers are repeating the mistakes that the record labels were making last decade. They run the risk of alienating and losing the support of a whole generation of potential customers.
Update: I should point out that there is a Linux port of Silverlight called Moonlight. But, as I understand it, it doesn’t support the DRM features that LoveFilm would be relying on.
Larger interactive versions of all the graphs on this page are available here.
Update: Added Mailgun to the graphs.
Earlier this year I posted a price comparison between Sendgrid, and the then newly available Amazon SES.
Tim Falls commented on the post saying that Sendgrid had updated their pricing:
Since this post was published, we have released a new pricing structure *and* a new service tier that offers more email for less + a feature set and pricing model that you will find very competitive with SES.
That was back in June, so it’s about time I produced an updated comparison. First, lets look at the difference between the old and new Sendgrid prices:
Overall the up-front plan prices, and prices for email over allowance have remained the same, but email allowance within each plan has increased. The exception is the Silver plan where email over allowance has increased by $0.0001/email. New to the lineup is the Lite plan.
More interesting is how these new prices compare to the competitors. I’ve added in Amazon SES, and Postmark too:
The most notable differences here are the inclusion of Postmark, and the the Sendgrid Lite plan that shadows Amazon SES. I’d guess this was added purely to compete with Amazon. As in my last post it is hard to see what is going on with smaller numbers of emails being sent, here’s a zoom on the origin:
Here you can see the Sendgrid Lite plan shadowing Amazon and the Postmark costs heading up rapidly.
It seems Sendgrid have just added an ‘Amazon SES’ plan to pull back any customers that would have chosen SES based on price. It’s probably a good move, and it will allow easy transition into their more ‘premium’ plans if you sign up and later decide to change plan.
Given the advertised features of Postmark compared to the price it seems hard to consider using them. They seem to have some fairly well known customers though, so if anyone has used Postmark leave a comment with how that is working out for you.
So which email cloud provider should you use? Use the graphs I made, but price is only going to be one factor, so check what each provider offers. I’ve linked to all the pricing pages below.
After my failure yesterday to find a video editor that doesn’t suck, and because I want to get the libguestfs webinar out as soon as possible, I’m going to take an alternative approach to this.
Here is the unedited video:
http://oirase.annexia.org/tmp/libguestfs-20111118%201602-1.mp4 (13758086 bytes)
And here are my video editing instructions!
| 11:30-13:30 | Because of a network drop, we lost the video during this part, although the sound was fine. This could be left, rerecorded, or replaced with a static slide. |
|---|---|
| 13:30-20:09 | Completely cut this section. |
| 32:03-34:20 | Replace video with slide #5 from the handout. Leave audio. |
| 40:46-41:55 | Cut this section. |
| 41:55-49:32 | Replace video with generic slide, eg. slide #1. Leave audio. |
| 49:32-end | Cut. |
Note the video is straight from webex, untouched, so it’s in a proprietary format (avc1 video, mp4a audio). Most Linux players will play it just fine.
Since I forgot how to use Blender, I thought I’d try out a different video editor.
kdenlive. Usability FAIL. You can’t just load a video clip and edit it, unless it fits a “profile”. This video clip is a screen capture at 1024×768 so of course it doesn’t fit any existing profile like HD, DVD, 720p etc.
Why is video editing so hard?
I don’t usually get up early enough to listen to Thought For The Day, but I happened to catch it this morning, and it reminded me just how ludicrous and out of place this segment is in the otherwise sober and serious Today Programme on Radio 4.
(Don’t just believe me, listen to the nonsensical ramblings of Akhandadhi Das [MP3] from their podcast)
Oddly I find myself in agreement with AN Wislon (warning: Daily Mail link). Don’t put an atheist “counterbalance” on this program. Just abolish it altogether. There’s no place for it in a news programme.
I just ran a short seminar where I used tmux to share a terminal with other users. It was quite effective. This posting describes how to set it up.
You need a shared ssh account that you’re willing to allow the other participants to log into. I set up a new account with a default password, and opened up the firewall ports to allow ssh in. By the way, I doubt this is very secure, so this may not be suitable for seminars with untrusted users.
In your standard account (not the shared one), run tmux like this:
tmux -S /tmp/shared
/tmp/shared is the shared tmux socket that the shared account users will connect to. It is created with restricted permissions, so you have to also do this:
chmod 777 /tmp/shared
Now I changed the shared account’s shell (in /etc/passwd) to point to a script called /home/shared/run-tmux which contains:
#!/bin/sh - exec /usr/bin/tmux -S /tmp/shared attach -r
When the shared user logs in, they will immediately be attached, read-only (-r), to the shared tmux session. I also had to make this script owned by root, unwritable, and had to give it an SELinux label so that sshd could run it:
chown root.root /home/shared/run-tmux chmod 0555 /home/shared/run-tmux chcon system_u:object_r:bin_t:s0 /home/shared/run-tmux
Seminar users now ssh to the shared account, and see the shared screen:

The only peculiarity of tmux is that it resizes the window area to the size of the smallest client, even for read-only clients. Thus if any client makes their windows smaller, you see this:

There is probably some tmux configuration to avoid this, but I couldn’t immediately see it.
I was writing a Ruby script recently that needed to download 43 2GB chunks of a database backup from a remote source, then decrypt each chunk, then finally concatenate the decrypted files together.
I knew I wanted to use threads to do this as it would speed up the overall process a great deal, and the downloading and decryption can be done in any order, it doesn’t matter if chunk 5 is downloaded before or after chunk 35, and the same with decryption. Those processes all operate on discrete files on the filesystem.
Where order does matter however is when the script is concatenating the files together into the final output file (in this case an lzop archive).
While looking how to handle this I discovered Ruby’s Queue class which “…provides a way to synchronize communication between threads“. Great, that’s exactly what I needed.
In my script I set up two thread-pools, one for downloading and one for decrypting, each with it’s own queue. At the start of the script I push all the download jobs on the download queue. The download thread pool workers download them then push them onto the decrypt queue. The decrypt queue can then get to work. It flows a little like this:
[download queue] -> [download pool] -> [decrypt queue] -> [decrypt pool]
However one last step remained, the concatenation. I used a queue again for this but needed to handle the jobs in order or I would end up with a useless lzop archive, so I came up with the following code to help with this:
You can see from the output that though the work units appear on the queue in any order, they will always be processed in the correct order:
[1.9.2] ~ $ ruby queue.rb
popping the stack
vals is now [16]
popping the stack
vals is now [1, 16]
popping the stack
vals is now [1, 11, 16]
popping the stack
vals is now [1, 11, 16, 19]
popping the stack
vals is now [1, 6, 11, 16, 19]
popping the stack
vals is now [1, 6, 11, 16, 18, 19]
popping the stack
vals is now [1, 6, 11, 15, 16, 18, 19]
popping the stack
vals is now [1, 6, 8, 11, 15, 16, 18, 19]
popping the stack
vals is now [0, 1, 6, 8, 11, 15, 16, 18, 19]
Processing 0
Processing 1
popping the stack
vals is now [5, 6, 8, 11, 15, 16, 18, 19]
popping the stack
vals is now [3, 5, 6, 8, 11, 15, 16, 18, 19]
popping the stack
vals is now [3, 5, 6, 8, 11, 14, 15, 16, 18, 19]
popping the stack
vals is now [3, 5, 6, 8, 10, 11, 14, 15, 16, 18, 19]
popping the stack
vals is now [3, 5, 6, 7, 8, 10, 11, 14, 15, 16, 18, 19]
popping the stack
vals is now [3, 5, 6, 7, 8, 9, 10, 11, 14, 15, 16, 18, 19]
popping the stack
vals is now [2, 3, 5, 6, 7, 8, 9, 10, 11, 14, 15, 16, 18, 19]
Processing 2
Processing 3
popping the stack
vals is now [4, 5, 6, 7, 8, 9, 10, 11, 14, 15, 16, 18, 19]
Processing 4
Processing 5
Processing 6
Processing 7
Processing 8
Processing 9
Processing 10
Processing 11
popping the stack
vals is now [14, 15, 16, 17, 18, 19]
popping the stack
vals is now [14, 15, 16, 17, 18, 19, 20]
popping the stack
vals is now [13, 14, 15, 16, 17, 18, 19, 20]
popping the stack
vals is now [12, 13, 14, 15, 16, 17, 18, 19, 20]
Processing 12
Processing 13
Processing 14
Processing 15
Processing 16
Processing 17
Processing 18
Processing 19
Processing 208
Processing 19
Processing 20
If you want to help out with libguestfs testing, I’ve prepared a series of manual tests you can try out here (particularly with Fedora 16 updates-testing libguestfs 1.14.2-1):
http://libguestfs.org/guestfs-testing.1.html
All the notes and programs from today’s libguestfs seminar are now available in this git repository, in the 2011-seminar subdirectory.
Updated x 4
Download this handout which contains slides that accompany the talk.
I’ll be holding a libguestfs live “webinar” this Friday, 18th November 2011 at 16:00 UTC.
To convert the time to your location, do:
date -d '2011-11-18 16:00Z'
The programme will include:
Don’t worry if you can’t make it or if you can’t get Webex working. It will all be recorded and put online in an open format soon afterwards.
This is a Webex conference. See the end of this posting for details on how to get this working on Linux (hint: it’s not simple).
——————————————————
To join the online meeting (Now from mobile devices!)
——————————————————
1. Go to
https://redhat.webex.com/redhat/j.php?ED=147474492&UID=1224398107&PW=NMGVhMThkZjcx&RT=MiMxMQ%3D%3D
2. If requested, enter your name and email address.
3. If a password is required, enter the meeting password: friday
4. Click “Join”.
To view in other time zones or languages, please click the link:
https://redhat.webex.com/redhat/j.php?ED=147474492&UID=1224398107&PW=NMGVhMThkZjcx&ORT=MiMxMQ%3D%3D
——————————————————
To join the audio conference only
——————————————————
To receive a call back, provide your phone number when you join the meeting, or call the number below and enter the access code.
Call-in toll-free number (US/Canada): 1-877-668-4493
Call-in toll number (US/Canada): +1-408-600-3600
Global call-in numbers:
https://redhat.webex.com/redhat/globalcallin.php?serviceType=MC&ED=147474492&tollFree=1
Toll-free dialing restrictions:
http://www.webex.com/pdf/tollfree_restrictions.pdf
Access code:641 248 458
To add this meeting to your calendar program, click this link:
https://redhat.webex.com/redhat/j.php?ED=147474492&UID=1224398107&ICS=MI&LD=1&RD=2&ST=1&SHA2=tWADgr2Qmvu/AdEm1x/a2CY/9jMOWhTDniqRjXBvCNg=&RT=MiMxMQ%3D%3D
Webex tips:
Try the Webex test meeting: http://www.webex.com/test-meeting.html
Webex needs a Java plugin for your browser, but be warned that it’s a trial to get all the extra things you need. In particular if it doesn’t work, go into $HOME/.webex/*, locate all *.so files, and install all the missing 32 bit libraries they depend on, ie:
cd ~/.webex
find -name '*.so' | xargs ldd | grep 'not found'
# the gcj version number may be different in the next line
sudo yum install /usr/lib/gcj-4.6.2/libjawt.so
# This list of libraries is taken from the ones needed
# by webex on my machine. Some "No package ... available"
# warnings are expected here.
sudo yum install {/lib,/usr/lib}/{libasound.so.2,libatk-1.0.so.0,libc.so.6,libdl.so.2,libfontconfig.so.1,libfreetype.so.6,libgcc_s.so.1,libgdk_pixbuf-2.0.so.0,libgdk-x11-2.0.so.0,libglib-2.0.so.0,libgmodule-2.0.so.0,libgobject-2.0.so.0,libgtk-x11-2.0.so.0,libm.so.6,libnsl.so.1,libpango-1.0.so.0,libpangoft2-1.0.so.0,libpangox-1.0.so.0,libpangoxft-1.0.so.0,libpng12.so.0,libpthread.so.0,libresolv.so.2,librt.so.1,libstdc++.so.6,libuuid.so.1,libX11.so.6,libXext.so.6,libXft.so.2,libXi.so.6,libXmu.so.6,libXrender.so.1,libXt.so.6,libXtst.so.6,libXv.so.1,libz.so.1}
I recently installed jRuby via RVM and got a weird error:
I tried installing jRuby via brew, and this worked, but I got the same error when installing a gem, so it looked like a Rubygems issue. On a hunch I figured it would be the https entries in my gem sources:
I removed them all and replaced them temporarily with one non-SSL “http://rubygems.org/” entry and I was then able to install jruby-openssl. Once that was installed I deleted the plain old http rubygems.org URL and added back in my SSL URLs. I can now install ruby gems with no error.
I’m on this week’s Pod Delusion talking about Winterval and the Mail’s admission that it was never a replacement for Christmas.
From today’s Daily Mail corrections column:
We stated in an article on 26 September that Christmas has been renamed in various places Winterval.
Winterval was the collective name for a season of public events, both religious and secular, which took place in Birmingham in 1997 and 1998.
We are happy to make clear that Winterval did not rename or replace Christmas.
This is amazing stuff. The Mail has been one of the main papers pushing the “Winterval” myth for many years. At the recent media bloggers meet-up someone said that our constant debunking of this myth was beginning to have some traction, but I didn’t expect to get a correction from the Daily Mail quite so soon.
On the Mail Corrections site I like to link back to the original story. And in this case it seems to be a column by Melanie Phillips where she claimed that “Christmas has been renamed in various places ‘Winterval’”. This, as the Mail now admits, didn’t happen. She ties this non-event in with the recent furore about the BBC banning the terms BC and AD (something else that didn’t happen). Phillips strongly defended her view in an email discussion with Kevin Arscott, so it’s nice to see even the Mail admitting that she was wrong.
Of course, it’ll be interesting to watch what happens next. Will all Mail writers get a memo telling them to stop repeating the lie? It’s approaching prime Winterval season, surely Richard Littlejohn or Peter Hitchens will want to write about it soon.
As always when discussing this myth, I need to link to Kevin Arscott’s forensic investigation of the evidence which is the most thorough debunking of a tabloid lie that I’ve ever seen.
Update: The Mail has updated Phillips’ original column to remove the reference to Winterval and to add the following note at the bottom:
A previous version of this article stated that Christmas has been renamed in various places Winterval. Winterval was the collective name for a season of public events, both religious and secular, which took place in Birmingham in 1997 and 1998. We are happy to make clear that Winterval did not rename or replace Christmas.
That’s the first time I’ve seen them explicitly update a corrected article like that. I hope it’s the start of a trend. This has been a good date for tabloid accuracy in Britain.
Update 2: Tabloid Watch has a fascinating article about how this correction was negotiated
Long-time readers will know that I’m involved with the nms project. This is a project which writes simple software that people can use on their web sites if they want guestbooks, forms that get emailed to them and all that very Web 1.0 stuff. It’s a nice thing that we’ve done. We’ve created something and donated it to the internet.
The programs are all open source. Anyone can download our software and use it pretty much wherever and however they want. We usually have no involvement at all if someone uses one of our programs. We’re most likely to get involved if something goes wrong. This can take two forms. Either the web site owner experiences problems setting up the program or, surprisingly often, the web site owner fails to notice that anything is wrong and it’s a visitor who discovers that the site is broken. The error page for many of the programs contains a link to our web site so a lot of the complaints come to us (who can do nothing about it) rather than the web site owners (who could probably fix it). That was a mistake. We should have made the programs so that the error page gave you the email address of someone who could help.
But it means that I get occasional email from very angry people who have been disappointed by a web site that uses one of our programs. I found this in my inbox this morning.
FUCK YOU, YOU BLOCKING BASTARDS
I don’t know who the hell you are, and I don’t care.
YOU are actively blocking my transmissions and receipts on the internet, and you can GO TO HELL.YOU are the reason that millions of people are protesting all over the world, you ‘information funneling PRICKS’!.
Can’t you twits get a job in the REAL ‘private sector’, like cleaning toilets?
In closing, I would like to say, FUCK YOU TO HELL.
http://republicbroadcasting.org/cgi-bin/test.plTell STADMILLER to get fucked, as well, if he is ‘going along’ with this shit.
HE is still pissed that GCN still exists, isn’t he?
MAYBE he is pissed that I warned him about his on-air reference a couple of years ago to hanging the Congress by lightposts in D.C.,…
GOD!
You are playing ‘the game’, and you will be held accountable.
How does that go, again?
‘WE ARE ANONYMOUS.
‘WE ARE LEGION.
‘WE DO NOT FORGET.
‘WE CANNOT FORGIVE.
‘EXPECT US.’Something like that, isn’t it?
NO HARD FEELINGS, JUST THE FACTS.
I AM
[name redacted on the offchance that it's not a pseudonym]
I have absolutely no idea what he is talking about. The link goes to a web site that has a broken configuration of one of our programs. I can’t even be sure which one it is as the site owner has renamed it. I did what I always do in such situations. I replied politely and explained the situation. I told him that if he explained exactly what the problem was then I would do what I could to put him in touch with someone who runs the site in question. Often this approach leads to an apology for the original rudeness. Which is nice.
But it’s not much fun living in a world where you can do a nice thing like giving away software and that opens you up to abuse like this.
Daddy’s being awful,
Daddy’s being mean,
Daddy’s giving me a bath,
He’s making me all clean.
Daddy isn’t listening,
He just doesn’t seem to hear,
I don’t want a bath today,
GET ME OUT OF HERE!
In Red Hat Enterprise Linux 6.3 we are rebasing libguestfs to 1.14.x, plus putting out new versions of hivex and febootstrap.
You can now download preview packages here:
http://people.redhat.com/~rjones/libguestfs-RHEL-6.3-preview/
These are in very rough shape at the moment. In particular we may remove a few things, depending on which features we think will be supportable for RHEL. Probably live support will be dropped, and maybe some new tools if they aren’t polished enough.
Read the README file before installing them.