diff --git a/doc/configuration.rst b/doc/configuration.rst index 90621bbc..14947feb 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -1887,9 +1887,14 @@ will thus create a new OCI archive image *from scratch*. * ``runroot_packages`` -- (*list*) A list of additional package names to be installed in the runroot environment in Koji. * ``subvariant`` -- (*str*) The subvariant value to be used in the metadata - for the image. Also used in the image's filename. Defaults to being the - same as the variant. If building more than one ostree container in a - variant, each must have a unique subvariant. + for the image. Also used in the image's filename, unless overridden by + ``name``. Defaults to being the same as the variant. If building more + than one ostree container in a variant, each must have a unique + subvariant. + * ``name`` -- (*str*) The base for the image's filename. To produce the + complete filename, the image's architecture, the version string, and the + format suffix are appended to this. Defaults to the value of + ``release_short`` and the subvariant, joined by a dash. Example config -------------- diff --git a/pungi/checks.py b/pungi/checks.py index df9ff28e..291cf234 100644 --- a/pungi/checks.py +++ b/pungi/checks.py @@ -1115,6 +1115,7 @@ def make_schema(): "$ref": "#/definitions/list_of_strings", }, "subvariant": {"type": "string"}, + "name": {"type": "string"}, }, "required": [ "treefile", diff --git a/pungi/phases/ostree_container.py b/pungi/phases/ostree_container.py index e1119985..c50633db 100644 --- a/pungi/phases/ostree_container.py +++ b/pungi/phases/ostree_container.py @@ -123,11 +123,8 @@ class OSTreeContainerThread(WorkerThread): target_dir = compose.paths.compose.image_dir(variant) % {"arch": arch} util.makedirs(target_dir) version = util.version_generator(compose, config.get("version")) - archive_name = "%s-%s-%s" % ( - compose.conf["release_short"], - subvariant, - version, - ) + anb = config.get("name", "%s-%s" % (compose.conf["release_short"], subvariant)) + archive_name = "%s-%s-%s" % (anb, arch, version) # Run the pungi-make-ostree command locally to create a script to # execute in runroot environment.