-
-
Notifications
You must be signed in to change notification settings - Fork 532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for bitbake recipes #1243 #3092
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: Chin Yeung Li <tli@nexb.com> Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
@chinyeungli @priv-kweihmann you review is welcomed! |
@@ -39,6 +39,7 @@ lxml==4.9.1 | |||
MarkupSafe==2.1.1 | |||
more-itertools==8.13.0 | |||
normality==2.3.3 | |||
oelint_parser==2.6.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think current version is 2.8.0 - so this might need an update
|
||
# add any bitbake like-file | ||
# TODO: may be we should handle the bbclass and bbappend here? | ||
oestash.AddFile(location) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bbclass files are handled automatically (if being within the same layer) - but yeah, bbappends have to be added manually
version = data.get('PV') | ||
description = data.get('DESCRIPTION') | ||
homepage_url = data.get('HOMEPAGE') | ||
download_url = data.get('PREMIRRORS') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why premirrors? Normally one would take this kind of information from SRC_URI
# Therefore, I cannot differentiate md5, sha1, or src file location reference | ||
# See: https://github.com/priv-kweihmann/oelint-parser/issues/3 | ||
sha1 = data.get('SRC_URI[sha1sum]') | ||
md5 = data.get('SRC_URI[md5sum]') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
md5sum is pretty outdated a while now - people have been encouraged to drop the support for md5 for years now - sha256 on the other hand is mandatory for most of the file based downloads, so this one should be used
|
||
# Build deps: this is a list of plain BB recipes names | ||
# https://docs.yoctoproject.org/bitbake/bitbake-user-manual/bitbake-user-manual-ref-variables.html#term-DEPENDS | ||
build_deps = data.get('DEPENDS', '').split() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DEPENDS just refers to buildtime dependencies - I think what you really want is a mix of RDEPENDS:* and DEPENDS - while RDEPENDS (the packages needed at runtime are more of importance) - sometimes DEPENDS contains elements that will be only used at buildtime and leave no trace within the shipped binaries, so from a license point of view they can be safely ignored
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally would say that license wise DEPENDS doesn't play any role and should not be considered
SRC_URI = "file://init-install-testfs.sh" | ||
DEPENDS = "do_this and that" | ||
|
||
RDEPENDS_${PN} = "grub (== 12.23) parted e2fsprogs-mke2fs" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the test should use a recipe that is a bit more complex than this one here - for me https://git.yoctoproject.org/poky/plain/meta/recipes-graphics/cairo/cairo_1.16.0.bb was always a good example
description = data.get('DESCRIPTION') | ||
homepage_url = data.get('HOMEPAGE') | ||
download_url = data.get('PREMIRRORS') | ||
declared_license = data.get('LICENSE') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep in mind that LICENSE settings can also be package specific (fine example can be found here https://git.yoctoproject.org/poky/plain/meta/recipes-graphics/cairo/cairo_1.16.0.bb) - so it would be better to iterate over all variable items of LICENSE and then pick the best matching, where plain LICENSE should always be the fall back
This PR adds basic support bitbake recipes treated as package data.
Tasks
Run tests locally to check for errors.