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
This commit is contained in:
David Shea 2013-11-13 13:03:28 -05:00
parent 14a191009d
commit 26d8c14796
3 changed files with 15 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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")