From Fedora Project Wiki

(added content from http://fedoraproject.org/wiki/Features/DwarfCompressor)
No edit summary
(17 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{header|docs}}
{{header|docs}}{{Docs_beat_closed}}
{{Docs_beat_open}}
 
[[Category:Docs Project]]
[[Category:Docs Project]]
[[Category:Draft documentation]]
[[Category:Draft documentation]]
[[Category:Documentation beats]]
[[Category:Documentation beats]]
== yum replaced by dnf ==
The `yum` package manager has been replaced in Fedora 22 by its successor, dnf.  The yum fork has been available in Fedora for testing since Fedora 18, and is now the default command line package manager.
Most dnf commands use directives that are familiar to yum users, and it uses the same RPM package repositories.  Behind the scenes, dnf uses an improved dependency solver, `hawkey`, along with `librepo` for repository operations and `libcomps` for package groups.
=== dnf behavior ===
The behavior of dnf differs from yum in some areas:
==== Updates that don't work are skipped ====
If a portion of a transaction is not viable, dnf will automatically exclude it and transparently continue with the portions that will work.  For example, if a package has unmet dependencies during a `dnf update` action, that package will not be updated, but others will.  This is similar to yum's "--skip-broken" directive, but evaluates the impact of the problem against the entire transaction.  Because this is the default behavior, there is no "--skip-broken" switch for dnf.
To review details about a problematic package direction, you can use the "--best" option. `dnf update --best` will force dnf to resolve the transaction using the latest versions of involved packages, and report any problems instead of skipping them.
==== Repos that don't work are skipped ====
If a configured and enabled repository does not respond, dnf will skip it and continue the transaction with the available repos.  This differs from yum, which would immediately stop if a repository was not available.
==== Update and Upgrade are the same ====
The commands `dnf update` and `dnf upgrade` are equivalent.  This  differs from yum, where `yum upgrade` would have the same effect as `yum update --obsoletes`, and take obsolete packages into account.
==== Dependencies are not upgraded on package installation ====
When installing a new package, previously installed dependencies will not be upgraded.  Yum offered an option for this behavior, '''upgrade_requirements_on_install'''.  To upgrade with dnf, use `dnf update`.
==== Clean on remove ====
When removing a package, dnf will automatically remove any dependent packages that were not explicitly installed by the user.  If a package was independently installed, it won't be uninstalled this way.
This behavior is configured by the "clean_requirements_on_remove" option in /etc/dnf/dnf.conf.
==== Repo cache refresh schedule ====
By default, dnf will check for updates in configured repositories hourly, starting ten minutes after the system boots.  The action is controlled by a systemd timer unit, /usr/lib/systemd/system/dnf-makecache.timer. 
To adjust this, copy the timer file to /etc/systemd/system/dnf-makecache.timer and edit it.
Alternatively, setting the '''metadata_timer_sync''' in /etc/dnf/dnf.conf to a number of seconds configures the minimum number of seconds between makecache operations.  If the timer has not expired, `dnf makecache` will exit immediately.


= dnf greets Fedora =
dnf will also honor the '''metadata_expire''' option set in individual repo configs, and refresh repo metadata at runtime if it is too old. This option is described in `man yum.conf`.
'''dnf''' is a fork of the venerable '''yum''' package manager. It is build on '''hawkey''',  a library allowing clients to query and resolve dependencies of RPM packages based on the current state of RPMDB and yum repositories.


'''dnf''' in Fedora 18 is a technical preview, and is installed alongside yum. It should not yet be used on critical production machines, but early adopters are promised a more efficient, faster package management utility.
==== Repository Actions =====
   
The "repository-packages" directive can be used to search for or get info about packages in a specific repository, list installed packages frrom that repository, and more.  This simplifies operations that would have required use of "--excluderepo" and "--includerepo" options with yum, and is especially useful for managing similar packages from different repositories.
= Dwarf Compressor compacts debug files =
Fedora 18 debuginfo has been post-processed by a DWARF compressor tool to reduce size of the *.debug files.


= systemctl assumes it works with services =
==== Listing dependencies ====
systemctl, the utility used to administer services and other systemd targets, will now assume that it is working with a service. Administrators will no longer have to append '.service' to the name of the daemon they are administering. For example, `systemctl restart dhcpd` will now just work, but previous releases required `systemctl restart dhcpd.service`.
To find out what package supplies a particular provide, use the `dnf provides foo` command.  This replaces `yum resolvedep foo`.


= Terminals get more colorful =
To list the dependencies of a package, use `dnf repoquery --requires foo`This replaces `yum deplist foo`.
Fedora now enables supporting terminal emulators to use 256 colors. With new environment variables, applications such as gnome-terminal, konsole, and screen will automatically be enabled with 256 color support. Other applications can display 256 colors but must be configured.


= Remote management gets better with Agent-Free Systems Management =
==== dnf will remove kernels ====
On systems that contain IPMI compliant Service Processors, it is now possible to have closer integration of OS and Service Processor without the need for 3rd party software. This will enable better management of the system remotely.
kernel packages are not protected by dnf.  Unlike with yum, you can remove all kernel packages, including the running package, if you direct it to.  Be cautious with removing kernels, and specify the full package and version


= WBEM and CIF management tools extended =
==== Replacing packages ====
'''WEBM''' and '''CIF''' are two of the DTMF standards for enterprise system management. With Fedora 18, this class of software is greatly expanded manage as well as monitor remote systems.
When a system requires the capabilities of a package you want to replace, use the '''--allowerasing''' option. For example, `dnf --allowerasing mariadb` will allow you to replace mysql with mariadb, without disrupting packages that require capabilities provided by both packages.  This replaces `yum shell` and `yum swap` functionality.


Administrators can use these utilities to administer network interfaces, storage objects, services, power state, users, and software packages. They can also monitor system load, usage, and more. 
=== DNF reading ===


All of this functionality can be accessed through a web or command line interface that efficiently handles large numbers of systems. Documentation is provided with '''sblim-cmpi-*''' or  '''cura-*''' packages.
* Upstream documentation at http://dnf.readthedocs.org/en/latest/index.html
* Plugins documented at https://rpm-software-management.github.io/dnf-plugins-extras/index.html

Revision as of 20:09, 9 April 2015

DocsProject Header docTeam1.png
Warning.png
Beat Closed on Wiki
Work on beats has now moved to git at https://pagure.io/fedora-docs/release-notes. If you have changes or additions, please contact the docs team via #fedora-docs, docs@lists.fedoraproject.org, or with the release-notes BZ component.

yum replaced by dnf

The yum package manager has been replaced in Fedora 22 by its successor, dnf. The yum fork has been available in Fedora for testing since Fedora 18, and is now the default command line package manager.

Most dnf commands use directives that are familiar to yum users, and it uses the same RPM package repositories. Behind the scenes, dnf uses an improved dependency solver, hawkey, along with librepo for repository operations and libcomps for package groups.

dnf behavior

The behavior of dnf differs from yum in some areas:

Updates that don't work are skipped

If a portion of a transaction is not viable, dnf will automatically exclude it and transparently continue with the portions that will work. For example, if a package has unmet dependencies during a dnf update action, that package will not be updated, but others will. This is similar to yum's "--skip-broken" directive, but evaluates the impact of the problem against the entire transaction. Because this is the default behavior, there is no "--skip-broken" switch for dnf.

To review details about a problematic package direction, you can use the "--best" option. dnf update --best will force dnf to resolve the transaction using the latest versions of involved packages, and report any problems instead of skipping them.

Repos that don't work are skipped

If a configured and enabled repository does not respond, dnf will skip it and continue the transaction with the available repos. This differs from yum, which would immediately stop if a repository was not available.

Update and Upgrade are the same

The commands dnf update and dnf upgrade are equivalent. This differs from yum, where yum upgrade would have the same effect as yum update --obsoletes, and take obsolete packages into account.

Dependencies are not upgraded on package installation

When installing a new package, previously installed dependencies will not be upgraded. Yum offered an option for this behavior, upgrade_requirements_on_install. To upgrade with dnf, use dnf update.

Clean on remove

When removing a package, dnf will automatically remove any dependent packages that were not explicitly installed by the user. If a package was independently installed, it won't be uninstalled this way.

This behavior is configured by the "clean_requirements_on_remove" option in /etc/dnf/dnf.conf.

Repo cache refresh schedule

By default, dnf will check for updates in configured repositories hourly, starting ten minutes after the system boots. The action is controlled by a systemd timer unit, /usr/lib/systemd/system/dnf-makecache.timer.

To adjust this, copy the timer file to /etc/systemd/system/dnf-makecache.timer and edit it.

Alternatively, setting the metadata_timer_sync in /etc/dnf/dnf.conf to a number of seconds configures the minimum number of seconds between makecache operations. If the timer has not expired, dnf makecache will exit immediately.

dnf will also honor the metadata_expire option set in individual repo configs, and refresh repo metadata at runtime if it is too old. This option is described in man yum.conf.

Repository Actions =

The "repository-packages" directive can be used to search for or get info about packages in a specific repository, list installed packages frrom that repository, and more. This simplifies operations that would have required use of "--excluderepo" and "--includerepo" options with yum, and is especially useful for managing similar packages from different repositories.

Listing dependencies

To find out what package supplies a particular provide, use the dnf provides foo command. This replaces yum resolvedep foo.

To list the dependencies of a package, use dnf repoquery --requires foo. This replaces yum deplist foo.

dnf will remove kernels

kernel packages are not protected by dnf. Unlike with yum, you can remove all kernel packages, including the running package, if you direct it to. Be cautious with removing kernels, and specify the full package and version

Replacing packages

When a system requires the capabilities of a package you want to replace, use the --allowerasing option. For example, dnf --allowerasing mariadb will allow you to replace mysql with mariadb, without disrupting packages that require capabilities provided by both packages. This replaces yum shell and yum swap functionality.

DNF reading