From 893d1de403b2912355fced939eceb13cdee671e7bb26b6cb4d78282e5255b395 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 4 Jan 2012 15:56:54 +0000 Subject: [PATCH] - reenable libtool wrapper check OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=88 --- libtool-wrapper-check.diff | 48 ++++++++++++-------------------------- rpmlint.changes | 5 ++++ rpmlint.spec | 5 ++-- 3 files changed, 22 insertions(+), 36 deletions(-) diff --git a/libtool-wrapper-check.diff b/libtool-wrapper-check.diff index 7e3ca3a..0f74478 100644 --- a/libtool-wrapper-check.diff +++ b/libtool-wrapper-check.diff @@ -1,56 +1,38 @@ -package ProtocolReader; - i - -require Exportei path -Da/work/built/patchinfo/a8074a35e4528cffdfb08bd7c9969012/protocol-autotest"))Da/work/built/patchinfo/a8074a35e4528cffdfb08bd7c9969012/protocol-autotest"));; -@ISA = qw(Exporter); -@EXPORT = qw(new read); - is_ar = - -rpath - -asdfdff - -ead_one_protocol("fc46dcae41fa022273d4dfd752880372/protocol") to - -:x - -sub new { bless {} } string.find(i[1], 'current ar archive') != -1 - is_ocaml_native = string.find(i[1], 'ObjABXML::ABXML::patchprotocolnative') != -1 -print Dumper(a+ is_shell = string.find(i[1], "shell script") != -)1 - +--- BinariesCheck.py ++++ BinariesCheck.py +@@ -231,8 +231,19 @@ + is_elf = 'ELF' in pkgfile.magic + is_ar = 'current ar archive' in pkgfile.magic + is_ocaml_native = 'Objective caml native' in pkgfile.magic ++ is_shell = "shell script" in pkgfile.magic is_binary = is_elf or is_ar or is_ocaml_native - if is_binary: -@@ -278,6 +279,16 @@ - printError(pkg, 'invalid-directory-reference', i[0], - '(line %s)' % ", ".join(lines)) - + if is_shell: + count= 0 -+ for l in file(pkg.dirName() + i[0], "r"): ++ for l in file(pkgfile.path, "r"): + count = count + 1 + if (l.find("This wrapper script should never be moved out of the build directory") != -1): -+ printError(pkg, 'libtool-wrapper-in-package', i[0]) ++ printError(pkg, 'libtool-wrapper-in-package', fname) + break + if (count > 20): + break; + - if has_lib != []: - if exec_files != []: - for f in exec_files: -@@ -341,6 +352,14 @@ + if not is_binary: + if reference_regex.search(fname): + lines = pkg.grep(invalid_dir_ref_regex, fname) +@@ -463,6 +474,15 @@ Another common mistake that causes this problem is linking with ``gcc -Wl,-shared'' instead of ``gcc -shared''.''', +'libtool-wrapper-in-package', +'''Your package contains a libtool wrapper shell script. This +will not work. Instead of install'ing the libtool wrapper file, -+run ++runĀ· + +libtool --mode=install install -m perm + +to install the relinked file.''', ++ 'binary-or-shlib-defines-rpath', '''The binary or shared library defines `RPATH'. Usually this is a bad thing because it hardcodes the path to search libraries and so diff --git a/rpmlint.changes b/rpmlint.changes index 7b8f200..2b9bb89 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jan 4 16:56:40 CET 2012 - dmueller@suse.de + +- reenable libtool wrapper check + ------------------------------------------------------------------- Wed Dec 21 11:01:43 CET 2011 - dmueller@suse.de diff --git a/rpmlint.spec b/rpmlint.spec index 3523a73..3d93787 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -1,7 +1,7 @@ # # spec file for package rpmlint # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - #!BuildIgnore: rpmlint-mini Name: rpmlint @@ -172,7 +171,7 @@ Authors: #%patch34 #%patch35 %patch37 -#%patch39 +%patch39 #%patch41 %patch42 #%patch46