Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1003868 Details for
Bug 1156511
[rfe] use dnf instead of yum
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
yum to dnf migration
dnf-patch.diff (text/plain), 7.71 KB, created by
Michael Mráka
on 2015-03-19 15:11:18 UTC
(
hide
)
Description:
yum to dnf migration
Filename:
MIME Type:
Creator:
Michael Mráka
Created:
2015-03-19 15:11:18 UTC
Size:
7.71 KB
patch
obsolete
>diff -urN fedora-upgrade-22.1.orig/README.md fedora-upgrade-22.1/README.md >--- fedora-upgrade-22.1.orig/README.md 2015-02-20 19:01:37.000000000 +0100 >+++ fedora-upgrade-22.1/README.md 2015-03-19 15:50:24.357193639 +0100 >@@ -1,7 +1,7 @@ > fedora-upgrade > ============== > >-Upgrade Fedora to next version using yum upgrade. >+Upgrade Fedora to next version using dnf upgrade. > > This is attempt to automatize steps as listed here: > >@@ -33,8 +33,8 @@ > 2. Check if dependencies are installed and install them. This step is needed only if you download script from GitHub. Dependencies are always present if you install fedora-upgrade as rpm package. > 3. Resolve old .rpmsave and .rpmnew files using [rpmconf](https://github.com/xsuchy/rpmconf/). This step is optional and can be skipped. But it is better to start upgrade with clean state. > 4. Download and install new GPG keys - including rpmfusion if you are using it. >-5. Update yum and clean all yum metadata. >-6. Upgrade system using yum. In this or any previous step, you can hit Ctrl + C and interrupt upgrade and repeat it as many times you wish. After this step, you could not return (you can use back up, you created backup before upgrade, did you?). >+5. Update dnf and clean all dnf metadata. >+6. Upgrade system using dnf. In this or any previous step, you can hit Ctrl + C and interrupt upgrade and repeat it as many times you wish. After this step, you could not return (you can use back up, you created backup before upgrade, did you?). > 7. Install packages from group 'Minimal Install'. It may happen that some new essential packages have been introduced to Fedora. This step will install them. You may however skip this step if you want to. > 8. Resolve old .rpmsave and .rpmnew files using [rpmconf](https://github.com/xsuchy/rpmconf/). This step is optional and can be skipped. But it is better to finish upgrade with clean state. > 9. Reset service priorities - the order of init scripts could have changed from the previous version. This steps is optional and can be skipped. And this does not affect services already migrated to systemD units. >diff -urN fedora-upgrade-22.1.orig/fedora-upgrade fedora-upgrade-22.1/fedora-upgrade >--- fedora-upgrade-22.1.orig/fedora-upgrade 2015-02-20 19:01:37.000000000 +0100 >+++ fedora-upgrade-22.1/fedora-upgrade 2015-03-19 16:00:46.410589890 +0100 >@@ -28,16 +28,16 @@ > } > > function install_deps() { >- # TODO add -q to all yum and create some kind of progress metter >+ # TODO add -q to all dnf and create some kind of progress metter > # but now be verbose > rpm -q rpmconf >/dev/null || yum install -y rpmconf >- rpm -q yum-utils >/dev/null || yum install -y yum-utils >+ rpm -q dnf-plugins-core >/dev/null || dnf install -y dnf-plugins-core > } > > function upgrade_before_upgrade() { >- continue_or_skip "\nGoing to run 'yum upgrade' before upgrading." >+ continue_or_skip "\nGoing to run 'dnf upgrade' before upgrading." > if [ "$ANSWER" != "S" ] ; then >- yum upgrade >+ dnf upgrade > fi > } > >@@ -61,7 +61,7 @@ > function install_base() { > continue_or_skip "\nGoing to install missing packages from group 'Minimal Install'" > if [ "$ANSWER" != "S" ] ; then >- yum groupupdate 'Minimal Install' >+ dnf group install 'Minimal Install' > fi > } > >@@ -85,7 +85,7 @@ > } > > function cleanup_cache() { >- rm -rf /var/cache/yum/* >+ rm -rf /var/cache/dnf/* > } > > function unwanted_packages() { >@@ -103,11 +103,14 @@ > function is_prerelease() { > # will print string "--enablerepo=updates-testing" if this is prerelease, "" otherwise > local RELEASE=$1 >- if yumdownloader --disablerepo=* --enablerepo=fedora --releasever=$RELEASE fedora-release --urls | tail -n 1 | wget -q -i - -O - | rpm2cpio | cpio -i --quiet --to-stdout - ./etc/yum.repos.d/fedora-updates-testing.repo | grep 'enabled=1' >/dev/null; then >+ TEMP=$(mktemp -d) >+ dnf download --destdir "$TEMP" --disablerepo=* --enablerepo=fedora --releasever=$RELEASE fedora-repos >+ if rpm2cpio "$TEMP"/fedora-repos*.rpm | cpio -i --quiet --to-stdout - ./etc/yum.repos.d/fedora-updates-testing.repo | grep 'enabled=1' >/dev/null ; then > echo "--enablerepo=updates-testing" > else > echo "" > fi >+ rm -rf "$TEMP" > } > > function print_exit_banner() { >@@ -164,14 +167,14 @@ > fi > rpm -q fedora-release-nonproduct >/dev/null && rpm -e fedora-release-nonproduct > if [ "$ANSWER" != "cloud" ] ; then >- yum install -y firewalld-config-$ANSWER firewalld-config-$ANSWER >+ dnf install -y firewalld-config-$ANSWER firewalld-config-$ANSWER > fi > fi >- yum install -y fedora-release-$ANSWER >+ dnf install -y fedora-release-$ANSWER > } > > if ! check_intallation; then >- echo "Please install fedora-upgrade package using yum first" >+ echo "Please install fedora-upgrade package using dnf first" > exit 2 > fi > >@@ -251,12 +254,12 @@ > install_deps > rpmconf_before_upgrade > >- yum install fedora-release-rawhide yum-utils >- yum-config-manager --disable fedora updates updates-testing >- yum-config-manager --enable rawhide >- yum update -q yum >- yum clean -q dbcache rpmdb plugins metadata >- yum --releasever=rawhide --disableplugin=presto distro-sync --nogpgcheck >+ dnf install fedora-release-rawhide dnf-plugins-core >+ dnf config-manager --disable fedora updates updates-testing >+ dnf config-manager --enable rawhide >+ dnf update -q dnf >+ dnf clean -q dbcache rpmdb plugins metadata >+ dnf --releasever=rawhide --disableplugin=presto distro-sync --nogpgcheck > UPGRADE_FINISHED=2 > > install_base >diff -urN fedora-upgrade-22.1.orig/fedora-upgrade.8.asciidoc fedora-upgrade-22.1/fedora-upgrade.8.asciidoc >--- fedora-upgrade-22.1.orig/fedora-upgrade.8.asciidoc 2015-02-20 19:01:37.000000000 +0100 >+++ fedora-upgrade-22.1/fedora-upgrade.8.asciidoc 2015-03-19 16:01:18.202252516 +0100 >@@ -5,7 +5,7 @@ > > NAME > ---- >-fedora-upgrade - tool to guide you with upgrade of Fedora to next major version using yum. >+fedora-upgrade - tool to guide you with upgrade of Fedora to next major version using dnf. > > > SYNOPSIS >@@ -16,7 +16,7 @@ > DESCRIPTION > ----------- > >-Script *fedora-upgrade* tries to automate steps needed for yum-upgrade from one major version to next one. >+Script *fedora-upgrade* tries to automate steps needed for dnf-upgrade from one major version to next one. > > Steps which fedora-upgrade does: > >@@ -24,7 +24,7 @@ > * Check dependencies. > * Resolve old .rpmsave and .rpmnew files before upgrading (if there are some). > * Download and import RPM GPG keys. >-* Run "yum --releasever=$TOVER distro-sync". >+* Run "dnf --releasever=$TOVER distro-sync". > * Install missing packages from group 'Minimal Install'. > * Resolve old .rpmsave and .rpmnew files after upgrade. > * Reset priorities of services. >@@ -32,7 +32,7 @@ > > SEE ALSO > -------- >-yum(8), rpmconf(8), >+dnf(8), rpmconf(8), > https://fedoraproject.org/wiki/Upgrading_Fedora_using_yum > > >diff -urN fedora-upgrade-22.1.orig/fedora-upgrade.spec fedora-upgrade-22.1/fedora-upgrade.spec >--- fedora-upgrade-22.1.orig/fedora-upgrade.spec 2015-02-20 19:01:37.000000000 +0100 >+++ fedora-upgrade-22.1/fedora-upgrade.spec 2015-03-19 16:01:51.836895596 +0100 >@@ -1,7 +1,7 @@ > Name: fedora-upgrade > Version: 22.1 > Release: 1%{?dist} >-Summary: Upgrade Fedora to next version using yum upgrade (unofficial tool) >+Summary: Upgrade Fedora to next version using dnf upgrade (unofficial tool) > > Group: Applications/System > License: GPLv2 >@@ -13,8 +13,8 @@ > Source0: %{name}-%{version}.tar.gz > BuildArch: noarch > >-Requires: yum >-Requires: yum-utils >+Requires: dnf >+Requires: dnf-plugins-core > Requires: rpmconf > Requires: libselinux-utils > Requires: vim-enhanced >@@ -23,7 +23,7 @@ > BuildRequires: libxslt > > %description >-Upgrade Fedora to next version using yum upgrade. >+Upgrade Fedora to next version using dnf upgrade. > This is attempt to automatize steps as listed here: > https://fedoraproject.org/wiki/Upgrading_Fedora_using_yum >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1156511
: 1003868