[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#860545: debootstrap fails to locate xzcat if the default shell is set to posh

On 2017-04-18 14:52 +0100, Steve McIntyre wrote:

> On Tue, Apr 18, 2017 at 01:44:52PM +0200, Olliver Schinagl wrote:
>>Package: debootstrap
>>Version: 1.0.89
>>Severity: normal
>>Dear Maintainer,
>>Trying to run debootstrap with just acl (the first package in the list) fails
>>at unpacking due to a missing xzcat
>>sudo debootstrap  --merged-usr  --variant=minbase --components=main,non-free
>>--include=acl jessie /tmp/debtest http://deb.debian.org/debian
>>I: Chosen extractor for .deb packages: ar
>>I: Extracting acl...
>>E: Extracting .//var/cache/apt/archives/acl_2.2.52-2_amd64.deb requires the
>>xzcat command, which is not available
>>$ which xzcat
>>changing /bin/sh -> dash fixes it, but I would have figued that if debootstrap
>>has its shebang set to /bin/sh, it would work with any posix shell, including
>>(I read the warning:
>>WARNING: Since many of Debian's /bin/sh scripts are not actually policy-
>>compliant, using posh as your /bin/sh may reveal breakage.)
> Just tested this - it appears that posh doesn't include "type", which
> is what debootstrap is using to check what's available. I don't
> personally know if "type" is a hard requirement in a posix shell here.

It's not.  The portable equivalent would be 'command -v', however posh
does not implement that either, since it only became mandatory in
POSIX.1-2008.  I'm afraid there is no easy better solution: while
'which' would always work on Debian systems, it's not guaranteed to be
available elsewhere.


Reply to: