Skip to content

Commit 874498e

Browse files
committed
Add Packit automation for COPR builds and Fedora packaging
This adds Packit configuration to enable: - Automated COPR builds on PRs and commits to main - Automated Fedora package proposals on releases - Koji builds and Bodhi updates for Fedora releases Assisted-by: Claude Code (Sonnet 4.5) Signed-off-by: gursewak1997 <gursmangat@gmail.com>
1 parent 65d76fa commit 874498e

2 files changed

Lines changed: 75 additions & 0 deletions

File tree

.packit.yaml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
upstream_package_name: bcvk
3+
downstream_package_name: bcvk
4+
5+
upstream_tag_template: v{version}
6+
7+
specfile_path: contrib/packaging/bcvk.spec
8+
9+
srpm_build_deps:
10+
- cargo
11+
- git
12+
- zstd
13+
- libzstd-devel
14+
- openssl-devel
15+
- go-md2man
16+
17+
actions:
18+
# The last step here is required by Packit to return the archive name
19+
# https://packit.dev/docs/configuration/actions#create-archive
20+
create-archive:
21+
- bash -c "cargo install cargo-vendor-filterer"
22+
- bash -c "cargo xtask spec"
23+
- bash -c "cat target/bcvk.spec"
24+
- bash -c "cp target/bcvk* contrib/packaging/"
25+
- bash -c "ls -1 target/bcvk*.tar.zstd | grep -v 'vendor'"
26+
# Do nothing with spec file. Two steps here are for debugging
27+
fix-spec-file:
28+
- bash -c "cat contrib/packaging/bcvk.spec"
29+
- bash -c "ls -al contrib/packaging/"
30+
31+
jobs:
32+
- job: copr_build
33+
trigger: pull_request
34+
targets:
35+
# Primary targets: supported Fedora
36+
# CentOS Stream support can be added later
37+
# - centos-stream-9-x86_64
38+
# - centos-stream-9-aarch64
39+
# - centos-stream-9-s390x
40+
# - centos-stream-10-x86_64
41+
# - centos-stream-10-aarch64
42+
# - centos-stream-10-s390x
43+
- fedora-43-x86_64
44+
- fedora-43-aarch64
45+
- fedora-43-s390x
46+
# Sanity check on secondary targets, fewer architectures just
47+
# because the chance that we break e.g. ppc64le *just* on
48+
# rawhide is basically nil.
49+
- fedora-rawhide-x86_64
50+
- fedora-rawhide-aarch64
51+
52+
# Build on new commit to main branch
53+
- job: copr_build
54+
trigger: commit
55+
branch: main
56+
owner: rhcontainerbot
57+
project: bcvk
58+
enable_net: true
59+
60+
- job: propose_downstream
61+
trigger: release
62+
dist_git_branches:
63+
- fedora-all
64+
65+
- job: koji_build
66+
trigger: commit
67+
dist_git_branches:
68+
- fedora-all
69+
70+
- job: bodhi_update
71+
trigger: commit
72+
dist_git_branches:
73+
# Fedora rawhide updates are created automatically
74+
- fedora-branched

contrib/packaging/bcvk.spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ExcludeArch: %{ix86}
1717
BuildRequires: make
1818
BuildRequires: openssl-devel
1919
BuildRequires: go-md2man
20+
BuildRequires: openssh-clients
2021
%if 0%{?rhel}
2122
BuildRequires: rust-toolset
2223
%else

0 commit comments

Comments
 (0)