Changeset 203


Ignore:
Timestamp:
Oct 14, 2007, 7:41:38 PM (12 years ago)
Author:
bruno
Message:

use make and not the macro not portable
document Ubuntu 6.06 distribution detection hack
fix some VMs handling pb

Location:
devel
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r200 r203  
    455455    my $dir = shift || "sshdir";
    456456    my $port = shift || "sshport";
    457     my $tmout = shift || "120";
     457    my $tmout = shift || "vmtmout";
    458458    my $cmd = "";
    459459
     
    516516
    517517    print $LOG "Sources handled ($cmt): $src\n" if ($debug >= 0);
    518     my ($sshhost,$sshlogin,$sshdir,$sshport) = pb_conf_get($host,$login,$dir,$port);
     518    my ($sshhost,$sshlogin,$sshdir,$sshport,$vmtmout) = pb_conf_get($host,$login,$dir,$port,$tmout);
    519519    my $mac = "$sshlogin->{$ENV{'PBPROJ'}}\@$sshhost->{$ENV{'PBPROJ'}}";
    520520    # Overwrite account value if passed as parameter
     
    539539
    540540    $port = $sshport->{$ENV{'PBPROJ'}};
    541     my $tm = $tmout->{$ENV{'PBPROJ'}};
     541    my $tm = $vmtmout->{$ENV{'PBPROJ'}};
    542542    pb_system("ssh -q -p $port $mac \"mkdir -p $tdir ; cd $tdir ; echo \'for i in $basesrc; do if [ -f \$i ]; then rm -f \$i; fi; done\ ; $cmd' | bash\"","Preparing $tdir on $mac");
    543543    pb_system("cd $ENV{'PBBUILDDIR'} ; scp -p -P $port $src $mac:$tdir 2> /dev/null","$cmt delivery in $tdir on $mac");
  • devel/pb/contrib/pbsetupqemu

    r200 r203  
    3737}
    3838
     39# For root
     40mkdir ".ssh",0700;
     41system 'cp /tmp/pbkey .ssh/authorized_keys';
     42chmod 0600,".ssh/authorized_keys";
     43
     44# For pb
    3945chdir "/home/pb";
    4046mkdir ".ssh",0700;
     
    5763chmod 0640,$file;
    5864
    59 # Adapt sudoers
    60 $file="/etc/sudoers";
    61 $found = 0;
    62 open(PBFILE,$file) || die "Unable to open $file";
    63 open(PBOUT,"> $file.new") || die "Unable to open $file.new";
    64 while (<PBFILE>) {
    65     $found = 1 if (/^pb   /);
    66     s/Defaults[ \t]+requiretty//;
    67     print PBOUT $_;
    68 }
    69 close(PBFILE);
    70 print PBOUT "pb   ALL=(ALL) NOPASSWD:ALL\n" if ( $found == 0 );
    71 close(PBOUT);
    72 rename("$file.new",$file);
    73 chmod 0440,$file;
    74 
    7565unlink "/tmp/pbkey";
    7666
    7767my ($ddir, $dver, $dfam, $dtype, $pbsuf) = pb_distro_init();
    78 # Suse wants sudoers as 640
    79 if (($ddir eq "sles") || ($ddir eq "suse")) {
    80     chmod 0640,$file;
    81 }
    8268print "distro tuple: ".join(',',($ddir, $dver, $dfam, $dtype, $pbsuf))."\n";
    8369
     
    10995} elsif ($ddir eq "suse") {
    11096    # New OpenSuSE
    111     system "export TERM=linux ; liste=\"\" ; for i in neon newt-devel slang-devel autoconf automake libtool gcc wget gcc-c++ docbook-utils ImageMagick man patch mkisofs sudo perl-DateManip perl-AppConfig 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";
     97    system "export TERM=linux ; liste=\"\" ; for i in neon newt-devel slang-devel autoconf automake libtool make gcc wget gcc-c++ docbook-utils ImageMagick man patch mkisofs sudo perl-DateManip perl-AppConfig 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";
    11298} elsif ( $dfam eq "md" ) {
    11399    if (( $dver eq "2006.0" ) || ( $dver eq "10.2" )) {
     
    118104    }
    119105} elsif ( $dfam eq "du" ) {
    120     system "apt-get update; apt-get -y install autoconf automake libtool g++ wget patch mondo groff imagemagick docbook-utils docbook2x docbook-to-man openssh-server dpkg-dev sudo debian-builder dh-make fakeroot libnewt-dev ntpdate libncurses5-dev libdate-manip-perl libappconfig-perl";
     106    if (( $dver eq "3.1" ) && ($ddir eq "debian")) {
     107        system "apt-get update; apt-get -y install autoconf automake libtool g++ wget patch mondo groff imagemagick docbook-utils docbook2x docbook-to-man ssh dpkg-dev sudo debian-builder dh-make fakeroot libnewt-dev ntpdate libncurses5-dev libdate-manip-perl libappconfig-perl";
     108    } else {
     109        system "apt-get update; apt-get -y install autoconf automake libtool g++ wget patch mondo groff imagemagick docbook-utils docbook2x docbook-to-man openssh-server dpkg-dev sudo debian-builder dh-make fakeroot libnewt-dev ntpdate libncurses5-dev libdate-manip-perl libappconfig-perl";
     110    }
    121111} elsif ( $dfam eq "gen" ) {
    122112    system "emerge neon newt slang autoconf automake subversion libtool gcc wget vim man groff lynx grub afio buffer mindi mondo-rescue cdrecord mkisofs ntp-client";
    123113} else {
    124114    print "No pkg to install\n";
     115}
     116
     117# Adapt sudoers
     118$file="/etc/sudoers";
     119$found = 0;
     120open(PBFILE,$file) || die "Unable to open $file";
     121open(PBOUT,"> $file.new") || die "Unable to open $file.new";
     122while (<PBFILE>) {
     123    $found = 1 if (/^pb   /);
     124    s/Defaults[ \t]+requiretty//;
     125    print PBOUT $_;
     126}
     127close(PBFILE);
     128print PBOUT "pb   ALL=(ALL) NOPASSWD:ALL\n" if ( $found == 0 );
     129close(PBOUT);
     130rename("$file.new",$file);
     131chmod 0440,$file;
     132
     133# Suse wants sudoers as 640
     134if (($ddir eq "sles") || ($ddir eq "suse")) {
     135    chmod 0640,$file;
    125136}
    126137
  • devel/pb/lib/ProjectBuilder/Distribution.pm

    r191 r203  
    174174    'opensuse'              => 'openSUSE (\d.+) \(',
    175175    'lsb'                   => '.*[^Ubunt].*\nDISTRIB_RELEASE=(.+)',
     176# Ubuntu 6.06 includes a /etc/debian_version file that needs to be
     177# renamed to /etc/debian_version.sav as there is no way to distinguish
     178# Ubuntu 6.06 from debian testing otherwise
    176179    'ubuntu'                => '.*Ubuntu.*\nDISTRIB_RELEASE=(.+)',
    177180# Not tested
  • devel/pbconf/project-builder/rpm/project-builder.spec

    r175 r203  
    3535%build
    3636%{__perl} Makefile.PL
    37 %make
     37make
    3838
    3939%install
    40 %{__rm} -rf %{buildroot}
    41 %makeinstall_std
     40make install
    4241
    4342%clean
Note: See TracChangeset for help on using the changeset viewer.