All of lore.kernel.org
 help / color / mirror / Atom feed
* QA Host Contamination in autotools/pkconfig based recipe
@ 2016-09-16 12:40 Chris Trobridge
  2016-09-16 13:33 ` Burton, Ross
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Trobridge @ 2016-09-16 12:40 UTC (permalink / raw)
  To: yocto

I raised this back in April but I am back on QA review and I did not manage to sort this at the time.

I have a recipe for pjproject that produces QA host contamination warnings for all the library files it installs:

pjproject: /pjproject/usr/lib/*.so.2 is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination
pjproject: /pjproject-staticdev/usr/lib/*.a is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination

The install line in the makefile is "cp -af $(APP_LIBXX_FILES) $(DESTDIR)$(libdir)/", so I am at a bit of a loss as this should preserve ownership.

I've included the recipe I am using.

Regards,
Chris

DESCRIPTION = "Open source SIP stack and media stack for presence, im/instant \
               messaging, and multimedia communication"
SECTION = "libs"
HOMEPAGE = "http://www.pjsip.org/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"

DEPENDS = "alsa-lib openssl"
RDEPENDS_${PN} = "util-linux-libuuid"

PARALLEL_MAKE = ""

SRC_URI = "http://www.pjsip.org/release/${PV}/pjproject-${PV}.tar.bz2 "
SRC_URI[md5sum] = "183f7144b9aa238884243c0fc52ece36"

S = "${WORKDIR}/pjproject-${PV}"

EXTRA_OECONF += "--enable-shared"

DEBUG_FLAGS = "-g -feliminate-unused-debug-types"

inherit autotools pkgconfig

B = "${S}"

do_configure_prepend() {
    LD=$CC
}

 		 	   		  

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

* Re: QA Host Contamination in autotools/pkconfig based recipe
  2016-09-16 12:40 QA Host Contamination in autotools/pkconfig based recipe Chris Trobridge
@ 2016-09-16 13:33 ` Burton, Ross
  2016-09-16 23:59   ` Andre McCurdy
  0 siblings, 1 reply; 3+ messages in thread
From: Burton, Ross @ 2016-09-16 13:33 UTC (permalink / raw)
  To: Chris Trobridge; +Cc: yocto

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

On 16 September 2016 at 13:40, Chris Trobridge <christrobridge@hotmail.com>
wrote:

> The install line in the makefile is "cp -af $(APP_LIBXX_FILES)
> $(DESTDIR)$(libdir)/", so I am at a bit of a loss as this should preserve
> ownership.
>

It does - the build happens as you (uid 1000) so the file gets installed as
1000.  This is why makefiles should generally use "install" instead, as
that will reset owner.  automake has built in support for this, otherwise
just patch out "cp" and use "install" instead.

Oh and:

inherit autotools pkgconfig
B = "${S}"

Just inherit autotools-brokensep instead.

Ross

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

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

* Re: QA Host Contamination in autotools/pkconfig based recipe
  2016-09-16 13:33 ` Burton, Ross
@ 2016-09-16 23:59   ` Andre McCurdy
  0 siblings, 0 replies; 3+ messages in thread
From: Andre McCurdy @ 2016-09-16 23:59 UTC (permalink / raw)
  To: Burton, Ross; +Cc: yocto

On Fri, Sep 16, 2016 at 6:33 AM, Burton, Ross <ross.burton@intel.com> wrote:
>
> On 16 September 2016 at 13:40, Chris Trobridge <christrobridge@hotmail.com>
> wrote:
>>
>> The install line in the makefile is "cp -af $(APP_LIBXX_FILES)
>> $(DESTDIR)$(libdir)/", so I am at a bit of a loss as this should preserve
>> ownership.
>
>
> It does - the build happens as you (uid 1000) so the file gets installed as
> 1000.  This is why makefiles should generally use "install" instead, as that
> will reset owner.  automake has built in support for this, otherwise just
> patch out "cp" and use "install" instead.

If using install doesn't work for some reason then replacing "cp -af"
with "cp -af --no-preserve=ownership" would be an alternative.

> Oh and:
>
> inherit autotools pkgconfig
> B = "${S}"
>
> Just inherit autotools-brokensep instead.
>
> Ross
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>


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

end of thread, other threads:[~2016-09-17  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-16 12:40 QA Host Contamination in autotools/pkconfig based recipe Chris Trobridge
2016-09-16 13:33 ` Burton, Ross
2016-09-16 23:59   ` Andre McCurdy

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.