Skip to content

Commit 9bab559

Browse files
committed
fix: Make subscription-manager RPM protected on RHEL
* Card ID: RHEL-7172 * The dnf has concept of protected RPM packages. All protected packages should have configuration files in /etc/dnf/protected.d/ directory. * Added simple configuration file containing subscription-manager * Modified .spec file to install this file only on RHEL Signed-off-by: Jiri Hnidek <jhnidek@redhat.com>
1 parent 6cf8800 commit 9bab559

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
subscription-manager

subscription-manager.spec

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,11 @@ make -f Makefile install VERSION=%{version}-%{release} \
347347
%{?subpackages} \
348348
%{?exclude_packages}
349349

350+
%if 0%{?rhel}
351+
mkdir -p %{buildroot}%{_sysconfdir}/dnf/protected.d
352+
install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/protected.d/subscription-manager.conf %{buildroot}%{_sysconfdir}/dnf/protected.d/subscription-manager.conf
353+
%endif
354+
350355
%if %{use_dnf}
351356
pushd src/plugins/libdnf
352357
mkdir -p %{buildroot}%{_libdir}/libdnf/plugins
@@ -444,6 +449,10 @@ find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \;
444449

445450
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/rhsm/rhsm.conf
446451

452+
%if 0%{?rhel}
453+
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/dnf/protected.d/subscription-manager.conf
454+
%endif
455+
447456
%if %{use_dnf}
448457
%ghost %{_sysconfdir}/yum.repos.d/redhat.repo
449458
%endif

0 commit comments

Comments
 (0)