Go to file
Petr Písař b7eb2e399c automatic: Fix detecting releasever_minor
When running dnf-automatic in RHEL 10.0 where releasever_minor should
default to "0", releasever_minor variable was incorrectly detected as
undefined. That led to expanding a metalink for an EPEL repository to
a wrong URL.

The cause was a bad logic in updating the release, releasever_major,
and releasever_minor triplet in dnf.cli.cli.Cli._read_conf_file():
Setting release invalidates releasever_major and releasever_minor. At
the same time for backward compatibilty detected release only contains
the major number.

This bug did not manifest in "dnf upgrade" command because "dnf"
program does not explicitly construct dnf.Base() before calling
_read_conf_file(). That is dnf-automtic first detected releasever=10
and releasever_minor=0 when calling _setup_default_conf() via
dnf.Base(). But then _read_conf_file() called by dnf-automatic set
releasever again to 10, that rewrote releasever_minor to None and
then _read_conf_file() set releasever_minor to releasever_minor, i.e
to None.

This patch does not change the code flow to minimize regressions.
Instead it saves the original releasever_minor value to be able to
default to it again.

Resolve: #2259
2025-07-28 14:52:15 -04:00
.copr copr: Add Copr build files 2025-02-06 14:30:50 +01:00
.github ci: Remove "DNF CI" workflow 2025-06-12 20:39:50 +00:00
.tito Initialized to use tito. 2020-01-10 09:37:18 +01:00
bin Fix: No traceback when Python interpreter is running with -P 2024-04-29 12:48:30 +02:00
dnf automatic: Fix detecting releasever_minor 2025-07-28 14:52:15 -04:00
doc Add modularity deprecation warning to doc pages 2025-07-16 20:14:33 -04:00
etc spec: package /etc/dnf/usr_drift_protected_paths.d 2025-06-18 09:06:58 +02:00
po Update ko.po 2024-12-18 15:21:55 +01:00
scripts Fix python3.11 build: remove deprecated, update traceback regex 2022-01-12 12:58:49 +01:00
tests automatic: Fix detecting releasever_minor 2025-07-28 14:52:15 -04:00
.git-commit-template Introduce changelog metadata in commit messages 2020-07-27 12:54:04 +02:00
.gitignore Add missing entries `.gitignore` file 2025-05-14 12:25:13 +02:00
.packit.yaml Switch `centos-stream-9-x86_64` copr-builds to `centos-stream+epel-next-9-x86_64` 2025-06-20 10:42:59 +02:00
.pre-commit-config.yaml Add pre-commit checks 2023-11-30 13:00:02 +01:00
.readthedocs.yaml Add required `.readthedocs.yaml`, `conf.py` and set `sphinx_rtd_theme` 2024-02-09 13:25:45 +01:00
AUTHORS Add name and email to `AUTHORS` 2025-05-14 12:25:13 +02:00
CMakeLists.txt Fix building on CentOS 9 2025-04-08 16:46:47 +02:00
COPYING packaging: update COPYING. 2012-06-19 17:25:42 +02:00
PACKAGE-LICENSING docs: Replace Yum with YUM. 2018-04-27 08:58:50 +00:00
README.rst README: link to #dnf instead of #yum IRC 2025-04-11 14:13:32 +02:00
VERSION.cmake cli: Allow using destdir option for the new manifest plugin 2025-03-27 13:30:40 +01:00
dnf.spec spec: package /etc/dnf/usr_drift_protected_paths.d 2025-06-18 09:06:58 +02:00
setup.cfg Increase PEP8 line length to 120 chars 2020-06-30 11:32:48 +02:00
sideci.yml setup SideCI to ignore some PEP8 violations 2016-11-21 10:34:27 +00:00

README.rst

.. image:: https://translate.fedoraproject.org/widgets/dnf/-/dnf-master/svg-badge.svg
    :alt: Translation status
    :target: https://translate.fedoraproject.org/engage/dnf/?utm_source=widget

==================================================================================================================================================================================================
⚠️ **Notice:** This repository is for **DNF4** only. The current DNF version (DNF5) has its `own repo <https://github.com/rpm-software-management/dnf5>`_.
==================================================================================================================================================================================================


#################
 Dandified YUM 4
#################

.. image:: https://raw.githubusercontent.com/rpm-software-management/dnf/gh-pages/logos/DNF_logo.png
 
Dandified YUM 4 (DNF) is the 4th iteration of next upcoming major version of `YUM <http://yum.baseurl.org/>`_. It does package management using `RPM <http://rpm.org/>`_, `libsolv <https://github.com/openSUSE/libsolv>`_ and `hawkey <https://github.com/rpm-software-management/hawkey>`_ libraries. For metadata handling and package downloads it utilizes `librepo <https://github.com/tojaj/librepo>`_. To process and effectively handle the comps data it uses `libcomps <https://github.com/midnightercz/libcomps>`_.

Join us on IRC at ``#dnf`` on `Libera.Chat <https://libera.chat>`_. Questions should be asked there, issues discussed. Remember: ``#dnf`` is not a support channel, and prior research is expected from the questioner.

============
 Installing
============

DNF4 and all its dependencies are available in Fedora 18 and later, including the
rawhide Fedora.

Optionally you can use repositories with DNF nightly builds for last 2 stable Fedora versions available at copr://rpmsoftwaremanagement/dnf-nightly. You can enable the repository e.g. using:: 

    dnf copr enable rpmsoftwaremanagement/dnf-nightly

Then install DNF typing::

    sudo yum install dnf4

In other RPM-based distributions you need to build all the components from their
sources.

======================
 Building from source
======================

All commands should be run from the DNF git checkout directory.

To install the build dependencies::

    sudo dnf builddep dnf.spec

To build DNF::

    mkdir build;
    pushd build;
    cmake ..; # add '-DPYTHON_DESIRED="3"' option for Python 3 build
    make;
    popd;

To run DNF when compiled for Python2::

    PYTHONPATH=`readlink -f .` bin/dnf-2 <arguments>

To run DNF when compiled for Python3::

    PYTHONPATH=`readlink -f .` bin/dnf-3 <arguments>

If you want to build the manpages, use the option ``-DWITH_MAN=0`` with cmake.

Man pages will be located in ``build/doc`` and can be read with ``man -l``, e.g::

    man -l build/doc/dnf4.8

=============================
 Building and installing rpm
=============================

From the DNF git checkout directory::

    $ tito build --test --rpm
    # dnf install /tmp/tito/noarch/*

===============
 Running tests
===============

From the DNF git checkout directory::

    mkdir build;
    pushd build;
    cmake .. && make ARGS="-V" test;
    popd;

==============
 Contribution
==============

Here's the most direct way to get your work merged into the project.

1. Fork the project
#. Clone down your fork
#. Implement your feature or bug fix and commit changes
#. If the change fixes a bug at `Red Hat bugzilla <https://bugzilla.redhat.com/>`_, or if it is important to the end user, add the following block to the commit message::

    = changelog =
    msg:           message to be included in the changelog
    type:          one of: bugfix/enhancement/security (this field is required when message is present)
    resolves:      URLs to bugs or issues resolved by this commit (can be specified multiple times)
    related:       URLs to any related bugs or issues (can be specified multiple times)

   * For example::

       = changelog =
       msg: Verify GPG signatures when running dnf-automatic
       type: bugfix
       resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1793298

   * For your convenience, you can also use git commit template by running the following command in the top-level directory of this project::

       git config commit.template ./.git-commit-template

#. In special commit add your name and email under ``DNF CONTRIBUTORS`` section in `authors file <https://github.com/rpm-software-management/dnf/blob/master/AUTHORS>`_ as a reward for your generosity
#. Push the branch up to your fork
#. Send a pull request for your branch

Please, do not create the pull requests with translation (.po) files improvements. Fix the translation on `Fedora Weblate <https://translate.fedoraproject.org/projects/dnf/>`_ instead.

===============
 Documentation
===============

The DNF package distribution contains man pages, dnf(8) and dnf.conf(8). It is also possible to `read the DNF documentation <http://dnf.readthedocs.org>`_ online, the page includes API documentation. There's also a `wiki <https://github.com/rpm-software-management/dnf/wiki>`_ meant for contributors to DNF and related projects.

===============
 Bug reporting
===============

Please report discovered bugs to `GitHub Issues <https://github.com/rpm-software-management/dnf/issues>`_ or to the `Red Hat bugzilla <https://bugzilla.redhat.com/>`_. If you plan to propose the patch in the report, consider `Contribution`_ instead.