<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://dev1galaxy.org/extern.php?action=feed&amp;tid=4320&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / autopkgtest qemu test]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=4320</link>
		<description><![CDATA[The most recent posts in autopkgtest qemu test.]]></description>
		<lastBuildDate>Sat, 08 May 2021 09:42:31 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[autopkgtest qemu test]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=29686#p29686</link>
			<description><![CDATA[<p>autopkgtest is a tool for automated tests of Debian derivatives, as explained at<br /><a href="https://www.kali.org/docs/development/contributing-runtime-tests/" rel="nofollow">https://www.kali.org/docs/development/c … ime-tests/</a></p><p>The upstream (Debian/Ubuntu) autopkgtest assumes upstart or systemd as /sbin/init,<br />and some trick is needed to run automated tests on Devuan packages.<br />The following is steps to build a qemu testbed (other methods for running testbeds are lxc and schroot).</p><p>1. Install Devuan Chimaera (I tested only on amd64). Beowulf probably does not work.<br />2. </p><div class="codebox"><pre><code>apt-get install autopkgtest vmdb2 qemu-system-x86 qemu-system-gui qemu-utils ovmf seabios ipxe-qemu dosfstools autodep8 arch-test</code></pre></div><p>3. </p><div class="codebox"><pre><code> autopkgtest-build-qemu --arch amd64 --mirror http://deb.devuan.org/merged --script /root/setup-devuan-autopkgtest.sh --size 25G ceres /var/tmp/ceres-amd64.qcow2</code></pre></div><p> A testbed of Devuan Ceres amd64 is made. This command should produce the following output:</p><div class="quotebox"><blockquote><div><p>Load spec file /tmp/tmprmuimhb9/vmdb2.yaml<br />Exec: [&#039;dpkg&#039;, &#039;--print-architecture&#039;]<br />Exec: [&#039;qemu-img&#039;, &#039;create&#039;, &#039;-f&#039;, &#039;raw&#039;, &#039;/var/tmp/ceres-amd64.qcow2.raw&#039;, &#039;25G&#039;]<br />Exec: [&#039;parted&#039;, &#039;-s&#039;, &#039;/var/tmp/ceres-amd64.qcow2.raw&#039;, &#039;mklabel&#039;, &#039;msdos&#039;]<br />Exec: [&#039;parted&#039;, &#039;-m&#039;, &#039;/var/tmp/ceres-amd64.qcow2.raw&#039;, &#039;print&#039;]<br />Exec: [&#039;parted&#039;, &#039;-s&#039;, &#039;/var/tmp/ceres-amd64.qcow2.raw&#039;, &#039;--&#039;, &#039;mkpart&#039;, &#039;primary&#039;, &#039;ext2&#039;, &#039;0%&#039;, &#039;100%&#039;]<br />Exec: [&#039;parted&#039;, &#039;-m&#039;, &#039;/var/tmp/ceres-amd64.qcow2.raw&#039;, &#039;print&#039;]<br />Exec: [&#039;kpartx&#039;, &#039;-asv&#039;, &#039;/var/tmp/ceres-amd64.qcow2.raw&#039;]<br />remembering /dev/mapper/loop0p1 as root<br />Exec: [&#039;/sbin/mkfs&#039;, &#039;-t&#039;, &#039;ext4&#039;, &#039;/dev/mapper/loop0p1&#039;]<br />Exec: [&#039;mount&#039;, &#039;/dev/mapper/loop0p1&#039;, &#039;/tmp/tmpqwh8w58o&#039;]<br />Exec: [&#039;debootstrap&#039;, &#039;--variant&#039;, &#039;-&#039;, &#039;ceres&#039;, &#039;/tmp/tmpqwh8w58o&#039;, &#039;<a href="http://deb.devuan.org/merged" rel="nofollow">http://deb.devuan.org/merged</a>&#039;]<br />Exec: [&#039;chroot&#039;, &#039;/tmp/tmpqwh8w58o&#039;, &#039;apt-get&#039;, &#039;update&#039;]<br />Exec: [&#039;chroot&#039;, &#039;/tmp/tmpqwh8w58o&#039;, &#039;apt-get&#039;, &#039;update&#039;]<br />Exec: [&#039;chroot&#039;, &#039;/tmp/tmpqwh8w58o&#039;, &#039;apt-get&#039;, &#039;-y&#039;, &#039;--no-show-progress&#039;, &#039;install&#039;, &#039;eatmydata&#039;]<br />Exec: [&#039;chroot&#039;, &#039;/tmp/tmpqwh8w58o&#039;, &#039;eatmydata&#039;, &#039;apt-get&#039;, &#039;update&#039;]<br />Exec: [&#039;chroot&#039;, &#039;/tmp/tmpqwh8w58o&#039;, &#039;eatmydata&#039;, &#039;apt-get&#039;, &#039;-y&#039;, &#039;--no-show-progress&#039;, &#039;install&#039;, &#039;linux-image-amd64&#039;, &#039;ifupdown&#039;]<br />Exec: [&#039;chroot&#039;, &#039;/tmp/tmpqwh8w58o&#039;, &#039;apt-get&#039;, &#039;clean&#039;]<br />Installing GRUB for BIOS<br />Exec: [&#039;mount&#039;, &#039;--bind&#039;, &#039;/dev&#039;, &#039;/tmp/tmpqwh8w58o/dev&#039;]<br />Exec: [&#039;mount&#039;, &#039;--bind&#039;, &#039;/sys&#039;, &#039;/tmp/tmpqwh8w58o/sys&#039;]<br />Exec: [&#039;mount&#039;, &#039;--bind&#039;, &#039;/proc&#039;, &#039;/tmp/tmpqwh8w58o/proc&#039;]<br />Exec: [&#039;chroot&#039;, &#039;/tmp/tmpqwh8w58o&#039;, &#039;apt-get&#039;, &#039;-y&#039;, &#039;--no-show-progress&#039;, &#039;install&#039;, &#039;grub-pc&#039;]<br />Exec: [&#039;chroot&#039;, &#039;/tmp/tmpqwh8w58o&#039;, &#039;grub-mkconfig&#039;, &#039;-o&#039;, &#039;/boot/grub/grub.cfg&#039;]<br />Exec: [&#039;chroot&#039;, &#039;/tmp/tmpqwh8w58o&#039;, &#039;grub-install&#039;, &#039;--target=i386-pc&#039;, &#039;--no-nvram&#039;, &#039;--force-extra-removable&#039;, &#039;--no-floppy&#039;, &#039;--modules=part_msdos part_gpt&#039;, &#039;--grub-mkdevicemap=/boot/grub/device.map&#039;, &#039;/dev/loop0&#039;]<br />Exec: [&#039;chroot&#039;, &#039;/tmp/tmpqwh8w58o&#039;, &#039;sh&#039;, &#039;-ec&#039;, &quot;passwd --delete root\nuseradd --home-dir /home/user --create-home user\npasswd --delete user\necho host &gt; /etc/hostname\necho &#039;127.0.1.1\thost&#039; &gt;&gt; /etc/hosts&quot;]<br />Exec: [&#039;sh&#039;, &#039;-ec&#039;, &#039;rootdev=$(ls -1 /dev/mapper/loop* | sort | tail -1)\nuuid=$(blkid -c /dev/null -o value -s UUID &quot;$rootdev&quot;)\necho &quot;UUID=$uuid / ext4 errors=remount-ro 0 1&quot; &gt; &quot;$ROOT/etc/fstab&quot;&#039;]<br />Exec: [&#039;sh&#039;, &#039;-ec&#039;, &#039;/usr/share/autopkgtest/setup-commands/setup-testbed &quot;$ROOT&quot;&#039;]<br />Exec: [&#039;sh&#039;, &#039;-ec&#039;, &#039;/root/setup-devuan-autopkgtest.sh &quot;$ROOT&quot;&#039;]<br />Exec: [&#039;kpartx&#039;, &#039;-dsv&#039;, &#039;/var/tmp/ceres-amd64.qcow2.raw&#039;]<br />All went fine.</p></div></blockquote></div><p>4. Run test scripts in a selected package on the made testbed, e.g. </p><div class="codebox"><pre><code> autopkgtest -u user -B gpsd  -- qemu /var/tmp/ceres-amd64.qcow2 </code></pre></div><p>.</p><p>The script <span class="bbc">setup-devuan-autopkgtest.sh</span> in Step 3 is</p><div class="quotebox"><blockquote><div><p>#!/bin/sh<br />chroot $1 apt-get -q -y update<br />chroot $1 apt-get -q -y --purge --autoremove install sysvinit-core sysvinit sysvinit-utils sysv-rc init initscripts devuan-keyring debian-keyring gpg libpam-elogind eudev<br />echo &#039;S0:2345:respawn:/sbin/getty -L ttyS0 115200 vt100&#039; &gt;&gt;$1/etc/inittab</p></div></blockquote></div>]]></description>
			<author><![CDATA[dummy@example.com (emojifreak)]]></author>
			<pubDate>Sat, 08 May 2021 09:42:31 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=29686#p29686</guid>
		</item>
	</channel>
</rss>
