Gentoo Archives: gentoo-user

From: "Mickaël Bucas" <mbucas@×××××.com>
To: Gentoo <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] strange ebuild problem
Date: Fri, 20 Nov 2020 16:50:30
Message-Id: CAG1=SYQ2+oTMNeOmsUxEhFuWUBwPuMWHn3YxLQfgXXJ=hrUYdg@mail.gmail.com
In Reply to: [gentoo-user] strange ebuild problem by Helmut Jarausch
1 Le ven. 20 nov. 2020 à 16:44, Helmut Jarausch <jarausch@××××××.be> a écrit :
2
3 > Hi,
4 > I have an ebuild containing
5 >
6 > inherit git-r3
7 >
8 > and
9 >
10 > src_compile() {
11 >
12 > ./build_all.sh
13 > }
14 >
15 > The script build_all.sh contains
16 >
17 > [ -d csources ] || git clone --depth 1
18 > https://github.com/nim-lang/csources.git
19 >
20 >
21 > When I try to build I get the strange error
22 > fatal: unable to access 'https://github.com/nim-lang/csources.git/':
23 > Could not resolve host: github.com
24 >
25 > But when I exec
26 > git clone --depth 1 https://github.com/nim-lang/csources.git
27 > in an xterm (i.e. without using 'ebuild') it succeeds.
28 >
29 > What's going on here?
30 >
31 > Many thanks for a hint,
32 > Helmut
33 >
34
35 Hi Helmut
36
37 I believe this is a consequence of the sandboxing of ebuilds.
38
39 When I had the same problem with an ebuild trying to download many things
40 from the Maven repository, I added the following lines inside the ebuild:
41 # To enable Maven access to https://repo.maven.apache.org/maven2
42 RESTRICT="network-sandbox"
43
44 It is described (shortly) in "man 5 ebuild"
45 This is forbidden in the Portage tree, but is allowed in your own overlay.
46
47 Best regards
48 Mickaël Bucas

Replies

Subject Author
Re: [gentoo-user] strange ebuild problem Helmut Jarausch <jarausch@××××××.be>