Bug#874052: pbuilder: B20autopkgtest, hook script fails within a Jessie chroot due bashism
Carsten Schoenert
c.schoenert at t-online.de
Sat Sep 2 13:00:04 UTC 2017
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 at 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.
Regards
Carsten
-- System Information:
Debian Release: buster/sid
APT prefers testing
APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 4.12.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages pbuilder depends on:
ii debconf 1.5.63
ii debootstrap 1.0.91
ii dpkg-dev 1.18.24
ii wget 1.19.1-4
Versions of packages pbuilder recommends:
ii devscripts 2.17.9
pn eatmydata <none>
ii fakeroot 1.22-1
ii iproute2 4.9.0-1
ii net-tools 1.60+git20161116.90da8a0-1
ii sudo 1.8.20p2-1
Versions of packages pbuilder suggests:
ii cowdancer 0.85
pn gdebi-core <none>
-- debconf information:
pbuilder/mirrorsite: http://ftp.de.debian.org/debian/
pbuilder/rewrite: false
pbuilder/nomirror:
More information about the Pbuilder-maint
mailing list