Skip to content

Commit 1196d45

Browse files
authored
Add Packit automation for COPR builds and Fedora packaging (#196)
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 224d2f3 commit 1196d45

2 files changed

Lines changed: 70 additions & 0 deletions

File tree

.packit.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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 (x86_64 and aarch64 only)
36+
# bcvk only supports x86_64 and aarch64 architectures
37+
# CentOS Stream support can be added later
38+
# - centos-stream-9-x86_64
39+
# - centos-stream-9-aarch64
40+
# - centos-stream-10-x86_64
41+
# - centos-stream-10-aarch64
42+
- fedora-43-x86_64
43+
- fedora-43-aarch64
44+
- fedora-rawhide-x86_64
45+
- fedora-rawhide-aarch64
46+
47+
# Build on new commit to main branch
48+
- job: copr_build
49+
trigger: commit
50+
branch: main
51+
owner: rhcontainerbot
52+
project: bootc
53+
enable_net: true
54+
55+
- job: propose_downstream
56+
trigger: release
57+
dist_git_branches:
58+
- fedora-all
59+
60+
- job: koji_build
61+
trigger: commit
62+
dist_git_branches:
63+
- fedora-all
64+
65+
- job: bodhi_update
66+
trigger: commit
67+
dist_git_branches:
68+
# Fedora rawhide updates are created automatically
69+
- 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)