Gentoo Archives: gentoo-user

From: tastytea <gentoo@××××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] git command within an ebuild fails - why?
Date: Fri, 23 Sep 2022 16:54:17
Message-Id: 20220923185408.59c3c82c@ventiloplattform.tastytea.de
In Reply to: [gentoo-user] git command within an ebuild fails - why? by Helmut Jarausch
1 On 2022-09-23 18:17+0200 Helmut Jarausch <jarausch@××××××.be> wrote:
2
3 > Hi,
4 > I'd like to write an ebuild for installing nim-9999.
5 > Within "src_compile"
6 > a shell script is executed which tries to invoke
7 >
8 > git clone -q --depth 1 -b master
9 > https://github.com/nim-lang/csources_v1.git csources_v1
10 >
11 > This fails with "Could not resolve host: github.com"
12 >
13 > When I excute the git command above within the source directory it
14 > just works.
15 > So, what's different when executing it within the ebuild.
16 > Does "inherit git-r3" redefine something.
17 >
18 > Many thanks for hint,
19 > Helmut
20 >
21
22 Network access is disabled in ebuild phase functions by
23 FEATURES="network-sandbox". You can disable that by adding
24 RESTRICT="network-sandbox"
25 to your ebuild, but it's better to fix the build script instead.
26
27 I see stefantalpalaru has a solution for this:
28 <https://github.com/stefantalpalaru/gentoo-overlay/blob/master/dev-lang/nim/nim-9999-r13.ebuild#L29>
29
30 Kind regards, tastytea

Replies

Subject Author
Re: [gentoo-user] git command within an ebuild fails - why? Helmut Jarausch <jarausch@××××××.be>