Sep '10 29

Backporting Ubuntu packages

I needed to backport squid to an older version of Ubuntu (Hardy), he’ere the proceedure with pbuilder.

  • sudo apt-get install pbuilder debootstrap devscripts fakeroot po4a
  • sudo apt-get install  build-essential libldap2-dev libdb-dev sharutils dpatch cdbs libsasl2-dev debhelper libcppunit-dev libkrb5-dev comerr-dev
  • (may need to backport debhelper too)
  • sudo pbuilder create –debootstrapopts –variant=buildd
  • dget -x <link_address_to_foo.dsc>
  • cd <package>
  • sudo pdebuild
  • (May need to apt-get some dependancies if it fails, possibly debhelper from backports, or build it too)
  • ls /var/cache/pbuilder/result

Example ~/.pbuilderrc file:
HOOKDIR=”/var/cache/pbuilder/hook.d”
BINDMOUNTS=”/var/cache/pbuilder/result”
COMPONENTS=”main restricted universe multiverse”
OTHERMIRROR=”deb file:/var/cache/pbuilder/result/ /”

  • sudo pbuilder update –override-config
  • (May need to script hooks to update repo)