diff --git a/doc/configuration.rst b/doc/configuration.rst index ba0f5040..f52257fb 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -1267,6 +1267,9 @@ Options meaning size in bytes, or it can be a string with ``k``, ``M``, ``G`` suffix (using multiples of 1024). +**iso_level** + (*int*) [optional] -- Set the ISO9660 conformance level. Valid numbers are 1 to 4. + **split_iso_reserve** = 10MiB (*int|str*) -- how much free space should be left on each disk. The format is the same as for ``iso_size`` option. diff --git a/pungi/checks.py b/pungi/checks.py index 581bd9fc..a2434fce 100644 --- a/pungi/checks.py +++ b/pungi/checks.py @@ -746,6 +746,10 @@ def make_schema(): ), "createiso_break_hardlinks": {"type": "boolean", "default": False}, "createiso_use_xorrisofs": {"type": "boolean", "default": False}, + "iso_level": { + "type": "number", + "enum": [1, 2, 3, 4], + }, "iso_hfs_ppc64le_compatible": {"type": "boolean", "default": True}, "multilib": _variant_arch_mapping( {"$ref": "#/definitions/list_of_strings"} diff --git a/pungi/createiso.py b/pungi/createiso.py index cbd3fef3..4e1a5336 100644 --- a/pungi/createiso.py +++ b/pungi/createiso.py @@ -25,6 +25,7 @@ CreateIsoOpts = namedtuple( "os_tree", "hfs_compat", "use_xorrisofs", + "iso_level", ], ) CreateIsoOpts.__new__.__defaults__ = (None,) * len(CreateIsoOpts._fields) @@ -77,6 +78,7 @@ def make_image(f, opts): exclude=["./lost+found"], graft_points=opts.graft_points, use_xorrisofs=opts.use_xorrisofs, + iso_level=opts.iso_level, **mkisofs_kwargs ) emit(f, cmd) diff --git a/pungi/phases/createiso.py b/pungi/phases/createiso.py index 083a9a58..529101f5 100644 --- a/pungi/phases/createiso.py +++ b/pungi/phases/createiso.py @@ -172,6 +172,7 @@ class CreateisoPhase(PhaseLoggerMixin, PhaseBase): supported=self.compose.supported, hfs_compat=self.compose.conf["iso_hfs_ppc64le_compatible"], use_xorrisofs=self.compose.conf.get("createiso_use_xorrisofs"), + iso_level=self.compose.conf.get("iso_level"), ) if bootable: diff --git a/pungi/phases/extra_isos.py b/pungi/phases/extra_isos.py index abca3b1f..5db71a6f 100644 --- a/pungi/phases/extra_isos.py +++ b/pungi/phases/extra_isos.py @@ -115,6 +115,7 @@ class ExtraIsosThread(WorkerThread): supported=compose.supported, hfs_compat=compose.conf["iso_hfs_ppc64le_compatible"], use_xorrisofs=compose.conf.get("createiso_use_xorrisofs"), + iso_level=compose.conf.get("iso_level"), ) if compose.conf["create_jigdo"]: jigdo_dir = compose.paths.compose.jigdo_dir(arch, variant) diff --git a/pungi/wrappers/iso.py b/pungi/wrappers/iso.py index 4cdbd3f6..3f438f74 100644 --- a/pungi/wrappers/iso.py +++ b/pungi/wrappers/iso.py @@ -146,6 +146,7 @@ def get_mkisofs_cmd( input_charset="utf-8", graft_points=None, use_xorrisofs=False, + iso_level=None, ): # following options are always enabled untranslated_filenames = True @@ -155,6 +156,10 @@ def get_mkisofs_cmd( rock = True cmd = ["/usr/bin/xorrisofs" if use_xorrisofs else "/usr/bin/genisoimage"] + + if iso_level: + cmd.extend(["-iso-level", str(iso_level)]) + if appid: cmd.extend(["-appid", appid])