diff --git a/.gitignore b/.gitignore index 0aa76d9..101480f 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ /specfile-0.32.5.tar.gz /specfile-0.32.6.tar.gz /specfile-0.33.0.tar.gz +/specfile-0.34.0.tar.gz diff --git a/.packit.yaml b/.packit.yaml index f0e2f41..a4c3316 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -55,9 +55,9 @@ packages: - python3 -m build --sdist --outdir ./fedora/ - bash -c "ls -1t ./centos-integration-sig/*.tar.gz | head -n 1" get-current-version: python3 -m setuptools_scm - dist_git_base_url: https://gitlab.com # this is not taken into account by centpkg-sig yet! - dist_git_namespace: CentOS/Integration/packit-cbs/rpms # this is not taken into account by centpkg-sig yet! - #sig: Integration/packit-cbs # this is not taken into account by centpkg-sig yet! + dist_git_base_url: https://gitlab.com + dist_git_namespace: CentOS/Integration/packit-cbs/rpms + sig: Integration/packit-cbs pkg_tool: centpkg-sig specfile-epel8: diff --git a/6d1890a69ab0bc7f119a9a9c8a21a03601c48ea2.patch b/6d1890a69ab0bc7f119a9a9c8a21a03601c48ea2.patch new file mode 100644 index 0000000..7a8ee75 --- /dev/null +++ b/6d1890a69ab0bc7f119a9a9c8a21a03601c48ea2.patch @@ -0,0 +1,160 @@ +From 29574b3e7d1a314e0242e3e160a0b1b7c7e6287e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 28 Jan 2025 15:19:39 +0100 +Subject: [PATCH] Remove the walrus operator for Python 3.6 compatibility +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Nikola Forró +--- + tests/unit/test_changelog.py | 94 ++++++++++++++++++++---------------- + 1 file changed, 52 insertions(+), 42 deletions(-) + +diff --git a/tests/unit/test_changelog.py b/tests/unit/test_changelog.py +index 6691381..ba74dc4 100644 +--- a/tests/unit/test_changelog.py ++++ b/tests/unit/test_changelog.py +@@ -257,47 +257,35 @@ def test_suse_style_changelog_parse(): + "changelog", + data=[ + "-------------------------------------------------------------------", +- ( +- hdr1 := "Tue Dec 17 14:21:37 UTC 2024 - " +- + (dc := "Dan Čermák ") +- ), ++ "Tue Dec 17 14:21:37 UTC 2024 - Dan Čermák ", + "", +- (content1 := "- First version"), ++ "- First version", + "", + "-------------------------------------------------------------------", +- (hdr2 := f"Mon Nov 4 17:47:23 UTC 2024 - {dc}"), ++ "Mon Nov 4 17:47:23 UTC 2024 - Dan Čermák ", + "", +- (content2 := "- # [0.9.37] - September 4th, 2024"), ++ "- # [0.9.37] - September 4th, 2024", + "", + "-------------------------------------------------------------------", +- ( +- hdr3 := "Fri May 17 09:14:20 UTC 2024 - " +- + "Dominique Leuenberger " +- ), ++ "Fri May 17 09:14:20 UTC 2024 - Dominique Leuenberger ", + "", +- (content3 := "- Use %patch -P N instead of deprecated %patchN syntax."), ++ "- Use %patch -P N instead of deprecated %patchN syntax.", + "", + "-------------------------------------------------------------------", +- ( +- hdr4 := "Mon Oct 10 13:27:24 UTC 2022 - Stephan Kulow " +- ), ++ "Mon Oct 10 13:27:24 UTC 2022 - Stephan Kulow ", + "", +- (content4_1 := "updated to version 0.9.28"), +- (content4_2 := " see installed CHANGELOG.md"), ++ "updated to version 0.9.28", ++ " see installed CHANGELOG.md", + "", + "", + "-------------------------------------------------------------------", +- ( +- hdr5 := "Fri Jun 25 07:31:34 UTC 2021 - Dan Čermák " +- ), ++ "Fri Jun 25 07:31:34 UTC 2021 - Dan Čermák ", + "", +- (content5_1 := "- New upstream release 0.9.26"), ++ "- New upstream release 0.9.26", + "", +- (content5_2 := " - Add support for Ruby 3.0 and fix tests"), +- ( +- content5_3 := " - Fix support for `frozen_string_literal: false`" +- + " magic comments (#1363)" +- ), ++ " - Add support for Ruby 3.0 and fix tests", ++ " - Fix support for `frozen_string_literal: false`" ++ " magic comments (#1363)", + "", + "", + ], +@@ -309,14 +297,28 @@ def test_suse_style_changelog_parse(): + + for changelog_entry, hdr, content in zip( + changelog, +- reversed((hdr1, hdr2, hdr3, hdr4, hdr5)), + reversed( + ( +- [content1], +- [content2], +- [content3], +- [content4_1, content4_2], +- [content5_1, "", content5_2, content5_3], ++ "Tue Dec 17 14:21:37 UTC 2024 - Dan Čermák ", ++ "Mon Nov 4 17:47:23 UTC 2024 - Dan Čermák ", ++ "Fri May 17 09:14:20 UTC 2024 - Dominique Leuenberger ", ++ "Mon Oct 10 13:27:24 UTC 2022 - Stephan Kulow ", ++ "Fri Jun 25 07:31:34 UTC 2021 - Dan Čermák ", ++ ) ++ ), ++ reversed( ++ ( ++ ["- First version"], ++ ["- # [0.9.37] - September 4th, 2024"], ++ ["- Use %patch -P N instead of deprecated %patchN syntax."], ++ ["updated to version 0.9.28", " see installed CHANGELOG.md"], ++ [ ++ "- New upstream release 0.9.26", ++ "", ++ " - Add support for Ruby 3.0 and fix tests", ++ " - Fix support for `frozen_string_literal: false`" ++ " magic comments (#1363)", ++ ], + ) + ), + ): +@@ -336,27 +338,35 @@ def test_suse_style_changelog_parse(): + ( + datetime.datetime(2021, 6, 25, 7, 31, 34), + "Dan Čermák ", +- content_1 := ["", "New upstream release 0.9.26"], ++ ["", "New upstream release 0.9.26"], + ChangelogEntry( +- header=_OPENSUSE_CHANGELOG_SEPARATOR +- + "\n" +- + "Fri Jun 25 07:31:34 UTC 2021 - Dan Čermák ", +- content=content_1, ++ header=( ++ _OPENSUSE_CHANGELOG_SEPARATOR ++ + "\n" ++ + "Fri Jun 25 07:31:34 UTC 2021 - Dan Čermák " ++ ), ++ content=["", "New upstream release 0.9.26"], + ), + ), + ( + datetime.date(2021, 6, 25), + "Dan Čermák ", +- content_2 := [ ++ [ + "", + "New upstream release 0.26", + "Fixed a major regression in Foo", + ], + ChangelogEntry( +- header=_OPENSUSE_CHANGELOG_SEPARATOR +- + "\n" +- + "Fri Jun 25 12:00:00 UTC 2021 - Dan Čermák ", +- content=content_2, ++ header=( ++ _OPENSUSE_CHANGELOG_SEPARATOR ++ + "\n" ++ + "Fri Jun 25 12:00:00 UTC 2021 - Dan Čermák " ++ ), ++ content=[ ++ "", ++ "New upstream release 0.26", ++ "Fixed a major regression in Foo", ++ ], + ), + ), + ] diff --git a/README.packit b/README.packit index 1da7848..cb66358 100644 --- a/README.packit +++ b/README.packit @@ -1,3 +1,3 @@ This repository is maintained by packit. https://packit.dev/ -The file was generated using packit 0.105.0.post1.dev12+gf83936a0. +The file was generated using packit 1.0.0.post1.dev4+g9467df56. diff --git a/plans/main.fmf b/plans/main.fmf index 97b940c..a704dc2 100644 --- a/plans/main.fmf +++ b/plans/main.fmf @@ -1,6 +1,6 @@ discover: how: fmf url: https://github.com/packit/specfile.git - ref: c0a98a85d9e43f59447248bb7f5258c2406ce9f1 + ref: 84d6f3b4883a296d2498edae8c7680717913d606 execute: how: tmt diff --git a/plans/packit-integration.fmf b/plans/packit-integration.fmf index eaaa775..2cf50c3 100644 --- a/plans/packit-integration.fmf +++ b/plans/packit-integration.fmf @@ -2,7 +2,7 @@ discover: how: fmf url: https://github.com/packit/packit filter: tier:0 | tier:1 - ref: e5b3d8c94ec79aa9cc5e1fa8dd7d0aabc1dcfbf4 + ref: 809a89b439f8772db18da1697ffa3ee40fe41c15 prepare: - how: install copr: packit/packit-dev diff --git a/python-specfile.spec b/python-specfile.spec index edf1109..eb6f635 100644 --- a/python-specfile.spec +++ b/python-specfile.spec @@ -4,7 +4,7 @@ Main focus is on modifying existing spec files, any change should result in a minimal diff.} -%global base_version 0.33.0 +%global base_version 0.34.0 #global prerelease rc1 %global package_version %{base_version}%{?prerelease:~%{prerelease}} @@ -21,6 +21,9 @@ URL: https://github.com/packit/specfile Source0: %{pypi_source specfile %{pypi_version}} +# https://github.com/packit/specfile/pull/450 +Patch: https://github.com/packit/specfile/commit/6d1890a69ab0bc7f119a9a9c8a21a03601c48ea2.patch + BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel @@ -68,6 +71,10 @@ rm -rf specfile.egg-info %changelog +* Mon Jan 27 2025 Packit - 0.34.0-1 +- Added support for detached (open)SUSE style changelogs (#444) +- Resolves: rhbz#2342178 + * Mon Dec 16 2024 Packit - 0.33.0-1 - There is a new convenience method `Sections.get_or_create()` that allows you to manipulate a section without checking if it exists first. If a section doesn't exist, it will be appended to the end. (#441) diff --git a/sources b/sources index f861749..cb8b3f9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (specfile-0.33.0.tar.gz) = 0df6eb5b464997f073950126333c71c1d501c066b4349fc3b556d5da5722f450548fbdc94b610c3990c8c66ba80b356e1594ecd5c823a8b0c4945d1e55c11cb6 +SHA512 (specfile-0.34.0.tar.gz) = fa2661507b72695c58da97686879167712f02f3df9a8940acba1e11b924da68171ed0eeddf73a03f472e2319f0402dca13eb5ee0126f8b1b992d17de507297c3