Support using lzma for initramfs compression
Reduces the size by roughly 30% at the expense of larger decompression time. Change-Id: I04613a26bd3f66ddcb1623e288d325666586fa6c
This commit is contained in:
parent
d1d3a7e555
commit
0f62572894
@ -53,6 +53,8 @@ def main():
|
||||
"ironic-python-agent and requirements")
|
||||
parser.add_argument("-v", "--verbose", action='store_true',
|
||||
help="Enable verbose logging in diskimage-builder")
|
||||
parser.add_argument("--lzma", action='store_true',
|
||||
help="Use lzma compression for smaller images")
|
||||
parser.add_argument("--extra-args",
|
||||
help="Extra arguments to pass to diskimage-builder")
|
||||
# TODO(dtantsur): handle distribution == tinyipa
|
||||
@ -68,6 +70,9 @@ def main():
|
||||
if args.branch:
|
||||
os.environ['DIB_REPOREF_ironic_python_agent'] = args.branch
|
||||
os.environ['DIB_REPOREF_requirements'] = args.branch
|
||||
if args.lzma:
|
||||
os.environ['DIB_IPA_COMPRESS_CMD'] = \
|
||||
'xz --format=lzma --compress --stdout'
|
||||
extra_args = shlex.split(args.extra_args) if args.extra_args else []
|
||||
if args.verbose:
|
||||
extra_args.append("-x")
|
||||
|
5
releasenotes/notes/lzma-bf4552b98dd5824a.yaml
Normal file
5
releasenotes/notes/lzma-bf4552b98dd5824a.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The ``ironic-python-agent-builder`` CLI now supports ``--lzma`` flag to
|
||||
compress images with the LZMA algorithm.
|
Loading…
x
Reference in New Issue
Block a user