From 3fed54cdccdcab8548e47eac781f686c3303cdd8 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 29 Sep 2023 10:11:44 -0400 Subject: [PATCH] Use `Requires(meta): (rpm-plugin-selinux if rpm-libs)` We support two ways to update the operating system: - `/usr/bin/rpm` (and `dnf` etc.) where SELinux labels are computed and written client side - ostree (and other image-based systems) where SELinux labels were computed server side. In the ostree case, I'd like the ability to generate smaller images that do not even have `rpm` installed. This hard dependency from `selinux-policy` -> `rpm` is one of the only main blockers. RPM supports these "alternative" conditionals, it's easy to do. Related: RHEL-54303 --- selinux-policy.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selinux-policy.spec b/selinux-policy.spec index 5c7a79df..48f44d7b 100644 --- a/selinux-policy.spec +++ b/selinux-policy.spec @@ -69,7 +69,7 @@ BuildRequires: make BuildRequires: systemd-rpm-macros Requires(pre): policycoreutils >= %{POLICYCOREUTILSVER} Requires(post): /bin/awk /usr/bin/sha512sum -Requires(meta): rpm-plugin-selinux +Requires(meta): (rpm-plugin-selinux if rpm-libs) Requires: selinux-policy-any = %{version}-%{release} Provides: selinux-policy-base = %{version}-%{release} Suggests: selinux-policy-targeted