Archive for January, 2008

dpatch - just superb! (a short How to)

Friday, January 25th, 2008

As I had mentioned in this post about the top gear packaging activity that is going on for a few Science tools (more specifically Electronics), one review point that the packager comes across instantly is that “Do not change upstream code”. This is a Golden rule for packagers. Making these changes as patches in debian/ (for debian based distros ofcourse ;-) ) is highly recommended. One such tool for achieving this is DPATCH. kart linked me to this nice page which has a few details on dpatch. Still the page did not have a step by step how to, instead has tidbits. So here goes my how-to or just a documentation of what I learnt.

1. Install dpatch. sudo apt-get install dpatch

2. Go to “your_packages_top_directory”/debian and create a directory “patches”. (mkdir patches)

3. Inside this debian/patches directory create a file “00list”. The reason for this file is explained in the coming points.

4. Open up debian/rules in your favourite editor (I expect it to be emacs ofcourse ;-) ) and do the changes mentioned below.

* Add this line “include /usr/share/dpatch/dpatch.make” without the quotes at the top.

* Append to the config.status section “patch-stamp” before “configure”. This shall let the package know that there is a patch stamp that needs to be checked.

* In the “clean” section add “unpatch”. This ensures the patch is reverted when a make clean is performed.

5. Now save the debian/rules and execute the following command. “dpatch-edit-patch {patchname}”. Say for example the patch name is fixing_foo then the command is “dpatch-edit-patch fixing_foo”

6. This opens up a temporary shell where a copy of the source package is ready. Make the changes that you would want to do and exit the shell. Patch is created. Wow! (Check debian/patches directory)

7. Update this patch name in the 00list file that we created in point 3. This file will have the list of patches that needs to be applied in the specified order. Repeat this process until all the necessary changes to upstream is done and patches are ready.

Now give the package for a build. Sit back, relax and enjoy the pbuilder experience!

The year until now and ahead!

Saturday, January 19th, 2008

Happy New Year folks!! I know its a bit late. But looking back its been hard work and travel for the past 20 days this year already. Side effect: I am down with flu. Hope to get back strong in a couple of days.

So guys, wondering what kept me busy these 20 days? Been working for Hardy Heron. Gutsy wasn’t a great Release as far as the Science and related packages were considered and I don’t want a similar situation in Hardy. Been syncing a few new Upstream releases from Debian unstable, getting new and interesting packages (related to Science more specifically Electronics) into Hardy Heron.

One thing that has taken away most of my time and is not yet done is packaging Alliance VHDl CAD toolset for Debian/Ubuntu. Julien and Kumar (kmap) has been a great help to me here. Still MAGIC needs to be packaged and things need to be cleaned up at least 2 weeks before FF. (Schedule of Hardy).

Added the links to pages created by William Grant (Fujitsu) onto the MOTU Science Team wiki for others to check and if some interesting package has been left out, rise a Sync request. More work looming large.

This year is also gonna be a year full of travel with a lot of conferences planned. Already been traveling quite some amount (will blog it separately) this year. All in all I see 2008 a life changer for me. Wait for more news!! :D