Bug#856580: unblock: pbuilder/0.228.5

James Clarke jrtc27 at debian.org
Thu Mar 2 16:54:39 UTC 2017


Package: release.debian.org
Severity: normal
User: release.debian.org at packages.debian.org
Usertags: unblock
X-Debbugs-Cc: pbuilder-maint at lists.alioth.debian.org

Please unblock package pbuilder

This release fixes #856475 so that pbuilder can be used to perform
binNMUs again. It also replaces two globs with $BUILDSUBDIR, which was
missed when the original change was made, and updates the test suite.
Debdiff is attached.

unblock pbuilder/0.228.5

Thanks,
James
-------------- next part --------------
diff -Nru pbuilder-0.228.4/debian/changelog pbuilder-0.228.5/debian/changelog
--- pbuilder-0.228.4/debian/changelog	2017-02-06 19:16:31.000000000 +0000
+++ pbuilder-0.228.5/debian/changelog	2017-03-02 16:16:19.000000000 +0000
@@ -1,3 +1,15 @@
+pbuilder (0.228.5) unstable; urgency=medium
+
+  [ Thorsten Glaser ]
+  * pbuilder-buildpackage: Look for the correct changes file when performing a
+    binNMU.  Closes: #856475
+
+  [ James Clarke ]
+  * pbuilder-buildpackage-funcs: Only look in BUILDSUBDIR when performing a
+    binNMU and when looking for additional build results.
+
+ -- James Clarke <jrtc27 at debian.org>  Thu, 02 Mar 2017 16:16:19 +0000
+
 pbuilder (0.228.4) unstable; urgency=medium
 
   [ James Clarke ]
diff -Nru pbuilder-0.228.4/pbuilder-buildpackage pbuilder-0.228.5/pbuilder-buildpackage
--- pbuilder-0.228.4/pbuilder-buildpackage	2017-02-06 08:09:28.000000000 +0000
+++ pbuilder-0.228.5/pbuilder-buildpackage	2017-03-02 16:14:53.000000000 +0000
@@ -155,14 +155,15 @@
 save_aptcache
 trap umountproc_cleanbuildplace_trap exit sighup sigpipe
 
+# This potentially gets modified by binNMU so must come first
+CHANGES_BASENAME=$(dsc_get_basename "$PACKAGENAME" "yes")
+
 binNMU
 
 log.i "Building the package"
 
 executehooks "A"
 
-CHANGES_BASENAME=$(dsc_get_basename "$PACKAGENAME" "yes")
-
 ENV_PREFIX="env PATH=\"$PATH\" HOME=\"$BUILD_HOME\""
 DPKG_COMMANDLINE="$ENV_PREFIX dpkg-buildpackage -us -uc $DEBBUILDOPTS"
 
diff -Nru pbuilder-0.228.4/pbuilder-buildpackage-funcs pbuilder-0.228.5/pbuilder-buildpackage-funcs
--- pbuilder-0.228.4/pbuilder-buildpackage-funcs	2017-01-15 16:12:04.000000000 +0000
+++ pbuilder-0.228.5/pbuilder-buildpackage-funcs	2017-03-02 16:14:53.000000000 +0000
@@ -220,7 +220,7 @@
     local arch=$($CHROOTEXEC dpkg-architecture -qDEB_HOST_ARCH)
     local date=$(date -R ${BINNMU_TIMESTAMP:+-d "${BINNMU_TIMESTAMP}"})
     log.i "Doing a binNMU, version $BINNMU_VERSION for $DISTRIBUTION/$arch to '$BINNMU_MESSAGE'"
-    local cl=$(ls "$BUILDPLACE"/"$BUILDDIR"/*/debian/changelog)
+    local cl=$(ls "$BUILDPLACE/$BUILDDIR/$BUILDSUBDIR"/debian/changelog)
     local tmpcl=$(mktemp pbuilder.tmpchangelog.XXXXXXXXXXX)
     if [ ! -f "$cl" ]; then
         log.e "Cannot open debian/changelog for binNMU version handling."
@@ -237,6 +237,7 @@
         log.w "No distribution provided, using the field from the last upload"
         DISTRIBUTION=$(dpkg-parsechangelog -l "$tmpcl" -c 1 --show-field Distribution)
     fi
+    CHANGES_BASENAME="$CHANGES_BASENAME+b$BINNMU_VERSION"
     DEBBUILDOPTS="${DEBBUILDOPTS} -e\"$BINNMU_MAINTAINER\" -m\"$BINNMU_MAINTAINER\""
     cat > "$cl" << EOF
 $package ($version+b$BINNMU_VERSION) $DISTRIBUTION; urgency=low, binary-only=yes
@@ -283,7 +284,7 @@
 
 function _find_additional_buildresults() {
     local file f
-    local root="${BUILDPLACE}${BUILDDIR}/*"
+    local root="${BUILDPLACE}${BUILDDIR}/${BUILDSUBDIR}"
     for file in "${ADDITIONAL_BUILDRESULTS[@]}"; do
         log.d "checking [$file]..."
         echo "$root/$file" | perl -ne 'print "$_\n" foreach glob($_)' | \
diff -Nru pbuilder-0.228.4/t/test_pbuilder-buildpackage-funcs pbuilder-0.228.5/t/test_pbuilder-buildpackage-funcs
--- pbuilder-0.228.4/t/test_pbuilder-buildpackage-funcs	2017-01-14 14:35:30.000000000 +0000
+++ pbuilder-0.228.5/t/test_pbuilder-buildpackage-funcs	2017-03-02 16:14:53.000000000 +0000
@@ -79,11 +79,14 @@
 }
 
 setup_extraresults () {
-    mkdir -p "$TEMP_DIR/fake-pkg/debian"
+    mkdir -p "$TEMP_DIR/$BUILDSUBDIR/debian"
+    mkdir -p "$TEMP_DIR/should-ignore"
     touch "$TEMP_DIR/file_with_*_asterisk"
     touch "$TEMP_DIR/file with spaces.changes"
     #touch "$TEMP_DIR/file with * asterisk and spaces"
     touch "$TEMP_DIR/file_with_a_normal_name.changes"
+    touch "$TEMP_DIR/$BUILDSUBDIR/foo.txt"
+    touch "$TEMP_DIR/should-ignore/foo.txt"
 }
 
 test_extraresults1 () {
@@ -100,6 +103,13 @@
     _find_additional_buildresults
 }
 
+test_extraresults3() {
+    ADDITIONAL_BUILDRESULTS=(
+        "foo.txt"
+    )
+    _find_additional_buildresults
+}
+
 
 trap cleanup sigpipe sighup exit
 
@@ -108,6 +118,7 @@
 DEBIAN_CONTROL="$(mktemp -p "$TEMP_DIR")"
 BUILDPLACE="$TEMP_DIR"
 BUILDDIR=''
+BUILDSUBDIR=fake-pkg
 
 expect_output "$DEBIAN_CONTROL $TEMP_DIR/haskell-concrete-typerep_0.1.0.2.orig.tar.gz $TEMP_DIR/haskell-concrete-typerep_0.1.0.2-2.debian.tar.gz" test_getdscfilesNormal
 expect_output "$DEBIAN_CONTROL $TEMP_DIR/golang-xmpp-dev_0.0~git20140304.orig.tar.gz $TEMP_DIR/golang-xmpp-dev_0.0~git20140304-1.debian.tar.xz" test_getdscfilesWithoutNL
@@ -121,10 +132,11 @@
 expect_output "cowdancer_0.82" test_dsc_get_basename_native_without_revision
 
 setup_extraresults
-expect_output "$TEMP_DIR/fake-pkg/../file with spaces.changes
-$TEMP_DIR/fake-pkg/../file_with_a_normal_name.changes" test_extraresults1
-expect_output "$TEMP_DIR/fake-pkg/../file with spaces.changes
-$TEMP_DIR/fake-pkg/../file with spaces.changes
-$TEMP_DIR/fake-pkg/../file_with_*_asterisk" test_extraresults2
+expect_output "$TEMP_DIR/$BUILDSUBDIR/../file with spaces.changes
+$TEMP_DIR/$BUILDSUBDIR/../file_with_a_normal_name.changes" test_extraresults1
+expect_output "$TEMP_DIR/$BUILDSUBDIR/../file with spaces.changes
+$TEMP_DIR/$BUILDSUBDIR/../file with spaces.changes
+$TEMP_DIR/$BUILDSUBDIR/../file_with_*_asterisk" test_extraresults2
+expect_output "$TEMP_DIR/$BUILDSUBDIR/foo.txt" test_extraresults3
 
 testlib_summary


More information about the Pbuilder-maint mailing list