]>
Commit | Line | Data |
---|---|---|
8620d41a FS |
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 | |
dde0829c | 27 | - "sed -i '/^### Dependencies/aBuildRequires: autoconf automake bc bison flex iproute libtool procps-ng socat' .packit_rpm/util-linux.spec" |
8620d41a FS |
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" | |
6b23e267 TW |
34 | # Enable -Werror |
35 | - "sed -i 's/^%configure /%configure --enable-werror /' .packit_rpm/util-linux.spec" | |
8620d41a FS |
36 | create-archive: |
37 | # We need to override the default create-archive action, since we need to tweak | |
38 | # the resulting tarball and add a .tarball-version file to it, otherwise | |
39 | # util-linux fails to detect its version during build | |
40 | - "bash -c 'echo $PACKIT_PROJECT_VERSION >.tarball-version'" | |
41 | - "bash -c 'git archive --prefix ${PACKIT_PROJECT_NAME_VERSION}/ --add-file .tarball-version --output .packit_rpm/${PACKIT_PROJECT_NAME_VERSION}.tar.gz HEAD'" | |
42 | - "bash -c 'echo .packit_rpm/${PACKIT_PROJECT_NAME_VERSION}.tar.gz'" | |
43 | ||
44 | # Available targets can be listed via `copr-cli list-chroots` | |
45 | jobs: | |
46 | # Build test | |
922399bc TW |
47 | - &copr |
48 | job: copr_build | |
8620d41a FS |
49 | trigger: pull_request |
50 | targets: | |
51 | - fedora-rawhide-aarch64 | |
52 | - fedora-rawhide-i386 | |
53 | - fedora-rawhide-ppc64le | |
54 | - fedora-rawhide-s390x | |
55 | - fedora-rawhide-x86_64 | |
922399bc TW |
56 | - <<: *copr |
57 | trigger: commit | |
58 | branch: master | |
59 | - <<: *copr | |
60 | trigger: release |