- Timestamp:
- Oct 22, 2007, 4:01:27 PM (17 years ago)
- Location:
- devel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r238 r239 292 292 } 293 293 } 294 print "$listehave been filtered\n";294 print $LOG "Files ".$liste."have been filtered\n"; 295 295 296 296 # Archive dest dir … … 534 534 # Overwrite account value if passed as parameter 535 535 $mac = "$pbaccount\@$sshhost->{$ENV{'PBPROJ'}}" if (defined $pbaccount); 536 $port = "$pbport" if (defined $pbport);537 536 my $tdir; 538 537 my $bdir; … … 549 548 return; 550 549 } 550 my $nport = $sshport->{$ENV{'PBPROJ'}}; 551 $nport = "$pbport" if (defined $pbport); 552 551 553 # Remove a potential $ENV{'HOME'} as tdir should be relative to pb's home 552 554 $tdir =~ s|\$ENV.+\}/||; 553 555 554 $port = $sshport->{$ENV{'PBPROJ'}};555 556 my $tm = $vmtmout->{$ENV{'PBPROJ'}}; 556 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");557 pb_system("cd $ENV{'PBBUILDDIR'} ; scp -p -P $ port $src $mac:$tdir 2> /dev/null","$cmt delivery in $tdir on $mac");558 pb_system("ssh -q -p $ port $mac \"echo \'cd $tdir ; if [ -f pbscript ]; then ./pbscript; fi\' | bash\"","Executing pbscript on $mac if needed");557 pb_system("ssh -q -p $nport $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"); 558 pb_system("cd $ENV{'PBBUILDDIR'} ; scp -p -P $nport $src $mac:$tdir 2> /dev/null","$cmt delivery in $tdir on $mac"); 559 pb_system("ssh -q -p $nport $mac \"echo \'cd $tdir ; if [ -f pbscript ]; then ./pbscript; fi\' | bash\"","Executing pbscript on $mac if needed"); 559 560 if ($cmt eq "VMs") { 560 561 # Get back info on pkg produced, compute their name and get them from the VM 561 pb_system("scp -p -P $ port $mac:$bdir/pbgen-$pbprojver-$pbprojtag $ENV{'PBBUILDDIR'} 2> /dev/null","Get package names in $bdir on $mac");562 pb_system("scp -p -P $nport $mac:$bdir/pbgen-$pbprojver-$pbprojtag $ENV{'PBBUILDDIR'} 2> /dev/null","Get package names in $bdir on $mac"); 562 563 open(KEEP,"$ENV{'PBBUILDDIR'}/pbgen-$pbprojver-$pbprojtag") || die "Unable to read $ENV{'PBBUILDDIR'}/pbgen-$pbprojver-$pbprojtag"; 563 564 my $src = <KEEP>; … … 571 572 foreach my $p (split(/ +/,$src)) { 572 573 my $j = basename($p); 573 pb_system("scp -p -P $ port $mac:\'$bdir/$p\' $ENV{'PBBUILDDIR'}/$odir/$over 2> /dev/null","Package recovery of $j in $bdir from $mac");574 pb_system("scp -p -P $nport $mac:\'$bdir/$p\' $ENV{'PBBUILDDIR'}/$odir/$over 2> /dev/null","Package recovery of $j in $bdir from $mac"); 574 575 $made="$made $odir/$over/$j" if (($dtype ne "rpm") || ($j !~ /.src.rpm$/)); 575 576 } 576 577 print KEEP "$made\n"; 577 578 close(KEEP); 578 pb_system("ssh -q -p $ port $mac \"rm -rf $tdir $bdir\"","VM cleanup on $mac");579 pb_system("ssh -q -p $nport $mac \"rm -rf $tdir $bdir\"","VM cleanup on $mac"); 579 580 if (! $vmexist) { 580 pb_system("ssh -q -p $ port $mac \"sudo /sbin/halt -p \"; sleep $tm ; echo \'if [ -d /proc/$vmpid ]; then kill -9 $vmpid; fi \' | bash ; sleep 10","VM $vm halt (pid $vmpid)");581 pb_system("ssh -q -p $nport $mac \"sudo /sbin/halt -p \"; sleep $tm ; echo \'if [ -d /proc/$vmpid ]; then kill -9 $vmpid; fi \' | bash ; sleep 10","VM $vm halt (pid $vmpid)"); 581 582 } 582 583 pb_send2ssh("Packages","$odir"."_"."$over"); … … 623 624 $ENV{'PBVMOPT'} = ""; 624 625 } 625 $vmport->{$ENV{'PBPROJ'}} = "$pbport" if (defined $pbport); 626 my $nport = $vmport->{$ENV{'PBPROJ'}}; 627 $nport = "$pbport" if (defined $pbport); 626 628 627 629 my $cmd; … … 649 651 die "Unable to find VM $vmm"; 650 652 } 651 $cmd = "$vmcmd $ENV{'PBVMOPT'} -redir tcp:$ vmport->{$ENV{'PBPROJ'}}:10.0.2.15:22 $vmm"653 $cmd = "$vmcmd $ENV{'PBVMOPT'} -redir tcp:$nport:10.0.2.15:22 $vmm" 652 654 } elsif ($vmtype eq "xen") { 653 655 } elsif ($vmtype eq "vmware") { -
devel/pbconf/project-builder/deb/rules
r238 r239 32 32 33 33 build-stamp: .touched 34 34 dh_testdir 35 35 36 36 # Add here commands to compile the package. 37 37 perl Makefile.PL 38 38 make … … 40 40 41 41 clean: 42 42 dh_testdir 43 43 dh_testroot 44 44 rm -f build-stamp 45 45 46 47 46 # Add here commands to clean up after the build process. 47 -$(MAKE) distclean 48 48 49 49 dh_clean 50 50 51 51 install: build 52 53 54 55 52 dh_testdir 53 dh_testroot 54 dh_clean -k 55 dh_installdirs 56 56 57 58 57 # Add here commands to install the package into debian/linuxcoe-sd 58 $(MAKE) install DESTDIR=$(CURDIR)/debian/PBPKG 59 59 60 60 # Build architecture-independent files here. … … 64 64 # Build architecture-dependent files here. 65 65 binary-arch: build install 66 dh_testdir 67 dh_testroot 68 dh_installchangelogs ChangeLog 69 dh_installdocs 70 dh_installexamples 71 # dh_install 72 # dh_installmenu 73 # dh_installdebconf 74 # dh_installlogrotate 75 # dh_installemacsen 76 # dh_installpam 77 # dh_installmime 78 # dh_python 79 # dh_installinit 80 # dh_installcron 81 # dh_installinfo 82 dh_installman 83 #dh_link usr/share/doc/linuxcoe-sd usr/share/doc/linuxcoe-sd-base 84 dh_strip 85 dh_compress 86 dh_fixperms 66 dh_testdir 67 dh_testroot 68 dh_installchangelogs ChangeLog 69 dh_installdocs 70 dh_installexamples 71 # dh_install 72 # dh_installmenu 73 # dh_installdebconf 74 # dh_installlogrotate 75 # dh_installemacsen 76 # dh_installpam 77 # dh_installmime 78 # dh_python 79 # dh_installinit 80 # dh_installcron 81 # dh_installinfo 82 dh_installman 83 dh_strip 84 dh_compress 85 dh_fixperms 87 86 # dh_perl 88 87 # dh_makeshlibs 89 90 91 92 93 88 dh_installdeb 89 dh_shlibdeps 90 dh_gencontrol 91 dh_md5sums 92 dh_builddeb 94 93 95 94 binary: binary-indep binary-arch
Note:
See TracChangeset
for help on using the changeset viewer.