Openembedded Core Discussions
 help / color / mirror / Atom feed
* Re: [PATCH 2/2] rpm: Ensure that we check both providename and filepaths
  2012-04-12 21:21 ` [PATCH 2/2] rpm: Ensure that we check both providename and filepaths Mark Hatle
@ 2012-04-12 21:19   ` Steve Sakoman
  0 siblings, 0 replies; 10+ messages in thread
From: Steve Sakoman @ 2012-04-12 21:19 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Thu, Apr 12, 2012 at 2:21 PM, Mark Hatle <mark.hatle@windriver.com> wrote:
> In lib/rpmts.c we need to make sure to look for missing dependencies,
> such as /bin/sh, in both the providename and filepaths DB.  Previously
> the system would key off an initial '/' and only look in the filepaths DB.
>
> This causes problems when a package such as "bash", has a Provides: /bin/sh.
>
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>

Tested-by: Steve Sakoman <steve@sakoman.com>



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

* [PATCH 0/2] Two small fixes, pseudo and rpm
@ 2012-04-12 21:21 Mark Hatle
  2012-04-12 21:21 ` [PATCH 1/2] pseudo: Tell pseudo to avoid specifying an RPATH Mark Hatle
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Mark Hatle @ 2012-04-12 21:21 UTC (permalink / raw)
  To: openembedded-core

pseudo was adding in an rpath, prevent that

rpm-native was not resolving dependencies that looked like possible
filename properly.


The following changes since commit 71e95c744eaa4dda1b3237db2e13f666f121c92b:

  package_rpm.bbclass: Set tmppath for rpm to somewhere which won't conflict with the rootfs (2012-04-12 21:24:55 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib mhatle/fixes
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/fixes

Mark Hatle (2):
  pseudo: Tell pseudo to avoid specifying an RPATH
  rpm: Ensure that we check both providename and filepaths

 meta/recipes-devtools/pseudo/pseudo.inc            |    8 ++--
 meta/recipes-devtools/pseudo/pseudo_1.3.bb         |    2 +-
 meta/recipes-devtools/pseudo/pseudo_git.bb         |    2 +-
 meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch |   36 ++++++++++++++++++++
 meta/recipes-devtools/rpm/rpm_5.4.0.bb             |    3 +-
 5 files changed, 44 insertions(+), 7 deletions(-)
 create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch

-- 
1.7.3.4




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

* [PATCH 1/2] pseudo: Tell pseudo to avoid specifying an RPATH
  2012-04-12 21:21 [PATCH 0/2] Two small fixes, pseudo and rpm Mark Hatle
@ 2012-04-12 21:21 ` Mark Hatle
  2012-04-13 15:13   ` Saul Wold
  2012-04-12 21:21 ` [PATCH 2/2] rpm: Ensure that we check both providename and filepaths Mark Hatle
  2012-04-13 15:11 ` [PATCH 0/2] Two small fixes, pseudo and rpm Saul Wold
  2 siblings, 1 reply; 10+ messages in thread
From: Mark Hatle @ 2012-04-12 21:21 UTC (permalink / raw)
  To: openembedded-core

[Yocto #2251]

Add --without-rpath to avoid embedding rpaths into the pseudo
components.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/recipes-devtools/pseudo/pseudo.inc    |    8 ++++----
 meta/recipes-devtools/pseudo/pseudo_1.3.bb |    2 +-
 meta/recipes-devtools/pseudo/pseudo_git.bb |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-devtools/pseudo/pseudo.inc b/meta/recipes-devtools/pseudo/pseudo.inc
index 664a9b5..d5c33df 100644
--- a/meta/recipes-devtools/pseudo/pseudo.inc
+++ b/meta/recipes-devtools/pseudo/pseudo.inc
@@ -29,9 +29,9 @@ NO32LIBS ??= "0"
 # Compile for the local machine arch...
 do_compile () {
 	if [ "${SITEINFO_BITS}" == "64" ]; then
-	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS} --enable-static-sqlite
+	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
 	else
-	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS} --enable-static-sqlite
+	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
 	fi
 	oe_runmake ${MAKEOPTS}
 }
@@ -42,7 +42,7 @@ do_compile () {
 do_compile_prepend_virtclass-native () {
 	if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
 		# We need the 32-bit libpseudo on a 64-bit machine...
-		./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32
+		./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32 --without-rpath
 		oe_runmake ${MAKEOPTS} libpseudo
 		# prevent it from removing the lib, but remove everything else
 		make 'LIB=foo' ${MAKEOPTS} distclean 
@@ -52,7 +52,7 @@ do_compile_prepend_virtclass-native () {
 do_compile_prepend_virtclass-nativesdk () {
 	if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
 		# We need the 32-bit libpseudo on a 64-bit machine...
-		./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32
+		./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32 --without-rpath
 		oe_runmake ${MAKEOPTS} libpseudo
 		# prevent it from removing the lib, but remove everything else
 		make 'LIB=foo' ${MAKEOPTS} distclean 
diff --git a/meta/recipes-devtools/pseudo/pseudo_1.3.bb b/meta/recipes-devtools/pseudo/pseudo_1.3.bb
index e7a329c..080b739 100644
--- a/meta/recipes-devtools/pseudo/pseudo_1.3.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_1.3.bb
@@ -1,6 +1,6 @@
 require pseudo.inc
 
-PR = "r7"
+PR = "r8"
 
 SRC_URI = "http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2"
 
diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
index 9414c79..7857275 100644
--- a/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -2,7 +2,7 @@ require pseudo.inc
 
 SRCREV = "f0375c9aaefbccfd41aebbf6d332bb4d9e8f980c"
 PV = "1.3+git${SRCPV}"
-PR = "r22"
+PR = "r23"
 
 DEFAULT_PREFERENCE = "-1"
 
-- 
1.7.3.4




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

* [PATCH 2/2] rpm: Ensure that we check both providename and filepaths
  2012-04-12 21:21 [PATCH 0/2] Two small fixes, pseudo and rpm Mark Hatle
  2012-04-12 21:21 ` [PATCH 1/2] pseudo: Tell pseudo to avoid specifying an RPATH Mark Hatle
@ 2012-04-12 21:21 ` Mark Hatle
  2012-04-12 21:19   ` Steve Sakoman
  2012-04-13 15:11 ` [PATCH 0/2] Two small fixes, pseudo and rpm Saul Wold
  2 siblings, 1 reply; 10+ messages in thread
From: Mark Hatle @ 2012-04-12 21:21 UTC (permalink / raw)
  To: openembedded-core

In lib/rpmts.c we need to make sure to look for missing dependencies,
such as /bin/sh, in both the providename and filepaths DB.  Previously
the system would key off an initial '/' and only look in the filepaths DB.

This causes problems when a package such as "bash", has a Provides: /bin/sh.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch |   36 ++++++++++++++++++++
 meta/recipes-devtools/rpm/rpm_5.4.0.bb             |    3 +-
 2 files changed, 38 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch

diff --git a/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch b/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch
new file mode 100644
index 0000000..8c01a30
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch
@@ -0,0 +1,36 @@
+lib/rpmts.c: Ensure that we check both providename and filepaths
+
+When looking up a missing dependencies, such as /bin/sh, we need to lookup
+in both the providename and filepaths DB, not just the filepaths DB.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+--- rpm-5.4.0.orig/lib/rpmts.c	2010-12-27 16:08:25.000000000 -0600
++++ rpm-5.4.0/lib/rpmts.c	2012-04-12 15:01:12.990184067 -0500
+@@ -403,8 +403,8 @@
+ 	if (sdb == NULL)
+ 	    continue;
+ 
+-	/* Look for a matching Provides: in suggested universe. */
+-	rpmtag = (*keyp == '/' ? RPMTAG_FILEPATHS : RPMTAG_PROVIDENAME);
++	rpmtag = RPMTAG_PROVIDENAME;
++       do {
+ 	mi = rpmmiInit(sdb, rpmtag, keyp, keylen);
+ 	while ((h = rpmmiNext(mi)) != NULL) {
+ 	    size_t hnamelen;
+@@ -439,6 +439,15 @@
+ 	    bhnamelen = hnamelen;
+ 	}
+ 	mi = rpmmiFree(mi);
++
++	if (bh == NULL && *keyp == '/' && rpmtag == RPMTAG_PROVIDENAME) {
++	   rpmtag = RPMTAG_FILEPATHS;
++	   continue;
++        }
++
++        break;
++      } while (1);
++
+     }
+ 
+     /* Is there a suggested resolution? */
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.0.bb b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
index 4576f67..a9c9628 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.0.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
@@ -45,7 +45,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
 DEPENDS = "bzip2 zlib db openssl elfutils expat libpcre attr acl popt ${extrarpmdeps}"
 extrarpmdeps = "python perl file"
 extrarpmdeps_virtclass-native = "file-native"
-PR = "r35"
+PR = "r36"
 
 # rpm2cpio is a shell script, which is part of the rpm src.rpm.  It is needed
 # in order to extract the distribution SRPM into a format we can extract...
@@ -69,6 +69,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.0-0.20101229.src.rpm;ex
 	   file://fix_for_automake_1.11.2.patch \
 	   file://pythondeps.sh \
 	   file://rpmdeps-oecore.patch \
+	   file://rpm-resolvedep.patch \
 	  "
 
 #	   file://rpm-autoconf.patch \
-- 
1.7.3.4




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

* Re: [PATCH 0/2] Two small fixes, pseudo and rpm
  2012-04-12 21:21 [PATCH 0/2] Two small fixes, pseudo and rpm Mark Hatle
  2012-04-12 21:21 ` [PATCH 1/2] pseudo: Tell pseudo to avoid specifying an RPATH Mark Hatle
  2012-04-12 21:21 ` [PATCH 2/2] rpm: Ensure that we check both providename and filepaths Mark Hatle
@ 2012-04-13 15:11 ` Saul Wold
  2 siblings, 0 replies; 10+ messages in thread
From: Saul Wold @ 2012-04-13 15:11 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 04/12/2012 02:21 PM, Mark Hatle wrote:
> pseudo was adding in an rpath, prevent that
>
> rpm-native was not resolving dependencies that looked like possible
> filename properly.
>
>
> The following changes since commit 71e95c744eaa4dda1b3237db2e13f666f121c92b:
>
>    package_rpm.bbclass: Set tmppath for rpm to somewhere which won't conflict with the rootfs (2012-04-12 21:24:55 +0100)
>
> are available in the git repository at:
>    git://git.pokylinux.org/poky-contrib mhatle/fixes
>    http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/fixes
>
> Mark Hatle (2):
>    pseudo: Tell pseudo to avoid specifying an RPATH
>    rpm: Ensure that we check both providename and filepaths
>
>   meta/recipes-devtools/pseudo/pseudo.inc            |    8 ++--
>   meta/recipes-devtools/pseudo/pseudo_1.3.bb         |    2 +-
>   meta/recipes-devtools/pseudo/pseudo_git.bb         |    2 +-
>   meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch |   36 ++++++++++++++++++++
>   meta/recipes-devtools/rpm/rpm_5.4.0.bb             |    3 +-
>   5 files changed, 44 insertions(+), 7 deletions(-)
>   create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch
>
Merged into OE-Core

Thanks
	Sau!



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

* Re: [PATCH 1/2] pseudo: Tell pseudo to avoid specifying an RPATH
  2012-04-12 21:21 ` [PATCH 1/2] pseudo: Tell pseudo to avoid specifying an RPATH Mark Hatle
@ 2012-04-13 15:13   ` Saul Wold
  2012-04-13 15:22     ` Mark Hatle
  0 siblings, 1 reply; 10+ messages in thread
From: Saul Wold @ 2012-04-13 15:13 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 04/12/2012 02:21 PM, Mark Hatle wrote:
> [Yocto #2251]
>
> Add --without-rpath to avoid embedding rpaths into the pseudo
> components.
>
> Signed-off-by: Mark Hatle<mark.hatle@windriver.com>
> ---
>   meta/recipes-devtools/pseudo/pseudo.inc    |    8 ++++----
>   meta/recipes-devtools/pseudo/pseudo_1.3.bb |    2 +-
>   meta/recipes-devtools/pseudo/pseudo_git.bb |    2 +-
>   3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/meta/recipes-devtools/pseudo/pseudo.inc b/meta/recipes-devtools/pseudo/pseudo.inc
> index 664a9b5..d5c33df 100644
> --- a/meta/recipes-devtools/pseudo/pseudo.inc
> +++ b/meta/recipes-devtools/pseudo/pseudo.inc
> @@ -29,9 +29,9 @@ NO32LIBS ??= "0"
>   # Compile for the local machine arch...
>   do_compile () {
>   	if [ "${SITEINFO_BITS}" == "64" ]; then
> -	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS} --enable-static-sqlite
> +	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
>   	else
> -	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS} --enable-static-sqlite
> +	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
>   	fi
>   	oe_runmake ${MAKEOPTS}
>   }
> @@ -42,7 +42,7 @@ do_compile () {
>   do_compile_prepend_virtclass-native () {
>   	if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
>   		# We need the 32-bit libpseudo on a 64-bit machine...
> -		./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32
> +		./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32 --without-rpath
>   		oe_runmake ${MAKEOPTS} libpseudo
>   		# prevent it from removing the lib, but remove everything else
>   		make 'LIB=foo' ${MAKEOPTS} distclean
> @@ -52,7 +52,7 @@ do_compile_prepend_virtclass-native () {
>   do_compile_prepend_virtclass-nativesdk () {
>   	if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
>   		# We need the 32-bit libpseudo on a 64-bit machine...
> -		./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32
> +		./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32 --without-rpath
We might still need this rpath or something similar since the nativesdk 
now breaks not finding the correct version of the included libc.so.6

/opt/poky/1.2/sysroots/x86_64-pokysdk-linux/usr/bin/pseudo -P 
/opt/poky/1.2/sysroots/x86_64-pokysdk-linux/usr tar -C "/tmp/opt" -xjf 
"/intel/home/sgw/Downloads/core-image-minimal-qemux86-64.tar.bz2"
tar: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found 
(required by 
/opt/poky/1.2/sysroots/x86_64-pokysdk-linux/usr/lib/pseudo/lib64/libpseudo.so)

See also bug 1968

I do have a libc.so.6.

/opt/poky/1.2/sysroots/x86_64-pokysdk-linux/lib/libc.so.6 -> libc-2.15.so

Sau!

>   		oe_runmake ${MAKEOPTS} libpseudo
>   		# prevent it from removing the lib, but remove everything else
>   		make 'LIB=foo' ${MAKEOPTS} distclean
> diff --git a/meta/recipes-devtools/pseudo/pseudo_1.3.bb b/meta/recipes-devtools/pseudo/pseudo_1.3.bb
> index e7a329c..080b739 100644
> --- a/meta/recipes-devtools/pseudo/pseudo_1.3.bb
> +++ b/meta/recipes-devtools/pseudo/pseudo_1.3.bb
> @@ -1,6 +1,6 @@
>   require pseudo.inc
>
> -PR = "r7"
> +PR = "r8"
>
>   SRC_URI = "http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2"
>
> diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
> index 9414c79..7857275 100644
> --- a/meta/recipes-devtools/pseudo/pseudo_git.bb
> +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
> @@ -2,7 +2,7 @@ require pseudo.inc
>
>   SRCREV = "f0375c9aaefbccfd41aebbf6d332bb4d9e8f980c"
>   PV = "1.3+git${SRCPV}"
> -PR = "r22"
> +PR = "r23"
>
>   DEFAULT_PREFERENCE = "-1"
>



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

* Re: [PATCH 1/2] pseudo: Tell pseudo to avoid specifying an RPATH
  2012-04-13 15:13   ` Saul Wold
@ 2012-04-13 15:22     ` Mark Hatle
  2012-04-13 15:33       ` Richard Purdie
  0 siblings, 1 reply; 10+ messages in thread
From: Mark Hatle @ 2012-04-13 15:22 UTC (permalink / raw)
  To: Saul Wold; +Cc: Patches and discussions about the oe-core layer

On 4/13/12 10:13 AM, Saul Wold wrote:
> On 04/12/2012 02:21 PM, Mark Hatle wrote:
>> [Yocto #2251]
>>
>> Add --without-rpath to avoid embedding rpaths into the pseudo
>> components.
>>
>> Signed-off-by: Mark Hatle<mark.hatle@windriver.com>
>> ---
>>    meta/recipes-devtools/pseudo/pseudo.inc    |    8 ++++----
>>    meta/recipes-devtools/pseudo/pseudo_1.3.bb |    2 +-
>>    meta/recipes-devtools/pseudo/pseudo_git.bb |    2 +-
>>    3 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/meta/recipes-devtools/pseudo/pseudo.inc b/meta/recipes-devtools/pseudo/pseudo.inc
>> index 664a9b5..d5c33df 100644
>> --- a/meta/recipes-devtools/pseudo/pseudo.inc
>> +++ b/meta/recipes-devtools/pseudo/pseudo.inc
>> @@ -29,9 +29,9 @@ NO32LIBS ??= "0"
>>    # Compile for the local machine arch...
>>    do_compile () {
>>    	if [ "${SITEINFO_BITS}" == "64" ]; then
>> -	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS} --enable-static-sqlite
>> +	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
>>    	else
>> -	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS} --enable-static-sqlite
>> +	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
>>    	fi
>>    	oe_runmake ${MAKEOPTS}
>>    }
>> @@ -42,7 +42,7 @@ do_compile () {
>>    do_compile_prepend_virtclass-native () {
>>    	if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
>>    		# We need the 32-bit libpseudo on a 64-bit machine...
>> -		./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32
>> +		./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32 --without-rpath
>>    		oe_runmake ${MAKEOPTS} libpseudo
>>    		# prevent it from removing the lib, but remove everything else
>>    		make 'LIB=foo' ${MAKEOPTS} distclean
>> @@ -52,7 +52,7 @@ do_compile_prepend_virtclass-native () {
>>    do_compile_prepend_virtclass-nativesdk () {
>>    	if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
>>    		# We need the 32-bit libpseudo on a 64-bit machine...
>> -		./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32
>> +		./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32 --without-rpath
> We might still need this rpath or something similar since the nativesdk
> now breaks not finding the correct version of the included libc.so.6

In this case, I don't think embedding a static RPATH makes sense, but perhaps a 
$ORIGIN path might?

Can chrpath be used to add an rpath after compilation and linking, if so that is 
what I would suggest to do.  Otherwise I'm not exactly sure how to resolve this...

Note, typically pseudo is -not- linked the "sdk" version of the libc, but is 
linked to the host libc.  In the past when exporting and sdk with something like 
pseudo you needed to either build on a common machine (where everything was 
compatible) or have a way to rebuild pseudo on the final target system.  Perhaps 
that is what is needed?

--Mark

> /opt/poky/1.2/sysroots/x86_64-pokysdk-linux/usr/bin/pseudo -P
> /opt/poky/1.2/sysroots/x86_64-pokysdk-linux/usr tar -C "/tmp/opt" -xjf
> "/intel/home/sgw/Downloads/core-image-minimal-qemux86-64.tar.bz2"
> tar: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found
> (required by
> /opt/poky/1.2/sysroots/x86_64-pokysdk-linux/usr/lib/pseudo/lib64/libpseudo.so)
>
> See also bug 1968
>
> I do have a libc.so.6.
>
> /opt/poky/1.2/sysroots/x86_64-pokysdk-linux/lib/libc.so.6 ->  libc-2.15.so
>
> Sau!
>
>>    		oe_runmake ${MAKEOPTS} libpseudo
>>    		# prevent it from removing the lib, but remove everything else
>>    		make 'LIB=foo' ${MAKEOPTS} distclean
>> diff --git a/meta/recipes-devtools/pseudo/pseudo_1.3.bb b/meta/recipes-devtools/pseudo/pseudo_1.3.bb
>> index e7a329c..080b739 100644
>> --- a/meta/recipes-devtools/pseudo/pseudo_1.3.bb
>> +++ b/meta/recipes-devtools/pseudo/pseudo_1.3.bb
>> @@ -1,6 +1,6 @@
>>    require pseudo.inc
>>
>> -PR = "r7"
>> +PR = "r8"
>>
>>    SRC_URI = "http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2"
>>
>> diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
>> index 9414c79..7857275 100644
>> --- a/meta/recipes-devtools/pseudo/pseudo_git.bb
>> +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
>> @@ -2,7 +2,7 @@ require pseudo.inc
>>
>>    SRCREV = "f0375c9aaefbccfd41aebbf6d332bb4d9e8f980c"
>>    PV = "1.3+git${SRCPV}"
>> -PR = "r22"
>> +PR = "r23"
>>
>>    DEFAULT_PREFERENCE = "-1"
>>




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

* Re: [PATCH 1/2] pseudo: Tell pseudo to avoid specifying an RPATH
  2012-04-13 15:22     ` Mark Hatle
@ 2012-04-13 15:33       ` Richard Purdie
  2012-04-13 15:40         ` Mark Hatle
  0 siblings, 1 reply; 10+ messages in thread
From: Richard Purdie @ 2012-04-13 15:33 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2012-04-13 at 10:22 -0500, Mark Hatle wrote:
> > We might still need this rpath or something similar since the nativesdk
> > now breaks not finding the correct version of the included libc.so.6
> 
> In this case, I don't think embedding a static RPATH makes sense, but perhaps a 
> $ORIGIN path might?
> 
> Can chrpath be used to add an rpath after compilation and linking, if so that is 
> what I would suggest to do.  Otherwise I'm not exactly sure how to resolve this...
> 
> Note, typically pseudo is -not- linked the "sdk" version of the libc, but is 
> linked to the host libc.  In the past when exporting and sdk with something like 
> pseudo you needed to either build on a common machine (where everything was 
> compatible) or have a way to rebuild pseudo on the final target system.  Perhaps 
> that is what is needed?

We need to embed a full static rpath and then our nativesdk relocation
code will then handle adding in the correct $ORIGIN for us.

The way the sdk works, it will link against the sdk libc btw and this
avoids the need to rebuild on the target system. We just need the rpath
in there so it can figure things out correctly.

Cheers,

Richard






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

* Re: [PATCH 1/2] pseudo: Tell pseudo to avoid specifying an RPATH
  2012-04-13 15:33       ` Richard Purdie
@ 2012-04-13 15:40         ` Mark Hatle
  2012-04-13 15:50           ` Richard Purdie
  0 siblings, 1 reply; 10+ messages in thread
From: Mark Hatle @ 2012-04-13 15:40 UTC (permalink / raw)
  To: openembedded-core

On 4/13/12 10:33 AM, Richard Purdie wrote:
> On Fri, 2012-04-13 at 10:22 -0500, Mark Hatle wrote:
>>> We might still need this rpath or something similar since the nativesdk
>>> now breaks not finding the correct version of the included libc.so.6
>>
>> In this case, I don't think embedding a static RPATH makes sense, but perhaps a
>> $ORIGIN path might?
>>
>> Can chrpath be used to add an rpath after compilation and linking, if so that is
>> what I would suggest to do.  Otherwise I'm not exactly sure how to resolve this...
>>
>> Note, typically pseudo is -not- linked the "sdk" version of the libc, but is
>> linked to the host libc.  In the past when exporting and sdk with something like
>> pseudo you needed to either build on a common machine (where everything was
>> compatible) or have a way to rebuild pseudo on the final target system.  Perhaps
>> that is what is needed?
>
> We need to embed a full static rpath and then our nativesdk relocation
> code will then handle adding in the correct $ORIGIN for us.
>
> The way the sdk works, it will link against the sdk libc btw and this
> avoids the need to rebuild on the target system. We just need the rpath
> in there so it can figure things out correctly.

Ha, that is what we had (unintentionally) that triggered the QA failure.

If it's only for a nativesdk build, then we simply switch the --without-rpath

--Mark

> Cheers,
>
> Richard
>
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core




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

* Re: [PATCH 1/2] pseudo: Tell pseudo to avoid specifying an RPATH
  2012-04-13 15:40         ` Mark Hatle
@ 2012-04-13 15:50           ` Richard Purdie
  0 siblings, 0 replies; 10+ messages in thread
From: Richard Purdie @ 2012-04-13 15:50 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2012-04-13 at 10:40 -0500, Mark Hatle wrote:
> On 4/13/12 10:33 AM, Richard Purdie wrote:
> > On Fri, 2012-04-13 at 10:22 -0500, Mark Hatle wrote:
> >>> We might still need this rpath or something similar since the nativesdk
> >>> now breaks not finding the correct version of the included libc.so.6
> >>
> >> In this case, I don't think embedding a static RPATH makes sense, but perhaps a
> >> $ORIGIN path might?
> >>
> >> Can chrpath be used to add an rpath after compilation and linking, if so that is
> >> what I would suggest to do.  Otherwise I'm not exactly sure how to resolve this...
> >>
> >> Note, typically pseudo is -not- linked the "sdk" version of the libc, but is
> >> linked to the host libc.  In the past when exporting and sdk with something like
> >> pseudo you needed to either build on a common machine (where everything was
> >> compatible) or have a way to rebuild pseudo on the final target system.  Perhaps
> >> that is what is needed?
> >
> > We need to embed a full static rpath and then our nativesdk relocation
> > code will then handle adding in the correct $ORIGIN for us.
> >
> > The way the sdk works, it will link against the sdk libc btw and this
> > avoids the need to rebuild on the target system. We just need the rpath
> > in there so it can figure things out correctly.
> 
> Ha, that is what we had (unintentionally) that triggered the QA failure.
> 
> If it's only for a nativesdk build, then we simply switch the --without-rpath

Maybe, maybe not. It depends exactly what rpath its encoding in there.
Previously it looked like it was encoding the sysroot path too (which is
a security hole). We need a target rpath in there and no sysroot path.

Cheers,

Richard




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

end of thread, other threads:[~2012-04-13 16:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-12 21:21 [PATCH 0/2] Two small fixes, pseudo and rpm Mark Hatle
2012-04-12 21:21 ` [PATCH 1/2] pseudo: Tell pseudo to avoid specifying an RPATH Mark Hatle
2012-04-13 15:13   ` Saul Wold
2012-04-13 15:22     ` Mark Hatle
2012-04-13 15:33       ` Richard Purdie
2012-04-13 15:40         ` Mark Hatle
2012-04-13 15:50           ` Richard Purdie
2012-04-12 21:21 ` [PATCH 2/2] rpm: Ensure that we check both providename and filepaths Mark Hatle
2012-04-12 21:19   ` Steve Sakoman
2012-04-13 15:11 ` [PATCH 0/2] Two small fixes, pseudo and rpm Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox