diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..faf7e5b --- /dev/null +++ b/.gitignore @@ -0,0 +1,34 @@ +/specfile-0.2.0.tar.gz +/specfile-0.3.0.tar.gz +/specfile-0.4.0.tar.gz +/specfile-0.5.0.tar.gz +/specfile-0.5.1.tar.gz +/specfile-0.6.0.tar.gz +/specfile-0.7.0.tar.gz +/specfile-0.20.2.tar.gz +/specfile-0.21.0.tar.gz +/specfile-0.22.1.tar.gz +/specfile-0.23.0.tar.gz +/specfile-0.24.0.tar.gz +/specfile-0.25.0.tar.gz +/specfile-0.27.0.tar.gz +/specfile-0.28.0.tar.gz +/specfile-0.28.3.tar.gz +/specfile-0.29.0.tar.gz +/specfile-0.30.0.tar.gz +/specfile-0.31.0.tar.gz +/specfile-0.32.0.tar.gz +/specfile-0.32.1.tar.gz +/specfile-0.32.2.tar.gz +/specfile-0.32.3.tar.gz +/specfile-0.32.5.tar.gz +/specfile-0.32.6.tar.gz +/specfile-0.33.0.tar.gz +/specfile-0.34.0.tar.gz +/specfile-0.34.1.tar.gz +/specfile-0.34.2.tar.gz +/specfile-0.35.0.tar.gz +/specfile-0.36.0.tar.gz +/specfile-0.37.0.tar.gz +/specfile-0.37.1.tar.gz +/specfile-0.38.0.tar.gz diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..c326264 --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,287 @@ +--- +packit_instances: ["prod", "stg"] + +upstream_project_url: https://github.com/packit/specfile +issue_repository: https://github.com/packit/specfile + +# PEP440 +prerelease_suffix_pattern: "([.\\-_]?)(a(lpha)?|b(eta)?|r?c|pre(view)?)([.\\-_]?\\d+)?" +prerelease_suffix_macro: prerelease + +copy_upstream_release_description: true + +packages: + specfile: &specfile + upstream_package_name: specfile + downstream_package_name: python-specfile + specfile_path: &specfile_path fedora/python-specfile.spec + files_to_sync: + - *specfile_path + - .packit.yaml + - src: plans/ + dest: plans/ + - src: .fmf/ + dest: .fmf/ + srpm_build_deps: + - python3-build + - python3-setuptools_scm + actions: &actions + pre-sync: + - python3 plans/git_reference.py + create-archive: + - python3 -m build --sdist --outdir ./fedora/ + - bash -c "ls -1t ./fedora/*.tar.gz | head -n 1" + get-current-version: python3 -m setuptools_scm + + specfile-epel8: + <<: *specfile + specfile_path: &specfile_path_epel8 epel8/python-specfile.spec + files_to_sync: + - *specfile_path_epel8 + - .packit.yaml + - src: plans/ + dest: plans/ + - src: .fmf/ + dest: .fmf/ + actions: + <<: *actions + create-archive: + - python3 setup.py sdist --dist-dir ./epel8/ + - bash -c "ls -1t ./epel8/*.tar.gz | head -n 1" + + specfile-epel10: + <<: *specfile + specfile_path: &specfile_path_epel10 epel10/python-specfile.spec + files_to_sync: + - *specfile_path_epel10 + - .packit.yaml + - src: plans/ + dest: plans/ + - src: .fmf/ + dest: .fmf/ + actions: + <<: *actions + create-archive: + - python3 setup.py sdist --dist-dir ./epel10/ + - bash -c "ls -1t ./epel10/*.tar.gz | head -n 1" + + # docs: https://gitlab.com/CentOS/Integration/packit-cbs/docs + specfile-centos-integration-sig: + <<: *specfile + specfile_path: &specfile_path_centos_sig centos-integration-sig/python-specfile.spec + files_to_sync: + - *specfile_path_centos_sig + - .packit.yaml + - src: plans/ + dest: plans/ + - src: .fmf/ + dest: .fmf/ + actions: + <<: *actions + create-archive: + - python3 -m build --sdist --outdir ./centos-integration-sig/ + - bash -c "ls -1t ./centos-integration-sig/*.tar.gz | head -n 1" + dist_git_base_url: https://gitlab.com + dist_git_namespace: CentOS/Integration/packit-cbs/rpms + sig: Integration/packit-cbs + pkg_tool: centpkg-sig + +jobs: + - &copr_build_pr + job: copr_build + trigger: pull_request + packages: [specfile] + targets: + - fedora-all + - fedora-all-aarch64 + - epel-9 + - <<: *copr_build_pr + packages: [specfile-epel8] + targets: + - epel-8 + - <<: *copr_build_pr + packages: [specfile-epel10] + targets: + - epel-10-all + + - &copr_build_commit_main + job: copr_build + trigger: commit + branch: main + packages: [specfile] + targets: + - fedora-all + - fedora-all-aarch64 + - epel-9 + project: packit-dev + list_on_homepage: True + preserve_project: True + - <<: *copr_build_commit_main + packages: [specfile-epel8] + targets: + - epel-8 + - <<: *copr_build_commit_main + packages: [specfile-epel10] + targets: + - epel-10-all + + - &copr_build_commit_stable + job: copr_build + trigger: commit + branch: stable + packages: [specfile] + targets: + - fedora-stable + - fedora-stable-aarch64 + project: packit-stable + list_on_homepage: True + preserve_project: True + + - &copr_build_release + job: copr_build + trigger: release + packages: [specfile] + targets: + - fedora-all + - fedora-all-aarch64 + - epel-9 + project: packit-releases + list_on_homepage: True + preserve_project: True + - <<: *copr_build_release + packages: [specfile-epel8] + targets: + - epel-8 + - <<: *copr_build_release + packages: [specfile-epel10] + targets: + - epel-10-all + + - &tests + job: tests + trigger: pull_request + packages: [specfile] + tmt_plan: "smoke|full|packit-integration" + targets: + - fedora-all + - epel-9 + - <<: *tests + identifier: performance + tmt_plan: performance + targets: + - fedora-rawhide + - <<: *tests + packages: [specfile-epel8] + tmt_plan: "smoke|full" + use_internal_tf: true + targets: + epel-8-x86_64: + distros: [RHEL-8.10.0-Nightly] + # enable EPEL + tf_extra_params: + environments: + - kickstart: + post-install: | + %post --log=/dev/console + set -x + dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm + %end + - <<: *tests + packages: [specfile-epel10] + tmt_plan: "smoke|full" + targets: + - epel-10-all + + - &propose_downstream + job: propose_downstream + trigger: release + packages: [specfile] + dist_git_branches: + rawhide: + fast_forward_merge_into: + - fedora-branched + - eln + epel-9: {} + - <<: *propose_downstream + packages: [specfile-epel8] + dist_git_branches: + - epel-8 + - <<: *propose_downstream + packages: [specfile-epel10] + dist_git_branches: + epel-10: + fast_forward_merge_into: + - epel-10-branched + - <<: *propose_downstream + packages: [specfile-centos-integration-sig] + dist_git_branches: + - c9-sig-integration + + - &pull_from_upstream + job: pull_from_upstream + trigger: release + packages: [specfile] + dist_git_branches: + rawhide: + fast_forward_merge_into: + - fedora-branched + - eln + epel-9: {} + - <<: *pull_from_upstream + packages: [specfile-epel8] + dist_git_branches: + - epel-8 + - <<: *pull_from_upstream + packages: [specfile-epel10] + dist_git_branches: + epel-10: + fast_forward_merge_into: + - epel-10-branched + - <<: *pull_from_upstream + packages: [specfile-centos-integration-sig] + dist_git_branches: + - c9-sig-integration + + - &koji_build + job: koji_build + trigger: commit + packages: [specfile] + packit_instances: ["stg"] + allowed_pr_authors: ["packit-stg", "packit"] + dist_git_branches: + - epel-9 + - <<: *koji_build + packages: [specfile-epel8] + dist_git_branches: + - epel-8 + - <<: *koji_build + packages: [specfile-epel10] + dist_git_branches: + - epel-10-all + - <<: *koji_build + packages: [specfile-centos-integration-sig] + dist_git_branches: + - c9-sig-integration + - <<: *koji_build + sidetag_group: packit-specfile-ogr-releases + dependents: + - packit + dist_git_branches: + - fedora-all + + - &bodhi_update + job: bodhi_update + trigger: commit + packages: [specfile] + packit_instances: ["stg"] + allowed_builders: ["packit-stg", "packit"] + dist_git_branches: + - epel-9 + - <<: *bodhi_update + packages: [specfile-epel8] + dist_git_branches: + - epel-8 + - <<: *bodhi_update + packages: [specfile-epel10] + dist_git_branches: + - epel-10-all 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 new file mode 100644 index 0000000..9bb65f0 --- /dev/null +++ b/README.packit @@ -0,0 +1,3 @@ +This repository is maintained by packit. +https://packit.dev/ +The file was generated using packit 1.13.0.post1.dev2+g84134016c. diff --git a/plans/full.fmf b/plans/full.fmf new file mode 100644 index 0000000..dc00841 --- /dev/null +++ b/plans/full.fmf @@ -0,0 +1,18 @@ +summary: + Unit & integration tests +discover+: + filter: tier:1 +adjust: + - when: "distro == rhel-8" + because: "only platform-python is installed on RHEL 8 by default" + prepare+: + - how: install + package: python3 + + - when: "distro == rhel-10 or distro == centos-10 or distro == centos-stream-10" + because: "flexmock is not in EPEL 10: https://bugzilla.redhat.com/show_bug.cgi?id=2351835" + prepare+: + - how: install + package: python3-pip + - how: shell + script: pip3 install flexmock diff --git a/plans/git_reference.py b/plans/git_reference.py new file mode 100644 index 0000000..fe4e906 --- /dev/null +++ b/plans/git_reference.py @@ -0,0 +1,32 @@ +#!/usr/bin/python + +# Copyright Contributors to the Packit project. +# SPDX-License-Identifier: MIT + +import subprocess +from pathlib import Path + +import fmf + +# Set discover of specfile tests to a fixed commit +tree_root = Path.cwd().absolute() +tree = fmf.Tree(tree_root) +main_node = tree.find("/plans") +with main_node as data: + data["discover"]["url"] = "https://github.com/packit/specfile.git" + data["discover"]["ref"] = ( + subprocess.check_output(["git", "rev-parse", "HEAD"]).decode().strip() + ) + + +# Set discover of packit integration tests to the current main +packit_node = tree.find("/plans/packit-integration") +with packit_node as data: + data["discover"]["ref"] = ( + subprocess.check_output( + ["git", "ls-remote", "https://github.com/packit/packit", "main"] + ) + .decode() + .strip() + .split()[0] + ) diff --git a/plans/main.fmf b/plans/main.fmf new file mode 100644 index 0000000..299f169 --- /dev/null +++ b/plans/main.fmf @@ -0,0 +1,6 @@ +discover: + how: fmf + url: https://github.com/packit/specfile.git + ref: a07560dd2609cf23add5deeadc103033611b7b22 +execute: + how: tmt diff --git a/plans/packit-integration.fmf b/plans/packit-integration.fmf new file mode 100644 index 0000000..2d0af65 --- /dev/null +++ b/plans/packit-integration.fmf @@ -0,0 +1,29 @@ +discover: + how: fmf + url: https://github.com/packit/packit + filter: tag:full + ref: 87042fcac49435dd55a1b989ed0c6ead290e703d +prepare: + - how: install + copr: packit/packit-dev + - how: shell + script: sed -i -n '/^priority=/!p;$apriority=5' + /etc/yum.repos.d/*:packit:packit-dev.repo +adjust: + - when: how == integration + because: provide latest python-specfile rpm when running locally + prepare+: + - name: python3-specfile rpm + how: install + directory: noarch/ + - when: distro == rhel-9 or distro == centos-9 or distro == centos-stream-9 + because: 'build and deepdiff are not in EPEL 9: https://bugzilla.redhat.com/show_bug.cgi?id=2120251' + prepare+: + - how: install + package: python3-pip + - how: shell + script: pip3 install build 'deepdiff < 8.0.0' + - when: | + distro == rhel-8 or distro == centos-8 or distro == centos-stream-8 or distro == rhel-9 or distro == centos-9 or distro == centos-stream-9 + because: packit doesn't support EL 8 + enabled: false diff --git a/plans/performance.fmf b/plans/performance.fmf new file mode 100644 index 0000000..341d17e --- /dev/null +++ b/plans/performance.fmf @@ -0,0 +1,15 @@ +summary: + Performance tests +discover+: + filter: tier:3 +prepare: + - how: install + package: python3-pip + - how: shell + script: pip3 install pytest-fail-slow + - how: shell + script: curl --output-dir /tmp -O https://src.fedoraproject.org/rpms/texlive/raw/rawhide/f/texlive.spec +adjust: + - when: "initiator != packit" + because: "skip this plan on dist-git pull requests" + enabled: false diff --git a/plans/smoke.fmf b/plans/smoke.fmf new file mode 100644 index 0000000..059ee80 --- /dev/null +++ b/plans/smoke.fmf @@ -0,0 +1,10 @@ +summary: + Basic smoke test +discover+: + filter: tier:0 +adjust: + - when: "distro == rhel-8" + because: "only platform-python is installed on RHEL 8 by default" + prepare+: + - how: install + package: python3 diff --git a/python-specfile.spec b/python-specfile.spec new file mode 100644 index 0000000..6d98331 --- /dev/null +++ b/python-specfile.spec @@ -0,0 +1,219 @@ +%global desc %{expand: +Python library for parsing and manipulating RPM spec files. +Main focus is on modifying existing spec files, any change should result +in a minimal diff.} + + +%global base_version 0.38.0 +#global prerelease rc1 + +%global package_version %{base_version}%{?prerelease:~%{prerelease}} +%global pypi_version %{base_version}%{?prerelease} + + +Name: python-specfile +Version: %{package_version} +Release: 1%{?dist} + +Summary: A library for parsing and manipulating RPM spec files +License: MIT +URL: https://github.com/packit/specfile + +Source0: %{pypi_source specfile %{pypi_version}} + +BuildArch: noarch + +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: %{py3_dist setuptools setuptools-scm} +BuildRequires: %{py3_dist importlib-metadata dataclasses rpm typing-extensions} +BuildRequires: %{py3_dist flexmock pytest} +BuildRequires: git-core + + +%description +%{desc} + + +%package -n python%{python3_pkgversion}-specfile +Summary: %{summary} + + +%description -n python%{python3_pkgversion}-specfile +%{desc} + + +%prep +%autosetup -p1 -n specfile-%{pypi_version} +# Remove bundled egg-info +rm -rf specfile.egg-info + + +%build +%py3_build + + +%install +%py3_install + + +%check +%pytest --verbose tests/unit tests/integration + + +%files -n python%{python3_pkgversion}-specfile +%license LICENSE +%doc README.md +%{python3_sitelib}/specfile +%{python3_sitelib}/specfile-%{version}-py%{python3_version}.egg-info + + +%changelog +* Thu Jan 08 2026 Packit - 0.38.0-1 +- A bug leading to incorrect EVR expansion has been fixed. (#492) +- Prevented side-effects during condition evaluation that could occur when expanding macros that manipulate other macros, leading to misinterpreted validity of condition branches. (#499) + +* Fri Oct 03 2025 Packit - 0.37.1-1 +- We have solved a FutureWarning in our codebase. (#485) + +* Fri Sep 05 2025 Packit - 0.37.0-1 +- Added support for Elbrus E2K CPU architectures. (#484) + +* Fri May 30 2025 Packit - 0.36.0-1 +- We have fixed a bug that caused specfile to traceback when section names with conditional macro expansions containing spaces were present in the spec file. (#476) + +* Sun Apr 13 2025 Packit - 0.35.0-1 +- Added support for creating Specfile instances from file objects and strings. (#458) +- The `context_management` type stubs now use `ParamSpec` from `typing_extensions` to support Python < 3.10. (#466) + +* Tue Mar 18 2025 Packit - 0.34.2-1 +- context_management: add a type stub override to fix typing. Type checkers like mypy and pyright can now correctly determine the types for `.sources()`, `.sections()`, and the other `Specfile` methods that return context managers. (#457) + +* Fri Feb 07 2025 Packit - 0.34.1-1 +- Removed the usage of a walrus operator for Python 3.6 compatibility. (#450) + +* 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) + For example, this will work properly even on spec files without `%%changelog`: + + ``` + with spec.sections() as sections: + changelog = sections.get_or_create("changelog") + changelog[:] = ["%%autochangelog"] + ``` +- Resolves: rhbz#2332288 + +* Thu Nov 14 2024 Packit - 0.32.6-1 +- New minor release for testing in CBS Koji +- Resolves: rhbz#2318011 + +* Sat Oct 26 2024 Packit - 0.32.5-1 +- We have fixed our parser to take in account the deprecations introduced in Python 3.8 (#420) + +* Mon Sep 30 2024 Packit - 0.32.3-1 +- specfile can now handle multi-line tag values (enclosed in a macro body, e.g. `%%shrink`). (#412) +- Resolves: rhbz#2299289 + +* Sun Sep 15 2024 Packit - 0.32.2-1 +- Explicitly invalidate the global parse hash when a SpecParser instance is created to prevent this issue. (#409) + +* Mon Jul 29 2024 Packit - 0.32.1-1 +- Fixed two issues related to condition parsing. (#405) + +* Mon Jul 22 2024 Packit - 0.32.0-1 +- It is now possible to bump a release in a manner similar to `rpmdev-bumpspec` using `Specfile.bump_release()` method. (#399) + +* Tue Jul 09 2024 Packit - 0.31.0-1 +- Value of a `Tag` no longer includes trailing whitespace (if any). (#393) +- specfile now tries to expand macros before processing conditions to be able to resolve conditional expressions defined by macros, for example OpenSUSE Tumbleweed defines `%%ifpython3` macro as `%%if "%%{python_flavor}" == "python3"`. (#394) +- Resolves: rhbz#2294393 + +* Wed Jun 26 2024 Packit - 0.30.0-1 +- Fixed an exception that occured when accessing the `Specfile.has_autochangelog` property while having unparseable lines (e.g. lines ending with unescaped `%`) in `%%changelog`. (#387) + +* Thu Jun 06 2024 Packit - 0.29.0-1 +- Improved compatibility with RPM 4.20 (alpha version is currently in Fedora Rawhide). (#380) + +* Thu May 23 2024 Packit - 0.28.3-1 +- Fixed several minor issues such as processing seemingly commented-out macro definitions (e.g. `#%%global prerel rc1`) and treating `SourceLicense` tag as a source. (#374, #376) +- Made `EVR`, `NEVR` and `NEVRA` objects comparable. (#379) + +* Sun Mar 17 2024 Packit - 0.28.0-1 +- A trailing newline is no longer added to spec files without one upon saving. (#353) + +* Fri Jan 19 2024 Packit - 0.27.0-1 +- Improved handling of commented-out macro definitions and fixed related logic in `Specfile.update_value()`. (#338) + +* Mon Nov 20 2023 Packit - 0.25.0-1 +- There is a new method, `Specfile.update_version()`, that allows updating spec file version even if it is a pre-release. (#317) + +* Mon Nov 06 2023 Packit - 0.24.0-1 +- Improved type annotations for `UserList` subclasses. (#299) +- Macro definitions gained a new `commented_out` property indicating that a macro definition is commented out. Another new property, `comment_out_style`, determines if it is achieved by using a `%%dnl` (discard next line) directive (e.g. `%%dnl %%global prerelease beta2`) or by replacing the starting `%` with `#` (e.g. `#global prerelease beta2`). (#298) + +* Mon Oct 30 2023 Packit - 0.23.0-1 +- Sources now have a `valid` property that indicates whether a source is valid in the current context, meaning it is not present in a false branch of any condition. (#295) + +* Fri Oct 06 2023 Packit - 0.22.1-1 +- Removed dependency on setuptools-scm-git-archive. (#290) + +* Fri Aug 11 2023 Nikola Forró - 0.21.0-1 +- `specfile` no longer tracebacks when some sources are missing and can't be _emulated_. In such case the spec file is parsed without them at the cost of `%%setup` and `%%patch` macros potentially expanding differently than with the sources present. (#271) +- Specfile's license in RPM spec file is now confirmed to be SPDX compatible. (#269) + +* Mon Jul 31 2023 Packit - 0.20.2-1 +- Fixed Packit config to work properly with `propose-downstream` and `pull-from-upstream` jobs. (#261) + +* Fri Oct 07 2022 Packit - 0.7.0-1 +- It is now possible to filter changelog entries by specifying lower bound EVR, upper bound EVR or both. (#104) +- Added support for filenames specified in source URL fragments, for example: `https://example.com/foo/1.0/download.cgi#/%{name}-%{version}.tar.gz` (#100) + +* Thu Aug 25 2022 Packit - 0.6.0-1 +- Switched to our own implementation of working with `%changelog` timestamps and removed dependency on arrow (#88) +- Fixed requires of EPEL 8 rpm (#86) + +* Wed Aug 10 2022 Packit - 0.5.1-1 +- Added new `%conf` section (#74) +- Switched to rpm-py-installer (#75) +- Fixed detecting extended timestamp format in `%changelog` (#77, #81) + +* Fri Jul 22 2022 Packit - 0.5.0-1 +- Strict optional typing is now enforced (#68) +- Fixed deduplication of tag names (#69) +- Sources and patches can now be removed by number (#69) +- Number of digits in a source number is now expressed the same way as packit does it (#69) +- Empty lines are now compressed when deleting tags (#69) +- Added convenience property for getting texts of tag comments (#69) +- Added convenience method for adding a patch (#69) + +* Tue Jun 21 2022 Packit - 0.4.0-1 +- Added convenience properties for most used tags (#63) +- Hardened linting by ignoring only specific mypy errors (#64) +- Fixed list of valid tag names and ensured newly added tags are not part of a condition block (#66) +- Initial patch number and its default number of digits are now honored (#66) +- Fixed a bug in `%prep` macro stringification (#67) + +* Mon May 16 2022 Packit - 0.3.0-1 +- Made `Sources` a `MutableSequence` (#36) +- Started using consistent terminology for source numbers and added the option to insert a source with a specific number (#47) +- Added support for implicit source numbering (#48) +- Documented sources and `%prep` macros in README (#49) +- Implemented high-level manipulation of version and release (#54) +- Added support for `* Mon May 16 2022 John Doe - 0.3.0-1.fc35 +- local build` (#56) +- Added `remote` property to sources and enabled addition of `Sources` (#59) +- Implemented mid-level manipulation of `%prep` section, including modification of `%prep` macros (#37, #52) + + +* Wed Mar 30 2022 Nikola Forró - 0.2.0-1 +- New upstream release 0.2.0 + +* Mon Feb 21 2022 Nikola Forró - 0.1.1-1 +- New upstream release 0.1.1 + +* Tue Feb 08 2022 Nikola Forró - 0.1.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..46cc24d --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (specfile-0.38.0.tar.gz) = bfd60434b868fd191fb68d5b2fa319db45df80397b6c1000a63d9fe947e998a8a86fcf6a76c0ae9b6ef3321d2b04d4dd9bc565a610bfb117faa64180342fda4d