Changeset 498 for devel/pb/bin/pb


Ignore:
Timestamp:
Jul 13, 2008, 12:17:53 AM (12 years ago)
Author:
Bruno Cornec
Message:
  • DBI is only required when using announce
  • Mail::Sendmail is require for variables and future use so VL needs also an update for that
  • Now tht we need 2 tar files to build, VM also needs an updated pb
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r495 r498  
    2828use ProjectBuilder::Filter;
    2929use ProjectBuilder::Changelog;
    30 
    31 # For announce only
    32 use DBI;
    3330use Mail::Sendmail;
    3431
     
    443440    # TBC
    444441} elsif ($action =~ /^announce$/) {
     442    # For announce only. Require avoids the systematic load of these modules
     443    require DBI;
     444
    445445    pb_announce();
    446446} else {
     
    15151515        $key = "\Q$zero1";
    15161516
    1517         pb_system("cat $keyfile.pub | ssh -q -o UserKnownHostsFile=/dev/null -p $nport -i $keyfile root\@$vmhost->{$ENV{'PBPROJ'}} \"mkdir -p .ssh ; chmod 700 .ssh ; cat >> .ssh/authorized_keys ; chmod 600 .ssh/authorized_keys\"","Copying local keys to $vtype. This will require the root password");
     1517        pb_system("cat $keyfile.pub | ssh -q -o UserKnownHostsFile=/dev/null -p $nport -i $keyfile root\@$vmhost->{$ENV{'PBPROJ'}} \"mkdir -p .ssh ; chmod 700 .ssh ; cat >> .ssh/authorized_keys ; chmod 600 .ssh/authorized_keys\"","Copying local keys to $vtype. This may require the root password");
    15181518        # once this is done, we can do what we want on the VM remotely
    15191519    }
     
    15321532our $pbLOG;
    15331533our $pbsynmsg = "pbscript";
     1534our $pbdisplaytype = "text";
     1535our $pblocale = "";
    15341536pb_log_init($pbdebug, $pbLOG);
    15351537pb_temp_init();
     
    17181720my $insdm = "rm -rf Date-Manip* ; wget http://search.cpan.org/CPAN/authors/id/S/SB/SBECK/Date-Manip-5.54.tar.gz ; tar xvfz Date-Manip-5.54.tar.gz ; cd Date-Manip* ; perl Makefile.PL ; make ; make install ; cd .. ; rm -rf Date-Manip*";
    17191721my $insmb = "rm -rf Module-Build* ; wget http://search.cpan.org/CPAN/authors/id/K/KW/KWILLIAMS/Module-Build-0.2808.tar.gz ; tar xvfz Module-Build-0.2808.tar.gz ; cd Module-Build* ; perl Makefile.PL ; make ; make install ; cd .. ; rm -rf Module-Build*";
    1720 my $insfm = "rm -rf File-MimeInfo* ; wget http://search.cpan.org/CPAN/authors/id/P/PA/PARDUS/File-MimeInfo/File-MimeInfo-0.15.tar.gz ; tar xvfz File-MimeInfo-0.15.tar.gz ; cd File-MimeInfo* ; perl Makefile.PL ; make ; make install ; cd .. ; rm -rf File-MimeInfo*";
     1722my $insfm = "rm -rf File-MimeInfo* ; wget http://search.cpan.org/CPAN/authors/id/P/PA/PARDUS/File-MimeInfo/File-MimeInfo-0.15.tar.gz ; tar xvfz File-MimeInfo-0.15.tar.gz ; cd File-MimeInfo* ; perl Makefile.PL ; make ; make install ; cd .. ; rm -rf File-MimeInfo*";
    17211723my $insfb = "rm -rf File-Basedir* ; wget http://search.cpan.org/CPAN/authors/id/P/PA/PARDUS/File-BaseDir-0.03.tar.gz ; tar xvfz File-BaseDir-0.03.tar.gz ; cd File-BaseDir* ; perl Makefile.PL ; make ; make install ; cd .. ; rm -rf File-BaseDir*";
     1724my $insms = "rm -rf Mail-Sendmail* ; wget http://search.cpan.org/CPAN/authors/id/M/MI/MIVKOVIC/Mail-Sendmail-0.79.tar.gz ; tar xvfz Mail-Sendmail-0.79.tar.gz ; cd Mail-Sendmail* ; perl Makefile.PL ; make ; make install ; cd .. ; rm -rf Mail-Sendmail*";
    17221725my $cmtdm = "Installing Date-Manip perl module";
    17231726my $cmtmb = "Installing Module-Build perl module";
    17241727my $cmtfm = "Installing File-MimeInfo perl module";
    17251728my $cmtfb = "Installing File-Basedir perl module";
     1729my $cmtms = "Installing Perl-Sendmail perl module";
    17261730my $cmtall = "Installing required modules";
    17271731
     
    17361740    }
    17371741
    1738     pb_system("yum -y $opt install rpm-build wget patch ntp sudo perl-DateManip perl-File-MimeInfo perl-ExtUtils-MakeMaker",$cmtall);
     1742    pb_system("yum -y $opt install rpm-build wget patch ntp sudo perl-DateManip perl-File-MimeInfo perl-ExtUtils-MakeMaker perl-Mail-Sendmail",$cmtall);
    17391743    if ($dver eq 4) {
    17401744        pb_system("$insmb","$cmtmb");
     
    17491753    pb_system("$insfm","$cmtfm");
    17501754    pb_system("$insfb","$cmtfb");
     1755    pb_system("$insms","$cmtms");
    17511756} elsif ($ddir eq "suse") {
    17521757    # New OpenSuSE
     
    17541759    pb_system("$insfm","$cmtfm");
    17551760    pb_system("$insfb","$cmtfb");
    1756     pb_system("export TERM=linux ; liste=\"\" ; for i in make wget patch sudo perl-DateManip perl-File-HomeDir xntp; do rpm -q \$i 1> /dev/null 2> /dev/null ; if [ \$\? != 0 ]; then liste=\"\$liste \$i\"; fi; done; echo \"Liste: \$liste\" ; if [ \"\$liste\" != \"\" ]; then yast2 -i \$liste ; fi","$cmtall");
     1761    pb_system("export TERM=linux ; liste=\"\" ; for i in make wget patch sudo perl-DateManip perl-File-HomeDir perl-Mail-Sendmail xntp; do rpm -q \$i 1> /dev/null 2> /dev/null ; if [ \$\? != 0 ]; then liste=\"\$liste \$i\"; fi; done; echo \"Liste: \$liste\" ; if [ \"\$liste\" != \"\" ]; then yast2 -i \$liste ; fi","$cmtall");
    17571762} elsif ( $dfam eq "md" ) {
    1758         pb_system("urpmi.update -a ; urpmi --auto rpm-build wget sudo patch ntp-client perl-File-MimeInfo","$cmtall");
     1763        pb_system("urpmi.update -a ; urpmi --auto rpm-build wget sudo patch ntp-client perl-File-MimeInfo perl-Mail-Sendmail","$cmtall");
    17591764        if (($ddir eq "mandrake") && ($dver eq "10.1")) {
    17601765            pb_system("$insdm","$cmtdm");
     
    17671772        pb_system("$insfb","$cmtfb");
    17681773        pb_system("$insfm","$cmtfm");
    1769         pb_system("apt-get -y install wget patch ssh sudo debian-builder dh-make fakeroot ntpdate libmodule-build-perl libdate-manip-perl","$cmtall");
     1774        pb_system("apt-get -y install wget patch ssh sudo debian-builder dh-make fakeroot ntpdate libmodule-build-perl libdate-manip-perl libmail-sendmail-perl","$cmtall");
    17701775    } else  {
    1771         pb_system("apt-get update; apt-get -y install wget patch openssh-server dpkg-dev sudo debian-builder dh-make fakeroot ntpdate libfile-mimeinfo-perl libmodule-build-perl libdate-manip-perl","$cmtall");
     1776        pb_system("apt-get update; apt-get -y install wget patch openssh-server dpkg-dev sudo debian-builder dh-make fakeroot ntpdate libfile-mimeinfo-perl libmodule-build-perl libdate-manip-perl libmail-sendmail-perl","$cmtall");
    17721777    }
    17731778} elsif ( $dfam eq "gen" ) {
    17741779        #system "emerge -u system";
    1775         pb_system("emerge wget sudo ntp DateManip File-MimeInfo","$cmtall");
     1780        pb_system("emerge wget sudo ntp DateManip File-MimeInfo Mail-Sendmail","$cmtall");
    17761781} else {
    17771782    pb_log(0,"No pkg to install\n");
Note: See TracChangeset for help on using the changeset viewer.