vanutsteen.nl => nerds only A blog on rails, php, computing, my bass guitar and stuff

backporting packages for a different ARCH on Ubuntu

on in Linux

I wanted to backport mod_security from Ubuntu 14.04 (Trusty) to 12.04 (Precise). And not only that, I also wanted to compile it for different ARCH’s. i386 in this example.

So I had to find out how to do that. It turned out that Ubuntu provides a nice program for this: backportpackage.

After some testing and trying I came up with a workflow that worked. At first I had some troubles because I used sudo in some places I shouldn’t and I didn’t use it in some place I should.

1
2
3
4
5
6
# install dependencies
sudo apt-get install dput ubuntu-dev-tools pbuilder
# create a pbuilder image
sudo DIST=precise ARCH=i386 pbuilder create
# build the package and upload it
ARCH=i386 backportpackage -b -B pbuilder -s trusty -d precise modsecurity-apache -u ppa:leonbo/servers -S ~ppa2

It’s possible that the above workflow only works with my .pbuilderrc. You can download it from my dotfiles repository. Install the .pbuilderrc in your $HOME.

I still have to find out some stuff. How to use backported dependencies for example. But that’s for another time :)

Comments