diff -Nru autopkgtest-3.15/debian/bzr-builder.manifest autopkgtest-3.15.2/debian/bzr-builder.manifest --- autopkgtest-3.15/debian/bzr-builder.manifest 2015-06-13 17:10:17.000000000 +0000 +++ autopkgtest-3.15.2/debian/bzr-builder.manifest 2015-07-03 12:42:14.000000000 +0000 @@ -1,2 +1,2 @@ -# bzr-builder format 0.3 deb-version {debupstream}-0~1155 -lp:~vila/autopkgtest/git-master revid:git-v1:100324c2436fd688608b5e9db1a475c9f42da406 +# bzr-builder format 0.3 deb-version {debupstream}-0~1175 +lp:~vila/autopkgtest/git-master revid:git-v1:45041c82d232be8a35a9319ebb125beb00f284ad diff -Nru autopkgtest-3.15/debian/changelog autopkgtest-3.15.2/debian/changelog --- autopkgtest-3.15/debian/changelog 2015-06-13 17:10:17.000000000 +0000 +++ autopkgtest-3.15.2/debian/changelog 2015-07-03 12:42:14.000000000 +0000 @@ -1,18 +1,65 @@ -autopkgtest (3.15-0~1155~ubuntu15.10.1) wily; urgency=low +autopkgtest (3.15.2-0~1175~ubuntu15.10.1) wily; urgency=low * Auto build. - -- Vincent Ladeuil Sat, 13 Jun 2015 17:10:17 +0000 + -- Vincent Ladeuil Fri, 03 Jul 2015 12:42:14 +0000 -autopkgtest (3.15) UNRELEASED; urgency=medium +autopkgtest (3.15.2) UNRELEASED; urgency=medium - Behaviour changes: + * ssh-setup/nova: Re-try nova boot up to three times if it fails, and sleep + 5 minutes in between. This occasionally fails due to exceeding quota or + temporary glitches. + * ssh-setup/nova: Silence "invalid command wait-reboot" warning. + * setup-commands/cloud-vm-setup: Purge cloud-init too. It sometimes causes + longer hangs on boot and might interfere with tests in other ways, and we + only need it for first-time initialization anyway. + + -- Martin Pitt Tue, 30 Jun 2015 11:14:30 +0200 + +autopkgtest (3.15.1) unstable; urgency=medium + + * adt-buildvm-ubuntu-cloud: Fix lsb_release fallback if python3-distro-info + is not available. + * adt-buildvm-ubuntu-cloud: Don't move the uninitialized image to final + location if QEMU failed. + * adt-buildvm-ubuntu-cloud: Check availability of genisoimage and access of + /dev/kvm before downloading image. (LP: #1466486) + * Get along with dpkg-query not existing, such as in latest Ubuntu Snappy + images. Skip generation of testbed-packages artifact in that case. + (LP: #1469647) + * Adjust NullRunner.test_tmp_install test case to work with pygobject 3.16. + + -- Martin Pitt Mon, 29 Jun 2015 13:07:34 +0200 + +autopkgtest (3.15) unstable; urgency=medium + + Behaviour changes and improvements: * The specified --output-dir now must not exist or be empty. If it is non-empty, adt-run now will refuse to use it instead of cleaning it. This is safer, to avoid accidentally using the home directory or similarly precious data. (LP: #1463561) + * Add --no-auto-control option to disable autodep8. (Closes: #788659) + * ssh-setup/nova: Add -e/--env option to append to /etc/environment. This is + mostly useful to configure $http_proxy and friends. + * ssh-setup/nova: Add --mirror option. + * Add setup-commands/cloud-vm-setup: --setup-commands script for cloud + instances to prepare them for running autopkgtests. This is similar to + adt-setup-vm, but won't configure serial console or networking. + + Bug fixes: + * adt-setup-vm: Print a warning if calling update-grub fails, instead of + aborting. This fixes vmdebootstrap --grub, as that installs grub after + running the customization script. Adjust adt-virt-qemu.1 manpage to + recommend the --grub option of vmdebootstrap. + * testdesc.py, parse_rfc822(): Entirely ignore lines which only contain + whitespace after filtering out intra-line comments. They break + continuation line parsing in python-debian >= 0.1.23. (Closes: #784942) + * adt-setup-vm: Add inclusion of interfaces.d/ to /etc/network/interfaces. + This belongs into vmdebootstrap (#788792), but fix that locally for the + time being. + * adt-run.1: Document --testname. - -- Martin Pitt Thu, 11 Jun 2015 16:02:07 +0200 + -- Martin Pitt Sun, 28 Jun 2015 11:55:34 +0200 autopkgtest (3.14.3) unstable; urgency=medium diff -Nru autopkgtest-3.15/debian/tests/control autopkgtest-3.15.2/debian/tests/control --- autopkgtest-3.15/debian/tests/control 2015-06-13 17:10:17.000000000 +0000 +++ autopkgtest-3.15.2/debian/tests/control 2015-07-03 12:42:13.000000000 +0000 @@ -1,5 +1,5 @@ Tests: adt-run -Depends: autopkgtest, build-essential, debhelper (>= 7) +Depends: autopkgtest, autodep8, build-essential, debhelper (>= 7) Restrictions: needs-root Tests-Directory: tests diff -Nru autopkgtest-3.15/doc/README.package-tests.rst autopkgtest-3.15.2/doc/README.package-tests.rst --- autopkgtest-3.15/doc/README.package-tests.rst 2015-06-13 17:10:17.000000000 +0000 +++ autopkgtest-3.15.2/doc/README.package-tests.rst 2015-07-03 12:42:13.000000000 +0000 @@ -232,7 +232,8 @@ of ``debian/tests/control`` would be mostly identical, such as Perl or Ruby libraries. If ``debian/tests/control`` is absent, the ``autodep8`` tool can generate an automatic control file. If installed, ``adt-run`` -will automatically use it. +will automatically use it; this can be disabled with the +``--no-auto-control`` option. Those packages do not have to provide ``debian/tests/``, but they should still include an appropriate source package header diff -Nru autopkgtest-3.15/lib/adt_run_args.py autopkgtest-3.15.2/lib/adt_run_args.py --- autopkgtest-3.15/lib/adt_run_args.py 2015-06-13 17:10:17.000000000 +0000 +++ autopkgtest-3.15.2/lib/adt_run_args.py 2015-07-03 12:42:13.000000000 +0000 @@ -329,6 +329,10 @@ help='use DIR rather than %(default)s (for signing private ' 'apt archive)') g_misc.add_argument( + '--no-auto-control', dest='auto_control', action='store_false', + default=True, + help='Disable automatic test generation with autodep8') + g_misc.add_argument( '-h', '--help', action='help', default=argparse.SUPPRESS, help='show this help message and exit') diff -Nru autopkgtest-3.15/lib/testdesc.py autopkgtest-3.15.2/lib/testdesc.py --- autopkgtest-3.15/lib/testdesc.py 2015-06-13 17:10:17.000000000 +0000 +++ autopkgtest-3.15.2/lib/testdesc.py 2015-07-03 12:42:13.000000000 +0000 @@ -185,8 +185,13 @@ # completely ignore ^# as that breaks continuation lines if l.startswith('#'): continue - # filter out comments which don't start on first column - l = l.split('#', 1)[0] + # filter out comments which don't start on first column (Debian + # #743174); entirely remove line if all that's left is whitespace, as + # that again breaks continuation lines + if '#' in l: + l = l.split('#', 1)[0] + if not l.strip(): + continue lines.append(l) f.close() @@ -329,7 +334,8 @@ return None -def parse_debian_source(srcdir, testbed_caps, control_path=None): +def parse_debian_source(srcdir, testbed_caps, control_path=None, + auto_control=True): '''Parse test descriptions from a Debian DEP-8 source dir You can specify an alternative path for the control file (default: @@ -349,10 +355,14 @@ control_path = os.path.join(srcdir, 'debian', 'tests', 'control') if not os.path.exists(control_path): - control = _autodep8(srcdir) - if control is None: + if auto_control: + control = _autodep8(srcdir) + if control is None: + return ([], False) + control_path = control.name + else: + adtlog.debug('auto_control is disabled, no tests') return ([], False) - control_path = control.name for record in parse_rfc822(control_path): command = None diff -Nru autopkgtest-3.15/runner/adt-run autopkgtest-3.15.2/runner/adt-run --- autopkgtest-3.15/runner/adt-run 2015-06-13 17:10:17.000000000 +0000 +++ autopkgtest-3.15.2/runner/adt-run 2015-07-03 12:42:13.000000000 +0000 @@ -372,7 +372,7 @@ adtlog.info('testbed dpkg architecture: ' + self.dpkg_arch) # record package versions of pristine testbed - if opts.output_dir: + if opts.output_dir and testbed.execute(['which', 'dpkg-query'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)[0] == 0: pkglist = TempTestbedPath(testbed, 'testbed-packages', autoclean=False) self.check_exec(['sh', '-ec', "dpkg-query --show -f '${Package}\\t${Version}\\n' > %s" % pkglist.tb]) pkglist.copyup() @@ -1017,7 +1017,7 @@ need_click_restore = self.apparmor_click(test.clicks, test.installed_clicks) # record installed package versions - if opts.output_dir: + if opts.output_dir and testbed.execute(['which', 'dpkg-query'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)[0] == 0: pkglist = TempTestbedPath(self, test.name + '-packages.all', autoclean=False) self.check_exec([ 'sh', '-ec', "dpkg-query --show -f '${Package}\\t${Version}\\n' > %s" % pkglist.tb]) @@ -1854,7 +1854,8 @@ else: tests_tree = build_source(kind, arg, built_binaries) (tests, skipped) = testdesc.parse_debian_source( - tests_tree.host, testbed.caps, control_path=control_override) + tests_tree.host, testbed.caps, control_path=control_override, + auto_control=opts.auto_control) if skipped: errorcode |= 2 diff -Nru autopkgtest-3.15/runner/adt-run.1 autopkgtest-3.15.2/runner/adt-run.1 --- autopkgtest-3.15/runner/adt-run.1 2015-06-13 17:10:17.000000000 +0000 +++ autopkgtest-3.15.2/runner/adt-run.1 2015-07-03 12:42:13.000000000 +0000 @@ -155,6 +155,10 @@ (for Debian sources) or the Click manifest for the following test. +.TP +.BI --testname= TEST +Run only the given test name (from test control file) in the following test. + .SH LOGGING OPTIONS .TP @@ -334,6 +338,12 @@ .BR $HOME/.cache/autopkgtest . .TP +.BI --no-auto-control +Disable automatic test generation with autodep8, even if it is installed. In +that case, packages without tests will exit with code 8 ("No tests in this +package") just like without autodep8. + +.TP .BR \-h | \-\-help Show command line help and exit. diff -Nru autopkgtest-3.15/setup-commands/cloud-vm-setup autopkgtest-3.15.2/setup-commands/cloud-vm-setup --- autopkgtest-3.15/setup-commands/cloud-vm-setup 1970-01-01 00:00:00.000000000 +0000 +++ autopkgtest-3.15.2/setup-commands/cloud-vm-setup 2015-07-03 12:42:13.000000000 +0000 @@ -0,0 +1,51 @@ +#!/bin/sh +# cloud-setup-vm is part of autopkgtest +# autopkgtest is a tool for testing Debian binary packages +# +# autopkgtest is Copyright (C) 2006-2015 Canonical Ltd. +# +# --setup-commands script for cloud instances to prepare them for running +# autopkgtests. This is similar to adt-setup-vm, but won't configure serial +# console or networking. + +# set up apt sources +mirror_rel=`awk '/^deb .*(debian|ubuntu)/ { print $2,$3; exit }' /etc/apt/sources.list` +if [ "${mirror_rel%ubuntu*}" != "$mirror_rel" ]; then + cat << EOF > "$root/etc/apt/sources.list" +deb $mirror_rel main restricted universe multiverse +deb ${mirror_rel}-updates main restricted universe multiverse +deb-src $mirror_rel main restricted universe multiverse +deb-src ${mirror_rel}-updates main restricted universe multiverse +EOF +else + cat << EOF > "$root/etc/apt/sources.list" +deb $mirror_rel main contrib non-free +deb-src $mirror_rel main contrib non-free +EOF +fi + +# go-faster apt/dpkg +echo "Acquire::Languages \"none\";" > /etc/apt/apt.conf.d/90nolanguages +echo 'force-unsafe-io' > /etc/dpkg/dpkg.cfg.d/autopkgtest + +# install some necessary packages +if [ "${mirror_rel%ubuntu*}" != "$mirror_rel" ]; then + # provides kmods like scsi_debug or mac80211_hwsim + apt-get install -y linux-generic +fi +# some tests use a lot of /dev/random, avoid hangs +apt-get install -y haveged + +# clean up some unnecessary packages +for p in accountsservice apt-xapian-index cryptsetup landscape-client \ + landscape-common open-vm-tools w3m vim-runtime aptitude-common \ + command-not-found-data manpages ntfs-3g sosreport \ + ubuntu-release-upgrader-core cloud-init; do + apt-get --auto-remove -y purge $p || true +done + +# bump vmalloc on i386, necessary for tests like udisks2 +if [ $(dpkg --print-architecture) = i386 ]; then + sed -i '/CMDLINE_LINUX_DEFAULT/ s/"$/ vmalloc=512M"/' /etc/default/grub.d/*.cfg + update-grub +fi diff -Nru autopkgtest-3.15/ssh-setup/nova autopkgtest-3.15.2/ssh-setup/nova --- autopkgtest-3.15/ssh-setup/nova 2015-06-13 17:10:17.000000000 +0000 +++ autopkgtest-3.15.2/ssh-setup/nova 2015-07-03 12:42:13.000000000 +0000 @@ -29,13 +29,19 @@ # User name to log in as. Defaults to "ubuntu" if not specified. # -n name | --name=name # Name for the new server. A name will be generated if not specified. +# -e 'name=value' | --env='name=value' +# Additional environment variable to put into the testbed's +# /etc/environment. Mostly useful to set $http_proxy and friends. +# Can be specified multiple times. +# --mirror=URL +# Use given archive mirror for apt # # # Authors: # Jean-Baptiste Lallement # Martin Pitt # -# autopkgtest is Copyright (C) 2006-2014 Canonical Ltd. +# autopkgtest is Copyright (C) 2006-2015 Canonical Ltd. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -68,6 +74,8 @@ ASSOCIATE_IP="" FLOATING_IP="" SECURITY_GROUPS="" +EXTRA_ENV="" +MIRROR="" DEBUG="" @@ -87,8 +95,8 @@ parse_args() { # Parse command line argument and populate environment - SHORTOPTS="f:,i:,k:,N:,l:,n:,s:,a,d" - LONGOPTS="flavor:,image:,keyname:,net-id:,login:,name:,security-groups:,associate-ip,floating-ip:,debug" + SHORTOPTS="f:,i:,k:,N:,l:,n:,s:,a,d,e:" + LONGOPTS="flavor:,image:,keyname:,net-id:,login:,name:,security-groups:,associate-ip,floating-ip:,debug,env:,mirror:" TEMP=$(getopt -o $SHORTOPTS --long $LONGOPTS -- "$@") eval set -- "$TEMP" @@ -120,6 +128,10 @@ ASSOCIATE_IP=1; shift;; --floating-ip) FLOATING_IP="$2"; shift 2;; + -e|--env) + EXTRA_ENV="$EXTRA_ENV\n$2"; shift 2;; + --mirror) + MIRROR="apt_mirror: $2"; shift 2;; -d|--debug) DEBUG=1; shift;; --) @@ -173,10 +185,12 @@ manage_etc_hosts: true apt_update: true apt_upgrade: false +$MIRROR runcmd: - echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/90nolanguages - echo 'force-unsafe-io' > /etc/dpkg/dpkg.cfg.d/autopkgtest + - printf '$EXTRA_ENV' >> /etc/environment EOF EXTRA_OPTS='' @@ -188,13 +202,22 @@ EXTRA_OPTS="$EXTRA_OPTS --security-groups $SECURITY_GROUPS" fi - # Boot the instance - OUT=$(nova boot --flavor $FLAVOR --key_name $KEYNAME --user-data $userdata \ - --image $IMAGE $EXTRA_OPTS --poll $SRVNAME 2>&1) || { - error "nova boot failed:" + # Boot the instance; this might temporarily fail due to exceeding quota or + # some glitch, so retry a few times + retry=0 + while true; do + retry=$((retry+1)) + set +e + OUT=$(nova boot --flavor $FLAVOR --key_name $KEYNAME --user-data $userdata \ + --image $IMAGE $EXTRA_OPTS --poll $SRVNAME 2>&1) + rc=$? + set -e + [ $rc -ne 0 ] || break + error "nova boot failed (attempt #$retry):" error "$OUT" - exit 1 - } + [ $retry -lt 3 ] || exit 1 + sleep 300 + done debug "Nova boot succeeded" rm $userdata @@ -308,6 +331,8 @@ cleanup;; revert) revert;; + wait-reboot) + exit 1;; # use default implementation '') echo "Needs to be called with command as first argument" >&2 exit 1 diff -Nru autopkgtest-3.15/tests/adt-run autopkgtest-3.15.2/tests/adt-run --- autopkgtest-3.15/tests/adt-run 2015-06-13 17:10:17.000000000 +0000 +++ autopkgtest-3.15.2/tests/adt-run 2015-07-03 12:42:13.000000000 +0000 @@ -51,6 +51,8 @@ stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0 +have_autodep8 = subprocess.call(['which', 'autodep8'], stdout=subprocess.PIPE) == 0 + class AdtTestCase(unittest.TestCase): '''Base class for adt-run tests''' @@ -773,10 +775,10 @@ from gi.repository import Json Json # pyflakes # already installed on the system - self.assertRegex(out, 'DynamicModule.*Json.* from .*/usr/lib/.*girepository') + self.assertRegex(out, '(Dynamic|Introspection)Module.*Json.* from .*/usr/lib/.*girepository') except ImportError: # should use from local unpack dir - self.assertRegex(out, 'DynamicModule.*Json.* from .*/tmp/adt-run.*/deps/usr/lib') + self.assertRegex(out, '(Dynamic|Introspection)Module.*Json.* from .*/tmp/adt-run.*/deps/usr/lib') # no stderr self.assertNotIn(' stderr ', err) @@ -1715,6 +1717,31 @@ # should have debug messages self.assertIn('adt-virt-chroot: DBG:', err) + def test_no_dpkg_query(self): + '''testbed does not have dpkg-query''' + + p = self.build_src('Tests: t\nDepends:\nRestrictions: needs-root\n', + {'t': '#!/bin/sh -e\necho ok\n'}) + outdir = os.path.join(self.workdir, 'out') + (code, out, err) = self.adt_run(['--setup-commands', 'rm /usr/bin/dpkg-query', + '-d', '--built-tree=' + p, + '--output-dir=' + outdir], + [self.chroot]) + + # test should succeed + self.assertEqual(code, 0, err) + self.assertRegex(out, 't\s+PASS', out) + + # check outdir + with open(os.path.join(outdir, 't-stdout')) as f: + self.assertEqual(f.read(), 'ok\n') + with open(os.path.join(outdir, 'log')) as f: + contents = f.read() + self.assertRegex(contents, 't\s+PASS\n') + + # don't create empty/bogus files + self.assertNotIn('testbed-packages', os.listdir(outdir)) + @unittest.skipUnless('ADT_TEST_SCHROOT' in os.environ, 'Set $ADT_TEST_SCHROOT to an existing schroot') @@ -2251,6 +2278,28 @@ (code, out, err) = self.adt_run(['--unbuilt-tree=' + p], [self.schroot_name]) self.assertEqual(code, 0, out + err) + def test_apt_autodep8(self): + '''apt, autodep8''' + + (code, out, err) = self.adt_run(['libtest-carp-perl'], [self.schroot_name]) + if not have_autodep8: + self.assertEqual(code, 8, err) + self.assertIn('SKIP no tests in this package', out) + return + + # test should succeed + self.assertEqual(code, 0, err) + self.assertRegex(out, 'command1\s+PASS', out) + + @unittest.skipUnless(have_autodep8, + 'autodep8 not installed') + def test_apt_no_autocontrol(self): + '''apt, disable automatic test generation''' + + (code, out, err) = self.adt_run(['--no-auto-control', 'libtest-carp-perl'], [self.schroot_name]) + self.assertEqual(code, 8, err) + self.assertIn('SKIP no tests in this package', out) + @unittest.skipUnless('ADT_TEST_LXC' in os.environ, 'Set $ADT_TEST_LXC to an existing container') diff -Nru autopkgtest-3.15/tests/run_args autopkgtest-3.15.2/tests/run_args --- autopkgtest-3.15/tests/run_args 2015-06-13 17:10:17.000000000 +0000 +++ autopkgtest-3.15.2/tests/run_args 2015-07-03 12:42:13.000000000 +0000 @@ -156,6 +156,7 @@ self.assertEqual(args.shell_fail, True) self.assertEqual(args.timeout_copy, 5) self.assertEqual(args.set_lang, 'en_US.UTF-8') + self.assertEqual(args.auto_control, True) self.assertEqual(acts, [('built-tree', './', False)]) self.assertEqual(virt, ['adt-virt-foo', '-d', '-s', '--', '-d']) @@ -272,6 +273,13 @@ # has virt server self.assertIn('---', out) + def test_no_auto_control(self): + (args, acts, virt) = self.parse( + ['--no-auto-control', './', '---', 'adt-virt-foo']) + self.assertEqual(args.auto_control, False) + self.assertEqual(acts, [('built-tree', './', False)]) + self.assertEqual(virt, ['adt-virt-foo']) + # # Errors # diff -Nru autopkgtest-3.15/tests/testdesc autopkgtest-3.15.2/tests/testdesc --- autopkgtest-3.15/tests/testdesc 2015-06-13 17:10:17.000000000 +0000 +++ autopkgtest-3.15.2/tests/testdesc 2015-07-03 12:42:13.000000000 +0000 @@ -352,9 +352,11 @@ 'Tests: t\n# ♪ ï\nDepends: @, @builddeps@', 'Source: nums\nMaintainer: Üñïcøδ€ \nBuild-Depends: bd1 # moo\n' '# more c☺ mments\n' + ' # intented comment\n' + ' , bd2\n' '\n' 'Package: one\nArchitecture: any') - self.assertEqual(ts[0].depends, ['one (>= 0~)', 'bd1', 'build-essential']) + self.assertEqual(ts[0].depends, ['one (>= 0~)', 'bd1', 'bd2', 'build-essential']) self.assertFalse(skipped) @patch('adtlog.report') diff -Nru autopkgtest-3.15/tools/adt-buildvm-ubuntu-cloud autopkgtest-3.15.2/tools/adt-buildvm-ubuntu-cloud --- autopkgtest-3.15/tools/adt-buildvm-ubuntu-cloud 2015-06-13 17:10:17.000000000 +0000 +++ autopkgtest-3.15.2/tools/adt-buildvm-ubuntu-cloud 2015-07-03 12:42:13.000000000 +0000 @@ -63,7 +63,7 @@ sys.stderr.write('WARNING: python-distro-info not installed, falling ' 'back to determining default release from currently ' 'installed release\n') - if subprocess.call(['which', 'distro-info'], stdout=subprocess.PIPE) == 0: + if subprocess.call(['which', 'lsb_release'], stdout=subprocess.PIPE) == 0: return subprocess.check_output(['lsb_release', '-cs'], universal_newlines=True).strip() @@ -121,11 +121,19 @@ args = parser.parse_args() + # check our dependencies if subprocess.call(['which', args.qemu_command], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) != 0: sys.stderr.write('ERROR: QEMU command %s not found\n' % args.qemu_command) sys.exit(1) + if subprocess.call(['which', 'genisoimage'], stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) != 0: + sys.stderr.write('ERROR: genisoimage not found\n') + sys.exit(1) + if not os.access('/dev/kvm', os.W_OK): + sys.stderr.write('ERROR: no permission to write /dev/kvm\n') + sys.exit(1) return args @@ -301,7 +309,7 @@ qemu.terminate() if qemu.wait() != 0: sys.stderr.write('qemu failed with status %i\n' % qemu.returncode) - # sys.exit(1) + sys.exit(1) def install_image(src, dest): diff -Nru autopkgtest-3.15/tools/adt-setup-vm autopkgtest-3.15.2/tools/adt-setup-vm --- autopkgtest-3.15/tools/adt-setup-vm 2015-06-13 17:10:17.000000000 +0000 +++ autopkgtest-3.15.2/tools/adt-setup-vm 2015-07-03 12:42:13.000000000 +0000 @@ -64,7 +64,7 @@ echo 'GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0"' > \ "$root/etc/default/grub.d/90-autopkgtest.cfg" fi - chroot "$root" update-grub + chroot "$root" update-grub || echo "WARNING: update-grub failed!" fi # set up apt sources @@ -87,9 +87,16 @@ echo 'apt_preserve_sources_list: true' >> "$root/etc/cloud/cloud.cfg" fi +# work around https://bugs.debian.org/788792 +if ! grep -q 'source.*interfaces.d' "$root/etc/network/interfaces"; then + echo "Applying local fix for vmdebootstrap bug https://bugs.debian.org/788792..." + printf "\nsource-directory /etc/network/interfaces.d\n" >> "$root/etc/network/interfaces" +fi + # set up networking if ! grep -qr eth0 "$root/etc/network/interfaces" "$root/etc/network/interfaces.d/"; then - /bin/echo -e '\nauto eth0\niface eth0 inet dhcp' >> "$root"/etc/network/interfaces + mkdir -p "$root/etc/network/interfaces.d" + printf 'auto eth0\niface eth0 inet dhcp\n' >> "$root/etc/network/interfaces.d/eth0" fi # go-faster apt/dpkg diff -Nru autopkgtest-3.15/virt-subproc/adt-virt-qemu.1 autopkgtest-3.15.2/virt-subproc/adt-virt-qemu.1 --- autopkgtest-3.15/virt-subproc/adt-virt-qemu.1 2015-06-13 17:10:17.000000000 +0000 +++ autopkgtest-3.15.2/virt-subproc/adt-virt-qemu.1 2015-07-03 12:42:13.000000000 +0000 @@ -154,7 +154,7 @@ .br --customize=/usr/share/autopkgtest/adt-setup-vm \\ .br - --user=adt/adt --size=10000000000 --image=adt-sid.raw + --user=adt/adt --size=10000000000 --grub --image=adt-sid.raw .br qemu-img convert -O qcow2 adt-sid.raw adt-sid.img .br