From 988fee6db67abce1b0220abd40a7a78f6f3ae5de Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 6 Nov 2014 15:22:16 -0200 Subject: Pbuilder: support for local repository --- config.dot/pbuilder/hooks/D90update | 3 --- config.dot/pbuilder/hooks/D90update.link | 12 ++++++++++++ pbuilderrc.dot.link | 18 +++++++++++++----- 3 files changed, 25 insertions(+), 8 deletions(-) delete mode 100755 config.dot/pbuilder/hooks/D90update create mode 100755 config.dot/pbuilder/hooks/D90update.link diff --git a/config.dot/pbuilder/hooks/D90update b/config.dot/pbuilder/hooks/D90update deleted file mode 100755 index 1f0a31d..0000000 --- a/config.dot/pbuilder/hooks/D90update +++ /dev/null @@ -1,3 +0,0 @@ -# See https://wiki.debian.org/BuildingFormalBackports -# https://wiki.debian.org/PbuilderTricks#How_to_include_local_packages_in_the_build -/usr/bin/apt-get update diff --git a/config.dot/pbuilder/hooks/D90update.link b/config.dot/pbuilder/hooks/D90update.link new file mode 100755 index 0000000..0c5ac42 --- /dev/null +++ b/config.dot/pbuilder/hooks/D90update.link @@ -0,0 +1,12 @@ +#!/bin/bash +# +# See https://wiki.debian.org/BuildingFormalBackports +# https://wiki.debian.org/PbuilderTricks#How_to_include_local_packages_in_the_build + +set -e + +if [ ! -z "$LOCALDEBS" ]; then + ( cd $LOCALDEBS; apt-ftparchive packages . > Packages ) +fi + +/usr/bin/apt-get update diff --git a/pbuilderrc.dot.link b/pbuilderrc.dot.link index 4fb9ddf..ce23a70 100644 --- a/pbuilderrc.dot.link +++ b/pbuilderrc.dot.link @@ -1,19 +1,24 @@ # See /usr/share/pbuilder/pbuilderrc for defaults -# Source custom configuration -if [ -e "$HOME/.custom/pbuilderrc" ]; then - source $HOME/.custom/pbuilderrc -fi - # Basic configuration ARCH=${ARCH:=amd64} DIST=${DIST:=sid} COMPONENTS=${COMPONENTS:=main contrib non-free} HOOKDIR=${HOOKDIR:=$HOME/.config/pbuilder/hooks/} +# Source custom configuration +if [ -e "$HOME/.custom/pbuilderrc" ]; then + source $HOME/.custom/pbuilderrc +fi + # Map distribution option to our env variable DISTRIBUTION="$DIST" +# Bindmounts +if [ ! -z "$BINDMOUNTS" ]; then + mkdir -p $BINDMOUNTS +fi + # Backports # https://wiki.ubuntu.com/PbuilderHowto#Using_backport_repositories_in_pbuilder # https://wiki.debian.org/BuildingFormalBackports#Building_multi-dependencies_packages @@ -25,6 +30,9 @@ fi # https://wiki.debian.org/AutomateBackports # https://wiki.debian.org/PbuilderTricks#How_to_include_local_packages_in_the_build if [ ! -z "$LOCALDEBS" ]; then + # Ensure it exists + mkdir -p $LOCALDEBS + if [ ! -z "$OTHERMIRROR" ]; then OTHERMIRROR="$OTHERMIRROR | deb file://${LOCALDEBS} ./" else -- cgit v1.2.3