From: Michael Prokop Date: Tue, 15 Oct 2019 08:24:47 +0000 (+0200) Subject: Merge remote-tracking branch 'origin/pr/20' X-Git-Tag: v0.16.7~5 X-Git-Url: https://git.grml.org/?p=grml2usb.git;a=commitdiff_plain;h=dbbca970b2878bdb1882a83a5ab30d97727d2590;hp=4d8590139404c9c50cce70acc2d1d20b13cadb98 Merge remote-tracking branch 'origin/pr/20' --- diff --git a/debian/control b/debian/control index 0c5aa38..0382eef 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,8 @@ Vcs-Browser: https://git.grml.org/?p=grml2usb.git Package: grml2usb Architecture: amd64 i386 -Depends: mtools, +Depends: kmod, + mtools, python, python-parted, rsync, diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..c6aeeed --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,21 @@ +Tests: smoke-grml2usb-py2 +Depends: dosfstools, + kpartx, + isolinux, + python2, + syslinux, + syslinux-common, + xorriso, + @ +Restrictions: needs-root, isolation-machine, breaks-testbed + +Tests: smoke-grml2usb-py3 +Depends: dosfstools, + kpartx, + isolinux, + python2, + syslinux, + syslinux-common, + xorriso, + @ +Restrictions: needs-root, isolation-machine, breaks-testbed diff --git a/debian/tests/smoke-grml2usb-py2 b/debian/tests/smoke-grml2usb-py2 new file mode 100755 index 0000000..67b45d1 --- /dev/null +++ b/debian/tests/smoke-grml2usb-py2 @@ -0,0 +1,36 @@ +#!/bin/bash +exec 2>&1 +set -ex + +TMPDIR=$(mktemp -d) +LODEV=$(losetup -f) +cleanup() { + kpartx -d "$LODEV" || true + losetup -d "$LODEV" || true + rm -rf "$TMPDIR" +} +trap cleanup EXIT + +mkdir "$TMPDIR"/isoroot "$TMPDIR"/isoroot/boot "$TMPDIR"/isoroot/boot/isolinux +cp /usr/lib/ISOLINUX/isolinux.bin "$TMPDIR"/isoroot/boot/isolinux/ +echo 'FAKE' > "$TMPDIR"/isoroot/grml-version +echo 'LOGO' > "$TMPDIR"/isoroot/boot/logo.16 +touch "$TMPDIR"/isoroot/boot/isolinux/FAKE_default.cfg +touch "$TMPDIR"/isoroot/boot/isolinux/FAKE_grml.cfg +touch "$TMPDIR"/isoroot/boot/isolinux/hidden.cfg +xorriso -as mkisofs -l -r -J -no-pad -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -o "$TMPDIR"/fake.iso "$TMPDIR"/isoroot +xorriso -dev "$TMPDIR"/fake.iso -ls + +dd if=/dev/zero of="$TMPDIR"/blockdev bs=1M count=50 + +sfdisk "$TMPDIR"/blockdev <&1 +set -ex + +TMPDIR=$(mktemp -d) +LODEV=$(losetup -f) +cleanup() { + kpartx -d "$LODEV" || true + losetup -d "$LODEV" || true + rm -rf "$TMPDIR" +} +trap cleanup EXIT + +mkdir "$TMPDIR"/isoroot "$TMPDIR"/isoroot/boot "$TMPDIR"/isoroot/boot/isolinux +cp /usr/lib/ISOLINUX/isolinux.bin "$TMPDIR"/isoroot/boot/isolinux/ +echo 'FAKE' > "$TMPDIR"/isoroot/grml-version +echo 'LOGO' > "$TMPDIR"/isoroot/boot/logo.16 +touch "$TMPDIR"/isoroot/boot/isolinux/FAKE_default.cfg +touch "$TMPDIR"/isoroot/boot/isolinux/FAKE_grml.cfg +touch "$TMPDIR"/isoroot/boot/isolinux/hidden.cfg +xorriso -as mkisofs -l -r -J -no-pad -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -o "$TMPDIR"/fake.iso "$TMPDIR"/isoroot +xorriso -dev "$TMPDIR"/fake.iso -ls + +dd if=/dev/zero of="$TMPDIR"/blockdev bs=1M count=50 + +sfdisk "$TMPDIR"/blockdev <