#897 Fix use_host_resolv with new mock version (2017 Nov 22+)
Merged by mikem. Opened by davidlt.
davidlt/koji fix_host_resolv  into  master

Download 897.patch

The change done in mock on 2017 Nov 22:

782e150ffda41c55351c56eff6601a2cc1b8e4fe / [RHBZ#1514028]

now requires rpmbuild_networking to be used together with use_host_resolv
otherwise it does not have an affect. While setting up Fedora RISC-V koji
instance we noticed that /etc/resolv.conf was never copied into chroot,
while /ets/hosts was always present.

The following was tested on Fedora RISC-V instance and resolved the original
problem (buildSRPMFromSCM was failing on fedpkg sources as it couldn't
resolve src.fedoraproject.org)

Signed-off-by: David Abdurachmanov david.abdurachmanov@gmail.com

I probably need to modify the following configuration files in tests:

internaldev.out:config_opts['use_host_resolv'] = False
internaldev2.out:config_opts['use_host_resolv'] = False
simple.out:config_opts['use_host_resolv'] = False

and add config_opts['rpmbuild_networking'] = False

1 new commit added

  • Add missing config_opts['rpmbuild_networking'] to mock config output

2 new commits added

  • Add missing config_opts['rpmbuild_networking'] to mock test data
  • Fix use_host_resolv with new mock version (2017 Nov 22+)

fixes: #847

it's not required here, because koji.genMockConfig uses 'use_host_resolv'

@julian8628 it's required, otherwise use_host_resolv does not have any affect. See the commit I mentioned in PR description.

I see what you mean now, but I could we keep it for consistency? This code would have exact same issue.

I see what you mean now, but I could we keep it for consistency? This code would have exact same issue.

yes, it makes sense

:thumbsup:

Any plans to get this merged?

Currently we set config_opts['rpmbuild_networking'] = True in /etc/mock/site-defaults.cfg and iptables restrict most of network activity.

Fixes: #932

Commit 4a2e8757 fixes this pull-request

Pull-Request has been merged by mikem

Metadata