Autopkgtest
LXC
Ubuntu
QEMU
$ sudo apt install lxc-templates lxc lxc-utils autopkgtest
$ MIRROR=http://tw.archive.ubuntu.com/ubuntu/ \
sudo autopkgtest-build-lxc ubuntu bionic amd64 auto.sh \
# 可以使用自己準備的 auto.sh 來設定環境
$ apt source file
$ sudo autopkgtest file_5.38-4.dsc -- lxc autopkgtest-bionic-amd64
$ sudo autopkgtest file_5.38-4.dsc --summary-file=summary.log \
--log-file=complete.log -- lxc autopkgtest-bionic-amd64 # 另存紀錄
$ sudo lxc-destroy -n autopkgtest-bionic-amd64
$ sudo apt install lxd
$ autopkgtest-build-lxd images:ubuntu/bionic/amd64
$ sudo autopkgtest file_5.38-4.dsc -- lxd autopkgtest/ubuntu/bionic/amd64
$ sudo apt install vmdb2 --no-install-recommends
$ autopkgtest-build-qemu
usage: /usr/bin/autopkgtest-build-qemu [<options...>] <release> <image> [<mirror>] [<architecture>] [<script>] [<size>]
--apt-proxy=http://PROXY:PORT Set apt proxy [default: auto]
--arch=ARCH, --architecture=ARCH Set architecture, e.g. i386
[default: amd64]
--mirror=URL Set apt mirror [default:
http://deb.debian.org/debian]
--script=SCRIPT Run an extra customization script
--size=SIZE Set image size [default: 25G]
$ sudo vi /usr/lib/python3/dist-packages/vmdb/plugins/grub_plugin.py +174
# '--force-extra-removable',
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=951766
$ sudo vi /usr/lib/python3/dist-packages/vmdb/plugins/debootstrap_plugin.py +44
vmdb.runcmd(['debootstrap', '--components=main,universe', '--variant', variant, suite, target, mirror])
# https://paste.ubuntu.com/p/psV77MzHbq/
$ sudo autopkgtest-build-qemu bionic ~/ubuntu-bionic.img \
--arch=amd64 \
--mirror=http://tw.archive.ubuntu.com/ubuntu \
--size=8G \
--script=$(readlink -f auto.sh)
$ sudo autopkgtest file_5.38-4.dsc -- qemu ~/ubuntu-bionic.img
sudo lxc-create -t ubuntu -n temporary -- --mirror http://mirror01.idc.hinet.net/ubuntu --flush-cache
當中的 –flush-cache 來將 mirror site 改動一下$ sudo lxc-ls -f
NAME STATE AUTOSTART GROUPS IPV4 IPV6 UNPRIVILEGED
autopkgtest-bionic-amd64 STOPPED 0 - - - false
autopkgtest-focal-amd64 STOPPED 0 - - - false
autopkgtest-lxc-aazmgf RUNNING 0 - 10.0.3.102 - false
我實際遇過 autopkgtest-lxc-aazmgf 引起問題
https://people.debian.org/~mpitt/autopkgtest/README.running-tests.html
https://people.debian.org/~mpitt/autopkgtest/README.package-tests.html
https://autopkgtest.ubuntu.com/
https://ci.debian.net/
https://wiki.debian.org/ContinuousIntegration/autopkgtest
https://packaging.ubuntu.com/html/auto-pkg-test.html
https://ci.debian.net/doc/file.TUTORIAL.html
https://kali.org/docs/development/contributing-runtime-tests/