diff --git a/rpm/SPECS/docker-ce-cli.spec b/rpm/SPECS/docker-ce-cli.spec index b27c1dacd5..ee7e16ead7 100644 --- a/rpm/SPECS/docker-ce-cli.spec +++ b/rpm/SPECS/docker-ce-cli.spec @@ -18,7 +18,15 @@ Requires: /bin/sh Requires: /usr/sbin/groupadd # TODO change once we support scan-plugin on other architectures %ifarch x86_64 +# CentOS 7 and RHEL 7 do not yet support weak dependencies +# +# Note that we're not using <= 7 here, to account for other RPM distros, such +# as Fedora, which would not have the rhel macro set (so default to 0). +%if 0%{?rhel} == 7 Requires: docker-scan-plugin(x86-64) +%else +Recommends: docker-scan-plugin(x86-64) +%endif %endif BuildRequires: make diff --git a/rpm/SPECS/docker-scan-plugin.spec b/rpm/SPECS/docker-scan-plugin.spec index 2549dd1b06..6cf24a8681 100644 --- a/rpm/SPECS/docker-scan-plugin.spec +++ b/rpm/SPECS/docker-scan-plugin.spec @@ -12,7 +12,13 @@ URL: https://github.com/docker/scan-cli-plugin/ Vendor: Docker Packager: Docker -Requires: docker-ce-cli +# CentOS 7 and RHEL 7 do not yet support weak dependencies. +# +# Note that we're not using <= 7 here, to account for other RPM distros, such +# as Fedora, which would not have the rhel macro set (so default to 0). +%if 0%{?rhel} != 7 +Enhances: docker-ce-cli +%endif # TODO change once we support scan-plugin on other architectures BuildArch: x86_64