From 4bf1a07a050e055b248baf865b1c3ece5108d11e Mon Sep 17 00:00:00 2001 From: Jan Kolarik Date: Tue, 2 Apr 2024 09:01:25 +0000 Subject: [PATCH] man: Prepare pages for dnf5 switch --- dnf-plugins-core.spec | 79 ++++++++++++++++++++++++++++++++++++++++--- doc/CMakeLists.txt | 46 ++++++++++++------------- doc/conf.py | 46 ++++++++++++------------- 3 files changed, 120 insertions(+), 51 deletions(-) diff --git a/dnf-plugins-core.spec b/dnf-plugins-core.spec index 206395e4..1c78a81d 100644 --- a/dnf-plugins-core.spec +++ b/dnf-plugins-core.spec @@ -8,6 +8,8 @@ %define __cmake_in_source_build 1 +%bcond dnf5_obsoletes_dnf %[0%{?fedora} > 41 || 0%{?rhel} > 11] + %if 0%{?rhel} && 0%{?rhel} <= 7 %bcond_with python3 %else @@ -33,7 +35,7 @@ %endif Name: dnf-plugins-core -Version: 4.6.0 +Version: 4.7.0 Release: 1%{?dist} Summary: Core Plugins for DNF License: GPL-2.0-or-later @@ -496,8 +498,16 @@ pushd %{buildroot}%{_unitdir}/system-update.target.wants/ ln -sr ../dnf-system-upgrade.service popd -ln -sf %{_mandir}/man8/dnf-system-upgrade.8.gz %{buildroot}%{_mandir}/man8/dnf-offline-upgrade.8.gz -ln -sf %{_mandir}/man8/dnf-system-upgrade.8.gz %{buildroot}%{_mandir}/man8/dnf-offline-distrosync.8.gz +ln -sf %{_mandir}/man8/dnf4-system-upgrade.8.gz %{buildroot}%{_mandir}/man8/dnf4-offline-upgrade.8.gz +ln -sf %{_mandir}/man8/dnf4-system-upgrade.8.gz %{buildroot}%{_mandir}/man8/dnf4-offline-distrosync.8.gz +%endif + +%if %{without dnf5_obsoletes_dnf} +for file in %{buildroot}%{_mandir}/man8/dnf4[-.]*; do + dir=$(dirname $file) + filename=$(basename $file) + ln -sr $file $dir/${filename/dnf4/dnf} +done %endif %find_lang %{name} @@ -549,6 +559,25 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/ %endif %files +%{_mandir}/man8/dnf4-builddep.* +%{_mandir}/man8/dnf4-changelog.* +%{_mandir}/man8/dnf4-config-manager.* +%{_mandir}/man8/dnf4-copr.* +%{_mandir}/man8/dnf4-debug.* +%{_mandir}/man8/dnf4-debuginfo-install.* +%{_mandir}/man8/dnf4-download.* +%{_mandir}/man8/dnf4-generate_completion_cache.* +%{_mandir}/man8/dnf4-groups-manager.* +%{_mandir}/man8/dnf4-needs-restarting.* +%{_mandir}/man8/dnf4-repoclosure.* +%{_mandir}/man8/dnf4-repodiff.* +%{_mandir}/man8/dnf4-repograph.* +%{_mandir}/man8/dnf4-repomanage.* +%{_mandir}/man8/dnf4-reposync.* +%{_mandir}/man8/dnf4-system-upgrade.* +%{_mandir}/man8/dnf4-offline-upgrade.* +%{_mandir}/man8/dnf4-offline-distrosync.* +%if %{without dnf5_obsoletes_dnf} %{_mandir}/man8/dnf-builddep.* %{_mandir}/man8/dnf-changelog.* %{_mandir}/man8/dnf-config-manager.* @@ -567,6 +596,7 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/ %{_mandir}/man8/dnf-system-upgrade.* %{_mandir}/man8/dnf-offline-upgrade.* %{_mandir}/man8/dnf-offline-distrosync.* +%endif %if %{with yumcompatibility} %{_mandir}/man1/yum-changelog.* %{_mandir}/man8/yum-copr.* @@ -712,18 +742,24 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/ %if %{with python2} %files -n python2-dnf-plugin-leaves %{python2_sitelib}/dnf-plugins/leaves.* +%{_mandir}/man8/dnf4-leaves.* +%if %{without dnf5_obsoletes_dnf} %{_mandir}/man8/dnf-leaves.* %endif +%endif %if %{with python3} %files -n python3-dnf-plugin-leaves %{python3_sitelib}/dnf-plugins/leaves.* %{python3_sitelib}/dnf-plugins/__pycache__/leaves.* +%{_mandir}/man8/dnf4-leaves.* +%if %{without dnf5_obsoletes_dnf} %{_mandir}/man8/dnf-leaves.* %endif +%endif %else -%exclude %{_mandir}/man8/dnf-leaves.* +%exclude %{_mandir}/man8/dnf4-leaves.* %if %{with python2} %exclude %{python2_sitelib}/dnf-plugins/leaves.* %endif @@ -738,16 +774,22 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/ %files -n python2-dnf-plugin-local %config(noreplace) %{_sysconfdir}/dnf/plugins/local.conf %{python2_sitelib}/dnf-plugins/local.* +%{_mandir}/man8/dnf4-local.* +%if %{without dnf5_obsoletes_dnf} %{_mandir}/man8/dnf-local.* %endif +%endif %if %{with python3} && 0%{?rhel} == 0 %files -n python3-dnf-plugin-local %config(noreplace) %{_sysconfdir}/dnf/plugins/local.conf %{python3_sitelib}/dnf-plugins/local.* %{python3_sitelib}/dnf-plugins/__pycache__/local.* +%{_mandir}/man8/dnf4-local.* +%if %{without dnf5_obsoletes_dnf} %{_mandir}/man8/dnf-local.* %endif +%endif %if %{with python2} %files -n python2-dnf-plugin-migrate @@ -762,8 +804,11 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/ %config(noreplace) %{_sysconfdir}/dnf/plugins/post-transaction-actions.conf %config(noreplace) %{_sysconfdir}/dnf/plugins/post-transaction-actions.d %{python2_sitelib}/dnf-plugins/post-transaction-actions.* +%{_mandir}/man8/dnf4-post-transaction-actions.* +%if %{without dnf5_obsoletes_dnf} %{_mandir}/man8/dnf-post-transaction-actions.* %endif +%endif %if %{with python3} %files -n python3-dnf-plugin-post-transaction-actions @@ -771,16 +816,22 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/ %config(noreplace) %{_sysconfdir}/dnf/plugins/post-transaction-actions.d %{python3_sitelib}/dnf-plugins/post-transaction-actions.* %{python3_sitelib}/dnf-plugins/__pycache__/post-transaction-actions.* +%{_mandir}/man8/dnf4-post-transaction-actions.* +%if %{without dnf5_obsoletes_dnf} %{_mandir}/man8/dnf-post-transaction-actions.* %endif +%endif %if %{with python2} %files -n python2-dnf-plugin-pre-transaction-actions %config(noreplace) %{_sysconfdir}/dnf/plugins/pre-transaction-actions.conf %config(noreplace) %{_sysconfdir}/dnf/plugins/pre-transaction-actions.d %{python2_sitelib}/dnf-plugins/pre-transaction-actions.* +%{_mandir}/man8/dnf4-pre-transaction-actions.* +%if %{without dnf5_obsoletes_dnf} %{_mandir}/man8/dnf-pre-transaction-actions.* %endif +%endif %if %{with python3} %files -n python3-dnf-plugin-pre-transaction-actions @@ -788,26 +839,35 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/ %config(noreplace) %{_sysconfdir}/dnf/plugins/pre-transaction-actions.d %{python3_sitelib}/dnf-plugins/pre-transaction-actions.* %{python3_sitelib}/dnf-plugins/__pycache__/pre-transaction-actions.* +%{_mandir}/man8/dnf4-pre-transaction-actions.* +%if %{without dnf5_obsoletes_dnf} %{_mandir}/man8/dnf-pre-transaction-actions.* %endif +%endif %if 0%{?rhel} == 0 %if %{with python2} %files -n python2-dnf-plugin-show-leaves %{python2_sitelib}/dnf-plugins/show_leaves.* +%{_mandir}/man8/dnf4-show-leaves.* +%if %{without dnf5_obsoletes_dnf} %{_mandir}/man8/dnf-show-leaves.* %endif +%endif %if %{with python3} %files -n python3-dnf-plugin-show-leaves %{python3_sitelib}/dnf-plugins/show_leaves.* %{python3_sitelib}/dnf-plugins/__pycache__/show_leaves.* +%{_mandir}/man8/dnf4-show-leaves.* +%if %{without dnf5_obsoletes_dnf} %{_mandir}/man8/dnf-show-leaves.* %endif +%endif %else -%exclude %{_mandir}/man8/dnf-show-leaves.* +%exclude %{_mandir}/man8/dnf4-show-leaves.* %if %{with python2} %exclude %{python2_sitelib}/dnf-plugins/show_leaves.* %endif @@ -823,7 +883,10 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/ %config(noreplace) %{_sysconfdir}/dnf/plugins/versionlock.conf %config(noreplace) %{_sysconfdir}/dnf/plugins/versionlock.list %{python2_sitelib}/dnf-plugins/versionlock.* +%{_mandir}/man8/dnf4-versionlock.* +%if %{without dnf5_obsoletes_dnf} %{_mandir}/man8/dnf-versionlock.* +%endif %if %{with yumcompatibility} %{_mandir}/man8/yum-versionlock.* %{_mandir}/man5/yum-versionlock.* @@ -839,7 +902,10 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/ %config(noreplace) %{_sysconfdir}/dnf/plugins/versionlock.list %{python3_sitelib}/dnf-plugins/versionlock.* %{python3_sitelib}/dnf-plugins/__pycache__/versionlock.* +%{_mandir}/man8/dnf4-versionlock.* +%if %{without dnf5_obsoletes_dnf} %{_mandir}/man8/dnf-versionlock.* +%endif %if %{with yumcompatibility} %{_mandir}/man8/yum-versionlock.* %{_mandir}/man5/yum-versionlock.* @@ -853,8 +919,11 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/ %files -n python3-dnf-plugin-modulesync %{python3_sitelib}/dnf-plugins/modulesync.* %{python3_sitelib}/dnf-plugins/__pycache__/modulesync.* +%{_mandir}/man8/dnf4-modulesync.* +%if %{without dnf5_obsoletes_dnf} %{_mandir}/man8/dnf-modulesync.* %endif +%endif %changelog * Tue Mar 26 2024 Evan Goode - 4.6.0-1 diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 1b04c900..9fd3f7c4 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -18,28 +18,28 @@ ADD_CUSTOM_TARGET (doc-man ADD_CUSTOM_TARGET (doc) ADD_DEPENDENCIES (doc doc-html doc-man) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/dnf-builddep.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-changelog.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-config-manager.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-copr.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-debug.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-debuginfo-install.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-download.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-generate_completion_cache.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-groups-manager.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-leaves.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-modulesync.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-needs-restarting.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-repoclosure.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-repodiff.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-repograph.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-repomanage.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-reposync.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-post-transaction-actions.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-pre-transaction-actions.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-show-leaves.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-system-upgrade.8 - ${CMAKE_CURRENT_BINARY_DIR}/dnf-versionlock.8 +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/dnf4-builddep.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-changelog.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-config-manager.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-copr.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-debug.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-debuginfo-install.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-download.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-generate_completion_cache.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-groups-manager.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-leaves.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-modulesync.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-needs-restarting.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-repoclosure.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-repodiff.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-repograph.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-repomanage.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-reposync.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-post-transaction-actions.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-pre-transaction-actions.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-show-leaves.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-system-upgrade.8 + ${CMAKE_CURRENT_BINARY_DIR}/dnf4-versionlock.8 ${CMAKE_CURRENT_BINARY_DIR}/yum-copr.8 ${CMAKE_CURRENT_BINARY_DIR}/yum-versionlock.8 DESTINATION share/man/man8) @@ -49,7 +49,7 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/dnf-migrate.8 endif() if (${WITHOUT_LOCAL} STREQUAL "0") -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/dnf-local.8 +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/dnf4-local.8 DESTINATION share/man/man8) endif() diff --git a/doc/conf.py b/doc/conf.py index f68571cc..ea14cbd7 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -242,32 +242,32 @@ def version_readout(): # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('builddep', 'dnf-builddep', u'DNF builddep Plugin', AUTHORS, 8), - ('changelog', 'dnf-changelog', u'DNF changelog Plugin', AUTHORS, 8), - ('config_manager', 'dnf-config-manager', u'DNF config-manager Plugin', AUTHORS, 8), - ('copr', 'dnf-copr', u'DNF copr Plugin', AUTHORS, 8), - ('debug', 'dnf-debug', u'DNF debug Plugin', AUTHORS, 8), - ('debuginfo-install', 'dnf-debuginfo-install', u'DNF debuginfo-install Plugin', AUTHORS, 8), - ('download', 'dnf-download', u'DNF download Plugin', AUTHORS, 8), - ('generate_completion_cache', 'dnf-generate_completion_cache', + ('builddep', 'dnf4-builddep', u'DNF builddep Plugin', AUTHORS, 8), + ('changelog', 'dnf4-changelog', u'DNF changelog Plugin', AUTHORS, 8), + ('config_manager', 'dnf4-config-manager', u'DNF config-manager Plugin', AUTHORS, 8), + ('copr', 'dnf4-copr', u'DNF copr Plugin', AUTHORS, 8), + ('debug', 'dnf4-debug', u'DNF debug Plugin', AUTHORS, 8), + ('debuginfo-install', 'dnf4-debuginfo-install', u'DNF debuginfo-install Plugin', AUTHORS, 8), + ('download', 'dnf4-download', u'DNF download Plugin', AUTHORS, 8), + ('generate_completion_cache', 'dnf4-generate_completion_cache', u'DNF generate_completion_cache Plugin', AUTHORS, 8), - ('groups-manager', 'dnf-groups-manager', u'DNF groups-manager Plugin', AUTHORS, 8), - ('leaves', 'dnf-leaves', u'DNF leaves Plugin', AUTHORS, 8), - ('local', 'dnf-local', u'DNF local Plugin', AUTHORS, 8), - ('modulesync', 'dnf-modulesync', u'DNF modulesync Plugin', AUTHORS, 8), - ('needs_restarting', 'dnf-needs-restarting', u'DNF needs_restarting Plugin', AUTHORS, 8), - ('repoclosure', 'dnf-repoclosure', u'DNF repoclosure Plugin', AUTHORS, 8), - ('repodiff', 'dnf-repodiff', u'DNF repodiff Plugin', AUTHORS, 8), - ('repograph', 'dnf-repograph', u'DNF repograph Plugin', AUTHORS, 8), - ('repomanage', 'dnf-repomanage', u'DNF repomanage Plugin', AUTHORS, 8), - ('reposync', 'dnf-reposync', u'DNF reposync Plugin', AUTHORS, 8), - ('post-transaction-actions', 'dnf-post-transaction-actions', + ('groups-manager', 'dnf4-groups-manager', u'DNF groups-manager Plugin', AUTHORS, 8), + ('leaves', 'dnf4-leaves', u'DNF leaves Plugin', AUTHORS, 8), + ('local', 'dnf4-local', u'DNF local Plugin', AUTHORS, 8), + ('modulesync', 'dnf4-modulesync', u'DNF modulesync Plugin', AUTHORS, 8), + ('needs_restarting', 'dnf4-needs-restarting', u'DNF needs_restarting Plugin', AUTHORS, 8), + ('repoclosure', 'dnf4-repoclosure', u'DNF repoclosure Plugin', AUTHORS, 8), + ('repodiff', 'dnf4-repodiff', u'DNF repodiff Plugin', AUTHORS, 8), + ('repograph', 'dnf4-repograph', u'DNF repograph Plugin', AUTHORS, 8), + ('repomanage', 'dnf4-repomanage', u'DNF repomanage Plugin', AUTHORS, 8), + ('reposync', 'dnf4-reposync', u'DNF reposync Plugin', AUTHORS, 8), + ('post-transaction-actions', 'dnf4-post-transaction-actions', u'DNF post transaction actions Plugin', AUTHORS, 8), - ('pre-transaction-actions', 'dnf-pre-transaction-actions', + ('pre-transaction-actions', 'dnf4-pre-transaction-actions', u'DNF pre transaction actions Plugin', AUTHORS, 8), - ('show-leaves', 'dnf-show-leaves', u'DNF show-leaves Plugin', AUTHORS, 8), - ('system-upgrade', 'dnf-system-upgrade', u'DNF system-upgrade Plugin', AUTHORS, 8), - ('versionlock', 'dnf-versionlock', u'DNF versionlock Plugin', AUTHORS, 8), + ('show-leaves', 'dnf4-show-leaves', u'DNF show-leaves Plugin', AUTHORS, 8), + ('system-upgrade', 'dnf4-system-upgrade', u'DNF system-upgrade Plugin', AUTHORS, 8), + ('versionlock', 'dnf4-versionlock', u'DNF versionlock Plugin', AUTHORS, 8), # yum3 compatible layer for manpages ('copr', 'yum-copr', u'redirecting to DNF copr Plugin', AUTHORS, 8),