From 5f78e19639d3217403a943942a18ee15bd9ee1ed Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Wed, 25 Aug 2021 22:05:00 +0200 Subject: [PATCH] ci: initial Packit configuration --- .packit.yml | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .packit.yml diff --git a/.packit.yml b/.packit.yml new file mode 100644 index 0000000000..c3a6d2ee60 --- /dev/null +++ b/.packit.yml @@ -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