From c1edc22c24b6f2b1b8f611e966187d1776da2abe Mon Sep 17 00:00:00 2001 From: "michael.hudson@canonical.com" Date: Wed, 4 Feb 2026 14:54:25 +1300 Subject: [PATCH] xorriso is not run with -as mkisofs for whatever reason --- live-build/isobuilder/builder.py | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/live-build/isobuilder/builder.py b/live-build/isobuilder/builder.py index fda16f86..0baa0451 100644 --- a/live-build/isobuilder/builder.py +++ b/live-build/isobuilder/builder.py @@ -359,11 +359,24 @@ class ISOBuilder: # xorriso with "-as mkisofs" runs in mkisofs compatibility mode. # -r enables Rock Ridge extensions for Unix metadata (permissions, symlinks). # -iso-level 3 (amd64 only) allows files >4GB which some amd64 ISOs need. - cmd: list[str | pathlib.Path] = ["xorriso", "-as", "mkisofs", "-r"] - if self.arch == "amd64": - cmd.extend(["-iso-level", "3"]) - if volid: - cmd += ["-V", volid] - cmd += mkisofs_opts + [self.iso_root, "-o", dest] + cmd: list[str | pathlib.Path] = ["xorriso"] + if self.arch == "riscv64": + # For $reasons, xorriso is not run in mkisofs mode on riscv64 only. + cmd.extend(["-rockridge", "on", "-outdev", dest]) + if volid: + 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"): self.logger.run(cmd, cwd=self.workdir, check=True, limit_length=False)