From e33e073565463d5717a3c8b43f7a60dfc48b3e769f24f83eec661ba506667de5 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 16 Nov 2018 10:03:48 +0000 Subject: [PATCH] - update libtool-wrapper-check.diff to handle inaccessible files OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=634 --- libtool-wrapper-check.diff | 20 ++++++++++++++------ rpmlint-tests.spec | 2 +- rpmlint.changes | 5 +++++ rpmlint.spec | 2 +- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/libtool-wrapper-check.diff b/libtool-wrapper-check.diff index 0c4fe5a..3e19a93 100644 --- a/libtool-wrapper-check.diff +++ b/libtool-wrapper-check.diff @@ -1,6 +1,8 @@ +Index: rpmlint-rpmlint-1.10/BinariesCheck.py +=================================================================== --- rpmlint-rpmlint-1.10.orig/BinariesCheck.py +++ rpmlint-rpmlint-1.10/BinariesCheck.py -@@ -367,8 +367,15 @@ class BinariesCheck(AbstractCheck.Abstra +@@ -367,8 +367,21 @@ class BinariesCheck(AbstractCheck.Abstra is_ar = 'current ar archive' in pkgfile.magic is_ocaml_native = 'Objective caml native' in pkgfile.magic is_lua_bytecode = 'Lua bytecode' in pkgfile.magic @@ -8,15 +10,21 @@ is_binary = is_elf or is_ar or is_ocaml_native or is_lua_bytecode + if is_shell: -+ with open(pkgfile.path, 'rb') as inputf: -+ if (b'This wrapper script should never ' -+ b'be moved out of the build directory' in inputf.read(2048)): -+ printError(pkg, 'libtool-wrapper-in-package', fname) ++ file_start = None ++ try: ++ with open(pkgfile.path, 'rb') as inputf: ++ file_start = inputf.read(2048) ++ except IOError: ++ pass ++ if (file_start and ++ b'This wrapper script should never ' ++ b'be moved out of the build directory' in file_start): ++ printError(pkg, 'libtool-wrapper-in-package', fname) + if not is_binary: if reference_regex.search(fname): lines = pkg.grep(invalid_dir_ref_regex, fname) -@@ -637,6 +644,15 @@ to list code compiled without -fPIC. +@@ -637,6 +650,15 @@ to list code compiled without -fPIC. Another common mistake that causes this problem is linking with ``gcc -Wl,-shared'' instead of ``gcc -shared''.''', diff --git a/rpmlint-tests.spec b/rpmlint-tests.spec index 573cead..d0b77e5 100644 --- a/rpmlint-tests.spec +++ b/rpmlint-tests.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # icecream 0 diff --git a/rpmlint.changes b/rpmlint.changes index 39c0e2a..13d81b7 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Nov 16 10:02:30 UTC 2018 - Dirk Mueller + +- update libtool-wrapper-check.diff to handle inaccessible files + ------------------------------------------------------------------- Thu Nov 8 12:59:15 UTC 2018 - jsegitz@suse.com diff --git a/rpmlint.spec b/rpmlint.spec index 6ace543..502d234 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ #