Fetcher failure for URL linphone - yocto

Fetcher failure for URL: 'https://gitlab.linphone.org/BC/public/external/polarssl.git'. Missing SRC_URI checksum. any pointers is appreciated. able to browse the link

When fetching a project from git there is no obligation for checksum.
The checksum specification is needed for files sources (.tar.gz, ...etc).
So, I create a simple recipe for the URL you specified:
SUMMARY = "PolarSSL recipe"
LICENSE = "CLOSED"
PROTOCOL = "https"
BRANCH = "linphone-1.4"
GIT_SRC = "gitlab.linphone.org/BC/public/external/polarssl.git"
SRC_URI = "git://${GIT_SRC};protocol=${PROTOCOL};branch=${BRANCH}"
SRCREV = "9864c92b71b81dd1dda885eae108cc3fc9a0cf4b"
S = "${WORKDIR}/git"
inherit autotools
I got SRCREV value from the last commit on the linphone-1.4 branch.
I didn't go further with specifying the corrent LICENSE and do_install.
I tested this recipe with a zeus build.

Related

How to add the git source code into a bb file

This is the first time for me write the bb file, so please give me some help.
I can fetch the http tarball from external network, after I put it into the local source mirror directory, disable the external network and run the bb file, it works well. But when I tried to fetch a git source tarball, and do everything as before, the bb file failed to fetch the git source tarball from the source mirror after I disable the external network.
ERROR: Task 587 (/$PATH/******.bb, do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 402 tasks of which 382 didn't need to
be rerun and 1 failed.
The following is my bb file:
SRCBRANCH = "********"
SRCREV = "AUTOINC"
SRC_URI = "git://***************.git;branch=${SRCBRANCH};protocol=https"
LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;endline=16;md5=**********"
SRC_URI[md5sum] = "***************"
SRC_URI[sha256sum] = "***************"
S = "${WORKDIR}/git"
I can guess that as you use AUTOINC, the cause of your error can be checksum mismatch, but as you haven't provided error message from your do_fetch log, I cannot say for sure. You can find it by the path
build/tmp/work/one_of_directories/name_of_your_recipe/version/tmp/log.do_fetch

SRC_URI not working in bitabake recipe

I created a bitbake recipe for installing https://pypi.python.org/pypi/Adafruit-GPIO/1.0.3 python package. Following is my recipe
DESCRIPTION = "Library to provide a cross-platform GPIO interface on the Raspberry Pi and Beaglebone Black using the RPi.GPIO and Adafruit_BBIO libraries"
SECTION = "devel/python"
LICENSE = "CLOSED"
PR = "r1"
SRC_URI = "https://pypi.python.org/packages/db/1c/2dc8a674514219f287fa344e44cadfd77b3e2878d6ff602a8c2149b50dd8/Adafruit_GPIO-1.0.3.tar.gz"
inherit pypi setuptools
do_install_append() {
rm -f ${D}${libdir}/python*/site-packages/site.py*
}
do_compile_prepend() {
${STAGING_BINDIR_NATIVE}/python setup.py install ${DISTUTILS_BUILD_ARGS} || \
true
}
SRC_URI[md5sum] = "dfcdb1ba90188d18ba80b6d2958c8c33"
But whenever I try to bitbake recipe I always receive following error
ERROR: Function failed: Fetcher failure for URL: 'https://pypi.python.org/packages/source/A/Adafruit-GPIO/Adafruit-GPIO-1.0.3.tar.gz'. Unable to fetch URL from any source
My question why does bitbake tries to download from some other link while I have some other link in SRC_URI? How can I correct my recipe>
It's pypi.bbclass that specifies another download URL.
So either
remove inherit pypi
or
remove your SRC_URI. In this case, you will also need to set PYPI_PACKAGE = "Adafruit-GPIO" to the correct package name in pypi (as your recipe has a - instead of a _ in its name).
See pypi.bbclass
An untested version of your recipe that at least builds on my system is adafruit-gpio_1.0.3.bb (note, only lowercase letters in the recipe name):
DERIPTION = "Library to provide a cross-platform GPIO interface on the Raspberry Pi and Beaglebone Black using the RPi.GPIO and Adafruit_BBIO libraries"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://PKG-INFO;md5=e41c52dbe1b96447d1c50129a124f586"
SRC_URI[md5sum] = "dfcdb1ba90188d18ba80b6d2958c8c33"
SRC_URI[sha256sum] = "d6465b92c866c51ca8f3bc1e8f2ec36f5ccdb46d0fd54101c1109756d4a2dcd0"
PYPI_PACKAGE = "Adafruit_GPIO"
inherit pypi setuptools

bitbake error package not found in base feeds

I want to include https://pypi.python.org/pypi/ndeflib in my image. Thus I created a recipe for this. Following are the contents of python-ndeflib_0.2.0.bb
DESCRIPTION = "NFC Data Exchange Format decoder and encoder."
SECTION = "devel/python"
LICENSE = "CLOSED"
SRC_URI = "https://pypi.python.org/packages/0c/0f/b9d94cee7847697469c49a25b4d23236de534451990b83008e6bf4fab15b/ndeflib-0.2.0.tar.gz"
do_install_append() {
rm -f ${D}${libdir}/python*/site-packages/site.py*
}
do_compile_prepend() {
${STAGING_BINDIR_NATIVE}/python setup.py install ${DISTUTILS_BUILD_ARGS} || \
true
}
SRC_URI[md5sum] = "b7ae0c34f49289c44c292e24843cfeb1"
I am able to bitbake python-ndeflib successfully
but whenever I try to build my final os image bitbake fsl-image-machine-test
the process fails at the with following error
ERROR: python-ndeflib not found in the base feeds
Thus where I am making mistake?
I had this error (projectname not found in base feeds in do_rootfs)solved in different project (non cmake , non make) with this:
ALLOW_EMPTY_${PN} = "1"
in its *.bb file.
Some other people has this error because they were using capital letters in project name.
Did you try to write a recipe similar to the one in your previousquestion? That should have solved your issue.
Writing something similar to that recipe, gives you python3-ndeflib_0.2.0.bb:
DESCRIPTION = "NFC Data Exchange Format decoder and encoder."
SECTION = "devel/python"
LICENSE = "ISC"
LIC_FILES_CHKSUM = "file://LICENSE;md5=f7c92777f3af9604e192a0d195b6a6a4"
SRC_URI[md5sum] = "b7ae0c34f49289c44c292e24843cfeb1"
SRC_URI[sha256sum] = "baa86a48cf310cf77524f6fa04f5bd90775c4c290116b6b543aa3d6d65b721bf"
inherit pypi setuptools3
Which seems to work pretty well. Note that I used Python 3 instead of two (setuptools3).
Ie inherit setuptools or setuptools3 instead of writing your own do_compile, do_install, etc, unless you really have to.

How to add HAProxy package into bitbake recipe

I am new to bitbake recipe. I am trying to add HAProxy package into bitbake. I am trying to create a recipe but not sure how to proceed with it.
so far I have just made it till here:
SUMMARY = "HAProxy support for NEXT"
HOMEPAGE = "http://www.haproxy.org/"
SECTION = "tools"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=2d862e836f92129cdc0ecccc54eed5e0"
SRC_URI = "http://www.haproxy.org/download/1.6/src/haproxy-${PV}.tar.gz"
SRC_URI[md5sum] = "3362d1e268c78155c2474cb73e7f03f9"
SRC_URI[sha256sum] = "fd06b45054cde2c69cb3322dfdd8a4bcfc46eb9d0c4b36d20d3ea19d84e338a7"
Can anyone point me to right direction?
haproxy is a Makefile based project, so this link should help:
http://www.yoctoproject.org/docs/2.1/dev-manual/dev-manual.html#new-recipe-makefile-based-package
You should define this variable in your recipe:
EXTRA_OEMAKE = "TARGET=XXX"
replacing XXX by the target your are interested (generic, linux22, linux24, and so on). That string TARGET=XXX will be passed as argument to the 'make' command, so bitbake will start compilation. Most probably that's all you need.

Yocto version control

We are struggling for version control of our application ,RFS, Uboot and kernel
We have a hello world program. Every time we are changing (patching) new functionality to the program, we have to keep a track on changes with help of version no. We need the version no of this (hello world package) should be auto incremented.
Same we have to do with Linux and uboot.
Does yocto can do this for us? Or do we have any other option to achieve this.
Please suggest us as we are new for all the capabilities of yocto.
A full example of how you can do this:
The important part is SRCREV = "${AUTOREV}" and PV = "${BPV}+gitr${SRCPV}"
DESCRIPTION = "Hello World"
SECTION = "examples"
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = "file://README.md;md5=8386d486d9e820c480636608de5c2d98"
SRCREV = "${AUTOREV}"
BPV = "0.1.0"
PV = "${BPV}+gitr${SRCPV}"
S = "${WORKDIR}/git"
SRC_URI = " git://example/hello_world.git;protocol=http \
"
inherit autotools
RDEPENDS_${PN} += " \
hello-world-runtime-dependency \
"
As alreadypointed out you have to use SRCREV = "${AUTOREV}". To have a version number that changes on each update the PV variable needs to be tweaked in your recipe.
LINUX_VERSION ?= "3.14"
PV = "${LINUX_VERSION}+git${SRCPV}"
You can check the OpenEmbedded kernel recipe for reference.
There is no built in feature for this in yocto to my knowledge. However, you can write your own check mechanism and place it in do_fetch_prepend. Then set the SRCREV programmatically with d.setVar('SRCREV', myshasum).
An option for auto-updates is to set SRCREV = "${AUTOREV}" then have a script that sets PV and/or PR in the recipe. When the recipe is changed, it forces a fetch and AUTOREV means it pulls from HEAD.