diff --git a/doc/configuration.rst b/doc/configuration.rst index 1feca98a..81d7eb5b 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -69,6 +69,10 @@ Options **release_internal** = False (*bool*) -- whether the compose is meant for public consumption +**treeinfo_version** + (*str*) Version to display in ``.treeinfo`` files. If not configured, the + value from ``release_version`` will be used. + Example ------- @@ -536,8 +540,9 @@ Options * ``add_template_var`` -- *[str]* (default empty) * ``add_arch_template_var`` -- *[str]* (default empty) * ``rootfs_size`` -- [*int*] (default empty) - * ``version`` -- [*str*] (default from ``release_version``) -- used as - ``--version`` and ``--release`` argument on the lorax command line + * ``version`` -- [*str*] (default from ``treeinfo_version`` or + ``release_version``) -- used as ``--version`` and ``--release`` + argument on the lorax command line * ``dracut_args`` -- [*[str]*] (default empty) override arguments for dracut. Please note that if this option is used, lorax will not use any other arguments, so you have to provide a full list and can not just diff --git a/pungi/checks.py b/pungi/checks.py index 2a4aa344..27854f7a 100644 --- a/pungi/checks.py +++ b/pungi/checks.py @@ -569,6 +569,8 @@ def make_schema(): "release_internal": {"type": "boolean", "default": False}, "release_discinfo_description": {"type": "string"}, + "treeinfo_version": {"type": "string"}, + "compose_type": { "type": "string", "enum": COMPOSE_TYPES, diff --git a/pungi/metadata.py b/pungi/metadata.py index 0b15d2bf..231acac8 100644 --- a/pungi/metadata.py +++ b/pungi/metadata.py @@ -224,7 +224,7 @@ def write_tree_info(compose, arch, variant, timestamp=None, bi=None): else: # release ti.release.name = compose.conf["release_name"] - ti.release.version = compose.conf["release_version"] + ti.release.version = compose.conf.get("treeinfo_version", compose.conf["release_version"]) ti.release.short = compose.conf["release_short"] ti.release.is_layered = True if compose.conf.get("base_product_name", "") else False ti.release.type = compose.conf["release_type"].lower() diff --git a/pungi/phases/buildinstall.py b/pungi/phases/buildinstall.py index 7ad825be..150f3937 100644 --- a/pungi/phases/buildinstall.py +++ b/pungi/phases/buildinstall.py @@ -72,7 +72,9 @@ class BuildinstallPhase(PhaseBase): add_arch_template_var = [] dracut_args = [] rootfs_size = None - version = self.compose.conf["release_version"] + version = self.compose.conf.get( + "treeinfo_version", self.compose.conf["release_version"] + ) for data in get_arch_variant_data(self.compose.conf, 'lorax_options', arch, variant): if not data.get('noupgrade', True): noupgrade = False