From 35d99b203b75d5078d38ea881b3a19c195206843fadedb396c0e36afc984134b Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 10 Oct 2017 09:19:08 +0000 Subject: [PATCH] - add 0001-Avoid-false-positives-on-is_elf-check.patch (bsc#1057216) OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=518 --- ...void-false-positives-on-is_elf-check.patch | 28 +++++++++++++++++++ rpmlint.changes | 5 ++++ rpmlint.spec | 1 + 3 files changed, 34 insertions(+) create mode 100644 0001-Avoid-false-positives-on-is_elf-check.patch diff --git a/0001-Avoid-false-positives-on-is_elf-check.patch b/0001-Avoid-false-positives-on-is_elf-check.patch new file mode 100644 index 0000000..7f08f01 --- /dev/null +++ b/0001-Avoid-false-positives-on-is_elf-check.patch @@ -0,0 +1,28 @@ +From 5a0f99a9f522944a0933cd06f9010a96bef9b7b3 Mon Sep 17 00:00:00 2001 +From: Dirk Mueller +Date: Tue, 10 Oct 2017 11:02:57 +0200 +Subject: [PATCH] Avoid false positives on is_elf check + +"symbolic link to `SELF-WE-PD-XXL.wings'" + +matched the "ELF" in magic logic. So make it more strict +by enforcing that the magic needs to start with "ELF " +which seems to match everywhere (PIE executables, normal +executables, ELF libs). +--- + BinariesCheck.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: rpmlint-rpmlint-1.10/BinariesCheck.py +=================================================================== +--- rpmlint-rpmlint-1.10.orig/BinariesCheck.py ++++ rpmlint-rpmlint-1.10/BinariesCheck.py +@@ -372,7 +372,7 @@ class BinariesCheck(AbstractCheck.Abstra + (fname.startswith("/usr/lib64") or fname.startswith("/lib64")): + file_in_lib64 = True + +- is_elf = 'ELF' in pkgfile.magic ++ is_elf = pkgfile.magic.startswith('ELF ') + 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 diff --git a/rpmlint.changes b/rpmlint.changes index ee96f98..7f7b0b0 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Oct 10 09:06:23 UTC 2017 - dmueller@suse.com + +- add 0001-Avoid-false-positives-on-is_elf-check.patch (bsc#1057216) + ------------------------------------------------------------------- Fri Oct 6 09:20:48 UTC 2017 - lnussel@suse.de diff --git a/rpmlint.spec b/rpmlint.spec index 3738107..68f997e 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -83,6 +83,7 @@ Patch64: drop-unicodedata-dep.diff Patch65: 0001-split-wrong-script-interpreter-into-env-script-inter.patch Patch66: 0001-Handle-post-scripts-that-contain-non-ascii-character.patch Patch67: omit_BUILDROOT_from_pyo_files.patch +Patch68: 0001-Avoid-false-positives-on-is_elf-check.patch Patch70: rpmlint-all-pie.patch BuildRequires: obs-service-format_spec_file BuildRequires: python3-flake8