Changeset 2234 in ProjectBuilder
- Timestamp:
- Jun 27, 2017, 3:32:10 PM (8 years ago)
- Location:
- devel
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-doc/SECURITY
r2012 r2234 24 24 25 25 The default /etc/sudoers file created for VM/VE contains: 26 Defaults:pb env_keep += "http_proxy ftp_proxy"26 Defaults:pb env_keep += "http_proxy https_proxy ftp_proxy" 27 27 Defaults:pb !requiretty 28 28 pb ALL=(ALL) NOPASSWD:ALL -
devel/pb-modules/etc/pb.conf.pod
r2156 r2234 167 167 Example: http_proxy default = http://example.com:3128/ 168 168 169 =item B<https_proxy> 170 171 Nature: Optional 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. 173 Value: string indicating the proxy to use 174 Conffile: pb 175 Example: https_proxy default = http://example.com:3128/ 176 169 177 =item B<logcmd> 170 178 -
devel/pb-modules/lib/ProjectBuilder/Distribution.pm
r2222 r2234 322 322 my $ftp_proxy = pb_distro_get_param($pbos,pb_conf_get_if("ftp_proxy")); 323 323 my $http_proxy = pb_distro_get_param($pbos,pb_conf_get_if("http_proxy")); 324 my $https_proxy = pb_distro_get_param($pbos,pb_conf_get_if("https_proxy")); 324 325 325 326 # We do not overwrite shell settings 326 327 $ENV{ftp_proxy} ||= $ftp_proxy if ((defined $ftp_proxy) && ($ftp_proxy ne "")); 327 328 $ENV{http_proxy} ||= $http_proxy if ((defined $http_proxy) && ($http_proxy ne "")); 329 $ENV{https_proxy} ||= $https_proxy if ((defined $https_proxy) && ($https_proxy ne "")); 328 330 } 329 331 … … 350 352 pb_log(1, "ftp_proxy=$ENV{ftp_proxy}\n") if (defined $ENV{ftp_proxy}); 351 353 pb_log(1, "http_proxy=$ENV{http_proxy}\n") if (defined $ENV{http_proxy}); 354 pb_log(1, "https_proxy=$ENV{https_proxy}\n") if (defined $ENV{https_proxy}); 352 355 353 356 # Get dependencies in the build file if not forced -
devel/pb-modules/lib/ProjectBuilder/VE.pm
r2233 r2234 96 96 if ($EFFECTIVE_USER_ID != 0) { 97 97 $sudocmd ="sudo "; 98 foreach my $proxy (qw/http_proxy ftp_proxy/) {98 foreach my $proxy (qw/http_proxy https_proxy ftp_proxy/) { 99 99 if (defined $ENV{$proxy}) { 100 100 open(CMD,"sudo sh -c 'echo \$$proxy' |") or die "can't run sudo sh?: $!"; … … 308 308 print DOCKER "ENV ftp_proxy $ENV{ftp_proxy}\n" if (defined $ENV{ftp_proxy}); 309 309 print DOCKER "ENV http_proxy $ENV{http_proxy}\n" if (defined $ENV{http_proxy}); 310 print DOCKER "ENV https_proxy $ENV{https_proxy}\n" if (defined $ENV{https_proxy}); 310 311 # We are root in that container so no need to sudo, which is present potentially 311 312 my $cmd2 = $pbos->{'install'}; -
devel/pb/bin/pb
r2232 r2234 619 619 verpmtype default = rpmbootstrap 620 620 621 You may also choose to specify a mirror for the OS packages, and optionally http/ftp proxies. You can specify the proxies either through environment variables ($http_proxy/$ ftp_proxy) or in the configuration file. The configuration file will be used if no corresponding environment variable has been set. For example, for debian and with a local squid proxy:621 You may also choose to specify a mirror for the OS packages, and optionally http/ftp proxies. You can specify the proxies either through environment variables ($http_proxy/$https_proxy/$ftp_proxy) or in the configuration file. The configuration file will be used if no corresponding environment variable has been set. For example, for debian and with a local squid proxy: 622 622 623 623 rbsmirrorsrv debian = http://mirrors1.kernel.org/debian/ 624 624 http_proxy default = http://localhost:3128/ 625 https_proxy default = http://localhost:3128/ 625 626 ftp_proxy default = http://localhost:3128/ 626 627 … … 3389 3390 print SCRIPT "export http_proxy=\"$ENV{'http_proxy'}\"\n"; 3390 3391 } 3391 3392 if (defined $ENV{'https_proxy'}) { 3393 print SCRIPT "export https_proxy=\"$ENV{'https_proxy'}\"\n"; 3394 } 3392 3395 if (defined $ENV{'ftp_proxy'}) { 3393 3396 print SCRIPT "export ftp_proxy=\"$ENV{'ftp_proxy'}\"\n"; … … 3858 3861 print SCRIPT << "EOF"; 3859 3862 # Keep proxy configuration while using sudo 3860 print PBOUT "Defaults:$pbac->{$ENV{'PBPROJ'}} env_keep += \\\"http_proxy ftp_proxy\\\"\\n";3861 print PBOUT "Defaults:root env_keep += \\\"http_proxy ftp_proxy\\\"\\n";3863 print PBOUT "Defaults:$pbac->{$ENV{'PBPROJ'}} env_keep += \\\"http_proxy https_proxy ftp_proxy\\\"\\n"; 3864 print PBOUT "Defaults:root env_keep += \\\"http_proxy https_proxy ftp_proxy\\\"\\n"; 3862 3865 EOF 3863 3866 } -
devel/rpmbootstrap/bin/rpmbootstrap
r2032 r2234 585 585 # 586 586 $pbos->{'install'} =~ s/sudo//g; 587 if (((defined $ENV{http_proxy}) && ($ENV{http_proxy} ne '')) || ((defined $ENV{ ftp_proxy}) && ($ENV{ftp_proxy} ne ''))) {587 if (((defined $ENV{http_proxy}) && ($ENV{http_proxy} ne '')) || ((defined $ENV{https_proxy}) && ($ENV{https_proxy} ne '')) || ((defined $ENV{ftp_proxy}) && ($ENV{ftp_proxy} ne ''))) { 588 588 if ($pbos->{'name'} eq "opensuse") { 589 589 # For opensuse 11.4 or 12.1 -- one of them didn't work with http_proxy or HTTP_PROXY set. 590 590 open(PROXY, "> $vepath/etc/sysconfig/proxy") || die "can't open $vepath/etc/sysconfig/proxy: $!"; 591 591 print PROXY "HTTP_PROXY=$ENV{http_proxy}\n" if ((defined $ENV{http_proxy}) && ($ENV{http_proxy} ne '')); 592 print PROXY "HTTPS_PROXY=$ENV{https_proxy}\n" if ((defined $ENV{https_proxy}) && ($ENV{https_proxy} ne '')); 592 593 print PROXY "FTP_PROXY=$ENV{ftp_proxy}\n" if ((defined $ENV{ftp_proxy}) && ($ENV{ftp_proxy} ne '')); 593 594 close(PROXY);
Note:
See TracChangeset
for help on using the changeset viewer.