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 |
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 > } >
Hi, Thanks for your questions. The issue can be reproduced by explicitly enabling p11-kit in the gnutls PACKAGECONFIG. For example, by adding the following line to your local.conf: PACKAGECONFIG:append:pn-gnutls = " p11-kit" This configuration is needed on platforms that require certificate management or use smartcard/token-based cryptographic modules supported by p11-kit. The reason this problem does not appear in default Poky builds is that p11-kit is not enabled in gnutls by default. Therefore, the build sysroot path does not get pulled into the generated .pc files, avoiding the QA error. Thanks, Jiaying. > -----Original Message----- > From: Gyorgy Sarvari <skandigraun@gmail.com> > Sent: Friday, June 20, 2025 7:59 PM > To: Song, Jiaying (CN) <Jiaying.Song.CN@windriver.com>; openembedded- > devel@lists.openembedded.org > Cc: Yang, Liezhi <Liezhi.Yang@windriver.com>; Li, Changqing > <Changqing.Li@windriver.com> > Subject: Re: [oe] [meta-oe][PATCH] xmlsec1: avoid hardcoded > ${RECIPE_SYSROOT} in xmlsec1-gnutls.pc > > CAUTION: This email comes from a non Wind River email account! > Do not click links or open attachments unless you recognize the sender and > know the content is safe. > > 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 > > } > >
On 6/23/25 04:17, Song, Jiaying (CN) wrote: > Hi, > > Thanks for your questions. > > The issue can be reproduced by explicitly enabling p11-kit in the gnutls PACKAGECONFIG. For example, by adding the following line to your local.conf: > > PACKAGECONFIG:append:pn-gnutls = " p11-kit" Thanks a lot, I managed to reproduce it based on your instructions. > > This configuration is needed on platforms that require certificate management or use smartcard/token-based cryptographic modules supported by p11-kit. > > The reason this problem does not appear in default Poky builds is that p11-kit is not enabled in gnutls by default. Therefore, the build sysroot path does not get pulled into the generated .pc files, avoiding the QA error. > > Thanks, > Jiaying. > >> -----Original Message----- >> From: Gyorgy Sarvari <skandigraun@gmail.com> >> Sent: Friday, June 20, 2025 7:59 PM >> To: Song, Jiaying (CN) <Jiaying.Song.CN@windriver.com>; openembedded- >> devel@lists.openembedded.org >> Cc: Yang, Liezhi <Liezhi.Yang@windriver.com>; Li, Changqing >> <Changqing.Li@windriver.com> >> Subject: Re: [oe] [meta-oe][PATCH] xmlsec1: avoid hardcoded >> ${RECIPE_SYSROOT} in xmlsec1-gnutls.pc >> >> CAUTION: This email comes from a non Wind River email account! >> Do not click links or open attachments unless you recognize the sender and >> know the content is safe. >> >> 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 >>> } >>>
This breaks the build when e.g. gnutls PACKAGECONFIG isn't enabled in xmlsec1 and xmlsec1/1.3.7/image/usr/lib/pkgconfig/xmlsec1-gnutls.pc doesn't exist. It should either check for the file existence before the sed call or the list should be conditional based on PACKAGECONFIG. It fails in walnascar as well where it was backported and merged today. On Tue, Jun 24, 2025 at 7:34 AM Gyorgy Sarvari via lists.openembedded.org <skandigraun=gmail.com@lists.openembedded.org> wrote: > > On 6/23/25 04:17, Song, Jiaying (CN) wrote: > > Hi, > > > > Thanks for your questions. > > > > The issue can be reproduced by explicitly enabling p11-kit in the gnutls PACKAGECONFIG. For example, by adding the following line to your local.conf: > > > > PACKAGECONFIG:append:pn-gnutls = " p11-kit" > > Thanks a lot, I managed to reproduce it based on your instructions. > > > > > This configuration is needed on platforms that require certificate management or use smartcard/token-based cryptographic modules supported by p11-kit. > > > > The reason this problem does not appear in default Poky builds is that p11-kit is not enabled in gnutls by default. Therefore, the build sysroot path does not get pulled into the generated .pc files, avoiding the QA error. > > > > Thanks, > > Jiaying. > > > >> -----Original Message----- > >> From: Gyorgy Sarvari <skandigraun@gmail.com> > >> Sent: Friday, June 20, 2025 7:59 PM > >> To: Song, Jiaying (CN) <Jiaying.Song.CN@windriver.com>; openembedded- > >> devel@lists.openembedded.org > >> Cc: Yang, Liezhi <Liezhi.Yang@windriver.com>; Li, Changqing > >> <Changqing.Li@windriver.com> > >> Subject: Re: [oe] [meta-oe][PATCH] xmlsec1: avoid hardcoded > >> ${RECIPE_SYSROOT} in xmlsec1-gnutls.pc > >> > >> CAUTION: This email comes from a non Wind River email account! > >> Do not click links or open attachments unless you recognize the sender and > >> know the content is safe. > >> > >> 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 > >>> } > >>> > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#118095): https://lists.openembedded.org/g/openembedded-devel/message/118095 > Mute This Topic: https://lists.openembedded.org/mt/113737769/3617156 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [martin.jansa@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
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 }