- Timestamp:
- May 9, 2012, 3:33:18 AM (13 years ago)
- Location:
- devel/pb-modules
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/etc/pb.conf
r1486 r1507 225 225 # Chaining the commands allow to only test for what is able to be installed, 226 226 # not the update of the repo which may well be unaccessible if too old 227 osins du = sudo /usr/bin/apt-get update ; sudo /usr/bin/apt-get -y install227 osins du = sudo /usr/bin/apt-get update ; sudo /usr/bin/apt-get -y --force-yes install 228 228 osins gen = sudo /usr/bin/emerge 229 229 osins rpm = sudo /usr/bin/yum clean all; sudo /usr/bin/yum -y update ; sudo /usr/bin/yum -y install -
devel/pb-modules/etc/pb.conf.pod
r1408 r1507 27 27 Nature: Optional 28 28 Key: package (as provided in defpkgdir or extpkgdir) 29 Value: com a separated list of OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch) that are excluded from the checkssh command (no build made for them). The OS name is generaly used here.29 Value: comma separated list of OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch) that are excluded from the checkssh command (no build made for them). The OS name is generaly used here. 30 30 Conffile: project 31 31 Example: checkexclude pkg1 = centos,lsb,solaris … … 83 83 Nature: Mandatory 84 84 Key: project (as defined in the -p option or PBPROJ environment variable) 85 Value: com a separated list of packages built by default in this project. When not using any package name as a parameter to pb commands, this list will be used.85 Value: comma separated list of packages built by default in this project. When not using any package name as a parameter to pb commands, this list will be used. 86 86 Conffile: project 87 87 Example: defpkgdir mondorescue = mondo,mindi NB: a default value is not really meaningful. … … 99 99 Nature: Optional 100 100 Key: project (as defined in the -p option or PBPROJ environment variable) 101 Value: com a separated list of packages built in addition in this project. When using the all package name as a parameter to pb commands, this list will be used, in addition to the defpkgdir list.101 Value: comma separated list of packages built in addition in this project. When using the all package name as a parameter to pb commands, this list will be used, in addition to the defpkgdir list. 102 102 Conffile: project 103 103 Example: extpkgdir mondorescue = mondo-doc,mindi-mindibusybox … … 107 107 Nature: Optional 108 108 Key: package (as provided in defpkgdir or extpkgdir) 109 Value: com a separated list of files that will be filtered using the macro system from pb, during the creation of the compressed source tar files for this package. Their path is relative to the directory containing the package.109 Value: comma separated list of files that will be filtered using the macro system from pb, during the creation of the compressed source tar files for this package. Their path is relative to the directory containing the package. 110 110 Conffile: project 111 111 Example: filteredfiles mindi = rootfs/sbin/init,mindi,install.sh,doc/mindi.8 112 112 113 =item B<ftp_proxy> 114 115 Nature: Optional 116 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). The family name is generaly used here. 117 Value: string indicating the proxy to use 118 Conffile: pb 119 Example: ftp_proxy default = http://example.com:3128/ 120 121 =item B<http_proxy> 122 123 Nature: Optional 124 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). The family name is generaly used here. 125 Value: string indicating the proxy to use 126 Conffile: pb 127 Example: http_proxy default = http://example.com:3128/ 128 113 129 =item B<logcmd> 114 130 … … 123 139 Nature: Optional 124 140 Key: project (as defined in the -p option or PBPROJ environment variable) 125 Value: In case the B<logcmd> command is internal, a com a separated list of the commands whose trace execution is to be captured in order to log context.141 Value: In case the B<logcmd> command is internal, a comma separated list of the commands whose trace execution is to be captured in order to log context. 126 142 Conffile: pb 127 143 Example: logcmds pbmkbm = mount,lsmod,esxcfg-module -l,df -T … … 131 147 Nature: Optional 132 148 Key: project (as defined in the -p option or PBPROJ environment variable) 133 Value: In case the B<logcmd> command is internal, a com a separated list of the files to capture in order to log context.149 Value: In case the B<logcmd> command is internal, a comma separated list of the files to capture in order to log context. 134 150 Conffile: pb 135 151 Example: logfiles pbmkbm = /etc/raidtab,/proc/cmdline,/proc/swaps … … 147 163 Nature: Mandatory 148 164 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). The family name is generaly used here. 149 Value: com a separated list of commands to be copied from the original OS to the target boot media tree (works recursively for directory creation on the target). Their actual path is deduced from the PATH variable.165 Value: comma separated list of commands to be copied from the original OS to the target boot media tree (works recursively for directory creation on the target). Their actual path is deduced from the PATH variable. 150 166 Conffile: pb 151 167 Example: mkbmbootcmds linux = perl,awk,gawk,dd,grep,uname … … 155 171 Nature: Mandatory 156 172 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). The family name is generaly used here. 157 Value: com a separated list of directories to be copied from the original OS to the target boot media tree (works recursively on the target).173 Value: comma separated list of directories to be copied from the original OS to the target boot media tree (works recursively on the target). 158 174 Conffile: pb 159 175 Example: mkbmbootdirs linux = /etc/ssh,/etc/udev,/etc/mdadm … … 163 179 Nature: Mandatory 164 180 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). The family name is generaly used here. 165 Value: com a separated list of files to be copied from the original OS to the target boot media tree (works recursively for directory creation on the target).181 Value: comma separated list of files to be copied from the original OS to the target boot media tree (works recursively for directory creation on the target). 166 182 Conffile: pb 167 183 Example: mkbmbootfiles linux = /etc/mdadm.conf,/etc/raidtab,/etc/modprobe.conf … … 203 219 Nature: Mandatory 204 220 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). The family name is generaly used here. 205 Value: com a separated list of empty directory paths to be created on the target boot media.221 Value: comma separated list of empty directory paths to be created on the target boot media. 206 222 Conffile: pb 207 223 Example: mkbmtargetdirs linux = /tmp,/dev … … 219 235 Nature: Optional 220 236 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). In that case, should be an OS name. 221 Value: com a separated list of distributions which use the same file name in /etc for different distributions (ex: /etc/redhat-release for redhat, rhel, mandriva,...). Cf: B<osrelambfile>237 Value: comma separated list of distributions which use the same file name in /etc for different distributions (ex: /etc/redhat-release for redhat, rhel, mandriva,...). Cf: B<osrelambfile> 222 238 Conffile: pb 223 239 Example: osambiguous debian = debian,ubuntu … … 283 299 Nature: Optional 284 300 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). NB: a default value is highly interesting here. 285 Value: com a separated list of packages needed before setupvm|ve can be run. Install them with your distribution in VM or automatically in VE when possible.301 Value: comma separated list of packages needed before setupvm|ve can be run. Install them with your distribution in VM or automatically in VE when possible. 286 302 Conffile: pb 287 303 Example: osmindep default = perl,sudo,wget,tar,make,gzip … … 323 339 Nature: Optional 324 340 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). 325 Value: com a separated list of perl modules needed by pb and not provided in a package format for the relative OS, and that will be installed from CPAN in your VM/VE.341 Value: comma separated list of perl modules needed by pb and not provided in a package format for the relative OS, and that will be installed from CPAN in your VM/VE. 326 342 Conffile: pb 327 343 Example: osperldep rhel-5 = Module-Build,File-MimeInfo,File-BaseDir,Mail-Sendmail … … 339 355 Nature: Optional (Mandatory if pbinstalltype is pkg) 340 356 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). 341 Value: com a separated list of packages that have to be installed in order for pb to be operational in the VE|VM357 Value: comma separated list of packages that have to be installed in order for pb to be operational in the VE|VM 342 358 Conffile: pb 343 359 Example: ospkg rhel-5 = project-builder … … 347 363 Nature: Optional 348 364 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). 349 Value: com a separated list of packages that are needed by pb and should be installed automatically in the VM/VE during the setupvm|ve phasis by pb.365 Value: comma separated list of packages that are needed by pb and should be installed automatically in the VM/VE during the setupvm|ve phasis by pb. 350 366 Conffile: pb 351 367 Example: ospkgdep rhel-5 = wget,make,ntp,patch,perl-DateManip … … 388 404 Nature: Optional (Mandatory if pbinstalltype is pkg) 389 405 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). 390 Value: com a separated list of packages or repo file to be added to the VE|VM to support package installation of pb406 Value: comma separated list of packages or repo file to be added to the VE|VM to support package installation of pb 391 407 Conffile: pb 392 408 Example: osrepo rpm = ftp://ftp.project-builder.org/$ddir/$dver/pb.repo … … 591 607 Example: rbsb4pi centos = /home/rinse/bin/before-post-install.sh 592 608 609 =item B<rbsmirrorsrv> 610 611 Nature: Optional 612 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). The family name is generaly used here. 613 Value: URL for the mirror server for setting up a virtual environment 614 Conffile: ve 615 Example: rbsmirrorsrv debian = http://mirrors1.kernel.org/ 616 593 617 =item B<rbsopt> 594 618 … … 619 643 Nature: Mandatory 620 644 Key: project (as defined in the -p option or PBPROJ environment variable) 621 Value: list of com a separated OS (under the form of os-ver-arch). The corresponding machines running these distributions are given in the rmpool parameter.645 Value: list of comma separated OS (under the form of os-ver-arch). The corresponding machines running these distributions are given in the rmpool parameter. 622 646 Conffile: rm 623 647 Example: rmlist default = mandriva-2010.2-i386,fedora-14-i386,rhel-6-i386,rhel-5-i386,pensuse-11.3-i386,sles-11-i386,gentoo-nover-i386,debian-5.0-i386,ubuntu-10.10-i386,solaris-10-i386,mandriva-2010.2-x86_64,fedora-14-x86_64,rhel-6-x86_64,rhel-5-x86_64,opensuse-11.3-x86_64,sles-11-x86_64,gentoo-nover-x86_64,debian-5.0-x86_64,ubuntu-10.10-x86_64,solaris-10-x86_64,hp-ux-11.3-ia64,rhel-5-ia64 … … 705 729 =item B<sshlogin> 706 730 707 Nature: Mandatory708 Key: project (as defined in the -p option or PBPROJ environment variable) 709 Value: login to use when connecting to the repository server B<sshhost> for package delivery. 731 Nature: Optional 732 Key: project (as defined in the -p option or PBPROJ environment variable) 733 Value: login to use when connecting to the repository server B<sshhost> for package delivery. whoami result by default 710 734 Conffile: project 711 735 Example: sshlogin mondorescue = mylogin … … 713 737 =item B<sshport> 714 738 715 Nature: Mandatory716 Key: project (as defined in the -p option or PBPROJ environment variable) 717 Value: port to use when connecting to the repository server B<sshhost> for package delivery. 739 Nature: Optional 740 Key: project (as defined in the -p option or PBPROJ environment variable) 741 Value: port to use when connecting to the repository server B<sshhost> for package delivery. 22 by default. 718 742 Conffile: project 719 743 Example: sshport mondorescue = 22 … … 743 767 Nature: Mandatory 744 768 Key: project (as defined in the -p option or PBPROJ environment variable) 745 Value: list of com a separated OS (under the form of os-ver-arch).769 Value: list of comma separated OS (under the form of os-ver-arch). 746 770 Conffile: ve 747 771 Example: velist default = centos-4-i386,centos-5-i386,centos-4-x86_64,centos-5-x86_64,debian-5.0-i386,debian-5.0-x86_64,lsb-4.0.1-i386,lsb-4.0.1-x86_64 … … 839 863 Nature: Mandatory 840 864 Key: project (as defined in the -p option or PBPROJ environment variable) 841 Value: list of com a separated OS (under the form of os-ver-arch).865 Value: list of comma separated OS (under the form of os-ver-arch). 842 866 Conffile: vm 843 867 Example: vmlist default = asianux-2-i386,asianux-3-i386,mandrake-10.1-i386,mandrake-10.2-i386,mandriva-2006.0-i386,mandriva-2007.0-i386,mandriva-2007.1-i386,mandriva-2008.0-i386,mandriva-2008.1-i386,mandriva-2009.0-i386,mandriva-2009.1-i386,mandriva-2010.0-i386,redhat-7.3-i386,redhat-9-i386,fedora-4-i386,fedora-5-i386,fedora-6-i386,fedora-7-i386,fedora-8-i386,fedora-9-i386,fedora-10-i386,fedora-11-i386,fedora-12-i386,rhel-2.1-i386,rhel-3-i386,rhel-4-i386,rhel-5-i386,suse-10.0-i386,suse-10.1-i386,suse-10.2-i386,opensuse-10.3-i386,opensuse-11.0-i386,opensuse-11.1-i386,opensuse-11.2-i386,sles-9-i386,sles-10-i386,sles-11-i386,gentoo-nover-i386,debian-3.1-i386,debian-4.0-i386,debian-5.0-i386,ubuntu-6.06-i386,ubuntu-7.04-i386,ubuntu-7.10-i386,ubuntu-8.04-i386,ubuntu-8.10-i386,ubuntu-9.04-i386,ubuntu-9.10-i386,solaris-10-i386,asianux-2-x86_64,asianux-3-x86_64,mandriva-2007.0-x86_64,mandriva-2007.1-x86_64,mandriva-2008.0-x86_64,mandriva-2008.1-x86_64,mandriva-2009.0-x86_64,mandriva-2009.1-x86_64,mandriva-2010.0-x86_64,fedora-6-x86_64,fedora-7-x86_64,fedora-8-x86_64,fedora-9-x86_64,fedora-10-x86_64,fedora-11-x86_64,fedora-12-x86_64,rhel-3-x86_64,rhel-4-x86_64,rhel-5-x86_64,suse-10.2-x86_64,opensuse-10.3-x86_64,opensuse-11.0-x86_64,opensuse-11.1-x86_64,opensuse-11.2-x86_64,sles-10-x86_64,sles-11-x86_64,gentoo-nover-x86_64,debian-4.0-x86_64,debian-5.0-x86_64,ubuntu-7.04-x86_64,ubuntu-7.10-x86_64,ubuntu-8.04-x86_64,ubuntu-8.10-x86_64,ubuntu-9.04-x86_64,ubuntu-9.10-x86_64,solaris-10-x86_64 -
devel/pb-modules/lib/ProjectBuilder/Conf.pm
r1495 r1507 11 11 12 12 use strict; 13 use Carp 'confess'; 13 14 use Data::Dumper; 14 15 use ProjectBuilder::Base; … … 364 365 365 366 foreach my $i (0..$#param) { 366 die"No $param[$i] defined for $proj" if (not defined $return[$i]);367 confess "No $param[$i] defined for $proj" if (not defined $return[$i]); 367 368 } 368 369 return(@return); -
devel/pb-modules/lib/ProjectBuilder/Distribution.pm
r1505 r1507 15 15 use File::Basename; 16 16 use File::Copy; 17 # requires perl 5.004 minimum in VM/VE 18 use File::Compare; 17 19 18 20 # Global vars … … 441 443 } 442 444 445 # Internal 446 sub pb_distro_compare_repo { 447 448 my $src = shift; 449 my $dest = shift; 450 451 if (-f $dest && -s $dest == 0) { 452 pb_log(1, "Overwriting empty file $dest"); 453 } elsif (-f $dest && compare("$src", $dest) == 0) { 454 pb_log(1, "Overwriting identical file $dest"); 455 } elsif (not -f $dest) { 456 pb_log(1, "Creating new $dest"); 457 } else { 458 pb_log(0, "ERROR: destination file $dest exists and is different than source $src\n"); 459 return(0); 460 } 461 # TRUE 462 return(1); 463 } 464 443 465 =item B<pb_distro_setuprepo_gen> 444 466 … … 469 491 # The repo file can be local or remote. download or copy at the right place 470 492 if (($scheme eq "ftp") || ($scheme eq "http")) { 471 pb_system("wget -O $ENV{'PBTMP'}/$bn $i","Do nwloading additional repository file $i");493 pb_system("wget -O $ENV{'PBTMP'}/$bn $i","Downloading additional repository file $i"); 472 494 } else { 473 495 copy($i,$ENV{'PBTMP'}/$bn); … … 484 506 } elsif ($bn =~ /\.repo$/) { 485 507 # Yum repo 508 my $dest = "/etc/yum.repos.d/$bn"; 509 return if (pb_distro_compare_repo($ENV{'PBTMP'}/$bn,$dest)); 486 510 pb_system("sudo mv $ENV{'PBTMP'}/$bn /etc/yum.repos.d","Adding yum repository") if (not -f "/etc/yum.repos.d/$bn"); 487 511 } elsif ($bn =~ /\.addmedia/) { … … 490 514 pb_system("chmod 755 $ENV{'PBTMP'}/$bn ; sudo $ENV{'PBTMP'}/$bn 2>&1 > /dev/null","Adding urpmi repository"); 491 515 } else { 492 pb_log(0," Unable to deal with repository file $i on rpm distro ! Please report to dev team\n");516 pb_log(0,"ERROR: Unable to deal with repository file $i on rpm distro ! Please report to dev team\n"); 493 517 } 494 518 } elsif ($pbos->{'type'} eq "deb") { 495 if (($bn =~ /\.sources.list$/) && (not -f "/etc/apt/sources.list.d/$bn")) { 519 if ($bn =~ /\.sources.list$/) { 520 my $dest = "/etc/apt/sources.list.d/$bn"; 521 return if (pb_distro_compare_repo($ENV{'PBTMP'}/$bn,$dest)); 496 522 pb_system("sudo mv $ENV{'PBTMP'}/$bn /etc/apt/sources.list.d","Adding apt repository"); 497 523 pb_system("sudo apt-get update","Updating apt repository"); 498 524 } else { 499 pb_log(0," Unable to deal with repository file $i on deb distro ! Please report to dev team\n");525 pb_log(0,"ERROR: Unable to deal with repository file $i on deb distro ! Please report to dev team\n"); 500 526 } 501 527 } else { 502 pb_log(0," Unable to deal with repository file $i on that distro ! Please report to dev team\n");528 pb_log(0,"ERROR: Unable to deal with repository file $i on that distro ! Please report to dev team\n"); 503 529 } 504 530 }
Note:
See TracChangeset
for help on using the changeset viewer.