diff --git a/ova-compose/example.yaml b/ova-compose/example.yaml index c528d02..d053502 100644 --- a/ova-compose/example.yaml +++ b/ova-compose/example.yaml @@ -1,6 +1,6 @@ system: name: example - type: vmx-21 + type: vmx-20 os_vmw: !param os=other4xLinux64Guest firmware: !param firmware=efi secure_boot: !param secure-boot=false diff --git a/ova-compose/ova-compose.py b/ova-compose/ova-compose.py index 7616e01..d143efa 100755 --- a/ova-compose/ova-compose.py +++ b/ova-compose/ova-compose.py @@ -1247,9 +1247,10 @@ def main(): do_manifest = False params = {} checksum_type = "sha256" + tar_format = "gnu" try: - opts, args = getopt.getopt(sys.argv[1:], 'f:hi:mo:q', longopts=['format=', 'input-file=', 'manifest', 'output-file=', 'param=', 'checksum-type=']) + opts, args = getopt.getopt(sys.argv[1:], 'f:hi:mo:q', longopts=['format=', 'input-file=', 'manifest', 'output-file=', 'param=', 'checksum-type=', 'tar-format=']) except: print ("invalid option") sys.exit(2) @@ -1268,6 +1269,8 @@ def main(): elif o in ['--param']: k,v = a.split('=', maxsplit=1) params[k] = yaml.safe_load(v) + elif o in ['--tar-format']: + tar_format = a elif o in ['-q']: do_quiet = True elif o in ['-h']: @@ -1336,7 +1339,7 @@ def main(): ovf.write_manifest(ovf_file=ovf_file, mf_file=mf_file, hash_type=checksum_type) if output_format == "ova": - ret = subprocess.check_call(["tar", "--format=ustar", "-h", + ret = subprocess.check_call(["tar", f"--format={tar_format}", "-h", "--owner=0", "--group=0", "--mode=0644", "-cf", os.path.join(pwd, output_file)] + all_files)