-autopkgtest (0.6.0~0iwj-wip0) edgy; urgency=low
+autopkgtest (0.6.0) edgy; urgency=low
- * Work-in-progress for Xen support.
+ * autopkgtest-xenlvm: new package with Xen/LVM management
+ scripts productised. Not yet glued into autopkgtest proper.
- -- Ian Jackson <iwj@ubuntu.com> Tue, 26 Sep 2006 18:05:50 +0100
+ -- Ian Jackson <iwj@ubuntu.com> Fri, 6 Oct 2006 20:45:41 +0100
autopkgtest (0.5.3) dapper; urgency=low
.
You will need a working Xen setup to make use of this software. Your
network administrator will need to provide support for the testbeds'
- networking requirements. See the README for details
+ networking requirements. See the README for documentation.
programs = cleanup setup on-testbed with-testbed
shareprograms = fixups fixups-inside
-sharefiles = readconfig
+sharefiles = readconfig justconfig
exec_prefix = adt-xenlvm-
adt_debootstrap_script <empty string>
Third and fourth arguments to debootstrap.
+adt_setup_hook <config> with _config replaced with
+ _setuphook, as for adt_fw_hook
+ Program to run at last moment before we freeze the image.
+ Will be invoked with one argument: the directory containing
+ the root of the testbed. In the future more arguments may be
+ defined, so the hook script should not fail if more are
+ supplied. The supplied hook value will be split at
+ whitespace before execution as if
+ $adt_setup_hook /path/to/root
+ was run from within a shellscript.
+
---------- Tuning parameters ----------
adt_fs_type ext3
try () { printf "%s\n" "- $*"; "$@" >/dev/null 2>&1 ||:; }
n=0
-while x xm destroy $adt_xmname 2>/dev/null; do
- sleep $n
- n=$(( $n+1 ))
-done
+if xm destroy $adt_xmname 2>/dev/null; then sleep 5; fi
try umount $lvm_baselv_namepath
try dmsetup remove $adt_devmapper_cowdev
rm -f $lvm_fslink_ptr
echo $adt_guest_hostname >/etc/hostname
-perl -i~ -wne '
+essc=/etc/ssh/sshd_config
+perl -wne '
BEGIN {
$pep= PermitEmptyPasswords;
$want= "$pep no\n";
print $want or die $! unless $done;
print $o or die $!;
}
-' /etc/ssh/sshd_config
+' $essc >$essc.new
+mv $essc.new $essc
echo '---)'
#!/bin/bash
set -e
-exec 10>&1 >/dev/null
-. ${ADT_XENLVM_SHARE:=/usr/share/autopkgtest/xenlvm}/readconfig
-exec >&10
-exec 10>&-
+. ${ADT_XENLVM_SHARE:=/usr/share/autopkgtest/xenlvm}/justconfig
while test $# -gt $nonoptargs; do shift; done
ssh $adt_ssh_keyident_args $adt_guest_ipaddr "$@"
ipaddr_from_hostname guest
ipaddr_from_hostname host
-printf "looking for firewall hook ... "
-case "$adt_fw_hook" in
-'')
- case "$adt_config" in
- *_config)
- adt_fw_hook=${adt_config%_config}_fwhook
- if test -e "$adt_fw_hook"; then
- echo "default exists: $adt_fw_hook"
- else
- echo "default $adt_fw_hook is not a file, so: none"
- adt_fw_hook=''
- fi
- ;;
- *)
- echo "not specified, not computable from config, so: none"
- adt_fw_hook=''
- ;;
- esac
- ;;
-*)
- if test -e "$adt_fw_hook"; then
- echo "exists: $adt_fw_hook"
- else
- echo "specified as $adt_fw_hook, but not a file, so: none"
- adt_fw_hook=''
- fi
- ;;
-esac
+search_hook () {
+ eval '
+ printf "looking for '$2' hook ... "
+ case "$adt_'$1'_hook" in
+ "")
+ case "$adt_config" in
+ *_config)
+ adt_'$1'_hook=${adt_config%_config}_'$3'
+ if test -e "$adt_'$1'_hook"; then
+ echo "default exists: $adt_'$1'_hook"
+ else
+ echo "default $adt_'$1'_hook is not a file, so: none"
+ adt_'$1'_hook=""
+ fi
+ ;;
+ *)
+ echo "not specified, not computable from config, so: none"
+ adt_'$1'_hook=""
+ ;;
+ esac
+ ;;
+ *)
+ if test -e "$adt_'$1'_hook"; then
+ echo "exists: $adt_'$1'_hook"
+ else
+ echo "specified as $adt_'$1'_hook, but not a file, so: none"
+ adt_'$1'_hook=""
+ fi
+ ;;
+ esac
+ '
+}
+
+search_hook fw firewall fwhook
+search_hook setup setup setuphook
boolean_config () {
eval '
"$adt_distro" "$adt_play/base" \
"$adt_debootstrap_mirrors" "$adt_debootstrap_script"
-#x pbuilder create \
-# --configfile /usr/share/autopkgtest/xenlvm/pbuilderrc \
-# --distribution "$adt_distro" \
-# --no-targz --buildplace $adt_play/base \
-# $adt_pbuilder_args --debootstrapopts --variant=''
-
$ADT_XENLVM_SHARE/fixups "$@"
echo "
END
fi
+if [ "x$adt_setup_hook" != x ]; then
+ $adt_setup_hook ${adt_play}/base
+fi
+
x umount $lvm_baselv_namepath
mkdir -p ${lvm_fslink_dirpath}
set -e
trap 'exit 127' 0
-
-exec 10>&1 >/dev/null
-. ${ADT_XENLVM_SHARE:=/usr/share/autopkgtest/xenlvm}/readconfig
-exec >&10 10>&-
-
+. ${ADT_XENLVM_SHARE:=/usr/share/autopkgtest/xenlvm}/justconfig
while test $# -gt $nonoptargs; do shift; done
${ADT_XENLVM_SHARE}/cleanup >/dev/null