Changeset 1907 in ProjectBuilder
- Timestamp:
- Oct 10, 2014, 11:32:12 AM (10 years ago)
- Location:
- devel
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Base.pm
r1903 r1907 146 146 my $cmd=shift; 147 147 my $cmt=shift || $cmd; 148 my $verbose=shift || undef;148 my $verbose=shift; 149 149 my $redir = ""; 150 150 … … 201 201 sub pb_get_uri { 202 202 203 my $uri = shift || undef;203 my $uri = shift; 204 204 205 205 pb_log(2,"DEBUG: uri:" . (defined $uri ? $uri : '') . "\n"); … … 252 252 sub pb_log_init { 253 253 254 $pbdebug = shift || 0; 255 $pbLOG = shift || \*STDOUT; 254 $pbdebug = shift; 255 $pbLOG = shift; 256 257 $pbdebug = 0 if (not defined $pbdebug); 258 $pbLOG = \*STDOUT if (not defined $pbLOG); 256 259 pb_log(1,"Debug value: $pbdebug\n"); 257 260 … … 278 281 sub pb_log { 279 282 280 my $dlevel = shift || 0; 281 my $msg = shift || ""; 282 283 my $dlevel = shift; 284 my $msg = shift; 285 286 $dlevel = 0 if (not defined $dlevel); 287 $msg = "" if (not defined $msg); 283 288 $pbLOG = \*STDOUT if (not defined $pbLOG); 284 289 … … 361 366 sub pb_exit { 362 367 363 my $ret = shift || 0; 368 my $ret = shift; 369 $ret = 0 if (not defined $ret); 364 370 pb_log(0,"Please remove manually $ENV{'PBTMP'} after debug analysis\n") if ($pbdebug > 1); 365 371 exit($ret); … … 426 432 sub pb_temp_init { 427 433 428 my $pbkeep = shift || 0; # Do not keep temp files by default 434 my $pbkeep = shift; 435 436 # Do not keep temp files by default 437 $pbkeep = 0 if (not defined $pbkeep); 429 438 430 439 if (not defined $ENV{'TMPDIR'}) { … … 504 513 sub pb_check_requirements { 505 514 506 my $req = shift || undef;507 my $opt = shift || undef;508 my $appname = shift || undef;515 my $req = shift; 516 my $opt = shift; 517 my $appname = shift; 509 518 510 519 my ($req2,$opt2) = (undef,undef); -
devel/pb-modules/lib/ProjectBuilder/Conf.pm
r1905 r1907 78 78 sub pb_conf_init { 79 79 80 my $proj=shift || undef;80 my $proj=shift; 81 81 82 82 pb_log(1,"Entering pb_conf_init\n"); … … 240 240 open(CONF,"> $conffile") || confess "Unable to write into $conffile"; 241 241 242 foreach my $p ( keys %$h) {242 foreach my $p (sort keys %$h) { 243 243 my $j = $h->{$p}; 244 foreach my $k ( keys %$j) {244 foreach my $k (sort keys %$j) { 245 245 print CONF "$p $k = $j->{$k}\n"; 246 246 } … … 321 321 sub pb_conf_add_last_in_hash { 322 322 323 my $ptr = shift || undef;323 my $ptr = shift; 324 324 325 325 return if (not defined $ptr); -
devel/pb-modules/lib/ProjectBuilder/Distribution.pm
r1879 r1907 323 323 324 324 # SPEC file 325 my $f = shift || undef;325 my $f = shift; 326 326 my $pbos = shift; 327 my $deps = shift || undef;327 my $deps = shift; 328 328 329 329 # Protection … … 358 358 sub pb_distro_getdeps { 359 359 360 my $f = shift || undef;360 my $f = shift; 361 361 my $pbos = shift; 362 362 … … 441 441 442 442 my $pbos = shift; 443 my $deps = shift || undef;443 my $deps = shift; 444 444 445 445 return("") if ((not defined $deps) || ($deps =~ /^\s*$/)); … … 538 538 539 539 my $pbos = shift; 540 my $pbconf = shift || undef;541 my $pbkey = shift || undef;540 my $pbconf = shift; 541 my $pbkey = shift; 542 542 543 543 return if (not defined $pbconf); -
devel/pb-modules/lib/ProjectBuilder/Env.pm
r1872 r1907 139 139 sub pb_env_init { 140 140 141 my $proj=shift || undef;142 my $pbinit=shift || undef;141 my $proj=shift; 142 my $pbinit=shift; 143 143 my $action=shift; 144 144 my $pbkeep=shift || 0; -
devel/pb-modules/lib/ProjectBuilder/VE.pm
r1903 r1907 68 68 69 69 my $v = shift; 70 my $pbscript = shift; 71 my $pbforce = shift; 72 my $pbstep= shift; # Which step are we in (0: create, 1: setup, 2: build, 3: use) 70 my $pbforce = shift; # Which step are we in (0: create, 1: setup, 2: build, 3: use) 73 71 my $locsnap = shift; 74 72 my $vetype = shift; … … 78 76 my $docrepo = undef; # By default no repository for docker available 79 77 80 pb_log(2,"Entering pb_ve_launch at step $pb step\n");78 pb_log(2,"Entering pb_ve_launch at step $pbforce for type $vetype\n"); 81 79 # Get distro context 82 80 my $pbos = pb_distro_get_context($v); … … 128 126 my $root = pb_path_expand($vepath->{$ENV{PBPROJ}}); 129 127 130 if (((((defined $verebuild) && ($verebuild->{$ENV{'PBPROJ'}} =~ /true/i)) || ($pbforce == 1)) && ($vetype ne "docker"))128 if (((((defined $verebuild) && ($verebuild->{$ENV{'PBPROJ'}} =~ /true/i)) || ($pbforce == 0)) && ($vetype ne "docker")) 131 129 # For docker we may have a reference image that we'll use 132 || (($vetype eq "docker") && ($pb step== 0))) {130 || (($vetype eq "docker") && ($pbforce == 0))) { 133 131 134 132 my ($verpmtype,$vedebtype) = pb_conf_get("verpmtype","vedebtype"); … … 288 286 289 287 # If docker, create the image and remove the now temp dir except if we had one already 290 if (($vetype eq "docker") && ($pb step== 0)) {288 if (($vetype eq "docker") && ($pbforce == 0)) { 291 289 $docrepo = pb_ve_docker_repo($dockerregistry->{$ENV{'PBPROJ'}}); 292 290 my $cmd1 = pb_check_req("docker",0); … … 348 346 sub pb_ve_docker_registry { 349 347 350 my $dockerreg = shift || undef;348 my $dockerreg = shift; 351 349 my $wget = pb_check_req("wget",0); 352 350 my ($scheme, $account, $host, $port, $path) = pb_get_uri($dockerreg); … … 369 367 sub pb_ve_docker_repo { 370 368 371 my $dockerreg = shift || undef;369 my $dockerreg = shift; 372 370 my $docrepo = ""; 373 371 my ($scheme, $account, $host, $port, $path) = pb_get_uri($dockerreg); … … 380 378 sub pb_ve_docker_get_image { 381 379 382 my $pbimage = shift || undef;380 my $pbimage = shift; 383 381 my $found = 0; 384 382 … … 398 396 sub pb_ve_get_type { 399 397 400 my $vetype = shift || undef;398 my $vetype = shift; 401 399 402 400 # Get VE context -
devel/pb/bin/pb
r1906 r1907 252 252 RM means Remote Machine, and could be a physical or Virtual one. 253 253 This is one buildfarm integration for pb. 254 255 =item B<prepvm> 256 257 Prepare the VMs to have all requirements to build the project 258 259 =item B<prepve> 260 261 Prepare the VEs to have all requirements to build the project 262 263 =item B<preprm> 264 265 Prepare the RMs to have all requirements to build the project 254 266 255 267 =item B<sbx2vm> … … 855 867 } elsif ($action =~ /^build2vm$/) { 856 868 pb_build2v("vm","build"); 869 } elsif ($action =~ /^preprm$/) { 870 pb_build2v("rm","prep"); 871 } elsif ($action =~ /^prepve$/) { 872 pb_build2v("ve","prep"); 873 } elsif ($action =~ /^prepvm$/) { 874 pb_build2v("vm","prep"); 857 875 } elsif ($action =~ /^cms2rm$/) { 858 876 pb_cms2build("CMS"); … … 1000 1018 sub pb_cms2build { 1001 1019 1002 my $param = shift || undef;1003 my $web = shift || undef;1020 my $param = shift; 1021 my $web = shift; 1004 1022 1005 1023 my $pkg; … … 1528 1546 } 1529 1547 pb_log(0,"INFO: ------ Finished preparing build environment ------\n"); 1530 open(PKG,">> $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb") || die "Unable to append to $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb";1531 print PKG "pbstep $pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'} = 2\n";1532 close(PKG);1533 1548 } 1534 1549 … … 1541 1556 my $pbos = pb_distro_get_context(); 1542 1557 1543 # Check whether the preparation phase has already been done or not1544 my ($pbstep) = pb_distro_get_param($pbos,pb_conf_read_if("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb","pbstep"));1545 pb_build2prep() if ((not defined $pbstep) || ($pbstep < 2));1546 1547 1558 # Get list of packages to build 1548 1559 my $ptr = pb_get_pkg(); … … 1934 1945 print KEEP "$made\n"; 1935 1946 close(KEEP); 1936 open(PKG,">> $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb") || die "Unable to append to $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb";1937 print PKG "pbstep $pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'} = 3\n";1938 close(PKG);1939 1947 pb_distro_installdeps(undef,$pbos,$ret) if ($do_install); 1940 }1941 1942 sub create_solaris_prototype {1943 1944 my $uidgid = "bin bin";1945 my $pkgdestdir = $ENV{'PBSOLDESTDIR'};1946 1947 return if ($_ =~ /^$pkgdestdir$/);1948 if (-d $_) {1949 my $n = $File::Find::name;1950 $n =~ s~$pkgdestdir/~~;1951 print PROTO "d none $n 0755 $uidgid\n";1952 } elsif (-x $_) {1953 my $n = $File::Find::name;1954 $n =~ s~$pkgdestdir/~~;1955 print PROTO "f none $n 0755 $uidgid\n";1956 } elsif (-f $_) {1957 my $n = $File::Find::name;1958 $n =~ s~$pkgdestdir/~~;1959 print PROTO "f none $n 0644 $uidgid\n";1960 }1961 1948 } 1962 1949 … … 1975 1962 1976 1963 my $cmt = shift; 1977 my $pbscript = shift || undef; 1978 my $v = shift || undef; 1979 my $vexist = shift || 0; # 0 is FALSE 1980 my $vpid = shift || 0; # 0 is FALSE 1981 my $snapme = shift || 0; # 0 is FALSE 1982 my $pbstep = shift || 3; # 3 is usage of container 1983 1964 my $pbscript = shift; 1965 my $v = shift; 1966 my $vexist = shift; # 0 is FALSE 1967 my $vpid = shift; # 0 is FALSE 1968 my $snapme = shift; # 0 is FALSE 1969 my $pbstep = shift; # 3 is usage of container 1970 1971 $vexist = 0 if (not defined $vexist); 1972 $vpid = 0 if (not defined $vpid); 1973 $snapme = 0 if (not defined $snapme); 1974 $pbstep = 3 if (not defined $pbstep); 1984 1975 pb_log(2,"DEBUG: pb_send2target($cmt,".Dumper($v).",$vexist,$vpid)\n"); 1985 1976 my $host = "sshhost"; … … 2085 2076 } 2086 2077 2087 if ($cmt =~ /(V[EM]|RM) build/) {2078 if ($cmt =~ /(V[EM]|RM)(build|prep)/) { 2088 2079 $src="$src $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb $ENV{'PBETC'} $ENV{'PBDESTDIR'}/pbrc $pbscript{$v}"; 2089 2080 } elsif ($cmt =~ /(V[EM]|RM)Script/) { … … 2161 2152 } elsif ($cmt eq "CPAN") { 2162 2153 $tdir = "$remdir"; 2163 } elsif ($cmt =~ /(V[EM]|RM)(build|test )/) {2154 } elsif ($cmt =~ /(V[EM]|RM)(build|test|prep)/) { 2164 2155 $tdir = $remdir."/$ENV{'PBPROJ'}/delivery"; 2165 2156 $bdir = $remdir."/$ENV{'PBPROJ'}/build"; … … 2423 2414 if ($cmt =~ /^VE/) { 2424 2415 $tp = pb_path_expand($vepath->{$ENV{'PBPROJ'}}); 2416 $vetype = pb_ve_get_type($vetype); 2425 2417 if ($vetype eq "docker") { 2426 2418 $tpdir = "/"; … … 2428 2420 $tpdir = pb_path_expand("$tp/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}"); 2429 2421 } 2430 $vetype = pb_ve_get_type($vetype);2431 2422 my $arch = pb_get_arch(); 2432 2423 if ($vetype eq "chroot") { … … 2561 2552 $logres = "> "; 2562 2553 } 2554 2555 if ($cmt =~ /SandBox/) { 2556 # Install from sandbox mean using the result of the just passed sbx2build command 2557 # Get content saved in cms2build 2558 my ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb","pbpkg"); 2559 my $pbextdir = pb_get_extdir(); 2560 confess "Unable to get package list" if (not defined $pkg); 2561 2562 # We consider 2 specific packages 2563 my $vertag1 = $pkg->{"ProjectBuilder"}; 2564 my $vertag2 = $pkg->{"project-builder"}; 2565 # get the version of the current package - maybe different 2566 pb_log(2,"Vertag1: $vertag1\n"); 2567 pb_log(2,"Vertag2: $vertag2\n"); 2568 my ($pbver1,$tmp1) = split(/-/,$vertag1); 2569 my ($pbver2,$tmp2) = split(/-/,$vertag2); 2570 if ($cmt =~ /VE/) { 2571 # Copy inside the VE 2572 if ($vetype ne "docker") { 2573 copy("$ENV{'PBDESTDIR'}/ProjectBuilder-$pbver1$pbextdir.tar.gz","$tpdir/tmp"); 2574 copy("$ENV{'PBDESTDIR'}/project-builder-$pbver2$pbextdir.tar.gz","$tpdir/tmp"); 2575 } else { 2576 copy("$ENV{'PBDESTDIR'}/ProjectBuilder-$pbver1$pbextdir.tar.gz","$context"); 2577 copy("$ENV{'PBDESTDIR'}/project-builder-$pbver2$pbextdir.tar.gz","$context"); 2578 print DOCKER "COPY ProjectBuilder-$pbver1$pbextdir.tar.gz /tmp/\n"; 2579 print DOCKER "COPY project-builder-$pbver2$pbextdir.tar.gz /tmp/\n"; 2580 } 2581 } else { 2582 pb_system("$cpcmd $ENV{'PBDESTDIR'}/ProjectBuilder-$pbver1$pbextdir.tar.gz $ENV{'PBDESTDIR'}/project-builder-$pbver2$pbextdir.tar.gz $mac:/tmp","Copying local project files to $vetype."); 2583 } 2584 } 2585 2563 2586 # For docker everything is done in the Dockerfile 2564 2587 if (($cmt =~ /^VE/) && ($vetype eq "docker") && ($pbstep < 3)) { … … 2580 2603 pb_system("$shcmd \"sudo chown -R $mac $tdir\"","Adapt owner in $tdir to $mac"); 2581 2604 } else { 2582 print DOCKER "RUN sed -i '/requiretty/d' /etc/sudoers " if ($pbstep == 1);2605 print DOCKER "RUN sed -i '/requiretty/d' /etc/sudoers\n" if ($pbstep == 1); 2583 2606 } 2584 2607 } … … 2615 2638 } 2616 2639 # this is where we lanch the execution 2617 pb_system("$shcmd","Executing pbscript on $cptarget if needed",$cmdverb);2640 my $ret = pb_system("$shcmd","Executing pbscript on $cptarget if needed",$cmdverb); 2618 2641 2619 2642 if ($cmt =~ /^(V[EM]|RM)build/) { … … 2700 2723 } 2701 2724 if (($cmt =~ /^VE/) && ($snapme != 0)) { 2702 pb_ve_snap($pbos,$tp);2703 2725 if ($vetype eq "docker") { 2704 2726 foreach my $f (split(/ +/,$src)) { 2705 2727 unlink("$context/$f"); 2706 2728 } 2729 } else { 2730 pb_ve_snap($pbos,$tp); 2707 2731 } 2708 2732 } … … 2714 2738 my $vtype=shift; 2715 2739 my $pbstep=shift; # Which step are we in (0: create, 1: setup pb, 2: prep pbproj, 3: use to build) 2716 my $pbforce=shift || 0; # Force stop of VM. Default not. 2717 my $snapme=shift || 0; # Do we have to create a snapshot. Default not. 2718 my $pbimage=shift || undef; # Which image to use to start the VM/VE 2719 my $vm; 2720 my $all; 2740 my $pbforce=shift; # Force stop of VM. Default not. 2741 my $snapme=shift; # Do we have to create a snapshot. Default not. 2742 my $pbimage=shift; # Which image to use to start the VM/VE 2743 2744 $pbforce = 0 if (not defined $pbforce); 2745 $snapme = 0 if (not defined $snapme); 2721 2746 2722 2747 pb_log(2,"DEBUG: pb_script2v($vtype,$pbstep,$pbforce,$snapme)\n"); … … 2729 2754 my $pbscript=shift; 2730 2755 my $vtype = shift; 2731 my $action = shift; 2756 my $action = shift; # It an action is defined then use send2target 2732 2757 my $pbstep=shift; # Which step are we in (0: create, 1: setup, 2: build 3: use) 2733 my $pbforce=shift || 0; # Force stop of VM. Default not.2734 my $snapme = shift || 0;# By default do not snap a VM/VE/RM2735 my $usesnap = shift || 1; # By default study the usage of the snapshot feature of VM/VE/RM2736 my $pbimage=shift || undef;# Which image to use to start the VM/VE2758 my $pbforce=shift; # Force stop of VM. Default not. 2759 my $snapme = shift; # By default do not snap a VM/VE/RM 2760 my $usesnap = shift; # By default study the usage of the snapshot feature of VM/VE/RM 2761 my $pbimage=shift; # Which image to use to start the VM/VE 2737 2762 my $vm; 2738 2763 my $all; 2764 2765 $pbforce = 0 if (not defined $pbforce); 2766 $snapme = 0 if (not defined $snapme); 2767 $usesnap = 1 if (not defined $usesnap); 2739 2768 2740 2769 # Adapt // mode to memory size … … 2777 2806 my $pbscript = $pbscript->{$v} if (defined $pbscript->{$v}); 2778 2807 $pbscript = $pbscript->{'default'} if (not defined $pbscript); 2779 confess "No script defined so unable to launch it in $v" if (not defined $pbscript);2780 2808 ($vexist,$vpid) = pb_launchv($pbscript,$vtype,$v,$action,$pbstep,$pbforce,$snapme,$pbsnap,$pbimage); 2781 2809 … … 2795 2823 my $pbscript=shift; 2796 2824 my $vtype = shift; 2797 my $v = shift; 2798 my $action = shift; 2825 my $v = shift; # Only 1 VM/VE/RM treated here 2826 my $action = shift; # It an action is defined then use send2target 2799 2827 my $pbstep=shift; # Which step are we in (0: create, 1: setup, 2: build 3: use) 2800 my $pbforce=shift || 0; # Force stop of VM. Default not.2801 my $snapme = shift || 0;# By default do not snap a VM/VE/RM2802 my $usesnap = shift || 1;# By default study the usage of the snapshot feature of VM/VE/RM2803 my $pbimage=shift || undef;# Which image to use to start the VM/VE2828 my $pbforce=shift; # Force stop of VM. Default not. 2829 my $snapme = shift; # By default do not snap a VM/VE/RM 2830 my $usesnap = shift; # By default study the usage of the snapshot feature of VM/VE/RM 2831 my $pbimage=shift; # Which image to use to start the VM/VE 2804 2832 my $vexist = undef; 2805 2833 my $vpid = undef; 2834 2835 $pbforce = 0 if (not defined $pbforce); 2836 $snapme = 0 if (not defined $snapme); 2837 $usesnap = 1 if (not defined $usesnap); 2806 2838 2807 2839 # Check that v exists … … 2813 2845 } 2814 2846 2815 pb_log(2,"DEBUG: pb_launchv( script,vtype,v,step,force,snapme,usesnap: $pbscript,$vtype,$v,$pbstep,$pbforce,$snapme,$usesnap)\n");2847 pb_log(2,"DEBUG: pb_launchv(vtype,v,step,force,snapme,usesnap: $vtype,$v,$pbstep,$pbforce,$snapme,$usesnap)\n"); 2816 2848 pb_log(2,"DEBUG: pb_launchv(pbimage: $pbimage)\n") if (defined $pbimage); 2849 pb_log(2,"DEBUG: pb_launchv(pbimage: $pbscript)\n") if (defined $pbscript); 2817 2850 pb_log(2,"DEBUG: pb_launchv(action: $action)\n") if (defined $action); 2818 2851 # Keep only the first VM in case many were given … … 2967 3000 # Force the creation of the VE and no snapshot usable 2968 3001 $vetype = pb_ve_get_type($vetype); 2969 pb_ve_launch($v,$pbs cript,$pbforce,$pbstep,$usesnap,$vetype,$pbimage);3002 pb_ve_launch($v,$pbstep,$usesnap,$vetype,$pbimage); 2970 3003 $vexist = 0; 2971 3004 $vpid = 0; 2972 3005 } else { 2973 # RM here2974 # Get distro context2975 my $pbos = pb_distro_get_context($v);2976 2977 3006 # Get RM context 2978 3007 my ($ptr,$rmpath) = pb_conf_get("rmtype","rmpath"); … … 3034 3063 3035 3064 my $vtype = shift; 3036 my $action = shift || "build"; #build, test or prep 3037 my $pbforce=shift || 0; # Force stop of VM. Default not. 3065 my $action = shift; #build, test or prep 3066 my $pbforce=shift; # Force stop of VM. Default not. 3067 3068 $action = "build" if (not defined $action); 3069 $pbforce = 0 if (not defined $pbforce); 3038 3070 3039 3071 my $pbstep; … … 3101 3133 print SCRIPT "export PBPROJ=$ENV{'PBPROJ'}\n"; 3102 3134 3103 if ( $action eq "build") {3135 if (($action eq "build") || ($action eq "prep")) { 3104 3136 print SCRIPT "# Preparation for pb\n"; 3105 3137 print SCRIPT "rm -f \$HOME/.pbrc\n"; … … 3109 3141 3110 3142 # VE needs a good /proc, tolerate one being potentially left around after a failure 3143 $vetype = pb_ve_get_type($vetype); 3111 3144 if (($vtype eq "ve") && ($vetype ne "docker")) { 3112 3145 print SCRIPT "[ -d /proc/1 ] || sudo /bin/mount -t proc /proc /proc\n"; … … 3358 3391 3359 3392 my $vtype = shift; 3360 my $sbx = shift || undef;3393 my $sbx = shift; 3361 3394 my $pbstep = 1; 3362 3395 … … 3463 3496 # once this is done, we can do what we need on the VM/RM remotely 3464 3497 } elsif ($vtype eq "ve") { 3498 $vetype = pb_ve_get_type($vetype); 3465 3499 if ($vetype ne "docker") { 3466 3500 print SCRIPT << "EOF"; … … 3727 3761 my ($pbver1,$tmp1) = split(/-/,$vertag1); 3728 3762 my ($pbver2,$tmp2) = split(/-/,$vertag2); 3729 # Copy inside the VE3730 if ($vtype eq "ve") {3731 my ($vepath) = pb_conf_get("vepath");3732 copy("$ENV{'PBDESTDIR'}/ProjectBuilder-$pbver1$pbextdir.tar.gz","$vepath->{$ENV{'PBPROJ'}}/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}/tmp");3733 copy("$ENV{'PBDESTDIR'}/project-builder-$pbver2$pbextdir.tar.gz","$vepath->{$ENV{'PBPROJ'}}/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}/tmp");3734 } else {3735 pb_system("scp -i $keyfile -p -o UserKnownHostsFile=/dev/null -P $nport $ENV{'PBDESTDIR'}/ProjectBuilder-$pbver1$pbextdir.tar.gz $ENV{'PBDESTDIR'}/project-builder-$pbver2$pbextdir.tar.gz root\@$vmhost->{$ENV{'PBPROJ'}}:/tmp","Copying local project files to $vtype.");3736 }3737 3763 $cmdget = "mv /tmp/ProjectBuilder-$pbver1$pbextdir.tar.gz ProjectBuilder-latest.tar.gz ; mv /tmp/project-builder-$pbver2$pbextdir.tar.gz project-builder-latest.tar.gz"; 3738 3764 } else { … … 3851 3877 # Launch the VM/VE/RM 3852 3878 pb_log(2,"DEBUG: before parallel launch, pbscript hash is:".Dumper(%pbscript)."\n"); 3853 pb_parallel_launchv(\%pbscript,$vtype,uc($vtype)."Script" ,$pbstep,$pbforce);3879 pb_parallel_launchv(\%pbscript,$vtype,uc($vtype)."Script".$sbx,$pbstep,$pbforce); 3854 3880 return; 3855 3881 } … … 3859 3885 3860 3886 my $vtype = shift; 3861 my $pbstep = 3;3887 my $pbstep = 2; 3862 3888 3863 3889 my ($vm,$all) = pb_get2v($vtype); … … 3923 3949 EOF 3924 3950 # VE needs a good /proc 3951 $vetype = pb_ve_get_type($vetype); 3925 3952 if (($vtype eq "ve") && ($vetype ne "docker")) { 3926 3953 print SCRIPT "sudo /bin/mount -t proc /proc /proc\n"; … … 4760 4787 } 4761 4788 4762 sub pb_get_extdir (){4789 sub pb_get_extdir { 4763 4790 4764 4791 # the pbrc file should contain it and whatever the key, we take it … … 4776 4803 } 4777 4804 4805 # Unused now 4806 sub pb_keep_step { 4807 4808 my $pbos = shift; 4809 my $pbstep = shift; 4810 4811 $pbstep = 3 if (not defined $pbstep); 4812 4813 my %h; 4814 my $h = \%h; 4815 $h = pb_conf_cache("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb",$h); 4816 $h->{'pbstep'}->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"} = $pbstep; 4817 pb_conf_write("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb",$h); 4818 } 4819 4820 sub create_solaris_prototype { 4821 4822 my $uidgid = "bin bin"; 4823 my $pkgdestdir = $ENV{'PBSOLDESTDIR'}; 4824 4825 return if ($_ =~ /^$pkgdestdir$/); 4826 if (-d $_) { 4827 my $n = $File::Find::name; 4828 $n =~ s~$pkgdestdir/~~; 4829 print PROTO "d none $n 0755 $uidgid\n"; 4830 } elsif (-x $_) { 4831 my $n = $File::Find::name; 4832 $n =~ s~$pkgdestdir/~~; 4833 print PROTO "f none $n 0755 $uidgid\n"; 4834 } elsif (-f $_) { 4835 my $n = $File::Find::name; 4836 $n =~ s~$pkgdestdir/~~; 4837 print PROTO "f none $n 0644 $uidgid\n"; 4838 } 4839 } 4840 4841 4778 4842 1; -
devel/pb/lib/ProjectBuilder/CMS.pm
r1896 r1907 62 62 sub pb_cms_init { 63 63 64 my $pbinit = shift || undef;65 my $param = shift || undef;64 my $pbinit = shift; 65 my $param = shift; 66 66 67 67 my ($pburl) = pb_conf_get("pburl"); … … 162 162 163 163 my @pkgs = (); 164 my $defpkgdir = shift || undef;165 my $extpkgdir = shift || undef;164 my $defpkgdir = shift; 165 my $extpkgdir = shift; 166 166 167 167 # Get packages list … … 188 188 sub pb_cms_get_real_pkg { 189 189 190 my $pbpkg = shift || undef;190 my $pbpkg = shift; 191 191 my $dtype = shift; 192 192 my $pbpkgreal = $pbpkg; … … 285 285 my $chglog = shift; 286 286 my $authors = shift; 287 my $testver = shift || undef;287 my $testver = shift; 288 288 289 289 pb_cms_create_authors($authors,$dest,$scheme); -
devel/pb/lib/ProjectBuilder/Changelog.pm
r1791 r1907 71 71 my $OUTPUT = shift; 72 72 my $doit = shift; 73 my $chglog = $pb->{'chglog'} || undef;73 my $chglog = $pb->{'chglog'}; 74 74 75 75 my $log = "";
Note:
See TracChangeset
for help on using the changeset viewer.