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

Bug#733502: busybox: FTBFS when built with bash as the default shell



Package: busybox
Version: 1:1.21.0-6exp
Severity: important
Tags: upstream

Busybox fails to build when the default shell is bash and busybox is
*not* installed on the system. In this condition the
which-uses-default-path test fails as in this build log [1]:


| FAIL: which-uses-default-path
| ++ command -pv busybox
| + BUSYBOX=

Looking at the test, it does:
| BUSYBOX=$(command -pv busybox)
| SAVED_PATH=$PATH
| unset PATH
| $BUSYBOX which ls

It is launched with PATH set to ${busybox-build-dir}:$PATH 

On a POSIX compliant shell like bash, the '-p' passed to 'command' means
ignore the PATH environment variable and use the default one [1]. If
busybox is not in the standard path (which is supposed to be the case on
a clean chroot on a buildd), this command will return nothing, and a 
exit value different of 0, and the test will fail, as seen on the build
log.

When dash is used, it ignores the '-p' argument passed to 'command'
contrary to what POSIX mandates. The just built busybox is therefore 
correctly found the in the PATH, and the test succeed. I have reported
the dash issue as bug #733501. 

On the busybox side, it looks like what is really wanted here is
'command -v busybox' instead of 'command -pv busybox. That way the
testsuite passes.


[1] https://buildd.debian.org/status/fetch.php?pkg=busybox&arch=mips&ver=1%3A1.21.0-6exp&stamp=1387284512

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.12-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages busybox depends on:
ii  libc6  2.18-0experimental0

busybox recommends no packages.

busybox suggests no packages.

-- no debconf information


Reply to: