Patchwork [meta-oe,10/16] gpsd: remove RPATH from binaries instead of replacing it with redundant /usr/lib

login
register
mail settings
Submitter Martin Jansa
Date April 30, 2012, 6:33 a.m.
Message ID <3c2d95022b62adf82216f05ef5749d4aaf22bddf.1335767139.git.Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/26619/
State Accepted
Commit 3c2d95022b62adf82216f05ef5749d4aaf22bddf
Headers show

Comments

Martin Jansa - April 30, 2012, 6:33 a.m.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 .../gpsd/gpsd/0004-SConstruct-remove-rpath.patch   |   41 ++++++++++++++++++++
 meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb        |    1 +
 2 files changed, 42 insertions(+), 0 deletions(-)
 create mode 100644 meta-oe/recipes-navigation/gpsd/gpsd/0004-SConstruct-remove-rpath.patch

Patch

diff --git a/meta-oe/recipes-navigation/gpsd/gpsd/0004-SConstruct-remove-rpath.patch b/meta-oe/recipes-navigation/gpsd/gpsd/0004-SConstruct-remove-rpath.patch
new file mode 100644
index 0000000..add624b
--- /dev/null
+++ b/meta-oe/recipes-navigation/gpsd/gpsd/0004-SConstruct-remove-rpath.patch
@@ -0,0 +1,41 @@ 
+From b59f8c5bf8519a5ca114696e79b8690ebb68e0d3 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Tue, 24 Apr 2012 16:24:35 +0200
+Subject: [PATCH 4/4] SConstruct: remove rpath
+
+* even with correct prefix (without DESTDIR) included it's redundant
+  WARNING: QA Issue: libgps:
+  /work/armv4t-oe-linux-gnueabi/gpsd/gpsd-3.5-r0/packages-split/libgps/usr/lib/libgps.so.20.0
+  contains probably-redundant RPATH /usr/lib
+* and with prefix from scons.bbclass it's invalid
+  WARNING: QA Issue: package libgps contains bad RPATH
+  /OE/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd/gpsd-3.5-r0/image/usr/lib
+  in file
+  /OE/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd/gpsd-3.5-r0/packages-split/libgps/usr/lib/libgps.so.20.0
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ SConstruct |    7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index 0cf5799..3c919fc 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -1152,8 +1152,11 @@ if qt_env:
+ 
+ # We don't use installdir here in order to avoid having DESTDIR affect the rpath
+ if env["shared"]:
+-    env.AddPostAction(binaryinstall, '$CHRPATH -r "%s" "$TARGET"' \
+-                      % (installdir('libdir', False), ))
++    if env['sysroot']:
++        env.AddPostAction(binaryinstall, '$CHRPATH -d "$TARGET"')
++    else:
++        env.AddPostAction(binaryinstall, '$CHRPATH -r "%s" "$TARGET"' \
++                         % (installdir('libdir', False), ))
+ 
+ if not env['debug'] and not env['profiling'] and env['strip']:
+     env.AddPostAction(binaryinstall, '$STRIP $TARGET')
+-- 
+1.7.8.5
+
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb
index fae3492..0796c34 100644
--- a/meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb
+++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb
@@ -9,6 +9,7 @@  SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \
   file://0001-SConstruct-fix-DSO-build-for-ntpshm-garmin_monitor.patch \
   file://0001-SConstruct-respect-sysroot-setting-when-prepending-L.patch \
   file://0002-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch \
+  file://0004-SConstruct-remove-rpath.patch \
   file://gpsd-default \
   file://gpsd \
   file://60-gpsd.rules \