SHA256
1
0
forked from pool/rpmlint

Accepting request 721765 from home:marxin:branches:devel:openSUSE:Factory:rpmlint

- Update add-check-for-a-non-zero-.text-segment-in-.a-archive.patch patch to align with:
  80126f7c7854d962cc64e54a6ab7e97067bb490d

OBS-URL: https://build.opensuse.org/request/show/721765
OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=678
This commit is contained in:
Johannes Segitz 2019-08-08 14:14:21 +00:00 committed by Git OBS Bridge
parent 2e95706365
commit 990d3b1fb5
2 changed files with 17 additions and 9 deletions

View File

@ -1,5 +1,5 @@
diff --git a/BinariesCheck.py b/BinariesCheck.py
index 36d73f8..7257ffd 100644
index 36d73f8..562c56a 100644
--- a/BinariesCheck.py
+++ b/BinariesCheck.py
@@ -73,6 +73,10 @@ class BinaryInfo(object):
@ -29,7 +29,7 @@ index 36d73f8..7257ffd 100644
# Currently this implementation works only on specific
# architectures due to reliance on arch specific assembly.
if (pkg.arch.startswith('armv') or pkg.arch == 'aarch64'):
@@ -117,6 +123,22 @@ class BinaryInfo(object):
@@ -117,6 +123,24 @@ class BinaryInfo(object):
('readelf', '-W', '-S', '-l', '-d', '-s', path))
if not res[0]:
lines = res[1].splitlines()
@ -41,7 +41,9 @@ index 36d73f8..7257ffd 100644
+
+ for line in lines:
+ r = self.section_regex.search(line)
+ if r and r.group('section').startswith('.text'):
+ if r:
+ sn = r.group('section')
+ if sn == '.init_array' or sn == '.fini_array' or sn.startswith('.text'):
+ has_text_segment = True
+ size = int(r.group('size'), 16)
+ if size > 0:
@ -52,7 +54,7 @@ index 36d73f8..7257ffd 100644
for line in lines:
if BinaryInfo.lto_section_name_prefix in line:
self.lto_sections = True
@@ -522,6 +544,9 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
@@ -522,6 +546,9 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
if bin_info.lto_sections:
printError(pkg, 'lto-bytecode', fname)
@ -62,7 +64,7 @@ index 36d73f8..7257ffd 100644
for ec in bin_info.forbidden_calls:
printWarning(pkg, ec, fname,
BinaryInfo.forbidden_functions[ec]['f_name'])
@@ -846,6 +871,10 @@ implementations only strip if the permission is 0755).''',
@@ -846,6 +873,10 @@ implementations only strip if the permission is 0755).''',
'lto-bytecode',
'''This executable contains a LTO section. LTO bytecode is not portable
and should not be distributed in static libraries or e.g. Python modules.''',

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Aug 8 12:45:30 UTC 2019 - Martin Liška <mliska@suse.cz>
- Update add-check-for-a-non-zero-.text-segment-in-.a-archive.patch patch to align with:
80126f7c7854d962cc64e54a6ab7e97067bb490d
-------------------------------------------------------------------
Fri Aug 2 07:53:03 UTC 2019 - Martin Liška <mliska@suse.cz>