diff options
| author | 2024-11-16 20:18:31 -0500 | |
|---|---|---|
| committer | 2024-11-16 20:18:31 -0500 | |
| commit | 2c5cf67014f3c755c2f1b42794f804388a64e35c (patch) | |
| tree | 897fbe1fefe470914607d5731ddcf29a2a3225f2 /scripts/fedora-kiwi-bundle-format-generator | |
| parent | 400c842f0a85a87d767f736f153d607d07cf1311 (diff) | |
| download | kiwi-descriptions-2c5cf67014f3c755c2f1b42794f804388a64e35c.tar.gz kiwi-descriptions-2c5cf67014f3c755c2f1b42794f804388a64e35c.zip | |
kiwi-build: Update to mimic production builds more closely
Production builds in Fedora have a couple extra features:
* ISOs have custom overrides to set the correct volume/app IDs
* Image filenames are structured to follow roughly NVRA format
Now we support these features with extra helper scripts. If a
"image release" value is passed in, then we fully mimic the
production image build process.
This will be particularly useful for making respins of Fedora images
with updates applied.
Diffstat (limited to 'scripts/fedora-kiwi-bundle-format-generator')
| -rwxr-xr-x | scripts/fedora-kiwi-bundle-format-generator | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/scripts/fedora-kiwi-bundle-format-generator b/scripts/fedora-kiwi-bundle-format-generator new file mode 100755 index 0000000..571a17b --- /dev/null +++ b/scripts/fedora-kiwi-bundle-format-generator @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 + +# Simple tool to generate bundle formats for kiwi image builds +# Author: Neal Gompa <ngompa@fedoraproject.org> +# SPDX-3.0-License-Identifier: GPL-3.0-or-later +# SPDX-2.0-License-Identifier: GPL-3.0+ + +from argparse import ArgumentParser +from pathlib import Path + +import xml.etree.ElementTree as ET + + +parser = ArgumentParser(description="Generator of ISO labels for Fedora live media builds") +parser.add_argument("kiwi_file", type=Path, default="Fedora.kiwi", help="kiwi description file") +parser.add_argument("image_profile", type=str, help="kiwi image profile") +parser.add_argument("--oci-variant", "-o", action="store_true", help="generate oci variant") +args = parser.parse_args() + +xml_tree = ET.parse(args.kiwi_file) +image_root = xml_tree.getroot() + +image_basename = image_root.attrib["name"] +image_profile = args.image_profile + +image_bundle_format = f"{image_basename}-{image_profile}-%v.%I.%A" + +if args.oci_variant: + print(f"{image_bundle_format}.%T") +else: + print(image_bundle_format) |