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..8e6c027 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/packitos-1.15.0.tar.gz +/packitos-1.15.1.tar.gz +/packitos-1.15.2.tar.gz +/packitos-1.15.3.tar.gz +/packitos-1.16.0.tar.gz diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..0178029 --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,146 @@ +--- +# 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"] + +packages: + packit: + downstream_package_name: packit + # packit was already taken on PyPI + upstream_package_name: packitos + upstream_project_url: https://github.com/packit/packit + paths: + - ./ + specfile_path: packit.spec + files_to_sync: + - packit.spec + - .packit.yaml + - src: plans/ + dest: plans/ + - src: .fmf/ + dest: .fmf/ + +version_update_mask: '\d+\.' + +copy_upstream_release_description: true +issue_repository: https://github.com/packit/packit + +actions: + create-archive: + - "sh -c 'hatch build -t sdist 2>&1 | tee hatch_build.log'" + - "tail -n1 hatch_build.log" + get-current-version: + - "hatch version" + pre-sync: + # FMF has to be installed on system where you are calling this tool. + - python3 plans/git_reference.py + +allowed_gpg_keys: + - 5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23 + +srpm_build_deps: + - python3-build + - hatch + - python3-hatch-vcs + +jobs: + - job: propose_downstream + trigger: release + # Use the stage instance once it works in downstream. + dist_git_branches: + rawhide: + fast_forward_merge_into: [fedora-branched] + epel-10: + fast_forward_merge_into: [epel-10-branched] + - job: copr_build + trigger: pull_request + targets: + - fedora-all + - fedora-all-aarch64 + - epel-10-all + packages: + - packit + + - job: tests + trigger: pull_request + targets: + - fedora-all + - epel-10-all + packages: + - packit + + - job: copr_build + trigger: commit + branch: main + targets: + - fedora-all + - fedora-all-aarch64 + - epel-10-all + project: packit-dev + list_on_homepage: True + preserve_project: True + + - job: copr_build + trigger: commit + branch: stable + targets: + - fedora-stable + - fedora-stable-aarch64 + project: packit-stable + list_on_homepage: True + preserve_project: True + + - job: copr_build + trigger: release + targets: + - fedora-stable + - fedora-stable-aarch64 + - epel-10-all + project: packit-releases + list_on_homepage: True + preserve_project: True + + # downstream automation: + - job: pull_from_upstream + trigger: release + dist_git_branches: + rawhide: + fast_forward_merge_into: [fedora-branched] + epel-10: + fast_forward_merge_into: [epel-10-branched] + + - job: koji_build + trigger: commit | koji_build + packit_instances: ["stg"] + allowed_pr_authors: ["packit-stg", "packit"] + sidetag_group: packit-specfile-ogr-releases + dependencies: + - python-ogr + - python-specfile + dist_git_branches: + - fedora-all + - epel-10-all + + - job: bodhi_update + trigger: koji_build + packit_instances: ["stg"] + allowed_builders: ["packit-stg", "packit"] + sidetag_group: packit-specfile-ogr-releases + dependencies: + - python-ogr + - python-specfile + dist_git_branches: + - fedora-all + - epel-10-all +# - job: vm_image_build +# trigger: pull_request +# packit_instances: ["stg"] +# image_distribution: rhel-8 +# image_type: aws +# image_architecture: x86_64 +# image_account_id: "727920394381" +# packages_to_install: [packit] +# owner: packit +# project: packit-dev +# targets: [epel-8] diff --git a/README.packit b/README.packit new file mode 100644 index 0000000..7698114 --- /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.15.3.post1.dev4+g553394da5. diff --git a/packit.spec b/packit.spec new file mode 100644 index 0000000..d7af6a4 --- /dev/null +++ b/packit.spec @@ -0,0 +1,98 @@ +# Testing dependencies: deepdiff, flexmock are missing on EPEL 9. Cannot use testing environment +%if 0%{?el9} +%bcond_with tests +%else +%bcond_without tests +%endif + +Name: packit +Version: 1.16.0 +Release: 1%{?dist} +Summary: A tool for integrating upstream projects with Fedora operating system + +License: MIT +URL: https://github.com/packit/packit +Source0: %{pypi_source packitos} +BuildArch: noarch +BuildRequires: python3-devel +BuildRequires: python3dist(click-man) +Requires: python3-packit = %{version}-%{release} + +%description +This project provides tooling and automation to integrate upstream open source +projects into Fedora operating system. + +%package -n python3-packit +Summary: %{summary} +# new-sources +Requires: fedpkg +Requires: git-core +# kinit +Requires: krb5-workstation +# rpmbuild +Requires: rpm-build +# bumpspec +Requires: rpmdevtools +# Copying files between repositories +Requires: rsync + +Recommends: osh-cli + +%description -n python3-packit +Python library for Packit, +check out packit package for the executable. + + +%prep +%autosetup -n packitos-%{version} + + +%generate_buildrequires +%pyproject_buildrequires %{?with_tests:-x testing} + + +%build +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files packit +PYTHONPATH="%{buildroot}%{python3_sitelib}" click-man packit --target %{buildroot}%{_mandir}/man1 + +install -d -m 755 %{buildroot}%{bash_completions_dir} +cp files/bash-completion/packit %{buildroot}%{bash_completions_dir}/packit + + +%files +%license LICENSE +%{_bindir}/packit +%{_mandir}/man1/packit*.1* +%{bash_completions_dir}/packit + +%files -n python3-packit -f %{pyproject_files} +# Epel9 does not tag the license file in pyproject_files as a license. Manually install it in this case +%if 0%{?el9} +%license LICENSE +%endif +%doc README.md + +%changelog +* Fri Apr 24 2026 Packit - 1.16.0-1 +- Packit CLI has a new option `--[no-]update-release` that, by default, follows the value of the option set in the config, and also allows you to override manually, if necessary. (#2713) +- In addition to `version_update_mask`, users can now use a new `version_update_specifiers` configuration option to control the upstream versions allowed to be release-synced. The option accepts [PEP440 version specifier sets](https://packaging.pypa.io/en/stable/specifiers.html), for example `version_update_specifiers: >=1.0,~=1.0`. (#2710) +- Resolves: rhbz#2461103 + +* Wed Apr 1 2026 Packit - 1.15.3-1 +- We've fixed the formatting of the strings Packit appends to the changelog. Now there will be at most one blank line before or after the Packit comment. (#2707) +- Resolves: rhbz#2453842 + +* Tue Mar 24 2026 Packit - 1.15.2-1 +- Packit now uses the specfile library's sanitization when parsing spec files. +- Resolves: rhbz#2450841 + +* Fri Mar 6 2026 Packit - 1.15.1-1 +- We have fixed a bug that prevented running `sync_release()` on a `PackitAPI` instance initialized with `non_git_upstream=True` repeatedly due to an improper clean-up. (#2691) + +* Mon Feb 23 2026 Packit Team - 1.15.0-1 +- First release in EPEL 10 diff --git a/plans/README.md b/plans/README.md new file mode 100644 index 0000000..22c63d9 --- /dev/null +++ b/plans/README.md @@ -0,0 +1,15 @@ +Run tests locally: + + $ tmt -v run -a provision -h local + +Run tests in a container using podman: + + $ sudo dnf install tmt-provision-container + $ tmt -v run -a provision -h container + +For more info see: + +- https://packit.dev/docs/testing-farm/ +- [tmt @ DevConf 2021 slides](https://static.sched.com/hosted_files/devconfcz2021/37/tmt-slides.pdf) +- [fmf docs](https://fmf.readthedocs.io) +- [tmt docs](https://tmt.readthedocs.io) diff --git a/plans/full.fmf b/plans/full.fmf new file mode 100644 index 0000000..888283c --- /dev/null +++ b/plans/full.fmf @@ -0,0 +1,31 @@ +summary: Unit, integration & functional tests. + +discover+: + filter: tag:full + +adjust: + - when: "initiator == packit" + because: "have the latest builds of ogr and specfile available for upstream test jobs" + prepare+: + # enable packit-dev Copr repo to get the latest builds of ogr and specfile + - how: install + copr: packit/packit-dev + # make sure the Copr repo has higher priority than TF Tag Repository + - how: shell + script: sed -i -n '/^priority=/!p;$apriority=5' /etc/yum.repos.d/*:packit:packit-dev.repo + + # upgrade or install ‹ogr›, if needed + - how: shell + script: dnf -y upgrade python3-ogr || dnf -y install python3-ogr + + # upgrade or install ‹specfile›, if needed + - how: shell + script: dnf -y upgrade python3-specfile || dnf -y install python3-specfile + + - when: "distro == rhel-9 or distro == centos-9 or distro == centos-stream-9" + because: "build and deepdiff are not in EPEL 9" + prepare+: + - how: install + package: python3-pip + - how: shell + script: pip3 install build deepdiff diff --git a/plans/git_reference.py b/plans/git_reference.py new file mode 100644 index 0000000..9fdb34b --- /dev/null +++ b/plans/git_reference.py @@ -0,0 +1,17 @@ +#!/usr/bin/python + +# Copyright Contributors to the Packit project. +# SPDX-License-Identifier: MIT + +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/packit.git" + data["discover"]["ref"] = ( + subprocess.check_output(["git", "rev-parse", "HEAD"]).decode().strip() + ) diff --git a/plans/main.fmf b/plans/main.fmf new file mode 100644 index 0000000..4cfa456 --- /dev/null +++ b/plans/main.fmf @@ -0,0 +1,6 @@ +discover: + how: fmf + url: https://github.com/packit/packit.git + ref: 3824aae58b21d6a38bbcb49a9fe53484143a4569 +execute: + how: tmt diff --git a/plans/rpmlint.fmf b/plans/rpmlint.fmf new file mode 100644 index 0000000..c220c74 --- /dev/null +++ b/plans/rpmlint.fmf @@ -0,0 +1,14 @@ +summary: + Execute rpmlint on the spec file + +discover: + how: shell + tests: + - name: rpmlint + test: rpmlint packit.spec + +prepare: + - name: packages + how: install + package: + - rpmlint diff --git a/plans/session-recording.fmf b/plans/session-recording.fmf new file mode 100644 index 0000000..141a092 --- /dev/null +++ b/plans/session-recording.fmf @@ -0,0 +1,30 @@ +summary: Session recording testcases + +discover+: + filter: tag:requre + +adjust: + - when: "initiator == packit" + because: "have the latest builds of ogr and specfile available for upstream test jobs" + prepare+: + # enable packit-dev Copr repo to get the latest builds of ogr and specfile + - how: install + copr: packit/packit-dev + + # make sure the Copr repo has higher priority than TF Tag Repository + - how: shell + script: sed -i -n '/^priority=/!p;$apriority=5' /etc/yum.repos.d/*:packit:packit-dev.repo + + # upgrade or install ‹ogr›, if needed + - how: shell + script: dnf -y upgrade python3-ogr || dnf -y install python3-ogr + + # upgrade or install ‹specfile›, if needed + - how: shell + script: dnf -y upgrade python3-specfile || dnf -y install python3-specfile + + - when: "distro <= rhel-9 or distro <= centos-9 or distro == centos-stream-8 or distro == centos-stream-9" + prepare+: + - how: install + name: Enable the Copr-repo for Requre + copr: packit/packit-dev diff --git a/plans/smoke.fmf b/plans/smoke.fmf new file mode 100644 index 0000000..f797e91 --- /dev/null +++ b/plans/smoke.fmf @@ -0,0 +1,4 @@ +summary: Basic simple tests + +discover+: + filter: tier:0 diff --git a/sources b/sources new file mode 100644 index 0000000..7f39d0e --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (packitos-1.16.0.tar.gz) = cb9edfa23a5153439739f13e82da13e3017d97f43d2fdfdf8c1afd6e7de7b31f64c29c006c5f0dbda353fa4a12f1a7761935353ef87b306f71d109abf09bc802