Changeset 517 for devel/pb/bin/pb


Ignore:
Timestamp:
Aug 7, 2008, 2:34:22 PM (11 years ago)
Author:
Bruno Cornec
Message:
  • Fix for fedora VM setups
  • Support for ntp server added to avoid time sync issues in VMs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r512 r517  
    15531553        my $keyfile = pb_ssh_get(1);
    15541554       
    1555         my ($vmhost,$vmport) = pb_conf_get("vmhost","vmport");
     1555        my ($vmhost,$vmport,$vmntp) = pb_conf_get("vmhost","vmport","vmntp");
    15561556        my $nport = $vmport->{$ENV{'PBPROJ'}};
    15571557        $nport = "$pbport" if (defined $pbport);
     
    15831583use strict;
    15841584use File::Copy;
     1585
     1586# We should not need in this script more functions than what is provided
     1587# by Base and Distribution to avoid problems at exec time.
     1588# They are appended at the end.
    15851589
    15861590our $pbdebug;
     
    16021606my $count = 0;
    16031607while (<PBFILE>) {
     1608
    16041609EOF
    16051610        print SCRIPT << "EOF";
     
    16131618rename("\$file1.new",\$file1);
    16141619chmod 0600,\$file1;
     1620
     1621# Sync date
     1622pb_system("/usr/sbin/ntpdate \$vmntp->{'PBPRROJ'}","Syncing date to \$vmntp{'PBPRROJ'}");
     1623
    16151624EOF
    16161625    }
     
    17221731}
    17231732
    1724 # Sync date
    1725 #system "/usr/sbin/ntpdate ntp.pool.org";
    1726 
    17271733pb_system("rm -rf perl-ProjectBuilder-* ; wget --passive-ftp ftp://ftp.mondorescue.org/src/perl-ProjectBuilder-latest.tar.gz ; tar xvfz perl-ProjectBuilder-latest.tar.gz ; cd perl-ProjectBuilder-* ; perl Makefile.PL ; make ; make install ; cd .. ; rm -rf perl-ProjectBuilder-* ; rm -rf project-builder-* ; wget --passive-ftp ftp://ftp.mondorescue.org/src/project-builder-latest.tar.gz ; tar xvfz project-builder-latest.tar.gz ; cd project-builder-* ; perl Makefile.PL ; make ; make install ; cd .. ; rm -rf project-builder-* ;","Building Project-Builder");
    17281734system "pb 2>&1 | head -5";
    17291735EOF
    1730     # Adds pb_distro_init from ProjectBuilder::Distribution
     1736    # Adds pb_distro_init from ProjectBuilder::Distribution and Base
    17311737    foreach my $d (@INC) {
    17321738        my @f = ("$d/ProjectBuilder/Base.pm","$d/ProjectBuilder/Distribution.pm");
     
    17971803    }
    17981804
    1799     pb_system("yum -y $opt install rpm-build wget patch ntp sudo perl-DateManip perl-File-MimeInfo perl-ExtUtils-MakeMaker perl-Mail-Sendmail perl-Locale-gettext",$cmtall);
    18001805    if ($dver eq 4) {
     1806        pb_system("yum -y $opt install rpm-build wget patch ntp sudo perl-DateManip perl-ExtUtils-MakeMaker",$cmtall);
    18011807        pb_system("$insmb","$cmtmb");
    18021808        pb_system("$insfm","$cmtfm");
    18031809        pb_system("$insfb","$cmtfb");
     1810        pb_system("$insms","$cmtms");
     1811        pb_system("$inslg","$cmtlg");
     1812    } else {
     1813        pb_system("yum -y $opt install rpm-build wget patch ntp sudo perl-DateManip perl-ExtUtils-MakeMaker perl-File-MimeInfo perl-Mail-Sendmail",$cmtall);
    18041814        pb_system("$inslg","$cmtlg");
    18051815    }
Note: See TracChangeset for help on using the changeset viewer.