All of lore.kernel.org
 help / color / mirror / Atom feed
* package QA & missing runtime dependency alerting (thud)
@ 2020-02-19 12:50 Peter Morrow
  2020-02-19 13:59 ` [yocto] " Maciej Pijanowski
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Morrow @ 2020-02-19 12:50 UTC (permalink / raw)
  To: yocto

Hello,

We occasionally see our build fail due to package QA issues,
specifically:

ERROR: gawk-4.2.1-r0 do_package_qa: QA Issue:
/usr/lib/gawk/ptest/test/fcall_exit.awk contained in package gawk-ptest 
requires /bin/awk, but no providers found in RDEPENDS_gawk-ptest?
[file-rdeps], 

I'm wondering how yocto has made the decision that "/bin/awk" is a
runtime dependency for gawk-ptest (it is, so this is good).  Does
yocto read /usr/lib/gawk/ptest/test/fcall_exit.awk looking for anything
that matches on a shbang then alert us to this as a missing RDEPENDS?

I think this is what is happening but cannot see this in the
documentation error.  Something to back this hunch up:

http://lists.openembedded.org/pipermail/openembedded-core/2016-November/128419.html

I'm about to send patches upstream to gawk to remove some more shbangs
from awk scripts and thus would like to check the yocto behaviour
before I do so.

Thanks,
Peter.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [yocto] package QA & missing runtime dependency alerting (thud)
  2020-02-19 12:50 package QA & missing runtime dependency alerting (thud) Peter Morrow
@ 2020-02-19 13:59 ` Maciej Pijanowski
  2020-02-19 15:03   ` Peter Morrow
  0 siblings, 1 reply; 3+ messages in thread
From: Maciej Pijanowski @ 2020-02-19 13:59 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1409 bytes --]


On 19.02.2020 13:50, Peter Morrow via Lists.Yoctoproject.Org wrote:
> Hello,
>
> We occasionally see our build fail due to package QA issues,
> specifically:
>
> ERROR: gawk-4.2.1-r0 do_package_qa: QA Issue:
> /usr/lib/gawk/ptest/test/fcall_exit.awk contained in package gawk-ptest
> requires /bin/awk, but no providers found in RDEPENDS_gawk-ptest?
> [file-rdeps],
>
> I'm wondering how yocto has made the decision that "/bin/awk" is a
> runtime dependency for gawk-ptest (it is, so this is good).  Does
> yocto read /usr/lib/gawk/ptest/test/fcall_exit.awk looking for anything
> that matches on a shbang then alert us to this as a missing RDEPENDS?
Yes, it does look at the sheabangs of the scripts. Please refer to the 
manual
and the insane.bbclass imeplementation
https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#ref-classes-insane
>
> I think this is what is happening but cannot see this in the
> documentation error.  Something to back this hunch up:
>
> http://lists.openembedded.org/pipermail/openembedded-core/2016-November/128419.html
>
> I'm about to send patches upstream to gawk to remove some more shbangs
> from awk scripts and thus would like to check the yocto behaviour
> before I do so.
>
> Thanks,
> Peter.
>
>
>
>
> 

-- 
Maciej Pijanowski
Embedded Systems Engineer
GPG: 9963C36AAC3B2B46
https://3mdeb.com | @3mdeb_com


[-- Attachment #2: Type: text/html, Size: 2429 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [yocto] package QA & missing runtime dependency alerting (thud)
  2020-02-19 13:59 ` [yocto] " Maciej Pijanowski
@ 2020-02-19 15:03   ` Peter Morrow
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Morrow @ 2020-02-19 15:03 UTC (permalink / raw)
  To: yocto, maciej.pijanowski

On Wed, 2020-02-19 at 14:59 +0100, Maciej Pijanowski via
Lists.Yoctoproject.Org wrote:
> 
> 
> On 19.02.2020 13:50, Peter Morrow via Lists.Yoctoproject.Org wrote:
> 
> > Hello,
> > 
> > We occasionally see our build fail due to package QA issues,
> > specifically:
> > 
> > ERROR: gawk-4.2.1-r0 do_package_qa: QA Issue:
> > /usr/lib/gawk/ptest/test/fcall_exit.awk contained in package gawk-
> > ptest 
> > requires /bin/awk, but no providers found in RDEPENDS_gawk-ptest?
> > [file-rdeps], 
> > 
> > I'm wondering how yocto has made the decision that "/bin/awk" is a
> > runtime dependency for gawk-ptest (it is, so this is good).  Does
> > yocto read /usr/lib/gawk/ptest/test/fcall_exit.awk looking for
> > anything
> > that matches on a shbang then alert us to this as a missing
> > RDEPENDS?
>  Yes, it does look at the sheabangs of the scripts. Please refer to
> the manual
> and the insane.bbclass imeplementation
> https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#ref-classes-insane

Thanks Maciej,

I'm wondering also about the specific failure I'm seeing here, i.e.
gawk-ptest RDEPENDS on /bin/awk.  Looking at the recipe for gawk in
thud I see:

inherit autotools gettext texinfo update-alternatives

FILES_${PN} += "${datadir}/awk"
FILES_${PN}-dev += "${libdir}/${BPN}/*.la"

ALTERNATIVE_${PN} = "awk"
ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
ALTERNATIVE_PRIORITY = "100"

do_install_append() {
    # remove the link since we don't package it
    rm ${D}${bindir}/awk
}

So awk is an alternative for gawk.  In the version of yocto I'm using
(thud) the ptest.bbclass does not add a dependency on the package that
is being tested (this appears fixed in more recent versions of yocto).
Thus I added the dependency on gawk from gawk-ptest in a bbappend file
for gawk (to fix other package QA issues):

RDEPENDS_${PN}-ptest += " gawk"

So the question then becomes are alternatives also honoured in the
file-rdeps check of the insane bbclass?  I.e. if a file-rdeps check
finds /bin/awk in a file, since "awk" is not explicitly in the RDEPENDS
list (but gawk is) is this flagged as a false positive?

I'd prefer not to add INSANE_SKIP_${PN} = "file-rdeps" for gawk if
possible.

Thanks,
Peter.

> > I think this is what is happening but cannot see this in the
> > documentation error.  Something to back this hunch up:
> > 
> > http://lists.openembedded.org/pipermail/openembedded-core/2016-November/128419.html
> > 
> > 
> > I'm about to send patches upstream to gawk to remove some more
> > shbangs
> > from awk scripts and thus would like to check the yocto behaviour
> > before I do so.
> > 
> > Thanks,
> > Peter.
> > 
> > 
> > 
> > 
> > 
> 
> -- 
> Maciej Pijanowski
> Embedded Systems Engineer
> GPG: 9963C36AAC3B2B46
> https://3mdeb.com
>  | @3mdeb_com
> 
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-19 15:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-19 12:50 package QA & missing runtime dependency alerting (thud) Peter Morrow
2020-02-19 13:59 ` [yocto] " Maciej Pijanowski
2020-02-19 15:03   ` Peter Morrow

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.