From 67187124784230d55abf505839a6900a941d80c8 Mon Sep 17 00:00:00 2001 From: soksanichenko Date: Mon, 6 Jun 2022 11:33:32 +0300 Subject: [PATCH] ALBS-413: Split the pungi config into templatable and non-templatable parts - a8.6 --- .gitignore | 2 + aarch64/include_exclude.conf | 86 ++++++++++++++++++ aarch64/multilib.conf | 3 + aarch64/variants_options.json | 72 +++++++++++++++ ppc64le/include_exclude.conf | 79 +++++++++++++++++ ppc64le/multilib.conf | 3 + ppc64le/variants_options.json | 72 +++++++++++++++ pungi-build.conf.j2 | 162 ++++++++++++++++++++++++++++++++++ x86_64/include_exclude.conf | 107 ++++++++++++++++++++++ x86_64/multilib.conf | 24 +++++ x86_64/variants_options.json | 90 +++++++++++++++++++ 11 files changed, 700 insertions(+) create mode 100644 .gitignore create mode 100644 aarch64/include_exclude.conf create mode 100644 aarch64/multilib.conf create mode 100644 aarch64/variants_options.json create mode 100644 ppc64le/include_exclude.conf create mode 100644 ppc64le/multilib.conf create mode 100644 ppc64le/variants_options.json create mode 100644 pungi-build.conf.j2 create mode 100644 x86_64/include_exclude.conf create mode 100644 x86_64/multilib.conf create mode 100644 x86_64/variants_options.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3228387 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +.venv diff --git a/aarch64/include_exclude.conf b/aarch64/include_exclude.conf new file mode 100644 index 0000000..89c5290 --- /dev/null +++ b/aarch64/include_exclude.conf @@ -0,0 +1,86 @@ +filter_packages = [ + ( + '^(BaseOS|AppStream|PowerTools)$', { + '${arch}': [ + "insights-client", + "libreport-plugin-rhtsupport", + "libreport-rhel", + "libreport-rhel-anaconda-bugzilla", + "libreport-rhel-bugzilla", + "redhat-backgrounds", + "redhat-logos", + "redhat-logos-httpd", + "redhat-logos-ipa", + "redhat-release-eula", + "redhat-support-lib-python", + "redhat-support-tool", + "spice-client-win-x64", + "spice-client-win-x86", + "spice-qxl-wddm-dod", + "spice-vdagent-win-x64", + "spice-vdagent-win-x86", + "virt-who", + "virtio-win", + "subscription-manager-cockpit", + "subscription-manager-initial-setup-addon", + "rhsm-gtk", + "rhsm-icons", + "rhc", + "rhc-worker-playbook", + "python2-gluster*", + "nmstate.noarch", + "libstoragemgmt-nfs-plugin.noarch", + "python3-libstoragemgmt.noarch", + "python3-libstoragemgmt-clibs", + "libstoragemgmt-nfs-plugin-clibs", + ] + } + ), + ( + '^(BaseOS)$', { + '${arch}': [ + "perl-Net-SSLeay", + "perl-Mozilla-CA", + "perl-IO-Socket-SSL", + ] + } + ), + ( + '^(AppStream)$', { + '${arch}': [ + "java-1.8.0-openjdk-slowdebug", + "java-1.8.0-openjdk-headless-slowdebug", + "sos", + ] + } + ) +] +filter_modules = [ + ( + '^(BaseOS|AppStream|PowerTools)$', { + '${arch}': [ + "jmc:rhel8", + ] + } + ) +] + +# Based in distribution-comparison-tool report +additional_packages = [ + ( + '^AppStream$', { + '*': [ + "almalinux-backgrounds", + "libreport-almalinux", + ] + } + ), + ( + '^ResilientStorage$', { + '*': [ + "dlm", + "cmirror", + ] + } + ) +] \ No newline at end of file diff --git a/aarch64/multilib.conf b/aarch64/multilib.conf new file mode 100644 index 0000000..2326c1b --- /dev/null +++ b/aarch64/multilib.conf @@ -0,0 +1,3 @@ +multilib_blacklist = {} +multilib_whitelist = {} +multilib = [] \ No newline at end of file diff --git a/aarch64/variants_options.json b/aarch64/variants_options.json new file mode 100644 index 0000000..7afd2bf --- /dev/null +++ b/aarch64/variants_options.json @@ -0,0 +1,72 @@ +{ + "BaseOS": { + "gather_methods": "hybrid", + "buildinstall_skip": false, + "image_name_format": "{release_short}-{{ distribution_major_version }}.{{ distribution_minor_version }}{{ beta_suffix }}-{arch}-{disc_type}{suffix}", + "createiso_skip": true, + "extra_isos": [{ + "include_variants": [ + "AppStream" + ], + "filename": "{release_short}-{{ distribution_major_version }}.{{ distribution_minor_version }}{{ beta_suffix }}-{arch}-{disc_type}{suffix}", + "skip_src": true + }] + }, + "AppStream": { + "gather_methods": "hybrid", + "buildinstall_skip": true, + "createiso_skip": true, + "variant_as_lookaside": [ + "BaseOS" + ] + }, + "PowerTools": { + "gather_methods": "hybrid", + "buildinstall_skip": true, + "createiso_skip": true, + "variant_as_lookaside": [ + "BaseOS", + "AppStream" + ] + }, + "HighAvailability": { + "gather_methods": "hybrid", + "buildinstall_skip": true, + "createiso_skip": true, + "variant_as_lookaside": [ + "BaseOS", + "AppStream" + ] + }, + "ResilientStorage": { + "gather_methods": "hybrid", + "buildinstall_skip": true, + "createiso_skip": true, + "variant_as_lookaside": [ + "BaseOS", + "AppStream" + ] + }, + "extras": { + "gather_methods": "hybrid", + "buildinstall_skip": true, + "createiso_skip": true, + "variant_as_lookaside": [ + "BaseOS", + "AppStream" + ] + }, + "Minimal": { + "gather_methods": { + "comps": "deps" + }, + "image_name_format": "{release_short}-{{ distribution_major_version }}.{{ distribution_minor_version }}{{ beta_suffix }}-{arch}-minimal{suffix}", + "buildinstall_skip": false, + "createiso_skip": true, + "extra_isos": [{ + "include_variants": [], + "filename": "{release_short}-{{ distribution_major_version }}.{{ distribution_minor_version }}{{ beta_suffix }}-{arch}-minimal{suffix}", + "skip_src": true + }] + } +} \ No newline at end of file diff --git a/ppc64le/include_exclude.conf b/ppc64le/include_exclude.conf new file mode 100644 index 0000000..8f6f932 --- /dev/null +++ b/ppc64le/include_exclude.conf @@ -0,0 +1,79 @@ +filter_packages = [ + ( + '^(BaseOS|AppStream|PowerTools)$', { + '${arch}': [ + "insights-client", + "libreport-plugin-rhtsupport", + "libreport-rhel", + "libreport-rhel-anaconda-bugzilla", + "libreport-rhel-bugzilla", + "redhat-backgrounds", + "redhat-logos", + "redhat-logos-httpd", + "redhat-logos-ipa", + "redhat-release-eula", + "redhat-support-lib-python", + "redhat-support-tool", + "spice-client-win-x64", + "spice-client-win-x86", + "spice-qxl-wddm-dod", + "spice-vdagent-win-x64", + "spice-vdagent-win-x86", + "virt-who", + "virtio-win", + "subscription-manager-cockpit", + "subscription-manager-initial-setup-addon", + "rhsm-gtk", + "rhsm-icons", + "rhc", + "rhc-worker-playbook", + "python2-gluster*", + "nmstate.noarch", + "glassfish-jaxb-bom", + "glassfish-jaxb-bom-ext", + "glassfish-jaxb-codemodel-parent", + "glassfish-jaxb-external-parent", + "glassfish-jaxb-runtime-parent", + "glassfish-jaxb-txw-parent", + ] + } + ), + ( + '^(BaseOS)$', { + '${arch}': [ + "perl-Net-SSLeay", + "perl-Mozilla-CA", + "perl-IO-Socket-SSL", + ] + } + ), + ( + '^(AppStream)$', { + '${arch}': [ + "java-1.8.0-openjdk-slowdebug", + "java-1.8.0-openjdk-headless-slowdebug", + "sos", + ] + } + ) +] +filter_modules = [] + +additional_packages = [ + ( + '^AppStream$', { + '*': [ + "almalinux-backgrounds", + "libreport-almalinux", + ] + } + ), + ( + '^ResilientStorage$', { + '*': [ + "dlm", + "cmirror", + ] + } + ) +] \ No newline at end of file diff --git a/ppc64le/multilib.conf b/ppc64le/multilib.conf new file mode 100644 index 0000000..2326c1b --- /dev/null +++ b/ppc64le/multilib.conf @@ -0,0 +1,3 @@ +multilib_blacklist = {} +multilib_whitelist = {} +multilib = [] \ No newline at end of file diff --git a/ppc64le/variants_options.json b/ppc64le/variants_options.json new file mode 100644 index 0000000..7afd2bf --- /dev/null +++ b/ppc64le/variants_options.json @@ -0,0 +1,72 @@ +{ + "BaseOS": { + "gather_methods": "hybrid", + "buildinstall_skip": false, + "image_name_format": "{release_short}-{{ distribution_major_version }}.{{ distribution_minor_version }}{{ beta_suffix }}-{arch}-{disc_type}{suffix}", + "createiso_skip": true, + "extra_isos": [{ + "include_variants": [ + "AppStream" + ], + "filename": "{release_short}-{{ distribution_major_version }}.{{ distribution_minor_version }}{{ beta_suffix }}-{arch}-{disc_type}{suffix}", + "skip_src": true + }] + }, + "AppStream": { + "gather_methods": "hybrid", + "buildinstall_skip": true, + "createiso_skip": true, + "variant_as_lookaside": [ + "BaseOS" + ] + }, + "PowerTools": { + "gather_methods": "hybrid", + "buildinstall_skip": true, + "createiso_skip": true, + "variant_as_lookaside": [ + "BaseOS", + "AppStream" + ] + }, + "HighAvailability": { + "gather_methods": "hybrid", + "buildinstall_skip": true, + "createiso_skip": true, + "variant_as_lookaside": [ + "BaseOS", + "AppStream" + ] + }, + "ResilientStorage": { + "gather_methods": "hybrid", + "buildinstall_skip": true, + "createiso_skip": true, + "variant_as_lookaside": [ + "BaseOS", + "AppStream" + ] + }, + "extras": { + "gather_methods": "hybrid", + "buildinstall_skip": true, + "createiso_skip": true, + "variant_as_lookaside": [ + "BaseOS", + "AppStream" + ] + }, + "Minimal": { + "gather_methods": { + "comps": "deps" + }, + "image_name_format": "{release_short}-{{ distribution_major_version }}.{{ distribution_minor_version }}{{ beta_suffix }}-{arch}-minimal{suffix}", + "buildinstall_skip": false, + "createiso_skip": true, + "extra_isos": [{ + "include_variants": [], + "filename": "{release_short}-{{ distribution_major_version }}.{{ distribution_minor_version }}{{ beta_suffix }}-{arch}-minimal{suffix}", + "skip_src": true + }] + } +} \ No newline at end of file diff --git a/pungi-build.conf.j2 b/pungi-build.conf.j2 new file mode 100644 index 0000000..96ad132 --- /dev/null +++ b/pungi-build.conf.j2 @@ -0,0 +1,162 @@ +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 }}" +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 }}", + "file": "{{ arch }}/comps.xml", +} + +link_type = 'hardlink' + +module_defaults_dir = 'koji/module_defaults' + +variants_file = { + "scm": "git", + "repo": "https://git.almalinux.org/almalinux/pungi-almalinux.git", + "branch": "a{{ distribution_major_version }}.{{ distribution_minor_version }}", + "file": "{{ arch }}/variants.xml", +} +hashed_directories = False + +tree_arches = ['{{ arch }}'] + +# PKGSET +pkgset_source = "koji" +koji_profile = "{{ product_name.lower() }}_{{ distribution_major_version }}" + +# PKGSET - KOJI +pkgset_koji_tag = "dist-c8-compose" +pkgset_koji_inherit = False +pkgset_koji_module_tag = "dist-c8-module-compose" +pkgset_allow_reuse = False + +filter_system_release_packages = False + +# GATHER +gather_prepopulate = { + "scm": "git", + "repo": "https://git.almalinux.org/almalinux/pungi-almalinux.git", + "branch": "a{{ distribution_major_version }}.{{ distribution_minor_version }}", + "file": "{{ arch }}/packages.json", +} + +gather_method = { + {% for variant, options in variants.items() %} + {% if options['gather_methods'] is string %} + "^{{ variant }}$": "{{ options['gather_methods'] }}", + {% else %} + "^{{ variant }}$": { + {% for source_name, gather_method in options['gather_methods'].items() %} + "{{ source_name }}": "{{ gather_method }}", + {% endfor %} + }, + {% endif %} + {% endfor %} +} + +gather_backend = "dnf" +check_deps = True +greedy_method = "none" +repoclosure_backend = "dnf" + +# CREATEREPO +createrepo_deltas = False +createrepo_database = True +createrepo_c = True +createrepo_checksum = "sha256" +createrepo_use_xz = True +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 }}', +] + +# CHECKSUMS +media_checksums = ['sha256'] +media_checksum_one_file = True +create_jigdo = False + +# BUILDINSTALL +bootable = True +buildinstall_method = "lorax" + +lorax_options = [ + ("^.*$", { + "*": { + "noupgrade": False, + "rootfs_size": 3, + "version": "{{ distribution_major_version }}.{{ distribution_minor_version }}" + } + }) +] + +buildinstall_skip = [ + {% for variant, options in variants.items() %} + {% if options['buildinstall_skip'] | default(false) %} + ("^{{ variant }}$", { + "*": True, + }), + {% endif %} + {% endfor %} +] + +image_name_format = { + {% for variant, options in variants.items() %} + {% if options['image_name_format'] | default(false) %} + "^{{ variant }}$": "{{ options['image_name_format'] }}", + {% endif %} + {% endfor %} + ".*": "{release_short}-{{ distribution_major_version }}.{{ distribution_minor_version }}{{ beta_suffix }}-{arch}-{disc_type}{suffix}", +} + +image_volid_formats = [ + '{release_short}-{{ distribution_major_version }}.{{ distribution_minor_version }}{{ beta_suffix }}-{arch}-{disc_type}', +] + +# CREATEISO +create_optional_isos = False + +createiso_skip = [ + {% for variant, options in variants.items() %} + {% if options['createiso_skip'] | default(false) %} + ("^{{ variant }}$", { + "*": True, + "src": True, + }), + {% endif %} + {% endfor %} +] + +extra_isos = { + {% for variant, options in variants.items() %} + {% if options['extra_isos'] | default(false) %} + "{{ variant }}": {{ options['extra_isos'] }}, + {% endif %} + {% endfor %} +} + + +restricted_volid = True + +# LOOKASIDE +variant_as_lookaside = [ + {% for variant, options in variants.items() %} + {% if options['variant_as_lookaside'] | default(false) %} + {% for lookaside_variant in options['variant_as_lookaside'] %} + ('{{ variant }}', '{{ lookaside_variant }}'), + {% endfor %} + {% endif %} + {% endfor %} +] + +productimg = False diff --git a/x86_64/include_exclude.conf b/x86_64/include_exclude.conf new file mode 100644 index 0000000..2c26723 --- /dev/null +++ b/x86_64/include_exclude.conf @@ -0,0 +1,107 @@ +filter_packages = [ + ( + '^(BaseOS|AppStream|PowerTools)$', { + '${arch}': [ + "insights-client", + "libreport-plugin-rhtsupport", + "libreport-rhel", + "libreport-rhel-anaconda-bugzilla", + "libreport-rhel-bugzilla", + "redhat-backgrounds", + "redhat-logos", + "redhat-logos-httpd", + "redhat-logos-ipa", + "redhat-release-eula", + "redhat-support-lib-python", + "redhat-support-tool", + "spice-client-win-x64", + "spice-client-win-x86", + "spice-qxl-wddm-dod", + "spice-vdagent-win-x64", + "spice-vdagent-win-x86", + "virt-who", + "virtio-win", + "subscription-manager-cockpit", + "subscription-manager-initial-setup-addon", + "rhsm-gtk", + "rhsm-icons", + "rhc", + "rhc-worker-playbook", + "python2-gluster*", + "gcc-toolset-10-dyninst-devel.i686", + "gcc-toolset-10-systemtap-devel.i686", + "gcc-toolset-10-systemtap-sdt-devel.i686", + "ocaml-camlp4.i686", + "ocaml-camlp4-devel.i686", + "ocaml-extlib-devel.i686", + "ocaml-findlib-devel.i686", + "ocaml-labltk.i686", + "ocaml-labltk-devel.i686", + "ocaml-ocamlbuild.i686", + "ocaml-ocamlbuild-devel.i686", + "sblim-gather.i686", + "nmstate.noarch", + "glassfish-jaxb-bom", + "glassfish-jaxb-bom-ext", + "glassfish-jaxb-codemodel-parent", + "glassfish-jaxb-parent", + "glassfish-jaxb-external-parent", + "glassfish-jaxb-runtime-parent", + "glassfish-jaxb-txw-parent", + "libstoragemgmt-nfs-plugin.noarch", + "python3-libstoragemgmt.noarch", + "python3-libstoragemgmt-clibs", + "libstoragemgmt-nfs-plugin-clibs", + ] + } + ), + ( + '^(BaseOS)$', { + '${arch}': [ + "perl-Net-SSLeay", + "perl-Mozilla-CA", + "perl-IO-Socket-SSL", + ] + } + ), + ( + '^(AppStream)$', { + '${arch}': [ + "java-1.8.0-openjdk-slowdebug", + "java-1.8.0-openjdk-headless-slowdebug", + "libvirt-glib.i686", + "sos", + ] + } + ) +] + +filter_modules = [] + +additional_packages = [ + ( + '^AppStream$', { + '*': [ + "almalinux-backgrounds", + "libreport-almalinux", + "nmstate.x86_64", + ] + } + ), + ( + '^ResilientStorage$', { + '*': [ + "dlm", + "cmirror", + "xfsprogs.i686", + ] + } + ), + ( + '^HighAvailability$', { + '*': [ + "xfsprogs.i686", + ] + } + ) +] \ No newline at end of file diff --git a/x86_64/multilib.conf b/x86_64/multilib.conf new file mode 100644 index 0000000..a9cca46 --- /dev/null +++ b/x86_64/multilib.conf @@ -0,0 +1,24 @@ +multilib_blacklist = { + '*': [ + "gcc-toolset-10-dyninst-devel", + "gcc-toolset-10-systemtap-devel", + "gcc-toolset-10-systemtap-sdt-devel", + "ocaml-camlp4", + "ocaml-camlp4-devel", + "ocaml-extlib-devel", + "ocaml-findlib-devel", + "ocaml-labltk", + "ocaml-labltk-devel", + "ocaml-ocamlbuild", + "ocaml-ocamlbuild-devel", + "libvirt-glib", + "sblim-gather", + ], +} + +multilib_whitelist = {} +multilib = [ + ('^.*$', { + 'x86_64': ['devel', 'runtime'] + }), +] \ No newline at end of file diff --git a/x86_64/variants_options.json b/x86_64/variants_options.json new file mode 100644 index 0000000..6a2006a --- /dev/null +++ b/x86_64/variants_options.json @@ -0,0 +1,90 @@ +{ + "BaseOS": { + "gather_methods": "hybrid", + "buildinstall_skip": false, + "image_name_format": "{release_short}-{{ distribution_major_version }}.{{ distribution_minor_version }}{{ beta_suffix }}-{arch}-{disc_type}{suffix}", + "createiso_skip": true, + "extra_isos": [{ + "include_variants": [ + "AppStream" + ], + "filename": "{release_short}-{{ distribution_major_version }}.{{ distribution_minor_version }}{{ beta_suffix }}-{arch}-{disc_type}{suffix}", + "skip_src": true + }] + }, + "AppStream": { + "gather_methods": "hybrid", + "buildinstall_skip": true, + "createiso_skip": true, + "variant_as_lookaside": [ + "BaseOS" + ] + }, + "PowerTools": { + "gather_methods": "hybrid", + "buildinstall_skip": true, + "createiso_skip": true, + "variant_as_lookaside": [ + "BaseOS", + "AppStream" + ] + }, + "HighAvailability": { + "gather_methods": "hybrid", + "buildinstall_skip": true, + "createiso_skip": true, + "variant_as_lookaside": [ + "BaseOS", + "AppStream" + ] + }, + "ResilientStorage": { + "gather_methods": "hybrid", + "buildinstall_skip": true, + "createiso_skip": true, + "variant_as_lookaside": [ + "BaseOS", + "AppStream" + ] + }, + "extras": { + "gather_methods": "hybrid", + "buildinstall_skip": true, + "createiso_skip": true, + "variant_as_lookaside": [ + "BaseOS", + "AppStream" + ] + }, + "RT": { + "gather_methods": "hybrid", + "buildinstall_skip": true, + "createiso_skip": true, + "variant_as_lookaside": [ + "BaseOS", + "AppStream" + ] + }, + "NFV": { + "gather_methods": "hybrid", + "buildinstall_skip": true, + "createiso_skip": true, + "variant_as_lookaside": [ + "BaseOS", + "AppStream" + ] + }, + "Minimal": { + "gather_methods": { + "comps": "deps" + }, + "image_name_format": "{release_short}-{{ distribution_major_version }}.{{ distribution_minor_version }}{{ beta_suffix }}-{arch}-minimal{suffix}", + "buildinstall_skip": false, + "createiso_skip": true, + "extra_isos": [{ + "include_variants": [], + "filename": "{release_short}-{{ distribution_major_version }}.{{ distribution_minor_version }}{{ beta_suffix }}-{arch}-minimal{suffix}", + "skip_src": true + }] + } +} \ No newline at end of file