control: -1 tags +patch Hi, On Sat, Sep 02, 2017 at 03:00:04PM +0200, Carsten Schoenert wrote: > Package: pbuilder > Version: 0.228.8 > Severity: normal > > Dear Maintainer, > > I heavily use the hook script B20autopkgtest from the shipped examples scripts > within pbuilder package within my local builds to test potentially uploads of > packages. > > And this works perfectly within current chroot environments for unstable > ans also for Stretch. But within a Jessie chroot the hook script is > failing due some bashism inside without a shebang of /bin/bash > > > ... > > dpkg-genchanges: not including original source code in upload > > I: copying local configuration > > I: user script /home/pbuilder/build/cow.13852/tmp/hooks/B20autopkgtest > > starting > > + cd /build/icedove-52.3.0/debian/.. > > + [ ! -f debian/tests/control ] > > + [ ! -f debian/files ] > > + [ -n ] > > + unset newpid_name > > + apt-cache policy newpid > > + grep -q newpid: > > + echo The newpid package seems to be available, considering for > > installation > > The newpid package seems to be available, considering for installation > > + newpid_name=newpid > > /tmp/hooks/B20autopkgtest: 65: /tmp/hooks/B20autopkgtest: Bad substitution > > Using checkbashism is showing exactly this line using Bash syntax. > > > carsten@i5:/usr/share/doc/pbuilder/examples $ checkbashisms B20autopkgtest > > possible bashism in B20autopkgtest line 65 (bash arrays, ${name[0|*|@]}): > > apt-get install -y "${APTGETOPT[@]}" autopkgtest apt-utils pbuilder > > $newpid_name > > I changed the shebang to using /bin/bash and the script is also working in a > Jessie chroot again.
The script used APTGETOPT which is also used in other scripts as array but all use /bin/bash so lets use that for B20autopkgtest too. Patch attached. Cheers, -- Guido
>From d3e9ba3ddc4b1199788bb23d9cdd09ebf69887a0 Mon Sep 17 00:00:00 2001 Message-Id: <d3e9ba3ddc4b1199788bb23d9cdd09ebf69887a0.1507143902.git....@sigxcpu.org> From: =?UTF-8?q?Guido=20G=C3=BCnther?= <a...@sigxcpu.org> Date: Wed, 4 Oct 2017 21:02:39 +0200 Subject: [PATCH] B20autopkgtest: Use /bin/bash Closes: #874052 --- examples/B20autopkgtest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/B20autopkgtest b/examples/B20autopkgtest index 279a26e..7b7b543 100644 --- a/examples/B20autopkgtest +++ b/examples/B20autopkgtest @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright © 2012 Christoph Berg <m...@debian.org> # © 2013 Michael Prokop <m...@debian.org> # © 2015 Mattia Rizzolo <mat...@mapreri.org> -- 2.14.1