kiwi.builder Package

Submodules

kiwi.builder.archive Module

class kiwi.builder.archive.ArchiveBuilder(xml_state: XMLState, target_dir: str, root_dir: str, custom_args: Dict | None = None)[source]

Bases: object

Root archive image builder

Parameters:
  • xml_state (object) – Instance of XMLState

  • target_dir (str) – target directory path name

  • root_dir (str) – root directory path name

  • custom_args (dict) – Custom processing arguments defined as hash keys: * xz_options: string of XZ compression parameters

create() Result[source]

Create a root archive tarball

Build a simple XZ compressed root tarball from the image root tree

Image types which triggers this builder are:

  • image=”tbz”

  • image=”cpio”

Returns:

result

Return type:

instance of Result

kiwi.builder.container Module

class kiwi.builder.container.ContainerBuilder(xml_state: XMLState, target_dir: str, root_dir: str, custom_args: Dict | None = None)[source]

Bases: object

Container image builder

Parameters:
  • xml_state (object) – Instance of XMLState

  • target_dir (str) – target directory path name

  • root_dir (str) – root directory path name

  • custom_args (dict) – Custom processing arguments defined as hash keys: * xz_options: string of XZ compression parameters

create() Result[source]

Builds a container image which is usually a data archive including container specific metadata.

Image types which triggers this builder are:

  • image=”docker”

  • image=”oci”

  • image=”appx”

Returns:

result

Return type:

instance of Result

kiwi.builder.disk Module

class kiwi.builder.disk.DiskBuilder(xml_state: XMLState, target_dir: str, root_dir: str, custom_args: Dict | None = None)[source]

Bases: object

Disk image builder

Parameters:
  • xml_state (object) – Instance of XMLState

  • target_dir (str) – Target directory path name

  • root_dir (str) – Root directory path name

  • custom_args (dict) – Custom processing arguments defined as hash keys: * signing_keys: list of package signing keys * xz_options: string of XZ compression parameters

append_unpartitioned_space() None[source]

Extends the raw disk if an unpartitioned area is specified

create() Result[source]

Build a bootable disk image and optional installation image The installation image is a bootable hybrid ISO image which embeds the disk image and an image installer

Image types which triggers this builder are:

  • image=”oem”

Returns:

result

Return type:

instance of Result

create_disk() Result[source]

Build a bootable raw disk image

Raises:
Returns:

result

Return type:

instance of Result

create_disk_format(result_instance: Result) Result[source]

Create a bootable disk format from a previously created raw disk image

Parameters:

result_instance (object) – instance of Result

Returns:

updated result_instance

Return type:

instance of Result

create_install_media(result_instance: Result) Result[source]

Build an installation image. The installation image is a bootable hybrid ISO image which embeds the raw disk image and an image installer

Parameters:

result_instance (object) – instance of Result

Returns:

updated result_instance with installation media

Return type:

instance of Result

class kiwi.builder.disk.StorageMap[source]

Bases: TypedDict

integrity_root: IntegrityDevice | None
luks_root: LuksDevice | None
raid_root: RaidDevice | None
system: FileSystemBase | VolumeManagerBase | None
system_boot: FileSystemBase | None
system_custom_parts: Dict[str, FileSystemBase]
system_efi: FileSystemBase | None
system_spare: FileSystemBase | None

kiwi.builder.filesystem Module

class kiwi.builder.filesystem.FileSystemBuilder(xml_state: XMLState, target_dir: str, root_dir: str, custom_args: Dict | None = None)[source]

Bases: object

Filesystem image builder

Parameters:
  • xml_state (obsject) – Instance of XMLState

  • target_dir (str) – target directory path name

  • root_dir (str) – root directory path name

  • custom_args (dict) – Custom processing arguments defined as hash keys: * None

create() Result[source]

Build a mountable filesystem image

Image types which triggers this builder are:

  • image=”ext2”

  • image=”ext3”

  • image=”ext4”

  • image=”btrfs”

  • image=”xfs”

Returns:

result

Return type:

instance of Result

kiwi.builder.install Module

class kiwi.builder.install.InstallImageBuilder(xml_state: XMLState, root_dir: str, target_dir: str, boot_image_task: BootImageBase | None, custom_args: Dict | None = None)[source]

Bases: object

Installation image builder

Parameters:
  • xml_state (object) – instance of XMLState

  • root_dir (str) – system image root directory

  • target_dir (str) – target directory path name

  • boot_image_task (object) – instance of BootImage

  • custom_args (dict) – Custom processing arguments defined as hash keys: * xz_options: string of XZ compression parameters

create_install_iso() None[source]

Create an install ISO from the disk_image as hybrid ISO bootable via legacy BIOS, EFI and as disk from Stick

Image types which triggers this builder are:

  • installiso=”true|false”

  • installstick=”true|false”

create_install_pxe_archive() None[source]

Create an oem install tar archive suitable for installing a disk image via the network using the PXE boot protocol. The archive contains:

  • The raw system image xz compressed

  • The raw system image checksum metadata file

  • The append file template for the boot server

  • The system image initrd for kexec

  • The install initrd

  • The kernel

Image types which triggers this builder are:

  • installpxe=”true|false”

kiwi.builder.live Module

class kiwi.builder.live.LiveImageBuilder(xml_state: XMLState, target_dir: str, root_dir: str, custom_args: Dict | None = None)[source]

Bases: object

Live image builder

Parameters:
  • xml_state (object) – instance of XMLState

  • target_dir (str) – target directory path name

  • root_dir (str) – root directory path name

  • custom_args (dict) – Custom processing arguments

create() Result[source]

Build a bootable hybrid live ISO image

Image types which triggers this builder are:

  • image=”iso”

Raises:

KiwiLiveBootImageError – if no kernel or hipervisor is found in boot image tree

Returns:

result

Return type:

instance of Result

kiwi.builder.kis Module

class kiwi.builder.kis.KisBuilder(xml_state: XMLState, target_dir: str, root_dir: str, custom_args: Dict | None = None)[source]

Bases: object

Filesystem based image builder.

Parameters:
  • xml_state (object) – instance of XMLState

  • target_dir (str) – target directory path name

  • root_dir (str) – system image root directory

  • custom_args (dict) – Custom processing arguments defined as hash keys: * signing_keys: list of package signing keys * xz_options: string of XZ compression parameters

create() Result[source]

Build a component image consisting out of a boot image(initrd) plus its appropriate kernel files and the root filesystem image with a checksum.

Image types which triggers this builder are:

  • image=”kis”

  • image=”pxe”

Raises:

KiwiKisBootImageError – if no kernel or hipervisor is found in boot image tree

Returns:

result

Return type:

instance of Result

Module Contents

class kiwi.builder.ImageBuilder[source]

Bases: object

Image builder factory

static new(xml_state: XMLState, target_dir: str, root_dir: str, custom_args: Dict | None = None)[source]