Skip to content

Commit

Permalink
ci: initial Packit configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mrc0mmand committed Aug 26, 2021
1 parent d39f86f commit 5f78e19
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .packit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
# vi:ts=2 sw=2 et:
#
# Docs: https://packit.dev/docs/

specfile_path: .packit_rpm/util-linux.spec
synced_files:
- .packit.yaml
- src: .packit_rpm/util-linux.spec
dest: util-linux.spec
upstream_package_name: util-linux
downstream_package_name: util-linux
# `git describe` returns in util-linux's case 'v2.37.2-xxx' which breaks RPM version
# # detection (that expects 2.37.2-xxx'). Let's tweak the version string accordingly
upstream_tag_template: "v{version}"

actions:
post-upstream-clone:
# Use the CentOS Stream specfile
- "git clone https://gitlab.com/redhat/centos-stream/rpms/util-linux.git .packit_rpm --depth=1"
# Drop the "sources" file so rebase-helper doesn't think we're a dist-git
- "rm -fv .packit_rpm/sources"
# Drop all patches, since they're already included in the tarball
- "sed -ri '/^Patch[0-9]+:/d' .packit_rpm/util-linux.spec"
# We need to call autogen, since we use a custom tarball
- "sed -i '/^### Dependencies/aBuildRequires: bison' .packit_rpm/util-linux.spec"

create-archive:
- "./autogen.sh"
- "./configure"
- "make distcheck"
- "ls util-linux*.tar.xz"

# Available targets can be listed via `copr-cli list-chroots`
jobs:
# Build test
- job: copr_build
trigger: pull_request
metadata:
branch: rhel-9
targets:
# FIXME: change to CentOS 9 once it's available
- fedora-34-aarch64
- fedora-34-ppc64le
- fedora-34-x86_64

# TODO: configure TFT
# Run tests (via testing farm)
#- job: tests
# trigger: pull_request
# metadata:
# targets:
# # FIXME: change to CentOS 9 once it's available
# - fedora-34-x86_64

0 comments on commit 5f78e19

Please sign in to comment.