[Leda] build failing since upgrade to rauc 1.10 because of an absolute path in rauc recipe
https://gitlab.eclipse.org/eclipse/oniro-compliancetoolchain/third-party/mirrors/leda/-/jobs/270124
The relevant log line is this one:
install: cannot stat '/build/leda/0.0.6-74-g38bcd7b/build-qemux86-64/tmp/work/qemux86_64-poky-linux/rauc/1.10-r0//build/leda/0.0.6-74-g38bcd7b/build-qemux86-64/../examples/example-ca/ca.cert.pem': No such file or directory
The issue depends on a rauc recipe's SRC_URI
entry pointing to RAUC_KEYRING_URI
, which in turn points to file://${RAUC_KEYRING_FILE
, defined in local.conf as ${TOPDIR}/../examples/example-ca/ca.cert.pem
.
In our pipeline environment, this path happens to expand to an absolute path starting with /build
(because the persistent volume shared across pipeline containers is mounted to /build).
Unfortunately, because of the way bitbake unpacks absolute file URIs to the recipe's workdir (it just adds the absolute path after the workdir path), that file gets unpacked into the recipe's build dir which is [...]tmp/work/qemux86_64-poky-linux/rauc/1.10-r0/build
(see the path in the log line above).
The problem is that the new rauc build process (since v1.10) deletes the content of the recipe build dir before building the component, and that's where that file gets deleted (checked by doing bitbake -c unpack -f rauc
- the file mentioned in the log line above is there - and then bitbake -c compile rauc
- the file is not there any more, and when one tries do do bitbake -c install rauc
they get the error).
A temporary workaround would be doing, from within the source dir:
ln -s $PWD/examples meta-leda/meta-leda-bsp/recipes-bsp/rauc/files/examples
and then changing the value of RAUC_KEYRING_FILE
in local.conf
to:
RAUC_KEYRING_FILE="examples/example-ca/ca.cert.pem"
In this way, the file is unpacked to /build/leda/0.0.6-74-g38bcd7b/build-qemux86-64/tmp/work/qemux86_64-poky-linux/rauc/1.10-r0/examples
and I does not get deleted any more - and the build works.