From Fedora Project Wiki

(moved dwz mention to development_tools_beat)
No edit summary
(14 intermediate revisions by 3 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 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 greets Fedora =
==== Repository Actions =====
'''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.
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.


'''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.
==== Listing dependencies ====
To find out what package supplies a particular provide, use the `dnf provides foo` command.  This replaces `yum resolvedep foo`.
= systemctl assumes it works with services =
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`.


= Terminals get more colorful =
To list the dependencies of a package, use `dnf repoquery --requires foo`. This replaces `yum deplist foo`.
Fedora now features supporting terminal emulators using 256 colors by default. 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. While still disabled by default, users can enable color terminals for connecting remote systems with the environment variable SEND_256_COLORS_TO_REMOTE. These configurations can be found in '''/etc/profile.d/256color.sh'''


= 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


= CIM management tools improved =
==== Replacing packages ====
Administrators managing large numbers of systems get a running start with Fedora 18's improvements on '''WEBM'''<!--citation?--> and '''CIM'''<!--citation--> offerings.  
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.


Users can build applications using new and enhanced '''CPMI'''<!--citation needed?--> providers to monitor and administer network interfaces, storage objects, services, power state, users, and software packages. They can also monitor system load, usage, and more.  The toolkit also includes '''yawn''', a web based browser for navigating and working within the CIM object model.
=== DNF reading ===


These features ease the task of managing large numbers of systems, laying the foundation for robust management infrastructure. Experienced users and system administrators are invited to review the sample python scripts and documentation provided with the '''sblim-cmpi-*''' or  '''openlmi-*''' 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