[Vmdebootstrap-devel] Bug#850213: custom package install hangs on prompts

Antoine Beaupré anarcat at debian.org
Thu Jan 5 04:44:44 UTC 2017


Package: vmdebootstrap
Version: 1.7-1
Severity: normal

I *believe* that custom package installs do not properly silence
debconf prompts. I have a trivial task-* package I have built here to
enable a custom image to be more easily built and it seems to fail to
build as the custom package install hangs:

$ sudo strace -p 14530
Process 14530 attached
read(11, ^CProcess 14530 detached
 <detached ...>

hitting "enter" repeatedly on the vmdebootstrap terminal will make the
prompt go away, but that is *really* counter intuitive...

here's what ends up in the log when i interrupt vmdebootstrap during
this process:

2017-01-04 19:52:04 DEBUG run external command: [['chroot', '/tmp/tmpo5F5FJ', 'dpkg', '-i', '/tmp/install_debs/task-stressant_0.1-1_amd64.deb']]
2017-01-04 19:52:05 DEBUG stdout:
1
2017-01-04 19:52:05 DEBUG stderr:
Selecting previously unselected package task-stressant.
(Reading database ... 13345 files and directories currently installed.)
Preparing to unpack .../task-stressant_0.1-1_amd64.deb ...
Unpacking task-stressant (0.1-1) ...

2017-01-04 19:52:05 DEBUG runcmd: ['chroot', '/tmp/tmpo5F5FJ', 'apt-get', '-y', '-f', '--no-remove', 'install'] None {}
2017-01-04 20:13:20 INFO EEEK! Something bad happened...

if i manage to be patient enough to enter in the right moment and kill
the right process at the right moment, i get *all* the output of
debootstrap dumped at once at the end.

The beginning looks like this:


Package configuration


 ┌──────────────────────────┤ Configuring grub-pc ├──────────────────────────┐
 │                                                                           │ 
 │ You chose not to install GRUB to any devices. If you continue, the boot   │ 
 │ loader may not be properly configured, and when this computer next        │ 
 │ starts up it will use whatever was previously in the boot sector. If      │ 
 │ there is an earlier version of GRUB 2 in the boot sector, it may be       │ 
 │ unable to load modules or handle the current configuration file.          │ 
 │                                                                           │ 
 │ If you are already using a different boot loader and want to carry on     │ 
 └                                                 Setting up libkrb5-3:amd64 (1.15-1) ...
Setting up libgssapi-krb5-2:amd64 (1.15-1) ...

then somewhere in there:

grub-probe: error: cannot find a device for /boot (is /dev mounted?).
grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?).
dpkg: error processing package grub-pc (--configure):
 subprocess installed post-installation script was killed by signal (Terminated)
dpkg: dependency problems prevent configuration of grub2:
 grub2 depends on grub-pc (= 2.02~beta3-3); however:
  Package grub-pc is not configured yet.

dpkg: error processing package grub2 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of task-stressant:
 task-stressant depends on grub2; however:
  Package grub2 is not configured yet.

dpkg: error processing package task-stressant (--configure):
 dependency problems - leaving unconfigured
cat: /proc/cmdline: No such file or directory
setupcon: The keyboard model is unknown, assuming 'pc105'. Keyboard may be configured incorrectly.
Created symlink /etc/systemd/system/sockets.target.wants/dm-event.socket → /lib/systemd/system/dm-event.socket.
invoke-rc.d: could not determine current runlevel
invoke-rc.d: could not determine current runlevel
invoke-rc.d: could not determine current runlevel
Created symlink /etc/systemd/system/sysinit.target.wants/lvm2-lvmetad.socket → /lib/systemd/system/lvm2-lvmetad.socket.
Created symlink /etc/systemd/system/sysinit.target.wants/lvm2-lvmpolld.socket → /lib/systemd/system/lvm2-lvmpolld.socket.
Created symlink /etc/systemd/system/sysinit.target.wants/lvm2-monitor.service → /lib/systemd/system/lvm2-monitor.service.
cat: /proc/cmdline: No such file or directory
setupcon: The keyboard model is unknown, assuming 'pc105'. Keyboard may be configured incorrectly.
Errors were encountered while processing:
 grub-pc
 grub2
 task-stressant
E: Sub-process /usr/bin/dpkg returned an error code (1)

Cleaning up
Umounting /tmp/tmptyGzeK
ERROR: command failed: ['chroot', '/tmp/tmptyGzeK', 'apt-get', '-y', '-f', '--no-remove', 'install']
Reading package lists...
Building dependency tree...
Correcting dependencies... Done
The following additional packages will be installed:

so this looks like a grub failure of some sort... in this specific
case, i had the stupid idea of having grub as a dependency of the
meta-package...

But even without that dubious dependency, i get a prompt in the custom
package install:

root      3759  0.0  0.0  55552  3888 pts/0    S+   23:33   0:00          |           \_ sudo vmdebootstrap --serial-console --log build/vmdebootstrap.log --log-level debug --systemd-networkd --verbose --distribution=stretch --arch=amd64 --image=build/stressant-stretch-amd64.iso --custom-package=../build-area/task-stressant_0.1-1_amd64.deb --size=1G
root      3760  0.0  0.3  84708 49376 pts/0    S+   23:33   0:00          |               \_ /usr/bin/python /usr/sbin/vmdebootstrap --serial-console --log build/vmdebootstrap.log --log-level debug --systemd-networkd --verbose --distribution=stretch --arch=amd64 --image=build/stressant-stretch-amd64.iso --custom-package=../build-area/task-stressant_0.1-1_amd64.deb --size=1G
root     20458  0.4  0.2  81848 43748 pts/0    S+   23:38   0:01          |                   \_ apt-get -y -f --no-remove install
root     20690  0.0  0.0   4284   712 pts/0    S+   23:38   0:00          |                       \_ /bin/sh -c /usr/sbin/dpkg-preconfigure --apt || true
root     20691  0.0  0.1  57772 17104 pts/0    S+   23:38   0:00          |                           \_ /usr/bin/perl -w /usr/sbin/dpkg-preconfigure --apt
root     20699  0.0  0.0      0     0 pts/0    Z+   23:38   0:00          |                               \_ [dpkg-preconfigu] <defunct>
root     20721  0.0  0.0   6392  3664 pts/0    S+   23:38   0:00          |                               \_ /bin/sh /tmp/keyboard-configuration.config.JI4IGs configure
root     20877  0.0  0.0  18752  3200 pts/0    S+   23:38   0:00          |                               \_ whiptail --backtitle Package configuration --title Configuring keyboard-configuration --output-fd 12 --default-item Fran?ais (Canada) --menu Please select the layout matching the keyboard for this machine.  Keyboard layout: 14 71 4 -- Fran?ais (Canada)  Fran?ais (Canada) - Anglais (Canada)  Fran?ais (Canada) - Canadien multilingue  Fran?ais (Canada) - Canadien multilingue (premi?re partie)  Fran?ais (Canada) - Canadien multilingue (seconde partie)  Fran?ais (Canada) - Fran?ais (Canada, Dvorak)  Fran?ais (Canada) - Fran?ais (Canada, obsol?te)  Fran?ais (Canada) - Inuktitut  Other

presumably this is because some stuff wasn't answered in the first run
and packages still need to be configured?

a.

-- System Information:
Debian Release: 8.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 'stable'), (1, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.7.0-0.bpo.1-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages vmdebootstrap depends on:
ii  debootstrap         1.0.67
ii  kpartx              0.5.0-6+deb8u2
ii  libjs-sphinxdoc     1.4.6-1~bpo8+1
ii  parted              3.2-7
ii  python-cliapp       1.20150829-1~bpo8+1
ii  python-distro-info  0.14
ii  python2.7           2.7.9-2+deb8u1
pn  python:any          <none>
ii  qemu-utils          1:2.1+dfsg-12+deb8u6

Versions of packages vmdebootstrap recommends:
ii  dosfstools        3.0.27-1
ii  extlinux          3:6.03+dfsg-5+deb8u1
ii  grub2-common      2.02~beta2-22+deb8u1
ii  python-guestfs    1:1.28.1-1
ii  qemu-system       1:2.1+dfsg-12+deb8u6
ii  qemu-user-static  1:2.1+dfsg-12+deb8u6
ii  squashfs-tools    1:4.2+20130409-2

Versions of packages vmdebootstrap suggests:
pn  cmdtest       <none>
ii  mbr           1.1.11-5+b1
ii  pandoc        1.12.4.2~dfsg-1+b14
pn  u-boot:armhf  <none>

-- no debconf information



More information about the Vmdebootstrap-devel mailing list