From b5eb38ae97e84f2155416bd9ede8ec68e9164ed6 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Tue, 13 Nov 2012 01:33:16 -0500 Subject: [PATCH] build fedup upgrade.img Use rebuild_initrds() with prefix='upgrade' to build upgrade.img with the fedup "system-upgrade" module(s) inside. --- share/runtime-install.tmpl | 3 +++ src/pylorax/__init__.py | 13 ++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/share/runtime-install.tmpl b/share/runtime-install.tmpl index 6dd792d4..e9e3da3f 100644 --- a/share/runtime-install.tmpl +++ b/share/runtime-install.tmpl @@ -48,6 +48,9 @@ installpkg plymouth ## extra dracut modules installpkg dracut-network anaconda-dracut +## fedup-dracut handles upgrades +installpkg fedup-dracut fedup-dracut-plymouth *-fedup-dracut + ## rpcbind or portmap needed by dracut nfs module installpkg rpcbind diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py index 6120dc3d..20a84c3f 100644 --- a/src/pylorax/__init__.py +++ b/src/pylorax/__init__.py @@ -278,9 +278,16 @@ class Lorax(BaseLoraxClass): domacboot=domacboot, templatedir=templatedir) logger.info("rebuilding initramfs images") - dracut_args=["--xz", "--add", "anaconda pollcdrom", - "--install", "/.buildstamp"] - treebuilder.rebuild_initrds(add_args=dracut_args) + dracut_args = ["--xz", "--install", "/.buildstamp"] + + anaconda_args = dracut_args + ["--add", "anaconda pollcdrom"] + treebuilder.rebuild_initrds(add_args=anaconda_args) + + # Build upgrade.img. It'd be nice if these could coexist in the same + # image, but that would increase the size of the anaconda initramfs, + # which worries some people (esp. PPC tftpboot). So they're separate. + upgrade_args = dracut_args + ["--add", "system-upgrade"] + treebuilder.rebuild_initrds(add_args=upgrade_args, prefix="upgrade") logger.info("populating output tree and building boot images") treebuilder.build()