add "yum_proxy" option to builder

Previously if you wanted to use an HTTP proxy server with a builder, you
had to either specify the proxy in the pkgurl, or use iptables to
intercept HTTP and route it through a transparent proxy.

There is a better way: yum has proxy support built in. When a URL is
specified in the "proxy" option in yum.conf, yum will use this URL as a
proxy server.

Add a "yum_proxy" option in kojid.conf. Kojid will pass it back to mock
during genMockConfig(). Mock will write it into yum.conf in the chroot.
This commit is contained in:
Ken Dreyer 2011-11-29 18:57:15 -07:00 committed by Mike McLean
parent 2976de313f
commit 97bd601080
2 changed files with 8 additions and 2 deletions

View file

@ -204,7 +204,7 @@ class BuildRoot(object):
for k in ('repoid', 'tag_name'):
if hasattr(self, k):
opts[k] = getattr(self, k)
for k in ('mockdir', 'topdir', 'topurl', 'packager', 'vendor', 'distribution', 'mockhost'):
for k in ('mockdir', 'topdir', 'topurl', 'packager', 'vendor', 'distribution', 'mockhost', 'yum_proxy'):
if hasattr(self.options, k):
opts[k] = getattr(self.options, k)
opts['buildroot_id'] = self.id
@ -2927,6 +2927,7 @@ def get_options():
'createrepo_update': True,
'pkgurl': None,
'allowed_scms': '',
'yum_proxy': None,
'maven_repo_ignore': '*.md5 *.sha1 maven-metadata*.xml _maven.repositories '
'resolver-status.properties *.lastUpdated',
'failed_buildroot_lifetime' : 3600 * 4,