All of lore.kernel.org
 help / color / mirror / Atom feed
* [bitbake] How to fetch private github release
@ 2018-10-10 11:18 Måns Zigher
  2018-10-10 11:59 ` Måns Zigher
  0 siblings, 1 reply; 2+ messages in thread
From: Måns Zigher @ 2018-10-10 11:18 UTC (permalink / raw)
  To: OE-core

[-- Attachment #1: Type: text/plain, Size: 711 bytes --]

Hi,

I need to fetch a github release tar file. I think I have seen that it
should be supported by default by setting the

SRC_URI = "
https://github.com/DynamicDevices/bbexample/releases/download/v1.0/bbexample-${PV}.tar.gz
"

The problem that I am facing is that the repo is private so I need to be
able to specify a github token. Is this supported?

I have also tried specify my own do_fetch to my recipe and from there
making use of https://github.com/gruntwork-io/fetch but do_fetch cannot the
binary. I have verified fetch binary is part of the package sysroot and I
can call the fetch tool from do_install but that feels like a bad hack. Do
you guys have any advice?

BR
Måns Zigher

[-- Attachment #2: Type: text/html, Size: 2877 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [bitbake] How to fetch private github release
  2018-10-10 11:18 [bitbake] How to fetch private github release Måns Zigher
@ 2018-10-10 11:59 ` Måns Zigher
  0 siblings, 0 replies; 2+ messages in thread
From: Måns Zigher @ 2018-10-10 11:59 UTC (permalink / raw)
  To: OE-core

[-- Attachment #1: Type: text/plain, Size: 1628 bytes --]

Hi again,

I have a workaround that I think is good enough but I would still like to
get any pointers regarding it and if it would be possible for fetch to
actually support downloading from private repo.

do_my_fetch() {
    fetch --repo=${MY_REPO} \
        --github-oauth-token=${GITHUB_TOKEN} \
        --tag=${VERSION} \
        --release-asset=asset.tar.gz ${WORKDIR} || {
        bbfatal "Failed to download asset"
    }
}
addtask my_fetch after do_fetch before do_unpack
do_my_fetch[depends] += "${PN}:do_prepare_recipe_sysroot"

In the recipe I have made sure to add fetch to DEPENDS so that the fetch
will be part of the sysroot. So the reason for do_fetch not working was
that it was not depending on do_prepare_recipe_sysroot and do_install was.

BR
Måns Zigher

Den ons 10 okt. 2018 kl 13:18 skrev Måns Zigher <mans.zigher@gmail.com>:

> Hi,
>
> I need to fetch a github release tar file. I think I have seen that it
> should be supported by default by setting the
>
> SRC_URI = "
> https://github.com/DynamicDevices/bbexample/releases/download/v1.0/bbexample-${PV}.tar.gz
> "
>
> The problem that I am facing is that the repo is private so I need to be
> able to specify a github token. Is this supported?
>
> I have also tried specify my own do_fetch to my recipe and from there
> making use of https://github.com/gruntwork-io/fetch but do_fetch cannot
> the binary. I have verified fetch binary is part of the package sysroot and
> I can call the fetch tool from do_install but that feels like a bad hack.
> Do you guys have any advice?
>
> BR
> Måns Zigher
>
>

[-- Attachment #2: Type: text/html, Size: 3066 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-10 11:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-10 11:18 [bitbake] How to fetch private github release Måns Zigher
2018-10-10 11:59 ` Måns Zigher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.