Fixing BackupPC’s “Download Zip archive” restore option in Ubuntu Lucid

We recently upgraded our BackupPC servers to Ubuntu 10.04 Lucid Lynx. It’s working almost perfectly. However, the “Download ZIP archive” restore option no longer works. This is due to a bug in recent version of the Archive::Zip Perl module which generates corrupt ZIP archives.

Note to developers: when releasing new versions of your library, try to avoid breaking its core functionality.

If you try decompressing a corrupted file, you’ll see a message like this:

tyler@laptop:~$ unzip restore.zip
Archive:  restore.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of restore.zip or
        restore.zip.zip, and cannot find restore.zip.ZIP, period.

I posted a solution on the mailing list. I’ve since uploaded an older version (1.18-1) of this package to my repository, so the process is even more streamlined.

If you are using my repo:
apt-get install libarchive-zip-perl=1.18-1
echo "libarchive-zip-perl hold" | dpkg --set-selections

If you aren’t using my repo but want a quick fix:
wget http://www.tolaris.com/apt/pool/main/liba/libarchive-zip-perl/libarchive-zip-perl_1.18-1_all.deb
dpkg -i libarchive-zip-perl_1.18-1_all.deb
echo "libarchive-zip-perl hold" | dpkg --set-selections

Tags: , ,