Backport rsnapshot 1.3.1 to Lenny
I recently needed a version of rsnapshot that included LVM snapshot support. Unfortunately the version included with Debian Lenny doesn't include this, so I had to create a quick backport.
This is a very quick record of what I did.
Install useful build scripts:
aptitude install devscripts
Create somewhere to store our downloads and built files:
mkdir build-dir cd build-dir
Fetch the sources for rsnapshot 1.3.1 and one of it's dependencies that also isn't in Lenny.
dget http://ftp.debian.org/debian/pool/main/libl/liblchown-perl/liblchown-perl_1.01-1.dsc dget http://ftp.debian.org/debian/pool/main/r/rsnapshot/rsnapshot_1.3.1-1.dsc
We need to build the liblchown-perl package first:
cd liblchown-perl-1.01/ debuild -b -us -uc
At this point you may find you're missing build dependencies, if so install them and repeat the above debuild command.
Once built, we need to install it. If you're not building on amd64, the filename of your .deb will be different to mine.
cd .. dpkg -i liblchown-perl_1.01-1_amd64.deb
Now to build rsnapshot itself. We have to adjust the quilt dependency first though (adjusting it down just a little doesn't seem to harm the build at all).
cd rsnapshot-1.3.1/ sed -e's/quilt (>= 0.46-7~)/quilt (>= 0.46-6~)/' -i debian/control debuild -b -us -uc
Again you may need to install extra dependencies and repeat the above debuild command.
Finally, we can install rsnapshot 1.3.1:
cd .. dpkg -i rsnapshot_1.3.1-1_all.deb