[OE-core] [bitbake] How to fetch private github release

Måns Zigher mans.zigher at gmail.com
Wed Oct 10 11:59:21 UTC 2018


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 at 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20181010/5d885198/attachment-0002.html>


More information about the Openembedded-core mailing list