Changeset 2387 in /cluster/svnroot


Ignore:
Timestamp:
May 1, 2010 8:34:55 PM (11 years ago)
Author:
skylar
Message:

merging in versioned minirt (#501)

Location:
bccd-ng/trunk
Files:
1 deleted
2 edited
17 copied

Legend:

Unmodified
Added
Removed
  • bccd-ng/trunk/bin/build_livecd.pl

    r2362 r2387  
    8484Readonly my $LIBFETCH   => "/root/liberate";
    8585$ENV{'DEBIAN_FRONTEND'} = "noninteractive";
    86 Readonly my $PACKAGES   => "screen openssh-client openssh-server less make gcc-4.2 g++-4.2 flex bison gdb alien lsb-rpm cvs bzip2 sudo yum debootstrap rsync dhcp3-server tftpd-hpa tcpdump syslinux syslinux-common subversion nfs-common nfs-kernel-server ncurses-base ncurses-bin libncurses5 libncurses5-dev psmisc vim iproute pciutils host bc ntp ntpdate debconf-utils dhcpcd rsh-client rsh-server xbase-clients libxt-dev lesstif2 lesstif2-dev ipcalc dialog lvm2 grub parted tzdata xserver-xorg-video-fbdev xfonts-100dpi xfonts-75dpi xfonts-scalable xserver-xorg-video-all fontconfig xfonts-base gpm udev vtwm aterm rxvt xbase-clients menu bbkeys libwww-mechanize-perl postgresql-client-common postgresql-client-8.3 libdbi-perl libdbd-pg-perl strace tcsh libnet-dhcp-perl libnetaddr-ip-perl libnet-ip-perl libstdc++5 pdnsd csh libterm-readkey-perl libsvn-perl libui-dialog-perl libreadonly-perl sshfs autofs libnet-dhcp-perl dnsutils libfile-touch-perl libnet-cidr-perl arping dosfstools gawk dc glutg3-dev libxi-dev wireless-tools snmp snmpd netpbm imagemagick";
     86Readonly my $PACKAGES   => "screen openssh-client openssh-server less make gcc-4.2 g++-4.2 flex bison gdb alien lsb-rpm cvs bzip2 sudo yum debootstrap rsync dhcp3-server tftpd-hpa tcpdump syslinux syslinux-common subversion nfs-common nfs-kernel-server ncurses-base ncurses-bin libncurses5 libncurses5-dev psmisc vim iproute pciutils host bc ntp ntpdate debconf-utils dhcpcd rsh-client rsh-server xbase-clients libxt-dev lesstif2 lesstif2-dev ipcalc dialog lvm2 grub parted tzdata xserver-xorg-video-fbdev xfonts-100dpi xfonts-75dpi xfonts-scalable xserver-xorg-video-all fontconfig xfonts-base gpm udev vtwm aterm rxvt xbase-clients menu bbkeys libwww-mechanize-perl postgresql-client-common postgresql-client-8.3 libdbi-perl libdbd-pg-perl strace tcsh libnet-dhcp-perl libnetaddr-ip-perl libnet-ip-perl libstdc++5 pdnsd csh libterm-readkey-perl libsvn-perl libui-dialog-perl libreadonly-perl sshfs autofs libnet-dhcp-perl dnsutils libfile-touch-perl libnet-cidr-perl arping dosfstools gawk dc glutg3-dev libxi-dev wireless-tools snmp snmpd netpbm imagemagick libyaml-perl";
    8787Readonly my $EXTRA_PACKAGES => "fftw2 fftw-dev sfftw-dev sfftw2 automake1.7 console-tools libreadline5-dev hal libxmu-headers libxmu-dev gfortran ethtool libssl0.9.8 libblas-dev libblas-dev atlas3-base atlas3-base-dev atlas3-base refblas3 lapack3 atlas3-test libg2c0-dev libg2c0 apache2 iceweasel xpdf octave3.0 ruby sl robotfindskitten pvm xpvm emacs grac blender automake1.9 libtool libglu1-mesa-dev minicom lcd4linux insight joe grace libxpm-dev telnet lsof xresprobe fbset fluxbox xgalaga zenmap nedit eterm";
    8888Readonly my $BAD_PACKAGES   => ""; # Packages that throw some fatal error during install but still work
     
    11661166    "",
    11671167    "Unmounted $BUILDDIR/proc.",
    1168     "umount -f $BUILDDIR/proc",
     1168    "umount -l $BUILDDIR/proc",
    11691169    );
    11701170
     
    11831183    "$websvn/trees/KNOPPIX/",
    11841184    );
     1185
     1186$Bccd->run_test(
     1187        "revfetch",
     1188        "",
     1189        "Fetched minirt device configuration.",
     1190        $svnrev,
     1191        "$websvn/packages/mknod.y",
     1192        "$tmpdir/mknod.y",
     1193        );
     1194
     1195$Bccd->run_test(
     1196        "mknods",
     1197        "",
     1198        "Created minirt device nodes.",
     1199        "$tmpdir/mknod.y",
     1200        "$tmpdir/KNOPPIX/boot/isolinux/minirt",
     1201        );
     1202
     1203$Bccd->run_test(
     1204        "system",
     1205        "",
     1206        "Created minirt filesystem.",
     1207        "dd if=/dev/zero of=$tmpdir/minirt bs=1M count=4",
     1208        );
     1209
     1210$Bccd->run_test(
     1211        "system",
     1212        "",
     1213        "Made ext2 filesystem in minirt filesystem.",
     1214        "/sbin/mke2fs -F $tmpdir/minirt",
     1215        );
     1216
     1217$Bccd->run_test(
     1218        "system",
     1219        "",
     1220        "Set minirt fsck and reserved settings.",
     1221        "/sbin/tune2fs -c 0 -i 0 -m 0 $tmpdir/minirt",
     1222        );
     1223
     1224$Bccd->run_test(
     1225        "mkpath",
     1226        "",
     1227        "Made loop directory.",
     1228        "$tmpdir/loop",
     1229        );
     1230
     1231$Bccd->run_test(
     1232        "system",
     1233        "",
     1234        "Mounted minirt on loop directory.",
     1235        "/bin/mount -t ext2 -o loop $tmpdir/minirt $tmpdir/loop",
     1236        );
     1237
     1238$Bccd->run_test(
     1239        "system",
     1240        "",
     1241        "Copied minirt into loop filesystem.",
     1242        "rsync -a $tmpdir/KNOPPIX/boot/isolinux/minirt/ $tmpdir/loop/",
     1243        );
     1244
     1245$Bccd->run_test(
     1246        "system",
     1247        "",
     1248        "Unmounted loop filesystem.",
     1249        "umount $tmpdir/loop/",
     1250        );
     1251
     1252$Bccd->run_test(
     1253        "rmtree",
     1254        "",
     1255        "Removed minirt tree.",
     1256        "$tmpdir/KNOPPIX/boot/isolinux/minirt/",
     1257        );
     1258
     1259$Bccd->run_test(
     1260        "system",
     1261        "",
     1262        "Placed minirt in KNOPPIX tree.",
     1263        "gzip -c $tmpdir/minirt > $tmpdir/KNOPPIX/boot/isolinux/minirt.gz",
     1264        );
    11851265
    11861266$Bccd->run_test(
  • bccd-ng/trunk/trees/usr/local/lib/site_perl/5.10.0/Bccd.pm

    r2334 r2387  
    2020use Errno qw(:POSIX);
    2121use Fcntl ':mode';
     22use YAML qw/LoadFile/;
    2223
    2324my $passed = 0;
     
    446447}
    447448
     449sub test_read_yaml{
     450        my($self,$type,$okrc,$msg,$file) = @_;
     451        my $sub = 'test_read_yaml';
     452
     453        $self->enter_sub($sub);
     454
     455        if(! -f $file) {
     456                $self->log_and_die("ERROR",$sub,"Cannot read in $file");
     457        }
     458
     459        if($self->is_log($INFO) || $self->is_log($DEBUG)) {
     460                $self->log_and_cont("INFO",$sub,"Reading in: $file");
     461        }
     462        my $y = LoadFile($file);
     463        if($self->is_log($INFO) || $self->is_log($DEBUG)) {
     464                $self->log_and_cont("INFO",$sub,"Read in:".Dumper($y));
     465        }
     466
     467        $self->leave_sub($sub);
     468        return $y;
     469}
     470
     471sub test_mknods{
     472        my($self,$type,$okrc,$msg,$file,$base) = @_;
     473        my($rc,$out);
     474        my $sub = 'test_mknods';
     475
     476        $self->enter_sub($sub);
     477
     478        my $y = $self->test_read_yaml($type,$okrc,"Reading mknod configuration from $file.",$file);
     479        if(!defined($y)) {
     480                $self->log_and_die("ERROR",$sub,"Can't proceeded with invalid configuration.");
     481        }
     482
     483        foreach my $d (keys(%{$y})) {
     484                my $cmd = "/bin/mknod $base/$d $y->{$d}->{type} $y->{$d}->{major} $y->{$d}->{minor}";
     485        if($self->is_log($INFO) || $self->is_log($DEBUG)) {
     486            $self->log_and_cont("INFO",$sub,"Running $cmd");
     487        }
     488
     489                ($rc,$out) = $self->exec_system($cmd);
     490                if($rc) {
     491                        $self->log_and_die("$cmd failed with $rc, out $out");
     492                }
     493        }
     494
     495        $self->leave_sub($sub);
     496        return 0;
     497}
     498
    448499sub test_rm_lvm( $$$$ ) {
    449500    my($self,$type,$okrc,$msg) = @_;
     
    13001351        $rc = $self->test_regexsub_file($type,$okrc,$msg,$cmds[0],$cmds[1],$cmds[2]);
    13011352    }
     1353        elsif($type =~ m/^read_yaml$/) {
     1354                if( $#cmds != 0 ) {
     1355                        $self->cmd_num_die(@cmds);
     1356                }
     1357                $rc = $self->test_read_yaml($type,$okrc,$msg,$cmds[0]);
     1358        }
     1359        elsif($type =~ m/^mknods$/) {
     1360                if( $#cmds != 1 ) {
     1361                        $self->cmd_num_die(@cmds);
     1362                }
     1363                $rc = $self->test_mknods($type,$okrc,$msg,$cmds[0],$cmds[1]);
     1364        }
    13021365    else {
    13031366        $self->log_and_die("ERROR",$sub,"This is an undefined test: $type!");
Note: See TracChangeset for help on using the changeset viewer.