Package: libguestfs0
Version: 1:1.36.13-1+b2
Severity: important

--- Please enter the report below this line. ---

With dash installed as /bin/sh, the supermin "appliance"s ends up being built without a /bin/sh (as of bash 4.4.18-1, since bash drops the pre-depends on dash).

This sort-of wrecks havoc with the qemu VM via virt-* commands (e.g. virt-rescue -a debian-9.img --network -r), particularly those using networking, because dhclient-script uses #!/bin/sh.

adding 'dash' to /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages fixes the issue (though that may not be the correct packaged fix)



On Debian 9.3, supermin's build log shows that it includes dash:

/usr/bin/supermin --build \
    --verbose --verbose --verbose \
    --lock /var/tmp/.guestfs-1000/lock \
    --copy-kernel \
    -f ext2 \
    --host-cpu x86_64 \
    /usr/lib/x86_64-linux-gnu/guestfs/supermin.d \
    -o /var/tmp/.guestfs-1000/appliance.d

...
supermin: mapping package names to installed packages
supermin: resolving full list of package dependencies
supermin: build: 192 packages, including dependencies
  - acl_2.2.52-3+b1_amd64
  - adduser_3.115_all
  - attr_1:2.4.47-2+b2_amd64
  - augeas-lenses_1.8.0-1+deb9u1_all
  - base-files_9.9+deb9u3_amd64
  - bash_4.4-5_amd64
  - binutils_2.28-5_amd64
  - bsdmainutils_9.0.12+nmu1_amd64
  - bsdutils_1:2.29.2-1_amd64
  - btrfs-progs_4.7.3-1_amd64
  - btrfs-tools_4.7.3-1_amd64
  - bzip2_1.0.6-8.1_amd64
  - coreutils_8.26-3_amd64
  - cpio_2.11+dfsg-6_amd64
  - cryptsetup-bin_2:1.7.3-4_amd64
  - cryptsetup_2:1.7.3-4_amd64
  - curl_7.52.1-5+deb9u4_amd64
  - dash_0.5.8-2.4_amd64
...



On an up-to-date sid system, supermin's build log is missing dash:

supermin: mapping package names to installed packages
supermin: resolving full list of package dependencies
supermin: build: 191 packages, including dependencies
...
  - bash_4.4.18-1_amd64
...
  - curl_7.58.0-2_amd64
  - debconf_1.5.65_all
...




With /bin/sh as dash, the "appliance" ends up being built in a way that networking fails:


><rescue> ip link set eth0 up
><rescue> dhclient -v eth0
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

execve (/sbin/dhclient-script, ...): No such file or directory
Listening on LPF/eth0/52:54:00:12:34:56
Sending on   LPF/eth0/52:54:00:12:34:56
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPREQUEST of 169.254.2.15 on eth0 to 255.255.255.255 port 67
DHCPOFFER of 169.254.2.15 from 169.254.2.2
DHCPACK of 169.254.2.15 from 169.254.2.2
execve (/sbin/dhclient-script, ...): No such file or directory
bound to 169.254.2.15 -- renewal in 43114 seconds.

><rescue> ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
    inet6 fec0::5054:ff:fe12:3456/64 scope site dynamic mngtmpaddr
       valid_lft 86272sec preferred_lft 14272sec
    inet6 fe80::5054:ff:fe12:3456/64 scope link
       valid_lft forever preferred_lft forever
><rescue> /sbin/dhclient-script
bash: /sbin/dhclient-script: /bin/sh: bad interpreter: No such file or directory




(as a side note: on my system, I also have to link up eth0 in the qemu guest before dhclient works, but I'm still investigating that. I don't know if I've mucked something up or it's an issue with newer dhclient or qemu or kernel or what.)



--- System information. ---
Architecture: Kernel:       Linux 4.14.0-3-amd64

Debian Release: buster/sid
500 unstable-debug deb.debian.org 500 unstable deb.debian.org 500 testing deb.debian.org 500 stable
--- Package information. ---
Depends                            (Version) | Installed
============================================-+-=======================
libacl1                        (>= 2.2.51-8) | 2.2.52-3+b1
libaugeas0                        (>= 1.0.0) | 1.10.1-1
libc6                              (>= 2.17) | 2.26-6
libcap2                          (>= 1:2.10) | 1:2.25-1.2
libfuse2                            (>= 2.8) | 2.9.7-1
libhivex0             (>= 1.2.2+git20100712) | 1.3.14-4+b1
libmagic1                          (>= 5.12) | 1:5.32-1
libpcre3                                     | 2:8.39-9
libselinux1                        (>= 1.32) | 2.7-2+b1
libsystemd0                                  | 237-1
libtsk13                          (>= 4.2.0) | 4.4.2-3
libvirt0                      (>= 0.9.4~rc1) | 4.0.0-1
libxml2                           (>= 2.8.0) | 2.9.4+dfsg1-6.1
libyajl2                          (>= 2.0.4) | 2.1.0-2+b3
supermin                              (>= 5) | 5.1.19-2
qemu-system-x86                              | 1:2.11+dfsg-1
sgabios                                      | 0.0~svn8-4
db-util                                      | 5.3.1
icoutils                                     | 0.32.2-1
netpbm                                       | 2:10.0-15.3+b2
osinfo-db                                    | 0.20170811-1
acl                                          | 2.2.52-3+b1
attr                                         | 1:2.4.47-2+b2
binutils                                     | 2.30-2
bsdmainutils                                 | 11.1.2
btrfs-progs                                  | 4.14.1-1
bzip2                                        | 1.0.6-8.1
cpio                                         | 2.12+dfsg-6
cryptsetup                                   | 2:2.0.0-1
curl                                         | 7.58.0-2
diffutils                                    | 1:3.6-1
dosfstools                                   | 4.1-1
e2fsprogs                                    | 1.43.8-2
exfat-utils                                  | 1.2.8-1
extlinux                                     | 3:6.03+dfsg1-2
fdisk                                        | 2.30.2-0.3
 OR util-linux                   (<< 2.29.2) | 2.30.2-0.3
file                                         | 1:5.32-1
gawk                                         | 1:4.1.4+dfsg-1+b1
gdisk                                        | 1.0.3-1
genisoimage                                  | 9:1.1.11-3+b2
grub2-common                                 | 2.02-2
iproute2                                     | 4.14.1-2
OR iproute | isc-dhcp-client | 4.3.5-3+b2
kmod                                         | 25-1
OR module-init-tools | ldmtool | 0.2.3-6
less                                         | 487-0.1
lsscsi                                       | 0.28-0.1
lvm2                                         | 2.02.176-4.1
lzop                                         | 1.03-4+b1
mdadm                                        | 4.0-2
mtools                                       | 4.0.18-2+b1
ntfs-3g                                      | 1:2017.3.23-2
openssh-client                               | 1:7.6p1-3
parted                                       | 3.2-20
procps                                       | 2:3.3.12-3
psmisc                                       | 23.1-1
qemu-utils                                   | 1:2.11+dfsg-1
scrub                                        | 2.6.1-1+b1
sleuthkit                                    | 4.4.2-3
squashfs-tools                               | 1:4.3-4
syslinux                                     | 3:6.03+dfsg1-2
udev                                         | 237-1
xz-utils                                     | 5.2.2-1.3
zerofree                                     | 1.0.4-1


Recommends               (Version) | Installed
==================================-+-===========
libguestfs-hfsplus                 | 1:1.36.13-1+b2
libguestfs-reiserfs                | 1:1.36.13-1+b2
libguestfs-xfs                     | 1:1.36.13-1+b2


Suggests               (Version) | Installed
================================-+-===========
libguestfs-gfs2 | libguestfs-jfs | libguestfs-nilfs | libguestfs-rescue | libguestfs-rsync | libguestfs-zfs |

Reply via email to