Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions distro/azurelinux.distro.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" } }

6 changes: 6 additions & 0 deletions distro/mock/azl4/stage2-prod/azurelinux-4.0-aarch64.cfg
Original file line number Diff line number Diff line change
@@ -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')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: add newline at EOF

6 changes: 6 additions & 0 deletions distro/mock/azl4/stage2-prod/azurelinux-4.0-x86_64.cfg
Original file line number Diff line number Diff line change
@@ -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')
94 changes: 94 additions & 0 deletions distro/mock/azl4/stage2-prod/azurelinux-4.0.tpl
Original file line number Diff line number Diff line change
@@ -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
Comment thread
reubeno marked this conversation as resolved.
enabled=1
skip_if_unavailable=False

"""
6 changes: 6 additions & 0 deletions distro/stage2-prod.toml
Original file line number Diff line number Diff line change
@@ -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"
Loading