Skip to content

Copr builds single .src.rpm for all OS versions, even if they need to differ #4088

@adelton

Description

@adelton

I my .spec file I had to add a conditional

 Patch5: edgetx-simulator-name.patch
 Patch6: build-simulator.sh.patch
+%if 0%{?fedora} >= 43
 Patch7: edgetx-miniz.patch
+%endif

to be able to build the rpm both on Fedora 42- and Fedora 43+.

However, https://copr.fedorainfracloud.org/coprs/adelton/edgetx-companion-2.11/build/9911873/ then failed on fedora-43-x86_64 with

RPM build errors:
error: Bad file: /builddir/build/SOURCES/edgetx-miniz.patch: No such file or directory
    Bad file: /builddir/build/SOURCES/edgetx-miniz.patch: No such file or directory

Looking at Source build logs, the .src.rpm was built only once, on Fedora 42, which is likely the reason the edgetx-miniz.patch did not get included.

I use the make_srpm mechanism to build the .src.rpm. How do I make copr to build separate .src.rpm on each target OS / Fedora version?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    In 2 years

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions