Changeset 2241 in ProjectBuilder
- Timestamp:
- Aug 2, 2017, 6:16:44 PM (8 years ago)
- Location:
- devel
- Files:
-
- 1 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-doc/SECURITY
r2239 r2241 9 9 In the Distributions.pm module there are sudo calls, corresponding to the abilty to configure automatically additional repositories. That feature may not be used on RM or solved manually without problem. In case this is used, and sudo isn't configured accordingly, then the additional repo will NOT be added and the build will probably fail. 10 10 11 In the default pb. ymlmain configuration files, parameters for osupd and osins for the various distributions call sudo to make the installation of missing packages. These calls are done as 'pb' user by default (or the account configured as rmlogin in the configuration file). In case this is used, and sudo isn't configured accordingly, then the additional required packages will NOT be added and the build will probably fail.11 In the default pb.conf main configuration files, parameters for osupd and osins for the various distributions call sudo to make the installation of missing packages. These calls are done as 'pb' user by default (or the account configured as rmlogin in the configuration file). In case this is used, and sudo isn't configured accordingly, then the additional required packages will NOT be added and the build will probably fail. 12 12 For RM, we may consider that all required packages for the build are already installed on the system, or give rpm/yum/dnf/apt/urpmi/zypper... sudo rights to the build account manually. 13 13 Recommended for a manual setup (not using rmsetup): Add manually to your system sudo access for the pb account to the local package install and update command such as /bin/rpm e.g: -
devel/pb-modules/Makefile.PL
r2239 r2241 74 74 $text .= "\t".'chmod 755 $(DESTDIR)'."$sharedir\n"; 75 75 $text .= "\t".'cp etc/pb.conf $(DESTDIR)'."$sharedir\n"; 76 $text .= "\t".'cp etc/pb.yml $(DESTDIR)'."$sharedir\n";77 76 78 77 # Also create a fake version in /etc/pb for sysadmin to modify … … 80 79 $text .= "\t".'chmod 755 $(DESTDIR)'."$sysconfdir\n"; 81 80 $text .= "\t".'perl -p -e \'s|^|#|\' etc/pb.conf > $(DESTDIR)/'."$sysconfdir/pb.conf\n"; 82 $text .= "\t".'perl -p -e \'s|^|#|\' etc/pb.yml > $(DESTDIR)/'."$sysconfdir/pb.yml\n";83 81 # Doesn't seem to work in the makefile generated for now :-( 84 82 #$text .= "\t".'perl -p -e \'s|^([^#])|#$1|\' etc/pb.conf > $(DESTDIR)/'."$sysconfdir/pb.conf\n"; … … 87 85 $text .= "\t".'mkdir -p $(DESTDIR)'."$mandir/man5\n"; 88 86 $text .= "\t".'pod2man --section=5 etc/pb.conf.pod > $(DESTDIR)'."$mandir/man5/pb.conf.5\n"; 89 $text .= "\t".'pod2man --section=5 etc/pb.conf.pod > $(DESTDIR)'."$mandir/man5/pb.yml.5\n";90 87 return($text); 91 88 } -
devel/pb-modules/bin/pbdistrocheck
r2239 r2241 94 94 =head1 CONFIGURATION FILES 95 95 96 Uses the main /etc/pb/pb. yml (or /usr/local/etc/pb/pb.ymlif installed from files) configuration file to give its answers.96 Uses the main /etc/pb/pb.conf (or /usr/local/etc/pb/pb.conf if installed from files) configuration file to give its answers. 97 97 98 98 =head1 AUTHORS -
devel/pb-modules/bin/pbgetparam
r2239 r2241 75 75 =head1 CONFIGURATION FILES 76 76 77 Uses the main /etc/pb/pb. yml (or /usr/local/etc/pb/pb.ymlif installed from files) configuration file to give its answers.77 Uses the main /etc/pb/pb.conf (or /usr/local/etc/pb/pb.conf if installed from files) configuration file to give its answers. 78 78 79 79 =head1 AUTHORS -
devel/pb-modules/etc/pb.conf.pod
r2239 r2241 17 17 The key could be also default, in which case it will be used as a default value if no more precise content is given for the key. 18 18 19 Each value is detailed below giving the nature of its use (Mandatory or Optional - only used for certain feature), the value of the key (could be the project, an OS name, default, ...), the value of the parameter field and its format, the default configuration file in which it should be defined (home $HOME/.pbrc, conf /etc/pb/pb. yml or /usr/local/etc/pb/pb.yml, VE vepath/.pbrc, VM vmpath/.pbrc, or project project.pb) and an example of use.19 Each value is detailed below giving the nature of its use (Mandatory or Optional - only used for certain feature), the value of the key (could be the project, an OS name, default, ...), the value of the parameter field and its format, the default configuration file in which it should be defined (home $HOME/.pbrc, conf /etc/pb/pb.conf or /usr/local/etc/pb/pb.conf, VE vepath/.pbrc, VM vmpath/.pbrc, or project project.pb) and an example of use. 20 20 21 21 =head1 OPTIONS -
devel/pb-modules/etc/pb.yml
r2239 r2241 1 ---2 1 # $Id$ 3 # 2 # 4 3 # Main configuration file for project-builder.org 5 4 # … … 10 9 # 11 10 # Define Operating systems 12 # 13 14 # 11 # 12 13 # 15 14 # For the following keys osrelfile and osrelambfile: 16 15 # The left member is the key that will be used overall as the OS name … … 20 19 # all the keys from osrelfile and osrelambfile, and the values of osrelambfile 21 20 # 21 --- 22 22 # 23 23 # The following conf info are for pb_distro_get (man ProjectBuilder::Distribution) … … 558 558 # What is the regular expression to find the kernel file 559 559 mkbmkernelnamere: 560 #linux: ^linu|^vmlinu|^xen560 linux: ^linu|^vmlinu|^xen 561 561 562 562 # Files to add on the boot media to support a full working system … … 568 568 linux: 569 569 # Commands to add 570 mkbmbasecmds :570 mkbmbasecmds 571 571 linux: file,bzip2,bunzip2,bash,date,ctrlaltdel,wc,xargs,less,ldconfig,tee,efibootmgr,lilo,grub,elilo,fdisk,parted 572 572 # 573 573 # To support debug 574 mkbmdbgfiles :574 mkbmdbgfiles 575 575 linux: 576 mkbmdbgcmds :576 mkbmdbgcmds 577 577 linux: ldd,strace,valgrind,dmidecode,lsusb,lshw,lspci,ethtool 578 mkbmdbgdirs :578 mkbmdbgdirs 579 579 linux: /usr/lib/valgrind,/usr/lib64/valgrind 580 580 581 581 # Where are the ISO bootloader for this OS 582 mkbmisobl :582 mkbmisobl 583 583 linux: /usr/lib/syslinux/isolinux.bin,/usr/lib64/syslinux/isolinux.bin 584 mkbmkbd :584 mkbmkbd 585 585 mageia: /usr/lib/kbd 586 586 … … 661 661 rhel-7: wget,make,ntpdate,patch,perl-Date-Manip,rpm-build,diffutils,perl-Module-Build 662 662 centos-7: wget,make,ntpdate,patch,perl-Date-Manip,rpm-build,diffutils,perl-Module-Build,perl-ExtUtils-MakeMaker,perl-File-MimeInfo,perl-File-BaseDir 663 redhat :663 redhat = 664 664 suse: wget,make,ntp,patch,diffutils 665 665 opensuse: openSUSE-release,wget,make,ntp,patch,perl-Date-Manip,perl-File-HomeDir,diffutils,rpm-build … … 792 792 # Do you want to see detailed sudo commands or just the summary of them 793 793 # Useful for security concerns, nice to have it as a parameter 794 794 pbshowsudo: 795 795 default: false 796 796 797 797 # Do not stop on errors by default (VE/VM are still broken with it on) 798 798 pbstoponerr: 799 799 default: false 800 800 … … 809 809 # Where is the associated repo 810 810 osrepo: 811 redhat-6.2 :811 redhat-6.2 = 812 812 rpm: ftp://ftp.project-builder.org/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}/pb.repo 813 813 mageia: ftp://ftp.project-builder.org/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}/pb.addmedia … … 872 872 # CPAN upload info (info from cpanupload) 873 873 # 874 874 cpanpause: 875 875 default: pause.perl.org 876 876 cpandir: 877 877 default: incoming 878 878 cpansubdir: 879 879 default: 880 880 cpanurl: 881 881 default: http://pause.perl.org/pause/authenquery 882 882 #cpanuser: -
devel/pb-modules/lib/ProjectBuilder/Conf.pm
r2239 r2241 19 19 use ProjectBuilder::Base; 20 20 use ProjectBuilder::Version; 21 #use YAML; 21 22 22 23 # Inherit from the "Exporter" module which handles exporting functions. 23 24 24 use vars qw($VERSION $REVISION $PBCONFVER@ISA @EXPORT);25 use vars qw($VERSION $REVISION @ISA @EXPORT); 25 26 use Exporter; 26 27 … … 30 31 our @ISA = qw(Exporter); 31 32 our @EXPORT = qw(pb_conf_init pb_conf_add pb_conf_read pb_conf_read_if pb_conf_write pb_conf_get pb_conf_get_if pb_conf_get_all pb_conf_get_hash pb_conf_cache); 32 ($VERSION,$REVISION ,$PBCONFVER) = pb_version_init();33 ($VERSION,$REVISION) = pb_version_init(); 33 34 34 35 # Global hash of conf files … … 69 70 to allow for overwrite to work: 70 71 71 1. /usr/share/pb/pb. yml- the read-only system conf file provided by install72 2. /etc/pb/pb. yml- the same global conf file given to the sysadmin in order to make system wide modifications72 1. /usr/share/pb/pb.conf - the read-only system conf file provided by install 73 2. /etc/pb/pb.conf - the same global conf file given to the sysadmin in order to make system wide modifications 73 74 3. /path/to/project.pb - Configuration file for the project we're building for 74 75 4. /(vm|ve|rm)path/to/.pbrc - configuration file for VM, VE or RM specific parameters. Cumulative should be orthogonal … … 123 124 my $cf = shift; 124 125 my $lh = shift; 125 126 my $ldfunc; 127 128 eval { 129 require YAML; 130 YAML->import(); 131 $ldfunc = \&YAML::LoadFile; 132 }; 133 if ($@) { 134 # No YAML found using a more std but less complete one. Old perl only 135 use Module::Build::YAML; 136 $ldfunc = \&Module::Build::YAML::LoadFile; 137 } 126 my $confver = "0.14"; 138 127 139 128 # Read the content of the config file and cache it in the %h hash then available for queries 140 if ($ PBCONFVER < 1) {129 if ($confver < 0.15) { 141 130 open(CONF,$cf) || confess "Unable to open $cf"; 142 131 # This is the original conf file format for versions up to 0.14 … … 150 139 close(CONF); 151 140 } else { 152 $lh = $ldfunc->($cf);141 $lh = LoadFile($cf); 153 142 } 154 143 return($lh); … … 262 251 my $conffile = shift; 263 252 my $h = shift; 264 my $dpfunc; 265 266 eval { 267 require YAML; 268 YAML->import(); 269 $dpfunc = \&YAML::Dump; 270 }; 271 if ($@) { 272 # No YAML found using a more std but less complete one. Old perl only 273 use Module::Build::YAML; 274 $dpfunc = \&Module::Build::YAML::Dump; 275 } 253 my $confver = "0.14"; 276 254 277 255 confess "No configuration file defined to write into !" if (not defined $conffile); … … 279 257 open(CONF,"> $conffile") || confess "Unable to write into $conffile"; 280 258 281 if ($ PBCONFVER < 1) {259 if ($confver < 0.15) { 282 260 # This is the original conf file format for versions up to 0.14 283 261 foreach my $p (sort keys %$h) { … … 289 267 } else { 290 268 # This is the new YAML format 291 print CONF $dpfunc->($h);269 print CONF Dump($h); 292 270 } 293 271 close(CONF); -
devel/pb-modules/lib/ProjectBuilder/Distribution.pm
r2239 r2241 26 26 # Inherit from the "Exporter" module which handles exporting functions. 27 27 28 use vars qw($VERSION $REVISION $PBCONFVER@ISA @EXPORT);28 use vars qw($VERSION $REVISION @ISA @EXPORT); 29 29 use Exporter; 30 30 … … 34 34 our @ISA = qw(Exporter); 35 35 our @EXPORT = qw(pb_distro_init pb_distro_conffile pb_distro_sysconffile pb_distro_get pb_distro_getlsb pb_distro_installdeps pb_distro_getdeps pb_distro_only_deps_needed pb_distro_setuprepo pb_distro_setuposrepo pb_distro_setuprepo_gen pb_distro_get_param pb_distro_get_context pb_distro_to_keylist pb_distro_conf_print pb_apply_conf_proxy); 36 ($VERSION,$REVISION ,$PBCONFVER) = pb_version_init();36 ($VERSION,$REVISION) = pb_version_init(); 37 37 38 38 =pod … … 77 77 sub pb_distro_conffile { 78 78 79 if ($PBCONFVER < 1) { 80 return("CCCC/pb.conf"); 81 } else { 82 return("CCCC/pb.yml"); 83 } 79 return("CCCC/pb.conf"); 84 80 } 85 81 … … 92 88 sub pb_distro_sysconffile { 93 89 94 if ($PBCONFVER < 1) { 95 return("SSSS/pb.conf"); 96 } else { 97 return("SSSS/pb.yml"); 98 } 90 return("SSSS/pb.conf"); 99 91 } 100 92 … … 107 99 Mandriva, Open SuSE and Fedora have all the same "rpm" type of build system. Ubuntu and Debian have the same "deb" type of build system. 108 100 And "fc" is the extension generated for all Fedora packages (Version will be added by pb). 109 All this information is stored in an external configuration file typically at /etc/pb/pb. yml101 All this information is stored in an external configuration file typically at /etc/pb/pb.conf 110 102 111 103 When passing the distribution name and version as parameters, the B<pb_distro_init> function returns the parameter of that distribution instead of the underlying one. … … 643 635 my $dirdest = ""; 644 636 my $reponame = ""; 645 # TODO: could go in pb. ymlin fact637 # TODO: could go in pb.conf in fact 646 638 if ($pbos->{install} =~ /\byum\b/) { 647 639 $reponame="yum"; -
devel/pb-modules/lib/ProjectBuilder/Version.pm
r2239 r2241 29 29 my $projectbuilderver = $VERSION; 30 30 my $projectbuilderrev = $REVISION; 31 # We fix the format of the conf file for this version of pb32 my $projectbuilderconfver = 1;33 31 34 return($projectbuilderver,$projectbuilderrev ,$projectbuilderconfver);32 return($projectbuilderver,$projectbuilderrev); 35 33 } 36 34 1; -
devel/pb/bin/pb
r2239 r2241 831 831 if ($@) { 832 832 # Sys::CPU not found, defaulting to 1 833 pb_log(1,"ADVISE: Install Sys::CPU to benefit from automatic parallelism optimization.\nOr use pbparallel in your pb. ymlfile\nOnly 1 process at a time for the moment\n");833 pb_log(1,"ADVISE: Install Sys::CPU to benefit from automatic parallelism optimization.\nOr use pbparallel in your pb.conf file\nOnly 1 process at a time for the moment\n"); 834 834 $pbparallel = 1; 835 835 } else { … … 4906 4906 if ($@) { 4907 4907 # Linux::SysInfo not found 4908 pb_log(1,"ADVISE: Install Linux::SysInfo to benefit from automatic parallelism optimization.\nOr optimize manually pbparallel in your pb. ymlfile\nUsing $pbparallel processes max at a time for the moment\nWARNING: This may consume too much memory for your system\n");4908 pb_log(1,"ADVISE: Install Linux::SysInfo to benefit from automatic parallelism optimization.\nOr optimize manually pbparallel in your pb.conf file\nUsing $pbparallel processes max at a time for the moment\nWARNING: This may consume too much memory for your system\n"); 4909 4909 } else { 4910 4910 # Using the memory size 4911 4911 my $si = Linux::SysInfo::sysinfo(); 4912 4912 if (not defined $si) { 4913 pb_log(1,"ADVISE: Install Linux::SysInfo to benefit from automatic parallelism optimization.\nOr optimize manually pbparallel in your pb. ymlfile\nUsing $pbparallel processes max at a time for the moment\nWARNING: This may consume too much memory for your system\n");4913 pb_log(1,"ADVISE: Install Linux::SysInfo to benefit from automatic parallelism optimization.\nOr optimize manually pbparallel in your pb.conf file\nUsing $pbparallel processes max at a time for the moment\nWARNING: This may consume too much memory for your system\n"); 4914 4914 } else { 4915 4915 # Keep the number of VM whose memory can be allocated -
devel/pbmkbm/bin/pbmkbm
r2239 r2241 183 183 =head1 CONFIGURATION FILE 184 184 185 Uses Project-Builder.org configuration file (/etc/pb/pb. yml or /usr/local/etc/pb/pb.yml)185 Uses Project-Builder.org configuration file (/etc/pb/pb.conf or /usr/local/etc/pb/pb.conf) 186 186 187 187 =head1 AUTHORS -
devel/rpmbootstrap/bin/rpmbootstrap
r2239 r2241 50 50 rpmbootstrap works in 2 phases. The first one is used to download all 51 51 the required packages to have a working package management system in the 52 chroot working. This list of packages is stored in /etc/pb/pb. ymlunder52 chroot working. This list of packages is stored in /etc/pb/pb.conf under 53 53 the rbsmindep parameter (aka rpmbootstrap minimal dependencies). Once the 54 54 packages have been downloaded from the mirror, they are extracted with … … 160 160 =head1 CONFIGURATION FILE 161 161 162 Uses Project-Builder.org configuration file (/etc/pb/pb. yml or /usr/local/etc/pb/pb.yml)162 Uses Project-Builder.org configuration file (/etc/pb/pb.conf or /usr/local/etc/pb/pb.conf) 163 163 164 164 =head1 AUTHORS
Note:
See TracChangeset
for help on using the changeset viewer.