Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rpmlint for openSUSE:Factory checked in at 2025-06-12 15:47:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rpmlint (Old) and /work/SRC/openSUSE:Factory/.rpmlint.new.19631 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rpmlint" Thu Jun 12 15:47:30 2025 rev:506 rq:1284408 version:2.7.0+git20250610.de7cb57e Changes: -------- --- /work/SRC/openSUSE:Factory/rpmlint/rpmlint.changes 2025-06-03 17:51:47.153241879 +0200 +++ /work/SRC/openSUSE:Factory/.rpmlint.new.19631/rpmlint.changes 2025-06-12 15:47:33.670985002 +0200 @@ -1,0 +2,9 @@ +Tue Jun 10 09:45:34 UTC 2025 - Daniel Garcia <daniel.gar...@suse.com> + +- Update to version 2.7.0+git20250610.de7cb57e: + * AlternativesCheck: Fix .conf files regex + * BinariesCheck: also consider /usr/etc + * LogrotateCheck: consider configuration files in /usr/etc; add badness + * sysctl-whitelist: properly document the most recent review bug + +------------------------------------------------------------------- Old: ---- rpmlint-2.7.0+git20250603.a9db0eb9.tar.xz New: ---- rpmlint-2.7.0+git20250610.de7cb57e.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rpmlint.spec ++++++ --- /var/tmp/diff_new_pack.WRD29T/_old 2025-06-12 15:47:34.623024577 +0200 +++ /var/tmp/diff_new_pack.WRD29T/_new 2025-06-12 15:47:34.623024577 +0200 @@ -23,7 +23,7 @@ %define name_suffix -%{flavor} %endif Name: rpmlint%{name_suffix} -Version: 2.7.0+git20250603.a9db0eb9 +Version: 2.7.0+git20250610.de7cb57e Release: 0 Summary: RPM file correctness checker License: GPL-2.0-or-later ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.WRD29T/_old 2025-06-12 15:47:34.695027571 +0200 +++ /var/tmp/diff_new_pack.WRD29T/_new 2025-06-12 15:47:34.699027736 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/rpm-software-management/rpmlint.git</param> - <param name="changesrevision">a9db0eb9b8881bdf647d4a5c87b84e0649aced55</param></service></servicedata> + <param name="changesrevision">de7cb57e4f294a99f90c11b4721df6aa3cd5ee54</param></service></servicedata> (No newline at EOF) ++++++ rpmlint-2.7.0+git20250603.a9db0eb9.tar.xz -> rpmlint-2.7.0+git20250610.de7cb57e.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250603.a9db0eb9/configs/openSUSE/scoring.toml new/rpmlint-2.7.0+git20250610.de7cb57e/configs/openSUSE/scoring.toml --- old/rpmlint-2.7.0+git20250603.a9db0eb9/configs/openSUSE/scoring.toml 2025-06-03 13:52:58.000000000 +0200 +++ new/rpmlint-2.7.0+git20250610.de7cb57e/configs/openSUSE/scoring.toml 2025-06-10 11:44:36.000000000 +0200 @@ -99,3 +99,5 @@ zypperplugin-file-ghost = 10 zypperplugin-file-unauthorized = 10 patch-macro-old-format = 10000 +# TODO: raise to 10,000 after we surveyed affected packages +logrotate-user-writable-log-dir = 100 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250603.a9db0eb9/configs/openSUSE/sysctl-whitelist.toml new/rpmlint-2.7.0+git20250610.de7cb57e/configs/openSUSE/sysctl-whitelist.toml --- old/rpmlint-2.7.0+git20250603.a9db0eb9/configs/openSUSE/sysctl-whitelist.toml 2025-06-03 13:52:58.000000000 +0200 +++ new/rpmlint-2.7.0+git20250610.de7cb57e/configs/openSUSE/sysctl-whitelist.toml 2025-06-10 11:44:36.000000000 +0200 @@ -52,7 +52,7 @@ package = "systemd" type = "sysctl" note = "sets core pattern, core pipe limit and suid_dumpable" -bugs = ["bsc#1174722", "bsc#1226865"] +bugs = ["bsc#1174722", "bsc#1226865", "bsc#1243959"] [[FileDigestGroup.digests]] path = "/usr/lib/sysctl.d/50-coredump.conf" digester = "shell" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250603.a9db0eb9/rpmlint/checks/AlternativesCheck.py new/rpmlint-2.7.0+git20250610.de7cb57e/rpmlint/checks/AlternativesCheck.py --- old/rpmlint-2.7.0+git20250603.a9db0eb9/rpmlint/checks/AlternativesCheck.py 2025-06-03 13:52:58.000000000 +0200 +++ new/rpmlint-2.7.0+git20250610.de7cb57e/rpmlint/checks/AlternativesCheck.py 2025-06-10 11:44:36.000000000 +0200 @@ -220,52 +220,56 @@ Checking content of all /usr/share/libalternatives/*/*.conf files """ for f, pkgfile in pkg.files.items(): - if re.search('^/usr/share/libalternatives/.*conf$', f): - filename = Path(pkg.dirname + f) - if not filename.exists(): - if pkgfile.is_ghost: - self.output.add_info('I', pkg, 'libalternatives-conf-not-found', f) - else: - self.output.add_info('E', pkg, 'libalternatives-conf-not-found', f) - continue - bin_found = False - man_found = False - with open(filename) as read_obj: - # Read all lines in the file one by one. E.g: - # - # binary=/usr/bin/jupyter-3.8 - # man=jupyter-3.8.1 - # group=jupyter, jupyter-migrate, jupyter-troubleshoot - # - for line_nr, line in enumerate(read_obj): - line_array = [x.strip() for x in line.split('=')] - line_nr_str = f'Line: {line_nr}' - if len(line_array) != 2: # empty values are valid - self.output.add_info('E', pkg, 'wrong-entry-format', f, line_nr_str) + if not re.search(r'^/usr/share/libalternatives/[^/]+/.*\.conf$', f): + continue - key, value = line_array - if key == 'binary': - if bin_found: - self.output.add_info('E', pkg, 'multiple-entries', f, line_nr_str) - continue + filename = Path(pkg.dirname + f) + if not filename.exists(): + if pkgfile.is_ghost: + self.output.add_info('I', pkg, 'libalternatives-conf-not-found', f) + else: + self.output.add_info('E', pkg, 'libalternatives-conf-not-found', f) + continue + + bin_found = False + man_found = False + with open(filename) as read_obj: + # Read all lines in the file one by one. E.g: + # + # binary=/usr/bin/jupyter-3.8 + # man=jupyter-3.8.1 + # group=jupyter, jupyter-migrate, jupyter-troubleshoot + # + for line_nr, line in enumerate(read_obj): + line_array = [x.strip() for x in line.split('=')] + line_nr_str = f'Line: {line_nr}' + if len(line_array) != 2: # empty values are valid + self.output.add_info('E', pkg, 'wrong-entry-format', f, line_nr_str) + continue + + key, value = line_array + if key == 'binary': + if bin_found: + self.output.add_info('E', pkg, 'multiple-entries', f, line_nr_str) + continue + for path in pkg.files: + if 'bin/' in path and path.endswith(value): + bin_found = True + if not bin_found: + self.output.add_info('W', pkg, 'binary-entry-value-not-found', f, line_nr_str) + elif key == 'man': + if man_found: + self.output.add_info('E', pkg, 'double-entries', f, line_nr_str) + continue + mans = value.split(',') + for man in mans: + man_found = False for path in pkg.files: - if 'bin/' in path and path.endswith(value): - bin_found = True - if not bin_found: - self.output.add_info('W', pkg, 'binary-entry-value-not-found', f, line_nr_str) - elif key == 'man': - if man_found: - self.output.add_info('E', pkg, 'double-entries', f, line_nr_str) - continue - mans = value.split(',') - for man in mans: - man_found = False - for path in pkg.files: - if path.startswith('/usr/share/man/') and man.strip() in path: - man_found = True - if not man_found: - self.output.add_info('W', pkg, 'man-entry-value-not-found', f, line_nr_str) - elif key != 'group' and key != 'options': - self.output.add_info('W', pkg, 'wrong-tag-found', f, line_nr_str) - if not bin_found: - self.output.add_info('W', pkg, 'wrong-or-missed-binary-entry', f) + if path.startswith('/usr/share/man/') and man.strip() in path: + man_found = True + if not man_found: + self.output.add_info('W', pkg, 'man-entry-value-not-found', f, line_nr_str) + elif key != 'group' and key != 'options': + self.output.add_info('W', pkg, 'wrong-tag-found', f, line_nr_str) + if not bin_found: + self.output.add_info('W', pkg, 'wrong-or-missed-binary-entry', f) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250603.a9db0eb9/rpmlint/checks/BinariesCheck.py new/rpmlint-2.7.0+git20250610.de7cb57e/rpmlint/checks/BinariesCheck.py --- old/rpmlint-2.7.0+git20250603.a9db0eb9/rpmlint/checks/BinariesCheck.py 2025-06-03 13:52:58.000000000 +0200 +++ new/rpmlint-2.7.0+git20250610.de7cb57e/rpmlint/checks/BinariesCheck.py 2025-06-10 11:44:36.000000000 +0200 @@ -147,7 +147,7 @@ We suppose that the package is arch dependent. """ - if bin_name.startswith('/etc/'): + if bin_name.startswith('/etc/') or bin_name.startswith('/usr/etc/'): self.output.add_info('E', pkg, 'binary-in-etc', bin_name) def _check_unstripped_binary(self, bin_name, pkg, pkgfile): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250603.a9db0eb9/rpmlint/checks/LogrotateCheck.py new/rpmlint-2.7.0+git20250610.de7cb57e/rpmlint/checks/LogrotateCheck.py --- old/rpmlint-2.7.0+git20250603.a9db0eb9/rpmlint/checks/LogrotateCheck.py 2025-06-03 13:52:58.000000000 +0200 +++ new/rpmlint-2.7.0+git20250610.de7cb57e/rpmlint/checks/LogrotateCheck.py 2025-06-10 11:44:36.000000000 +0200 @@ -15,7 +15,7 @@ if f in pkg.ghost_files: continue - if f.startswith('/etc/logrotate.d/'): + if f.startswith('/etc/logrotate.d/') or f.startswith('/usr/etc/logrotate.d/'): try: for n, o in self.parselogrotateconf(pkg.dir_name(), f).items(): if n in dirs and dirs[n] != o: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250603.a9db0eb9/test/mockdata/mock_alternatives.py new/rpmlint-2.7.0+git20250610.de7cb57e/test/mockdata/mock_alternatives.py --- old/rpmlint-2.7.0+git20250603.a9db0eb9/test/mockdata/mock_alternatives.py 1970-01-01 01:00:00.000000000 +0100 +++ new/rpmlint-2.7.0+git20250610.de7cb57e/test/mockdata/mock_alternatives.py 2025-06-10 11:44:36.000000000 +0200 @@ -0,0 +1,26 @@ +from Testing import get_tested_mock_package + + +AlternativeConfFolder = get_tested_mock_package( + lazyload=True, + header={'requires': [], 'POSTIN': '', 'POSTUN': ''}, + name='alternatives', + files={ + '/usr/share/libalternatives/rst2html/311.conf': { + 'create_dirs': True, + 'content': 'bin=/usr/bin/rst2html-3.11', + }, + '/usr/share/libalternatives/rst2html/1313.conf': { + 'create_dirs': True, + 'content': 'binary=/usr/bin/=rst2html-3.13', + }, + '/usr/share/libalternatives/ldaptor-ldap2dhcpconf/311.conf': { + 'create_dirs': True, + 'content': 'binary=/usr/bin/ldaptor-ldap2dhcpconf-3.11', + }, + '/usr/share/libalternatives/ldaptor-ldap2dhcpconf/1311.conf': { + 'create_dirs': True, + 'content': 'binary=/usr/bin/ldaptor-ldap2dhcpconf-3.13', + }, + } +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250603.a9db0eb9/test/test_alternatives.py new/rpmlint-2.7.0+git20250610.de7cb57e/test/test_alternatives.py --- old/rpmlint-2.7.0+git20250603.a9db0eb9/test/test_alternatives.py 2025-06-03 13:52:58.000000000 +0200 +++ new/rpmlint-2.7.0+git20250610.de7cb57e/test/test_alternatives.py 2025-06-10 11:44:36.000000000 +0200 @@ -1,3 +1,4 @@ +from mockdata.mock_alternatives import AlternativeConfFolder import pytest from rpmlint.checks.AlternativesCheck import AlternativesCheck from rpmlint.filter import Filter @@ -85,3 +86,14 @@ assert 'E: empty-libalternatives-directory' in out assert 'W: man-entry-value-not-found' in out assert 'W: binary-entry-value-not-found' in out + + +@pytest.mark.parametrize('package', [AlternativeConfFolder]) +def test_alternative_conf_folder(package, alternativescheck): + output, test = alternativescheck + test.check(package) + out = output.print_results(output.results) + assert 'E: libalternatives-conf-not-found' not in out + assert 'W: wrong-tag-found' in out + assert 'E: wrong-entry-format' in out + assert 'W: binary-entry-value-not-found' in out