Compare commits

...
Sign in to create a new pull request.

19 commits

Author SHA1 Message Date
Packit
71ef7efb67 Update to 0.28.2 upstream release
- Resolves: rhbz#2271583

Upstream tag: 0.28.2
Upstream commit: 904cb3b5

Commit authored by Packit automation (https://packit.dev/)
2024-04-08 13:58:23 +00:00
Packit
44b65b1304 [packit] 0.28.1 upstream release
Upstream tag: 0.28.1
Upstream commit: a14e6887
2024-03-26 11:35:36 +00:00
Packit
bb1f799d2b [packit] 0.28.0 upstream release
Upstream tag: 0.28.0
Upstream commit: cdf06f20
2024-03-17 15:08:11 +00:00
Packit
bd9bac6f25 [packit] 0.27.0 upstream release
Upstream tag: 0.27.0
Upstream commit: 1789f9c6
2024-01-19 13:31:18 +00:00
Packit
56da256f33 [packit] 0.25.0 upstream release
Upstream tag: 0.25.0
Upstream commit: 78f50b4a
2023-11-20 15:02:37 +00:00
Packit
bc530e4137 [packit] 0.24.0 upstream release
Upstream tag: 0.24.0
Upstream commit: 2efbd9ce
2023-11-06 17:18:35 +00:00
Packit
31bb26e89e [packit] 0.23.0 upstream release
Upstream tag: 0.23.0
Upstream commit: 0e110df4
2023-10-30 09:15:38 +00:00
Packit
e7faa88397 [packit] 0.22.1 upstream release
Upstream tag: 0.22.1
Upstream commit: 0af08c92
2023-10-06 13:14:10 +00:00
Packit
db06a70091 [packit] 0.22.0 upstream release
Upstream tag: 0.22.0
Upstream commit: e49e5e3f

If you need to do any change in this pull request, you need to locally fetch the source branch of it and push it (with a fix) to your fork (as it is not possible to push to the branch created in the Packit’s fork):
```
git fetch https://src.fedoraproject.org/forks/packit-stg/rpms/python-specfile.git refs/heads/*:refs/remotes/packit-stg/*
git checkout packit-stg/0.22.0-f38-update-propose_downstream
```
2023-09-01 13:39:03 +00:00
8ea47f1e69 [packit] 0.21.0 upstream release
Upstream tag: 0.21.0
Upstream commit: 56360c0a
2023-08-11 15:27:18 +02:00
Matej Focko
1c13ec16c9
chore: be explicit about GPG keys in Packit config
Signed-off-by: Matej Focko <mfocko@redhat.com>
(cherry picked from commit 4c376af84d)
2023-08-11 14:45:49 +02:00
Matej Focko
29a303395c
chore: add GitHub's GPG key to Packit config
Signed-off-by: Matej Focko <mfocko@redhat.com>
(cherry picked from commit c90a1932f9)
2023-08-11 14:29:07 +02:00
Packit
365bc4056b [packit] 0.20.2 upstream release
Upstream tag: 0.20.2
Upstream commit: 4486a88c

If you need to do any change in this pull request, you need to locally fetch the source branch of it and push it (with a fix) to your fork (as it is not possible to push to the branch created in the Packit’s fork):
```
git fetch https://src.fedoraproject.org/forks/packit/rpms/python-specfile.git refs/heads/*:refs/remotes/packit/*
git checkout packit/0.20.2-f38-update-propose_downstream
```
2023-07-31 13:16:45 +00:00
Packit
fded3c8ccb [packit] 0.20.0 upstream release
Upstream tag: 0.20.0
Upstream commit: 8aae0b14
2023-07-13 15:28:12 +00:00
Packit
f0782210a4 [packit] 0.19.0 upstream release
Upstream tag: 0.19.0
Upstream commit: bad19f0c
2023-06-22 13:08:25 +00:00
Packit
31f5e40c99 [packit] 0.18.0 upstream release
Upstream tag: 0.18.0
Upstream commit: e5615bf6
2023-05-26 09:56:40 +00:00
Packit
089f55f945 [packit] 0.17.0 upstream release
Upstream tag: 0.17.0
Upstream commit: bc4fbbdd
2023-05-11 09:48:48 +00:00
Packit
38f4fb6472 [packit] 0.16.0 upstream release
Upstream tag: 0.16.0
Upstream commit: 15be0aba
2023-04-20 17:05:06 +00:00
Packit
7d76455977 [packit] 0.15.0 upstream release
Upstream tag: 0.15.0
Upstream commit: efb94f1d

Signed-off-by: Packit <hello@packit.dev>
2023-03-10 11:23:44 +00:00
9 changed files with 239 additions and 72 deletions

View file

@ -1,111 +1,192 @@
---
# We want to use both instances for all upstream jobs including the `propose-downstream` one.
# For downstream, we need to pick just one instance (`stg` in our case)
# and redefine it for the `koji_build` and `bodhi_update` jobs.
packit_instances: ["prod", "stg"]
specfile_path: fedora/python-specfile.spec
# add or remove files that should be synced
files_to_sync:
- fedora/python-specfile.spec
- .packit.yaml
- src: plans/
dest: plans/
- src: .fmf/
dest: .fmf/
# name in upstream package repository or registry (e.g. in PyPI)
upstream_package_name: specfile
# downstream (Fedora) RPM package name
downstream_package_name: python-specfile
copy_upstream_release_description: true
upstream_project_url: https://github.com/packit/specfile
issue_repository: https://github.com/packit/specfile
actions:
# we need this b/c `git archive` doesn't put all the metadata in the tarball:
# LookupError: setuptools-scm was unable to detect version for '/builddir/build/BUILD/ogr-0.11.1'.
# Make sure you're either building from a fully intact git repository or PyPI tarballs.
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
pre-sync:
# FMF has to be installed on system where you are calling this tool.
- python3 plans/git_reference.py
# PEP440
prerelease_suffix_pattern: "([.\\-_]?)(a(lpha)?|b(eta)?|r?c|pre(view)?)([.\\-_]?\\d+)?"
prerelease_suffix_macro: prerelease
srpm_build_deps:
- python3-build
- python3-setuptools_scm
copy_upstream_release_description: true
packages:
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:
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:
upstream_package_name: specfile
downstream_package_name: python-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/
srpm_build_deps:
- python3-setuptools_scm
actions:
pre-sync:
- python3 plans/git_reference.py
create-archive:
- python3 setup.py sdist --dist-dir ./epel8/
- bash -c "ls -1t ./epel8/*.tar.gz | head -n 1"
get-current-version: python3 setup.py --version
jobs:
- job: propose_downstream
trigger: release
dist_git_branches:
- fedora-all
- epel-9
- job: copr_build
trigger: pull_request
packages: [specfile]
targets:
- fedora-all
- epel-9
- job: tests
- job: copr_build
trigger: pull_request
packages: [specfile-epel8]
targets:
- fedora-all
- epel-9
- epel-8
- job: copr_build
trigger: commit
branch: main
packages: [specfile]
targets:
- fedora-all
- epel-9
project: packit-dev
list_on_homepage: True
preserve_project: True
- job: copr_build
trigger: commit
branch: main
packages: [specfile-epel8]
targets:
- epel-8
project: packit-dev
list_on_homepage: True
preserve_project: True
- job: copr_build
trigger: commit
branch: stable
packages: [specfile]
targets:
- fedora-stable
- epel-9
project: packit-stable
list_on_homepage: True
preserve_project: True
- job: copr_build
trigger: commit
branch: stable
packages: [specfile-epel8]
targets:
- epel-8
project: packit-stable
list_on_homepage: True
preserve_project: True
- job: copr_build
trigger: release
packages: [specfile]
targets:
- fedora-all
- epel-9
project: packit-releases
list_on_homepage: True
preserve_project: True
- job: pull_from_upstream
- job: copr_build
trigger: release
packages: [specfile-epel8]
targets:
- epel-8
project: packit-releases
list_on_homepage: True
preserve_project: True
- job: tests
trigger: pull_request
packages: [specfile]
tmt_plan: "smoke|full|packit-integration"
targets:
- fedora-all
- epel-9
- job: tests
trigger: pull_request
packages: [specfile-epel8]
tmt_plan: "smoke|full"
targets:
- epel-8
- job: tests
trigger: pull_request
packages: [specfile]
identifier: performance
tmt_plan: performance
targets:
- fedora-rawhide
- job: propose_downstream
trigger: release
packages: [specfile]
dist_git_branches:
- fedora-all
- epel-9
- job: propose_downstream
trigger: release
packages: [specfile-epel8]
dist_git_branches:
- epel-8
- job: pull_from_upstream
trigger: release
packages: [specfile]
dist_git_branches:
- fedora-all
- epel-9
- job: pull_from_upstream
trigger: release
packages: [specfile-epel8]
dist_git_branches:
- epel-8
# downstream automation:
- job: koji_build
trigger: commit
packages: [specfile]
packit_instances: ["stg"]
allowed_pr_authors: ["packit-stg", "packit"]
dist_git_branches:
- fedora-all
- epel-9
- epel-8
- job: bodhi_update
trigger: commit
packages: [specfile]
packit_instances: ["stg"]
allowed_builders: ["packit-stg", "packit"]
dist_git_branches:
- fedora-branched # rawhide updates are created automatically
- epel-9
- epel-8

View file

@ -1,3 +1,3 @@
This repository is maintained by packit.
https://packit.dev/
The file was generated using packit 0.68.0.post11+gf18369e.
The file was generated using packit 0.94.1.post1.dev6+g1c8e91f7.

View file

@ -2,11 +2,3 @@ summary:
Unit & integration tests
discover+:
filter: tier:1
adjust:
- when: "distro == rhel-9 or distro == centos-9 or distro == centos-stream-9"
because: "flexmock is not in EPEL 9: https://bugzilla.redhat.com/show_bug.cgi?id=2120251"
prepare:
- how: install
package: python3-pip
- how: shell
script: pip3 install flexmock

View file

@ -1,5 +1,8 @@
#!/usr/bin/python
# Copyright Contributors to the Packit project.
# SPDX-License-Identifier: MIT
import subprocess
from pathlib import Path

View file

@ -1,6 +1,6 @@
discover:
how: fmf
url: https://github.com/packit/specfile.git
ref: 78e2e8b30abd9e67e934f87c2aac0854f5a4b204
ref: 904cb3b5c7fa9a03ab442c81c14cd443bbe0c841
execute:
how: tmt

View file

@ -2,7 +2,12 @@ discover:
how: fmf
url: https://github.com/packit/packit
filter: tier:0 | tier:1
ref: f18369ebcfbf9207f771fb1e9ec8e6c4b4467318
ref: f760ddec7887881115001a79235034e0ad5496d1
prepare:
- how: install
copr: packit/packit-dev
- how: shell
script: dnf -y config-manager --save --setopt="*:packit:packit-dev.priority=5"
adjust:
- when: how == integration
because: provide latest python-specfile rpm when running locally
@ -11,9 +16,12 @@ adjust:
how: install
directory: noarch/
- when: distro == rhel-9 or distro == centos-9 or distro == centos-stream-9
because: 'flexmock and deepdiff are not in EPEL 9: https://bugzilla.redhat.com/show_bug.cgi?id=2120251'
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 flexmock deepdiff
script: pip3 install build deepdiff
- when: distro == rhel-8 or distro == centos-8 or distro == centos-stream-8
because: packit doesn't support EL 8
enabled: false

15
plans/performance.fmf Normal file
View file

@ -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

View file

@ -1,9 +1,4 @@
%if 0%{?rhel} == 9
# RHEL 9 is missing python-flexmock
%bcond_with tests
%else
%bcond_without tests
%endif
%global desc %{expand:
@ -12,19 +7,30 @@ Main focus is on modifying existing spec files, any change should result
in a minimal diff.}
%global base_version 0.28.2
#global prerelease rc1
%global package_version %{base_version}%{?prerelease:~%{prerelease}}
%global pypi_version %{base_version}%{?prerelease}
Name: python-specfile
Version: 0.14.0
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}
Source0: %{pypi_source specfile %{pypi_version}}
BuildArch: noarch
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python3-devel
%if %{with tests}
# tests/unit/test_guess_packager.py
BuildRequires: git-core
%endif
%description
@ -40,7 +46,11 @@ Summary: %{summary}
%prep
%autosetup -p1 -n specfile-%{version}
%autosetup -p1 -n specfile-%{pypi_version}
# since we are building from PyPI source, we don't need git-archive
# support in setuptools_scm
sed -i 's/setuptools_scm\[toml\]>=7/setuptools_scm[toml]/' pyproject.toml
%generate_buildrequires
@ -58,7 +68,7 @@ Summary: %{summary}
%if %{with tests}
%check
%pytest
%pytest --verbose tests/unit tests/integration
%endif
@ -67,6 +77,64 @@ Summary: %{summary}
%changelog
* Mon Apr 08 2024 Packit <hello@packit.dev> - 0.28.2-1
- Handling of trailing newlines in the macro defintions has been improved. (#361)
- Resolves: rhbz#2271583
* Tue Mar 26 2024 Packit <hello@packit.dev> - 0.28.1-1
- We have fixed an issue in `%%prep` section processing. For instance, if the `%%patches` macro appeared there, it would have been converted to `%%patch es`, causing failure when executing `%%prep` later. (#356)
* Sun Mar 17 2024 Packit <hello@packit.dev> - 0.28.0-1
- A trailing newline is no longer added to spec files without one upon saving. (#353)
* Fri Jan 19 2024 Packit <hello@packit.dev> - 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 <hello@packit.dev> - 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 <hello@packit.dev> - 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 <hello@packit.dev> - 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 <hello@packit.dev> - 0.22.1-1
- Removed dependency on setuptools-scm-git-archive. (#290)
* Fri Sep 01 2023 Packit <hello@packit.dev> - 0.22.0-1
- Macro definitions and tags gained a new `valid` attribute. A macro definition/tag is considered valid if it doesn't appear in a false branch of any condition appearing in the spec file. (#276)
* Fri Aug 11 2023 Nikola Forró <nforro@redhat.com> - 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 <hello@packit.dev> - 0.20.2-1
- Fixed Packit config to work properly with `propose-downstream` and `pull-from-upstream` jobs. (#261)
* Thu Jul 13 2023 Packit <hello@packit.dev> - 0.20.0-1
- Fixed infinite loop when removing macros with `%` in the name. (#244)
- Added a possibility to undefine system macros by setting a macro value to `None` in the `macros` argument of the `Specfile` constructor. (#244)
- Fixed a bug in processing options of `%%prep` macros. For instance, when a quoted string appeared inside an expression expansion, it could lead to improper parsing, rendering the spec file invalid after accessing the options. (#253)
* Thu Jun 22 2023 Packit <hello@packit.dev> - 0.19.0-1
- Parsing has been optimized so that even spec files with hundreds of thousands of lines can be processed in reasonable time. (#240)
* Fri May 26 2023 Packit <hello@packit.dev> - 0.18.0-1
- Specfile library now handles multiple `%%changelog` sections. (#230)
* Thu May 11 2023 Packit <hello@packit.dev> - 0.17.0-1
- Added a new `guess_packager()` function that uses similar heuristics as `rpmdev-packager`, meaning that the `Specfile.add_changelog_entry()` method no longer requires `rpmdev-packager` to guess the changelog entry author. (#220)
- The `Specfile.add_changelog_entry()` method now uses dates based on UTC instead of the local timezone. (#223)
* Thu Apr 20 2023 Packit <hello@packit.dev> - 0.16.0-1
- Added `Specfile.has_autorelease` property to detect if a spec file uses the `%%autorelease` macro. (#221)
* Fri Mar 10 2023 Packit <hello@packit.dev> - 0.15.0-1
- Parsing the spec file by RPM is now performed only if really necessary, greatly improving performance in certain scenarios. (#212)
- Checked that license is a valid SPDX license.
* Thu Feb 23 2023 Packit <hello@packit.dev> - 0.14.0-1
- Fixed a bug that broke parsing in case spec file contained conditionalized macro definitions or similar constructs. (#209)
- Specfile no longer depends on rpm-py-installer, it now depends directly on rpm. (#207)

View file

@ -1 +1 @@
SHA512 (specfile-0.14.0.tar.gz) = 4e9a34d77f3d6eb5704253607bb5c3afeb66b0a2224ad76762dbd9c8de6ef2b9aacb581258323456861ee348ed1251b8b93aa485c79d0de67407c74ae12bfd9f
SHA512 (specfile-0.28.2.tar.gz) = 3478cd95445cd4131cbb5f2f5673884f72d8cdc72543de8179875e3861796475f0d6fe74aa334185877a28f299eb385e3b970e72249cbec1fbff47316fe122e5