Brett Smith (Free Software Foundation) talks on the TPP in Melbourne – March 5th!

Updated: new (larger) venue now finalised.

Brett Smith is in Melbourne to talk to government negotiators about the Trans-Pacific Partnership Agreement (TPP) and the impact on free software. This public lecture will introduce free software and discuss recent issues in free software licensing, including the TPP. Members of the public are welcome. No technical knowledge is required.

It will be on Monday 5 March, 2012, 6 p.m. in Theatre 1, ICT Building, Barry Street, Carlton.

This talk will introduce free software, explain why it’s important, and explore the many places where free software interacts with the law. Brett Smith will illustrate how copyright, licenses, patents, trade agreements, and other laws all play a role in deciding whether and how we can create, use, and share free software — and by extension, who controls our computers. Members of the public are welcome. No technical knowledge is required.

Brett is a GPL Ninja. He works in the Free Software Foundation’s Licensing Compliance Lab, as license compliance engineer. Brett answers complex licensing questions from the public, writes widely read and timely posts for the FSF’s blogs, codes up Python programs, and dashes across the country to give input to policy makers. Brett also ran the GPL version 3 drafting process.

Please register here: http://apps.freesoftware.asn.au/invite/brett-smith-fsf/

A Week or so with the Samsung Galaxy Nexus

After a couple of good years with my Nokia N900 I’ve come to the sad conclusion that there’s no future for that platform due to the combined actions of Nokia and Intel – Nokia for dumping Linux and going with Windows Mobile for their smart phones after getting a new CEO (ex-Microsoft) and then Intel through dumping Meego and setting up a partnership with Samsung for yet another mobile Linux platform called Tizen (which at least went for the code first, hype second path, unlike Meego). Intel are now on their third mobile Linux project as there was their Moblin project which was merged with Nokia’s Maemo to form Meego (announced less than 2 years ago) so they have form here as a serial abandoner.

Looking at what is left in the mobile space it was really a no-brainer as neither Windows Mobile nor Apple’s iOS appealed at all, so it had to be an Android phone. The timing was pretty good as Samsung and Google had just started shipping their jointly designed Galaxy Nexus with Android 4 (aka Ice Cream Sandwich or ICS). It has the advantage of apparently being a phone recommended for the AOSP (Android Open Source Program) should I feel the need once my warranty expires – though I can’t find a reference to that now! I ordered an unlocked Galaxy Nexus with 2 year warranty from Mobicity as I didn’t fancy the rubbish that carriers tend to put onto their phones, nor get handcuffed into a contract I didn’t want. As an added bonus Mobicity let you pick from 3 optional accessories for free – I picked the screen protector (the other were either a charger or a bluetooth headset from memory).

As an amusing aside I did try and see if Dick Smith Electronics would price match with Kogan for the Galaxy Nexus as Kogan was far cheaper and DSE was only selling them online, but with a manufacturers warranty (unlike Mobicity or Kogan). Unfortunately DSE declined to do so on the grounds that Kogan didn’t have a physical retail outlet which was a bit rich given that neither does DSE for these phones. But then I found out they are now owned by Woolworths and so I didn’t fancy supporting the largest owners of poker machines in Australia.

Despite the best efforts of UPS (who said it would take 6 days to cross Melbourne having taken 24 hours from Hong Kong – it actually arrived the following morning) I received it intact and on time.

Samsung / Google Galaxy Nexus

I’ve now been playing with it, er, using it in anger for over a week now and so far I’m very happy. I’d have to say the best description of the overall experience is “smooth”. Android 4 seems light years ahead of Android 2.3.3 on my wifes Huaewei Sonic, though part of that will be the fact that it’s just a much more capable phone with a larger screen and much more powerful processor.

Good bits:

  • Auto-language select – it started up in Chinese characters but before I could really wonder how I’d fix that it detected it had an Australian SIM in it and autoconfigured the locale to match.
  • No extra cruft – I’ve not spotted any “extras” from Samsung on the phone – the Market is the standard Android Market, etc.
  • Good size screen – the phone feels much smaller in the pocket than my old N900 due to its narrowness despite it having a much wider screen.
  • Android Market – heaps of apps, though the usual criticism of it not being easy to search for open source applications applies here.
  • Camera – it’s “only” 5 megapixels, but it’s still pretty good (though I’ve not yet figured out how to turn the flash off).
  • NFC – OK, a little bit of a toy at the moment, but there are a couple of apps that will read it and confirm that the reason my Myki and Uni ID card interfere is that they’re the same type of technology and so interfere with each other. As do my credit card and my bank card (same tech again).
  • Compass – my N900 had GPS and accelerometers (as does the Galaxy Nexus of course) but the compass allows neat things like Google Sky where you can just point your phone at the sky and have it show you a labelled view of planets stars and constellations.
  • IPv6 works on Wifi – I know people say IPv6 has worked on Wifi since Android 2.2, but it certainly doesn’t on my wifes Android 2.3 phone. But the Galaxy Nexus seems quite happy on my home network with native dual stack IPv6 courtesy of Internode.

Of course nothing is ever perfect, so here’s my feelings on the bad bits:

  • No real keyboard – I really miss the N900’s physical keyboard, it made typing easy. The on-screen keyboard that Android has is good, and quite usable for SMS, Twitter, etc, but for things like the Connectbot SSH client you can’t beat a real keyboard
  • No NTP synchronisation possible – you can get root on the phone (and void your warranty) but this *really* shouldn’t be necessary!
  • NITZ sucks – whilst it gets the time right the timezone is out by an hour. Probably a carrier issue but I don’t think phones should be relying on it. Had to set it by hand to fix it up.
  • Short notification sounds – a minor nit but the default notification sounds that are used for things like SMS, etc, are really short and quite easy to miss.
  • Not entirely open source – whilst the N900 wasn’t either it does seem to have been more open than Android, and it didn’t try and avoid GPL code at all costs like Android does.
  • No update to Android 4.0.2 available (yet) – so far it appears that Samsung haven’t pushed an Android 4.0.2 update to the region my phone was intended for – though other Galaxy Nexus owners around the world have reported getting updates at other times (including someone at Mobicity where I bought it). I suspect this is just an organisational delay and nothing more serious, but it is annoying. If it wasn’t for the warranty issue I’d consider reflashing the phone with the stock Google firmware for the Galaxy Nexus and pick the updates up directly from them in future.

To finish it off here are three images taken with the camera in the Samsung Galaxy Nexus (as I said I was happy with it), the first one was used on the weather slot as a background by the ABC News people last week!

Melbourne summer morning Swanston St Skyline The Light Side and the Dark Side

Vacation 1.2.7.1 Released

Vacation 1.2.7.1 is a bug fix only release which now complies with RFC-3834 “Recommendations for Automatic Responses to Electronic Mail”. A big shout of thanks to Dr. Tilmann Bubeck, the Fedora packager, for bug fixes and a German translation of the manual page.

You can download this latest version of Vacation from: http://sourceforge.net/projects/vacation/files/vacation/1.2.7.1/

It includes:

  • a fix from Dr. Tilmann Bubeck to stop Vacation from munging the GECOS information of users and instead pass it quoted to the MTA for it to deal with (fixes Fedora bug #553505 and SourceForge issue #2928189).
  • Vacation now adds the Auto-Submitted: header as per RFC3834 (fix from Dr. Tilmann Bubeck).
  • Vacation now abides by the RFC 3834 header “Auto-Submitted:” (fixes SourceForge issue #3062665).
  • Fixes up some Coverity grumbles (a redundant fopen() and others).
  • Compiles cleanly with GCC 4.6.2.
  • Now includes a vacation.spec file contributed by Magnus Stenman.
  • The old HTML version of the manual page was out-of-date and so it has been removed (along with html2man) leaving the nroff version the master.
  • Added German translation of the nroff manual page (Dr. Tilmann Bubeck).
  • Note that the English man page has been renamed to vacation-en.man and vacation.man is a symlink to it, so German speakers can just change that symlink before installing to pick up the German translation.
  • Clean up of some old directories in the source code that have been made obsolete by source code control (they contained old, applied, patches).

You can be involved in the development of Vacation by subscribing to the vacation-announce and vacation-list mailing lists and/or logging bugs and feature requests on the SourceForge tracker.

First Release Candidate for Vacation 1.2.7.1

Vacation 1.2.7.1 rc1 is the first release candidate for the first bug fix only release in the 1.2.7 branch.

This release fixes up a warning for orighdr in GCC 4.6.x. It also includes a German translation of the manual page courtesy of Dr. Tilmann Bubeck, the Fedora packager, and some cleanup work (removing obsolete directories).

Note that the English man page has been renamed to vacation-en.man and vacation.man is a symlink to it, so German speakers can just change that symlink before installing to pick up the Dr. Bubecks translation.

Please do grab this and test it out!

If I don’t hear any problems before next weekend I intend to release this as the official Vacation 1.2.7.1.

Old patch for Bonnie++ to use random data rather than 0’s

Way back in 2007 I posted a blog about testing ZFS/FUSE with Bonnie++ using random data rather than 0’s, and I said:

it’s not ready for production use as it isn’t controlled by a command line switch and relies on /dev/urandom existing. yes, I’m going to send the patch to Russell to look at

I didn’t get any feedback on the patch, so I’ve decided to post it here in case people are interested.

diff -ur bonnie++-1.03a/bonnie++.cpp bonnie++-1.03a-urand/bonnie++.cpp
--- bonnie++-1.03a/bonnie++.cpp 2002-12-04 00:40:35.000000000 +1100
+++ bonnie++-1.03a-urand/bonnie++.cpp   2007-01-01 13:03:41.644378000 +1100
@@ -41,6 +41,9 @@
 #include <string.h>
 #include <sys/utsname.h>
 #include <signal.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
 
 #ifdef AIX_MEM_SIZE
 #include <cf.h>
@@ -148,6 +151,28 @@
   }
 }
 
+void load_random_data(char *temp_buffer,int length)
+{
+       int filedes, numbytes;
+
+       filedes=open("/dev/urandom",O_RDONLY);
+       if(filedes<0)
+       {
+               perror("Open of /dev/urandom failed, falling back to 0's");
+               memset(temp_buffer, 0, length);
+       }
+       else
+       {
+               numbytes=read(filedes,temp_buffer,length);
+               if(numbytes!=length)
+                       {
+                               perror("Read from /dev/urandom failed, falling back to 0's");
+                               memset(temp_buffer, 0, length);
+                       }
+               close(filedes);
+       }
+}
+
 int main(int argc, char *argv[])
 {
   int    file_size = DefaultFileSize;
@@ -477,7 +502,8 @@
       return 1;
     globals.decrement_and_wait(FastWrite);
     if(!globals.quiet) fprintf(stderr, "Writing intelligently...");
-    memset(buf, 0, globals.chunk_size());
+    // memset(buf, 0, globals.chunk_size());
+    load_random_data(buf, globals.chunk_size());
     globals.timer.timestamp();
     bufindex = 0;
     // for the number of chunks of file data

Second beta release of Vacation 1.2.7.1

Vacation 1.2.7.1 beta2 is the second beta for the first bug fix only release in the 1.2.7 branch.

This release just fixes up some issues that Coverity revealed, none of which appeared to be harmful.

NB: If you compile with GCC 4.6 and see a complaint about orighdr being set but never used in rfc822.c don’t worry, its already fixed in git and will be in the first RC (assuming nothing bad is found in this version).

Please grab this beta release and test it and report any problems!

Recovering 5.25″ Floppy Disks

When I was at the University College of Wales, Aberystwyth they were just starting to supplement their serial terminals connected to X.25 PAD’s with some PC’s (Viglen I think), complete with hard disks and 5.25″ floppy drives. So I have had two boxes of 5.25″ floppies which dutifully came out to Australia with me when I emigrated from the UK back in 2002. These floppies are now well over 20 years old so I reckoned it would be about time to see whether they were still readable and, if so, what was on them. Labels like “Honeywell Backup Disk #1” only say so much.. 😉

The first problem was that I didn’t have a 5.25″ floppy drive. Luckily my boss at VLSCI was able to lend me one. The second problem was I didn’t have a floppy cable with the 5.25″ connector on it. Fortunately Bernie at work had an old PC that was in bits which did have one, so I was able to borrow that. Then I found that the old Dell PC I was thinking of using had a really weird connector and wasn’t going to be that useful. My even older Olivetti Netstrada (a quad processor Pentium Pro monster) did have IDE, but the cables were going to be rather hard to get to as it has a bunch of SCSI drives and the cables for them were going to make it hard.

My final box was an VIA EPIA V box (originally from EverythingLinux back in 2003) which did have an easily accessibly floppy connector on the mother board, but only a single power connector for a drive. So it was either the internal IDE disk, or the floppy, but not both. I could have gone and bought a power splitter, but I thought I’d take the cheaper way and netboot it (the onboard ethernet chipset has PXE support) – it should be pretty easy.. Hah! 🙂 This is what the box looked like after some careful assembly..

Resurrecting 5.25" floppy disks - hardware

The first test was to see if the 5.25″ floppy disk drive worked. Luckily I had a floppy labelled as “system boot disk” and after some mucking around in the BIOS (it turns out you can set it to boot from floppy without having enabled the floppy controller, which results in it not booting from floppy and much cursing until you discover it) it booted first time – a 23 year old DOS boot disk complete with partly bilingual Welsh/English welcome screen from 1988!

UCW Aberyswyth 5.25" floppy system disk from 1988

This was very promising – the first disk had worked first time and a quick test of swapping it out for another and doing a “DIR” also worked. Now to get the data off these before they went to the great /dev/null in the sky..

My plan to recover the info was to netboot this machine as a Mythbuntu diskless front end box – Mythbuntu makes that easy to set up and with a little fiddling of the DHCP server to make sure it would only every try and serve this box, and do so with a static address, it worked. Or at least it would load the kernel. Which then complained that it couldn’t boot as it needed a CPU which had PAE support. 🙁

This VIA EPIA V has a low power (5W) 533MHz VIA Eden CPU (appropriately the kernel detects it as a VIA Samuel 2) and whilst it is IA-32 it doesn’t have some of the newer features which are selected for Pentium class processors in the current Linux kernel.

Oh well, that’s fine, I knew I could use Debian instead, so I used the ltsp-build-client (creating an /etc/sysconfig/ltspdist file first containing the line VENDORDEF="Debian" first so it would use the right set of scripts), thus:

ltsp-build-client --chroot sid --mirror http://mirror.internode.on.net/pub/debian/ --dist sid --purge-chroot --arch i386 --accept-unsigned-packages

Problem was that all the various kernel command line options for specifying the NFS server for the root filesystem just didn’t seem to work, it would just sit there saying something like “Waiting for root filesystem” and eventually give up and drop me to a busybox shell prompt, and a simple cat of /proc/cmdline showed the options were being set correctly. A little more thought and an examination of the config file for the kernel showed that Debian doesn’t ship kernels with CONFIG_NFS_ROOT set, so it was never going to work. 🙁

Whilst I could have rolled my own kernel I decided to instead have a look to see if I could find a Linux distro that included PXE booting as an option and a Google search for “linux distro pxe” turned up PLoP Linux as the first hit.

PLoP Linux is a small (75MB) distro aimed at data recovery operations that comes as an ISO, tar.gz or zip file for i586, x86-64 and (crucially for me) i486 processors. They even have a separate tar file for the PXE files. It was easy to set up and so I booted the PC with high hopes. Then I got the same error about the kernel requiring PAE support in the CPU that I got with Ubuntu. Whilst there was an i486 tar file there wasn’t an i486 PXE tar file! That was easily solved by grabbing the i486 ISO, doing a loopback mount of it and stealing the kernel and initrd.img files from it instead.

This time it booted, and I found that it had just what I was after – a Linux shell prompt, working networking, mtools (for mcopy and mdir) and (most importantly) ddrescue to let me create complete images of the floppies. I created a directory for each floppy disk and then did ddrescue /dev/fd0 floppy.img to make the image. I created another directory called Contents and from there did mcopy -vms a: (yes, I ordered the options that way deliberately) to copy all the files and subdirectories off complete with their last modification times (from 1987 and 1988 generally).

In all I was able to recover 20 of the 21 floppies with no errors at all, which amazed me as I was expecting them to have degraded over time (especially as one box was just a flimsy cardboard box). I was hoping to have original B source code from HoneyBoard (the bulletin board that Alan Cox and others I knew there wrote) and AberMUD from the Honeywell L66 but sadly that doesn’t appear to be the case. There are 3 B programs but one is just just 3 lines (calling a drl) and the other two appear to be two versions of some sort of shell which I didn’t write as the first has a btidy timestamp from April 1987, before I arrived at Aberystwyth.

The 21st disk was completely unreadable – the drive didn’t seem to want to acknowledge its existence and ddrescue couldn’t see anything as the floppy driver in the kernel couldn’t get the drive to provide any data. I might try ddrescue’s mode of copying data in reverse to see if that manages any better..

Wikileaks confirms AFACT acted as a front for the MPAA in the iiNet case

Via a tweet from iiNet, who were sued by AFACT in the Australian Federal Court, this comment on the case from a US cable released by Wikileaks:

Despite the lead role of AFACT and the inclusion of Australian companies Village Roadshow and the Seven Network, this is an MPAA/American studios production. Mike Ellis, the Singapore-based President for Asia Pacific of the Motion Picture Association, briefed Ambassador on the filing on November 26. Ellis confirmed that MPAA was the mover behind AFACT’s case (AFACT is essentially MPAA’s Australian subcontractor; MPAA/MPA have no independent, formal presence here), acting on behalf of the six American studios involved. MPAA prefers that its leading role not be made public.

It also appears the Australian companies involved needed some persuasion to be involved – I wonder if it involved any of the folding paper/plastic type of persuasion ?

AFACT and MPAA worked hard to get Village Roadshow and the Seven Network to agree to be the public Australian faces on the case to make it clear there are Australian equities at stake, and this isn’t just Hollywood “bullying some poor little Australian ISP.”

They also go into the expected reasons why they picked iiNet – mainly that they weren’t Telstra (they were scared of them).

How to test a WordPress install against a new version, without breaking the old one

One problem with upgrading any piece of software is the question of what’s going to break? WordPress is no different in this regard than any other piece of software so before major upgrades I run a test upgrade whilst leaving my real blog alone. There’s no substitute to testing with your real data so what I do is run another WordPress instance under a different virtual domain with a copy of both the database and the installation.

The rough steps I use are:

  • Create a new test domain in DNS
  • Copy the database WordPress uses to a new one and set up appropriate grants on it
  • Go to the options table in the database and change the two references to the old URL of the blog (the siteurl and home rows) to the new URL (otherwise you’ll find yourself constantly getting redirected to the production blog!)
  • Copy your WordPress installation to a new directory (I use rsync -aP to preserve permissions) and configure Apache to serve the new domain from it
  • Edit the copies wp-config.php file to match the new database copy and the username and password for it
  • Go to the new domain and make sure it works!

That should be it really. I first did that for my upgrade to WordPress 2.5 RC1 and it just worked for WordPress 3.2.1.

Caveat emptor: Now warranty, batteries not included, if it breaks you get to keep both parts! 🙂