From: Ian Jackson Date: Tue, 16 Oct 2012 17:40:38 +0000 (+0100) Subject: wip reorg continuing with config etc. X-Git-Tag: wip.xsm-13-actual.base~476^2~89^2~34 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5b5aa07cf17f22490f691bd1e548412c4b7082ec;p=people%2Fiwj%2Fosstest.git wip reorg continuing with config etc. --- diff --git a/Osstest.pm b/Osstest.pm index bf3ade1b..fc9633a9 100644 --- a/Osstest.pm +++ b/Osstest.pm @@ -54,6 +54,10 @@ our %c = qw( HostDiskSwap 2000 Baud 115200 + + Tftp /tftpboot/pxe + + DebianNonfreeFirmware firmware-bnx2 ); #---------- general setup and config reading ---------- @@ -126,12 +130,13 @@ sub readglobalconfig () { $c{TestHostDomain} ||= $c{DnsDomain}; + my $whoami = `whoami` or die $!; + chomp($whoami) or die; + $c{WebspaceFile} ||= "$ENV{'HOME'}/public_html/"; if (!$c{WebspaceUrl}) { my $nodename = `uname -n` or die $!; - my $whoami = `whoami` or die $!; chomp($nodename) or die; - chomp($whoami) or die; $c{WebspaceUrl} = "http://$nodename.$c{DnsDomain}/~$whoami/"; } $c{WebspaceCommon} ||= 'osstest/'; @@ -139,6 +144,9 @@ sub readglobalconfig () { $c{OverlayLocal} ||= "overlay-local"; $c{GuestDebianSuite} ||= $c{DebianSuite}; + + $c{PxeDiBase} ||= "$whoami/osstest/debian-installer"; + $c{PxeDiVersion} ||= 'current'; } sub augmentconfigdefaults { diff --git a/config.pl b/config.pl index 3bc53cd5..34559bde 100644 --- a/config.pl +++ b/config.pl @@ -3,10 +3,7 @@ $c{SerialLogPattern}= '/root/sympathy/%host%.log*'; -$c{Tftp}= '/tftpboot/pxe'; -$c{PxeDiBase}= 'osstest/debian-installer'; -$c{PxeDiVersion}= '2012-01-30-squeeze'; 1; diff --git a/mg-debian-installer-update b/mg-debian-installer-update index 6007e00c..9657a23f 100755 --- a/mg-debian-installer-update +++ b/mg-debian-installer-update @@ -3,6 +3,8 @@ # ./mg-debian-installer-update lenny i386 'firmware-bnx2 firmware-spong' set -e +. cri-getconfig + suite=$1 arch=$2 packages="$3" @@ -16,7 +18,7 @@ src=$sbase/main/installer-$arch/current/images/netboot/debian-installer/$arch pfile=$sbase/non-free/binary-$arch/Packages.bz2 files='initrd.gz linux' -dstroot=/tftpboot/pxe/osstest/debian-installer/ +dstroot=`getconfig Tftp`/`getconfig PxeDiBase`/ date=`date +%Y-%m-%d`-$suite dst=$arch/$date diff --git a/standalone-reset b/standalone-reset index e6bea519..b98fea8d 100755 --- a/standalone-reset +++ b/standalone-reset @@ -55,6 +55,27 @@ mkdir -p "$overlay"/etc/ssh ensure_key "$overlay"/etc/ssh/ssh_host_rsa_key -t rsa -b 1024 ensure_key "$overlay"/etc/ssh/ssh_host_dsa_key -t dsa +#---------- ensuring we can update pxe files and have d-i ---------- + +tftp=`getconfig Tftp` +if ! test -d "$tftp"; then + echo >&2 'Need Tftp config variable pointing to tftp server'; exit 1 +fi + +dibase=`getconfig PxeDiBase` +diver=`getconfig PxeDiVersion` +suite=`getconfig DebianSuite` +firmware=`getconfig DebianNonfreeFirmware` + +if [ "x$diver" = xcurrent ]; then + for arch in i386 amd64; do + if test -d "$tftp/$dibase/$arch/$diver"; then continue; fi + mkdir -p "$tftp/$dibase/$arch" + echo "** need to generate d-i with firmware for $arch" + ./mg-debian-installer-update $suite $arch $firmware + done +fi + #---------- making the database with a flight and some jobs ---------- branch=xen-unstable