Changeset 2499 in /cluster/svnroot


Ignore:
Timestamp:
Jun 26, 2010 12:16:42 PM (10 years ago)
Author:
skylar
Message:

merging in file::temp fix (#512)

File:
1 edited

Legend:

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

    r2477 r2499  
    1515use Readonly;
    1616
     17$ENV{LANGUAGE} = "C";
     18$ENV{LC_ALL} = "C";
     19$ENV{LANG} = "C";
     20
    1721my %opts;
    1822
     
    5660}
    5761
    58 if( $opts{'nocleanup'} ) {
    59     $tmpdir = $ft->tempdir('$PROJECT',DIR => $dir,CLEANUP => 0);
    60 } else {
    61     $tmpdir = $ft->tempdir('$PROJECT',DIR => $dir,CLEANUP => 1);
    62 }
     62if(defined($opts{'nocleanup'})) {
     63        $ft = File::Temp->newdir("/tmp/$PROJECT.XXXXXXX",CLEANUP => 0);
     64}
     65else {
     66        $ft = File::Temp->newdir("/tmp/$PROJECT.XXXXXXX",DIR=>$dir,CLEANUP => 1);
     67}
     68$tmpdir = $ft->dirname();
     69
    6370$Bccd = new Bccd();
    6471
     
    8491Readonly my $LIBFETCH   => "/root/liberate";
    8592$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 libyaml-perl";
     93Readonly my $PACKAGES   => "screen openssh-client openssh-server less make gcc-4.2 g++-4.2 flex bison gdb alien lsb-rpm bzip2 sudo yum debootstrap rsync dhcp3-server 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 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 tcl8.4 libc6-i386";
    8794Readonly 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";
    8895Readonly my $BAD_PACKAGES   => ""; # Packages that throw some fatal error during install but still work
     
    150157    "",
    151158    "Mounted /proc into $BUILDDIR.",
    152     "mount -t proc proc $BUILDDIR/proc",
     159    "mount -t proc none $BUILDDIR/proc",
     160    );
     161
     162$Bccd->run_test(
     163    "system",
     164    "",
     165    "Mounted /sys into $BUILDDIR.",
     166    "mount -t sysfs none $BUILDDIR/sys",
    153167    );
    154168
     
    456470    );
    457471
    458 $Bccd->run_test(
    459     "system",
    460     "0",
    461     "Fetched Debian packages.",
    462     "/usr/sbin/chroot $BUILDDIR aptitude -y install $PACKAGES $EXTRA_PACKAGES",
     472if($opts{'arch'} eq 'i386') {
     473        $Bccd->run_test(
     474            "system",
     475            "0",
     476            "Fetched Debian packages.",
     477            "/usr/sbin/chroot $BUILDDIR /usr/bin/aptitude --allow-untrusted -y install $PACKAGES $EXTRA_PACKAGES",
     478            );
     479}
     480elsif($opts{'arch'} eq 'amd64') {
     481        $Bccd->run_test(
     482            "system",
     483            "0",
     484            "Fetched Debian packages.",
     485            "/usr/sbin/chroot $BUILDDIR aptitude --allow-untrusted -y install $PACKAGES $EXTRA_PACKAGES $AMD64_PACKAGES",
     486            );
     487}
     488
     489# Workaround for tftpd-hpa/inetd conflict
     490$Bccd->run_test(
     491    "system",
     492    "",
     493    "Removing inetutils-inetd to avoid conflict with tftpd-hpa.",
     494    "/usr/sbin/chroot $BUILDDIR /usr/bin/dpkg -r inetutils-inetd",
     495    );
     496
     497$Bccd->run_test(
     498    "system",
     499    100,
     500    "Fetching tftpd-hpa separately.",
     501    "/usr/sbin/chroot $BUILDDIR /usr/bin/apt-get --force-yes -y install tftpd-hpa",
    463502    );
    464503
     
    570609    "$svnrev",
    571610    );
    572 
    573 # PAM fetch
    574 foreach my $file ( "rlogin", "rsh" ) {
    575     $Bccd->run_test(
    576         "revfetch",
    577         "",
    578         "Fetched /etc/pam.d/$file file.",
    579         $svnrev,
    580         "$websvn/packages/etc/pam.d/$file",
    581         "$BUILDDIR/etc/pam.d/$file",
    582         );
    583 }
    584611
    585612# Install software
     
    13471374}
    13481375
     1376chdir $ENV{'HOME'};
     1377
    13491378exit $Bccd->get_total()-$Bccd->get_passed();
    13501379
Note: See TracChangeset for help on using the changeset viewer.