Debian way to make tiny change to package

Posted by StephenBenoit on Wed 24 Oct 2007 at 10:30

Have you ever had to make a one-line correction (or customization) in a big package? If so how did you manage it? The obvious way is to rebuild a package and serve it locally, but is there some other approach?

After spending an hour investigating bad behavior from the amoverview perl script in the amanda-server package (2.5.1p1-2.1), I traced the problem to one line in the script. It was an easy fix if you don't mind tweaking code directly in /usr/sbin/.

For those who are interested: the diff is:

--- /usr/sbin/amoverview-       2006-11-28 20:17:23.000000000 -0500
+++ /usr/sbin/amoverview        2007-10-22 11:16:39.000000000 -0400
@@ -126,7 +126,7 @@
     next if /found Amanda directory/;
     next if /skipping cruft directory/;
     next if /skip-incr/;
-    ($date, $host, $disk, $level, $tape, $file, $part, $status) = quotewords(" ", 0, $_);
+    ($date, $host, $disk, $level, $tape, $file, $part, $status) = quotewords('\s+', 0, $_);
     next if $date eq 'date';
     next if $date eq 'Warning:';
     next if $date eq 'Scanning';

But now the fun part. How should we take this change and distribute it over the other hosts on my network? I usually rebuild a package and assign it a newer version or patchlevel. But amanda-server is a hefty package and I hesitate at installing all the packages required for rebuilding it just for the one line change.

Any thoughts on "The Debian Way" (TM) for small repairs or customizations (i.e. outside of /etc/)?

Best regards,
Stephen Benoit.


This article can be found online at the Debian Administration website at the following bookmarkable URL:

This article is copyright 2007 StephenBenoit - please ask for permission to republish or translate.