Bug#821047: cowbuilder: load_config_file() chokes on \n e.g. EXTRAPACKAGES='... \n ...'
Jack Bates
jack at nottheoilrig.com
Thu Apr 14 22:36:38 UTC 2016
Package: cowbuilder
Version: 0.79
Severity: normal
Dear Maintainer,
parameter.c line 102 calls
asprintf(&s, "env bash -c 'set -e ; . %s; set ' 2>&1", config);
and if e.g. EXTRAPACKAGES contains a \n then "set" prints
EXTRAPACKAGES=$'\n git\n less\n'
however strdup_strip_quote() doesn't handle this.
Consequently if pbuilderrc contains e.g.
EXTRAPACKAGES='
git
less
'
then the pbuilder tool works as expected (e.g. sudo pbuilder create)
but cowbuilder chokes:
nottheoilrig at debian:~$ sudo cowbuilder --create
[...]
E: Unable to locate package $'\n
E: Couldn't find any package by regex '$'\n'
E: Unable to locate package git\n
E: Unable to locate package less\n'
I: unmounting dev/pts filesystem
I: unmounting run/shm filesystem
I: unmounting proc filesystem
pbuilder create failed
forking: rm -rf /var/cache/pbuilder/base.cow
nottheoilrig at debian:~$
Is this "set" output a bashism? On my machine "sh -c set" prints
EXTRAPACKAGES='
git
less
'
vs. EXTRAPACKAGES=$'\n git\n less\n'
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 4.4.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages cowbuilder depends on:
ii cowdancer 0.79
ii libc6 2.22-5
ii pbuilder 0.223
cowbuilder recommends no packages.
cowbuilder suggests no packages.
-- no debconf information
More information about the Pbuilder-maint
mailing list