From 21fe0cefc3fd404753689631aff7af47a1879c66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 25 Jun 2024 12:51:07 +0200 Subject: [PATCH] Enable leaves and show-leaves plugins Resolves: RHEL-44922 --- ...ves-and-show-leaves-plugins-for-RHEL.patch | 117 ++++++++++++++++++ dnf-plugins-core.spec | 38 +----- 2 files changed, 123 insertions(+), 32 deletions(-) create mode 100644 0005-Enable-leaves-and-show-leaves-plugins-for-RHEL.patch diff --git a/0005-Enable-leaves-and-show-leaves-plugins-for-RHEL.patch b/0005-Enable-leaves-and-show-leaves-plugins-for-RHEL.patch new file mode 100644 index 0000000..9515c4f --- /dev/null +++ b/0005-Enable-leaves-and-show-leaves-plugins-for-RHEL.patch @@ -0,0 +1,117 @@ +From 755a2a3cdbacfc1a5b632361c044be38164018fa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 25 Jun 2024 12:36:55 +0200 +Subject: [PATCH] Enable leaves and show-leaves plugins for RHEL +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This effectively reverts commit +8a7a02b1e9573d86f5e6a430c61bf514e4856d31 because RHEL enebles these +plugins since RHEL 9.3. + +Resolves: https://issues.redhat.com/browse/RHEL-44922 +Signed-off-by: Petr Písař +--- + dnf-plugins-core.spec | 36 ++++-------------------------------- + 1 file changed, 4 insertions(+), 32 deletions(-) + +diff --git a/dnf-plugins-core.spec b/dnf-plugins-core.spec +index 27933d1..bb06b8d 100644 +--- a/dnf-plugins-core.spec ++++ b/dnf-plugins-core.spec +@@ -231,7 +231,7 @@ repoquery, reposync, repotrack, repodiff, builddep, config-manager,%{?with_debug + download and yum-groups-manager that use new implementations using DNF. + %endif + +-%if 0%{?rhel} == 0 && %{with python2} ++%if %{with python2} + %package -n python2-dnf-plugin-leaves + Summary: Leaves Plugin for DNF + Requires: python2-%{name} = %{version}-%{release} +@@ -250,7 +250,7 @@ Leaves Plugin for DNF, Python 2 version. List all installed packages + not required by any other installed package. + %endif + +-%if 0%{?rhel} == 0 && %{with python3} ++%if %{with python3} + %package -n python3-dnf-plugin-leaves + Summary: Leaves Plugin for DNF + Requires: python3-%{name} = %{version}-%{release} +@@ -376,7 +376,7 @@ Pre transaction actions Plugin for DNF, Python 3 version. Plugin runs actions + files. + %endif + +-%if 0%{?rhel} == 0 && %{with python2} ++%if %{with python2} + %package -n python2-dnf-plugin-show-leaves + Summary: Leaves Plugin for DNF + Requires: python2-%{name} = %{version}-%{release} +@@ -397,7 +397,7 @@ packages that are no longer required by any other installed package + after a transaction. + %endif + +-%if 0%{?rhel} == 0 && %{with python3} ++%if %{with python3} + %package -n python3-dnf-plugin-show-leaves + Summary: Show-leaves Plugin for DNF + Requires: python3-%{name} = %{version}-%{release} +@@ -755,8 +755,6 @@ ln -sf %{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/man1/repotrack.1 + %exclude %{_mandir}/man1/yum-utils.* + %endif + +-%if 0%{?rhel} == 0 +- + %if %{with python2} + %files -n python2-dnf-plugin-leaves + %{python2_sitelib}/dnf-plugins/leaves.* +@@ -770,18 +768,6 @@ ln -sf %{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/man1/repotrack.1 + %{_mandir}/man8/dnf*-leaves.* + %endif + +-%else +-%exclude %{_mandir}/man8/dnf*-leaves.* +-%if %{with python2} +-%exclude %{python2_sitelib}/dnf-plugins/leaves.* +-%endif +-%if %{with python3} +-%exclude %{python3_sitelib}/dnf-plugins/leaves.* +-%exclude %{python3_sitelib}/dnf-plugins/__pycache__/leaves.* +-%endif +-%endif +-# endif 0%%{?rhel} == 0 +- + %if 0%{?rhel} == 0 && %{with python2} + %files -n python2-dnf-plugin-local + %config(noreplace) %{_sysconfdir}/dnf/plugins/local.conf +@@ -839,8 +825,6 @@ ln -sf %{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/man1/repotrack.1 + %{_mandir}/man8/dnf*-pre-transaction-actions.* + %endif + +-%if 0%{?rhel} == 0 +- + %if %{with python2} + %files -n python2-dnf-plugin-show-leaves + %{python2_sitelib}/dnf-plugins/show_leaves.* +@@ -854,18 +838,6 @@ ln -sf %{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/man1/repotrack.1 + %{_mandir}/man8/dnf*-show-leaves.* + %endif + +-%else +-%exclude %{_mandir}/man8/dnf*-show-leaves.* +-%if %{with python2} +-%exclude %{python2_sitelib}/dnf-plugins/show_leaves.* +-%endif +-%if %{with python3} +-%exclude %{python3_sitelib}/dnf-plugins/show_leaves.* +-%exclude %{python3_sitelib}/dnf-plugins/__pycache__/show_leaves.* +-%endif +-%endif +-# endif 0%%{?rhel} == 0 +- + %if %{with python2} + %files -n python2-dnf-plugin-versionlock + %config(noreplace) %{_sysconfdir}/dnf/plugins/versionlock.conf +-- +2.45.2 + diff --git a/dnf-plugins-core.spec b/dnf-plugins-core.spec index 5955570..f38f7d2 100644 --- a/dnf-plugins-core.spec +++ b/dnf-plugins-core.spec @@ -51,6 +51,7 @@ Patch1: 0001-needs-restarting-Revert-using-systemd-start-time.patch Patch2: 0002-spec-Fix-symbolic-links-to-packaged-files.patch Patch3: 0003-build-Disable-debug-plugin-on-Fedora-40-and-RHEL-9.patch Patch4: 0004-s-Differnt-Different.patch +Patch5: 0005-Enable-leaves-and-show-leaves-plugins-for-RHEL.patch BuildArch: noarch BuildRequires: cmake BuildRequires: gettext @@ -235,7 +236,7 @@ repoquery, reposync, repotrack, repodiff, builddep, config-manager,%{?with_debug download and yum-groups-manager that use new implementations using DNF. %endif -%if 0%{?rhel} == 0 && %{with python2} +%if %{with python2} %package -n python2-dnf-plugin-leaves Summary: Leaves Plugin for DNF Requires: python2-%{name} = %{version}-%{release} @@ -254,7 +255,7 @@ Leaves Plugin for DNF, Python 2 version. List all installed packages not required by any other installed package. %endif -%if 0%{?rhel} == 0 && %{with python3} +%if %{with python3} %package -n python3-dnf-plugin-leaves Summary: Leaves Plugin for DNF Requires: python3-%{name} = %{version}-%{release} @@ -380,7 +381,7 @@ Pre transaction actions Plugin for DNF, Python 3 version. Plugin runs actions files. %endif -%if 0%{?rhel} == 0 && %{with python2} +%if %{with python2} %package -n python2-dnf-plugin-show-leaves Summary: Leaves Plugin for DNF Requires: python2-%{name} = %{version}-%{release} @@ -401,7 +402,7 @@ packages that are no longer required by any other installed package after a transaction. %endif -%if 0%{?rhel} == 0 && %{with python3} +%if %{with python3} %package -n python3-dnf-plugin-show-leaves Summary: Show-leaves Plugin for DNF Requires: python3-%{name} = %{version}-%{release} @@ -759,8 +760,6 @@ ln -sf %{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/man1/repotrack.1 %exclude %{_mandir}/man1/yum-utils.* %endif -%if 0%{?rhel} == 0 - %if %{with python2} %files -n python2-dnf-plugin-leaves %{python2_sitelib}/dnf-plugins/leaves.* @@ -774,18 +773,6 @@ ln -sf %{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/man1/repotrack.1 %{_mandir}/man8/dnf*-leaves.* %endif -%else -%exclude %{_mandir}/man8/dnf*-leaves.* -%if %{with python2} -%exclude %{python2_sitelib}/dnf-plugins/leaves.* -%endif -%if %{with python3} -%exclude %{python3_sitelib}/dnf-plugins/leaves.* -%exclude %{python3_sitelib}/dnf-plugins/__pycache__/leaves.* -%endif -%endif -# endif 0%%{?rhel} == 0 - %if 0%{?rhel} == 0 && %{with python2} %files -n python2-dnf-plugin-local %config(noreplace) %{_sysconfdir}/dnf/plugins/local.conf @@ -843,8 +830,6 @@ ln -sf %{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/man1/repotrack.1 %{_mandir}/man8/dnf*-pre-transaction-actions.* %endif -%if 0%{?rhel} == 0 - %if %{with python2} %files -n python2-dnf-plugin-show-leaves %{python2_sitelib}/dnf-plugins/show_leaves.* @@ -858,18 +843,6 @@ ln -sf %{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/man1/repotrack.1 %{_mandir}/man8/dnf*-show-leaves.* %endif -%else -%exclude %{_mandir}/man8/dnf*-show-leaves.* -%if %{with python2} -%exclude %{python2_sitelib}/dnf-plugins/show_leaves.* -%endif -%if %{with python3} -%exclude %{python3_sitelib}/dnf-plugins/show_leaves.* -%exclude %{python3_sitelib}/dnf-plugins/__pycache__/show_leaves.* -%endif -%endif -# endif 0%%{?rhel} == 0 - %if %{with python2} %files -n python2-dnf-plugin-versionlock %config(noreplace) %{_sysconfdir}/dnf/plugins/versionlock.conf @@ -912,6 +885,7 @@ ln -sf %{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/man1/repotrack.1 * Tue Jul 09 2024 Petr Pisar - 4.7.0-5 - Remove debug plugin (i.e. dnf debug-dump and and debug-restore commands) (RHEL-23706) +- Enable leaves and show-leaves plugins (RHEL-44922) * Mon Jun 24 2024 Troy Dawson - 4.7.0-4 - Bump release for June 2024 mass rebuild