From fbdd6c09696c324556688b97e064fcf67da8f107 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 20 Jan 2025 15:29:06 -0500 Subject: [PATCH] spec: Add version conditionals This should fix https://github.com/containers/bootc/issues/1033 by ensuring the copr builds use the same logic. (It's so annoying that we have default branching on packages, but keeping them in sync is so annoying in general that we end up merging, which defeats the reason for having branches at all, and so we end up with these version conditionals anyways) --- packaging/rpm-ostree.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packaging/rpm-ostree.spec b/packaging/rpm-ostree.spec index 46a476ac80..a6e9bb04ce 100644 --- a/packaging/rpm-ostree.spec +++ b/packaging/rpm-ostree.spec @@ -27,8 +27,14 @@ BuildRequires: rust %bcond_with sanitizers # Embedded unit tests %bcond_with bin_unit_tests -# Don't add the ostree-container binaries -%bcond_without ostree_ext + +# Don't add the ostree-container binaries; this version +# conditional needs to be kept in sync with the bootc one. +%if 0%{?rhel} >= 10 || 0%{?fedora} > 41 + %bcond_with ostree_ext +%else + %bcond_without ostree_ext +%endif # This is copied from the libdnf spec %if 0%{?rhel} && ! 0%{?centos}