--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pbuilder/README Thu Jun 27 09:36:09 2013 +0200
@@ -0,0 +1,12 @@
+$ git clone git://git.debian.org/git/pbuilder/pbuilder.git
+$ cd pbuilder
+# patch is against debian/0.213
+$ git checkout <revision-you-want-to-build-against>
+# patching debian/changelog should fail when not building against revision
+# debian/0.213; this is ok, but don't remove debian/changelog.rej; you will
+# need it when you want to copy the changelog entry from it
+$ patch -p1 <<path-to>/propagate-path-to-dpkg-buildpackage.diff
+# unless building against revision debian/0.213 add the changelog entry from
+# debian/changelog.rej
+$ dch
+$ $FAVOURITE-PACKAGE-BUILDER
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pbuilder/propagate-path-to-dpkg-buildpackage.diff Thu Jun 27 09:36:09 2013 +0200
@@ -0,0 +1,29 @@
+diff --git a/debian/changelog b/debian/changelog
+index 5d6b9d9..dff933d 100644
+--- a/debian/changelog
++++ b/debian/changelog
+@@ -1,3 +1,11 @@
++pbuilder (0.213+nmu1) oldstable stable; urgency=low
++
++ * Non-maintainer upload.
++ * propagate $PATH to dpgk-buildpackage when using pdebuild-internal to make
++ it possible to use ccache at all in that case
++
++ -- Matthias Förste <foerste@schlittermann.de> Wed, 26 Jun 2013 16:01:49 +0200
++
+ pbuilder (0.213) unstable; urgency=low
+
+ [ Beatrice Torracca ]
+diff --git a/pdebuild-internal b/pdebuild-internal
+index 0c4fb99..7056464 100644
+--- a/pdebuild-internal
++++ b/pdebuild-internal
+@@ -121,7 +121,7 @@ executehooks "A"
+ # do build with that user.
+ # $DEBBUILDOPTS is evaluated inside the su and chroot.
+ export DEBBUILDOPTS
+-CMD="/usr/bin/dpkg-buildpackage -rfakeroot -us -uc "'${DEBBUILDOPTS}'
++CMD="env PATH=$PATH /usr/bin/dpkg-buildpackage -rfakeroot -us -uc "'${DEBBUILDOPTS}'
+ echo "I: Running $CMD"
+ # This command should be ran with current directory as bind-mounted
+ # package source directory