Skip to content

recipes-support: libfyaml for aktualizr-lite#294

Closed
ldts wants to merge 3 commits intofoundriesio:masterfrom
ldts:libfyaml
Closed

recipes-support: libfyaml for aktualizr-lite#294
ldts wants to merge 3 commits intofoundriesio:masterfrom
ldts:libfyaml

Conversation

@ldts
Copy link
Copy Markdown
Contributor

@ldts ldts commented Mar 23, 2021

This tool (binary, not libraries) is used by aklite to convert yaml to json

Signed-off-by: Jorge Ramirez-Ortiz [email protected]

@ldts ldts requested a review from mike-sul March 23, 2021 15:20
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"

SRC_URI = "git://github.com/pantoniou/libfyaml.git"
SRCREV = "de89df9041b3a72b258680d6c8f6df31c5cee28a"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to use git or using the latest known release is enough? Released snapshots are preferred (then renaming the recipe from _git.bb to _0.6.bb).

Copy link
Copy Markdown
Contributor Author

@ldts ldts Mar 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.6 is also good

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=6399094fbc639a289cfca2d660c010aa"

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this line.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

SRC_URI = "git://github.com/pantoniou/libfyaml.git"
SRCREV = "de89df9041b3a72b258680d6c8f6df31c5cee28a"

DEPENDS = " pkgconf "
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed?

Copy link
Copy Markdown
Contributor Author

@ldts ldts Mar 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can replace it with
inherit autotools pkgconfig
as we do in other recipe but the outcome will be the same. but will do for coherence

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, that is preferred (inherit).

S = "${WORKDIR}/git"

inherit autotools
PARALLEL_MAKE = ""
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why setting parallel_make to ""?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

someone somewhere mentioned that parallel builds might mess autoconf (I didnt validate it though, but seemed possible)

Copy link
Copy Markdown
Contributor Author

@ldts ldts Mar 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it was an old comment. is ok without it. removed!

@ldts ldts force-pushed the libfyaml branch 2 times, most recently from cf5c305 to ebe42c9 Compare March 23, 2021 18:37
@ldts
Copy link
Copy Markdown
Contributor Author

ldts commented Mar 23, 2021

@rsalveti these autotools dont seem to be installing in the final image?

jramirez@trex build-lmp$ find . -name "fy-tool"
./tmp-lmp/work/cortexa53-crypto-lmp-linux/libfyaml/0.6-r0/image/usr/bin/fy-tool
./tmp-lmp/work/cortexa53-crypto-lmp-linux/libfyaml/0.6-r0/package/usr/bin/.debug/fy-tool
./tmp-lmp/work/cortexa53-crypto-lmp-linux/libfyaml/0.6-r0/package/usr/bin/fy-tool
./tmp-lmp/work/cortexa53-crypto-lmp-linux/libfyaml/0.6-r0/packages-split/libfyaml/usr/bin/fy-tool
./tmp-lmp/work/cortexa53-crypto-lmp-linux/libfyaml/0.6-r0/packages-split/libfyaml-dbg/usr/bin/.debug/fy-tool
./tmp-lmp/work/cortexa53-crypto-lmp-linux/libfyaml/0.6-r0/build/src/fy-tool
./tmp-lmp/work/cortexa53-crypto-lmp-linux/libfyaml/0.6-r0/build/src/.libs/fy-tool

is this a bug or am I missing something in the recipe??

@ldts
Copy link
Copy Markdown
Contributor Author

ldts commented Mar 23, 2021

ok I'll cancel the PR until I figure out the install part. will try again later :)

@ldts ldts closed this Mar 23, 2021
@ldts ldts reopened this Mar 23, 2021
@ldts
Copy link
Copy Markdown
Contributor Author

ldts commented Mar 23, 2021

added it to the factory.inc....although since it is only used by aktualizr-lite perhaps they should go together.
or with the ota-utils...dunno, so many choices...

@ricardosalveti
Copy link
Copy Markdown
Member

added it to the factory.inc....although since it is only used by aktualizr-lite perhaps they should go together.
or with the ota-utils...dunno, so many choices...

If used/required by aktualizr-lite, just make it a dependency of aktualizr.

@ldts ldts requested a review from ricardosalveti March 23, 2021 20:27
@ricardosalveti
Copy link
Copy Markdown
Member

PACKAGECONFIG += "${@bb.utils.filter('SOTA_EXTRA_CLIENT_FEATURES', 'fiovb', d)}"
PACKAGECONFIG[fiovb] = ",,,optee-fiovb aktualizr-fiovb-env-rollback"
PACKAGECONFIG[ubootenv] = ",,u-boot-fw-utils,u-boot-fw-utils u-boot-default-env aktualizr-uboot-env-rollback"

You could extend that to cover libfyaml, like:
PACKAGECONFIG[fyaml] = ",,,libfyaml"

And adding fyaml to PACKAGECONFIG by default.

@ldts
Copy link
Copy Markdown
Contributor Author

ldts commented Mar 23, 2021

right and I was thinking about messing with that but what would happen if other clients decide to use this tool?
it is not much different than aktualizr-lite depending on docker-cli (actually is pretty much the same sort of dependency)
so I opted for just adding it to the factory inc.

"And adding fyaml to PACKAGECONFIG by default."

PACKAGECONFIG += "libfyaml"
PACKAGECONFIG[libfyaml] = ",,,libfyaml"

what do you mean something like the above? I am not too familiar with this bit...so is the typical use case of this construct for binaries calling other binaries? seems strange capturing dependencies between binaries in this way...

@ricardosalveti
Copy link
Copy Markdown
Member

right and I was thinking about messing with that but what would happen if other clients decide to use this tool?
it is not much different than aktualizr-lite depending on docker-cli (actually is pretty much the same sort of dependency)
so I opted for just adding it to the factory inc.

"And adding fyaml to PACKAGECONFIG by default."

PACKAGECONFIG += "libfyaml"
PACKAGECONFIG[libfyaml] = ",,,libfyaml"

Right, this change would need to be part of the aktualizr_%.bbappend we have in meta-lmp-base.

what do you mean something like the above? I am not too familiar with this bit...so is the typical use case of this construct for binaries calling other binaries? seems strange capturing dependencies between binaries in this way...

IIRC the syntax here is:

PACKAGECONFIG[foobar] = "optiontoenableduringbuildtime,optiontodisableduringbuildtime,builddependency,runtimedependency"

So you could have this as a build option in aktualizr as well if needed. Since it seems you need during runtime, you have to add it at the last block.

S = "${WORKDIR}/libfyaml-${PV}"

inherit autotools pkgconfig

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just drop this last empty line.

@ricardosalveti
Copy link
Copy Markdown
Member

WARNING: libfyaml-0.6-r0 do_package_qa: QA Issue: libfyaml: SRC_URI uses unstable GitHub archives [src-uri-bad]

I think we need to use the release link instead.

@ricardosalveti
Copy link
Copy Markdown
Member

https://github.com/pantoniou/libfyaml/archive/refs/tags/v0.6.tar.gz

WARNING: libfyaml-0.6-r0 do_package_qa: QA Issue: libfyaml: SRC_URI uses unstable GitHub archives [src-uri-bad]

I think we need to use the release link instead.

Seems release is not available for 0.6, sigh.

In this case, use git then and use the hash from the 0.6 tag.

@ricardosalveti
Copy link
Copy Markdown
Member

right and I was thinking about messing with that but what would happen if other clients decide to use this tool?

Then they will need to rdepend on it as well.

In our case, as we know which tool is expecting to use it, it is better to just make it a dependency the tool we're already installing, as then we don't need to change the image.

@ricardosalveti ricardosalveti requested a review from angolini March 24, 2021 02:21
@ldts
Copy link
Copy Markdown
Contributor Author

ldts commented Mar 24, 2021

the issue is that .tarball-version is missing in the tarball
should contain something like:
0.6.0

@ldts ldts force-pushed the libfyaml branch 2 times, most recently from cb6c57c to 84ba704 Compare March 24, 2021 10:35
@ldts
Copy link
Copy Markdown
Contributor Author

ldts commented Mar 24, 2021

I believe this should get merged rather than waiting for v.07 (or whatever version comes along). we can always bump it later

@ldts
Copy link
Copy Markdown
Contributor Author

ldts commented Mar 26, 2021

I believe this should get merged rather than waiting for v.07 (or whatever version comes along). we can always bump it later

it doesnt matter anymore...just got an update from Pantelis

fy-tool generated during build will be consumed by aktualizr-lite to
convert docker yaml to json.

Signed-off-by: Jorge Ramirez-Ortiz <[email protected]>
@mike-sul
Copy link
Copy Markdown
Contributor

@ricardosalveti Can we merge it so I can test the latest aklite dev version (deps on fy-tool) against the latest lmp.

@ricardosalveti
Copy link
Copy Markdown
Member

@ricardosalveti Can we merge it so I can test the latest aklite dev version (deps on fy-tool) against the latest lmp.

Merging just the recipe itself is fine, as that won't influence anything for now, let me see if I can just cherry-pick that.

@ricardosalveti
Copy link
Copy Markdown
Member

I pushed just the recipe at 1dd1d1f, @ldts please update this PR with just the aktualizr-lite addition once there is an updated rev that requires it.

PACKAGECONFIG += "${@bb.utils.filter('SOTA_EXTRA_CLIENT_FEATURES', 'fiovb', d)}"
PACKAGECONFIG[fiovb] = ",,,optee-fiovb aktualizr-fiovb-env-rollback"
PACKAGECONFIG[ubootenv] = ",,u-boot-fw-utils,u-boot-fw-utils u-boot-default-env aktualizr-uboot-env-rollback"
PACKAGECONFIG += "libfyaml"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you extend the first "PACKAGECONFIG +=" line instead with libfyaml?

Also please bump the rev to the one that now requires libfyaml, to avoid having an extra dependency that has no use for the rootfs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ricardosalveti
Copy link
Copy Markdown
Member

Manually merged after resolving a minor conflict and removing one patch which was already added in v80.

@mike-sul
Copy link
Copy Markdown
Contributor

mike-sul commented Apr 6, 2021

@ricardosalveti Thanks, so the libfyaml stuff is in the master/HEAD of lmp-manifest but is not in v80, which is the right thing to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants