]> git.ipfire.org Git - thirdparty/util-linux.git/blob - .packit.yaml
Merge branch 'meson-debian' of https://github.com/zeha/util-linux
[thirdparty/util-linux.git] / .packit.yaml
1 ---
2 # vi:ts=2 sw=2 et:
3 #
4 # Docs: https://packit.dev/docs/
5
6 specfile_path: .packit_rpm/util-linux.spec
7 files_to_sync:
8 - .packit.yaml
9 - src: .packit_rpm/util-linux.spec
10 dest: util-linux.spec
11 upstream_package_name: util-linux
12 downstream_package_name: util-linux
13 # `git describe` returns in util-linux's case 'v2.37.2-xxx' which breaks RPM version
14 # # detection (that expects 2.37.2-xxx'). Let's tweak the version string accordingly
15 upstream_tag_template: "v{version}"
16 srpm_build_deps: []
17
18 actions:
19 post-upstream-clone:
20 # Use a spec file from Fedora Rawhide
21 - "git clone https://src.fedoraproject.org/rpms/util-linux.git .packit_rpm --depth=1"
22 # Drop the "sources" file so rebase-helper doesn't think we're a dist-git
23 - "rm -fv .packit_rpm/sources"
24 # Drop all patches, since they're already included in the tarball
25 - "sed -ri '/^Patch[0-9]+:/d' .packit_rpm/util-linux.spec"
26 # Install additional dependencies we need for the build/tests
27 - "sed -i '/^### Dependencies/aBuildRequires: autoconf automake bc bison iproute libtool procps-ng socat' .packit_rpm/util-linux.spec"
28 # We need to call autogen, since we use a custom tarball
29 - "sed -i '/^unset LINGUAS/a./autogen.sh' .packit_rpm/util-linux.spec"
30 # Enable tests after build
31 - "sed -i '/^### Macros/a%define _with_check 1' .packit_rpm/util-linux.spec"
32 # Ignore unpackaged files
33 - "sed -i '1 i%define _unpackaged_files_terminate_build 0' .packit_rpm/util-linux.spec"
34 create-archive:
35 # We need to override the default create-archive action, since we need to tweak
36 # the resulting tarball and add a .tarball-version file to it, otherwise
37 # util-linux fails to detect its version during build
38 - "bash -c 'echo $PACKIT_PROJECT_VERSION >.tarball-version'"
39 - "bash -c 'git archive --prefix ${PACKIT_PROJECT_NAME_VERSION}/ --add-file .tarball-version --output .packit_rpm/${PACKIT_PROJECT_NAME_VERSION}.tar.gz HEAD'"
40 - "bash -c 'echo .packit_rpm/${PACKIT_PROJECT_NAME_VERSION}.tar.gz'"
41
42 # Available targets can be listed via `copr-cli list-chroots`
43 jobs:
44 # Build test
45 - job: copr_build
46 trigger: pull_request
47 targets:
48 - fedora-rawhide-aarch64
49 - fedora-rawhide-i386
50 - fedora-rawhide-ppc64le
51 - fedora-rawhide-s390x
52 - fedora-rawhide-x86_64