Skip to content

Commit

Permalink
doc: Review and fix missing commands
Browse files Browse the repository at this point in the history
Review documentation, including adding documentation for missing commands and addressing deployment issues.
  • Loading branch information
jan-kolarik committed Mar 25, 2024
1 parent cfe15e1 commit 90390c5
Show file tree
Hide file tree
Showing 22 changed files with 575 additions and 80 deletions.
11 changes: 9 additions & 2 deletions dnf5.spec
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ It supports RPM packages, modulemd modules, and comps groups & environments.
%{_mandir}/man8/dnf5-advisory.8.*
%{_mandir}/man8/dnf5-autoremove.8.*
%{_mandir}/man8/dnf5-check.8.*
%{_mandir}/man8/dnf5-check-upgrade.8.*
%{_mandir}/man8/dnf5-clean.8.*
%{_mandir}/man8/dnf5-distro-sync.8.*
%{_mandir}/man8/dnf5-downgrade.8.*
Expand All @@ -291,20 +292,24 @@ It supports RPM packages, modulemd modules, and comps groups & environments.
%{_mandir}/man8/dnf5-group.8.*
# TODO(jkolarik): history is not ready yet
# %%{_mandir}/man8/dnf5-history.8.*
%{_mandir}/man8/dnf5-info.8.*
%{_mandir}/man8/dnf5-install.8.*
%{_mandir}/man8/dnf5-leaves.8.*
%{_mandir}/man8/dnf5-list.8.*
%{_mandir}/man8/dnf5-makecache.8.*
%{_mandir}/man8/dnf5-mark.8.*
# TODO(jkolarik): module is not ready yet
# %%{_mandir}/man8/dnf5-module.8.*
%{_mandir}/man8/dnf5-module.8.*
%{_mandir}/man8/dnf5-offline.8.*
%{_mandir}/man8/dnf5-provides.8.*
%{_mandir}/man8/dnf5-reinstall.8.*
%{_mandir}/man8/dnf5-remove.8.*
%{_mandir}/man8/dnf5-repo.8.*
%{_mandir}/man8/dnf5-repoquery.8.*
%{_mandir}/man8/dnf5-search.8.*
%{_mandir}/man8/dnf5-swap.8.*
%{_mandir}/man8/dnf5-system-upgrade.8.*
%{_mandir}/man8/dnf5-upgrade.8.*
%{_mandir}/man8/dnf5-versionlock.8.*
%{_mandir}/man7/dnf5-aliases.7.*
%{_mandir}/man7/dnf5-caching.7.*
%{_mandir}/man7/dnf5-comps.7.*
Expand Down Expand Up @@ -700,6 +705,7 @@ config-manager, copr, and repoclosure commands.
%{_libdir}/dnf5/plugins/needs_restarting_cmd_plugin.so
%{_libdir}/dnf5/plugins/repoclosure_cmd_plugin.so
%{_mandir}/man8/dnf5-builddep.8.*
%{_mandir}/man8/dnf5-changelog.8.*
%{_mandir}/man8/dnf5-copr.8.*
%{_mandir}/man8/dnf5-needs-restarting.8.*
%{_mandir}/man8/dnf5-repoclosure.8.*
Expand Down Expand Up @@ -727,6 +733,7 @@ automatically and regularly from systemd timers, cron jobs or similar.
%files plugin-automatic -f dnf5-plugin-automatic.lang
%ghost %{_sysconfdir}/motd.d/dnf5-automatic
%{_libdir}/dnf5/plugins/automatic_cmd_plugin.so
%{_mandir}/man8/dnf5-automatic.8.*
%{_unitdir}/dnf5-automatic.service
%{_unitdir}/dnf5-automatic.timer
%{_unitdir}/dnf-automatic.service
Expand Down
11 changes: 9 additions & 2 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ if(WITH_MAN)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-advisory.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-autoremove.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-check.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-check-upgrade.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-clean.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-distro-sync.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-downgrade.8 DESTINATION share/man/man8)
Expand All @@ -66,20 +67,24 @@ if(WITH_MAN)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-group.8 DESTINATION share/man/man8)
# TODO(jkolarik): history is not ready yet
# install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-history.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-info.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-install.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-leaves.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-list.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-makecache.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-mark.8 DESTINATION share/man/man8)
# TODO(jkolarik): module is not ready yet
# install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-module.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-module.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-offline.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-provides.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-reinstall.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-remove.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-repo.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-repoquery.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-search.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-swap.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-system-upgrade.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-upgrade.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-versionlock.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-aliases.7 DESTINATION share/man/man7)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-caching.7 DESTINATION share/man/man7)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-comps.7 DESTINATION share/man/man7)
Expand All @@ -92,7 +97,9 @@ if(WITH_MAN)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-specs.7 DESTINATION share/man/man7)

# plugin commands
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-automatic.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-builddep.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-changelog.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-copr.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-needs-restarting.8 DESTINATION share/man/man8)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-repoclosure.8 DESTINATION share/man/man8)
Expand Down
93 changes: 93 additions & 0 deletions doc/commands/check-upgrade.8.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
..
Copyright Contributors to the libdnf project.
This file is part of libdnf: https://github.com/rpm-software-management/libdnf/

Libdnf is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

Libdnf is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with libdnf. If not, see <https://www.gnu.org/licenses/>.

.. _check-upgrade_command_ref-label:

######################
Check-Upgrade Command
######################

Synopsis
========

``dnf5 check-upgrade [options] [<package-spec>...]``


Description
===========

Non-interactively checks for available updates of specified packages. If no ``<package-spec>``
is provided, it verifies updates for the entire system.

``DNF5`` will exit with code `100`` if updates are available and list them; `0` if no updates
are available.


Options
=======

``--changelogs``
| Print the package changelogs.
``--advisories=ADVISORY_NAME,...``
| Consider only content contained in advisories with specified name.
| This is a list option.
| Expected values are advisory IDs, e.g. `FEDORA-2201-123`.
``--advisory-severities=ADVISORY_SEVERITY,...``
| Consider only content contained in advisories with specified severity.
| This is a list option.
| Accepted values are: `critical`, `important`, `moderate`, `low`, `none`.
``--bzs=BUGZILLA_ID,...``
| Consider only content contained in advisories that fix a ticket of given Bugzilla ID.
| This is a list option.
| Expected values are numeric IDs, e.g. `123123`.
``--cves=CVE_ID,...``
| Consider only content contained in advisories that fix a ticket of given CVE (Common Vulnerabilities and Exposures) ID.
| This is a list option.
| Expected values are string IDs in CVE format, e.g. `CVE-2201-0123`.
``--security``
| Consider only content contained in security advisories.
``--bugfix``
| Consider only content contained in bugfix advisories.
``--enhancement``
| Consider only content contained in enhancement advisories.
``--newpackage``
| Consider only content contained in newpackage advisories.

Examples
========

``dnf5 check-upgrade``
| Print a list of packages that have updates available.
``dnf5 check-upgrade --changelogs``
| Print changelogs for all packages with pending updates.

See Also
========

| :manpage:`dnf5-specs(7)`, :ref:`Patterns specification <specs_misc_ref-label>`
4 changes: 2 additions & 2 deletions doc/commands/check.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

.. _check_command_ref-label:

####################
##############
Check Command
####################
##############

Synopsis
========
Expand Down
7 changes: 4 additions & 3 deletions doc/commands/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@ DNF5 Commands
advisory.8
autoremove.8
check.8
check-upgrade.8
clean.8
distro-sync.8
downgrade.8
download.8
environment.8
group.8
info.8
install.8
leaves.8
list.8
makecache.8
mark.8
module.8
offline.8
provides.8
reinstall.8
Expand All @@ -34,6 +38,3 @@ DNF5 Commands
..
# TODO(jkolarik): history not ready yet
history.8
# TODO(jkolarik): module not ready yet
module.8
78 changes: 78 additions & 0 deletions doc/commands/info.8.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
..
Copyright Contributors to the libdnf project.
This file is part of libdnf: https://github.com/rpm-software-management/libdnf/

Libdnf is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

Libdnf is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with libdnf. If not, see <https://www.gnu.org/licenses/>.

.. _info_command_ref-label:

#############
Info Command
#############

Synopsis
========

``dnf5 info [options] [<package-spec>...]``


Description
===========

Prints detailed information about packages based on the provided parameters.


Options
=======

``--showduplicates``
| Show all versions of the packages, not only the latest one.
``--installed``
| List only installed packages.
``--available``
| List only available packages.
``--extras``
| List only extras: packages installed on the system that are not available in any known repository.
``--obsoletes``
| List only packages installed on the system that are obsoleted by packages in any known repository.
``--recent``
| List only packages recently added to the repositories.
``--upgrades``
| List only available upgrades for installed packages.
``--autoremove``
| List only packages that will be removed by the :ref:`autoremove command <autoremove_command_ref-label>`.

Examples
========

``dnf5 info``
| Display detailed information about installed and available packages.
``dnf5 info --recent gnome*``
| Print information about recent packages whose names start with ``gnome``.

See Also
========

| :manpage:`dnf5-specs(7)`, :ref:`Patterns specification <specs_misc_ref-label>`
81 changes: 81 additions & 0 deletions doc/commands/list.8.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
..
Copyright Contributors to the libdnf project.
This file is part of libdnf: https://github.com/rpm-software-management/libdnf/

Libdnf is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

Libdnf is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with libdnf. If not, see <https://www.gnu.org/licenses/>.

.. _list_command_ref-label:

#############
List Command
#############

Synopsis
========

``dnf5 list [options] [<package-spec>...]``


Description
===========

Prints lists of packages based on the provided parameters.


Options
=======

``--showduplicates``
| Show all versions of the packages, not only the latest one.
``--installed``
| List only installed packages.
``--available``
| List only available packages.
``--extras``
| List only extras: packages installed on the system that are not available in any known repository.
``--obsoletes``
| List only packages installed on the system that are obsoleted by packages in any known repository.
``--recent``
| List only packages recently added to the repositories.
``--upgrades``
| List only available upgrades for installed packages.
``--autoremove``
| List only packages that will be removed by the :ref:`autoremove command <autoremove_command_ref-label>`.

Examples
========

``dnf5 list``
| List installed and available packages.
``dnf5 list --available --showduplicates``
| List all available packages, including all available versions.
``dnf5 list kernel*``
| List installed and available packages whose names start with ``kernel``.

See Also
========

| :manpage:`dnf5-specs(7)`, :ref:`Patterns specification <specs_misc_ref-label>`
Loading

0 comments on commit 90390c5

Please sign in to comment.