Blob Blame History Raw
From 322125be1b32e9fedb2a9ea25e6e9af5f255e225 Mon Sep 17 00:00:00 2001
From: Jaroslav Mracek <jmracek@redhat.com>
Date: Wed, 26 Jun 2019 14:56:00 +0200
Subject: [PATCH 1/2] [spec] Rename dnf-utils to yum-utils (RhBug:1722093)

https://bugzilla.redhat.com/show_bug.cgi?id=1722093
---
 dnf-plugins-core.spec | 29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/dnf-plugins-core.spec b/dnf-plugins-core.spec
index 154ee7f..be01cd2 100644
--- a/dnf-plugins-core.spec
+++ b/dnf-plugins-core.spec
@@ -1,6 +1,7 @@
 %{?!dnf_lowest_compatible: %global dnf_lowest_compatible 4.2.1}
 %global dnf_plugins_extra 2.0.0
 %global hawkey_version 0.34.0
+%global yum_utils_subpackage_name dnf-utils
 
 %if 0%{?rhel} && 0%{?rhel} <= 7
 %bcond_with python3
@@ -15,15 +16,16 @@
 %endif
 
 %if 0%{?rhel} > 7 || 0%{?fedora} > 30
+%global yum_utils_subpackage_name yum-utils
 %bcond_without yumcompatibility
 %else
 %bcond_with yumcompatibility
 %endif
 
 %if 0%{?rhel} && 0%{?rhel} <= 7
-%bcond_with dnfutils
+%bcond_with yumutils
 %else
-%bcond_without dnfutils
+%bcond_without yumutils
 %endif
 
 Name:           dnf-plugins-core
@@ -161,12 +163,17 @@ repoclosure, repograph, repomanage, reposync, changelog and repodiff commands.
 Additionally provides generate_completion_cache passive plugin.
 %endif
 
-%if %{with dnfutils}
-%package -n dnf-utils
+%if %{with yumutils}
+%package -n %{yum_utils_subpackage_name}
+%if "%{yum_utils_subpackage_name}" == "dnf-utils"
 Conflicts:      yum-utils < 1.1.31-513
 %if 0%{?rhel} != 7
 Provides:       yum-utils = %{version}-%{release}
 %endif
+%else
+Provides:       dnf-utils = %{version}-%{release}
+Obsoletes:      dnf-utils < %{version}-%{release}
+%endif
 Requires:       dnf >= %{dnf_lowest_compatible}
 Requires:       %{name} = %{version}-%{release}
 %if %{with python3}
@@ -176,7 +183,7 @@ Requires:       python2-dnf >= %{dnf_lowest_compatible}
 %endif
 Summary:        Yum-utils CLI compatibility layer
 
-%description -n dnf-utils
+%description -n %{yum_utils_subpackage_name}
 As a Yum-utils CLI compatibility layer, supplies in CLI shims for
 debuginfo-install, repograph, package-cleanup, repoclosure, repomanage,
 repoquery, reposync, repotrack, repodiff, builddep, config-manager, debug
@@ -393,7 +400,7 @@ pushd build-py3
 popd
 %endif
 %find_lang %{name}
-%if %{with dnfutils}
+%if %{with yumutils}
   %if %{with python3}
   mv %{buildroot}%{_libexecdir}/dnf-utils-3 %{buildroot}%{_libexecdir}/dnf-utils
   %else
@@ -402,7 +409,7 @@ popd
 %endif
 rm -vf %{buildroot}%{_libexecdir}/dnf-utils-*
 
-%if %{with dnfutils}
+%if %{with yumutils}
 mkdir -p %{buildroot}%{_bindir}
 ln -sf %{_libexecdir}/dnf-utils %{buildroot}%{_bindir}/debuginfo-install
 ln -sf %{_libexecdir}/dnf-utils %{buildroot}%{_bindir}/needs-restarting
@@ -523,8 +530,8 @@ PYTHONPATH=./plugins nosetests-%{python3_version} -s tests/
 %{python3_sitelib}/dnfpluginscore/
 %endif
 
-%if %{with dnfutils}
-%files -n dnf-utils
+%if %{with yumutils}
+%files -n %{yum_utils_subpackage_name}
 %{_libexecdir}/dnf-utils
 %{_bindir}/debuginfo-install
 %{_bindir}/needs-restarting
@@ -556,13 +563,13 @@ PYTHONPATH=./plugins nosetests-%{python3_version} -s tests/
 %{_mandir}/man1/yumdownloader.*
 %{_mandir}/man1/package-cleanup.*
 %{_mandir}/man1/dnf-utils.*
-# These are only built with dnfutils bcond.
+# These are only built with yumutils bcond.
 %{_mandir}/man1/find-repos-of-install.*
 %{_mandir}/man1/repoquery.*
 %{_mandir}/man1/repotrack.*
 %{_mandir}/man1/yum-utils.*
 %else
-# These are built regardless of dnfutils bcond so we need to exclude them.
+# These are built regardless of yumutils bcond so we need to exclude them.
 %exclude %{_mandir}/man1/debuginfo-install.*
 %exclude %{_mandir}/man1/needs-restarting.*
 %exclude %{_mandir}/man1/repo-graph.*
-- 
2.21.0


From a58ded1019343ea50cf40bd94ad6aaf69fa91a37 Mon Sep 17 00:00:00 2001
From: Jaroslav Mracek <jmracek@redhat.com>
Date: Thu, 27 Jun 2019 09:22:29 +0200
Subject: [PATCH 2/2] [doc] Changed header in dnf-utils/yum-utils documentation
 (RhBug:1722093)

The documentation is mainly yum-utils description and package from
Fedora 31 is going to be renamed to yum-utils, therefore the primary
name in documentation should be yum-utils.

https://bugzilla.redhat.com/show_bug.cgi?id=1722093
---
 doc/dnf-utils.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/dnf-utils.rst b/doc/dnf-utils.rst
index 02dfc1d..311e980 100644
--- a/doc/dnf-utils.rst
+++ b/doc/dnf-utils.rst
@@ -1,8 +1,8 @@
 =========
-DNF Utils
+YUM Utils
 =========
 
-The main purpose of these shims is ensuring backward compatibility.
+The main purpose of these shims is ensuring backward compatibility with yum-3.
 
 --------------
 Shell Commands
-- 
2.21.0