]> gitweb.fluxo.info Git - rhatto/dotfiles/debian.git/commitdiff
Pbuilder: support for local repository
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 6 Nov 2014 17:22:16 +0000 (15:22 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 6 Nov 2014 17:22:16 +0000 (15:22 -0200)
config.dot/pbuilder/hooks/D90update.link [moved from config.dot/pbuilder/hooks/D90update with 58% similarity]
pbuilderrc.dot.link

similarity index 58%
rename from config.dot/pbuilder/hooks/D90update
rename to config.dot/pbuilder/hooks/D90update.link
index 1f0a31d67275c9a11fee6f1d10041946f8fb6197..0c5ac424a15598d4496ee68479ed13bf88b0aeb3 100755 (executable)
@@ -1,3 +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
index 4fb9ddf133eef4943c2949271e646e07cf6682ca..ce23a70e0b674dda859e42f83fb465c9b45667ef 100644 (file)
@@ -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