Hi Ross
    I will make an example to explain it.
    When I use "gnutls-cli --fips140-mode" in multilib environment, it shows 
library not found error.
     root@qemux86-64:~# gnutls-cli --fips140-mode
      library is NOT in FIPS140-2 mode

    And it was caused by lacking hmac files.
    root@qemux86-64:~# ls /usr/lib64/.*hmac
    ls: cannot access '/usr/lib64/.libgnutl*': No such file or directory

   The reason is as following:
    When '${sysconfdir}/gnutls' was created by 'mkdir' with lib32-gnutls, the 
dir will not be created again by  'mkdir' with lib-gnutls, and the subsequent 
command will not be executed, so hmac files were missing in lib64 environment.
    ${bindir}/fipshmac ${libdir}/libgnutls.so.30.*.* > 
${libdir}/.libgnutls.so.30.hmac

    So append "-p" parameter can avoid this error.

Liu

________________________________
发件人: Ross Burton <[email protected]>
发送时间: 2025年12月5日 02:35
收件人: Liu, Yiding/刘 乙丁 <[email protected]>
抄送: [email protected] 
<[email protected]>
主题: Re: [OE-core][PATCH] gnutls: fix postinst script for ${PN}-fips for 
multilibs

On 28 Nov 2025, at 06:59, Yiding Liu (Fujitsu) via lists.openembedded.org 
<[email protected]> wrote:
>
> When enabling multilibs,the mkdir command will be failed which will cause 
> subsequent command not being executed.
> So append "-p" parameter.
>
> Signed-off-by: Liu Yiding <[email protected]>
> ---
> meta/recipes-support/gnutls/gnutls_3.8.10.bb | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-support/gnutls/gnutls_3.8.10.bb 
> b/meta/recipes-support/gnutls/gnutls_3.8.10.bb
> index 2ef71a1213..56a84f76f0 100644
> --- a/meta/recipes-support/gnutls/gnutls_3.8.10.bb
> +++ b/meta/recipes-support/gnutls/gnutls_3.8.10.bb
> @@ -90,7 +90,7 @@ BBCLASSEXTEND = "native nativesdk"
> pkg_postinst_ontarget:${PN}-fips () {
>     if test -x ${bindir}/fipshmac
>     then
> -        mkdir ${sysconfdir}/gnutls
> +        mkdir -p ${sysconfdir}/gnutls
>         touch ${sysconfdir}/gnutls/config
>         ${bindir}/fipshmac ${libdir}/libgnutls.so.30.*.* > 
> ${libdir}/.libgnutls.so.30.hmac
>         ${bindir}/fipshmac ${libdir}/libnettle.so.8.* > 
> ${libdir}/.libnettle.so.8.hmac

I don’t understand how this happens, as sysconfdir is /etc in all multilib 
configurations?

Can you explain what path is the problem here, this appears to be saying that 
/etc doesn’t exist on target, which doesn’t seem likely.

Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#227375): 
https://lists.openembedded.org/g/openembedded-core/message/227375
Mute This Topic: https://lists.openembedded.org/mt/116669633/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to