]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
wip reorg continuing with config etc.
authorIan Jackson <iwj@woking.cam.xci-test.com>
Tue, 16 Oct 2012 17:40:38 +0000 (18:40 +0100)
committerIan Jackson <iwj@woking.cam.xci-test.com>
Tue, 16 Oct 2012 17:40:38 +0000 (18:40 +0100)
Osstest.pm
config.pl
mg-debian-installer-update
standalone-reset

index bf3ade1b577ab75f91bbdfd099cbfc77b5b3b955..fc9633a96227a60f2046383631743de2077ef26c 100644 (file)
@@ -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 {
index 3bc53cd50810c0aa21a8ad9c4c471aa8a9e2115f..34559bdea6ab15c6e95f00bb06e138b77c2faf63 100644 (file)
--- 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;
index 6007e00ce7a6f77402907e71c306030cf6fdebf3..9657a23f1ec32bb928e540343d78f39ec5f72832 100755 (executable)
@@ -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
 
index e6bea51984facbaeeb5e0b9be44c641fa7575359..b98fea8d4240803a06f9fd8293ed6cea86101ec6 100755 (executable)
@@ -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