ReleaseEngineering/PuppetAgain/HowTo/Build DEBs: Difference between revisions

Line 85: Line 85:
Sometimes you may need to build a package which requires a fresher dependency (library). In this case you need to build the library first and use a temporary local repo. Packaging nodejs is a good example.
Sometimes you may need to build a package which requires a fresher dependency (library). In this case you need to build the library first and use a temporary local repo. Packaging nodejs is a good example.


todo:
Pbuilder can use hooks to run some actions.
* Add the following entries to your ~/.pbuilderrc
HOOKDIR="$HOME/.pbuilder-hooks"
OTHERMIRROR="deb file://$HOME/debs/packages ./"
BINDMOUNTS="$HOME/debs/packages"
EXTRAPACKAGES="apt-utils"


* adjust pbuilder to update the local repo
* Add a hook to generate package indexes
* adjust pbuilder images
mkdir ~/.pbuilder-hooks
* .pbuilder-hooks/D05deps contents:
#!/bin/sh
(cd /home/rail/debs/packages && apt-ftparchive packages . > Packages)
apt-get update
* chmod 755 .pbuilder-hooks/D05deps
 
* edit existing images
sudo pbuilder --login --basetgz /var/cache/pbuilder/base-precise-amd64.tgz --save-after-login
# inside the subshell
apt-get install apt-utils
echo "deb file:///home/rail/debs/packages ./" >> /etc/apt/sources.list
echo 'APT::Get::AllowUnauthenticated "true";' > /etc/apt/apt.conf.d/90mozilla
* repeat for the i386 image
 
* build the library
* copy the resulting debs into $HOME/debs/packages
* build the application


= Testing =
= Testing =
Confirmed users
3,104

edits