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
This commit is contained in:
Colin Walters 2023-09-29 10:11:44 -04:00 committed by Petr Lautrbach
parent ac73ffca09
commit 3fed54cdcc

View File

@ -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