On Fri, 2018-09-07 at 21:10 +0300, Yevgeny Popovych wrote:
> When ca-certificates-java-native is built, sysconfdir variable will
> be set to value that includes WORKDIR.

What is your use-case for a -native version of this?

> Avoid patching source with this value - use sysconfdir_native.
> 
> Change-Id: I8ac79c3cd5016a8139d9d8c8d58bc2976d0b6fa3
> Signed-off-by: Yevgeny Popovych <[email protected]>
> ---
>  .../ca-certificates-java/ca-certificates-java_20180516.bb        | 9
> +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/recipes-core/ca-certificates-java/ca-certificates-
> java_20180516.bb b/recipes-core/ca-certificates-java/ca-certificates-
> java_20180516.bb
> index 2db1915..7db5110 100644
> --- a/recipes-core/ca-certificates-java/ca-certificates-java_20180516.bb
> +++ b/recipes-core/ca-certificates-java/ca-certificates-java_20180516.bb
> @@ -41,9 +41,14 @@ do_patch_append () {
>      bb.build.exec_func('do_fix_sysconfdir', d)
>  }
>  
> +# sysconfdir will include absolute native sysroot path in -native builds,
> avoid this
> +# (see 36.24 of 
> https://www.yoctoproject.org/docs/2.5/mega-manual/mega-manual.html#faq)
> +SYSCONFDIR_VALUE_class-target = "${sysconfdir}"
> +SYSCONFDIR_VALUE_class-native = "${sysconfdir_native}"
> +
>  do_fix_sysconfdir () {
> -     sed -e 's|/etc/ssl/certs/java|${sysconfdir}/ssl/certs/java|g' \
> -         -i
> ${S}/src/main/java/org/debian/security/UpdateCertificates.java
> +    sed -e 's|/etc/ssl/certs/java|${SYSCONFDIR_VALUE}/ssl/certs/java|g' \
> +        -i ${S}/src/main/java/org/debian/security/UpdateCertificates.java
>  }
>  

No.

It's probably best to remove the BBCLASSEXTEND statement in this recipe
instead, as it was never tested, and is unlikely to be needed.

The whole idea is to make this independent of the build machine paths. If
you want a -native version of this, you still need to make sure to point
this into the yocto sysroot. Otherwise this will try to write to the *build
machine's* /etc/ directory!

If you really want a -native version, you need to point this into the
sysroot, and update this dynamically because of sstate usage, too.


Cheers,
Andre'


-- 
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Reply via email to