diff --git a/distro/azurelinux.distro.toml b/distro/azurelinux.distro.toml index 2662f685e26..a263841e55e 100644 --- a/distro/azurelinux.distro.toml +++ b/distro/azurelinux.distro.toml @@ -36,3 +36,21 @@ mock-config-aarch64 = "mock/azl4/stage2/azurelinux-4.0-aarch64.cfg" [distros.azurelinux.versions.'4.0-stage2'.default-component-config] # NOTE: Ensure that the snapshot date matches the snapshot date used above for stage1. spec = { type = "upstream", upstream-distro = { name = "fedora", version = "43", snapshot = "2026-02-24T00:00:00-08:00" } } + +# +# Azure Linux 4.0 Stage2 (prod/PME) +# +# This build of Azure Linux 4.0 consumes the outputs of Stage 1 as inputs, +# both for buildroot and build dependencies. +# + +[distros.azurelinux.versions.'4.0-stage2-prod'] +description = "Azure Linux 4.0 Stage2 PROD" +release-ver = "4.0" +mock-config-x86_64 = "mock/azl4/stage2-prod/azurelinux-4.0-x86_64.cfg" +mock-config-aarch64 = "mock/azl4/stage2-prod/azurelinux-4.0-aarch64.cfg" + +[distros.azurelinux.versions.'4.0-stage2-prod'.default-component-config] +# NOTE: Ensure that the snapshot date matches the snapshot date used above for stage1. +spec = { type = "upstream", upstream-distro = { name = "fedora", version = "43", snapshot = "2026-02-24T00:00:00-08:00" } } + diff --git a/distro/mock/azl4/stage2-prod/azurelinux-4.0-aarch64.cfg b/distro/mock/azl4/stage2-prod/azurelinux-4.0-aarch64.cfg new file mode 100644 index 00000000000..9bee11cad32 --- /dev/null +++ b/distro/mock/azl4/stage2-prod/azurelinux-4.0-aarch64.cfg @@ -0,0 +1,6 @@ +# aarch64-specific configuration +config_opts['target_arch'] = 'aarch64' +config_opts['legal_host_arches'] = ('aarch64',) + +# Include common Azure Linux 4.0 configuration +include('azurelinux-4.0.tpl') \ No newline at end of file diff --git a/distro/mock/azl4/stage2-prod/azurelinux-4.0-x86_64.cfg b/distro/mock/azl4/stage2-prod/azurelinux-4.0-x86_64.cfg new file mode 100644 index 00000000000..4e076cd8e88 --- /dev/null +++ b/distro/mock/azl4/stage2-prod/azurelinux-4.0-x86_64.cfg @@ -0,0 +1,6 @@ +# x86_64-specific configuration +config_opts['target_arch'] = 'x86_64' +config_opts['legal_host_arches'] = ('x86_64',) + +# Include common Azure Linux 4.0 configuration +include('azurelinux-4.0.tpl') diff --git a/distro/mock/azl4/stage2-prod/azurelinux-4.0.tpl b/distro/mock/azl4/stage2-prod/azurelinux-4.0.tpl new file mode 100644 index 00000000000..6522036bbae --- /dev/null +++ b/distro/mock/azl4/stage2-prod/azurelinux-4.0.tpl @@ -0,0 +1,94 @@ +# Disable bootstrap image for now. +config_opts['use_bootstrap_image'] = False + +# General packages required +# TODO: This will be moved into a comp.xml file. +config_opts['chroot_setup_cmd'] = 'install' + +# We enable this for now; it's only required for stage2 builds that consume +# dependencies from stage1. This config currently consumes dependencies from +# stage1. +config_opts['chroot_setup_cmd'] += ' azurelinux-stage1-compat' + +config_opts['chroot_setup_cmd'] += ' bash' +config_opts['chroot_setup_cmd'] += ' bzip2' +config_opts['chroot_setup_cmd'] += ' coreutils' +config_opts['chroot_setup_cmd'] += ' cpio' +config_opts['chroot_setup_cmd'] += ' diffutils' +config_opts['chroot_setup_cmd'] += ' azurelinux-release-common' +config_opts['chroot_setup_cmd'] += ' findutils' +config_opts['chroot_setup_cmd'] += ' gawk' +config_opts['chroot_setup_cmd'] += ' glibc-minimal-langpack' +config_opts['chroot_setup_cmd'] += ' grep' +config_opts['chroot_setup_cmd'] += ' gzip' +config_opts['chroot_setup_cmd'] += ' info' +config_opts['chroot_setup_cmd'] += ' patch' +config_opts['chroot_setup_cmd'] += ' azurelinux-rpm-config' +config_opts['chroot_setup_cmd'] += ' rpm-build' +config_opts['chroot_setup_cmd'] += ' sed' +config_opts['chroot_setup_cmd'] += ' shadow-utils' +config_opts['chroot_setup_cmd'] += ' tar' +config_opts['chroot_setup_cmd'] += ' unzip' +config_opts['chroot_setup_cmd'] += ' util-linux' +config_opts['chroot_setup_cmd'] += ' which' +config_opts['chroot_setup_cmd'] += ' xz' + +# Provide path to system-installed logging.ini file. +config_opts['log_config_file'] = '/etc/mock/logging.ini' + +# Plugin config +config_opts['plugin_conf']['ccache_enable'] = False + +# Failure behavior +config_opts['cleanup_on_success'] = False +config_opts['cleanup_on_failure'] = False + +config_opts['macros']['%dist'] = '.azl4' +config_opts['macros']['%vendor'] = 'Microsoft Corporation' +config_opts['macros']['%distribution'] = 'Azure Linux' +config_opts['dist'] = 'azl4' +config_opts['extra_chroot_dirs'] = ['/run/lock'] +config_opts['releasever'] = '4.0' +config_opts['package_manager'] = 'dnf5' +config_opts['update_before_build'] = False +config_opts['root'] = 'azl-4.0-stage2-prod-{{ target_arch }}' + +# When rpmautospec is enabled, +# the %autorelease and %autochangelog macros can be used in spec files +# to automatically generate release numbers and changelog entries based +# on the git history, eliminating the need to manually maintain them. +config_opts['plugin_conf']['rpmautospec_enable'] = True +config_opts['plugin_conf']['rpmautospec_opts'] = { + 'requires': ['rpmautospec'], + 'cmd_base': ['/usr/bin/rpmautospec', 'process-distgit'], +} + +config_opts['dnf.conf'] = """ +[main] +zchunk=true +keepcache=1 +system_cachedir=/var/cache/dnf +debuglevel=2 +reposdir=/dev/null +logfile=/var/log/yum.log +retries=20 +obsoletes=1 +gpgcheck=0 +assumeyes=1 +syslog_ident=mock +syslog_device= +install_weak_deps=0 +metadata_expire=0 +best=1 +module_platform_id=platform:f{{ releasever }} +protected_packages= +user_agent={{ user_agent }} + +[base] +name=base +baseurl=https://52.185.225.133/kojifiles/repos/azl4-build/latest/$basearch +sslverify=0 +enabled=1 +skip_if_unavailable=False + +""" diff --git a/distro/stage2-prod.toml b/distro/stage2-prod.toml new file mode 100644 index 00000000000..f1f9f616d3a --- /dev/null +++ b/distro/stage2-prod.toml @@ -0,0 +1,6 @@ +# This config file is not included by default in the containing project, but may +# be explicitly added to force selection of 4.0-stage2-prod as the default distro +# version to build. + +[distros.azurelinux] +default-version = "4.0-stage2-prod"