Hi, since our Koji builds have disabled internet access, I want to do
the same, so I have more Koji consistent builds.
I have the following in /etc/mock/site-defaults.cfg:
config_opts['use_host_resolv'] = True # or False, no difference
config_opts['rpmbuild_networking'] = False
The internet doesn't work (desired), but has large timeouts (undesired).
This is especially tedious when building Python packages that use
intershpinx and they try to fetch stuff from the internet during build
(it fails, but that's OK). For each such request, the build is prolonged
for ~1 minute. I have Python packages that try to download (and fail)
10+ intershpinx inventories during build. That's 10+ minutes waiting for
something that'll fail anyway. I've been adding hacks to sphinx calls to
make intersphinx timeout sooner, but it's unnecessary clutter in the spec.
So I decided to test this. I've added the following to the spec:
time curl http://example.com/
Here are the times:
* my mock: real 0m56.595s Could not resolve host
* Koji: real 0m0.030s Could not resolve host
This seems to be just about resolving hosts. See with IP address:
time curl http://220.127.116.11/
* my mock: real 2m10.953s Connection timed out
* Koji: real 2m11.337s Connection timed out
Is there a trick to make resolving fail early?