Package: pbuilder
Version: 0.220
Severity: normal
Tags: patch

Hi,

when running 'gbp buildpackage -S' no *${architecture}.changes file is created,
instead *source.changes is created.
pdebuild can't find file to sign, thus throwing an error:
"debsign: Can't find or can't read changes file "

Attached patch is crude but is solving this problem.


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing'), (100, 'unstable'), (10, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.2.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages pbuilder depends on:
ii  debconf [debconf-2.0]  1.5.57
ii  debootstrap            1.0.74
ii  dpkg-dev               1.18.3
ii  wget                   1.16.3-3

Versions of packages pbuilder recommends:
ii  devscripts  2.15.9
ii  fakeroot    1.20.2-1
ii  iproute2    4.1.1-1
ii  net-tools   1.60+git20150829.73cef8a-1
ii  sudo        1.8.12-1

Versions of packages pbuilder suggests:
ii  cowdancer     0.75

-- debconf information excluded
>From 50281d23fd06f57aafe30d15c638a94da52c4c80 Mon Sep 17 00:00:00 2001
From: Marcin Kulisz <mar...@bashton.com>
Date: Thu, 12 Nov 2015 18:18:22 +0000
Subject: [PATCH] Making pdebuild to sign *source.changes file if +

build is for source only upload
---
 pdebuild | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pdebuild b/pdebuild
index 8a28aba..db6709a 100644
--- a/pdebuild
+++ b/pdebuild
@@ -33,6 +33,7 @@ PKG_SOURCENAME=$(dpkg-parsechangelog|sed -n 's/^Source: //p')
 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"
 
 if [ -z "${PBUILDER_BUILD_LOGFILE}" ]; then
     PBUILDER_BUILD_LOGFILE="../${PKG_SOURCENAME}_${PKG_VERSION}_${ARCHITECTURE}.build"
@@ -96,5 +97,8 @@ if [ "${AUTO_DEBSIGN}" = "yes" ]; then
 	DEBSIGN_PARAM[1]="-k${DEBSIGN_KEYID}"
     fi
     DEBSIGN_PARAM[2]="${BUILDRESULT}/${CHANGES}"
+    if [ ! -f "${DEBSIGN_PARAM[2]}" ]; then
+        DEBSIGN_PARAM[2]="${BUILDRESULT}/${SOURCE_CHANGES}"
+    fi
     debsign "${DEBSIGN_PARAM[@]}"
 fi
-- 
2.6.2

Reply via email to