reassign 802800 pbuilder retitle 802800 Passes -S unconditionally conflicting with '-g' when building the source package tags 802800 +patch thanks
Hi, we must not pass '-g' when building the source packge in pbuilder otherwise we fail like below. Prove of concept patch attached. On Fri, Oct 23, 2015 at 07:07:29PM +0200, Tomasz Buchert wrote: > Package: git-buildpackage > Version: 0.6.32 > Severity: normal > > Hi, > gbp buildpackage is unable to build a source-only package with -g switch > (or --changes-option=-g) [1]: > > $ gbp buildpackage -j4 --git-pbuilder -g --git-verbose --verbose > gbp:debug: ['git', 'rev-parse', '--show-cdup'] > gbp:debug: ['git', 'rev-parse', '--is-bare-repository'] > gbp:debug: /bin/true [] [] > gbp:debug: ['git', 'status', '--porcelain'] > gbp:debug: ['git', 'symbolic-ref', 'HEAD'] > gbp:debug: ['git', 'show-ref', 'refs/heads/master'] > gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'HEAD'] > gbp:debug: ['git', 'show-ref', 'refs/heads/pristine-tar'] > gbp:debug: ['git', 'log', '--pretty=format:%H', '--grep=pristine-tar .* > nghttp2_1.3.4\\.orig.tar\\.', 'pristine-tar', '--'] > gbp:debug: Found pristine-tar commit at > '454f1d84b15210fc9589d8d96b6f8a26ab8ee939' > gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', > '454f1d84b15210fc9589d8d96b6f8a26ab8ee939^0'] > gbp:debug: ['git', 'show', '-- > pretty=format:%an%x00%ae%x00%ad%x00%cn%x00%ce%x00%cd%x00%s%x00%f%x00%b%x00', > '-z', '--date=raw', '--no-renames', '--name-status', > '454f1d84b15210fc9589d8d96b6f8a26ab8ee939'] > gbp:debug: Determined compression type 'bzip2' > gbp:info: Building with pbuilder for sid > gbp:debug: git-pbuilder ['-j4', '-g', '--verbose'] [] > Building with pbuilder for distribution sid > I: using pbuilder as pbuilder > dpkg-buildpackage: cannot combine -S and -g > > Use --help for program usage information. > gbp:error: 'git-pbuilder -j4 -g --verbose' failed: it exited with 2 > > ======================== > > This *works* without '--git-pbuilder', but in this case > the build is not isolated and 'all' packages may be built > in a wrong way. It would be great if one could make source-only > builds with --git-pbuilder. The issus is actually in pbuilder itself: $ pdebuild --buildresult ../ --pbuilder cowbuilder --debbuildopts '-g' -- --hookdir /home/foo/.pbuilder/hooks --basepath /var/cache/pbuilder/base-sid.cow 0 I: using cowbuilder as pbuilder dpkg-buildpackage: cannot combine -S and -g Cheers, -- Guido
>From 323280d915ea4f26aaae09fdf98d798a9c2edb50 Mon Sep 17 00:00:00 2001 Message-Id: <323280d915ea4f26aaae09fdf98d798a9c2edb50.1446830592.git....@sigxcpu.org> From: =?UTF-8?q?Guido=20G=C3=BCnther?= <a...@sigxcpu.org> Date: Fri, 6 Nov 2015 18:22:27 +0100 Subject: [PATCH] Remove '-g' when building the source package Closes: #802800 --- pdebuild | 1 + 1 file changed, 1 insertion(+) diff --git a/pdebuild b/pdebuild index c5ac78b..3deb540 100644 --- a/pdebuild +++ b/pdebuild @@ -77,6 +77,7 @@ else fi echo "dpkg-buildpackage -S -d -us -uc -r${BUILDSOURCEROOTCMD} $DEBBUILDOPTS" | \ perl -pe 's/(^|\s)-[AbBF](\s|$)/$1$2/g' | \ + perl -pe 's/(^|\s)'\''-g'\''(\s|$)/$1$2/g' | \ /bin/bash ${PBUILDERROOTCMD} \ ${PDEBUILD_PBUILDER} \ -- 2.6.1