From 26d8c147967df6640c4d6b6d072d6b9783041790 Mon Sep 17 00:00:00 2001 From: David Shea Date: Wed, 13 Nov 2013 13:03:28 -0500 Subject: [PATCH] Create upgrade.img using redhat-upgrade-dracut Use redhat-upgrade-dracut for the RHEL version of the system-upgrade dracut module. upgrade.img also needs the convertfs module for upgrades from RHEL6. Resolves: rhbz#1029999 --- lorax.spec | 6 ++++++ share/runtime-install.tmpl | 5 +++++ src/pylorax/__init__.py | 8 ++++---- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/lorax.spec b/lorax.spec index 32c6d884..51ed81a4 100644 --- a/lorax.spec +++ b/lorax.spec @@ -42,6 +42,12 @@ Requires: fedup-dracut Requires: fedup-dracut-plymouth %endif +%if 0%{?el7} +# RHEL 7 specific deps +Requires: redhat-upgrade-dracut +Requires: redhat-upgrade-dracut-plymouth +%endif + %ifarch %{ix86} x86_64 Requires: syslinux >= 4.02-5 %endif diff --git a/share/runtime-install.tmpl b/share/runtime-install.tmpl index 4d9fb434..c8a9bd8a 100644 --- a/share/runtime-install.tmpl +++ b/share/runtime-install.tmpl @@ -51,6 +51,11 @@ installpkg fedup-dracut fedup-dracut-plymouth log "Looking for extra fedup-dracut packages..." -installpkg *-fedup-dracut +## redhat-upgrade-dracut handles upgrades on RHEL +installpkg redhat-upgrade-dracut redhat-upgrade-dracut-plymouth +log "Looking for extra redhat-upgrade-dracut packages..." +-installpkg *-redhat-upgrade-dracut + ## rpcbind or portmap needed by dracut nfs module installpkg rpcbind diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py index f41ea351..a9137b49 100644 --- a/src/pylorax/__init__.py +++ b/src/pylorax/__init__.py @@ -302,14 +302,14 @@ class Lorax(BaseLoraxClass): # image, but that would increase the size of the anaconda initramfs, # which worries some people (esp. PPC tftpboot). So they're separate. try: - # If possible, use the 'fedup' plymouth theme + # If possible, use the 'redhat-upgrade-tool' plymouth theme themes = runcmd_output(['plymouth-set-default-theme', '--list'], root=installroot) - if 'fedup' in themes.splitlines(): - os.environ['PLYMOUTH_THEME_NAME'] = 'fedup' + if 'redhat-upgrade-tool' in themes.splitlines(): + os.environ['PLYMOUTH_THEME_NAME'] = 'redhat-upgrade-tool' except RuntimeError: pass - upgrade_args = dracut_args + ["--add", "system-upgrade"] + upgrade_args = dracut_args + ["--add", "system-upgrade convertfs"] treebuilder.rebuild_initrds(add_args=upgrade_args, prefix="upgrade") logger.info("populating output tree and building boot images")