msg: str,
skip: Sequence[str] = [],
split: bool = False,
+ tabs: bool = False,
root: Optional[Path] = None,
definitions: Sequence[Path] = [],
) -> list[Partition]:
"--json=pretty",
"--no-pager",
f"--offline={yes_no(context.config.repart_offline)}",
- "--seed", str(context.config.seed) if context.config.seed else "random",
+ "--seed", str(context.config.seed),
context.staging / context.config.output_with_format,
]
options: list[PathString] = ["--bind", context.staging, context.staging]
cmdline += ["--split=yes"]
if context.config.sector_size:
cmdline += ["--sector-size", str(context.config.sector_size)]
+ if tabs and systemd_tool_version(context.config, "systemd-repart") >= 256:
+ cmdline += [
+ "--generate-fstab=/etc/fstab",
+ "--generate-crypttab=/etc/crypttab",
+ ]
for d in definitions:
cmdline += ["--definitions", d]
msg: str,
skip: Sequence[str] = [],
split: bool = False,
+ tabs: bool = False,
) -> list[Partition]:
if context.config.output_format != OutputFormat.disk:
return []
definitions = [defaults]
- return make_image(context, msg=msg, skip=skip, split=split, root=context.root, definitions=definitions)
+ return make_image(context, msg=msg, skip=skip, split=split, tabs=tabs, root=context.root, definitions=definitions)
def make_esp(context: Context, uki: Path) -> list[Partition]:
run_finalize_scripts(context)
normalize_mtime(context.root, context.config.source_date_epoch)
- partitions = make_disk(context, skip=("esp", "xbootldr"), msg="Generating disk image")
+ partitions = make_disk(context, skip=("esp", "xbootldr"), tabs=True, msg="Generating disk image")
install_uki(context, partitions)
prepare_grub_efi(context)
prepare_grub_bios(context, partitions)
repart_offline: bool
overlay: bool
use_subvolumes: ConfigFeature
- seed: Optional[uuid.UUID]
+ seed: uuid.UUID
packages: list[str]
build_packages: list[str]
metavar="UUID",
section="Output",
parse=config_parse_seed,
+ default=uuid.uuid4(),
help="Set the seed for systemd-repart",
),
def path_list_transformer(pathlist: list[str], fieldtype: type[list[Path]]) -> list[Path]:
return [Path(p) for p in pathlist]
- def optional_uuid_transformer(optuuid: Optional[str], fieldtype: type[Optional[uuid.UUID]]) -> Optional[uuid.UUID]:
- return uuid.UUID(optuuid) if optuuid is not None else None
+ def uuid_transformer(uuidstr: str, fieldtype: type[uuid.UUID]) -> uuid.UUID:
+ return uuid.UUID(uuidstr)
def root_password_transformer(
rootpw: Optional[list[Union[str, bool]]], fieldtype: type[Optional[tuple[str, bool]]]
Path: path_transformer,
Optional[Path]: optional_path_transformer,
list[Path]: path_list_transformer,
- Optional[uuid.UUID]: optional_uuid_transformer,
+ uuid.UUID: uuid_transformer,
Optional[tuple[str, bool]]: root_password_transformer,
list[ConfigTree]: config_tree_transformer,
tuple[str, ...]: str_tuple_transformer,