Le ven. 20 nov. 2020 à 16:44, Helmut Jarausch <jarau...@skynet.be> a écrit :

> Hi,
> I have an ebuild containing
>
> inherit git-r3
>
> and
>
> src_compile() {
>
>         ./build_all.sh
> }
>
> The script build_all.sh contains
>
> [ -d csources ] || git clone --depth 1
> https://github.com/nim-lang/csources.git
>
>
> When I try to build I get the strange error
> fatal: unable to access 'https://github.com/nim-lang/csources.git/':
> Could not resolve host: github.com
>
> But when I exec
> git clone --depth 1 https://github.com/nim-lang/csources.git
> in an xterm (i.e. without using 'ebuild') it succeeds.
>
> What's going on here?
>
> Many thanks for a hint,
> Helmut
>

Hi Helmut

I believe this is a consequence of the sandboxing of ebuilds.

When I had the same problem with an ebuild trying to download many things
from the Maven repository, I added the following lines inside the ebuild:
# To enable Maven access to https://repo.maven.apache.org/maven2
RESTRICT="network-sandbox"

It is described (shortly) in "man 5 ebuild"
This is forbidden in the Portage tree, but is allowed in your own overlay.

Best regards
Mickaël Bucas

Reply via email to