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-03 17:51:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rpmlint (Old) and /work/SRC/openSUSE:Factory/.rpmlint.new.16005 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rpmlint" Tue Jun 3 17:51:23 2025 rev:505 rq:1282294 version:2.7.0+git20250603.a9db0eb9 Changes: -------- --- /work/SRC/openSUSE:Factory/rpmlint/rpmlint.changes 2025-05-23 14:26:58.463494061 +0200 +++ /work/SRC/openSUSE:Factory/.rpmlint.new.16005/rpmlint.changes 2025-06-03 17:51:47.153241879 +0200 @@ -1,0 +2,29 @@ +Tue Jun 03 11:54:46 UTC 2025 - Daniel Garcia <daniel.gar...@suse.com> + +- Update to version 2.7.0+git20250603.a9db0eb9: + * BuildRootAndDateCheck: More specific buildroot check + * Add openQA users to users-groups.toml + +------------------------------------------------------------------- +Mon Jun 02 15:08:09 UTC 2025 - Johannes Segitz <jseg...@suse.com> + +- Update to version 2.7.0+git20250602.ed1e5f38: + * sysctl-whitelist: adjust 50-coredump.conf digest for systemd (bsc#1243959) + * SUIDPermissionsCheck: Check for permctl instead of chkstat + +------------------------------------------------------------------- +Fri May 23 12:20:12 UTC 2025 - matthias.gerst...@suse.com + +- Update to version 2.7.0+git20250523.2bcb1b9f: + * permissions-whitelist: add exim drop-in file (bsc#1240755) + * SpecCheck: warn also for py3_install macro usage + * SpecCheck: Add new warning for setup.py install usage + * test: Fix spellchecking + * When Declarative BuildSystem is used, assume patches are auto-applied + * SpecCheck: Add shared-dir-glob-in-files warning + * Tests: Accept long GPG key ids (for RPM 6) + * Avoid unnecessary backslashes + * Fixup fallback regexp for buildroot detection + * SpecCheck: Report rpm warnings on spec files + +------------------------------------------------------------------- Old: ---- rpmlint-2.7.0+git20250515.1368c7ea.tar.xz New: ---- rpmlint-2.7.0+git20250603.a9db0eb9.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rpmlint.spec ++++++ --- /var/tmp/diff_new_pack.2MsE0V/_old 2025-06-03 17:51:48.045278873 +0200 +++ /var/tmp/diff_new_pack.2MsE0V/_new 2025-06-03 17:51:48.045278873 +0200 @@ -23,7 +23,7 @@ %define name_suffix -%{flavor} %endif Name: rpmlint%{name_suffix} -Version: 2.7.0+git20250515.1368c7ea +Version: 2.7.0+git20250603.a9db0eb9 Release: 0 Summary: RPM file correctness checker License: GPL-2.0-or-later ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.2MsE0V/_old 2025-06-03 17:51:48.101281196 +0200 +++ /var/tmp/diff_new_pack.2MsE0V/_new 2025-06-03 17:51:48.105281362 +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">1368c7ea65f29e9d215f3ec7f12dd610a7333c27</param></service></servicedata> + <param name="changesrevision">a9db0eb9b8881bdf647d4a5c87b84e0649aced55</param></service></servicedata> (No newline at EOF) ++++++ rpmlint-2.7.0+git20250515.1368c7ea.tar.xz -> rpmlint-2.7.0+git20250603.a9db0eb9.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/configs/openSUSE/permissions-whitelist.toml new/rpmlint-2.7.0+git20250603.a9db0eb9/configs/openSUSE/permissions-whitelist.toml --- old/rpmlint-2.7.0+git20250515.1368c7ea/configs/openSUSE/permissions-whitelist.toml 2025-05-15 13:09:11.000000000 +0200 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/configs/openSUSE/permissions-whitelist.toml 2025-06-03 13:52:58.000000000 +0200 @@ -76,3 +76,13 @@ path = "/usr/share/permissions/permissions.d/sssd" digester = "shell" hash = "c90615240af575b857e264caa1bd56282a74c68ab1f53a411b56d6747a8a0df6" + +[[FileDigestGroup]] +package = "exim" +note = "Permissions for the spool directory" +bug = "bsc#1240755" +type = "permissions" +[[FileDigestGroup.digests]] +path = "/etc/permissions.d/exim" +digester = "shell" +hash = "bcc22a994f7bbb3aea193ab77ef49a57bf171bafce9f55e4bc1b02e16e7e308f" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/configs/openSUSE/sysctl-whitelist.toml new/rpmlint-2.7.0+git20250603.a9db0eb9/configs/openSUSE/sysctl-whitelist.toml --- old/rpmlint-2.7.0+git20250515.1368c7ea/configs/openSUSE/sysctl-whitelist.toml 2025-05-15 13:09:11.000000000 +0200 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/configs/openSUSE/sysctl-whitelist.toml 2025-06-03 13:52:58.000000000 +0200 @@ -56,7 +56,7 @@ [[FileDigestGroup.digests]] path = "/usr/lib/sysctl.d/50-coredump.conf" digester = "shell" -hash = "167ec7922affa2b784540a0d755f02a270cd5d816aea402db2e6489cee293bad" +hash = "54f2f502708e2b70ac5b6994b4162641fcdee4b834d8eba928d066e4795c4f04" [[FileDigestGroup]] package = "aaa_base" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/configs/openSUSE/users-groups.toml new/rpmlint-2.7.0+git20250603.a9db0eb9/configs/openSUSE/users-groups.toml --- old/rpmlint-2.7.0+git20250515.1368c7ea/configs/openSUSE/users-groups.toml 2025-05-15 13:09:11.000000000 +0200 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/configs/openSUSE/users-groups.toml 2025-06-03 13:52:58.000000000 +0200 @@ -131,6 +131,7 @@ 'ntadmin', 'ntop', 'ntp', + '_openqa-worker', 'oinstall', 'openbao', 'opensearch', @@ -303,6 +304,7 @@ 'ftp', 'games', 'gdm', + 'geekotest', 'gerbera', 'geronimo', 'glance', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/rpmlint/checks/BuildRootAndDateCheck.py new/rpmlint-2.7.0+git20250603.a9db0eb9/rpmlint/checks/BuildRootAndDateCheck.py --- old/rpmlint-2.7.0+git20250515.1368c7ea/rpmlint/checks/BuildRootAndDateCheck.py 2025-05-15 13:09:11.000000000 +0200 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/rpmlint/checks/BuildRootAndDateCheck.py 2025-06-03 13:52:58.000000000 +0200 @@ -17,12 +17,18 @@ super().__init__(config, output, r'.*') self.looksliketime = re.compile('(2[0-3]|[01]?[0-9]):([0-5]?[0-9]):([0-5]?[0-9])') self.istoday = re.compile(time.strftime('%b %e %Y')) - self.prepare_regex(rpm.expandMacro('%{?buildroot}') or '^/.*/BUILDROOT/') + # in rpm 4.20 the expandMacro will return an empty string and so we run + # into the "or" case. + # return a string that is modelled after the actual path that rpm 4.20 + # is using so we can actually match what the rpm 4.20 path will be and + # not just any random string in a file that references buildroot. + # https://github.com/rpm-software-management/rpm/blob/rpm-4.20.1-release/build/parsePreamble.c#L1290 + self.prepare_regex(rpm.expandMacro('%{?buildroot}') or '/%{NAME}-%{VERSION}-build/BUILDROOT/') def prepare_regex(self, buildroot): for m in ('name', 'version', 'release', 'NAME', 'VERSION', 'RELEASE'): buildroot = buildroot.replace('%%{%s}' % (m), r'[\w\!-\.]{1,20}') - self.build_root_re = re.compile(buildroot) + self.lookslikebuildroot = re.compile(buildroot) def check_file(self, pkg, filename): if filename.startswith('/usr/lib/debug') or pkg.is_source or \ @@ -35,5 +41,5 @@ self.output.add_info('E', pkg, 'file-contains-date-and-time', filename) else: self.output.add_info('E', pkg, 'file-contains-current-date', filename) - if self.build_root_re.search(data): + if self.lookslikebuildroot.search(data): self.output.add_info('E', pkg, 'file-contains-buildroot', filename) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/rpmlint/checks/SUIDPermissionsCheck.py new/rpmlint-2.7.0+git20250603.a9db0eb9/rpmlint/checks/SUIDPermissionsCheck.py --- old/rpmlint-2.7.0+git20250515.1368c7ea/rpmlint/checks/SUIDPermissionsCheck.py 2025-05-15 13:09:11.000000000 +0200 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/rpmlint/checks/SUIDPermissionsCheck.py 2025-06-03 13:52:58.000000000 +0200 @@ -81,7 +81,8 @@ found = False if script: for line in script.split('\n'): - if '/chkstat' in line and path in line: + escaped = re.escape(path) + if re.search(fr'(chkstat|permctl) -n .* {escaped}', line): found = True break diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/rpmlint/checks/SpecCheck.py new/rpmlint-2.7.0+git20250603.a9db0eb9/rpmlint/checks/SpecCheck.py --- old/rpmlint-2.7.0+git20250515.1368c7ea/rpmlint/checks/SpecCheck.py 2025-05-15 13:09:11.000000000 +0200 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/rpmlint/checks/SpecCheck.py 2025-06-03 13:52:58.000000000 +0200 @@ -84,9 +84,12 @@ tarball_regex = re.compile(r'\.(?:t(?:ar|[glx]z|bz2?)|zip)\b', re.IGNORECASE) python_setup_test_regex = re.compile(r'^[^#]*(setup.py test)') +python_setup_install_regex = re.compile(r'^[^#]*(setup.py install|%\{?py(thon)?\d*_install)') python_module_def_regex = re.compile(r'^[^#]*%{\?!python_module:%define python_module()') python_sitelib_glob_regex = re.compile(r'^[^#]*%{python_site(lib|arch)}/\*\s*$') +shared_dir_glob_regex = re.compile(r'^[^#]*%{_(?:bin|data|doc|include|man)dir}/\*\s*$') + # %suse_update_desktop_file deprecation # https://lists.opensuse.org/archives/list/packag...@lists.opensuse.org/message/TF4QO7ECOSEDHBFI5YDEA3OF4RNSI7D7/ suse_update_desktop_file_regex = re.compile(r'^BuildRequires:\s*update-desktop-files', re.IGNORECASE) @@ -323,8 +326,12 @@ for line in outcmd.stderr.splitlines(): line = line.strip() + if not line: + continue if line and 'warning:' not in line: self.output.add_info('E', pkg, 'specfile-error', line) + else: + self.output.add_info('W', pkg, 'specfile-warning', line) except UnicodeDecodeError as e: self.output.add_info('E', pkg, 'specfile-error', str(e)) @@ -390,8 +397,10 @@ self._checkline_valid_groups(line) self._checkline_macros_in_comments(line) self._checkline_python_setup_test(line) + self._checkline_python_setup_install(line) self._checkline_python_module_def(line) self._checkline_python_sitelib_glob(line) + self._checkline_shared_dir_glob(line) # If statement, starts if ifarch_regex.search(line): @@ -413,6 +422,9 @@ if self.declarative: return self.declarative = bool(declarative_regex.search(line)) + if self.declarative: + # we assume implicit %prep + self.patches_auto_applied = True def _checkline_break_space(self, line): char = line.find(UNICODE_NBSP) @@ -797,6 +809,11 @@ if self.current_section == 'check' and python_setup_test_regex.search(line): self.output.add_info('W', self.pkg, 'python-setup-test', line[:-1]) + def _checkline_python_setup_install(self, line): + # Test if the "python setup.py install" deprecated subcommand is used + if self.current_section == 'install' and python_setup_install_regex.search(line): + self.output.add_info('W', self.pkg, 'python-setup-install', line[:-1]) + def _checkline_python_module_def(self, line): """ Test if the "python_module" macro is defined in the spec file @@ -815,6 +832,15 @@ self.output.add_info('W', self.pkg, 'python-sitelib-glob-in-files', line[:-1]) + def _checkline_shared_dir_glob(self, line): + """Test if %{_bindir}/*, etc. is present in %files section.""" + if self.current_section != 'files': + return + + if shared_dir_glob_regex.match(line): + self.output.add_info('W', self.pkg, 'shared-dir-glob-in-files', + line[:-1]) + def _checkline_forbidden_controlchars(self, line): """Look for controlchar in any line""" # https://github.com/rpm-software-management/rpmlint/issues/1067 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/rpmlint/descriptions/SpecCheck.toml new/rpmlint-2.7.0+git20250603.a9db0eb9/rpmlint/descriptions/SpecCheck.toml --- old/rpmlint-2.7.0+git20250515.1368c7ea/rpmlint/descriptions/SpecCheck.toml 2025-05-15 13:09:11.000000000 +0200 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/rpmlint/descriptions/SpecCheck.toml 2025-06-03 13:52:58.000000000 +0200 @@ -182,6 +182,10 @@ This error occurred when rpmlint used rpm to query the specfile. The error is output by rpm and the message should contain more information. """ +specfile-warning=""" +This warning occurred when rpmlint used rpm to query the specfile. The error +is output by rpm and the message should contain more information. +""" comparison-operator-in-deptoken=""" This dependency token contains a comparison operator (<, > or =). This is usually not intended and may be caused by missing whitespace between the @@ -203,6 +207,10 @@ The python setup.py test subcommand is deprecated and should be replaced with a modern testing tool like %pytest or %pyunittest discover -v. """ +python-setup-install=""" +The python setup.py install subcommand is deprecated and should be replaced with +macros %pyproject_wheel, %pyproject_install or with "pip" +""" python-module-def=""" The spec file contains a conditional definition of python_module macro, this macro is present in recent versions of python-rpm-macros. @@ -225,6 +233,13 @@ The specfile contains a comparison of %suse_version against a suse release that does not exist. Please double check. """ +shared-dir-glob-in-files=""" +The %files section contains "%{_bindir}/*", "%{_datadir}/*", "%{_docdir}/*", +"%{_includedir}/*" or "%{_mandir}/*". These can lead to packagers not noticing +when upstream adds new and possibly conflicting files in these directories. +Therefore, files in these directories should be explicitely listed like +"%{_bindir}/foobar" or "%{_includedir}/foobar.h". +""" suse-update-desktop-file-deprecated=""" The usage of %suse_update_desktop_file is deprecated and changes should be migrated to the upstream. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/test/spec/bogus-date.spec new/rpmlint-2.7.0+git20250603.a9db0eb9/test/spec/bogus-date.spec --- old/rpmlint-2.7.0+git20250515.1368c7ea/test/spec/bogus-date.spec 1970-01-01 01:00:00.000000000 +0100 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/test/spec/bogus-date.spec 2025-06-03 13:52:58.000000000 +0200 @@ -0,0 +1,30 @@ +### Based on macro-in-changelog.spec, I added the date information in changlog, as follows: +Name: macro-in +Version: 0 +Release: 0 +Summary: macro-in +License: GPL-2.0-only +Group: Undefined +URL: http://rpmlint.zarb.org/#%{name} +Source0: Source0.tar.gz + +%description +Macros are expanded in %changelog too, which can in unfortunate cases lead +to the package not building at all, or other subtle unexpected conditions that +affect the build. Even when that doesn't happen, the expansion results in +possibly 'rewriting history' on subsequent package revisions and generally +odd entries eg. in source rpms, which is rarely wanted. Avoid use of macros +in %changelog altogether, or use two '%'s to escape them, like '%%foo'. + +%prep + +%build + +%install + +%files +%{_libdir}/foo + +%changelog +* Wed Oct 22 14:15:39 UTC 2019 - Frank Schreiner <fr...@fs.samaxi.de> +- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/test/spec/libspelling.spec new/rpmlint-2.7.0+git20250603.a9db0eb9/test/spec/libspelling.spec --- old/rpmlint-2.7.0+git20250515.1368c7ea/test/spec/libspelling.spec 2025-05-15 13:09:11.000000000 +0200 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/test/spec/libspelling.spec 2025-06-03 13:52:58.000000000 +0200 @@ -26,6 +26,7 @@ License: LGPL-2.1-or-later URL: https://gitlab.gnome.org/chergert/libspelling Source: %{name}-%{version}.tar.zst +Patch: dummy.patch BuildRequires: c_compiler BuildRequires: meson diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/test/spec/python-setup-install.spec new/rpmlint-2.7.0+git20250603.a9db0eb9/test/spec/python-setup-install.spec --- old/rpmlint-2.7.0+git20250515.1368c7ea/test/spec/python-setup-install.spec 1970-01-01 01:00:00.000000000 +0100 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/test/spec/python-setup-install.spec 2025-06-03 13:52:58.000000000 +0200 @@ -0,0 +1,29 @@ +Name: python-setup-install +Version: 1.0 +Release: 0 +Summary: python-setup-install warning +License: MIT +URL: https://www.example.com +Source: Source.tar.gz +BuildRequires: gcc +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +A test specfile with python setup.py test that is deprecated. + +%prep +%setup -q + +%build +python3 setup.py build + +%install +python3 setup.py install + +%check + +%files +%license COPYING +%doc ChangeLog README + +%changelog diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/test/spec/python-setup-python_install.spec new/rpmlint-2.7.0+git20250603.a9db0eb9/test/spec/python-setup-python_install.spec --- old/rpmlint-2.7.0+git20250515.1368c7ea/test/spec/python-setup-python_install.spec 1970-01-01 01:00:00.000000000 +0100 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/test/spec/python-setup-python_install.spec 2025-06-03 13:52:58.000000000 +0200 @@ -0,0 +1,33 @@ +Name: python-setup-python_install +Version: 1.0 +Release: 0 +Summary: python-setup-install warning +License: MIT +URL: https://www.example.com +Source: Source.tar.gz +BuildRequires: gcc +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +A test specfile with python setup.py test that is deprecated. + +%prep +%setup -q + +%build +%python_build + +%install +%python_install +%python3_install +%python312_install +# old fedora version +%py3_install + +%check + +%files +%license COPYING +%doc ChangeLog README + +%changelog diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/test/spec/shared-bindir-glob-in-files.spec new/rpmlint-2.7.0+git20250603.a9db0eb9/test/spec/shared-bindir-glob-in-files.spec --- old/rpmlint-2.7.0+git20250515.1368c7ea/test/spec/shared-bindir-glob-in-files.spec 1970-01-01 01:00:00.000000000 +0100 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/test/spec/shared-bindir-glob-in-files.spec 2025-06-03 13:52:58.000000000 +0200 @@ -0,0 +1,27 @@ +Name: shared-bindir-glob-in-files +Version: 1.0 +Release: 1%{?dist} +Summary: Dummy test package + +License: Public Domain +URL: http://fedoraproject.org/ + +%description + + +%prep + + +%build + + +%install + + +%files +%{_bindir}/* + + +%changelog +* Wed Apr 23 2025 Tim Landscheidt <t...@tim-landscheidt.de> +- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/test/spec/shared-datadir-glob-in-files.spec new/rpmlint-2.7.0+git20250603.a9db0eb9/test/spec/shared-datadir-glob-in-files.spec --- old/rpmlint-2.7.0+git20250515.1368c7ea/test/spec/shared-datadir-glob-in-files.spec 1970-01-01 01:00:00.000000000 +0100 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/test/spec/shared-datadir-glob-in-files.spec 2025-06-03 13:52:58.000000000 +0200 @@ -0,0 +1,27 @@ +Name: shared-datadir-glob-in-files +Version: 1.0 +Release: 1%{?dist} +Summary: Dummy test package + +License: Public Domain +URL: http://fedoraproject.org/ + +%description + + +%prep + + +%build + + +%install + + +%files +%{_datadir}/* + + +%changelog +* Wed Apr 23 2025 Tim Landscheidt <t...@tim-landscheidt.de> +- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/test/spec/shared-docdir-glob-in-files.spec new/rpmlint-2.7.0+git20250603.a9db0eb9/test/spec/shared-docdir-glob-in-files.spec --- old/rpmlint-2.7.0+git20250515.1368c7ea/test/spec/shared-docdir-glob-in-files.spec 1970-01-01 01:00:00.000000000 +0100 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/test/spec/shared-docdir-glob-in-files.spec 2025-06-03 13:52:58.000000000 +0200 @@ -0,0 +1,27 @@ +Name: shared-docdir-glob-in-files +Version: 1.0 +Release: 1%{?dist} +Summary: Dummy test package + +License: Public Domain +URL: http://fedoraproject.org/ + +%description + + +%prep + + +%build + + +%install + + +%files +%{_docdir}/* + + +%changelog +* Wed Apr 23 2025 Tim Landscheidt <t...@tim-landscheidt.de> +- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/test/spec/shared-includedir-glob-in-files.spec new/rpmlint-2.7.0+git20250603.a9db0eb9/test/spec/shared-includedir-glob-in-files.spec --- old/rpmlint-2.7.0+git20250515.1368c7ea/test/spec/shared-includedir-glob-in-files.spec 1970-01-01 01:00:00.000000000 +0100 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/test/spec/shared-includedir-glob-in-files.spec 2025-06-03 13:52:58.000000000 +0200 @@ -0,0 +1,27 @@ +Name: shared-includedir-glob-in-files +Version: 1.0 +Release: 1%{?dist} +Summary: Dummy test package + +License: Public Domain +URL: http://fedoraproject.org/ + +%description + + +%prep + + +%build + + +%install + + +%files +%{_includedir}/* + + +%changelog +* Wed Apr 23 2025 Tim Landscheidt <t...@tim-landscheidt.de> +- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/test/spec/shared-mandir-glob-in-files.spec new/rpmlint-2.7.0+git20250603.a9db0eb9/test/spec/shared-mandir-glob-in-files.spec --- old/rpmlint-2.7.0+git20250515.1368c7ea/test/spec/shared-mandir-glob-in-files.spec 1970-01-01 01:00:00.000000000 +0100 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/test/spec/shared-mandir-glob-in-files.spec 2025-06-03 13:52:58.000000000 +0200 @@ -0,0 +1,27 @@ +Name: shared-mandir-glob-in-files +Version: 1.0 +Release: 1%{?dist} +Summary: Dummy test package + +License: Public Domain +URL: http://fedoraproject.org/ + +%description + + +%prep + + +%build + + +%install + + +%files +%{_mandir}/* + + +%changelog +* Wed Apr 23 2025 Tim Landscheidt <t...@tim-landscheidt.de> +- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/test/test_signature.py new/rpmlint-2.7.0+git20250603.a9db0eb9/test/test_signature.py --- old/rpmlint-2.7.0+git20250515.1368c7ea/test/test_signature.py 2025-05-15 13:09:11.000000000 +0200 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/test/test_signature.py 2025-06-03 13:52:58.000000000 +0200 @@ -1,3 +1,5 @@ +import re + import pytest from rpmlint.checks.SignatureCheck import SignatureCheck from rpmlint.filter import Filter @@ -31,7 +33,8 @@ output, test = signaturecheck test.check(get_tested_package(package, tmp_path)) out = output.print_results(output.results) - assert 'E: unknown-key 31fdc502' in out + # https://github.com/rpm-software-management/rpm/issues/2403 + assert re.search(r'E: unknown-key (84944291)?31fdc502\b', out) assert 'E: no-signature' not in out assert 'E: invalid-signature' not in out diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/test/test_speccheck.py new/rpmlint-2.7.0+git20250603.a9db0eb9/test/test_speccheck.py --- old/rpmlint-2.7.0+git20250515.1368c7ea/test/test_speccheck.py 2025-05-15 13:09:11.000000000 +0200 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/test/test_speccheck.py 2025-06-03 13:52:58.000000000 +0200 @@ -914,6 +914,7 @@ assert 'W: no-%install-section' not in out assert 'W: no-%build-section' not in out assert 'W: no-%check-section' not in out + assert 'W: patch-not-applied' not in out @pytest.mark.parametrize('package', ['spec/SpecCheck2']) @@ -1169,6 +1170,21 @@ assert 'W: python-setup-test' in out +@pytest.mark.parametrize('package,lines', [ + ('spec/python-setup-install', ['setup.py install']), + ('spec/python-setup-python_install', ['python_install', 'python3_install', 'python312_install', 'py3_install']), +]) +def test_python_setup_install(package, lines, speccheck): + """Test if specfile has deprecated use of 'setup.py install'.""" + output, test = speccheck + pkg = get_tested_spec_package(package) + test.check_spec(pkg) + out = output.print_results(output.results) + assert 'W: python-setup-install' in out + for line in lines: + assert line in out + + @pytest.mark.parametrize('package', ['spec/python-module-def']) def test_python_module_definition(package, speccheck): """Test if python_module macro is defined in the spec file.""" @@ -1232,6 +1248,22 @@ @pytest.mark.parametrize('package', [ + 'spec/shared-bindir-glob-in-files', + 'spec/shared-datadir-glob-in-files', + 'spec/shared-docdir-glob-in-files', + 'spec/shared-includedir-glob-in-files', + 'spec/shared-mandir-glob-in-files', +]) +def test_shared_dir_glob(package, speccheck): + """Test if %{_bindir}/*, etc. is present in %files section.""" + output, test = speccheck + pkg = get_tested_spec_package(package) + test.check_spec(pkg) + out = output.print_results(output.results) + assert 'W: shared-dir-glob-in-files' in out + + +@pytest.mark.parametrize('package', [ 'spec/null-char-last', 'spec/null-char-first', ]) @@ -1265,3 +1297,12 @@ test.check_spec(package) out = output.print_results(output.results) assert ('W: suse-update-desktop-file-deprecated' in out) == expected + + +@pytest.mark.parametrize('spec', ['spec/bogus-date']) +def test_bogus_date_in_changelog(spec, output, test): + package = get_tested_spec_package(spec) + test.check_spec(package) + out = output.print_results(output.results) + assert 'warning: bogus date in %changelog' in out + assert 'W: specfile-warning warning: bogus date in %changelog' in out diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/test/test_spellchecking.py new/rpmlint-2.7.0+git20250603.a9db0eb9/test/test_spellchecking.py --- old/rpmlint-2.7.0+git20250515.1368c7ea/test/test_spellchecking.py 2025-05-15 13:09:11.000000000 +0200 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/test/test_spellchecking.py 2025-06-03 13:52:58.000000000 +0200 @@ -51,7 +51,7 @@ result = spell.spell_check(text, 'Description({}):') assert len(result) == 2 assert result['tihs'].startswith('Description(en_US): tihs -> ') - assert get_suggestions(result['tihs']) == ['hits', 'this', 'ties'] + assert 'this' in get_suggestions(result['tihs']) # different language, one typo text = 'Příčerně žluťoučký kůň' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-2.7.0+git20250515.1368c7ea/test/test_suid_permissions.py new/rpmlint-2.7.0+git20250603.a9db0eb9/test/test_suid_permissions.py --- old/rpmlint-2.7.0+git20250515.1368c7ea/test/test_suid_permissions.py 2025-05-15 13:09:11.000000000 +0200 +++ new/rpmlint-2.7.0+git20250603.a9db0eb9/test/test_suid_permissions.py 2025-06-03 13:52:58.000000000 +0200 @@ -156,6 +156,11 @@ /usr/bin/permctl -n --set --system /var/lib/perms/test || : \ fi \ """, + 'VERIFYSCRIPT': """ + if [ -x /usr/bin/permctl ]; then \ + /usr/bin/permctl -n --set --system /var/lib/perms/test || : \ + fi \ +""", }, ) CHKSTAT_PKG = PERMCTL_PKG.clone( @@ -165,6 +170,11 @@ /usr/bin/chkstat -n --set --system /var/lib/perms/test || : \ fi \ """, + 'VERIFYSCRIPT': """ + if [ -x /usr/bin/chkstat ]; then \ + /usr/bin/chkstat -n --set --system /var/lib/perms/test || : \ + fi \ +""", }, ) @@ -175,3 +185,4 @@ test.check(package) out = output.print_results(output.results) assert 'permissions-missing-postin' not in out + assert 'permissions-missing-verifyscript' not in out