The Linux Reality podcast produced a little over 100 episodes during it’s 2 year existence. The podcast featured content covering topics as diverse as servers through to desktops and everything in between.
The episodes exist on Archive.org, but the plan for Whobuntu is to create a package of linux reality content with descriptions covering the content.
Software centre provides a mechanism by which this content can be found. Therefore if a user were to search in software centre for DNSMasq then they would be able to find the package – but equally importantly they would be able to locate the episode of Linux Reality with a review and discussion of DNS Masq and some of the alternatives.
Using Software centre you would be able to locate the package Gnumeric, but you would also be able to locate the Episode 23 of LR where Chess Giffin talked about Gnumeric.
How to package static content.
To start with the Linux Reality content was downloaded from archive.org. To make it easy a script was developed which automatically downloaded all the episodes via wget
| Platforms: | Windows 98, Windows 2000, Windows XP, Windows Vista, Windows 7 |
| License: | Freeware |
| Date: | September 20, 2011 |
The process to then package a podcast is as follows :
- Execute the getlr script to retrieve all episodes of Linux reality.
- Create a tarball of all the episodes by executing tar -cvf linuxreality_0.1.tar.gz *.ogg
I then created a tar.gz file containing the episodes. I created a Linux reality folder. Named the same as the tarball I created earlier. From here I ran dh_make and a standard package folder was set up for me. The longest most time consuming job during this process was to index all the episodes. Luckily archive.org had all the original notes which I was able to cut and paste into the control file.
The next question was whether a package is installed for everyone, or just the current user. Daniel Hollenbach confirmed that a package is installed at the system level. This makes supporting a multiuser system more complicated, as Linuxreality would show as installed. The next question was whether new users should have it installed as part of the new user process. My thoughts on that are that we should only be providing what is asked for.If I install linuxreality then I shouldn’t mess with other users music?
To that end I created a postinst script. This executes once the package is installed. The purpose of this script is to create a link between /etc/share/linuxreality and ~/Music/LinuxReality.
When installing an application from software centre, software centre does a fairly good job of presenting a very professional looking user inteface but for applications stored in a PPA, the interface isn’t quite in the same league as the applications provided by the ubuntu repositories.
So what can we do about it? How can we make the packages in our PPA look more like the packages in the main repository?
There are 2 parts of the interface which need more investigation if we want our app to look and feel like an Ubuntu application.
The Packaging Icon, and the Package Screenshot.
Package Screenshot
The package screenshot is downloaded by software centre from screenshots.ubuntu.com. Debian has a similar screnshots server. Debshots works by allowing users to upload screenshots. The screenshots are only allowed for packages within the repositories configured within debshots. Our choices are to either get our PPA added to the list of acceptable PPA’s or we can host our own server.
In order to make this work we’ll need to modify the software centre to make it look at a new server. To accomplish this I packaged a replacement software centre, which replaces the ubuntu software centre.
Packaging Icon
When software centre loads a package it checks in /usr/share/app-install/icons for an icon – any file matchng the package name. Typically these icons are added by Ubuntu. The whobuntu.applicationicons package adds a series of whobuntu icons to the folder, and as it’s a package we can pass updates before we publish any new packages to the PPA.
Preparation
sudo apt-get install build-essential devscripts ubuntu-dev-tools debhelper dh_make diff patch cdbs
For upload to launchpad you’ll need a gpg key.
Process
- Download the Nightmares by design album from http://www.severedfifth.com
- wget http://audio.lugradio.org/severedfifth/nightmaresbydesign/severedfifth-nightmaresbydesign-2010-ogg.zip
- Re-package just the content in a tar.gz file – called severed severedfifth_nightmaresbydesign-2010.orig.tar.gz
- unzip severedfifth-nightmaresbydesign-2010-ogg.zip
- tar -cvf severedfifth-nightmaresbydesign-2010.orig.tar.gz severedfifth-nightmaresbydesign-2010-ogg.zip
- make a folder names the same as the tar file (minus the .orig.gz part) severedfifth_nightmaresbydesign-2010
- from the severedfifth_nightmaresbydesign-2010 folder, issue the dh_make command.
- Edit the Control file.
- Set the section – I chose sound
- set the priority – for this build chose optional
- Update the packager name (if required) and website addresses.
- Add any description elements – in my example I took the blurb from the website.
- Add a package for each track to be packaged.
- Edit the Copyright file
- Update the packager name (if required) and website addresses.
- Update the upstream author(s) and email addresses
- Update the upstream licence information
- Update your licence
- Update Changelog
- Update the packager name (if required).
- Change unstable to an ubuntu release ‘animal’ – for example maverick
- Update the change log line – typically for new packages I leave it as * Initial release.
- Update README.source – or delete it if nothing is applicable
- Update README.debian – or delete it if nothing is applicable
- Delete *.ex files from the folder
Building the source package :
issue the command
debuild -S
to build a deb issue the command
sudo pbuilder --build severedfifth.nightmaresbydesign_2010-1.dsc
the resulting deb file wll be in /var/cache/pbuilder/result
Uploading to Launchpad
Uploading large files can cause problems with lauchpad – there is a work around noted here.