From: "Brian C. Lane" bcl@redhat.com
Add a macboot option to lorax and both macboot and nomacboot to lmc.
Related: rhbz#1012529 --- src/sbin/livemedia-creator | 7 ++++++- src/sbin/lorax | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/sbin/livemedia-creator b/src/sbin/livemedia-creator index a0a994b..c2996c9 100755 --- a/src/sbin/livemedia-creator +++ b/src/sbin/livemedia-creator @@ -521,7 +521,7 @@ def make_livecd(opts, mount_dir, work_dir): isolabel = isolabel[:32] log.warn("Truncating isolabel to 32 chars: %s" % (isolabel,))
- tb = TreeBuilder(product=product, arch=arch, + tb = TreeBuilder(product=product, arch=arch, domacboot=opts.domacboot, inroot=mount_dir, outroot=work_dir, runtime=RUNTIME, isolabel=isolabel, templatedir=joinpaths(opts.lorax_templates,"live/")) @@ -772,6 +772,11 @@ if __name__ == '__main__': help="Directory to copy the resulting images and iso into. " "Defaults to the temporary working directory")
+ parser.add_argument( "--macboot", action="store_true", default=True, + dest="domacboot") + parser.add_argument( "--nomacboot", action="store_false", + dest="domacboot") + # Group of arguments for appliance creation app_group = parser.add_argument_group("appliance arguments") app_group.add_argument( "--app-name", default=None, diff --git a/src/sbin/lorax b/src/sbin/lorax index a571c0b..b137f48 100755 --- a/src/sbin/lorax +++ b/src/sbin/lorax @@ -123,8 +123,10 @@ def main(args): help="build architecture", metavar="STRING") optional.add_option("--volid", default=None, help="volume id", metavar="STRING") + optional.add_option("--macboot", help="", + action="store_true", default=True, dest="domacboot") optional.add_option("--nomacboot", help="", - action="store_false", default=True, dest="domacboot") + action="store_false", dest="domacboot") optional.add_option("--noupgrade", help="", action="store_false", default=True, dest="doupgrade") optional.add_option("--logfile", default="./lorax.log",
From: "Brian C. Lane" bcl@redhat.com
The tools needed are not shipped with RHEL7 so default to no macboot.
Resolves: rhbz#1012529 --- src/pylorax/__init__.py | 2 +- src/pylorax/treebuilder.py | 2 +- src/sbin/livemedia-creator | 4 ++-- src/sbin/lorax | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py index 37829da..f41ea35 100644 --- a/src/pylorax/__init__.py +++ b/src/pylorax/__init__.py @@ -138,7 +138,7 @@ class Lorax(BaseLoraxClass):
def run(self, ybo, product, version, release, variant="", bugurl="", isfinal=False, workdir=None, outputdir=None, buildarch=None, volid=None, - domacboot=True, doupgrade=True, remove_temp=False): + domacboot=False, doupgrade=True, remove_temp=False):
assert self._configured
diff --git a/src/pylorax/treebuilder.py b/src/pylorax/treebuilder.py index 2e7c43e..0f9766b 100644 --- a/src/pylorax/treebuilder.py +++ b/src/pylorax/treebuilder.py @@ -168,7 +168,7 @@ 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, domacboot=True, doupgrade=True, templatedir=None): + def __init__(self, product, arch, inroot, outroot, runtime, isolabel, domacboot=False, doupgrade=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, diff --git a/src/sbin/livemedia-creator b/src/sbin/livemedia-creator index c2996c9..d2727d6 100755 --- a/src/sbin/livemedia-creator +++ b/src/sbin/livemedia-creator @@ -772,9 +772,9 @@ if __name__ == '__main__': help="Directory to copy the resulting images and iso into. " "Defaults to the temporary working directory")
- parser.add_argument( "--macboot", action="store_true", default=True, + parser.add_argument( "--macboot", action="store_true", dest="domacboot") - parser.add_argument( "--nomacboot", action="store_false", + parser.add_argument( "--nomacboot", action="store_false", default=False, dest="domacboot")
# Group of arguments for appliance creation diff --git a/src/sbin/lorax b/src/sbin/lorax index b137f48..8a76ef9 100755 --- a/src/sbin/lorax +++ b/src/sbin/lorax @@ -124,9 +124,9 @@ def main(args): optional.add_option("--volid", default=None, help="volume id", metavar="STRING") optional.add_option("--macboot", help="", - action="store_true", default=True, dest="domacboot") + action="store_true", dest="domacboot") optional.add_option("--nomacboot", help="", - action="store_false", dest="domacboot") + action="store_false", default=False, dest="domacboot") optional.add_option("--noupgrade", help="", action="store_false", default=True, dest="doupgrade") optional.add_option("--logfile", default="./lorax.log",
On Thu, 2013-09-26 at 17:58 -0700, Brian C. Lane wrote:
From: "Brian C. Lane" bcl@redhat.com
Add a macboot option to lorax and both macboot and nomacboot to lmc.
Related: rhbz#1012529
src/sbin/livemedia-creator | 7 ++++++- src/sbin/lorax | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/sbin/livemedia-creator b/src/sbin/livemedia-creator index a0a994b..c2996c9 100755 --- a/src/sbin/livemedia-creator +++ b/src/sbin/livemedia-creator @@ -521,7 +521,7 @@ def make_livecd(opts, mount_dir, work_dir): isolabel = isolabel[:32] log.warn("Truncating isolabel to 32 chars: %s" % (isolabel,))
- tb = TreeBuilder(product=product, arch=arch,
- tb = TreeBuilder(product=product, arch=arch, domacboot=opts.domacboot, inroot=mount_dir, outroot=work_dir, runtime=RUNTIME, isolabel=isolabel, templatedir=joinpaths(opts.lorax_templates,"live/"))
@@ -772,6 +772,11 @@ if __name__ == '__main__': help="Directory to copy the resulting images and iso into. " "Defaults to the temporary working directory")
- parser.add_argument( "--macboot", action="store_true", default=True,
dest="domacboot")
- parser.add_argument( "--nomacboot", action="store_false",
dest="domacboot")
- # Group of arguments for appliance creation app_group = parser.add_argument_group("appliance arguments") app_group.add_argument( "--app-name", default=None,
diff --git a/src/sbin/lorax b/src/sbin/lorax index a571c0b..b137f48 100755 --- a/src/sbin/lorax +++ b/src/sbin/lorax @@ -123,8 +123,10 @@ def main(args): help="build architecture", metavar="STRING") optional.add_option("--volid", default=None, help="volume id", metavar="STRING")
- optional.add_option("--macboot", help="",
optional.add_option("--nomacboot", help="",action="store_true", default=True, dest="domacboot")
action="store_false", default=True, dest="domacboot")
optional.add_option("--noupgrade", help="", action="store_false", default=True, dest="doupgrade") optional.add_option("--logfile", default="./lorax.log",action="store_false", dest="domacboot")
These both look good to me.
anaconda-patches@lists.fedorahosted.org