Add --nomacboot option

Needed for systems without hfsplus support.
This commit is contained in:
Martin Gracik 2012-05-17 17:27:28 +02:00
parent d96ae3245c
commit 6f3d8b55f3
5 changed files with 14 additions and 7 deletions

View File

@ -11,7 +11,9 @@ install boot/grub/splash.xpm.gz ${EFIBOOTDIR}
## actually make the EFI images
${make_efiboot("images/efiboot.img")}
${make_efiboot("images/macboot.img", imgtype="apple")}
%if domacboot:
${make_efiboot("images/macboot.img", imgtype="apple")}
%endif
## This is kinda gross, but then... so's EFI.
<%def name="make_efiboot(img, include_kernel=False, disk=False, imgtype='default')">

View File

@ -53,7 +53,10 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
<%
efiarch = 'X64' if basearch=='x86_64' else 'IA32'
efigraft="EFI/BOOT={0}/EFI/BOOT".format(outroot)
for img in ("images/efiboot.img", "images/macboot.img"):
images = ["images/efiboot.img"]
if domacboot:
images.append("images/macboot.img")
for img in images:
efiargs += " -eltorito-alt-boot -e {0} -no-emul-boot".format(img)
efigraft += " {0}={1}/{0}".format(img,outroot)
efihybrid="--uefi --mac"

View File

@ -130,7 +130,7 @@ class Lorax(BaseLoraxClass):
def run(self, ybo, product, version, release, variant="", bugurl="",
isfinal=False, workdir=None, outputdir=None, buildarch=None, volid=None,
remove_temp=False):
domacboot=True, remove_temp=False):
assert self._configured
@ -246,7 +246,7 @@ class Lorax(BaseLoraxClass):
treebuilder = TreeBuilder(product=self.product, arch=self.arch,
inroot=installroot, outroot=self.outputdir,
runtime=runtime, isolabel=isolabel,
templatedir=templatedir)
domacboot=domacboot, templatedir=templatedir)
logger.info("rebuilding initramfs images")
dracut_args=["--xz", "--add", "anaconda", "--omit", "plymouth",

View File

@ -151,14 +151,14 @@ class RuntimeBuilder(object):
class TreeBuilder(object):
'''Builds the arch-specific boot images.
inroot should be the installtree root (the newly-built runtime dir)'''
def __init__(self, product, arch, inroot, outroot, runtime, isolabel, templatedir=None):
def __init__(self, product, arch, inroot, outroot, runtime, isolabel, domacboot=True, templatedir=None):
# NOTE: if you pass an arg named "runtime" to a mako template it'll
# clobber some mako internal variables - hence "runtime_img".
self.vars = DataHolder(arch=arch, product=product, runtime_img=runtime,
runtime_base=basename(runtime),
inroot=inroot, outroot=outroot,
basearch=arch.basearch, libdir=arch.libdir,
isolabel=isolabel, udev=udev_escape)
isolabel=isolabel, udev=udev_escape, domacboot=domacboot)
self._runner = LoraxTemplateRunner(inroot, outroot, templatedir=templatedir)
self._runner.defaults = self.vars
self.templatedir = templatedir

View File

@ -74,6 +74,8 @@ def main(args):
help="build architecture", metavar="STRING")
optional.add_option("--volid", default=None,
help="volume id", metavar="STRING")
optional.add_option("--nomacboot", help="",
action="store_false", default=True, dest="domacboot")
# add the option groups to the parser
parser.add_option_group(required)
@ -126,7 +128,7 @@ def main(args):
lorax.run(yb, opts.product, opts.version, opts.release,
opts.variant, opts.bugurl, opts.isfinal,
workdir=tempdir, outputdir=outputdir, buildarch=opts.buildarch,
volid=opts.volid, remove_temp=True)
volid=opts.volid, domacboot=opts.domacboot, remove_temp=True)
def get_yum_base_object(installroot, repositories, mirrorlists=[],