Changeset 435 in ProjectBuilder for devel/pb/bin
- Timestamp:
- May 11, 2008, 11:54:06 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r434 r435 484 484 pb_cms_export($uri,"$ENV{'PBDIR'}/$dir",$dest); 485 485 486 # Get project info on authors and log file 487 my $chglog = "$ENV{'PBROOTDIR'}/$pbpkg/pbcl"; 488 $chglog = "$ENV{'PBROOTDIR'}/pbcl" if (! -f $chglog); 489 $chglog = undef if (! -f $chglog); 490 491 my $authors = "$ENV{'PBROOTDIR'}/$pbpkg/pbauthors"; 492 $authors = "$ENV{'PBROOTDIR'}/pbauthors" if (! -f $authors); 493 $authors = "/dev/null" if (! -f $authors); 494 495 # Extract cms log history and store it 496 if ((defined $chglog) && (! -f "$dest/NEWS")) { 497 pb_log(2,"Generating NEWS file from $chglog\n"); 498 copy($chglog,"$dest/NEWS") || die "Unable to create $dest/NEWS"; 499 } 500 pb_cms_log($scheme,"$ENV{'PBDIR'}/$dir",$dest,$chglog,$authors); 486 # Generated fake content for test versions to speed up stuff 487 my ($testver) = pb_conf_get_if("testver"); 488 my $chglog; 489 490 if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i)) { 491 if (! -f "$dest/NEWS") { 492 open(NEWS,"> $dest/NEWS") || die "Unable to create $dest/NEWS"; 493 close(NEWS); 494 } 495 open(CL,"> $dest/ChangeLog") || die "Unable to create $dest/ChangeLog"; 496 close(CL); 497 open(CL,"> $dest/$ENV{'PBCMSLOGFILE'}") || die "Unable to create $dest/$ENV{'PBCMSLOGFILE'}"; 498 close(CL); 499 $chglog = undef; 500 } else { 501 502 # Get project info on authors and log file 503 $chglog = "$ENV{'PBROOTDIR'}/$pbpkg/pbcl"; 504 $chglog = "$ENV{'PBROOTDIR'}/pbcl" if (! -f $chglog); 505 $chglog = undef if (! -f $chglog); 506 507 my $authors = "$ENV{'PBROOTDIR'}/$pbpkg/pbauthors"; 508 $authors = "$ENV{'PBROOTDIR'}/pbauthors" if (! -f $authors); 509 $authors = "/dev/null" if (! -f $authors); 510 511 # Extract cms log history and store it 512 if ((defined $chglog) && (! -f "$dest/NEWS")) { 513 pb_log(2,"Generating NEWS file from $chglog\n"); 514 copy($chglog,"$dest/NEWS") || die "Unable to create $dest/NEWS"; 515 } 516 pb_cms_log($scheme,"$ENV{'PBDIR'}/$dir",$dest,$chglog,$authors); 517 } 501 518 502 519 my %build; 503 504 520 my @pt; 521 my $tmpl = ""; 522 505 523 @pt = pb_conf_get_if("vmlist","velist"); 506 my $tmpl = "";507 524 if (defined $pt[0]->{$ENV{'PBPROJ'}}) { 508 525 $tmpl .= $pt[0]->{$ENV{'PBPROJ'}}; … … 689 706 # For gentoo we need to take pb as subsystem name 690 707 # We put every apps here under sys-apps. hope it's correct 691 # We use pb's home dir in order o have a single OVERLAY line708 # We use pb's home dir in order to have a single OVERLAY line 692 709 my $tmpd = "$ENV{'HOME'}/portage/pb/sys-apps/$pbpkg"; 693 710 pb_mkdir_p($tmpd) if (! -d "$tmpd"); … … 736 753 $made="$made portage/pb/sys-apps/$pbpkg/$pbpkg-$pbver.ebuild"; 737 754 } elsif ($dtype eq "slackware") { 738 $made="$made build-$pbpkg/$pbpkg-$pbver-*-$pbtag.tgz"; 739 pb_mkdir_p("$ENV{'PBBUILDDIR'}/install") if (! -d "$ENV{'PBBUILDDIR'}/install"); 755 $made="$made $pbpkg/$pbpkg-$pbver-*-$pbtag.tgz"; 756 757 chdir "$ENV{'PBBUILDDIR'}" || die "Unable to chdir to $ENV{'PBBUILDDIR'}"; 758 pb_system("tar xfz $src","Extracting sources"); 759 chdir "$pbpkg-$pbver" || die "Unable to chdir to $pbpkg-$pbver"; 760 symlink "pbconf/$ddir-$dver","install" || die "Unable to symlink to pbconf/$ddir-$dver"; 761 if (-x "install/pbslack") { 762 pb_system("./install/pbslack","Building package"); 763 pb_system("sudo /sbin/makepkg -p -l y -c y $pbpkg","Packaging $pbpkg"); 764 } 740 765 } else { 741 766 die "Unknown dtype format $dtype"; … … 869 894 if (($cmt eq "Sources") || ($cmt eq "Script")) { 870 895 $tdir = "$sshdir->{$ENV{'PBPROJ'}}/src"; 896 if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i)) { 897 # This is a test pkg => target dir is under test 898 $tdir = "$sshdir->{$ENV{'PBPROJ'}}/test/src"; 899 } 871 900 } elsif (($cmt eq "vm") || ($cmt eq "ve")) { 872 901 $tdir = $sshdir->{$ENV{'PBPROJ'}}."/$ENV{'PBPROJ'}/delivery"; … … 951 980 if ($cmt ne "ve") { 952 981 my $keyfile = pb_ssh_get(0); 953 $shcmd = "ssh -i $keyfile -q - p $nport $mac";954 $cpcmd = "scp -i $keyfile -p - P $nport";982 $shcmd = "ssh -i $keyfile -q -o UserKnownHostsFile=/dev/null -p $nport $mac"; 983 $cpcmd = "scp -i $keyfile -p -o UserKnownHostsFile=/dev/null -P $nport"; 955 984 $cptarget = "$mac:$tdir"; 956 985 if ($cmt eq "vm") { … … 1362 1391 $key = "\Q$zero1"; 1363 1392 1364 pb_system("cat $keyfile.pub | ssh -q - 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");1393 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"); 1365 1394 # once this is done, we can do what we want on the VM remotely 1366 1395 }
Note:
See TracChangeset
for help on using the changeset viewer.