Gentoo Archives: gentoo-user

From: Helmut Jarausch <jarausch@××××××.be>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] strange ebuild problem
Date: Fri, 20 Nov 2020 19:47:24
Message-Id: ILO3VORQ.ALNDJUFW.SQS54GE4@BF3IIENI.2MDSQXAO.W5XXWQFZ
In Reply to: Re: [gentoo-user] strange ebuild problem by "Mickaël Bucas"
1 On 11/20/2020 05:50:11 PM, Mickaël Bucas wrote:
2 > Le  ven. 20 nov. 2020    16:44, Helmut Jarausch
3 > <_j_a_r_a_u_s_c_h_@_s_k_y_n_e_t_._b_e> a ©crit  :
4 > Hi,
5 > I have an ebuild containing
6 >
7 > inherit git-r3
8 >
9 > and
10 >
11 > src_compile() {
12 >
13 >         ./build_all.sh
14 > }
15 >
16 > The script build_all.sh contains
17 >
18 > [ -d csources ] || git clone --depth 1  
19 >
20 > _h_t_t_p_s_:_/_/_g_i_t_h_u_b_._c_o_m_/_n_i_m_-_l_a_n_g_/_c_s_o_u_r_c_e_s_._g_i_t
21 >
22 >
23 > When I try to build I get the strange error
24 > fatal: unable to access
25 > '_h_t_t_p_s_:_/_/_g_i_t_h_u_b_._c_o_m_/_n_i_m_-_l_a_n_g_/_c_s_o_u_r_c_e_s_._g_i_t_/':
26 >  
27 > Could not resolve host: _g_i_t_h_u_b_._c_o_m
28 >
29 > But when I exec
30 > git clone --depth 1
31 > _h_t_t_p_s_:_/_/_g_i_t_h_u_b_._c_o_m_/_n_i_m_-_l_a_n_g_/_c_s_o_u_r_c_e_s_._g_i_t
32 > in an xterm (i.e. without using 'ebuild') it succeeds.
33 >
34 > What's going on here?
35 >
36 > Many thanks for a hint,
37 > Helmut
38 >
39 > Hi Helmut
40 >
41 > I believe this is a consequence of the sandboxing of ebuilds.
42 >
43 > When I had the same problem with an ebuild trying to download many
44 > things from
45 > the Maven repository, I added the following lines inside the ebuild:
46 > # To enable Maven access to
47 > _h_t_t_p_s_:_/_/_r_e_p_o_._m_a_v_e_n_._a_p_a_c_h_e_._o_r_g_/_m_a_v_e_n_2
48 > RESTRICT="network-sandbox"
49 >
50 > It is described (shortly) in "man 5 ebuild"
51 > This is forbidden in the Portage tree, but is allowed in your own
52 > overlay.
53 >
54 > Best regards
55 > Micka l Bucas
56
57
58 Many, many thanks Micka. I'd never thought of that.
59
60 Stay healthy,
61 Helmut