From 3b388f8a0c4975a0499f06e46a4f7dcdb15fcc72 Mon Sep 17 00:00:00 2001 From: soksanichenko Date: Wed, 7 Dec 2022 16:00:13 +0200 Subject: [PATCH] - Use separate variables for a branch name and a full version --- pungi-build.conf.j2 | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/pungi-build.conf.j2 b/pungi-build.conf.j2 index e416c16..bbff98c 100644 --- a/pungi-build.conf.j2 +++ b/pungi-build.conf.j2 @@ -1,17 +1,20 @@ +{% set full_version = distribution_major_version + "." + distribution_minor_version %} +{% set branch = "a" + full_version + beta_suffix if beta_suffix is defined and beta_suffix else "" %} + from include_exclude import * from multilib import * # PRODUCT INFO release_name = "{{ product_name }}" release_short = "{{ product_name }}" -release_version = "{{ distribution_major_version }}.{{ distribution_minor_version }}" +release_version = "{{ full_version }}" treeinfo_version = "{{ distribution_major_version }}" # GENERAL SETTINGS comps_file = { "scm": "git", "repo": "https://git.almalinux.org/almalinux/pungi-almalinux.git", - "branch": "a{{ distribution_major_version }}.{{ distribution_minor_version }}{{ '-beta' if beta_suffix is defined and beta_suffix else '' }}", + "branch": "{{ branch }}", "file": "{{ arch }}/comps.xml", } @@ -20,20 +23,22 @@ link_type = 'hardlink' module_defaults_dir = { "scm": "git", "repo": "https://git.almalinux.org/almalinux/pungi-almalinux.git", - "branch": "a{{ distribution_major_version }}.{{ distribution_minor_version }}{{ '-beta' if beta_suffix is defined and beta_suffix else '' }}", + "branch": "{{ branch }}", "dir": "{{ arch }}/modules_defaults", } variants_file = { "scm": "git", "repo": "https://git.almalinux.org/almalinux/pungi-almalinux.git", - "branch": "a{{ distribution_major_version }}.{{ distribution_minor_version }}{{ '-beta' if beta_suffix is defined and beta_suffix else '' }}", + "branch": "{{ branch }}", "file": "{{ arch }}/variants.xml", } hashed_directories = False tree_arches = ['{{ arch }}'] +symlink_isos_to = 'isos/{{ arch }}' + # PKGSET pkgset_source = "kojimock" koji_profile = "{{ product_name.lower() }}_{{ distribution_major_version }}" @@ -57,7 +62,7 @@ filter_system_release_packages = False gather_prepopulate = { "scm": "git", "repo": "https://git.almalinux.org/almalinux/pungi-almalinux.git", - "branch": "a{{ distribution_major_version }}.{{ distribution_minor_version }}{{ '-beta' if beta_suffix is defined and beta_suffix else '' }}", + "branch": "{{ branch }}", "file": "{{ arch }}/packages.json", } @@ -90,7 +95,7 @@ createrepo_num_threads = 8 createrepo_num_workers = 4 createrepo_extra_args = [ '--distro=cpe:/o:{{ product_name.lower() }}:{{ product_name.lower() }}:{{ distribution_major_version }},{{ product_name }} {{ distribution_major_version }}', - '--revision={{ distribution_major_version }}.{{ distribution_minor_version }}', + '--revision={{ full_version }}', ] # CHECKSUMS @@ -107,7 +112,7 @@ lorax_options = [ "*": { "noupgrade": False, "rootfs_size": 3, - "version": "{{ distribution_major_version }}.{{ distribution_minor_version }}" + "version": "{{ full_version }}" } }) ] @@ -128,11 +133,11 @@ image_name_format = { "^{{ variant }}$": "{{ options['image_name_format'] }}", {% endif %} {% endfor %} - ".*": "{release_short}-{{ distribution_major_version }}.{{ distribution_minor_version }}{{ beta_suffix }}-{arch}-{disc_type}{suffix}", + ".*": "{release_short}-{{ full_version }}{{ beta_suffix }}-{arch}-{disc_type}{suffix}", } image_volid_formats = [ - '{release_short}-{{ distribution_major_version }}.{{ distribution_minor_version }}{{ beta_suffix }}-{arch}-{disc_type}', + '{release_short}-{{ full_version }}{{ beta_suffix }}-{arch}-{disc_type}', ] # CREATEISO