Re: Alternative solution (was: Re: Network access during build)
* Christian Seiler <christian@iwakd.de>, 2016-09-07, 07:43:
That way, you can force host name resolution to not use DNS for your
test suite (via just using a hosts file), then there will be no network
access during package build, and you don't have to keep rebasing a
patch. And, even better, IF there is a host name called 'fail' on the
local network, using nss_wrapper the package build will still succeed.
With nss_wrapper you can have your own hosts file, but I don't think it
lets you force a name to fail to resolve.
However, you can completely disable external network with
socket_wrapper:
$ LD_PRELOAD=libsocket_wrapper.so SOCKET_WRAPPER_DIR=$PWD wget http://www.example.com/
--2016-09-07 23:36:51-- http://www.example.com/
Resolving www.example.com (www.example.com)... failed: Temporary failure in name resolution.
wget: unable to resolve host address ‘www.example.com’
--
Jakub Wilk
Reply to: