emerge: Couldn't resolve host 'github.com'

169 views
Skip to first unread message

Xiaochu Liu

unread,
Aug 1, 2017, 7:58:58 PM8/1/17
to Chromium OS dev
Hi there,

I'm adding a package ebuild written in go. In one of steps of my ebuild file,  it issues 'go get' command which under the hood fetches (git clone) all other dependencies from github. But it shows errors (in bold text):

# cd .; git clone https://github.com/urfave/cli /build/kefka/tmp/portage/chromeos-base/cloud-print-connector-1.12/work/cloud-print-connector-1.12/src/github.com/urfave/cli
Cloning into '/build/kefka/tmp/portage/chromeos-base/cloud-print-connector-1.12/work/cloud-print-connector-1.12/src/github.com/urfave/cli'...
fatal: unable to access 'https://github.com/urfave/cli/': Couldn't resolve host 'github.com'
package github.com/urfave/cli: exit status 128

I can successfully 'git clone' that repo in chroot but emerge seems to be under a different network setup? Any hint would be appreciated!

Thanks,
Xiaochu

Dmitry Torokhov

unread,
Aug 1, 2017, 8:01:38 PM8/1/17
to Xiaochu Liu, Chromium OS dev
See Mike's post "[cros-dev] [PSA] new network restrictions in ebuilds".

"we've turned on network restrictions in ebuilds. this means that,
outside of src_unpack, ebuilds won't be able to access the network.
so far we've only found two ebuilds that this was an issue for (chrome
& autotest). this should hopefully cut down on weird flakes when
packages accidentally try to do network things when building -- you
can't anymore!

so if you see BuildPackages or UnitTest phases failing with errors
like "network unreachable" or similar network failures, it's not
because the bot itself is freaking out, but because we've disabled
network access in the ebuild."
> --
> --
> Chromium OS Developers mailing list: chromiu...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en
>

Brian Norris

unread,
Aug 1, 2017, 8:02:59 PM8/1/17
to Xiaochu Liu, Chromium OS dev
Is this happening in the src_unpack() phase? If not, you might be seeing this:

[PSA] new network restrictions in ebuilds

On Tue, Aug 1, 2017 at 4:58 PM, Xiaochu Liu <xia...@chromium.org> wrote:

Xiaochu Liu

unread,
Aug 1, 2017, 8:12:48 PM8/1/17
to Brian Norris, Chromium OS dev
Thanks Dmitry and Brian! It was in src_prepare and then I move it to src_unpack and it is working. 

Sorry I will pay more attention to announcement...

Mike Frysinger

unread,
Aug 1, 2017, 9:59:42 PM8/1/17
to Xiaochu Liu, Brian Norris, Chromium OS dev
to be clear, this is not an ebuild we want in the tree.  src_unpack shouldn't be fetching random github repos either.

you probably want to look at:
-mike
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages