if ArtifactOutput.partitions in context.config.split_artifacts:
make_disk(context, split=True, msg="Extracting partitions")
+ if (
+ context.config.output_format != OutputFormat.tar
+ and ArtifactOutput.tar in context.config.split_artifacts
+ ):
+ make_tar(context.root, context.staging / context.config.output_tar, sandbox=context.sandbox)
+
copy_nspawn_settings(context)
copy_uki(context)
copy_vmlinuz(context)
kernel = enum.auto()
initrd = enum.auto()
partitions = enum.auto()
+ tar = enum.auto()
@staticmethod
def compat_no() -> list["ArtifactOutput"]:
def output_changelog(self) -> str:
return f"{self.output}.changelog"
+ @property
+ def output_tar(self) -> str:
+ output = f"{self.output}.tar"
+
+ if self.compress_output:
+ output += self.compress_output.extension()
+
+ return output
+
@property
def outputs(self) -> list[str]:
return [
self.output_signature,
self.output_manifest,
self.output_changelog,
+ self.output_tar,
]
def cache_manifest(self) -> dict[str, Any]:
`SplitArtifacts=`, `--split-artifacts`
: The artifact types to split out of the final image. A comma-delimited
- list consisting of `uki`, `kernel`, `initrd` and `partitions`. When
- building a bootable image `kernel` and `initrd` correspond to their
- artifact found in the image (or in the UKI), while `uki` copies out the
- entire UKI.
+ list consisting of `uki`, `kernel`, `initrd`, `partitions` and
+ `tar`. When building a bootable image `kernel` and `initrd`
+ correspond to their artifact found in the image (or in the UKI),
+ while `uki` copies out the entire UKI.
When building a disk image and `partitions` is specified,
pass `--split=yes` to **systemd-repart** to have it write out split partition
page for more information. This is useful in A/B update scenarios where
an existing disk image shall be augmented with a new version of a
root or `/usr` partition along with its Verity partition and unified
- kernel. By default `uki`, `kernel` and `initrd` are split out.
+ kernel.
+
+ When `tar` is specified, the rootfs is additionally archived as a
+ tar archive (compressed according to `CompressOutput=`).
+
+ By default `uki`, `kernel` and `initrd` are split out.
`RepartDirectories=`, `--repart-directory=`
: Paths to directories containing **systemd-repart** partition definition