Skip to content

Instantly share code, notes, and snippets.

@jelu
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jelu/1b4f8f65d57dfd448302 to your computer and use it in GitHub Desktop.
Save jelu/1b4f8f65d57dfd448302 to your computer and use it in GitHub Desktop.
pbuilder local packages
cd ~/pbuilder
mkdir -p local/jessie local/sid local/wheezy hooks
cat >hooks/D05local <<EOF
#!/bin/sh -e
if [ -f "/home/$USER/pbuilder/local/\$DIST/Packages" ]; then
  echo "deb [trusted=yes] file:///home/$USER/pbuilder/local/\$DIST ./" | tee /etc/apt/sources.list.d/local.list
  apt-get update -o Dir::Etc::sourcelist="sources.list.d/local.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
fi
EOF
chmod +x hooks/D05local
cat >~/.pbuilderrc <<EOF
HOOKDIR="/home/$USER/pbuilder/hooks"
BINDMOUNTS="/home/$USER/pbuilder/local"
EOF
cp package.deb ~/pbuilder/local/DIST/
cd ~/pbuilder/local/DIST
apt-ftparchive packages . >Packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment