Compare commits

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

12 commits

Author SHA1 Message Date
Packit
ffa049a037 [packit] 0.11.0 upstream release
Upstream tag: 0.11.0
Upstream commit: ad039af9

Signed-off-by: Packit <hello@packit.dev>
2022-12-09 14:20:55 +00:00
Packit
fb44fab2f2 [packit] 0.10.0 upstream release
Upstream tag: 0.10.0
Upstream commit: daf36bc3

Signed-off-by: Packit <hello@packit.dev>
2022-11-30 11:32:49 +00:00
Packit
501180d968 [packit] 0.9.1 upstream release
Upstream tag: 0.9.1
Upstream commit: 11b91ccc

Signed-off-by: Packit <hello@packit.dev>
2022-11-12 14:38:58 +00:00
Packit
aa22dd0d10 [packit] 0.9.0 upstream release
Upstream tag: 0.9.0
Upstream commit: 6b6cbeae

Signed-off-by: Packit <hello@packit.dev>
2022-10-25 17:29:31 +00:00
Packit
d7ec1411ef [packit] 0.8.0 upstream release
Upstream tag: 0.8.0
Upstream commit: a3262621

Signed-off-by: Packit <hello@packit.dev>
2022-10-14 11:37:02 +00:00
Packit
2d036948fd [packit] 0.7.0 upstream release
Upstream tag: 0.7.0
Upstream commit: e121363b

Signed-off-by: Packit <hello@packit.dev>
2022-10-07 14:32:47 +00:00
Packit
e2204ae52d [packit] 0.6.0 upstream release
Upstream tag: 0.6.0
Upstream commit: 8b0a6cc4

Signed-off-by: Packit <hello@packit.dev>
2022-08-25 13:16:07 +00:00
Packit
f3ab3a9a9c [packit] 0.5.1 upstream release
Upstream tag: 0.5.1
Upstream commit: a03b8972

Signed-off-by: Packit <hello@packit.dev>
2022-08-10 09:52:59 +00:00
Packit
2d91730c3c [packit] 0.5.0 upstream release
Upstream tag: 0.5.0
Upstream commit: e4f80e56

Signed-off-by: Packit <hello@packit.dev>
2022-07-22 08:04:17 +00:00
Packit
6910fdffbb [packit] 0.4.0 upstream release
Upstream tag: 0.4.0
Upstream commit: d3b97670

Signed-off-by: Packit <hello@packit.dev>
2022-06-21 13:33:23 +00:00
Packit
e7445ef7f9 [packit] 0.3.0 upstream release
Upstream tag: 0.3.0
Upstream commit: df62e212

Signed-off-by: Packit <hello@packit.dev>
2022-05-16 12:14:30 +00:00
Packit
382a68f50c [packit] 0.2.0 upstream release
Upstream tag: 0.2.0
Upstream commit: a15b0918

Signed-off-by: Packit <hello@packit.dev>
2022-03-31 10:07:23 +00:00
9 changed files with 242 additions and 7 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

111
.packit.yaml Normal file
View file

@ -0,0 +1,111 @@
---
# 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 setup.py sdist --dist-dir ./fedora/
- bash -c "ls -1t ./fedora/*.tar.gz | head -n 1"
get-current-version: python3 setup.py --version
pre-sync:
# FMF has to be installed on system where you are calling this tool.
- python3 plans/git_reference.py
srpm_build_deps:
- python3-pip # "python3 setup.py --version" needs it
- python3-setuptools_scm
jobs:
- job: propose_downstream
trigger: release
dist_git_branches:
- fedora-all
- epel-9
- job: copr_build
trigger: pull_request
targets:
- fedora-all
- epel-9
- job: tests
trigger: pull_request
targets:
- fedora-all
- epel-9
- job: copr_build
trigger: commit
branch: main
targets:
- fedora-all
- epel-9
project: packit-dev
list_on_homepage: True
preserve_project: True
- job: copr_build
trigger: commit
branch: stable
targets:
- fedora-stable
- epel-9
project: packit-stable
list_on_homepage: True
preserve_project: True
- job: copr_build
trigger: release
targets:
- fedora-all
- epel-9
project: packit-releases
list_on_homepage: True
preserve_project: True
- job: pull_from_upstream
trigger: release
dist_git_branches:
- fedora-all
- epel-9
# downstream automation:
- job: koji_build
trigger: commit
packit_instances: ["stg"]
allowed_pr_authors: ["packit-stg", "packit"]
dist_git_branches:
- fedora-all
- epel-9
- job: bodhi_update
trigger: commit
packit_instances: ["stg"]
dist_git_branches:
- fedora-branched # rawhide updates are created automatically
- epel-9

3
README.packit Normal file
View file

@ -0,0 +1,3 @@
This repository is maintained by packit.
https://packit.dev/
The file was generated using packit 0.65.0.

12
plans/full.fmf Normal file
View file

@ -0,0 +1,12 @@
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

14
plans/git_reference.py Normal file
View file

@ -0,0 +1,14 @@
#!/usr/bin/python
import subprocess
from pathlib import Path
import fmf
tree_root = Path.cwd().absolute()
node = fmf.Tree(tree_root).find("/plans")
with node as data:
data["discover"]["url"] = "https://github.com/packit/specfile.git"
data["discover"]["ref"] = (
subprocess.check_output(["git", "rev-parse", "HEAD"]).decode().strip()
)

6
plans/main.fmf Normal file
View file

@ -0,0 +1,6 @@
discover:
how: fmf
url: https://github.com/packit/specfile.git
ref: ad039af925cd104ba3921ee427230c87db567080
execute:
how: tmt

4
plans/smoke.fmf Normal file
View file

@ -0,0 +1,4 @@
summary:
Basic smoke test
discover+:
filter: tier:0

View file

@ -1,3 +1,11 @@
%if 0%{?rhel} == 9
# RHEL 9 is missing python-flexmock
%bcond_with tests
%else
%bcond_without tests
%endif
%global desc %{expand:
Python library for parsing and manipulating RPM spec files.
Main focus is on modifying existing spec files, any change should result
@ -5,14 +13,14 @@ in a minimal diff.}
Name: python-specfile
Version: 0.1.1
Version: 0.11.0
Release: 1%{?dist}
Summary: A library for parsing and manipulating RPM spec files
License: MIT
URL: https://github.com/packit/specfile
Source0: https://github.com/packit/specfile/archive/%{version}/specfile-%{version}.tar.gz
Source0: %{pypi_source specfile}
BuildArch: noarch
@ -31,12 +39,14 @@ Summary: %{summary}
%{desc}
%generate_buildrequires
%pyproject_buildrequires -x testing
%prep
%autosetup -p1 -n specfile-%{version}
# Use packaged RPM python bindings downstream
sed -i 's/rpm-py-installer/rpm/' setup.cfg
%generate_buildrequires
%pyproject_buildrequires %{?with_tests: -x testing}
%build
@ -48,8 +58,10 @@ Summary: %{summary}
%pyproject_save_files specfile
%if %{with tests}
%check
%pytest
%endif
%files -n python%{python3_pkgversion}-specfile -f %{pyproject_files}
@ -57,6 +69,78 @@ Summary: %{summary}
%changelog
* Fri Dec 09 2022 Packit <hello@packit.dev> - 0.11.0-1
- Context managers (`Specfile.sections()`, `Specfile.tags()` etc.) can now be nested and combined together (with one exception - `Specfile.macro_definitions()`), and it is also possible to use tag properties (e.g. `Specfile.version`, `Specfile.license`) inside them. It is also possible to access the data directly, avoiding the `with` statement, by using the `content` property (e.g. `Specfile.tags().content`), but be aware that no modifications done to such data will be preserved. You must use `with` to make changes. (#153)
* Wed Nov 30 2022 Packit <hello@packit.dev> - 0.10.0-1
- Fixed an issue that caused empty lines originally inside changelog entries to appear at the end. (#140)
- Renamed the `ignore_missing_includes` option to a more general `force_parse`. If specified, it allows to attempt to parse the spec file even if one or more sources required to be present at parsing time are not available. Such sources include sources referenced from shell expansions in tag values and sources included using the `%include` directive. (#137)
* Sat Nov 12 2022 Packit <hello@packit.dev> - 0.9.1-1
- `specfile` now supports localized tags (e.g. `Summary(fr)`) and tags with qualifiers (e.g. `Requires(post)`).
It also follows more closely rpm parsing logic and doesn't fail on invalid section names. (#132)
* Tue Oct 25 2022 Packit <hello@packit.dev> - 0.9.0-1
- Added utility classes for working with (N)EVR. (#113)
- Fixed an issue with multiple instances of `Specfile` not expanding macros in the right context. (#117)
* Fri Oct 14 2022 Packit <hello@packit.dev> - 0.8.0-1
- Added `Specfile.update_tag()` method that allows updating tag values while trying to preserve macro expansions. You can watch a demo on [YouTube](https://youtu.be/yzMfBPdFXZY). (#101)
* Fri Oct 07 2022 Packit <hello@packit.dev> - 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 <hello@packit.dev> - 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 <hello@packit.dev> - 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 <hello@packit.dev> - 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 <hello@packit.dev> - 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 <hello@packit.dev> - 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 <packager@example.com> - 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)
* Thu Mar 31 2022 Packit <hello@packit.dev> - 0.2.0-1
- Enabled Zuul CI (#8)
- Switched from git:// to https:// for rebase hook (#22)
- Updated pre-commit configuration and adapted to type changes brought by new version of mypy (#24)
- Non-lowercase section names are now supported (#26)
- Added `Sections.get()` convenience method (#29)
- Added packit configuration and enabled packit (#25)
- Fixed infinite recursion when deep-copying instances of `Sections` and `Tags` (#30)
- Updated Fedora and EPEL spec files (#32)
- Fixed issues caused by older versions of dependencies on EPEL 8 (#33)
- Implemented high-level manipulation of sources and patches (#20, #36)
- It is now possible to parse spec files with missing local sources (#23)
* Mon Feb 21 2022 Nikola Forró <nforro@redhat.com> - 0.1.1-1
- New upstream release 0.1.1

View file

@ -1 +1 @@
SHA512 (specfile-0.1.1.tar.gz) = c4714e7170ea27cb309d0137b831e067361d00d384646dd2e07876221256de3f4b32b06addfe78924f17046b96d63f53f33e4fe6f22ca20561e154629c49fbed
SHA512 (specfile-0.11.0.tar.gz) = 39976c2d935b1f7d6b6f041ba57fb5ab72106f377b70e2e8d42b29dd829f0c8254aab0aa6b7ba8c92a58396b96ee8ac5360c13a9328390d468c5ebf125010843