diff mbox series

[meta-oe] xmlsec1: avoid hardcoded ${RECIPE_SYSROOT} in xmlsec1-gnutls.pc

Message ID 20250620041131.2424118-1-jiaying.song.cn@windriver.com
State New
Headers show
Series [meta-oe] xmlsec1: avoid hardcoded ${RECIPE_SYSROOT} in xmlsec1-gnutls.pc | expand

Commit Message

Song, Jiaying (CN) June 20, 2025, 4:11 a.m. UTC
From: Jiaying Song <jiaying.song.cn@windriver.com>

Fix do_package_qa error by removing ${RECIPE_SYSROOT} from the installed xmlsec1-gnutls.pc file.
This ensures the generated .pc file does not leak build-time paths, complying with QA checks.

Fixes QA error:
ERROR: xmlsec1-1.3.7-r0.wr2500 do_package_qa: QA Issue: File /usr/lib/pkgconfig/xmlsec1-gnutls.pc in package xmlsec1-dev contains reference to TMPDIR [buildpaths]

Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
---
 meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.7.bb | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Gyorgy Sarvari June 20, 2025, 11:58 a.m. UTC | #1
On 6/20/25 06:11, Song, Jiaying (CN) via lists.openembedded.org wrote:
> From: Jiaying Song <jiaying.song.cn@windriver.com>
>
> Fix do_package_qa error by removing ${RECIPE_SYSROOT} from the installed xmlsec1-gnutls.pc file.
> This ensures the generated .pc file does not leak build-time paths, complying with QA checks.
>
> Fixes QA error:
> ERROR: xmlsec1-1.3.7-r0.wr2500 do_package_qa: QA Issue: File /usr/lib/pkgconfig/xmlsec1-gnutls.pc in package xmlsec1-dev contains reference to TMPDIR [buildpaths]

How could this be reproduced? Does it need some special config or
environment?

I tried to build it in both master and walnascar for qemux86-64, and it
was successful, QA checks passed. I used the default recipe, where
gnutls is part of PACKAGECONFIG, and also when PACKAGECONFIG only
contained "gnutls".  xmlsec1-gnutls.pc was also generated and installed.

> Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
> ---
>  meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.7.bb | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.7.bb b/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.7.bb
> index 2fdfd55f24..0f4ae205b1 100644
> --- a/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.7.bb
> +++ b/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.7.bb
> @@ -54,8 +54,11 @@ do_compile_ptest () {
>  }
>  
>  do_install:append() {
> -    for i in ${bindir}/xmlsec1-config ${libdir}/xmlsec1Conf.sh \
> -        ${libdir}/pkgconfig/xmlsec1-openssl.pc; do
> +    for i in \
> +        ${bindir}/xmlsec1-config \
> +        ${libdir}/xmlsec1Conf.sh \
> +        ${libdir}/pkgconfig/xmlsec1-openssl.pc \
> +        ${libdir}/pkgconfig/xmlsec1-gnutls.pc; do
>          sed -i -e "s@${RECIPE_SYSROOT}@@g" ${D}$i
>      done
>  }
>
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.7.bb b/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.7.bb
index 2fdfd55f24..0f4ae205b1 100644
--- a/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.7.bb
+++ b/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.7.bb
@@ -54,8 +54,11 @@  do_compile_ptest () {
 }
 
 do_install:append() {
-    for i in ${bindir}/xmlsec1-config ${libdir}/xmlsec1Conf.sh \
-        ${libdir}/pkgconfig/xmlsec1-openssl.pc; do
+    for i in \
+        ${bindir}/xmlsec1-config \
+        ${libdir}/xmlsec1Conf.sh \
+        ${libdir}/pkgconfig/xmlsec1-openssl.pc \
+        ${libdir}/pkgconfig/xmlsec1-gnutls.pc; do
         sed -i -e "s@${RECIPE_SYSROOT}@@g" ${D}$i
     done
 }