Here's what I do:
1. Install pbuilder and some other handy packages
Open up a terminal and type:
sudo aptitude install pbuilder debhelper devscripts build-essential2. Tell the pbuilder environment that it is going to act just like the Launchpad build farm
Still in our terminal:
sudo pbuilder create --debootstrapopts --variant=builddThis one takes a while because it's basically installing an entire system inside your existing installation, so grab a cup of coffee and watch the messages fly by.
3. Give it access to all official Ubuntu repositories
By default, your shiny new pbuilder environment won't have access to a lot of packages, so we'll want to add mirrors for common Ubuntu packages, as well as our own PPA to the pbuilder configuration file. So, still in a terminal, type:
nano ~/.pbuilderrcand paste in:
OTHERMIRROR="deb http://archive.ubuntu.com/ubuntu [YOUR UBUNTU VERSION] main restricted universe multiverse | deb http://archive.ubuntu.com/ubuntu [YOUR UBUNTU VERSION]-backports main restricted universe multiverse | deb http://archive.ubuntu.com/ubuntu [YOUR UBUNTU VERSION]-security main restricted universe multiverse | deb http://archive.ubuntu.com/ubuntu [YOUR UBUNTU VERSION]-updates main restricted universe multiverse"
and we'll also pipe on a section for our PPA, so we can use our own packages as dependencies, which in my case looks like this:
| deb http://ppa.launchpad.net/hunter-kaller/ppa/ubuntu maverick main
4. Make our pbuilder trust packages from our PPA
First, we'll login to our pbuilder environment:
sudo pbuilder --login --save-after-login
Then, we'll give it the public key to our PPA, just like if we were adding it to our own keyring:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys [YOUR PUBLIC KEY HERE]
If all goes well, you can leave your pbuilder environment by typing:
exit
5. Update our environment with these new packages
Still in our terminal, type:
sudo pbuilder --update --override-config
This should get you in pretty good shape. Let me know if you run into any issues.
Thank you so much! I am new to packaging and was banging my head on adding ppa.
ReplyDelete@Unknown
ReplyDeleteGlad it helped :D