On 11/20/2020 05:50:11 PM, Mickaël Bucas wrote:
Le ven. 20 nov. 2020 16:44, Helmut Jarausch
<_j_a_r_a_u_s_c_h_@_s_k_y_n_e_t_._b_e> 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
_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
When I try to build I get the strange error
fatal: unable to access
'_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_/':
Could not resolve host: _g_i_t_h_u_b_._c_o_m
But when I exec
git clone --depth 1
_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
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
_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
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
Many, many thanks Micka. I'd never thought of that.
Stay healthy,
Helmut