diff --git a/_servicedata b/_servicedata index b5af1cb..112eac1 100644 --- a/_servicedata +++ b/_servicedata @@ -3,4 +3,4 @@ https://github.com/openSUSE/rpmlint-tests.git 75524278ef7de3efc70f0fa14016f1aac4e77d36 https://github.com/openSUSE/rpmlint-checks.git - 2d11e76027fc32be4005f955a71fab84c3a5407d \ No newline at end of file + 0528a49399ccabaae220fa8b452b8f9a082e48c9 \ No newline at end of file diff --git a/add-check-for-a-non-zero-.text-segment-in-.a-archive.patch b/add-check-for-a-non-zero-.text-segment-in-.a-archive.patch new file mode 100644 index 0000000..2044f43 --- /dev/null +++ b/add-check-for-a-non-zero-.text-segment-in-.a-archive.patch @@ -0,0 +1,77 @@ +diff --git a/BinariesCheck.py b/BinariesCheck.py +index 36d73f8..0fb91db 100644 +--- a/BinariesCheck.py ++++ b/BinariesCheck.py +@@ -73,6 +73,10 @@ class BinaryInfo(object): + mktemp_call_regex = create_regexp_call('mktemp') + lto_section_name_prefix = '.gnu.lto_.' + ++ # [Nr] Name Type Address Off Size ES Flg Lk Inf Al ++ # [ 1] .text PROGBITS 0000000000000000 000040 000000 00 AX 0 0 1 ++ section_regex = re.compile(r'.*\] (?P
\S*)\s*\S+\s*\S*\s*\S*\s*(?P\w*)') ++ + def __init__(self, pkg, path, fname, is_ar, is_shlib): + self.readelf_error = False + self.needed = [] +@@ -92,6 +96,7 @@ class BinaryInfo(object): + self.symtab = False + self.tail = '' + self.lto_sections = False ++ self.no_text_in_archive = False + + self.setgid = False + self.setuid = False +@@ -102,6 +107,7 @@ class BinaryInfo(object): + self.mktemp = False + + is_debug = path.endswith('.debug') ++ is_archive = path.endswith('.a') + # 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,24 @@ class BinaryInfo(object): + ('readelf', '-W', '-S', '-l', '-d', '-s', path)) + if not res[0]: + lines = res[1].splitlines() ++ ++ # For an archive, test if all .text sections are empty ++ if is_archive: ++ has_text_segment = False ++ non_zero_text_segment = False ++ ++ for line in lines: ++ r = self.section_regex.search(line) ++ if r: ++ sn = r.group('section') ++ if sn == '.preinit_array' or sn == '.init_array' or sn == '.fini_array' or sn.startswith('.text'): ++ has_text_segment = True ++ size = int(r.group('size'), 16) ++ if size > 0: ++ non_zero_text_segment = True ++ if has_text_segment and not non_zero_text_segment: ++ self.no_text_in_archive = True ++ + for line in lines: + if BinaryInfo.lto_section_name_prefix in line: + self.lto_sections = True +@@ -522,6 +546,9 @@ class BinariesCheck(AbstractCheck.AbstractCheck): + if bin_info.lto_sections: + printError(pkg, 'lto-bytecode', fname) + ++ if bin_info.no_text_in_archive: ++ printError(pkg, 'lto-no-text-in-archive', fname) ++ + for ec in bin_info.forbidden_calls: + printWarning(pkg, ec, fname, + BinaryInfo.forbidden_functions[ec]['f_name']) +@@ -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.''', ++ ++'lto-no-text-in-archive', ++'''This archive does not contain a non-empty .text section. The archive ++was not created with -ffat-lto-objects option.''', + ) + + # BinariesCheck.py ends here diff --git a/config b/config index b50193e..7439ce5 100644 --- a/config +++ b/config @@ -102,6 +102,7 @@ setOption('ValidGroups', [ 'Amusements/Toys/Screensavers', 'Development/Languages/C and C++', 'Development/Languages/Fortran', + 'Development/Languages/Go', 'Development/Languages/Haskell', 'Development/Languages/Java', 'Development/Languages/Lua', @@ -509,6 +510,8 @@ setOption('StandardGroups', ( 'xok', 'xrootd', 'xymon', + 'zabbix', + 'zabbixs', 'zeroinst', 'zkeyadm', 'znc', @@ -704,6 +707,8 @@ setOption('StandardUsers', ( 'xrootd', 'xymon', 'yastws', + 'zabbix', + 'zabbixs', 'zaqar', 'zeroinst', 'znc', @@ -1014,6 +1019,9 @@ setOption("DBUSServices.WhiteList", ( # certmonger (bsc#1129452) "org.fedorahosted.certmonger.service", "certmonger.conf", + # systemd-portabled (boo#1145639) + "org.freedesktop.portable1.service", + "org.freedesktop.portable1.conf", )) setOption("PAMModules.WhiteList", ( diff --git a/rpmlint-checks-master.tar.xz b/rpmlint-checks-master.tar.xz index 5de8b1e..786df24 100644 --- a/rpmlint-checks-master.tar.xz +++ b/rpmlint-checks-master.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:19113e168c1d6099d1b62c0c329ef85338a9fd1878f78e23c1aa7c735d32b322 -size 25432 +oid sha256:580b815042f0312cae37d9ca121986fd25964c20bd6a270f5336c0f1b6fd7d12 +size 25436 diff --git a/rpmlint-tests.changes b/rpmlint-tests.changes index 093f325..ae4852c 100644 --- a/rpmlint-tests.changes +++ b/rpmlint-tests.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Aug 20 07:40:56 UTC 2019 - kukuk@suse.com + +- Update to version master: + * Allow /usr/etc as discussed on opensuse-factory and opensuse-packaging + ------------------------------------------------------------------- Wed Jul 17 14:51:58 UTC 2019 - jsegitz@suse.de diff --git a/rpmlint.changes b/rpmlint.changes index cb119f0..a0b69b0 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,3 +1,55 @@ +------------------------------------------------------------------- +Thu Aug 22 08:56:44 UTC 2019 - Ludwig Nussel + +- whitelist systemd-portabled dbus files (boo#1145639) + +------------------------------------------------------------------- +Tue Aug 20 07:40:56 UTC 2019 - kukuk@suse.com + +- Update to version master: + * Allow /usr/etc as discussed on opensuse-factory and opensuse-packaging + +------------------------------------------------------------------- +Wed Aug 14 08:53:25 UTC 2019 - Marketa Calabkova + +- Add user/group zabbix and zabbixs (bsc#1144018) + +------------------------------------------------------------------- +Fri Aug 9 12:01:03 UTC 2019 - Martin Liška + +- Update add-check-for-a-non-zero-.text-segment-in-.a-archive.patch patch to align with: + 38fc30cafe99d38059ca54b98bc87f5544f0bb4e +------------------------------------------------------------------- +Thu Aug 8 13:14:36 UTC 2019 - Dominique Leuenberger + +- Add Development/Languages/Go group. + +------------------------------------------------------------------- +Thu Aug 8 12:45:30 UTC 2019 - Martin Liška + +- 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 + +- Update add-check-for-a-non-zero-.text-segment-in-.a-archive.patch patch to align with: + https://github.com/rpm-software-management/rpmlint/commit/c59324fd68ba86c8382fe09d43f12de32d764354 + +------------------------------------------------------------------- +Sun Jul 28 15:04:34 UTC 2019 - Martin Liška + +- Update add-check-for-a-non-zero-.text-segment-in-.a-archive.patch patch + to: + https://github.com/rpm-software-management/rpmlint/commit/97d6caf9ac3eb011e3f30dbc473f079b20fb56f9 + +------------------------------------------------------------------- +Mon Jul 22 11:44:51 UTC 2019 - Martin Liška + +- Add add-check-for-a-non-zero-.text-segment-in-.a-archive.patch + as a backport of: + https://github.com/rpm-software-management/rpmlint/commit/2c809f34354d6ea690986541b268d47a3ca59092 + ------------------------------------------------------------------- Tue May 14 10:01:51 UTC 2019 - opensuse-packaging@opensuse.org diff --git a/rpmlint.spec b/rpmlint.spec index b83d724..bdb03bf 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -60,6 +60,7 @@ Patch58: remove-ghostfile-checks.diff Patch63: fix-diag-sortorder.diff Patch72: rpmlint-slpp-NUM-NUM.patch Patch77: suse-rpmlint-all-pie.patch +Patch78: add-check-for-a-non-zero-.text-segment-in-.a-archive.patch BuildRequires: desktop-file-utils BuildRequires: obs-service-format_spec_file BuildRequires: python3-flake8