Patchwork [v2] insane: make GNU_HASH check slightly more robust (avoids false negatives with gold); add check for useless rpaths

login
register
mail settings
Submitter Phil Blundell
Date July 15, 2011, 11:21 a.m.
Message ID <1310728890.3805.1.camel@phil-desktop>
Download mbox | patch
Permalink /patch/7635/
State New, archived
Headers show

Comments

Phil Blundell - July 15, 2011, 11:21 a.m.
On Thu, 2011-07-14 at 21:26 +0200, Koen Kooi wrote:
> The new rpath warning is nice, but a bit too terse:

Yes, agreed.  Try this patch and see if the situation improves.

p.
Koen Kooi - July 15, 2011, 12:34 p.m.
Op 15 jul 2011, om 13:21 heeft Phil Blundell het volgende geschreven:

> On Thu, 2011-07-14 at 21:26 +0200, Koen Kooi wrote:
>> The new rpath warning is nice, but a bit too terse:
> 
> Yes, agreed.  Try this patch and see if the situation improves.

Much better!

WARNING: QA Issue: shadow: /work/beagleboard-angstrom-linux-gnueabi/shadow-4.1.4.3-r2/packages-split/shadow/usr/sbin/groupadd contains probably-redundant RPATH /lib
WARNING: QA Issue: shadow: /work/beagleboard-angstrom-linux-gnueabi/shadow-4.1.4.3-r2/packages-split/shadow/usr/sbin/newusers contains probably-redundant RPATH /lib
WARNING: QA Issue: shadow: /work/beagleboard-angstrom-linux-gnueabi/shadow-4.1.4.3-r2/packages-split/shadow/usr/sbin/chgpasswd contains probably-redundant RPATH /lib
WARNING: QA Issue: shadow: /work/beagleboard-angstrom-linux-gnueabi/shadow-4.1.4.3-r2/packages-split/shadow/usr/sbin/groupmems contains probably-redundant RPATH /lib
WARNING: QA Issue: shadow: /work/beagleboard-angstrom-linux-gnueabi/shadow-4.1.4.3-r2/packages-split/shadow/usr/sbin/groupmod contains probably-redundant RPATH /lib
WARNING: QA Issue: shadow: /work/beagleboard-angstrom-linux-gnueabi/shadow-4.1.4.3-r2/packages-split/shadow/usr/sbin/useradd contains probably-redundant RPATH /lib
WARNING: QA Issue: shadow: /work/beagleboard-angstrom-linux-gnueabi/shadow-4.1.4.3-r2/packages-split/shadow/usr/sbin/groupdel contains probably-redundant RPATH /lib
WARNING: QA Issue: shadow: /work/beagleboard-angstrom-linux-gnueabi/shadow-4.1.4.3-r2/packages-split/shadow/usr/sbin/usermod contains probably-redundant RPATH /lib
WARNING: QA Issue: shadow: /work/beagleboard-angstrom-linux-gnueabi/shadow-4.1.4.3-r2/packages-split/shadow/usr/sbin/userdel contains probably-redundant RPATH /lib
WARNING: QA Issue: shadow: /work/beagleboard-angstrom-linux-gnueabi/shadow-4.1.4.3-r2/packages-split/shadow/usr/sbin/chpasswd.shadow contains probably-redundant RPATH /lib
WARNING: QA Issue: shadow: /work/beagleboard-angstrom-linux-gnueabi/shadow-4.1.4.3-r2/packages-split/shadow/usr/bin/su contains probably-redundant RPATH /lib
WARNING: QA Issue: shadow: /work/beagleboard-angstrom-linux-gnueabi/shadow-4.1.4.3-r2/packages-split/shadow/usr/bin/passwd.shadow contains probably-redundant RPATH /lib
WARNING: QA Issue: shadow: /work/beagleboard-angstrom-linux-gnueabi/shadow-4.1.4.3-r2/packages-split/shadow/usr/bin/chfn.shadow contains probably-redundant RPATH /lib
WARNING: QA Issue: shadow: /work/beagleboard-angstrom-linux-gnueabi/shadow-4.1.4.3-r2/packages-split/shadow/usr/bin/chage contains probably-redundant RPATH /lib
WARNING: QA Issue: shadow: /work/beagleboard-angstrom-linux-gnueabi/shadow-4.1.4.3-r2/packages-split/shadow/usr/bin/chsh.shadow contains probably-redundant RPATH /lib
WARNING: QA Issue: shadow: /work/beagleboard-angstrom-linux-gnueabi/shadow-4.1.4.3-r2/packages-split/shadow/bin/login.shadow contains probably-redundant RPATH /lib

For the patch:

Acked-by: Koen Kooi <koen@dominion.thruhere.net>
Richard Purdie - July 20, 2011, 2:48 p.m.
On Fri, 2011-07-15 at 12:21 +0100, Phil Blundell wrote:
> On Thu, 2011-07-14 at 21:26 +0200, Koen Kooi wrote:
> > The new rpath warning is nice, but a bit too terse:
> 
> Yes, agreed.  Try this patch and see if the situation improves.
> 

Merged to master, thanks.

Richard

Patch

From 5083f058ed0c559583cc9b3f4f2ae87bbbc701f9 Mon Sep 17 00:00:00 2001
From: Phil Blundell <philb@gnu.org>
Date: Fri, 15 Jul 2011 12:19:35 +0100
Subject: [PATCH] insane: improve diagnostic for redundant rpath

Make it more obvious which file, and which recipe, are at issue.

Signed-off-by: Phil Blundell <philb@gnu.org>
---
 meta/classes/insane.bbclass |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index c45f2cb..65eda9e 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -142,7 +142,7 @@  def package_qa_check_rpath(file,name, d, elf, messages):
                 messages.append("package %s contains bad RPATH %s in file %s" % (name, line, file))
 
 QAPATHTEST[useless-rpaths] = "package_qa_check_useless_rpaths"
-def package_qa_check_useless_rpaths(file,name, d, elf, messages):
+def package_qa_check_useless_rpaths(file, name, d, elf, messages):
     """
     Check for RPATHs that are useless but not dangerous
     """
@@ -164,7 +164,7 @@  def package_qa_check_useless_rpaths(file,name, d, elf, messages):
 	   if rpath == libdir or rpath == base_libdir:
 	      # The dynamic linker searches both these places anyway.  There is no point in
 	      # looking there again.
-	      messages.append("dynamic section contains probably-redundant RPATH %s" % rpath)
+	      messages.append("%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath))
 
 QAPATHTEST[dev-so] = "package_qa_check_dev"
 def package_qa_check_dev(path, name, d, elf, messages):
-- 
1.7.4.1