Compare commits
12 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ffa049a037 | ||
|
|
fb44fab2f2 | ||
|
|
501180d968 | ||
|
|
aa22dd0d10 | ||
|
|
d7ec1411ef | ||
|
|
2d036948fd | ||
|
|
e2204ae52d | ||
|
|
f3ab3a9a9c | ||
|
|
2d91730c3c | ||
|
|
6910fdffbb | ||
|
|
e7445ef7f9 | ||
|
|
382a68f50c |
10 changed files with 82 additions and 541 deletions
300
.packit.yaml
300
.packit.yaml
|
|
@ -1,287 +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"]
|
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
|
upstream_project_url: https://github.com/packit/specfile
|
||||||
issue_repository: https://github.com/packit/specfile
|
issue_repository: https://github.com/packit/specfile
|
||||||
|
|
||||||
# PEP440
|
actions:
|
||||||
prerelease_suffix_pattern: "([.\\-_]?)(a(lpha)?|b(eta)?|r?c|pre(view)?)([.\\-_]?\\d+)?"
|
# we need this b/c `git archive` doesn't put all the metadata in the tarball:
|
||||||
prerelease_suffix_macro: prerelease
|
# 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
|
||||||
|
|
||||||
copy_upstream_release_description: true
|
srpm_build_deps:
|
||||||
|
- python3-pip # "python3 setup.py --version" needs it
|
||||||
packages:
|
- python3-setuptools_scm
|
||||||
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:
|
jobs:
|
||||||
- &copr_build_pr
|
- job: propose_downstream
|
||||||
job: copr_build
|
trigger: release
|
||||||
|
dist_git_branches:
|
||||||
|
- fedora-all
|
||||||
|
- epel-9
|
||||||
|
|
||||||
|
- job: copr_build
|
||||||
trigger: pull_request
|
trigger: pull_request
|
||||||
packages: [specfile]
|
|
||||||
targets:
|
targets:
|
||||||
- fedora-all
|
- fedora-all
|
||||||
- fedora-all-aarch64
|
|
||||||
- epel-9
|
- 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: tests
|
||||||
job: copr_build
|
trigger: pull_request
|
||||||
|
targets:
|
||||||
|
- fedora-all
|
||||||
|
- epel-9
|
||||||
|
|
||||||
|
- job: copr_build
|
||||||
trigger: commit
|
trigger: commit
|
||||||
branch: main
|
branch: main
|
||||||
packages: [specfile]
|
|
||||||
targets:
|
targets:
|
||||||
- fedora-all
|
- fedora-all
|
||||||
- fedora-all-aarch64
|
|
||||||
- epel-9
|
- epel-9
|
||||||
project: packit-dev
|
project: packit-dev
|
||||||
list_on_homepage: True
|
list_on_homepage: True
|
||||||
preserve_project: 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
|
||||||
job: copr_build
|
|
||||||
trigger: commit
|
trigger: commit
|
||||||
branch: stable
|
branch: stable
|
||||||
packages: [specfile]
|
|
||||||
targets:
|
targets:
|
||||||
- fedora-stable
|
- fedora-stable
|
||||||
- fedora-stable-aarch64
|
- epel-9
|
||||||
project: packit-stable
|
project: packit-stable
|
||||||
list_on_homepage: True
|
list_on_homepage: True
|
||||||
preserve_project: True
|
preserve_project: True
|
||||||
|
|
||||||
- &copr_build_release
|
- job: copr_build
|
||||||
job: copr_build
|
|
||||||
trigger: release
|
trigger: release
|
||||||
packages: [specfile]
|
|
||||||
targets:
|
targets:
|
||||||
- fedora-all
|
- fedora-all
|
||||||
- fedora-all-aarch64
|
|
||||||
- epel-9
|
- epel-9
|
||||||
project: packit-releases
|
project: packit-releases
|
||||||
list_on_homepage: True
|
list_on_homepage: True
|
||||||
preserve_project: 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: pull_from_upstream
|
||||||
job: tests
|
trigger: release
|
||||||
trigger: pull_request
|
dist_git_branches:
|
||||||
packages: [specfile]
|
|
||||||
tmt_plan: "smoke|full|packit-integration"
|
|
||||||
targets:
|
|
||||||
- fedora-all
|
- fedora-all
|
||||||
- epel-9
|
- 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
|
# downstream automation:
|
||||||
job: propose_downstream
|
- job: koji_build
|
||||||
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
|
trigger: commit
|
||||||
packages: [specfile]
|
|
||||||
packit_instances: ["stg"]
|
packit_instances: ["stg"]
|
||||||
allowed_pr_authors: ["packit-stg", "packit"]
|
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:
|
dist_git_branches:
|
||||||
- fedora-all
|
- fedora-all
|
||||||
|
|
||||||
- &bodhi_update
|
|
||||||
job: bodhi_update
|
|
||||||
trigger: commit
|
|
||||||
packages: [specfile]
|
|
||||||
packit_instances: ["stg"]
|
|
||||||
allowed_builders: ["packit-stg", "packit"]
|
|
||||||
dist_git_branches:
|
|
||||||
- epel-9
|
- epel-9
|
||||||
- <<: *bodhi_update
|
- job: bodhi_update
|
||||||
packages: [specfile-epel8]
|
trigger: commit
|
||||||
|
packit_instances: ["stg"]
|
||||||
dist_git_branches:
|
dist_git_branches:
|
||||||
- epel-8
|
- fedora-branched # rawhide updates are created automatically
|
||||||
- <<: *bodhi_update
|
- epel-9
|
||||||
packages: [specfile-epel10]
|
|
||||||
dist_git_branches:
|
|
||||||
- epel-10-all
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
This repository is maintained by packit.
|
This repository is maintained by packit.
|
||||||
https://packit.dev/
|
https://packit.dev/
|
||||||
The file was generated using packit 1.13.0.post1.dev2+g84134016c.
|
The file was generated using packit 0.65.0.
|
||||||
|
|
|
||||||
|
|
@ -3,15 +3,9 @@ summary:
|
||||||
discover+:
|
discover+:
|
||||||
filter: tier:1
|
filter: tier:1
|
||||||
adjust:
|
adjust:
|
||||||
- when: "distro == rhel-8"
|
- when: "distro == rhel-9 or distro == centos-9 or distro == centos-stream-9"
|
||||||
because: "only platform-python is installed on RHEL 8 by default"
|
because: "flexmock is not in EPEL 9: https://bugzilla.redhat.com/show_bug.cgi?id=2120251"
|
||||||
prepare+:
|
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
|
- how: install
|
||||||
package: python3-pip
|
package: python3-pip
|
||||||
- how: shell
|
- how: shell
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,14 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
# Copyright Contributors to the Packit project.
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import fmf
|
import fmf
|
||||||
|
|
||||||
# Set discover of specfile tests to a fixed commit
|
|
||||||
tree_root = Path.cwd().absolute()
|
tree_root = Path.cwd().absolute()
|
||||||
tree = fmf.Tree(tree_root)
|
node = fmf.Tree(tree_root).find("/plans")
|
||||||
main_node = tree.find("/plans")
|
with node as data:
|
||||||
with main_node as data:
|
|
||||||
data["discover"]["url"] = "https://github.com/packit/specfile.git"
|
data["discover"]["url"] = "https://github.com/packit/specfile.git"
|
||||||
data["discover"]["ref"] = (
|
data["discover"]["ref"] = (
|
||||||
subprocess.check_output(["git", "rev-parse", "HEAD"]).decode().strip()
|
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]
|
|
||||||
)
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
discover:
|
discover:
|
||||||
how: fmf
|
how: fmf
|
||||||
url: https://github.com/packit/specfile.git
|
url: https://github.com/packit/specfile.git
|
||||||
ref: a07560dd2609cf23add5deeadc103033611b7b22
|
ref: ad039af925cd104ba3921ee427230c87db567080
|
||||||
execute:
|
execute:
|
||||||
how: tmt
|
how: tmt
|
||||||
|
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
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
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
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
|
|
||||||
|
|
@ -2,9 +2,3 @@ summary:
|
||||||
Basic smoke test
|
Basic smoke test
|
||||||
discover+:
|
discover+:
|
||||||
filter: tier:0
|
filter: tier:0
|
||||||
adjust:
|
|
||||||
- when: "distro == rhel-8"
|
|
||||||
because: "only platform-python is installed on RHEL 8 by default"
|
|
||||||
prepare+:
|
|
||||||
- how: install
|
|
||||||
package: python3
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
|
%if 0%{?rhel} == 9
|
||||||
|
# RHEL 9 is missing python-flexmock
|
||||||
|
%bcond_with tests
|
||||||
|
%else
|
||||||
%bcond_without tests
|
%bcond_without tests
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%global desc %{expand:
|
%global desc %{expand:
|
||||||
|
|
@ -7,30 +12,19 @@ Main focus is on modifying existing spec files, any change should result
|
||||||
in a minimal diff.}
|
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
|
Name: python-specfile
|
||||||
Version: %{package_version}
|
Version: 0.11.0
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
|
|
||||||
Summary: A library for parsing and manipulating RPM spec files
|
Summary: A library for parsing and manipulating RPM spec files
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/packit/specfile
|
URL: https://github.com/packit/specfile
|
||||||
|
|
||||||
Source0: %{pypi_source specfile %{pypi_version}}
|
Source0: %{pypi_source specfile}
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
%if %{with tests}
|
|
||||||
# tests/unit/test_guess_packager.py
|
|
||||||
BuildRequires: git-core
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
|
@ -46,11 +40,9 @@ Summary: %{summary}
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n specfile-%{pypi_version}
|
%autosetup -p1 -n specfile-%{version}
|
||||||
|
# Use packaged RPM python bindings downstream
|
||||||
# since we are building from PyPI source, we don't need git-archive
|
sed -i 's/rpm-py-installer/rpm/' setup.cfg
|
||||||
# support in setuptools_scm
|
|
||||||
sed -i 's/setuptools_scm\[toml\]>=7/setuptools_scm[toml]/' pyproject.toml
|
|
||||||
|
|
||||||
|
|
||||||
%generate_buildrequires
|
%generate_buildrequires
|
||||||
|
|
@ -68,7 +60,7 @@ sed -i 's/setuptools_scm\[toml\]>=7/setuptools_scm[toml]/' pyproject.toml
|
||||||
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
%check
|
%check
|
||||||
%pytest --verbose tests/unit tests/integration
|
%pytest
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -77,204 +69,6 @@ sed -i 's/setuptools_scm\[toml\]>=7/setuptools_scm[toml]/' pyproject.toml
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Jan 08 2026 Packit <hello@packit.dev> - 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 <hello@packit.dev> - 0.37.1-1
|
|
||||||
- We have solved a FutureWarning in our codebase. (#485)
|
|
||||||
|
|
||||||
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 0.37.0-2
|
|
||||||
- Rebuilt for Python 3.14.0rc3 bytecode
|
|
||||||
|
|
||||||
* Fri Sep 05 2025 Packit <hello@packit.dev> - 0.37.0-1
|
|
||||||
- Added support for Elbrus E2K CPU architectures. (#484)
|
|
||||||
|
|
||||||
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 0.36.0-5
|
|
||||||
- Rebuilt for Python 3.14.0rc2 bytecode
|
|
||||||
|
|
||||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.36.0-4
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jun 06 2025 Python Maint <python-maint@redhat.com> - 0.36.0-3
|
|
||||||
- Rebuilt for Python 3.14
|
|
||||||
|
|
||||||
* Fri May 30 2025 Packit <hello@packit.dev> - 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)
|
|
||||||
|
|
||||||
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 0.35.1-2
|
|
||||||
- Rebuilt for Python 3.14
|
|
||||||
|
|
||||||
* Fri May 16 2025 Packit <hello@packit.dev> - 0.35.1-1
|
|
||||||
- We have fixed a bug that caused changes to get lost when a spec file passed as a path was replaced or deleted. (#470)
|
|
||||||
|
|
||||||
* Sun Apr 13 2025 Packit <hello@packit.dev> - 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 <hello@packit.dev> - 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 <hello@packit.dev> - 0.34.1-1
|
|
||||||
- Removed the usage of a walrus operator for Python 3.6 compatibility. (#450)
|
|
||||||
|
|
||||||
* Mon Jan 27 2025 Packit <hello@packit.dev> - 0.34.0-1
|
|
||||||
- Added support for detached (open)SUSE style changelogs (#444)
|
|
||||||
- Resolves: rhbz#2342178
|
|
||||||
|
|
||||||
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.33.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Dec 16 2024 Packit <hello@packit.dev> - 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
|
|
||||||
|
|
||||||
* Wed Nov 13 2024 Packit <hello@packit.dev> - 0.32.6-1
|
|
||||||
- New minor release for testing in CBS Koji
|
|
||||||
|
|
||||||
* Sat Oct 26 2024 Packit <hello@packit.dev> - 0.32.5-1
|
|
||||||
- We have fixed our parser to take in account the deprecations introduced in Python 3.8 (#420)
|
|
||||||
|
|
||||||
* Fri Oct 11 2024 Packit <hello@packit.dev> - 0.32.4-1
|
|
||||||
- NEVR and NEVRA classes are now hashable (#416)
|
|
||||||
|
|
||||||
* Mon Sep 30 2024 Packit <hello@packit.dev> - 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 <hello@packit.dev> - 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 <hello@packit.dev> - 0.32.1-1
|
|
||||||
- Fixed two issues related to condition parsing. (#405)
|
|
||||||
|
|
||||||
* Mon Jul 22 2024 Packit <hello@packit.dev> - 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)
|
|
||||||
|
|
||||||
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.31.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
|
||||||
|
|
||||||
* Tue Jul 09 2024 Packit <hello@packit.dev> - 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 <hello@packit.dev> - 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)
|
|
||||||
|
|
||||||
* Mon Jun 17 2024 Packit <hello@packit.dev> - 0.29.0-1
|
|
||||||
- Improved compatibility with RPM 4.20 (alpha version is currently in Fedora Rawhide). (#380)
|
|
||||||
- Resolves: rhbz#2282962
|
|
||||||
|
|
||||||
* Sun Jun 09 2024 Python Maint <python-maint@redhat.com> - 0.28.3-2
|
|
||||||
- Rebuilt for Python 3.13
|
|
||||||
|
|
||||||
* Thu May 23 2024 Packit <hello@packit.dev> - 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)
|
|
||||||
|
|
||||||
* 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 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.27.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
||||||
|
|
||||||
* 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)
|
|
||||||
|
|
||||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
||||||
|
|
||||||
* 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)
|
|
||||||
|
|
||||||
* Wed Jun 28 2023 Python Maint <python-maint@redhat.com> - 0.19.0-2
|
|
||||||
- Rebuilt for Python 3.12
|
|
||||||
|
|
||||||
* 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)
|
|
||||||
|
|
||||||
* Mon Jan 30 2023 Packit <hello@packit.dev> - 0.13.2-1
|
|
||||||
- Fixed infinite loop that occured when section options were followed by whitespace. (#197)
|
|
||||||
|
|
||||||
* Mon Jan 23 2023 Packit <hello@packit.dev> - 0.13.1-1
|
|
||||||
- Fixed a bug in section parsing that caused sections to be ignored when there were macro definitions spread across the spec file and not cumulated at the top. (#191)
|
|
||||||
|
|
||||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jan 20 2023 Packit <hello@packit.dev> - 0.13.0-1
|
|
||||||
- Added `Section.options` attribute for convenient manipulation of section options. (#183)
|
|
||||||
- specfile now supports single-line sections where section content is represented by a macro starting with a newline. (#182)
|
|
||||||
- Added `evr` argument to `Specfile.add_changelog_entry()`. This allows adding a changelog entry with an EVR value that's different from the current specfile's value. This makes it easier to reconstruct a specfile's `%changelog` based on another source using the higher level interface. (#181)
|
|
||||||
|
|
||||||
* Fri Jan 06 2023 Packit <hello@packit.dev> - 0.12.0-1
|
|
||||||
- All classes including `Specfile` itself can now be copied using the standard `copy()` and `deepcopy()` functions from `copy` module. (#176)
|
|
||||||
- `Section.name` attribute has been renamed to a more fitting `Section.id`. (#167)
|
|
||||||
- `setup.cfg` now uses `license_files` instead of deprecated `license_file`. (#162)
|
|
||||||
|
|
||||||
* Wed Dec 14 2022 Packit <hello@packit.dev> - 0.11.1-1
|
|
||||||
- Tags enclosed in conditional macro expansions are not ignored anymore. (#156)
|
|
||||||
- Fixed context managers being shared between Specfile instances. (#157)
|
|
||||||
|
|
||||||
* Fri Dec 09 2022 Packit <hello@packit.dev> - 0.11.0-1
|
* 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)
|
- 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)
|
||||||
|
|
||||||
|
|
@ -322,9 +116,6 @@ sed -i 's/setuptools_scm\[toml\]>=7/setuptools_scm[toml]/' pyproject.toml
|
||||||
- Initial patch number and its default number of digits are now honored (#66)
|
- Initial patch number and its default number of digits are now honored (#66)
|
||||||
- Fixed a bug in `%prep` macro stringification (#67)
|
- Fixed a bug in `%prep` macro stringification (#67)
|
||||||
|
|
||||||
* Mon Jun 20 2022 Python Maint <python-maint@redhat.com> - 0.3.0-2
|
|
||||||
- Rebuilt for Python 3.11
|
|
||||||
|
|
||||||
* Mon May 16 2022 Packit <hello@packit.dev> - 0.3.0-1
|
* Mon May 16 2022 Packit <hello@packit.dev> - 0.3.0-1
|
||||||
- Made `Sources` a `MutableSequence` (#36)
|
- 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)
|
- Started using consistent terminology for source numbers and added the option to insert a source with a specific number (#47)
|
||||||
|
|
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
SHA512 (specfile-0.38.0.tar.gz) = bfd60434b868fd191fb68d5b2fa319db45df80397b6c1000a63d9fe947e998a8a86fcf6a76c0ae9b6ef3321d2b04d4dd9bc565a610bfb117faa64180342fda4d
|
SHA512 (specfile-0.11.0.tar.gz) = 39976c2d935b1f7d6b6f041ba57fb5ab72106f377b70e2e8d42b29dd829f0c8254aab0aa6b7ba8c92a58396b96ee8ac5360c13a9328390d468c5ebf125010843
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue