Changeset 1216 in ProjectBuilder
- Timestamp:
- Feb 24, 2011, 1:51:30 AM (14 years ago)
- Location:
- devel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/etc/pb.conf.pod
r1215 r1216 450 450 451 451 Nature: Mandatory 452 Key: project (as defined in the -p option or PBPROJ environment variable)452 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). 453 453 Value: NTP command to use to perform time synchronization with the B<rmntp> server. Use full path name, as this command will be used in the sudoers file to allow its launch by root. 454 454 Conffile: rm … … 466 466 467 467 Nature: Mandatory 468 Key: project (as defined in the -p option or PBPROJ environment variable)468 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). 469 469 Value: port number to use to communicate with the RM using the SSH protocol. This localport is redirected to the port 22 of the RM. 470 470 Conffile: rm … … 487 487 Example: rmrtype default = ssh 488 488 489 =item B<sshdir> 490 491 Nature: Mandatory 492 Key: project (as defined in the -p option or PBPROJ environment variable) 493 Value: dirname into which packages are uploaded on the B<sshhost> machine. 494 Conffile: project 495 Example: sshdir mondorescue = /pub/mondorescue 496 497 =item B<sshhost> 498 499 Nature: Mandatory 500 Key: project (as defined in the -p option or PBPROJ environment variable) 501 Value: hostname to connect to in order to deliver packages to the repository server. 502 Conffile: project 503 Example: sshhost mondorescue = ftp.mondorescue.org 504 505 =item B<sshlogin> 506 507 Nature: Mandatory 508 Key: project (as defined in the -p option or PBPROJ environment variable) 509 Value: login to use when connecting to the repository server B<sshhost> for package delivery. 510 Conffile: project 511 Example: sshlogin mondorescue = mylogin 512 513 =item B<sshport> 514 515 Nature: Mandatory 516 Key: project (as defined in the -p option or PBPROJ environment variable) 517 Value: port to use when connecting to the repository server B<sshhost> for package delivery. 518 Conffile: project 519 Example: sshport mondorescue = 22 489 520 490 521 =item B<supfiles> … … 596 627 Example: vmcmd default = /usr/bin/kvm 597 628 598 599 629 =item B<vmhost> 600 630 601 631 Nature: Mandatory 602 Key: project (as defined in the -p option or PBPROJ environment variable)632 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). 603 633 Value: hostname to connect to in order to reach the VM through ssh. Generally redirected from a port on localhost. 604 634 Conffile: vm … … 624 654 625 655 Nature: Optional 626 Key: project (as defined in the -p option or PBPROJ environment variable)656 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). 627 657 Value: Memory size in MB to allocate to the VM. 628 658 Conffile: vm … … 648 678 649 679 Nature: Mandatory 650 Key: project (as defined in the -p option or PBPROJ environment variable)680 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). 651 681 Value: NTP command to use to perform time synchronization with the B<vmntp> server. Use full path name, as this command will be used in the sudoers file to allow its launch by root. 652 682 Conffile: vm … … 680 710 681 711 Nature: Mandatory 682 Key: project (as defined in the -p option or PBPROJ environment variable)712 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). 683 713 Value: Size of the VM to create when using the newvm command of pb. 684 714 Conffile: vm … … 716 746 Conffile: project 717 747 Example: webdir mondorescue = website 748 749 =item B<websshdir> 750 751 Nature: Optional (when not using *2webssh commands) 752 Key: project (as defined in the -p option or PBPROJ environment variable) 753 Value: dirname into which content is uploaded on the B<websshhost> machine. 754 Conffile: project 755 Example: websshdir mondorescue = /var/www/html 756 757 =item B<websshhost> 758 759 Nature: Optional (when not using *2webssh commands) 760 Key: project (as defined in the -p option or PBPROJ environment variable) 761 Value: hostname to connect to in order to deliver content to the Web server. 762 Conffile: project 763 Example: websshhost mondorescue = www.mondorescue.org 764 765 =item B<websshlogin> 766 767 Nature: Optional (when not using *2webssh commands) 768 Key: project (as defined in the -p option or PBPROJ environment variable) 769 Value: login to use when connecting to the Web server B<websshhost> for content delivery. 770 Conffile: project 771 Example: websshlogin mondorescue = mylogin 772 773 =item B<websshport> 774 775 Nature: Optional (when not using *2webssh commands) 776 Key: project (as defined in the -p option or PBPROJ environment variable) 777 Value: port to use when connecting to the Web server B<websshhost> for content delivery. 778 Conffile: project 779 Example: websshport mondorescue = 22 718 780 719 781 =back -
devel/pb/bin/pb
r1215 r1216 1617 1617 ($vtmout) = pb_conf_get($tmout); 1618 1618 } 1619 my $sshmachine = $sshhost->{$ENV{'PBPROJ'}}; 1620 if ($cmt =~ /^RM/) { 1621 # In that case our real host is in the rmhost with the OS as key, not project as above 1622 $sshmachine = pb_distro_get_param($pbos,$sshhost); 1623 } 1624 pb_log(2,"ssh: ".Dumper(($sshhost,$sshlogin,$sshdir,$sshport,$vtmout,$vepath,$rbsconf))."\n"); 1619 my $remhost = $sshhost->{$ENV{'PBPROJ'}}; 1620 my $remdir = $sshdir->{$ENV{'PBPROJ'}}; 1621 if ($cmt =~ /^V[EM]|RM/) { 1622 # In that case our real host is in the xxhost with the OS as key, not project as above 1623 $remhost = pb_distro_get_param($pbos,$sshhost); 1624 } 1625 pb_log(2,"ssh: ".Dumper(($remhost,$sshlogin,$remdir,$sshport,$vtmout,$vepath,$rbsconf))."\n"); 1625 1626 1626 1627 my $mac; 1627 1628 if ($cmt !~ /^VE/) { 1628 $mac = "$sshlogin->{$ENV{'PBPROJ'}}\@$ sshmachine";1629 $mac = "$sshlogin->{$ENV{'PBPROJ'}}\@$remhost"; 1629 1630 # Overwrite account value if passed as parameter 1630 $mac = "$pbaccount\@$ sshmachine" if (defined $pbaccount);1631 $mac = "$pbaccount\@$remhost" if (defined $pbaccount); 1631 1632 pb_log(2, "DEBUG: pbaccount: $pbaccount => mac: $mac\n") if (defined $pbaccount); 1632 1633 } else { … … 1640 1641 my $bdir; 1641 1642 if (($cmt eq "Sources") || ($cmt =~ /(V[EM]|RM)Script/)) { 1642 $tdir = "$ sshdir->{$ENV{'PBPROJ'}}/$delivery->{$ENV{'PBPROJ'}}/src";1643 $tdir = "$remdir/$delivery->{$ENV{'PBPROJ'}}/src"; 1643 1644 } elsif ($cmt =~ /(V[EM]|RM)(build|test)/) { 1644 $tdir = $ sshdir->{$ENV{'PBPROJ'}}."/$ENV{'PBPROJ'}/delivery";1645 $bdir = $ sshdir->{$ENV{'PBPROJ'}}."/$ENV{'PBPROJ'}/build";1645 $tdir = $remdir."/$ENV{'PBPROJ'}/delivery"; 1646 $bdir = $remdir."/$ENV{'PBPROJ'}/build"; 1646 1647 # Remove a potential $ENV{'HOME'} as bdir should be relative to pb's home 1647 1648 $bdir =~ s|\$ENV.+\}/||; 1648 1649 } elsif ($cmt eq "Announce") { 1649 $tdir = "$ sshdir->{$ENV{'PBPROJ'}}/$delivery->{$ENV{'PBPROJ'}}";1650 $tdir = "$remdir/$delivery->{$ENV{'PBPROJ'}}"; 1650 1651 } elsif ($cmt eq "Web") { 1651 $tdir = "$ sshdir->{$ENV{'PBPROJ'}}/$delivery->{$ENV{'PBPROJ'}}";1652 $tdir = "$remdir/$delivery->{$ENV{'PBPROJ'}}"; 1652 1653 } elsif ($cmt eq "Packages") { 1653 1654 if (($pbos->{'type'} eq "rpm") || ($pbos->{'type'} eq "pkg") || ($pbos->{'type'} eq "hpux") || ($pbos->{'type'} eq "tgz")) { 1654 1655 # put packages under an arch subdir 1655 $tdir = "$ sshdir->{$ENV{'PBPROJ'}}/$delivery->{$ENV{'PBPROJ'}}/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}";1656 $tdir = "$remdir/$delivery->{$ENV{'PBPROJ'}}/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}"; 1656 1657 } elsif (($pbos->{'type'} eq "deb") || ($pbos->{'type'} eq "ebuild")) { 1657 1658 # No need for an arch subdir 1658 $tdir = "$ sshdir->{$ENV{'PBPROJ'}}/$delivery->{$ENV{'PBPROJ'}}/$pbos->{'name'}/$pbos->{'version'}";1659 $tdir = "$remdir/$delivery->{$ENV{'PBPROJ'}}/$pbos->{'name'}/$pbos->{'version'}"; 1659 1660 } else { 1660 1661 die "Please teach the dev team where to deliver ($pbos->{'type'} type of packages\n"; … … 1662 1663 1663 1664 my $repodir = $tdir; 1664 $repodir =~ s|^$ sshdir->{$ENV{'PBPROJ'}}/||;1665 $repodir =~ s|^$remdir/||; 1665 1666 1666 1667 my ($pbrepo) = pb_conf_get("pbrepo"); … … 1845 1846 my $tm = undef; 1846 1847 if ($cmt =~ /^(V|R)M/) { 1847 $tm = $vtmout->{$ ENV{'PBPROJ'}};1848 $tm = $vtmout->{$v}; 1848 1849 } 1849 1850 … … 2168 2169 if (($vmtype eq "qemu") || ($vmtype eq "xen") || ($vmtype eq "kvm")) { 2169 2170 my $command = pb_check_req("qemu-img",0); 2170 pb_system("$command create -f qcow2 $vmm $vmsize->{$ ENV{'PBPROJ'}}","Creating the QEMU VM");2171 pb_system("$command create -f qcow2 $vmm $vmsize->{$v}","Creating the QEMU VM"); 2171 2172 } elsif ($vmtype eq "vmware") { 2172 2173 } else { … … 2388 2389 2389 2390 my $vtype = shift; 2390 my $ v= shift;2391 my $pbos = shift; 2391 2392 2392 2393 my ($ntp) = pb_conf_get_if($vtype."ntp"); … … 2395 2396 2396 2397 if (defined $vntp) { 2397 my ($ntpcmd) = pb_ conf_get($vtype."ntpcmd");2398 my ($ntpcmd) = pb_distro_get_param($pbos,pb_conf_get($vtype."ntpcmd")); 2398 2399 my $vntpcmd; 2399 if (defined $ntpcmd->{ $v}) {2400 $vntpcmd = $ntpcmd->{ $v};2400 if (defined $ntpcmd->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"}) { 2401 $vntpcmd = $ntpcmd->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"}; 2401 2402 } elsif (defined $ntpcmd->{$ENV{'PBPROJ'}}) { 2402 2403 $vntpcmd = $ntpcmd->{$ENV{'PBPROJ'}}; … … 2482 2483 } 2483 2484 2484 my $ntpline = pb_date2v($vtype,$v); 2485 # Get distro context 2486 my $pbos = pb_distro_get_context($v); 2487 2488 my $ntpline = pb_date2v($vtype,$pbos); 2485 2489 print SCRIPT "# Time sync\n"; 2486 2490 print SCRIPT "echo 'setting up date with '"; … … 2726 2730 $pm->start($counter) and next if (defined $pbparallel); 2727 2731 2728 # Deal with date sync.2729 my $ntpline = pb_date2v($vtype,$v);2730 2731 2732 # Get distro context 2732 2733 my $pbos = pb_distro_get_context($v); 2733 2734 2735 # Deal with date sync. 2736 my $ntpline = pb_date2v($vtype,$pbos); 2737 2734 2738 # Name of the account to deal with for VM/VE/RM 2735 2739 # Do not use the one passed potentially with -a
Note:
See TracChangeset
for help on using the changeset viewer.