Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions subscription-manager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
# Plugin for container (docker, podman) is not supported on RHEL
%if 0%{?rhel}
%global use_container_plugin 0
%global use_dnf 1
%elif 0%{?fedora}
%global use_container_plugin 1
%global use_dnf 0
%else
%global use_container_plugin 1
%global use_dnf 0
%endif
Comment on lines 6 to 16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rather than overloading/nesting this %if (which is documented to be only for use_container_plugin, simply change the definition of the %global use_dnf below, removing the fedora check


%global dmidecode_arches %{ix86} x86_64 aarch64
Expand All @@ -23,8 +28,7 @@
%global use_inotify 0
%endif

%global use_dnf (0%{?fedora} || (0%{?rhel}))
%global create_libdnf_rpm (0%{?fedora} || 0%{?rhel} > 8)
%global create_libdnf_rpm (0%{?rhel} > 8)

%global python_sitearch %python3_sitearch
%global python_sitelib %python3_sitelib
Expand Down Expand Up @@ -96,7 +100,7 @@

Name: subscription-manager
Version: 1.30.6
Release: 1%{?dist}
Release: 2%{?dist}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated, please remove; while I get you need it for local testing, it is not needed upstream

Summary: Tools and libraries for subscription and repository management
%if 0%{?suse_version}
Group: Productivity/Networking/System
Expand Down Expand Up @@ -161,6 +165,7 @@ Requires: platform-python-setuptools
%endif

%if %{use_dnf}

%if %{create_libdnf_rpm}
Requires: python3-dnf
Requires: python3-dnf-plugins-core
Expand All @@ -174,6 +179,12 @@ Obsoletes: dnf-plugin-subscription-manager < 1.29.0
%else
Requires: dnf-plugin-subscription-manager = %{version}-%{release}
%endif

%else

Obsoletes: dnf-plugin-subscription-manager < 1.30.5-2
Obsoletes: libdnf-plugin-subscription-manager < 1.30.5-2

%endif

%if %use_inotify
Expand Down Expand Up @@ -258,7 +269,7 @@ e.g. microdnf.
%package -n dnf-plugin-subscription-manager
Summary: Subscription Manager plugins for DNF

%if (0%{?fedora} || 0%{?rhel})
%if 0%{?rhel}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems like this %if ought to use an existing variable (use_dnf, I think?), rather than duplicating a condition

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit is probably in conflict with main branch and it is not needed anymore. This block was moved. See: 518a929

BuildRequires: cmake
BuildRequires: gcc
BuildRequires: json-c-devel
Expand Down