Expose lorax's --rootfs-size argument
This is going to be necessary for reworking the Atomic Host ISO, see: https://pagure.io/fedora-lorax-templates/pull-request/6 Signed-off-by: Colin Walters <walters@verbum.org>
This commit is contained in:
parent
b7813d34ac
commit
7bcbe30fd2
@ -1171,6 +1171,7 @@ an OSTree repository. This always runs in Koji as a ``runroot`` task.
|
|||||||
* ``add_arch_template`` -- (*[str]*)
|
* ``add_arch_template`` -- (*[str]*)
|
||||||
* ``add_template_var`` -- (*[str]*)
|
* ``add_template_var`` -- (*[str]*)
|
||||||
* ``add_arch_template_var`` -- (*[str]*)
|
* ``add_arch_template_var`` -- (*[str]*)
|
||||||
|
* ``rootfs_size`` -- (*[str]*)
|
||||||
* ``template_repo`` -- (*str*) Git repository with extra templates.
|
* ``template_repo`` -- (*str*) Git repository with extra templates.
|
||||||
* ``template_branch`` -- (*str*) Branch to use from ``template_repo``.
|
* ``template_branch`` -- (*str*) Branch to use from ``template_repo``.
|
||||||
|
|
||||||
|
@ -715,6 +715,7 @@ def _make_schema():
|
|||||||
"add_arch_template": {"$ref": "#/definitions/list_of_strings"},
|
"add_arch_template": {"$ref": "#/definitions/list_of_strings"},
|
||||||
"add_template_var": {"$ref": "#/definitions/list_of_strings"},
|
"add_template_var": {"$ref": "#/definitions/list_of_strings"},
|
||||||
"add_arch_template_var": {"$ref": "#/definitions/list_of_strings"},
|
"add_arch_template_var": {"$ref": "#/definitions/list_of_strings"},
|
||||||
|
"rootfs_size": {"type": "string"},
|
||||||
"template_repo": {"type": "string"},
|
"template_repo": {"type": "string"},
|
||||||
"template_branch": {"type": "string"},
|
"template_branch": {"type": "string"},
|
||||||
},
|
},
|
||||||
|
@ -152,6 +152,7 @@ class OstreeInstallerThread(WorkerThread):
|
|||||||
add_arch_template=self._get_templates(config, 'add_arch_template'),
|
add_arch_template=self._get_templates(config, 'add_arch_template'),
|
||||||
add_template_var=config.get('add_template_var'),
|
add_template_var=config.get('add_template_var'),
|
||||||
add_arch_template_var=config.get('add_arch_template_var'),
|
add_arch_template_var=config.get('add_arch_template_var'),
|
||||||
|
rootfs_size=config.get('rootfs_size'),
|
||||||
is_final=compose.supported,
|
is_final=compose.supported,
|
||||||
log_dir=self.logdir,
|
log_dir=self.logdir,
|
||||||
)
|
)
|
||||||
|
@ -26,6 +26,7 @@ class LoraxWrapper(object):
|
|||||||
is_final=False, buildarch=None, volid=None, buildinstallpackages=None,
|
is_final=False, buildarch=None, volid=None, buildinstallpackages=None,
|
||||||
add_template=None, add_arch_template=None,
|
add_template=None, add_arch_template=None,
|
||||||
add_template_var=None, add_arch_template_var=None,
|
add_template_var=None, add_arch_template_var=None,
|
||||||
|
rootfs_size=None,
|
||||||
log_dir=None):
|
log_dir=None):
|
||||||
cmd = ["lorax"]
|
cmd = ["lorax"]
|
||||||
cmd.append("--product=%s" % product)
|
cmd.append("--product=%s" % product)
|
||||||
@ -67,6 +68,9 @@ class LoraxWrapper(object):
|
|||||||
if log_dir:
|
if log_dir:
|
||||||
cmd.append('--logfile=%s' % os.path.join(log_dir, 'lorax.log'))
|
cmd.append('--logfile=%s' % os.path.join(log_dir, 'lorax.log'))
|
||||||
|
|
||||||
|
if rootfs_size is not None:
|
||||||
|
cmd.append('--rootfs-size=%s' % (rootfs_size))
|
||||||
|
|
||||||
output_dir = os.path.abspath(output_dir)
|
output_dir = os.path.abspath(output_dir)
|
||||||
cmd.append(output_dir)
|
cmd.append(output_dir)
|
||||||
|
|
||||||
|
@ -310,6 +310,7 @@ class OstreeInstallerConfigTestCase(unittest.TestCase):
|
|||||||
"ostree_ref=fedora-atomic/Rawhide/x86_64/docker-host",
|
"ostree_ref=fedora-atomic/Rawhide/x86_64/docker-host",
|
||||||
],
|
],
|
||||||
"add_arch_template": ["/spin-kickstarts/atomic-installer/lorax-embed-repo.tmpl"],
|
"add_arch_template": ["/spin-kickstarts/atomic-installer/lorax-embed-repo.tmpl"],
|
||||||
|
"rootfs_size": "3",
|
||||||
"add_arch_template_var": [
|
"add_arch_template_var": [
|
||||||
"ostree_repo=https://kojipkgs.fedoraproject.org/compose/atomic/Rawhide/",
|
"ostree_repo=https://kojipkgs.fedoraproject.org/compose/atomic/Rawhide/",
|
||||||
"ostree_osname=fedora-atomic",
|
"ostree_osname=fedora-atomic",
|
||||||
|
Loading…
Reference in New Issue
Block a user