• Re: [gentoo-user] git command within an ebuild fails - why?

    From tastytea@21:1/5 to jarausch@skynet.be on Fri Sep 23 19:00:01 2022
    On 2022-09-23 18:17+0200 Helmut Jarausch <jarausch@skynet.be> wrote:

    Hi,
    I'd like to write an ebuild for installing nim-9999.
    Within "src_compile"
    a shell script is executed which tries to invoke

    git clone -q --depth 1 -b master
    https://github.com/nim-lang/csources_v1.git csources_v1

    This fails with "Could not resolve host: github.com"

    When I excute the git command above within the source directory it
    just works.
    So, what's different when executing it within the ebuild.
    Does "inherit git-r3" redefine something.

    Many thanks for hint,
    Helmut


    Network access is disabled in ebuild phase functions by FEATURES="network-sandbox". You can disable that by adding
    RESTRICT="network-sandbox"
    to your ebuild, but it's better to fix the build script instead.

    I see stefantalpalaru has a solution for this: <https://github.com/stefantalpalaru/gentoo-overlay/blob/master/dev-lang/nim/nim-9999-r13.ebuild#L29>

    Kind regards, tastytea

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Helmut Jarausch@21:1/5 to All on Fri Sep 23 18:20:01 2022
    Hi,
    I'd like to write an ebuild for installing nim-9999.
    Within "src_compile"
    a shell script is executed which tries to invoke

    git clone -q --depth 1 -b master
    https://github.com/nim-lang/csources_v1.git csources_v1

    This fails with "Could not resolve host: github.com"

    When I excute the git command above within the source directory it just works.
    So, what's different when executing it within the ebuild.
    Does "inherit git-r3" redefine something.

    Many thanks for hint,
    Helmut

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Helmut Jarausch@21:1/5 to tastytea on Fri Sep 23 20:30:01 2022
    Many thanks!!!
    Helmut


    On 09/23/2022 06:54:08 PM, tastytea wrote:
    On 2022-09-23 18:17+0200 Helmut Jarausch <jarausch@skynet.be> wrote:

    Hi,
    I'd like to write an ebuild for installing nim-9999.
    Within "src_compile"
    a shell script is executed which tries to invoke

    git clone -q --depth 1 -b master https://github.com/nim-lang/csources_v1.git csources_v1

    This fails with "Could not resolve host: github.com"

    When I excute the git command above within the source directory it
    just works.
    So, what's different when executing it within the ebuild.
    Does "inherit git-r3" redefine something.

    Many thanks for hint,
    Helmut


    Network access is disabled in ebuild phase functions by FEATURES="network-sandbox". You can disable that by adding
    RESTRICT="network-sandbox"
    to your ebuild, but it's better to fix the build script instead.

    I see stefantalpalaru has a solution for this: <https://github.com/stefantalpalaru/gentoo-overlay/blob/master/dev-lang/nim/nim-9999-r13.ebuild#L29>

    Kind regards, tastytea



    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)