Planet GLLUG

May 17, 2012

GLLUG

Wednesday 6th June 2012 - Social Meeting

After the somewhat successful relaunch of the Lincolnshire LUG and the
huge turn out at the GitHub London drink up a few weeks ago it really
is time to get the largest Linux user base in the UK back together.

We're starting out informally, just to gauge interest and to discuss
plans, locations, dates etc. over a few drinks. We want as many people
to come along as possible. Whether you're a GLLUG regular, or simply
have an interest in finding out more about Linux or Free software.

We have booked out a section of The Skinners Arms (5 minutes walk from
Kings Cross Station) for the 6th of June from 6pm. You can find us at
the back and we'll be bringing along a little fluffy Tux so you'll know
you're in the right place.

The Skinners Arms has a great selection of beers and a pretty standard menu.

We've booked for 30 people so we're hoping to freak out the Landlord
and get many more than that. If you're having difficulties finding the
place or what more information you can e-mail Matthew Copperwaite or on
the day you can phone him on 0776 367 7840.

Really hope to see you there.

The Skinners Arms
114 Judd Street
London
WC1H 9NT

Map

May 17, 2012 10:48 AM

May 15, 2012

Richard WM Jones

rich

The OCaml Users and Developers Conference (14th September 2012, Copenhagen) is looking for speakers!

I’m intending to submit a talk on using OCaml for code generation in libguestfs.


May 15, 2012 07:43 PM

May 14, 2012

Richard WM Jones

rich

Previously if you wanted to mount a disk image on the host from libguestfs, you had to use a separate program called guestmount.

A couple of months ago, we added FUSE support directly into the libguestfs API, and rewrote guestmount to use it. This also means you can use FUSE from your own libguestfs programs.

Yesterday I wrote a short example of using the mount-local API from C. This program creates a new disk image, formats it etc using libguestfs, then gives you a subshell so you can copy your own files, directories etc. in. When you quit the subshell, the disk image is synced and closed, and you end up with a virtual disk image containing all the files you just added. (Nothing that you couldn’t easily do before, but a nice little demonstration anyway).

Here it is in use:

$ gcc -Wall mount_local.c -o mount_local -lguestfs
$ ./mount_local /tmp/test.img

This is the 'mount-local' demonstration program.  Follow the
instructions on screen.

Creating and formatting the disk image, please wait a moment ...

The _current directory_ is a FUSE filesystem backed by the disk
image which is managed by libguestfs.  Any files or directories
you copy into here (up to 512 MB) will be saved into the disk
image.  You can also delete files, create certain special files
and so on.

When you have finished adding files, hit ^D or exit to exit the
shell and return to the mount-local program.

mount-local-shell> ls
lost+found  PUT_FILES_AND_DIRECTORIES_HERE

From the subshell, I copy in some files:

mount-local-shell> cp -a /usr/share/doc/libguestfs-devel-1.17.40/ .
mount-local-shell> ls
libguestfs-devel-1.17.40  lost+found  PUT_FILES_AND_DIRECTORIES_HERE
mount-local-shell> ls libguestfs-devel-1.17.40/
AUTHORS			       example-ubuntu.xml
BUGS			       example-windows-2003-x64-cd.xml
ChangeLog		       example-windows-2003-x86-cd.xml
copy_over.c		       example-windows.xml
create_disk.c		       example-windows-xp-cd.xml
display_icon.c		       HACKING
example-debian-netinst-cd.xml  inspect_vm.c
example-debian.xml	       README
example-fedora-dvd.xml	       RELEASE-NOTES
example-fedora-netinst-cd.xml  ROADMAP
example-fedora.xml	       TODO
example-rhel-6-dvd.xml	       virt-dhcp-address.c
example-rhel-6-netinst-cd.xml  virt-inspector.rng
example-ubuntu-live-cd.xml

After copying in my files, I exit from the subshell:

mount-local-shell> exit

Any files or directories that you copied in have been saved into
the disk image called '/tmp/test.img'.

Try opening the disk image with guestfish to see those files:

  guestfish -a /tmp/test.img -m /dev/sda1

Here is the disk image that was created (note it is sparse, so it’s not really so large as it appears):

$ ll /tmp/test.img
-rw-r--r--. 1 rjones rjones 536870912 May 14 12:03 /tmp/test.img
$ du -sh /tmp/test.img
18M	/tmp/test.img

We can use guestfish to look inside it:

$ guestfish -a /tmp/test.img -m /dev/sda1

Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

><fs> ll /
total 18
drwxr-xr-x  4 root root  1024 May 14 12:03 .
drwxr-xr-x 23 1000 1000  4096 May 14 12:18 ..
-rw-r--r--  1 root root     0 May 14 12:03 PUT_FILES_AND_DIRECTORIES_HERE
drwxr-xr-x  2 root root  1024 May 14 08:37 libguestfs-devel-1.17.40
drwx------  2 root root 12288 May 14 12:03 lost+found

Download the test program here: https://github.com/libguestfs/libguestfs/blob/master/examples/mount_local.c


May 14, 2012 11:22 AM

May 08, 2012

Richard WM Jones

rich

100000007003899576467 = 3.3.3.3.3.3.3.3.3.3.23.73630821715421
100000007003899576466 = 2.307 ...
100000007003899576465 = 5.67.298507483593730079
100000007003899576464 = 2.2.2.2.3.11.29.6143.121439.8754461
100000007003899576463 = 127.136649.5762220213481
100000007003899576462 = 2.7.7142857643135684033
100000007003899576461 = 3.33333335667966525487
100000007003899576460 = 2.2.5.101.191.223.1249.930567739
100000007003899576459 = 1031.6577.51769.284868053
100000007003899576458 = 2.3.3.5555555944661087581
100000007003899576457 = 13.17.19.41.47.6607.1870544887
100000007003899576456 = 2.2.2.3359.3721345899222223
100000007003899576455 = 3.5.7.7.8963.15179563906931
100000007003899576454 = 2.67957.158591.4639351721
100000007003899576453 = 11.9090909727627234223
100000007003899576452 = 2.2.3.107.96293.171203.4724207
100000007003899576451 =  ...
100000007003899576450 = 2.5.5.37.6833.7910735817349
100000007003899576449 = 3.3.673.16509824501221657
100000007003899576448 = 2.2.2.2.2.2.2.7.2447.45609787770329
100000007003899576447 = 4111.656603.37046713859
100000007003899576446 = 2.3.281.683.86840388249367
100000007003899576445 = 5.313.331.85931.2246507273
100000007003899576444 = 2.2.13.23.43 ...
100000007003899576443 = 3.89.30859.427001.28423531
100000007003899576442 = 2.11.4545454863813617111
100000007003899576441 = 7.14285715286271368063
100000007003899576440 = 2.2.2.3.3.3.5.17 ...
100000007003899576439 = 557.165037.1087836219871
100000007003899576438 = 2.19.149.5309.895469.3715069
100000007003899576437 = 3.31.1075268892515049209
100000007003899576436 = 2.2.797 ...
100000007003899576435 = 5.29.689655220716548803
100000007003899576434 = 2.3.7.79.30138639844454363
100000007003899576433 = 8369.11948859720862657
100000007003899576432 = 2.2.2.2.59.765949.138301911497
100000007003899576431 = 3.3.11.11.13.2003.6173.571283357
100000007003899576430 = 2.5.10000000700389957643
100000007003899576429 = 18133 ...
100000007003899576428 = 2.2.3.523.1181.13491716222263
100000007003899576427 = 7.353.45319.892990763323
100000007003899576426 = 2 ...
100000007003899576425 = 3.5.5.867253 ...
100000007003899576424 = 2.2.2.4751 ...
100000007003899576423 = 17.53.73.83.511963.35779619
100000007003899576422 = 2.3.3.941.5903885169671719
100000007003899576421 = 23.7537.576864321543571
100000007003899576420 = 2.2.5.7.11.71.167.269.3823.5325347
100000007003899576419 = 3.19.1754386087787711867
100000007003899576418 = 2.13.3846154115534599093
100000007003899576417 =  ...
100000007003899576416 = 2.2.2.2.2.3.41.25406505844486681
100000007003899576415 = 5 ...
100000007003899576414 = 2 ...
100000007003899576413 = 3.3.3.7.37.14300015301572941
100000007003899576412 = 2.2.103.106109.171469.13340281
100000007003899576411 = 100000007003899576411
100000007003899576410 = 2.3.5.47.61 ...
100000007003899576409 = 11.9203.987820246400873
100000007003899576408 = 2.2.2.97.251.4567.89021.1262819
100000007003899576407 = 3.139 ...
100000007003899576406 = 2.7.7.17.29.31.8311.29339.273821
100000007003899576405 = 5.13 ...
100000007003899576404 = 2.2.3.3.359.521 ...
100000007003899576403 = 163.389.977.10993.146842589
100000007003899576402 = 2 ...
100000007003899576401 = 3.43.775193852743407569
100000007003899576400 = 2.2.2.2.5.5.19.1607.8187862886377
100000007003899576399 = 7.14285715286271368057
100000007003899576398 = 2.3.11.23.67.263.647.5273.1095811
100000007003899576397 = 480941 ...
100000007003899576396 = 2.2.25000001750974894099
100000007003899576395 = 3.3.5.2222222377864435031
100000007003899576394 = 2.2347.21303793567085551
100000007003899576393 = 113.6637.133336720535453
100000007003899576392 = 2.2.2.3.7.13.5051.17791.509529893
100000007003899576391 = 131.211.999853.3618346267
100000007003899576390 = 2.5.199.50251259800954561
100000007003899576389 = 3.17.1960784451056854439
100000007003899576388 = 2.2.25000001750974894097
100000007003899576387 = 11.197.65899.700264797439
100000007003899576386 = 2.3.3.3.3 ...
100000007003899576385 = 5.7.2857143057254273611
100000007003899576384 = 2.2.2.2.2.2.25169.62080341270449
100000007003899576383 = 3.16889.1973671364081149
100000007003899576382 = 2.541.691.133750286899561
100000007003899576381 = 19.997.4271.35407.34908611
100000007003899576380 = 2.2.3.5.4327 ...
100000007003899576379 = 13.76379.100712345423077
100000007003899576378 = 2.7.5857.1219542025462811
100000007003899576377 = 3.3.29.8011.47826961588687
100000007003899576376 = 2.2.2.11.37.151.7219.41761.674669
100000007003899576375 = 5.5.5.23.23.31.41.109.10915969081
100000007003899576374 = 2.3.16666667833983262729

I just don’t know what it is.


May 08, 2012 07:40 PM

May 06, 2012

davblog - Dave Cross

Week Notes 17 & 18

Another fortnight with no blog posts.

Health

Getting used to paying close attention to what I’m eating and how much I’m exercising. And for the first week of this fortnight that was starting to work and I shifted a few pounds. This week I’ve been staying in a hotel in Edinburgh and all of my good work has been undone. Just need to start again I suppose.

Last time I mentioned how my had suggested that I bought a Fitbit as it would encourage me to take more notice of what my body was doing. Turns out that this is a really good idea. And it also turns out that’s it’s a bit of a growing movement. O’Reilly have just published a book called Fitness for Geeks which looks at this whole area in some detail. I have a copy which I’m looking forward to reading. Once I’ve finished it, I’ll write a review.

Training and Speaking

As I mentioned above, I’ve been in Edinburgh all this week. I ran five days of Perl training for staff at Edinburgh University. Everyone seemed happy with the way it went and there’s a chance I’ll be invited back again at some point in the future.

But in the previous week I arranged another training course. It all happened rather quickly and, to be honest, took me a bit by surprise. It was a case of a few things all coming together at the right time.

Five years ago, the London Perl Mongers, with lots of help from the BBC, ran what we called a “Perl Teach-In”. It was a one-day, free Perl training course. It was a great success. The fifty places on the course were all booked in a couple of days and everyone who came on the day agreed that it was a great idea.

For a few months now, as we approached the fifth anniversary of the Teach-In, I’ve been thinking that it would be nice to do it all over again. I spoke to a few people to get a few ideas, but nothing really came together. A couple of months ago, I heard about Google’s new Campus venue in London and I contacted them to find out what they would charge to hold a training event there. For several weeks I got no reply.

Then, about ten days ago, Google got back to me asking what date I wanted to hold my event. I asked them what it would cost and they told me it would be free. So we set a date of 4th August for the second free Perl Teach-In. This time all the places were booked in just under 24 hours. Which seems pretty successful.

If this works, then there’s a good chance that I’d like to make it a more frequent event. But (obviously) I’d like to find some way to make a bit of money out of it. Perhaps I need to look for sponsorship.

May 06, 2012 08:50 AM

May 05, 2012

Richard WM Jones

rich

Japan has turned off its last nuclear reactor.

I’m wondering, how many people will die because of this decision? How many people will die directly because of pollution from fossil fuel sources?

How many from lack of power at some crucial point, like their birth? Or the elderly?

How many in the long term because Japan won’t advance as quickly, advancement being the best way to pull people out of poverty and illness?


May 05, 2012 08:27 PM

rich

Three cheers for CyanogenMod for making my Samsung Galaxy Tab 10.1 usable!

No cheers to Samsung for putting TouchWiz on it and making it unnecessarily hard to root.

Screenshot in a minute when I work out how to copy it off the tablet!


May 05, 2012 07:56 PM

May 04, 2012

Richard WM Jones

openid-fail

… so it’s OK for you all to stop using it now. It was a terrible, user-hostile idea to start with. Browsers can remember passwords securely — they’ve been doing this since long before OpenID existed, and they’ll continue to do it long after it’s gone. OpenID was a poor solution to a non-problem.

This nicely sums up all that’s wrong with OpenID.

Now, stackoverflow, can you please let me log in?


May 04, 2012 12:05 PM

May 02, 2012

Richard WM Jones

rich

I wanted to find out who was closing stdout in my program (ie. who is calling close(1);).

This seems to work in gdb:

(gdb) break close if $rdi == 1

The explanation is that on x86-64, register %rdi is used to pass the first argument to a function. In gdb conditionals, register names are prefixed by $. Hence the condition checks if the first argument to the function is 1.


May 02, 2012 10:22 AM

May 01, 2012

Richard WM Jones

rich

As discussed here previously, gettextize is a particularly sociopathic piece of software that causes unncessary confusion when building any software that it touches.

Well, in libguestfs we finally got rid of it.

The replacement, a simple Makefile.am, is 110 lines long, which is considerably smaller than the maze of m4 macros and shell scripts that it replaced. It also runs much faster because make can compile the PO files in parallel.


May 01, 2012 02:14 PM

rich

The updated FAQ is here:
libguestfs Frequently Asked Questions


May 01, 2012 02:09 PM

April 26, 2012

Richard WM Jones

rich

virt-rescue is a useful “rescue tool” (like a rescue CD) for virtual machines.

New in libguestfs ≥ 1.17.36 is the virt-rescue --scratch[=N] option which lets you create scratch disks to play with.

Firstly it’s useful for playing around with Linux utilities that you might not normally get to use, such as mdadm and btrfs. For example, suppose you want to try spanning a btrfs filesystem over 4 devices. This is now simple and you don’t even need root:

$ virt-rescue --scratch=4
><rescue> mkfs.btrfs /dev/vda /dev/vdb /dev/vdc /dev/vdd
><rescue> mount /dev/vda /sysroot
><rescue> btrfs filesystem show
Label: none  uuid: da1693d6-a89f-4cb6-8405-d277869e289b
	Total devices 4 FS bytes used 28.00KB
	devid    1 size 10.00GB used 2.02GB path /dev/vda
	devid    2 size 10.00GB used 2.00GB path /dev/vdb
	devid    3 size 10.00GB used 1.01GB path /dev/vdc
	devid    4 size 10.00GB used 1.01GB path /dev/vdd

Secondly it’s a way to get a second temporary disk attached to an ordinary guest while you’re rescuing it, for example if you need to temporary copy some data off the guest while you’re fixing it.

# virt-rescue -d Fedora16 --scratch
><rescue> fdisk /dev/vdb
(use fdisk and mkfs to partition the scratch disk
and then use it for temporary data)

April 26, 2012 12:08 PM

April 25, 2012

Richard WM Jones

rich

You should use libguestfs live with libvirt because it takes the pain out of it.

However if for some reason you don’t want to use libvirt, here is how to use it directly. Note normally you should use libvirt and you do not need to do any of this!

(1) Your guest needs to have guestfsd -r installed and running. [Normally you just install libguestfs-live-service which does everything necessary]

(2) You need to start up qemu (the guest) with these special options, or the equivalent. [Normally you just set this up through libvirt]

-chardev pty,id=charserial0
-device isa-serial,chardev=charserial0,id=serial0
-chardev socket,id=charchannel0,path=/tmp/socket,server,nowait
-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.libguestfs.channel.0

(3) Start guestfish and use the attach-method command to point to the socket. [Normally using '-d Guest --live' does all this automatically for you by getting the necessary information out of libvirt]

$ guestfish
><fs> attach-method unix:/tmp/socket
><fs> run
><fs> ll /
[use libguestfs command as normal here]

April 25, 2012 04:20 PM

April 24, 2012

Richard WM Jones

rich

Predictably the no-brand micro SD card (“NCard 3.70 GiB“) that came supplied with the Trim Slice failed completely after a month of light use.

I don’t know whether to blame Trim Slice or the UK resellers, but I expect better for a machine that costs over £250.

Previously & previously.


April 24, 2012 10:20 AM

April 22, 2012

davblog - Dave Cross

Week Notes 15 & 16

Another fortnightly week notes. That really wasn’t how this was supposed to work. Only one other blog post in that time too. I’m a lazy blogger.

Health

With my leg feeling much better, I’ve started to concentrate on losing weight. About a week ago I bought a Fitbit. It’s a bit like a pedometer, but it measures more than just the number of steps you take – it also measures the number of flights of stairs that you climb and monitors the quality of your sleep. There’s a USB transmitter/receiver thing and whenever you’re close to that, it uploads the latest data to the Fitbit web site. It was my wife who suggested it. She realised that the challenge of measuring things and having little targets to beat (can I walk further today than I did yesterday) appeals to my geeky nature. She’s probably right too. I’ve lost three pounds since I’ve had it.

Alongside that I’ve also signed up with My Fitness Pal, which I use to track the number of calories I eat and the the amount of exercise that I do. It also pulls data down from the Fitbit site and takes  that into account when working out how many more calories I can eat in a day.

Calorie counting is a real pain. Who knew that calories tasted so good?

Technology

I’ve had a couple of run ins with technology in the last couple of weeks. Devices that were more complex than they needed to be to use with Linux.

The first problem was the Fitbit. it turned out that there was no way to do the initial set-up on Linux so I reluctantly booted my laptop into Windows for the first time in months. But having done the initial configuration I’ve been able to do the day-to-day data uploading quite happily from Linux. There’s a libfitbit priject on Github which seems to have stalled, but works pretty well in its current form.

Then there was a new printer. I got a free Dell P513W when I bought my new laptop recently but I hadn’t got round to setting it up until last weekend. Once again I needed to be in Windows in order to run the initial configuration. It connects to a wireless network and there was no Linux software to configure that.

But having got it up and running and working successfully with a PC running Windows it should have been simple enough to get it running across the network from a Linux system. For that to work I needed a PPD file for the printer. So I went to the Dell site to find it. This README file implied that the correct file was available, but it proved hard to track down. So eventually, I resorted to writing to Dell customer support who gave me some of the worst support I’ve ever come across and didn’t solve my problem. I don’t have space here to describe how incompetent they were. I should write a blog post.

I still don’t have that printer working under Linux, but I have a few avenues to explore.

Training and Speaking

Preparations are in full swing for my trip to Edinburgh. I’m going up next weekend and spending a week running training courses for Edinburgh University.

I’ve also been talking to another client about perhaps doing something up in the north of England later in the year. No firm plans yet. Not even sure if it’ll be public or private courses.

Gigs

Two gigs in the last three days. And both of them were at the Union Chapel. On Thursday night I saw June Tabor and the Oysterband and last night I went back to see John Renbourn, Robin Williamson and Wizz Jones.

I’ve been buying tickets for things coming up later in the year. One particularly mad event is the Crystal Palace Garden Party on June 23rd. Rick Wakeman, Hawkwind, Focus, The Strawbs, Curved Air and Barclay James Harvest. It’s like it’s still 1975.

Films

I saw and very much enjoyed Cabin in the Woods. Rather strange ending though.

Looking forward to seeing The Avengers (or as it’s now known, Avengers Assemble) when it opens next weekend.

April 22, 2012 03:54 PM

April 19, 2012

Richard WM Jones

rich

I ordered OpenCores latest low-end FPGA development board to try out the OpenRISC 1200.

My first job involved FPGAs, back in the early 90s. The Altera FPGA that I routinely used then had 32 logic units and cost around £100 each. We also used another Altera part that had (IIRC) 512 LUs and cost in the region of £1000. The one I just ordered has over 22,000 LUs.

The total cost including tax and delivery was ~ £150 / €180.
(Whether this will make it through UK customs is interesting: tax has supposedly been paid already)

I’ll let you know how it goes.


April 19, 2012 10:51 PM

April 16, 2012

Richard WM Jones

rich

17G	debian5x64.img.orig

The original image has about 4.7 GB of data, plus a large swap partition, according to virt-df:

$ virt-df -a debian5x64.img.orig -h
Filesystem                        Size       Used  Available  Use%
debian5x64.img.orig:/dev/sda1     322M        66M       239M   21%
debian5x64.img.orig:/dev/debian5x64.home.annexia.org/home
                                  3.4G       359M       2.9G   11%
debian5x64.img.orig:/dev/debian5x64.home.annexia.org/root
                                  320M       301M       2.4M   95%
debian5x64.img.orig:/dev/debian5x64.home.annexia.org/tmp
                                  300M       8.2M       276M    3%
debian5x64.img.orig:/dev/debian5x64.home.annexia.org/usr
                                  3.4G       2.0G       1.2G   60%
debian5x64.img.orig:/dev/debian5x64.home.annexia.org/var
                                  2.6G       2.0G       536M   76%

Using virt-sparsify, all unused space in the image is made sparse. The most recent version can sparsify swap partitions too:

4.6G	debian5x64.img

xz --best -T 0 reduces the final image to under a gigabyte:

971M	debian5x64.img.xz

April 16, 2012 10:40 PM

April 13, 2012

Richard WM Jones

rich

# Unfuck gettextize.
grep -v '/dev/tty' < /usr/bin/gettextize > gettextize
chmod +x gettextize

# Patches affect Makefile.am and configure.ac, so rerun autotools.
./gettextize -f
autoreconf
autoconf

Personally I’ve never known a single pair of packages that cause more trouble than GNU gettext and autoconf. Probably together they have wasted thousands of years of human effort. Configure scripts probably cause extra power stations to be built.


April 13, 2012 05:58 PM

April 11, 2012

Richard WM Jones

rich

It turns out to be good to wait 4 or 5 years between computer upgrades, because the new computer will be awesomely fast in comparison to the old one. This was the old one:

I reused the case and power supply, but put a new motherboard, CPU, memory and disk inside. I have shamelessly gone all-Intel, because I need a fast build server, and AMD doesn’t cut it these days.

The SSD in particular is brilliant. It feels about 10 times faster than a hard drive.

‘make -j9′ just eats kernel compiles. I can build a complete Fedora kernel and modules in about 10 minutes (compared to about 28 minutes on my work laptop).


April 11, 2012 12:01 PM

April 08, 2012

davblog - Dave Cross

Android Applications

For the last two years I’ve been using an HTC Desire. In the last few days I’ve upgraded to an HTC One X. Whilst I liked the Desire a lot, one thing that really let it down – the lack of space to install apps. I spent most of the last year with the “short of space” notification on. At times I was running a “one out, one in” policy where I could only install a new app if I removed one first.

The One X has a lot more memory, so I’m hoping that I won’t have so much problem installing apps and can try some new and interesting ones. I’ve started by installing what I consider the essential apps.

Then I installed a few apps that I used to use, but that I had to give up when I ran out of space on the Desire:

There’s one app that I used to use that I can no longer find. I think it was called Movie Finder and it listed all the films that were on at all the cinemas in London (or, perhaps, the UK). If anyone knows what it was – or can recommend a replacement – then please let me know.

I’ve installed some semi-random apps that caught my eye:

That’s as far as it goes so far. But the Android market (sorry, I mean the “Google Play Store”) is now huge. I’m sure I’m missing out on interesting and useful apps. Or, perhaps, there are better apps available to replace the ones I’m currently using. Is Tweetdeck still the best Twitter client? Is there a better augmented reality app than Wikitude?

What am I missing out on?

April 08, 2012 01:11 PM

Week Notes 14

Blogging

Just one blog post this week. Everyone was talking about Samantha Brick, so why shouldn’t I?

Health

Halfway through the week I noticed that my ankle was no longer affecting the way I move at all. It still aches a bit at times, but I seem to have lost my limp.

All of which means that I should get back to trying to lose a bit more weight. To that end I have just ordered a Fitbit from Amazon. It’s like an enhanced pedometer. It measures all sorts of movement and uploads the data automatically to the Fitbit web site. It should arrive in the next few days so there will, no doubt, be more to say about this next week.

Technology

Last week I mentioned that I had bought a Google Nexus. It didn’t last very long. It arrived on Saturday and at some point whilst it was being charged overnight on Monday, it died. I’m not sure what happened to it, but there was no way to turn it on. I’ve seen people on the internet claiming there’s a known issue with the battery in that phone, but I don’t know how accurate that is.

Of course, I was able to return the phone to Amazon, but the question was should I get a replacement or a refund? Then I saw news articles saying that the HTC One X would be available through T-Mobile (my current mobile provider) from 5th April. And the reviews of the One X all seemed to be very positive. So I returned the Galaxy Nexus, asked Amazon for a refund and bought a One X on Thursday.

My initial impression is that I did the right thing. The One X is even more lovely than the Galaxy Nexus. And it has already last a day longer and shows no signs of breaking down.

More detail (hopefully) in the next few days.

Programming

I did some more tweaks to a couple of my Perl modules. And yesterday I did more work on a new (and more substantial) project. I’ve put this new code on Github.

I’ve also had a brilliant idea for a web site. But I have no idea when I’m going to find the time to build it.

Books

I finished reading A Game of Thrones. I enjoyed it, but there’s an awful lot of it. And it seems that the rest of the series just get longer and longer. Need a rest before embarking on A Clash of Kings.

I’ve started reading Finding Moonshine by Marcus Du Sautoy. It’s about symmetry and group theory. Not far into it yet, but I’m enjoying it.

TV

Watched the first episode of the second series of Game of Thrones. It looks like it’s going to be as good as the first series. And I spotted Cassie (from the first generation of Skins characters) as one of Craster’s daughters.

We’ve finished our rewatching of Lost. And have started to rewatch Six Feet Under from the start.

Other Stuff

Due to an organisational mix-up we ended up eating in our favourite restaurant, Lamberts, to consecutive nights this week – which was great.

Our boiler has broken down. And it was clever enough to time its breakage to the only four-day weekend in the year.

April 08, 2012 09:58 AM

April 04, 2012

davblog - Dave Cross

Thick As A Brick

But your new shoes are worn at the heels and
Your suntan does rapidly peel and
Your wise men don’t know how it feels to be thick as a brick.
[Jethro Tull - Thick as a Brick]

Yesterday was a fun day on the internet. It was one of those days where a Daily Mail writer writes something spectacularly stupid and the internet (or, at least, the small part of it that follows the UK media) spends a few pleasant hours taking the piss.

Yesterday it was the turn of Samantha Brick. She wrote an article called ‘There are downsides to looking this pretty’: Why women hate me for being beautiful. You’ve probably read it, but if you haven’t the summary is that she thinks she is really attractive and this means that random men often do nice things for her, but random woman often take an instant dislike to her.

There are so many holes in her theory that it’s hard to know where to start. I’d guess that a lot of women don’t warm to her not because they are jealous of her irresistible beauty, but rather because she comes across as a bit of a shallow airhead who defines herself by her level of attractiveness to men. Oh, and about that irresistible beauty. I don’t want to sound rude, but I think she’s slightly deluded there.

If that article wasn’t enough for you to form an opinion of her, I invite you to peruse the list of previous articles she has written for the Mail. Just reading the titles should be enough. No need to wade into the content unless you have a particularly strong stomach.

So the internet had its day of fun laughing at Ms Brick and her nonsense. And it would have probably ended there, but the Mail just wouldn’t let it lie. Today they bounced back with two follow-up articles. One was reporting on how Ms Brick had become an “internet sensation” (where the Mail sees a sensation, the rest of us see a laughing stock) and the other was by Ms Brick herself. In it she claims that yesterday’s reaction just proves that her original theory was right.

Once again she shows that logical thinking is not her forté. Let’s bring the argument down to the simplest level and see if we can spot any flaws.

Ms Brick: Most women hate me because I’m so beautiful.
The Internet: You’re wrong and here’s about a billion reasons why.
Ms Brick: See! Everyone hates me. My original theory was right.

I really don’t think that stands up to the slightest amount of scrutiny, do you?

The article includes a photo of Ms Brick standing next to her husband. She’s wearing the same purple dress that she wears in a lot of the photos from  the last couple of days. But he’s wearing combat fatigues and carrying a rifle. Which takes on a slightly worrying meaning when you read what she wrote a few paragraphs below the photo when talking about her husband’s reaction to the furore.

At first, he shrugged it off, saying they were just the spiteful remarks of a few jealous women. But as the storm brewed . . . well, I’ve had to hide the worst of it from him; the tame few I’ve read out have riled him enough to want to take his own form of action.

Have you got that? Be nicer to her or her husband will come after you with his rifle.

Of course, Ms Brick and her delusions of superiority aren’t the real issue here. The real issue is the way that the Mail (and, in particular, Mail Online) have become so good at drawing in visitors who wouldn’t normally go anywhere near the paper. The Mail’s core audience obviously don’t spend as much time on the internet as the readers of some other papers. So the Mail have come up with a couple of strategies for getting readership from outside their core audience.

The first of these is the “sidebar of shame” so brilliantly reviewed by Steven Baxter recently. And the second is the liberal outrage strategy that we all fell for yesterday. I guess this was a lesson they picked up from the Jan Moir/Stephen Gately sage a couple of years ago. If you print things that annoy the (still largely liberal) Twitterati, then they will tweet and retweet their outrage. And every tweet brings more clicks. And every click brings more advertising revenue. As long as you don’t go too far (as Jan Moir did) and end up having to remove adverts from the page everything is wonderful. This morning I read an estimate that Samantha Brick’s article could have made the Mail £100,000 in advertising revenue.

This is what istyosty was about. Allowing people to read Mail stories without giving the clicks. And that’s, of course, why the Mail had it closed down. It hit them in the bottom line and they really didn’t like that.

I don’t have any solutions. I’m as guilty as anyone of passing round Mail links in order to spread the outrage. I wish I could just ignore them, but they’ve got under my skin. I even run a site which exists purely to link to Mail stories. I’m addicted to the outrage.

[Note: I wasn't planning to blog on this topic. But a friend pointed out the Jethro Tull link and I knew I just couldn't resist. Thanks Gareth.]

Update: Chris shares some thoughts about reading (and sharing) Mail content without giving them the clicks.

April 04, 2012 01:17 PM

Richard WM Jones

rich

In 1993, I spent £600 on 16 MB of RAM.

At the time, I needed it because my 386 DX didn’t run SLS Linux very well in 4 MB of RAM. In particular, emacs under X11 was very slow. When I got the 16 MB upgrade increased the RAM to 20MB (because I had one of those motherboards which could take both sorts of RAM together), X11 and emacs were really fast. I was even able to use a background image on my desktop, and font-lock mode in emacs.

I wish I still had that RAM, not just because it cost more than my (then) net worth to purchase, but practically because my HP LaserJet 5 printer could use those ancient 30 pin 72 pin SIMMs.

19 years later, I just got 16 GB of RAM for £150.

I should be happy, but the sad part of this is Linux now needs gigabytes of RAM to run properly.


April 04, 2012 10:00 AM

April 03, 2012

Richard WM Jones

rich

(1) Is the guest generating disk and network activity (a.k.a are the lights flashing)?

I don’t have nice code for this, but you can see the technique that Oz uses here. Oz uses the libvirt monitoring APIs to look for disk and network activity, and signals when it hasn’t seen any after a certain timeout period.

(2) When was the last time a user logged in?

If this is the sort of “activity” you’re after, then you can use virt-cat on Linux, or virt-win-reg [sorry, no actual example yet] on Windows.

(3) What was the last file updated in a guest?

Finally, if you’re interested in the newest file updated in a guest, see this technique which will work for any Linux or Windows guest.

Are there other kinds of “activity” that it’s interesting to find from guests?


April 03, 2012 08:06 PM

rich

I’ve updated the libguestfs preview packages for RHEL 6.2/6.3. These contain many new features and bug fixes compared to RHEL 6.2.

An easy way to use these packages is to run this command, which creates a yum repository pointing to the preview packages:

# cat <<EOF > /etc/yum.repos.d/libguestfs-RHEL-6.3-preview.repo
[libguestfs-RHEL-6.3-preview]
name=libguestfs RHEL 6.3 preview - x86_64
baseurl=http://people.redhat.com/~rjones/libguestfs-RHEL-6.3-preview/
enabled=1
gpgcheck=0
EOF

April 03, 2012 05:10 PM

rich

Thursday 2012-04-12 is Fedora 17 virtualization test day and you are warmly invited.

You will need: A Fedora 17 pre-release version installed and fully updated, and at least one guest.

Here are the libguestfs tests.


April 03, 2012 01:43 PM

April 02, 2012

Richard WM Jones

rich

Has to be said that the Verifone Vx670 (a card payment machine) has the most bizarre and baroque user interface ever.


April 02, 2012 08:12 PM

April 01, 2012

davblog - Dave Cross

Week Notes 13

Week 13 must mean we’re a quarter of the way through the year. Tempus fugit and all that.

Blogging

Two blog posts here this week. The first invited people to the third Mediawatchery Blogging Meet-Up Thingy which will take place in Reading on May 12th. The second was a bit of a rant about how certain web sites are still encouraging people to be cavalier with their passwords.

Health

I was invited back to St George’s hospital this week. It turned out that it was just for a talk with the Osteoporosis Department’s Liaison Nurse. Because my fall wasn’t particularly spectacular their systems automatically flag it up as potential osteoporosis. She had the results of the bone densitometry tests that I had in February. They are well within the normal range and haven’t changed since I last had the tests five or six years ago. She’ll ask my GP to do some blood tests and recommends getting another set of bone densitometry tests done in five years time. But she doesn’t think I have osteoporosis.

Yesterday I did the longest walk I’ve done since my fall. We went up to Highgate and spent a few hours wandering around the cemetery.

During the week, I saw that the Biobank data has become available to researchers for the first time. My data is in there somewhere. It’s all anonymised of course, but I’m the overweight, unfit 40-something.

Technology

It’s new phone time. I’ve bought a Galaxy Nexus. The change from Froyo (Android 2.2) to Ice Cream Sandwich (Android 4.0) is pretty huge and some changes are taking some getting used to.

One big change is that the phone no longer presents itself to a computer as USB Mass Storage. It now uses the Media Transfer Protocol. Support for this in Linux seems a bit flaky right now, but I’m sure it will improve as more and more users (and developers) get their hands on devices using Ice Cream Sandwich.

I only got the phone yesterday, so it’s early days. Expect a more detailed review in the next couple of weeks.

Films

I really enjoyed The Hunger Games. Obviously it’s really simplified from the novel. But that’s, of course, inevitable when turning a relatively complex novel into a two hour film.

While we’re talking about films, the Fantasy Film League is about to start its new season. It’s a bit like Fantasy Football League, but about things that are interesting. You choose a director and six actors for your film and you score points whenever your stars are in films that are in the UK or US box office top ten. If you fancy entering a film, then please also consider joining my league – just use the code 2857ed1a. Four of us took part last year and it was a lot of fun.

TV

This week was all about Mad Men. It wasn’t at all difficult to find the first episode of series five – so we watched and enjoyed that on Monday. This week we’ll do that again and also add Game of Thrones into the mix.

April 01, 2012 10:10 AM

March 29, 2012

Richard WM Jones

rich

New in libguestfs ≥ 1.17.22 is the ability to mount the guest filesystem on a local mountpoint. Well, you can already do that using guestmount, but the new thing is that you can do it from the API (from any language).

Here is an example using guestfish:

$ guestfish --ro -a /dev/vg_pin/F16x64 -i
 
Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

Operating system: Fedora release 16 (Verne)
/dev/vg_f16x64/lv_root mounted on /
/dev/vda2 mounted on /boot

><fs> ! mkdir /tmp/mnt # creates a local directory
><fs> mount-local /tmp/mnt readonly:true
><fs> mount-local-run
# the errors come from a GNOME daemon that
# looks at all new mountpoints
libguestfs: error: lstat: /.Trash: No such file or directory
libguestfs: error: lstat: /.Trash-500: No such file or directory

Over in another terminal, we can see the filesystem mounted on the local directory /tmp/mnt:

$ ls /tmp/mnt
bin   dev  home  lib64       media  opt   root  sbin     srv  tmp  var
boot  etc  lib   lost+found  mnt    proc  run   selinux  sys  usr
$ cat /tmp/mnt/etc/redhat-release
Fedora release 16 (Verne)

Unmounting the filesystem causes the guestfish mount-local-run command to return (since that command was actually serving the FUSE requests from the kernel).

$ fusermount -u /tmp/mnt

March 29, 2012 07:48 PM

davblog - Dave Cross

Internet Security Rule One

Internet security rule one is “do not share your password with anyone”. There should be no exceptions to this rule. If anyone asks you to share your password with them, your answer should always be no.

Sometimes people say “oh well, it’s only a password for [some unimportant web site] – what harm could it do?” And, of course, perhaps giving someone your password for that particular unimportant web site won’t do any harm. But it’s a chink in your armour. By revealing your password for that site you’ve set a precedent. You just might be that little less protective the next time that someone asks you to share your password.

It’s called the Password Anti-Pattern and its shortcomings have been well-documented for several years. I wrote about it with specific reference to Twitter a few years  ago.

There are two levels of problem here. Firstly there’s the fact that you’ve given a third party complete access to interact with the web site for you. If it’s your Twitter password you’ve given away then the third-party service can do anything to your Twitter account that you can do yourself – right up to closing your account.

I assume that everyone can work that out for themselves. But the second problem is more subtle. Obviously any web site where I have an account is storing my password somewhere (probably in a database). And any third-party service that I want to share my password with also stores that password. So what’s the difference?

The difference is that the original web site is (hopefully) following basic password storage principles and storing my password using non-reversible encryption. The third-party site can’t do that. The third-party site needs access to the plain-text version of the password so it can be used to log on to the original web site. Oh, sure, they’ll hopefully store the password in their database in some encrypted format, but it will have to be a reversible encryption so that they can get a plain-text version of it back when they need to use it to log in to the original site.

So if someone somehow gets a copy of the original web site’s database, your password is held in some industrial-strength non-reversible encrypted format. But if they get a copy of the third-party service’s database, they’ll have your password in a far less secure format. If, at the same time, they manage to grab the third-party service’s source code then they’ll know exactly what process to follow to get the plain-text version of your password from the encrypted version.

Of course, you’d hope that their data centre is secure and no-one will ever steal their database or their source code. But it could happen. And the more passwords that you share, the more chance there is that someone, somewhere will get hold of data that you’d rather not have.

There is, of course, a way round this. It’s called OAuth. With OAuth, you don’t need to give anyone your password. You can authorise certain applications (or services) to take certain actions on your behalf on particular web sites. So, for example, I can let Twitterfeed post to my Twitter account without giving it my password. And that’s all it can do. It can’t follow new people, maintain my Twitter lists or close my account.

Twitter is a good example. In 2007 and 2008 a whole ecosystem grew up around Twitter. Many services offered cool and interesting services to add on to your basic Twitter account (Twitterfeed was one of them). But they all needed your Twitter username and password, so anyone who was at all security-conscious couldn’t use them. But in 2009 Twitter implemented OAuth. And, a few months later, they turned off the old authentication scheme so that you now only use OAuth to talk to Twitter.

The remaining problem is that OAuth only works when the original web site has implemented it. And that’s quite a lot of work. There are still many web sites out there which have lots of useful information out there locked behind a username and password with no other way to access it.

All of which brings me to what prompted this post. Earlier today a friend pointed me at a web site which provided a really useful service. But when I looked, it did it by asking for my login details for another web site. I’m not going to name either of the sites involved (my friend works for the third-party site and I don’t want to embarrass her), but it was a really useful service and it made me sad that I couldn’t use it.

Of course, as my friend explained, they had no alternative. The original site didn’t have OAuth support, so the only way they could get hold of the useful data was to log in as the user.

To my mind, that’s not a good reason for implementing the password anti-pattern. To my mind that’s where you say “oh well, that was a good idea – shame it’s not going to work” and start to lobby the original web site for some kind of OAuth support. But that’s not likely to happen as the point of this service is to compare different offerings and make suggestions of how the user could save money by switching to competitors. I can’t really see the original companies being keen to support that.

So we’re left with a situation where this third-party has implemented the password anti-pattern. And, as far as I can see, they’ve made quite a nice little business out of it. But makes me really uncomfortable to see what they’re doing. I’m pretty sure that I can trust them with my data, but I’m not prepared to compromise my principles in order to access this useful service. They are teaching people that it’s okay to share their passwords. And it’s not. It never is.

And it doesn’t stop with this company promoting their own service. On their site they have testimonials from a number of well-known web sites, newspapers and television programmes saying what a wonderful service it is. They have technology correspondents, who I would expect to know better, singing their praises and encouraging people to sign up for the service – telling people to break the first rule of internet security.

It all makes me rather depressed.

Look, I’ll tell you what. I’ve got a really good idea for an add-on for your online banking service. Just leave the login details in a comment below and I’ll set it up for you.

March 29, 2012 04:51 PM

March 27, 2012

davblog - Dave Cross

Mediawatchery Blogging Meet-Up Thingy 3

We’ve done it twice before and they just can’t stop us. So we’re going to do it all over again.

This is that occasional thing where the authors of some media-watching blogs get together in a pub to drink a couple of lemonades and make plans that will solve all the world’s problems.

The first two took place in London, but we’ve been reliably informed that there’s life outside the M25 – so this time we’re going to test that theory.

We’ll be at the Back of Beyond in Reading from 3pm on Saturday 12th May. There’s a Facebook event thingy if that kind of social conformity is your thing but feel free to just turn up if you don’t want to share details of your movements in advance.

Who will be there? Ah, well that’s confidential information. And the guest list is still in flux. But you know your favourite media blogger? He’ll definitely be there. He told me he was looking forward to meeting you. So you’d better be there.

March 27, 2012 04:05 PM

March 25, 2012

davblog - Dave Cross

Week Notes 11 & 12

It’s been a pretty quiet fortnight all in all.

Blogging

I’ve written Nothing here, but there was a post on my Perl blog which has attracted a pretty impressive number of comments. And a few more stories from ten years ago got published on Wasted Inches.

Health

I appear to have reached a bit of a plateau with my ankle. I’m getting about on it just fine, but it doesn’t seem to be getting much better. It still aches quite a lot. And it swells up towards the end of the day.

I thought I was free of the hospital, but they’ll set up another appointment for next week. This time it’s with the Osteoporosis and Rheumatology department. Which all makes me feel rather old.

Programming

I did a bit of work on a couple of my Perl modules. And I’ve returned to an older project which I’m hoping to make some good progress on in the next few weeks. More information when it’s in a usable state.

Films

I saw John Carter. I thought it was terrible. Today I’m going to see The Hunger Games. I really enjoyed the books and the reviews for the film have all been pretty good.

Last week I was invited to a free test screening at the Clapham Picturehouse. They didn’t tell us what the film was until we got there. It was a film called Liberal Arts. Afterwards a dozen of us were invited to a focus group to discuss the film and how it might be marketed. I enjoyed the film, but it seems my view was in the minority.

TV

Our rewatching of Lost is drawing to the end. We’re in the middle of series six. I know I’ve seen series six before, but I’m finding that I can’t remember very much of it at all.

Over the next week there are new series of both Game of Thrones and Mad Men. But they are both on Sky Atlantic which still isn’t available on Virgin Media, I’ll looking to the internet to provide copies.

March 25, 2012 07:54 AM

March 23, 2012

Ross Lawley

Near Nuremburg in April? Come see me talk at OSDC.de

I've just got back from a buzzing mongoDB Berlin - it was a great event with lots of developers wanting to learn more about mongoDB. What struck me most was the level of interest in Germany for mongoDB and the general enthusiasm around web and computing technology; from big data to agile methodology and devops to high scalability.

With that in mind I'm really pleased to announce I'll be speaking at the Open Source Data Center conference in Nuremberg next month.  I'm really looking forward to the conference as it covers all things DevOps, Databases and Scalability.

So if you are in the neighbourhood then make sure you come by, I'm there for two days and will be happy to answer any questions regarding mongoDB.

 

Permalink | Leave a comment  »

March 23, 2012 08:46 AM

March 17, 2012

Karanbir Singh

Into Web Hosting .. Deploying CentOS images in a Cloud ?

If you are a web hosting company and deploying CentOS 5 or 6 images in a Cloud, I want to speak with you. Please get in touch via one of the mechanisms listed at : http://www.karan.org/contact.html

Alternatively, if you use services from a hosting company that uses CentOS images in a cloud : drop me a line and let me know about them, I will try and reach out directly.

Thanks in advance and look forward to getting in touch with some of you guys.

- KB

March 17, 2012 12:08 AM

March 15, 2012

Richard WM Jones

rich

New in libguestfs 1.17.18, virt-sparsify can now find and sparsify even more space in your guests — Linux swap partitions are detected and zeroed (though not if they contain hibernation data).

The --zero option can be used to remove unwanted partitions.

The new version is also faster and uses less temporary space during the first stage.


March 15, 2012 07:12 PM

March 14, 2012

Richard WM Jones

rich

You can now easily add the libguestfs RHEL 6.3 preview packages to your RHEL 6.2 system as a yum repo:

# cat <<EOF > /etc/yum.repos.d/libguestfs-RHEL-6.3-preview.repo
[libguestfs-RHEL-6.3-preview]
name=libguestfs RHEL 6.3 preview - x86_64
baseurl=http://people.redhat.com/~rjones/libguestfs-RHEL-6.3-preview/
enabled=1
gpgcheck=0
EOF

For more information, see the README file.


March 14, 2012 04:09 PM

rich

Want help? Don’t email me directly


March 14, 2012 12:04 PM

March 13, 2012

Richard WM Jones

rich

I’ve just released whenjobs 0.7.0 to fix a couple of problems that I was having myself.

Firstly, while it’s a nice feature of whenjobs that I can set variables, sometimes I don’t want jobs to be triggered as a result of setting variables. The new whenjobs --whisper command lets me set variables without reevaluating when-clauses:

$ whenjobs --whisper libguestfs_version=1.17.16

Secondly, my jobs file was getting pretty long and unmaintainable (400 lines), since I added various libguestfs branches and hivex to be managed by whenjobs. So I’ve added a feature where you can split the jobs file into multiple files:

$ ls -l .whenjobs/*.ml
-rw-rw-r--. 1 rjones rjones 3284 Mar 13 19:10 .whenjobs/jobs_hivex.ml
-rw-rw-r--. 1 rjones rjones 4039 Mar 13 19:07 .whenjobs/jobs_libguestfs.ml
-rw-rw-r--. 1 rjones rjones 3766 Mar 13 19:09 .whenjobs/jobs_libguestfs_stable.ml
-rw-rw-r--. 1 rjones rjones   45 Mar 13 19:10 .whenjobs/jobs.ml

I think I described whenjobs as a “cron replacement”. It is a cron replacement for me, for my personal use, but it’s not officially a cron replacement and this project has nothing whatsoever to do with Red Hat or Fedora. The reason I say this is I get some pretty idiotic comments like these.


March 13, 2012 08:45 PM

March 11, 2012

davblog - Dave Cross

Week Notes 10

Blogging

Blogging gets a section to itself this week as I’ve finally done a reasonable amount of it.

Early in the week I wrote three posts about Cardinal Keith O’Brien and how his article in last Sunday’s Telegraph was complete nonsense. Later in the week, I combined those posts into a report for the Pod Delusion.

Yesterday I wrote a post introducing Wasted Inches – where I’m looking back as what I was blogging about ten years ago.

Also yesterday, I wrote a post over at my more technical blog, Perl Hacks.

Health

I haven’t used the crutch for over a week. I still limp a bit as I’m walking and I’m probably not quite as quick as I would like to be. But my ankle seems to be improving in leaps and bounds (not literally!)

On the other hand, as I’m now back doing everything that I was doing before the accident, all the weight I lost while I was sitting around at home is creeping back on. I had a slight embarrassment during the week. I went to buy some trousers. I grabbed some pairs in the size that I like to think I am and went to try them on. Only to find that I couldn’t do them up as my waist seems to have grown by about an inch.

Looks like I need a couple of weeks of Wii Fir hula-hooping before buying those trousers.

Speaking and Training

Nothing new to add here. But I’ve confirmed all my travel and accommodation for the week in Edinburgh at the start of May. I’ll be staying at Ten Hill Place from April 29th to May 5th.

Films

I don’t seem to have seen any films this week. I am, however, booked to see John Carter this afternoon.

Gigs

My improving ankle meant that I could finally get to see a couple of gigs this week. It’s been far too long.

On Wednesday I went to the Hammersmith Odeon to see Laura Marling. It was quite a difference from seeing her at the Conway Hall in 2010. I really like her and the set was really good. It was just all a bit too short. She played for an hour and a quarter and then left. No encore (that’s a policy of hers) and the house lights came up straight away.

Last night I saw Sinéad O’Connor at the Queen Elizabeth Hall. I haven’t seen her play since a Finsbury Park Fleadh in the early 1990s. To be honest I was worried that she might not still have it, but I needn’t have worried at all. Her voice is still as wonderful as it ever was. I’ve only played her new album a couple of times, but the news songs already seemed familiar and fitted right in alongside the old favourites. Highlights for me were “I Am Stretched On Your Grave” and “Last Day of Our Acquaintance”.

An interesting thought struck me. What difference does it make to the gig-going experience when you can be sitting there with your smartphone displaying the set-list from a recent gig so that you’re pretty sure what is coming next?

March 11, 2012 11:13 AM

March 10, 2012

Richard WM Jones

rich

whenjobs 0.6 fixes two out of three bugs mentioned previously, and fixes the bug Joe found in whenjobs --daemon-start (et al).

Changes:


March 10, 2012 02:45 PM

davblog - Dave Cross

Wasted Inches

It was 2002 when I first started blogging. This blog’s first post was in July 2002 and we’ll, no doubt, talk about that more when the time comes.

But earlier in 2002 there had been another experiment. I didn’t know that I was blogging at the time and it all worked using a few bits of Perl that I’d thrown together myself. There was no commenting system and no web feed. But I was writing topical posts on a regular basis, so I guess it would be called a blog today.

I thought I’d lost all the content a couple of server moves back, but a few weeks ago I discovered a backup of the table which contained all of the content. I’ve loaded it into WordPress and I’m planning to publish the posts in “real time” over the next few months. The first one appears today.

The blog was called Wasted Inches and I’m happy to see that some of my earliest writing on the web was on a subject that I’m still covering today. Wasted Inches was supposed to uncover the idiocy of the tabloid press. I wasn’t particularly interested in deep political analysis, I was just pointing and laughing at what the red-tops chose to put on their front pages.

Back then, of course, few of the newspapers had anything like the web presence that they have today. This had two effects. Firstly it meant that I couldn’t find my material online like I would now. I did my research by glancing at the tabloid front pages as I was buying my Guardian every morning. And secondly, I couldn’t link to any of the stories I was discussing. Or perhaps I would have been able to, but just couldn’t be bothered. Anyway, there are no links and I have no intention of trying to find references now.

I will, however, try to add some historical context. Many of the pieces were very much of their time. They assumed that people knew what the papers were talking about and didn’t waste time filling in background. Ten years on that makes some of them a little obscure, so I’ll try to explain what I was talking about – assuming that I can remember myself.

The writing style is itself quite tabloid. Or, at least, what I considered to be a passable impersonation of a tabloid style. There are a few turns of phrase that I’m still very happy with, but a lot of it is quite pedestrian.

There’s not a lot of it. Just over forty posts over about six months. And there are some quite large gaps between posts. None of the posts are very long either. It’s not quite a Twitter stream, but I guess it’s the kind of thing that Tumblr was made for.

Anyway, it’s just a bit of historical silliness that might amuse a few of you as the posts appear irregularly over the next six months.

March 10, 2012 11:19 AM

Richard WM Jones

rich

https://www.linux.com/learn/tutorials/552976:weekend-project-take-a-look-at-cron-replacement-whenjobs

I’ve been using whenjobs quite a lot (probably I’m the single most extensive user). Some things I like:

And some things I don’t like:

(The first two of these are fairly simple to fix)


March 10, 2012 07:49 AM

rich

http://pseudogen.blogspot.com/2012/03/fun-with-libguestfs-rkhunter-and.html

(thanks Adam Miller)


March 10, 2012 07:44 AM

March 05, 2012

davblog - Dave Cross

What Is Marriage?

There’s another major flaw in Cardinal O’Brien’s arguments against gay marriage. In his article he says “No Government has the moral authority to dismantle the universally understood meaning of marriage.” He seems to believe that there is some immutable definition of marriage that has always been true and that he is bravely defending. Let’s examine that theory. We’ll start by looking at the Bible.

And Gideon had threescore and ten sons of his body begotten: for he had many wives.

Judges 8:30

Here’s another

And Esau was forty years old when he took to wife Judith the daughter of Beeri the Hittite, and Bashemath the daughter of Elon the Hittite

Genesis 26:34

And another

And Ashur the father of Tekoa had two wives, Helah and Naarah

1 Chronicles 4:5

I could go on, of course (try counting the number of wives that King David had), but I think my point is made. The Bible has many examples of polygamy. It’s clear that there isn’t a single universal view of marriage that has existed throughout history. Throughout most of recorded history various kinds of polygamy have been seen as the normal kind of marriage over most of the world.

It’s not even confined to history. Wikipedia lists around fifty countries where polygamous marriage is still legally recognised. Of course, the majority of them are patriarchal societies where woman are treated really badly, but that’s not the point. The point is that the Cardinal’s idea of a marriage which consists of one man and one woman is an anomaly in the history of the family and is still far from universal in the present day.

As I wrote yesterday, marriage is defined by society. As society’s views change, so does what constitutes a “normal” marriage. The problem with religion is that it finds change hard to sanction. Society’s rules from thousands of years ago are written in stone and can’t change without the tribal elders admitting that their gods are fallible.

Times change and society changes with it. The law must keep up with these changes. And it usually does. We can’t allow religious beliefs to hold us back on this occasion.

March 05, 2012 09:02 PM

Ross Lawley

MongoEngine 0.6 Released!

Sorry for the delay, a few final things snuck into 0.6 to get the release in really good shape.

Another massive changelog but the big items are:

Other improvements worth a mention are: ImageField, scalar values, $elementMatch support, URI connection support and many more small bugfixes and improvements.

See the upgrade docs - on how to upgrade your application.

 

Permalink | Leave a comment  »

March 05, 2012 01:26 PM

davblog - Dave Cross

Marriage in the UDHR

In his article arguing against gay marriage, Cardinal Keith O’Brien twice referred to the Universal Declaration of Human Rights, saying that article 16 clearly defined marriage as a relationship between a man and woman. In my response to his article I made the assumption that he, at least, knew what he was talking about here and explained that the UDHR shouldn’t be seen as set in stone and that it should be changed if it no longer reflected the way that society sees marriage.

I should have checked exactly what the UDHR says. The Cardinal is overstating his case a little. Article 16 says this:

  1. Men and women of full age, without any limitation due to race, nationality or religion, have the right to marry and to found a family. They are entitled to equal rights as to marriage, during marriage and at its dissolution.
  2. Marriage shall be entered into only with the free and full consent of the intending spouses.
  3. The family is the natural and fundamental group unit of society and is entitled to protection by society and the State.

No matter how closely you read it, there is nothing in there which implies that marriage should only be between a man and a woman. It doesn’t even imply that a marriage should be between two people.

I find it impossible to believe that the Cardinal is confused about the meaning of Article 16. He must know that it doesn’t say what he claims it says. He was lying to us in the hope that no-one would check and call him on his lies.

This just goes to show the importance of always checking primary sources.

Update: The Cardinal was interviewed on the Today programme this morning. I’ve just listened to the interview and I was disappointed to hear that he repeated this lie a number of times.

March 05, 2012 07:27 AM

March 04, 2012

davblog - Dave Cross

We Cannot Afford To Indulge This Madness

By “this madness”, of course, I mean religious leaders talking about what society wants without bothering to ask them. The latest example is this piece in the Telegraph by Cardinal Keith O’Brien. Let’s take a close look at what he says.

The Government is this month launching a consultation on same-sex marriage, asking the public whether it should be introduced in England and Wales.

That’s a good thing, surely? I mean going out and asking people what they think. Rather than just assuming that you know best.

I hope many respond and consider signing the petition in support of traditional marriage organised by a new organisation, the Coalition for Marriage.

And I hope that many more sign the petition from the Coalition for Equal Marriage.

On the surface, the question of same-sex marriage may seem to be an innocuous one.

That’ll be because it’s an innocuous question.

Civil partnerships have been in place for several years now, allowing same-sex couples to register their relationship and enjoy a variety of legal protections.

That’s not marriage though, is it? And, bizarrely, heterosexual couples can’t opt for a civil partnership.

When these arrangements were introduced, supporters were at pains to point out that they didn’t want marriage, accepting that marriage had only ever meant the legal union of a man and a woman.

Those of us who were not in favour of civil partnership, believing that such relationships are harmful to the physical, mental and spiritual wellbeing of those involved, warned that in time marriage would be demanded too. We were accused of scaremongering then, yet exactly such demands are upon us now.

That’s not how I remember it at all. It was clear to me that civil partnerships were a stepping stone on the way to full equal marriage. If that’s not what you heard, then perhaps people were being politically astute and trying not to scare you too much.

Since all the legal rights of marriage are already available to homosexual couples, it is clear that this proposal is not about rights, but rather is an attempt to redefine marriage for the whole of society at the behest of a small minority of activists.

Well, yes, clearly it’s an attempt to redefine marriage. But a “small minority of activists”? That doesn’t seem accurate to me. I see a huge wave of people in favour of equal marriage rights. Perhaps we’re both just talking to people like ourselves.

Redefining marriage will have huge implications for what is taught in our schools, and for wider society. It will redefine society since the institution of marriage is one of the fundamental building blocks of society. The repercussions of enacting same-sex marriage into law will be immense.

Maybe. We’ll see. But change isn’t always bad. Perhaps the repercussions won’t be as large as, say, the abolition of slavery. Society seems to have dealt with that change.

But can we simply redefine terms at a whim? Can a word whose meaning has been clearly understood in every society throughout history suddenly be changed to mean something else?

Yes. Next question.

If same-sex marriage is enacted into law what will happen to the teacher who wants to tell pupils that marriage can only mean – and has only ever meant – the union of a man and a woman?

The teacher who wants to tell pupils that will clearly be wrong, as the definition of marriage will have changed. So that teacher should be dealt with in the same way as any teacher who tells lies to pupils.

Will that teacher’s right to hold and teach this view be respected or will it be removed? Will both teacher and pupils simply become the next victims of the tyranny of tolerance, heretics, whose dissent from state-imposed orthodoxy must be crushed at all costs?

The teacher will be able to hold that view, of course. But that view will be wrong and therefore shouldn’t be taught to children (other than when setting historical context). Not seeing how the children are victims here. They should be being taught the truth – as defined by the law.

In Article 16 of the Universal Declaration on Human Rights, marriage is defined as a relationship between men and women. But when our politicians suggest jettisoning the established understanding of marriage and subverting its meaning they aren’t derided.

The Universal Declaration of Human Rights should not be written in stone. If society changes and disagrees with its definitions then those definitions can (and should) be changed. People suggesting that aren’t derided because in the real world their suggestions make total sense.

[Update: It turns out that if you actually read the UDHR then you'll see that it doesn't say what the Cardinal claims it says at all]

Instead, their attempt to redefine reality is given a polite hearing, their madness is indulged. Their proposal represents a grotesque subversion of a universally accepted human right.

Reality has been redefined by society. Acknowledging this is not madness. We are subverting a human right but, rather, extending it.

As an institution, marriage long predates the existence of any state or government. It was not created by governments and should not be changed by them. Instead, recognising the innumerable benefits which marriage brings to society, they should act to protect and uphold marriage, not attack or dismantle it.

No, marriage was not created by governments. It was created by society. And society, therefore, has the power to change the definition. Of course governments recognise the benefits of marriage. They are not attacking or dismantling it – they are expanding and enhancing it.

This is a point of view that would have been endorsed and accepted only a few years ago, yet today advancing a traditional understanding of marriage risks one being labelled an intolerant bigot.

Well I wouldn’t use the word “bigot”. But I’d certainly suggest that anyone putting forward your arguments was out of touch with modern society.

There is no doubt that, as a society, we have become blasé about the importance of marriage as a stabilising influence and less inclined to prize it as a worthwhile institution.

This may be true. But it’s not gay marriage that has undermined it. You only have to read the celebrity pages of any newspaper to see how many heterosexual couples are doing all they can to undermine marriage. This cannot be laid at the feet of the campaigners for equal marriage rights.

It has been damaged and undermined over the course of a generation, yet marriage has always existed in order to bring men and women together so that the children born of those unions will have a mother and a father.

Actually, I think the damage goes back more than a generation. Yes, marriage has existed for as long as society. No-one is suggesting that it should be removed.

This brings us to the one perspective which seems to be completely lost or ignored: the point of view of the child. All children deserve to begin life with a mother and father; the evidence in favour of the stability and well-being which this provides is overwhelming and unequivocal. It cannot be provided by a same-sex couple, however well-intentioned they may be.

See, I think you’re just making things up now. I don’t believe that there’s any evidence that backs this up at all.

Same-sex marriage would eliminate entirely in law the basic idea of a mother and a father for every child. It would create a society which deliberately chooses to deprive a child of either a mother or a father.

We already live in a society where a large number of children are brought up by a single parent. Surely two parents (of any sex) has to be better than one?

Other dangers exist. If marriage can be redefined so that it no longer means a man and a woman but two men or two women, why stop there? Why not allow three men or a woman and two men to constitute a marriage, if they pledge their fidelity to one another? If marriage is simply about adults who love each other, on what basis can three adults who love each other be prevented from marrying?

Why not indeed? I don’t really see this as a danger. If you seen two parents of different sexes as a good thing, why wouldn’t multiple parents of mixed sexes be even better? Mind you, I don’t see anyone seriously campaigning for this.

In November 2003, after a court decision in Massachusetts to legalise gay marriage, school libraries were required to stock same-sex literature; primary schoolchildren were given homosexual fairy stories such as King & King. Some high school students were even given an explicit manual of homosexual advocacy entitled The Little Black Book: Queer in the 21st Century. Education suddenly had to comply with what was now deemed “normal”.

I’m not sure what policies in Massachusetts have to do with the discussion in hand. What is appropriate in British schools will be decided by the British parliament and British courts.

And your use of scare-quotes around the word “normal” rather gives away your whole view on this matter. Homosexuality is normal. Deal with it.

Disingenuously, the Government has suggested that same-sex marriage wouldn’t be compulsory and churches could choose to opt out. This is staggeringly arrogant.

No, that’s not arrogance. It’s government trying to accommodate the outdated views of people like you.

No Government has the moral authority to dismantle the universally understood meaning of marriage.

Maybe not. But society does. And government is acting as the representative of society here.

Imagine for a moment that the Government had decided to legalise slavery but assured us that “no one will be forced to keep a slave”.

Would such worthless assurances calm our fury? Would they justify dismantling a fundamental human right? Or would they simply amount to weasel words masking a great wrong?

Oh, you’re on very shaky ground here. Remember that the Christian church endorsed slavery for as long as it could get away with it. And besides, slavery clearly reduces human rights, equal marriage increases them.

The Universal Declaration on Human Rights is crystal clear: marriage is a right which applies to men and women, “the family is the natural and fundamental group unit of society and is entitled to protection by society and the State”.

This universal truth is so self-evident that it shouldn’t need to be repeated. If the Government attempts to demolish a universally recognised human right, they will have forfeited the trust which society has placed in them and their intolerance will shame the United Kingdom in the eyes of the world.

Didn’t we cover this a few paragraphs back? The Universal Declaration can and should be changed if it no longer reflects modern society.

The Cardinal has no reasonable argument here. He is simply saying that something shouldn’t change because it hasn’t changed before.

As he says in his opening paragraph, the government is opening a public consultation. If society believes what I think it believes then the final report will recommend that the definition of marriage should be changed. If society is still as blinkered as the Cardinal hopes then the report will recommend that things remain as they are.

That is surely the best approach to take. To ask people what they want. But scare-mongering and hand-waving of the kind in the Cardinal’s article has no place in the discussion. If he has facts and evidence to back up his claims, then let’s see them. But I don’t think he has.

March 04, 2012 01:26 PM

Week Notes 8 & 9

Eventually I suppose I’ll have to give up and call these entries “Fortnight Notes”.

Health

Not having a cast on has made a huge difference. For the last couple of weeks I’ve still been using a crutch for journeys to and from work, but I really haven’t been using it much during the day. This weekend I haven’t picked it up at all. And I was out and about in Balham for over an hour yesterday.

One of the reasons for using the crutch while commuting was to increase my chances of being offered a seat. After doing this for two weeks I can report that having a crutch is almost useless for the purpose. I think I’ve been offered a seat about four times. Each time it has been by a young woman. Make of that what you will.

Speaking and Training

Last week I ran four days of training in conjunction with O’Reilly and FlossUK. It went well. We had nine people on each of the two two-day courses. About half of them did both courses. The feedback forms all seemed pretty positive.

And I’ve already confirmed my next set of training. I’ll be in Edinburgh for the week 30th April to 4th May. If anyone in Edinburgh wants to meet up in the evenings then please get in touch.

Writing

It appears that in the last two weeks I have managed exactly one blog post. That’s just not good enough,

I have, however, discovered some interesting (well, interesting to me) old writing. It seems that it’s almost exactly ten years since I started my first blog. I thought I’d lost all of the entries, but I found them in a database back-up. More about that next weekend.

Technology

I spoke too soon when saying how easy it had been to install Fedora on my new laptop. When I got it to the training venue the Mini DisplayPort wasn’t working correctly and couldn’t detect the projector. Need to work out what’s going wrong. I think it has something to do with the laptop having Nvidia’s new Optimus technology which means it effectively has two GPUs – an Nvidia card for high performance graphics and an on-board Intel unit to save battery life when you don’t need the Nvidia card. There’s a project called Bumblebee which is aimed at supporting this on Linux, but it all seems a bit cutting edge for my tastes.

Luckily I’m always suspicious of video output on new laptops so I took my old one to the training with me as well. But I want to get that sorted out before going to Edinburgh.

I get my broadband connection from Be. About three months ago they offered my the chance to get the actual phone line from them as well (instead of renting that from BT). It saved a few quid a month so I took them up on the offer. As a thank-you for being one of the first customers to sign up they sent me a new BeBox (their name for their ADSL modem/router). This made me happy as the old one had suffered greatly from being in a dust-ridden building site for most of 2010. I was amazed that it was still working – but it had a nasty habit of overheating and cutting out regularly.

I kept meaning to set up the new one, but didn’t get round to it before breaking my leg. And then I wasn’t really mobile enough to crawl around on the floor setting it up. Yesterday when the old unit overheated one time too many I decided it was finally time to set up the new one.

And what a difference it has made. I reckon the connection now appears good 50-100% faster than it was. I don’t know if that’s because the unit is just newer and better or because the new unit isn’t full of dust – but it’s like using a whole new internet.

Films

Don’t seem to have been watching many films. Or, at least, films that I’ve never seen before. Oh, I watched Starship Troopers for the first time. People tell me I should see it as satire, but I just saw it as dull and uninteresting. On the other hand, the new trailer for Avengers Assemble has me very excited.

TV

Continuing through Lost. We’ve just stated series five. Gave up on Grimm after two episodes. Been enjoying Homeland. And we’ve been rewatching some old episodes of The West Wing. It’s as good as it ever was, but it’s making me a little depressed. I keep wishing that the real White House was run by people as sharp and intelligent as that.

Books

Reading has been going slowly this year, but this week I finished a book that I want to recommend to you all. The English Monster is great. It’s a historical novel. It’s a detective novel. It’s a London novel. It has pirates. And it has a tiny touch of magical realism that brings it all together. I enjoyed it thoroughly. You probably will too.

March 04, 2012 11:08 AM

March 03, 2012

Richard WM Jones

rich

The libguestfs binary “fixed” appliance [README] is a copy of the Fedora appliance, adapted so you can just download it and use it directly with libguestfs.

Just download libguestfs ≥ 1.17.10 (or from git), compile without the usual appliance:

./configure --disable-appliance --disable-daemon
make
sudo make install

Set your path to point to wherever you unpacked the appliance:

export LIBGUESTFS_PATH=/usr/local/lib/libguestfs/appliance

and then run libguestfs and the virt tools in the usual way.


March 03, 2012 08:32 PM

March 01, 2012

Richard WM Jones

win8

I’ve been worried for a while that Red Hat’s corporate users will hate us and leave after we force GNOME Shell onto them in RHEL 7. Today however I used Windows 8 “Metro” …

Pop quiz: How do you exit the browser?

It’s a bit of a shame that we seem to be in a race with Microsoft to the bottom.


March 01, 2012 10:37 AM