xorriso is not run with -as mkisofs for whatever reason

This commit is contained in:
michael.hudson@canonical.com 2026-02-04 14:54:25 +13:00
parent 9add6d4ab8
commit c1edc22c24
No known key found for this signature in database
GPG Key ID: 80E627A0AB757E23

View File

@ -359,11 +359,24 @@ class ISOBuilder:
# xorriso with "-as mkisofs" runs in mkisofs compatibility mode. # xorriso with "-as mkisofs" runs in mkisofs compatibility mode.
# -r enables Rock Ridge extensions for Unix metadata (permissions, symlinks). # -r enables Rock Ridge extensions for Unix metadata (permissions, symlinks).
# -iso-level 3 (amd64 only) allows files >4GB which some amd64 ISOs need. # -iso-level 3 (amd64 only) allows files >4GB which some amd64 ISOs need.
cmd: list[str | pathlib.Path] = ["xorriso", "-as", "mkisofs", "-r"] cmd: list[str | pathlib.Path] = ["xorriso"]
if self.arch == "amd64": if self.arch == "riscv64":
cmd.extend(["-iso-level", "3"]) # For $reasons, xorriso is not run in mkisofs mode on riscv64 only.
if volid: cmd.extend(["-rockridge", "on", "-outdev", dest])
cmd += ["-V", volid] if volid:
cmd += mkisofs_opts + [self.iso_root, "-o", dest] cmd.extend(["-volid", volid])
cmd.extend(mkisofs_opts)
cmd.extend(["-map", self.iso_root])
else:
# xorriso with "-as mkisofs" runs in mkisofs compatibility mode on
# other architectures. -r enables Rock Ridge extensions for Unix
# metadata (permissions, symlinks). -iso-level 3 (amd64 only)
# allows files >4GB which some amd64 ISOs need.
cmd.extend(["-as", "mkisofs", "-r"])
if self.arch == "amd64":
cmd.extend(["-iso-level", "3"])
if volid:
cmd.extend(["-V", volid])
cmd.extend(mkisofs_opts + [self.iso_root, "-o", dest])
with self.logger.logged("running xorriso"): with self.logger.logged("running xorriso"):
self.logger.run(cmd, cwd=self.workdir, check=True, limit_length=False) self.logger.run(cmd, cwd=self.workdir, check=True, limit_length=False)