Package: vmdebootstrap
Version: 0.2-2
Severity: normal

Dear Neil, Lars, and Antonio,

When trying to build a Freedom-Maker [0] image with buildbot, the image
fails to build without access to `/dev/tty` [1].  If necessary, the
buildbot instructions can be provided.  The `/dev/tty` access is
unnecessary and the attached patch allows builds to complete
successfully.

Thanks for your time,
Nick

0: http://anonscm.debian.org/gitweb/?p=freedombox/freedom-maker.git;a=summary

1: tail of buildbot log:

    + sudo -H SUITE=sid MIRROR=http://cdn.debian.net/debian \
    DESTINATION=hdd MACHINE=virtualbox ARCHITECTURE=i386 vmdebootstrap \
    --log build/freedombox.log --log-level debug --size 4G --image \
    build/freedombox- unstable_2014-05-05_virtualbox-i386-hdd.img \
    --hostname freedombox --verbose --mirror \
    http://cdn.debian.net/debian --customize \
    
/home/nick/my/creations/source/freedombox/buildbot/master/slave/vboxBuilder/build/bin
 \
    /freedombox-customize --root-password freedom --arch i386 \
    --distribution sid --enable-dhcp --package apt --package base-files \
    --package ifupdown --package initramfs-tools --package logrotate \
    --package module-init-tools --package netbase --package rsyslog \
    --package udev --package debian-archive-keyring \

    ERROR: [Errno 6] No such device or address: '/dev/tty'
    Creating disk image
    # ...redundant lines elided...
    Setting up networking

    Running customize script 
/home/nick/my/creations/source/freedombox/buildbot/master/slave/vboxBuilder/build/bin/freedombox-customize

    EEEK! Something bad happened...  Cleaning up

-- System Information:
Debian Release: 7.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Foreign Architectures: i386

Versions of packages vmdebootstrap depends on:
ii  debootstrap    1.0.48+deb7u1
ii  extlinux       2:4.05+dfsg-6+deb7u1
ii  kpartx         0.4.9+git0.4dfdaf2b-7~deb7u2
ii  mbr            1.1.11-5+b1
ii  parted         2.3-12
ii  python         2.7.3-4+deb7u1
ii  python-cliapp  1.20120630-1
ii  qemu-utils     1.1.2+dfsg-6a+deb7u2

vmdebootstrap recommends no packages.

vmdebootstrap suggests no packages.

-- no debconf information
diff --git a/vmdebootstrap b/vmdebootstrap
index 1de3e56..0b710a0 100755
--- a/vmdebootstrap
+++ b/vmdebootstrap
@@ -456,8 +456,7 @@ append initrd=%(initrd)s root=UUID=%(uuid)s ro %(kserial)s
         script = self.settings['customize']
         if script:
             self.message('Running customize script %s' % script)
-            with open('/dev/tty', 'w') as tty:
-                cliapp.runcmd([script, rootdir], stdout=tty, stderr=tty)
+            subprocess.call([script, rootdir])
 
     def create_tarball(self, rootdir):
         # Create a tarball of the disk's contents

Reply via email to