From 7d91f9fe95765614b789414c65346520e91c092def557e8cabff68c62588eb1d Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 9 Jan 2019 18:32:02 +0000 Subject: [PATCH] - Add 0001-Backport-d8f423b575e8be387d33bc3af176baf978efacbb.patch OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=645 --- ...23b575e8be387d33bc3af176baf978efacbb.patch | 41 ++++++++++++------- rpmlint.changes | 2 +- rpmlint.spec | 2 +- suse-rpmlint-all-pie.patch | 4 +- 4 files changed, 31 insertions(+), 18 deletions(-) rename 0001-Backport-from-trunk-5761ef718536d94bc8ab283972efcfc1.patch => 0001-Backport-d8f423b575e8be387d33bc3af176baf978efacbb.patch (51%) diff --git a/0001-Backport-from-trunk-5761ef718536d94bc8ab283972efcfc1.patch b/0001-Backport-d8f423b575e8be387d33bc3af176baf978efacbb.patch similarity index 51% rename from 0001-Backport-from-trunk-5761ef718536d94bc8ab283972efcfc1.patch rename to 0001-Backport-d8f423b575e8be387d33bc3af176baf978efacbb.patch index e7660e3..c2e6e7c 100644 --- a/0001-Backport-from-trunk-5761ef718536d94bc8ab283972efcfc1.patch +++ b/0001-Backport-d8f423b575e8be387d33bc3af176baf978efacbb.patch @@ -1,18 +1,21 @@ -From 03f01548ea1d0a87d0d3f26757f6cf81ee62abcf Mon Sep 17 00:00:00 2001 +From 790482dbc83f6cd67d29697ce6904dfc962bf576 Mon Sep 17 00:00:00 2001 From: marxin -Date: Wed, 2 Jan 2019 09:34:56 +0100 -Subject: [PATCH] Backport from trunk 5761ef718536d94bc8ab283972efcfc1c75054f0: +Date: Wed, 2 Jan 2019 13:22:40 +0100 +Subject: [PATCH] Backport d8f423b575e8be387d33bc3af176baf978efacbb: Come up with lto-bytecode check for ELF files. --- - BinariesCheck.py | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) + BinariesCheck.py | 14 +++++++++++++- + .../libreiserfscore-devel-3.6.27-0.x86_64.rpm | Bin 0 -> 1005964 bytes + test/test_binaries.py | 5 +++++ + 3 files changed, 18 insertions(+), 1 deletion(-) + create mode 100644 test/binary/libreiserfscore-devel-3.6.27-0.x86_64.rpm -diff --git a/BinariesCheck.py b/BinariesCheck.py -index 21a0cf8..7cd5253 100644 ---- a/BinariesCheck.py -+++ b/BinariesCheck.py -@@ -71,6 +71,7 @@ +Index: rpmlint-rpmlint-1.10/BinariesCheck.py +=================================================================== +--- rpmlint-rpmlint-1.10.orig/BinariesCheck.py ++++ rpmlint-rpmlint-1.10/BinariesCheck.py +@@ -71,6 +71,7 @@ class BinaryInfo(object): chdir_call_regex = create_regexp_call('chdir') mktemp_call_regex = create_regexp_call('mktemp') @@ -20,7 +23,7 @@ index 21a0cf8..7cd5253 100644 def __init__(self, pkg, path, file, is_ar, is_shlib): self.readelf_error = False -@@ -90,6 +91,7 @@ +@@ -90,6 +91,7 @@ class BinaryInfo(object): self.debuginfo = False self.symtab = False self.tail = '' @@ -28,7 +31,17 @@ index 21a0cf8..7cd5253 100644 self.setgid = False self.setuid = False -@@ -513,6 +515,9 @@ +@@ -116,6 +118,9 @@ class BinaryInfo(object): + if not res[0]: + lines = res[1].splitlines() + for l in lines: ++ if BinaryInfo.lto_section_name_prefix in l: ++ self.lto_sections = True ++ + r = BinaryInfo.needed_regex.search(l) + if r: + self.needed.append(r.group(1)) +@@ -513,6 +518,9 @@ class BinariesCheck(AbstractCheck.Abstra for ec in bin_info.exit_calls: printWarning(pkg, 'shared-lib-calls-exit', fname, ec) @@ -38,7 +51,7 @@ index 21a0cf8..7cd5253 100644 for ec in bin_info.forbidden_calls: printWarning(pkg, ec, fname, BinaryInfo.forbidden_functions[ec]['f_name']) -@@ -835,7 +840,11 @@ +@@ -835,7 +843,11 @@ upstream to have this issue fixed.''', '''This executable should be stripped from debugging symbols, in order to take less space and be loaded faster. This is usually done automatically at buildtime by rpm. Check the build logs and the permission on the file (some @@ -47,7 +60,7 @@ index 21a0cf8..7cd5253 100644 + +'lto-bytecode', +'''This executable contains a LTO section. LTO bytecode is not portable -+and should not be distributes in static libraries or e.g. Python modules.''', ++and should not be distributed in static libraries or e.g. Python modules.''', ) # BinariesCheck.py ends here diff --git a/rpmlint.changes b/rpmlint.changes index 4f62ccc..babdd02 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Wed Jan 2 08:43:03 UTC 2019 - Martin Liška -- Add 0001-Backport-from-trunk-5761ef718536d94bc8ab283972efcfc1.patch. +- Add 0001-Backport-d8f423b575e8be387d33bc3af176baf978efacbb.patch ------------------------------------------------------------------- Fri Dec 21 17:08:47 UTC 2018 - matthias.gerstner@suse.com diff --git a/rpmlint.spec b/rpmlint.spec index a2c7681..db15a64 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -89,7 +89,7 @@ Patch74: 0001-Always-import-XDG-desktop-files-as-utf8.patch Patch75: 0001-Fix-compatibility-with-file-5.33.patch Patch76: update-magic-values-python-37.patch Patch77: suse-rpmlint-all-pie.patch -Patch78: 0001-Backport-from-trunk-5761ef718536d94bc8ab283972efcfc1.patch +Patch78: 0001-Backport-d8f423b575e8be387d33bc3af176baf978efacbb.patch BuildRequires: obs-service-format_spec_file BuildRequires: python3-flake8 BuildRequires: python3-pytest diff --git a/suse-rpmlint-all-pie.patch b/suse-rpmlint-all-pie.patch index b7c77d7..088dec8 100644 --- a/suse-rpmlint-all-pie.patch +++ b/suse-rpmlint-all-pie.patch @@ -2,7 +2,7 @@ Index: rpmlint-rpmlint-1.10/BinariesCheck.py =================================================================== --- rpmlint-rpmlint-1.10.orig/BinariesCheck.py +++ rpmlint-rpmlint-1.10/BinariesCheck.py -@@ -543,10 +543,14 @@ class BinariesCheck(AbstractCheck.Abstra +@@ -549,10 +549,14 @@ class BinariesCheck(AbstractCheck.Abstra if ocaml_mixed_regex.search(bin_info.tail): printWarning(pkg, 'ocaml-mixed-executable', fname) @@ -21,7 +21,7 @@ Index: rpmlint-rpmlint-1.10/BinariesCheck.py if bin_info.readelf_error: continue -@@ -798,6 +802,10 @@ stripping process.''', +@@ -804,6 +808,10 @@ stripping process.''', '''This executable must be position independent. Check that it is built with -fPIE/-fpie in compiler flags and -pie in linker flags.''',