[pbuilder] 01/01: pdebuild: Use dpkg-source to build dsc; generate changes if .. is not BUILDRESULT
James Clarke
jrtc27 at moszumanska.debian.org
Sun Jan 15 11:39:01 UTC 2017
This is an automated email from the git hooks/post-receive script.
jrtc27 pushed a commit to branch wip/source-only-changes
in repository pbuilder.
commit bb5934524d2b3f8116798f73f82b9650c2ba4bd4
Author: James Clarke <jrtc27 at jrtc27.com>
Date: Tue Jan 10 17:03:04 2017 +0000
pdebuild: Use dpkg-source to build dsc; generate changes if .. is not BUILDRESULT
---
pdebuild | 15 +++++++++++----
pdebuild.1 | 43 ++++++++++++++++++++-----------------------
2 files changed, 31 insertions(+), 27 deletions(-)
diff --git a/pdebuild b/pdebuild
index 41e7819..8de3ed7 100644
--- a/pdebuild
+++ b/pdebuild
@@ -38,6 +38,7 @@ PKG_VERSION=$(dpkg-parsechangelog|sed -n 's/^Version: \(.*:\|\)//p')
ARCHITECTURE="${ARCHITECTURE:-$(dpkg-architecture -qDEB_HOST_ARCH)}"
CHANGES="${PKG_SOURCENAME}_${PKG_VERSION}_${ARCHITECTURE}.changes"
SOURCE_CHANGES="${PKG_SOURCENAME}_${PKG_VERSION}_source.changes"
+DSC="${PKG_SOURCENAME}_${PKG_VERSION}.dsc"
if [ -z "${PBUILDER_BUILD_LOGFILE}" ]; then
PBUILDER_BUILD_LOGFILE="../${PKG_SOURCENAME}_${PKG_VERSION}_${ARCHITECTURE}.build"
@@ -80,10 +81,16 @@ else
if ! dpkg-checkbuilddeps -B ; then
log.w "Unmet build-dependency in source"
fi
- echo "dpkg-buildpackage -S -d -us -uc -r${BUILDSOURCEROOTCMD} $DEBBUILDOPTS" | \
- perl -pe 's/(^|\s|=|'\'')-[AbBFgG]('\''|\s|$)/$1$2/g' | \
- perl -pe 's/(^|\s|=)['\'']['\''](\s|$)/$1$2/g' | \
- /bin/bash
+ dpkg-source --before-build .
+ "${BUILDSOURCEROOTCMD}" debian/rules clean
+ dpkg-source -b .
+ if ! [ "../${DSC}" -ef "${BUILDRESULT}/${DSC}" ]; then
+ log.i "Generating source changes file for original dsc"
+ dpkg-genchanges -S > "../${SOURCE_CHANGES}"
+ else
+ log.i "Generated dsc will be overwritten by build result; not generating changes file"
+ fi
+ dpkg-source --after-build .
${PBUILDERROOTCMD} \
${PDEBUILD_PBUILDER} \
--build \
diff --git a/pdebuild.1 b/pdebuild.1
index 5ce6cbb..a437349 100644
--- a/pdebuild.1
+++ b/pdebuild.1
@@ -27,7 +27,8 @@ appear later take precedence.
.TP
.BI "\-\-buildsourceroot [" "fakeroot" "]"
The command used to gain root privilege for
-invoking dpkg-buildpackage
+invoking
+.B "debian/rules clean"
.TP
.BI "\-\-pbuilderroot [" "sudo -E" "]"
@@ -78,6 +79,8 @@ The configuration file is used, and passed on to
.TP
.BI "\-\-debbuildopts [" "options to pass to dpkg-buildpackage" "]"
+.B "Deprecated; please pass this as a pbuilder option instead"
+
The space-delimited list of options are passed to dpkg-buildpackage.
This option appends to pbuilder option
.B "\-\-debbuildopts"
@@ -86,8 +89,10 @@ string.
Multiple options are delimited with spaces.
-Note that for pdebuild, debbuildopts needs to be specified as a pdebuild
-option in the command-line, not as a pbuilder option.
+Note that for pdebuild,
+.B "dpkg-source"
+is used to build the source package which is given to pbuilder. This option has
+no effect on the arguments used to build this source package.
.TP
.BI "\-\-use\-pdebuild\-internal"
@@ -130,9 +135,7 @@ See pbuilder(8) for a full list of options.
There is an exception that
.B "\-\-buildresult"
-and
-.B "\-\-debbuildopts"
-need to be specified as pdebuild options before the
+needs to be specified as a pdebuild option before the
.B "\-\-"
in order to be effective.
@@ -163,23 +166,17 @@ $ pwd
$ ls debian/rules
debian/rules
$ pdebuild
-W: /home/dancer/.pbuilderrc does not exist
-dpkg-buildpackage: source package is cowdancer
-dpkg-buildpackage: source version is 0.26
-dpkg-buildpackage: source changed by Junichi Uekawa <dancer at debian.org>
-dpkg-buildpackage: source version without epoch 0.26
- fakeroot debian/rules clean
-dh_testdir
-dh_testroot
-rm \-f build-stamp configure-stamp
-/usr/bin/make clean
-make[1]: Entering directory `/home/dancer/DEBIAN/cowdancer/cowdancer'
-rm \-f *~ *.o *.lo libcowdancer.so cow-shell cowbuilder
-make[1]: Leaving directory `/home/dancer/DEBIAN/cowdancer/cowdancer'
-dh_clean
- dpkg-source \-b cowdancer
-dpkg-source: warning: source directory `./cowdancer' is not <sourcepackage>-<upstreamversion> `cowdancer-0.26'
-dpkg-source: building cowdancer in cowdancer_0.26.tar.gz
+dh clean
+ dh_testdir
+ dh_auto_clean
+ dh_autoreconf_clean
+ dh_clean
+ .
+ .
+ .
+dpkg-source: info: using source format '3.0 (native)'
+dpkg-source: info: building cowdancer in cowdancer_0.84.tar.xz
+dpkg-source: info: building cowdancer in cowdancer_0.84.dsc
.
.
.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pbuilder/pbuilder.git
More information about the Pbuilder-maint
mailing list