Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package spec-cleaner for openSUSE:Factory checked in at 2024-07-08 19:09:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/spec-cleaner (Old) and /work/SRC/openSUSE:Factory/.spec-cleaner.new.2080 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "spec-cleaner" Mon Jul 8 19:09:07 2024 rev:72 rq:1186143 version:1.2.3+1 Changes: -------- --- /work/SRC/openSUSE:Factory/spec-cleaner/spec-cleaner.changes 2024-04-10 17:50:59.209790589 +0200 +++ /work/SRC/openSUSE:Factory/.spec-cleaner.new.2080/spec-cleaner.changes 2024-07-08 19:09:31.309508355 +0200 @@ -1,0 +2,10 @@ +Mon Jul 8 10:51:00 UTC 2024 - Daniel Garcia <daniel.gar...@suse.com> + +- Update to version 1.2.3+1: + + Update rpmprep to handle %patchN for rpm >= 4.20 + + Do not embrace macros inside %python_module + + Use python-rpm-spec instead of calling rpmspec command + + Add %dnl to excludes-bracketing.txt +- Fix version number in package from github master + +------------------------------------------------------------------- Old: ---- spec-cleaner-1.2.2+5.obscpio New: ---- spec-cleaner-1.2.3+1.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ spec-cleaner.spec ++++++ --- /var/tmp/diff_new_pack.bGt87F/_old 2024-07-08 19:09:31.777525472 +0200 +++ /var/tmp/diff_new_pack.bGt87F/_new 2024-07-08 19:09:31.777525472 +0200 @@ -18,7 +18,7 @@ Name: spec-cleaner -Version: 1.2.2+5 +Version: 1.2.3+1 Release: 0 Summary: .spec file cleaner License: BSD-3-Clause @@ -28,7 +28,9 @@ BuildRequires: python-rpm-macros BuildRequires: python3-pip BuildRequires: python3-pytest +BuildRequires: python3-python-rpm-spec BuildRequires: python3-wheel +Requires: python3-python-rpm-spec # For the pkg_resources used in the binary loader BuildArch: noarch @@ -48,6 +50,8 @@ %prep %autosetup -p1 +# Set correct package version, upstream has the next release number +sed -i 's/1\.2\.4/%{version}/g' spec_cleaner/__init__.py rm pytest.ini %build @@ -59,7 +63,12 @@ %check export LANG=en_US.UTF-8 -python3 -m pytest -k "not webtest" tests/*-tests.py +# Tests that requires network +donttest="webtest or url_https.spec" +# Tests that requires network because of make_secure_url checking that +# the secure url exists +donttest+=" or source_https or rpmpreamble.spec or replace_pwdutils.spec or mingw32-clutter.spec" +python3 -m pytest -k "not ($donttest)" tests/*-tests.py %install %if 0%{?mageia} ++++++ spec-cleaner-1.2.2+5.obscpio -> spec-cleaner-1.2.3+1.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-1.2.2+5/.github/workflows/pythonpackage.yml new/spec-cleaner-1.2.3+1/.github/workflows/pythonpackage.yml --- old/spec-cleaner-1.2.2+5/.github/workflows/pythonpackage.yml 2024-02-27 18:25:21.000000000 +0100 +++ new/spec-cleaner-1.2.3+1/.github/workflows/pythonpackage.yml 2024-07-05 10:52:01.000000000 +0200 @@ -13,7 +13,7 @@ runs-on: ubuntu-20.04 strategy: matrix: - python-version: ["3.6", "3.7", "3.8", "3.9"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-1.2.2+5/data/excludes-bracketing.txt new/spec-cleaner-1.2.3+1/data/excludes-bracketing.txt --- old/spec-cleaner-1.2.2+5/data/excludes-bracketing.txt 2024-02-27 18:25:21.000000000 +0100 +++ new/spec-cleaner-1.2.3+1/data/excludes-bracketing.txt 2024-07-05 10:52:01.000000000 +0200 @@ -28,6 +28,7 @@ desktop_database_post[^\s]* dev dir +dnl doc docdir else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-1.2.2+5/devel-requirements.pip new/spec-cleaner-1.2.3+1/devel-requirements.pip --- old/spec-cleaner-1.2.2+5/devel-requirements.pip 2024-02-27 18:25:21.000000000 +0100 +++ new/spec-cleaner-1.2.3+1/devel-requirements.pip 2024-07-05 10:52:01.000000000 +0200 @@ -14,3 +14,4 @@ pytest-cov pytest-isort pytest-xdist +python-rpm-spec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-1.2.2+5/setup.py new/spec-cleaner-1.2.3+1/setup.py --- old/spec-cleaner-1.2.2+5/setup.py 2024-02-27 18:25:21.000000000 +0100 +++ new/spec-cleaner-1.2.3+1/setup.py 2024-07-05 10:52:01.000000000 +0200 @@ -33,6 +33,7 @@ platforms=['Linux'], keywords=['SUSE', 'RPM', '.spec', 'cleaner'], tests_require=['pytest', 'pytest-cov', 'pytest-xdist'], + install_requires=['python-rpm-spec'], packages=['spec_cleaner'], data_files=[('lib/obs/service/', glob('obs/*')), ('share/spec-cleaner', glob('data/*'))], entry_points={'console_scripts': ['spec-cleaner = spec_cleaner:main']}, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-1.2.2+5/spec_cleaner/__init__.py new/spec-cleaner-1.2.3+1/spec_cleaner/__init__.py --- old/spec-cleaner-1.2.2+5/spec_cleaner/__init__.py 2024-02-27 18:25:21.000000000 +0100 +++ new/spec-cleaner-1.2.3+1/spec_cleaner/__init__.py 2024-07-05 10:52:01.000000000 +0200 @@ -15,7 +15,7 @@ from .rpmcleaner import RpmSpecCleaner from .rpmexception import RpmExceptionError, RpmWrongArgsError -__version__ = '1.2.3' +__version__ = '1.2.4' def process_args(argv: List[str]) -> Dict[str, Any]: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-1.2.2+5/spec_cleaner/rpmpreamble.py new/spec-cleaner-1.2.3+1/spec_cleaner/rpmpreamble.py --- old/spec-cleaner-1.2.2+5/spec_cleaner/rpmpreamble.py 2024-02-27 18:25:21.000000000 +0100 +++ new/spec-cleaner-1.2.3+1/spec_cleaner/rpmpreamble.py 2024-07-05 10:52:01.000000000 +0200 @@ -4,10 +4,11 @@ import os.path import re from ssl import CertificateError, SSLError -from subprocess import PIPE, Popen from urllib import error, parse from urllib.request import Request, urlopen +import pyrpm.spec # type: ignore + from .dependency_parser import DependencyParser from .rpmhelpers import fix_license from .rpmpreambleelements import RpmPreambleElements @@ -471,25 +472,15 @@ match = self.reg.re_source.match(line) source = match.group(2) secure_source_available = False + # expand the spec file to get URLs that can be checked - try: - with Popen( - ['rpmspec', '-P', self.options['specfile']], - stdout=PIPE, - universal_newlines=True, - ) as process: - for line in process.stdout: - match2 = self.reg.re_source.match(line) - if match2: - expanded_source_url = match2.group(2) - # we can't use this value as it is the expanded URL, so - # just set it to indicate that we need to transform the - # original source - if self._make_secure_url(expanded_source_url): - secure_source_available = True - except (FileNotFoundError): - # rpmspec is not available. Fail silently for now unless running in debug mode - logger.debug("rpmspec not available, can't check URIs for insecure protocols") + spec = pyrpm.spec.Spec.from_file(self.options['specfile']) + for s in spec.sources: + if s == source: + expanded_source_url = pyrpm.spec.replace_macros(s, spec) + if self._make_secure_url(expanded_source_url) != expanded_source_url: + secure_source_available = True + if not self.minimal: source = self._fix_pypi_source(source) if secure_source_available: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-1.2.2+5/spec_cleaner/rpmregexp.py new/spec-cleaner-1.2.3+1/spec_cleaner/rpmregexp.py --- old/spec-cleaner-1.2.2+5/spec_cleaner/rpmregexp.py 2024-02-27 18:25:21.000000000 +0100 +++ new/spec-cleaner-1.2.3+1/spec_cleaner/rpmregexp.py 2024-07-05 10:52:01.000000000 +0200 @@ -138,6 +138,7 @@ r'%{?(python_sitelib|python_sitearch|python_bin_suffix|python_version)}?' ) re_python_interp_expand = re.compile(r'\s+(python)\s+') + re_python_module = re.compile(r'.*\s%{python_module\s.*}') # rpmcopyright re_copyright_string = re.compile(r'^#\s*Copyright\ \(c\)\s*(.*)', re.IGNORECASE) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-1.2.2+5/spec_cleaner/rpmsection.py new/spec-cleaner-1.2.3+1/spec_cleaner/rpmsection.py --- old/spec-cleaner-1.2.2+5/spec_cleaner/rpmsection.py 2024-02-27 18:25:21.000000000 +0100 +++ new/spec-cleaner-1.2.3+1/spec_cleaner/rpmsection.py 2024-07-05 10:52:01.000000000 +0200 @@ -56,7 +56,12 @@ line = line.replace(u'\xa0', ' ') if not line.startswith('#'): - if not self.minimal and not self.no_curlification: + is_python_module = self.reg.re_python_module.match(line) + if (not self.minimal + and not self.no_curlification + # Do not embrace macros inside python_module + # gh#rpm-software-management/spec-cleaner#321 + and not is_python_module): line = self.embrace_macros(line) line = self.replace_buildroot(line) line = self.replace_optflags(line) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-1.2.2+5/tests/in/python-conditional-buildrequires.spec new/spec-cleaner-1.2.3+1/tests/in/python-conditional-buildrequires.spec --- old/spec-cleaner-1.2.2+5/tests/in/python-conditional-buildrequires.spec 1970-01-01 01:00:00.000000000 +0100 +++ new/spec-cleaner-1.2.3+1/tests/in/python-conditional-buildrequires.spec 2024-07-05 10:52:01.000000000 +0200 @@ -0,0 +1,15 @@ +BuildRequires: %{python_module tomli >= 1.2.2 if %python-base < 3.11} +Requires: %oldpython-base + +%install +%python_expand %fdupes %{buildroot}%{python_sitelib} +%python_expand %fdupes %{buildroot}%{python_sitearch} + + +%check +%python_expand PYTHONPATH=%{python_sitearch} nosetests-%{python_bin_suffix} +%python_expand testr-%{python_version} +%{python_expand python -m unittest discover} + +%changelog + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-1.2.2+5/tests/in/rpm415comment.spec new/spec-cleaner-1.2.3+1/tests/in/rpm415comment.spec --- old/spec-cleaner-1.2.2+5/tests/in/rpm415comment.spec 1970-01-01 01:00:00.000000000 +0100 +++ new/spec-cleaner-1.2.3+1/tests/in/rpm415comment.spec 2024-07-05 10:52:01.000000000 +0200 @@ -0,0 +1,43 @@ +# +# spec file for package specRPM_CREATION_NAME +# +# Copyright (c) specCURRENT_YEAR SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: test-rpm415-comment +Version: 1.0 +Release: 0 +Summary: Test rpm 4.15+ comment +License: MIT + +%dnl this is just a comment +%prep +%autosetup + +%build +%configure +%make_build + +%install +%make_install + +%post +%postun + +%files +%license COPYING +%doc ChangeLog README + +%changelog diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-1.2.2+5/tests/in/source_https.spec new/spec-cleaner-1.2.3+1/tests/in/source_https.spec --- old/spec-cleaner-1.2.2+5/tests/in/source_https.spec 1970-01-01 01:00:00.000000000 +0100 +++ new/spec-cleaner-1.2.3+1/tests/in/source_https.spec 2024-07-05 10:52:01.000000000 +0200 @@ -0,0 +1,24 @@ +%define tarname Python-%{version} +%define folderversion %{version} +Name: python311 +Version: 3.11.8 +Summary: Replace http with https if possible +License: GPL-2.0 +Source0: http://www.python.org/ftp/python/%{folderversion}/%{tarname}.tar.xz +Source1: http://www.python.org/ftp/python/%{folderversion}/%{tarname}.tar.xz.asc +Source3: http://google.com +Source4: https://google.com +Source5: www.google.com +Source6: google.com +# non existent +Source7: http://thishopefullydoesnexist.com +# Certificate +Source8: http://expired.badssl.com/ +Source9: http://wrong.host.badssl.com/ +Source10: http://null.badssl.com/ +# URL is FTP (issue#258) +Source11: ftp://ftp.null.badssl.com/ +Source12: ftp.null.badssl.com/ +# other prefix +Source13: abc://null.badssl.com/ +Source14: http://xavprods.free.fr/lzx diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-1.2.2+5/tests/out/mingw32-clutter.spec new/spec-cleaner-1.2.3+1/tests/out/mingw32-clutter.spec --- old/spec-cleaner-1.2.2+5/tests/out/mingw32-clutter.spec 2024-02-27 18:25:21.000000000 +0100 +++ new/spec-cleaner-1.2.3+1/tests/out/mingw32-clutter.spec 2024-07-05 10:52:01.000000000 +0200 @@ -25,7 +25,7 @@ # FIXME: use correct group or remove it, see "https://en.opensuse.org/openSUSE:Package_group_guidelines" Group: Development/Libraries URL: https://clutter-project.org/ -Source: http://www.clutter-project.org/sources/clutter/1.5/clutter-%{version}.tar.bz2 +Source: https://www.clutter-project.org/sources/clutter/1.5/clutter-%{version}.tar.bz2 Patch0: clutter-1.6.14-windows.patch Patch1: clutter-1.6.20-ldl.patch # Native version for glib-genmarshal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-1.2.2+5/tests/out/python-conditional-buildrequires.spec new/spec-cleaner-1.2.3+1/tests/out/python-conditional-buildrequires.spec --- old/spec-cleaner-1.2.2+5/tests/out/python-conditional-buildrequires.spec 1970-01-01 01:00:00.000000000 +0100 +++ new/spec-cleaner-1.2.3+1/tests/out/python-conditional-buildrequires.spec 2024-07-05 10:52:01.000000000 +0200 @@ -0,0 +1,14 @@ +BuildRequires: %{python_module tomli >= 1.2.2 if %python-base < 3.11} +Requires: %{oldpython}-base + +%install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%python_expand %fdupes %{buildroot}%{$python_sitearch} + + +%check +%python_expand PYTHONPATH=%{$python_sitearch} nosetests-%{$python_bin_suffix} +%python_expand testr-%{$python_version} +%{python_expand $python -m unittest discover} + +%changelog diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-1.2.2+5/tests/out/replace_pwdutils.spec new/spec-cleaner-1.2.3+1/tests/out/replace_pwdutils.spec --- old/spec-cleaner-1.2.2+5/tests/out/replace_pwdutils.spec 2024-02-27 18:25:21.000000000 +0100 +++ new/spec-cleaner-1.2.3+1/tests/out/replace_pwdutils.spec 2024-07-05 10:52:01.000000000 +0200 @@ -5,7 +5,7 @@ License: GPL-2.0-or-later Group: System/Daemons URL: https://ftp.debian.org/debian/pool/main/a/at -Source: http://ftp.debian.org/debian/pool/main/a/at/%{name}_%{version}.orig.tar.gz +Source: https://ftp.debian.org/debian/pool/main/a/at/%{name}_%{version}.orig.tar.gz BuildRequires: autoconf >= 2.69 BuildRequires: automake BuildRequires: pam-devel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-1.2.2+5/tests/out/rpm415comment.spec new/spec-cleaner-1.2.3+1/tests/out/rpm415comment.spec --- old/spec-cleaner-1.2.2+5/tests/out/rpm415comment.spec 1970-01-01 01:00:00.000000000 +0100 +++ new/spec-cleaner-1.2.3+1/tests/out/rpm415comment.spec 2024-07-05 10:52:01.000000000 +0200 @@ -0,0 +1,43 @@ +# +# spec file for package specRPM_CREATION_NAME +# +# Copyright (c) specCURRENT_YEAR SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: test-rpm415-comment +Version: 1.0 +Release: 0 +Summary: Test rpm 4.15+ comment +License: MIT +%dnl this is just a comment + +%prep +%autosetup + +%build +%configure +%make_build + +%install +%make_install + +%post +%postun + +%files +%license COPYING +%doc ChangeLog README + +%changelog diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-1.2.2+5/tests/out/source_https.spec new/spec-cleaner-1.2.3+1/tests/out/source_https.spec --- old/spec-cleaner-1.2.2+5/tests/out/source_https.spec 1970-01-01 01:00:00.000000000 +0100 +++ new/spec-cleaner-1.2.3+1/tests/out/source_https.spec 2024-07-05 10:52:01.000000000 +0200 @@ -0,0 +1,26 @@ +%define tarname Python-%{version} +%define folderversion %{version} +Name: python311 +Version: 3.11.8 +Summary: Replace http with https if possible +License: GPL-2.0-only +Source0: https://www.python.org/ftp/python/%{folderversion}/%{tarname}.tar.xz +Source1: https://www.python.org/ftp/python/%{folderversion}/%{tarname}.tar.xz.asc +Source3: https://google.com +Source4: https://google.com +Source5: www.google.com +Source6: google.com +# non existent +Source7: http://thishopefullydoesnexist.com +# Certificate +Source8: http://expired.badssl.com/ +Source9: http://wrong.host.badssl.com/ +Source10: http://null.badssl.com/ +# URL is FTP (issue#258) +Source11: ftp://ftp.null.badssl.com/ +Source12: ftp.null.badssl.com/ +# other prefix +Source13: abc://null.badssl.com/ +Source14: http://xavprods.free.fr/lzx + +%changelog ++++++ spec-cleaner.obsinfo ++++++ --- /var/tmp/diff_new_pack.bGt87F/_old 2024-07-08 19:09:32.057535712 +0200 +++ /var/tmp/diff_new_pack.bGt87F/_new 2024-07-08 19:09:32.061535858 +0200 @@ -1,5 +1,5 @@ name: spec-cleaner -version: 1.2.2+5 -mtime: 1709054721 -commit: 955cdcb1b9e6c72e216c4ae8a36662877dbb2f56 +version: 1.2.3+1 +mtime: 1720169521 +commit: bc35e1eb055ce06879f9c4c57b912c82f717a8e0