-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit will run Copr builds on every PR against all active releases of Fedora, thus allowing buildability checks before the PR merges. Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Packit's default fix-spec-file often doesn't fetch version string correctly. | ||
# This script handles any custom processing of the dist-git spec file and gets used by the | ||
# fix-spec-file action in .packit.yaml | ||
|
||
set -eo pipefail | ||
|
||
dnf -y install git-archive-all | ||
|
||
# Get Version from HEAD | ||
HEAD_VERSION=$(./build-aux/git-version-gen --prefix "" . | cut -d"-" -f1) | ||
|
||
# Generate source tarball | ||
git-archive-all --prefix=crun-$HEAD_VERSION/ --force-submodules crun-$HEAD_VERSION.tar.gz | ||
|
||
# RPM Spec modifications | ||
|
||
# Fix Version | ||
sed -i "s/^Version:.*/Version: $HEAD_VERSION/" crun.spec | ||
|
||
# Fix Release | ||
sed -i "s/^Release:.*/Release: $PACKIT_RPMSPEC_RELEASE%{?dist}/" crun.spec | ||
|
||
# Fix Source0 | ||
sed -i "s/^Source0:.*/Source0: %{name}-$HEAD_VERSION.tar.gz/" crun.spec | ||
|
||
# Fix autosetup | ||
sed -i "s/^%autosetup.*/%autosetup -Sgit -n %{name}-$HEAD_VERSION/" crun.spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
# See the documentation for more information: | ||
# https://packit.dev/docs/configuration/ | ||
|
||
# Build targets can be found at: | ||
# https://copr.fedorainfracloud.org/coprs/rhcontainerbot/packit-builds/ | ||
|
||
specfile_path: rpm/crun.spec | ||
upstream_tag_template: v{version} | ||
|
||
jobs: | ||
- &copr | ||
job: copr_build | ||
trigger: pull_request | ||
owner: rhcontainerbot | ||
project: packit-builds | ||
enable_net: true | ||
srpm_build_deps: | ||
- make | ||
|
||
- <<: *copr | ||
# Run on commit to main branch | ||
trigger: commit | ||
branch: main | ||
project: podman-next | ||
|
||
- job: propose_downstream | ||
trigger: release | ||
update_release: false | ||
dist_git_branches: | ||
- fedora-all | ||
|
||
- job: koji_build | ||
trigger: commit | ||
dist_git_branches: | ||
- fedora-all | ||
|
||
- job: bodhi_update | ||
trigger: commit | ||
dist_git_branches: | ||
- fedora-branched # rawhide updates are created automatically |