Generating manpages with help2man

August 31st, 2010

To quote the ftp-masters REJECT-FAQ :

  • Write manpages. Yes. Really. Write them. Well. It’s basically: If your program/tool has a help and version commandline option you can simply run help2man and have a working start.

What may not be obvious to the recently REJECTed developer is actually how to use help2man. To try t0 explain the process a bit more verbosely, I took the liberty of writing a tutorial on the Debian wiki. Comments and corrections are welcome.

Of course, help2man-generated manpages are no substitute for real, hand-written manpages made of sweat, blood, and the Maintainer’s tears, and it won’t work for all packages. This is just a start, and is much better than no manpages at all.

There was a discussion on #debian-devel a couple of days ago when I brought up my creation of the above, and some wondered if it wouldn’t be better to add hooks to man-db to allow package maintainers to enable manpage generation at runtime. I’m not sure if that idea will ever make it into a proposal, but, if the details of the implementation were worked out, would be much better than the above, manually generated method.

Hello, (Planet Debian readers of the) world!

June 25th, 2010

I’m a Debian Maintainer currently undergoing the New Maintainer process. I’m also an Ubuntu MOTU as of recently. I have several packages in a variety of categories, but I specialize in Python-based software.

I’m interested in exploring more ways to improve cross-distribution coordination, specifically as it relates to the Debian Sugar packages. I’m working to get all of the Ubuntu-specific Sugar packages included in Debian, which will probably be a summer-long effort.

Post-mortem on WMF Server Donation

June 22nd, 2010

Of the 12 servers sent to Sugar Labs, 6 arrived at the Arlington Career Center. Three of them stayed there, whereas I brought three home to attempt to salvage what I could from them. The three that arrived are described below.

wmf-01 “le premier”

2x Dual Core AMD Opteron(tm) Processor 285 @ 2606.342 MHz
2x 250 GB HDDs, 2x slots empty
2 Gigabit Ethernet NICs

This machine worked swimmingly.

wmf-02 “something witty”

2x Dual Core AMD Opteron(tm) Processor 265 @ 1800.000 MHz
2x 250 GB HDDs, 2x slots empty
2 Gigabit Ethernet NICs

This machine was incredibly noisy when turned on.

wmf-03 “lemon”

2x Dual Core AMD Opteron(tm) Processor 265 @ 1800.000 MHz
2x 250 GB HDDs, 2x slots empty
2 Gigabit Ethernet NICs

This machine did not fully POST, and was incredibly noisy when turned on.

Between them, only one of them had working fans. The other two made ungodly noises. We managed to salvage enough fans from the machine that didn’t post so that we now have two working machines cooling-wise.

We hope to install these machines at a Virginia co-lo center after we finish getting all the parts for Ivan Krstić‘s blackrock.

NB: This post has been sitting around in my drafts for a while, and I just got around to posting it now. We’re still waiting on some last-minute parts before putting these serves into production.

If I had a dollar for every idea…

June 16th, 2010

On suspendable computers retaining network services with conditional wakeup…

(11:28:29 AM) Luke Faraone: don’t you hate it when you think of something cool, only to find that someone else already thought of it?
(11:28:47 AM) Peter Harkins: Depends. Sometimes I then think “Awesome, now I don’t have to spend all that time building it.”
(11:29:34 AM) Luke Faraone: I recently was thinking “it’d be cool to be able to have a smaller ‘little computer’ with a NIC, some RAM, and a low-powered CPU to maintain presence on IRC etc when my computer’s sleeping.” Then I saw http://it.slashdot.org/story/10/06/13/0641228/Microsofts-Sleep-Proxy-Lowers-PC-Energy-Use
(11:29:39 AM) Luke Faraone: … and it’s from MSFT.
(11:30:12 AM) Peter Harkins: cute
(11:30:25 AM) Peter Harkins: There are lots of tiny Linux pc’s out there, though.
(11:30:45 AM) Peter Harkins: I’ve seen a couple the size of a power brick – you plug them in, add ethernet, done.
(11:31:14 AM) Luke Faraone: what’d be really cool is if one could author an API that would allow for desktop applications to request access to run services on the device, and have state magically transfer across them.
(11:31:40 AM) Peter Harkins: I’ve seen people talking about doing that – I wouldn’t be surprised to see it commonly in 5y.
(11:31:49 AM) Peter Harkins: It’s sort of the logical extension of GNU screen.
(11:32:10 AM) Luke Faraone: we have live migration of VMs in the enterprise market.
(11:32:34 AM) Luke Faraone: if the wall wart had hypervisor support, you could just operate each service in a sort of sandbox.

I know that in order to make it work in reality, we’d need support from app developers, but are there any technical reasons this won’t work?

Low-tech anti-surveillance tool for the OLPC XO-1

February 25th, 2010

After reading several articles about the alleged spying that was enabled by a Pennsylvania school district via its one-to-one MacBook, and seeing discussion on a variety of mailing lists, I’ve decided to implement my own zero-cost, no-hassle solution to the problem for the OLPC XO-1‘s camera.

This should be able to be adopted in deployments everywhere, by anyone with a piece of paper, or anything else they can slide through the plastic faceplate.

Just say no to fancy addons and factory-added “shutters” or “covers”, make your own!

Sometimes things get complicated… (Handling upgrades from Karmic)

January 14th, 2010

I’m the package maintainer for Autokey in Debian. Upstream recently changed from using GTK+ to Qt4, which caused more than one complaint from users of testing.

The GTK+ version of the package is published in Ubuntu 9.10 Karmic. While upstream is continuing to do regular releases of the GTK version, they are focusing on the KDE version and have changed autokey to refer to the KDE version, while renaming the GTK version (formally autokey) to autokey-gtk. To make matters worse, upstream releases both as separate tarballs, and the packages conflict with one another.  (due to technical limitations)

What’s the proper proceedure for handling this in Ubuntu? Should -gtk conflict with autokey, replace it, with  autokey-qt being available as an option, or should I just keep things as they are and have the package “change out from under” users when they upgrade?

Best bug report ever

December 21st, 2009

Looks like someone took the prompt at xmarks‘ GetSatisfaction site literally:

This really burns me up!? What kind of craptacular beta is this? Do you kiss your mom with this kind of code? You developers will be the first up against the wall when the revolution comes!?

Chrome Beta: password sync failed with horrible javascripty error message. [via Google]

Fix bricked XOs automatically

November 30th, 2009

I’ve been getting increasing numbers of requests from donors in the first OLPC Give 1 Get 1, many of whom are just getting around to opening their XOs, to have their laptops repaired. As is now widely known, due to a manufacturing glitch the first few batches of OLPC XO-1s that were shipped to consumers had a faulty motherboard battery holder. This alone wouldn’t be a problem, if only two other things hadn’t happened at the same time:

  • The XO-1s were shipped with Open Firmware‘s security enabled. This caused them to have the same anti-theft protection as laptops deployed in the third world, without any of the benefits of a remote killswitch or tracking
  • The XO-1s had a version of OFW which would fail to boot when the clock was below a certain value

The above two issues combined with the manufacturing fault was a recipe for disaster. Owners who discovered this in the first 30 days were able to get a RMA and a working laptop, but OLPC lacked the resources to support those outside of this minimal warranty. I’ve been running an OLPC repair center, OLPC DC Repair, (charging only minimal fees for labor and shipping) since mid-2008, and have handled dozens of these “unbricking” problems.

The procedure for repairing the above is straightforward and well documented. However, it can be tedious, especially for those who are unfamiliar with the tools involved. Since I needed the programming practice anyway, I decided to write a rudimentary Python script to automate the process.

Thus enters d6.py. d6.py makes it (hopefully) amazingly simple to unbrick your XO, so that you can get up and running as soon as possible. You can clone the git repo, or download it directly (permalink). To download and run in a single command:

python -c "import urllib2; exec urllib2.urlopen('http://dev.laptop.org/git/activities/olpc-contrib/tree/d6.py').read();

Plug in your OLPC Serial Adapter (or one of the compatible alternatives), and run the script as a user which has access to /dev/ttyUSB0 (or as root, not recommended) or change the path inside the script to something suitable to your system. This script is in the alpha state, is poorly documented, and may not handle all edge cases (read: other people’s systems) well. I’m not responsible if it kills your cat, lights your XO on fire, or makes your wife leave you, but hopefully it’ll be of some use. Expect a GUI shortly.

Limitations:

  • Does not handle all error conditions
  • No command line params
  • Hard-coded path to serial adapter

Therefore, the code does not run on other platforms other than Linux. You might also encounter problems if you’re running it on a system with brltty installed, removing it should fix the conflict.

Feedback is more than welcome in the comments.

I’ve been running an OLPC repair center

Applying memory retention techniques

September 29th, 2009

NB: the following is an essay I wrote for an AP Psychology class. I’m publishing it here to get feedback on my terrible writing style.

The primary purpose of attending school is to learn new ideas, concepts, and methodologies. Ideally one should retain everything one learns in the classroom, so that one may do well in the short term, eg. on an exam, as well in the long term, in college and beyond. Unfortunately, there are a number of constraints on a person’s time and energy, such as after school activities and biological necessities. Therefore it is highly desirable if there are means by which we can increase our information retention with a minimal increase in the amount of time or effort spent learning.

An example of such tool is the Spacing Effect. It essentially states that one has a higher level of retention if one spaces periods of study over a longer period of time, contrasted with “cramming” everything in one go. Even if the total amount of time spent studying is the same, one will remember more if said time is spread across a wider period. While it is very easy to procrastinate, it is important to pace oneself and not “leave it all ’till the last minute” before an exam, essay, or other assessment. While one may still pass the assessment, they will probably not exhibit long-term recall, and will have to mostly relearn the material when it comes time for a final exam or standardized test. Read the rest of this entry »

NComputing and Sugar

July 3rd, 2009

Apologies for not posting recently, but I’ve been really busy with various events and tasks for the summer. I just got back from NECC09, where ISTE had been nice enough to give Sugar and other FLOSS projects their own presentation room, gratis.

While assisting with the various presentations at the Open Source Center and staffing the Sugar/OLPC booth, I ran into some of the folks from NComputing. Their corporation has some similiar goals with that of OLPC, as both involve low-cost computing for the third world and elsewhere. Providing multi-seat technology, which is similar to thin-clients without the lag and network overhead, they enable multiple displays and mice to function off a single computer. Since they support both Ubuntu and SuSE Linux with their (admittedly closed) hardware, I decided to investigate their technology as a means of enhancing deployment of Sugar.

The method to activate the NComputing software (requires registration to download) is not obvious; one must navigate to the console, select “Serial Numbers” from the side menu, and then right click the empty license list and choose “Manage”. Many users would not be able to do so without the manual; maybe it would be easier to prompt for a license key in the debconf install process?

Unfortunately, I wasn’t able to test their software with Sugar; the most recent version of Ubuntu they support is 8.04, and I can’t even insmod their kernel module on 9.04.

aside: meant to put this out an age ago, just got around to hitting “publish” today. (2009-08-16)

http://en.wikipedia.org/wiki/Free_and_open_source_software