Changeset 1198 in ProjectBuilder
- Timestamp:
- Feb 17, 2011, 1:20:36 AM (14 years ago)
- Location:
- devel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/etc/pb.conf
r1192 r1198 204 204 # Command to update the distribution to latest state 205 205 osupd du = sudo /usr/bin/apt-get update; export DEBIAN_FRONTEND="noninteractive"; sudo /usr/bin/apt-get --quiet -y --force-yes dist-upgrade 206 osupd gen = sudo emerge --update --deep world; sudorevdep-rebuild206 osupd gen = sudo /usr/bin/emerge --update --deep world; sudo /usr/bin/revdep-rebuild 207 207 osupd rpm = sudo /usr/bin/yum clean all; sudo /usr/bin/yum -y update 208 208 osupd md = sudo /usr/bin/urpmi.update -a ; sudo /usr/sbin/urpmi --auto --auto-select … … 214 214 # not the update of the repo which may well be unaccessible if too old 215 215 osins du = sudo /usr/bin/apt-get update ; sudo /usr/bin/apt-get -y install 216 osins gen = sudo emerge216 osins gen = sudo /usr/bin/emerge 217 217 osins rpm = sudo /usr/bin/yum clean all; sudo /usr/bin/yum -y update ; sudo /usr/bin/yum -y install 218 218 osins rhel-2.1 = sudo up2date -y … … 387 387 osperldep rhel-3 = Module-Build,File-MimeInfo,File-BaseDir 388 388 # Tested 389 osperldep rhel-6 = File-MimeInfo,File-BaseDir ,Mail-Sendmail389 osperldep rhel-6 = File-MimeInfo,File-BaseDir 390 390 ospkgdep rhel-6 = wget,make,ntpdate,patch,perl-Date-Manip,rpm-build,diffutils,perl-Module-Build 391 391 # 392 osperldep rhel-3 = Module-Build,File-MimeInfo,File-BaseDir ,Mail-Sendmail392 osperldep rhel-3 = Module-Build,File-MimeInfo,File-BaseDir 393 393 ospkgdep rhel-3 = wget,make,ntp,patch,perl-DateManip,diffutils 394 394 osperldep centos-3 = Module-Build,File-MimeInfo,File-BaseDir … … 428 428 # HP-UX 429 429 # TBC 430 osperldep sd = 430 osperldep sd = Pod2man,Date-Manip,File-MimeInfo 431 431 432 432 # Version of the perl module as found on CPAN -
devel/pb/bin/pb
r1197 r1198 2961 2961 print PBOUT "Defaults:root !requiretty\n"; 2962 2962 # Keep proxy configuration while using sudo 2963 print PBOUT "Defaults:$pbac->{$ENV{'PBPROJ'}} env_keep += \\\"http_proxy ftp_proxy\\\"\n";2963 print PBOUT "Defaults:$pbac->{$ENV{'PBPROJ'}} env_keep += \\\"http_proxy ftp_proxy\\\"\n"; 2964 2964 EOF 2965 2965 # Try to restrict security to what is really needed 2966 2966 if ($vtype =~ /^vm/) { 2967 2967 my $hpath = pb_distro_get_param($pbos,pb_conf_get("ospathcmd-halt")); 2968 my @sudocmds = pb_get_sudocmds($pbos,$ntpline, $hpath);2968 my @sudocmds = pb_get_sudocmds($pbos,$ntpline,"sudo $hpath"); 2969 2969 print SCRIPT << "EOF"; 2970 2970 # This is needed in order to be able on VM to halt the machine from the $pbac->{$ENV{'PBPROJ'}} account at least … … 3766 3766 3767 3767 my $pbos = shift; 3768 my @lines = shift;3769 3768 my %sudocmds; 3770 3769 3771 foreach my $c (split(/;/,$pbos->{'update'}),split(/;/,$pbos->{'install'}),@lines) { 3772 next if ($c !~ /^sudo/); 3773 # remove sudo 3774 $c =~ s/^sudo\s+//; 3775 # remove leading spaces 3776 $c =~ s/^\s+//; 3777 # remove ending spaces 3778 $c =~ s/\s+$//; 3770 pb_log(2,"pb_get_sudocmds entering with lines:".Dumper(@_)."\n"); 3771 foreach my $c (split(/;/,$pbos->{'update'}),split(/;/,$pbos->{'install'}),@_) { 3772 pb_log(2,"pb_get_sudocmds analyses $c\n"); 3773 next if ($c !~ /^\s*sudo/); 3774 # remove sudo and leading spaces 3775 $c =~ s/^\s*sudo\s+//; 3779 3776 # keep only the command, not the params 3780 3777 $c =~ s/([^\s]+)\s.*$/$1/; 3781 3778 $sudocmds{$c} = ""; 3782 3779 } 3783 pb_log(2,"pb_get_sud comds returns ".Dumper(%sudocmds)."\n");3780 pb_log(2,"pb_get_sudocmds returns ".Dumper(keys %sudocmds)."\n"); 3784 3781 return(keys %sudocmds); 3785 3782 }
Note:
See TracChangeset
for help on using the changeset viewer.