Matt's Musings

October 26, 2005

Lightweight Debian Archive Scripts

Filed under: Debian — matt @ 11:09 pm NZST

Update – 21 Jun 2006: This post just featured in DWN even though its hardly fresh news! I’ve since updated the scripts to use reprepro, so I would highly recommend you read the updated post. The remainder of this page exists only for historical interest!


Hello Planet Debian :) ,

Steve Kemp wants a solution to magically build uploaded packages. I maintain several small Debian archives and recently needed a solution like this too. The solution needs to provide semi-automated package builds and installation. The full Debian Archive Kit (DAK) was far too heavy for my needs.

I ended up creating a couple of wrapper scripts around sbuild and debarchiver to achieve this. The basic flow of packages through my archives goes like this:

  1. Packages uploaded to an incoming directory (/home/sbuild/incoming/<dist_name>)
  2. process_packages script scans incoming directory for each dist every minute and spawns builds (via sbuild) as necessary
  3. Once packages are built site admin is emailed build logs
  4. Admin checks packages and runs add-packages to add the packages to the archive
  5. add-packages invokes debarchiver to do the heavy lifting and then generates the release files.

There is no support for GPG signed packages at this stage, hence the manual check before packages are added to the archive. The scripts were a quick hack a few months ago, and I’ve just hacked them again to pull all the site specific stuff out into easily modifiable variables at the top of the scripts, so hopefully I haven’t introduced any syntax errors! You will need correctly configured sbuild and debarchiver setups prior to running these scripts.

If you want to use them, feel free, I’d love to know if they are useful to anyone but me. If there is some interest I’d be happy to tidy them up, package them properly and maintain them.

Get them from:
http://www.mattb.net.nz/debian/misc/process_packages
http://www.mattb.net.nz/debian/misc/add-packages

I run process_packages from cron with an entry like

*/1 * * * * sbuild /home/sbuild/bin/process_packages &>/dev/null

My /home/sbuild layout looks like

drwxr-xr-x 2 root sbuild 4.0K Jul 31 11:16 bin
drwxr-xr-x 2 sbuild sbuild 12K Oct 26 16:32 build
drwxr-xr-x 6 root root 4.0K Sep 14 12:38 chroots
drwxr-xr-x 4 sbuild sbuild 4.0K Jul 13 09:59 incoming
drwxr-xr-x 2 sbuild sbuild 24K Oct 26 16:31 logs

bin contains the scripts, build contains symlinks to the chroots, and is used as the directory to invoke sbuild from. The resulting .debs are also placed in build. chroots contains the actual distribution chroots, incoming holds a directory for each distribution to process and is scanned by process_packages. logs contains a dump of all the sbuild logs. Debarchiver should be configured to pick up packages out of the build directory.

Let me know if I need to provide more details.

October 25, 2005

NBR Article Attacking Open Source

Filed under: Linux — matt @ 9:14 am NZST

There is an article in today’s NBR attacking Open Source Software, and attacking it quite vehemently. You could almost believe that the writer was on the Microsoft payroll!

If you can look past the obvious anti-OSS sentiment that the author holds then there is validity in some of the points, such as around the capability of NZ IT companies to support OSS. Overall the author just comes across as a raving loon in my opinion.

Find it at http://www.nbr.co.nz/home/column_article.asp?id=13257&cid=3&cname=Technology

Choosing ‘Original’ names for software

Filed under: Linux — matt @ 8:28 am NZST

I spent some time yesterday evaluating and tweaking the Original (Online Remote Image Gallery Initially Not As Lovely) photo gallery for use on my website which is currently running an old version of PHP gallery. This got me thinking about the naming of software, and particularly about the fact that while Original is a nifty name for an online gallery script, choosing an adjective to use as a noun can have some interesting effects later on! Read on for the full story.

I’ve been becoming more and more unhappy with PHP gallery for quite some time now, but I hadn’t found a credible replacement until Original came along. For me, PHP gallery has become far too bloated and featureful to the point where it is excruciatingly slow to perform any task (even browsing) on my gallery. I don’t think my gallery is particularly huge, with 26k photos, spanning 113 albums, it’s certainly at the larger end of the scale, but nothing that I wouldn’t expect some well written software to handle. Couple to this the fact that PHP code like gallery is notorious for being a huge security whole in your server and I was keen to get rid of gallery as quick as possible. I should point out that gallery2 might address some of these issues as it is much more modular than gallery 1 ever was. It still wasn’t enough to tempt me to stay with gallery though. Other well-known galleries like coppermine failed the aesthically pleasing test (not that PHP gallery ever passed it either!).

So that left Original. Written by Jakub ‘jimmac’ Steiner, a well known GNOME coder it fulfills most of my requirements:

  • Pretty
  • Easy to add photos to
  • Not bloated
  • Easy to hack

I took me about 2 hours to get Original set up, themed and working to my satisfaction which did involve hacking the code a bit. Mainly to change the layout of a few of the pages, if you weren’t as pedantic as me you would probably get away with just creating your own stylesheet.

Now that I have Original setup and ready for photos I have to somehow get all my photos (and preferably their captions and comments!) out of Gallery and into Original! As part of this I would quite like to narrow down the selection somewhat and have my online gallery being a “best of” collection, rather than the canonical repository of my photo collection.

My tool of choice to achieve all this is F-Spot, one of the new bread of Mono apps for GNOME sponsored by Novell. F-Spot already supports creating Original galleries, but doesn’t officially support importing from gallery. More on that in another post. To stay true to the title of this post I want to finish up by pointing out that choosing an adjective “Original” to use as the name (noun) of your software, isn’t the best idea in the world.

The first time I tried to export an Original gallery from F-Spot I gave up and concluded that it wasn’t supported. I went to the File > Export menu, Choose “Export to Web Gallery” and stopped. This option seems to only support exporting to the very gallery program that I’m trying to rid myself of! I didn’t really expect to find support for Original anywhere else (seeing as it’s a web gallery), but just to be sure I checked the other options, Export to Flickr, no. Export to CD, no. Export to Folder… Maybe.

In the Folder Export dialog there is a set of options title “Export Method”, the options are:

  • Use Original.
  • Use static HTML.
  • Plain Files.

The first (and second) times I looked at that dialog, despite the fact that I was trying to export photos to Original, and was conciously looking for the option, I completely failed to realise that “Use Original” was what I wanted. My mind was reading the caption as “Use original folder structure” rather than “create folder structure for use by the Original gallery script”.

I’d like to file a bug on this to get the wording clarified, but I’m having trouble deciding what it should be. Once you know what it is it seems obvious, the O is capital, so it’s not being used as an adjective, but that is a detail easily thrown away by your mind when scanning the dialog! I’m currently favouring a longer caption such as “Use Original Gallery Folder Format” perhaps with Original in quotes. I also think that moving it into the “Web Gallery” export tab rather than the “Folder Export” tab would clear things up immensely.

So, fun and games with software names. What other sofatware uses an adjective as a noun, and does it cause as much confusion as this has?

October 21, 2005

Helping out Rodney

Filed under: WLUG / LinuxNZ — matt @ 7:02 pm NZST

A few weeks ago I got a phone call out of the blue just as I was leaving work from one of Rodney Hide’s staff. Rodney has been setting up Linux on his laptop recently, using Ubuntu, but was having some problems getting his T3G card working. Somehow they managed to get my number from the WLUG Website somewhere (they thought of WLUG because Rodney spoke there last year).

Luckily I had used a T3G card earlier in the year for work and knew how to set it up. I guess I should wiki that at some point…

The deal was that Rodney had to blog and say thanks for WLUG for the help. We got the blog post tonight, except apparently I am Matt Brown from “NZLUG” rather than from “WLUG” :(

Oh Well, We’re all friends in the NZ Linux community right?, so I guess it doesn’t matter which LUG gets the credit!.

October 7, 2005

Application Manager Assigned

Filed under: Debian — matt @ 8:31 pm NZST

I came one step closer to becoming a Debian Developer today when Alexander Wirt was assigned as my Application Manager. Now I will spend several months working through the NM process with him.

You can keep track of my progress at the follwing URL: https://nm.debian.org/nmstatus.php?email=debian%40mattb.net.nz

October 4, 2005

An interesting read…

Filed under: General, Linux — matt @ 11:25 pm NZST

I stumbled across a Journal call First Monday in my trawls through the web today. It is an online peer reviewed journal focussing on "Internet Topics". It contains lots of F/OSS articles and analysis by lots of interesting luminaries such as Bruce Perens, Eric Raymond and Benjamin Mako Hill.

I’ve only had time to browse through a few of the articles in the latest edition, but the quality of writing seems to be high and the points of view are interesting and thought provoking.

A recommended read:

First Monday – Peer Reviewed Journal on the Internet

Powered by WordPress