From 84470181159bb115156f64726d4342148d091998 Mon Sep 17 00:00:00 2001 From: Leon Woestenberg Date: Thu, 26 Apr 2007 22:19:39 +0000 Subject: insane.bbclass: RPATH check was always true due to scanelf output including the file path. --- classes/insane.bbclass | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index c424a573d3..d07b181dbd 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -21,7 +21,8 @@ # We play a special package function inherit package -PACKAGE_DEPENDS += "pax-utils-native chrpath-native" +PACKAGE_DEPENDS += "pax-utils-native" +#PACKAGE_DEPENDS += chrpath-native" PACKAGEFUNCS += " do_package_qa " @@ -202,19 +203,25 @@ def package_qa_check_rpath(file,name,d): """ import bb, os scanelf = os.path.join(bb.data.getVar('STAGING_BINDIR_NATIVE',d,True),'scanelf') + #chrpath = os.path.join(bb.data.getVar('STAGING_BINDIR_NATIVE',d,True),'chrpath') bad_dir = bb.data.getVar('TMPDIR', d, True) + "/work" bad_dir_test = bb.data.getVar('TMPDIR', d, True) if not os.path.exists(scanelf): - bb.fatal("Can not check RPATH scanelf not found") + bb.fatal("Can not check RPATH, scanelf (part of pax-utils-native) not found") + #if not os.path.exists(chrpath): + # bb.fatal("Can not fix RPATH, chrpath (part of chrpath-native) not found") if not bad_dir in bb.data.getVar('WORKDIR', d, True): bb.fatal("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check") - output = os.popen("%s -Byr %s" % (scanelf,file)) + bb.note("%s -F%%r#F %s" % (scanelf,file)) + output = os.popen("%s -F%%r#F %s" % (scanelf,file)) txt = output.readline().split() for line in txt: if bad_dir_test in line: package_qa_write_error( 1, name, file, d) bb.error("QA Issue package %s contains bad RPATH %s in file %s" % (name, line, file)) + #bb.note("Fixing RPATH for you in %s" % file) + #os.popen("%s -r /lib %s" % (chrpath,file)) return False return True -- cgit v1.2.3 From 5da8ac500c38c2a0f7c2d7f104061be482c7b7d2 Mon Sep 17 00:00:00 2001 From: Leon Woestenberg Date: Thu, 26 Apr 2007 23:24:09 +0000 Subject: insane.bbclass: Commented out scanelf format debugging. --- classes/insane.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index d07b181dbd..7454957e5b 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -213,7 +213,7 @@ def package_qa_check_rpath(file,name,d): if not bad_dir in bb.data.getVar('WORKDIR', d, True): bb.fatal("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check") - bb.note("%s -F%%r#F %s" % (scanelf,file)) + #bb.note("%s -F%%r#F %s" % (scanelf,file)) output = os.popen("%s -F%%r#F %s" % (scanelf,file)) txt = output.readline().split() for line in txt: -- cgit v1.2.3 From 7e8aca6f9c3cedf040cd58e4f565361bfcded9f9 Mon Sep 17 00:00:00 2001 From: Leon Woestenberg Date: Fri, 27 Apr 2007 00:12:23 +0000 Subject: insane.bbclass: Re-add -B to scanelf to make it correctly check single RPATH occurences. --- classes/insane.bbclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 7454957e5b..30b164b734 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -213,10 +213,12 @@ def package_qa_check_rpath(file,name,d): if not bad_dir in bb.data.getVar('WORKDIR', d, True): bb.fatal("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check") - #bb.note("%s -F%%r#F %s" % (scanelf,file)) - output = os.popen("%s -F%%r#F %s" % (scanelf,file)) + #bb.note("%s -B -F%%r#F %s" % (scanelf,file)) + output = os.popen("%s -B -F%%r#F %s" % (scanelf,file)) txt = output.readline().split() + #bb.note("???%s???" % bad_dir_test) for line in txt: + #bb.note("===%s===" % line) if bad_dir_test in line: package_qa_write_error( 1, name, file, d) bb.error("QA Issue package %s contains bad RPATH %s in file %s" % (name, line, file)) -- cgit v1.2.3 From bf3453c3ea3858a857d44c5cbc4f4a48069652da Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Fri, 27 Apr 2007 02:06:22 +0000 Subject: perl 5.8.8/cpan: Fix the installation paths for cpan modules. The installed files for perl modules built using cpan will end up in different places depending on which version of perl they are being built with. Modules that explicitly set various FILES_ values were using the paths that are only valid for the older versions of perl. Calculate and set the correct path in cpan.bbclass and use that in the FILES_ variables so that it'll be correct for all versions of perl. --- classes/cpan.bbclass | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'classes') diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index 9915bf6f67..52430560ea 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -31,7 +31,18 @@ def is_new_perl(d): return "no" return "yes" +# Determine where the library directories are +def perl_get_libdirs(d): + import bb + libdir = bb.data.getVar('libdir', d, 1) + if is_new_perl(d) == "yes": + libdirs = libdir + '/perl5' + else: + libdirs = libdir + '/*/*/perl5' + return libdirs + IS_NEW_PERL = "${@is_new_perl(d)}" +PERLLIBDIRS = "${@perl_get_libdirs(d)}" cpan_do_configure () { perl Makefile.PL ${EXTRA_CPANFLAGS} -- cgit v1.2.3 From 3cc9d5463dac0412d5591b506e308f3e9cde0494 Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Fri, 27 Apr 2007 02:22:26 +0000 Subject: cpan: Use CCLD for the linking instead of ${TARGET_SYS}-gcc. Without this native packages break because -gcc doesn't exist, just gcc. CCLD gets us the correct CC to be used for linking in both cases, so we use that. --- classes/cpan.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index 52430560ea..00709f7e18 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -68,7 +68,7 @@ cpan_do_configure () { cpan_do_compile () { if [ "${IS_NEW_PERL}" = "yes" ]; then - oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" LD=${TARGET_SYS}-gcc + oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" LD="${CCLD}" else # You must use gcc to link on sh OPTIONS="" -- cgit v1.2.3