Skip to main content
This page documents all build variables available in the Azure Linux build system. Variables are organized by category.

Target Configuration

CONFIG_FILE
string
default:""
Path to image configuration file to build. Defines package dependencies and final image format.Example: CONFIG_FILE=./imageconfigs/core-efi.json
CONFIG_BASE_DIR
string
default:"$(dir $(CONFIG_FILE))"
Base directory on the build machine to search for relative file paths in the image config file.
PACKAGE_BUILD_LIST
string
default:""
Explicit list of packages to build. Accepts both spec and package names.Example: PACKAGE_BUILD_LIST="vim nano openssh"
PACKAGE_REBUILD_LIST
string
default:""
Always rebuild these packages even if up-to-date. Accepts both spec and package names.Example: PACKAGE_REBUILD_LIST="kernel openssh"
PACKAGE_IGNORE_LIST
string
default:""
Pretend these packages were already built successfully.Example: PACKAGE_IGNORE_LIST="ncurses"
SRPM_PACK_LIST
string
default:""
List of spec basenames to build into SRPMs. If empty, all specs under SPECS_DIR are packed. Accepts only spec names.Example: SRPM_PACK_LIST="kernel golang openssh"
TEST_RUN_LIST
string
default:""
Explicit list of packages to test. Accepts both spec and package names.Example: TEST_RUN_LIST="libguestfs zlib"
TEST_RERUN_LIST
string
default:""
Always test these packages even if up-to-date. Accepts both spec and package names.Example: TEST_RERUN_LIST="libguestfs zlib"
TEST_IGNORE_LIST
string
default:""
Ignore testing these packages. Accepts both spec and package names.Example: TEST_IGNORE_LIST="acl"

Rebuild vs Download

REBUILD_TOOLCHAIN
string
default:"n"
Bootstrap toolchain packages locally or download them?
  • n - Download pre-built toolchain from PACKAGE_URL_LIST or extract from TOOLCHAIN_ARCHIVE
  • y - Bootstrap toolchain from host environment in Docker container
INCREMENTAL_TOOLCHAIN
string
default:"n"
Perform incremental toolchain build?
  • n - Full clean rebuild of final toolchain packages
  • y - Reuse existing toolchain RPMs as cache
ALLOW_TOOLCHAIN_DOWNLOAD_FAIL
string
default:"n"
Allow partial toolchain rehydration from upstream repos?
  • n - Don’t pull packages from PACKAGE_URL_LIST during incremental builds
  • y - Attempt to pull toolchain RPMs to avoid rebuilding
Only applies if REBUILD_TOOLCHAIN=y and INCREMENTAL_TOOLCHAIN=y
REBUILD_PACKAGES
string
default:"y"
Build packages locally or download them?
  • y - Parse local *.spec files and build packages as needed
  • n - Download all packages via tdnf from internet
REBUILD_TOOLS
string
default:"n"
Build Go tools locally or use pre-compiled binaries?
  • n - Use pre-compiled go binaries from SDK
  • y - Build the go tools from source
DOWNLOAD_SRPMS
string
default:"n"
Pack SRPMs from local SPECs or download published ones?
  • n - Pack SRPMs from local specs, retrieve sources from SOURCE_URL
  • y - Download official pre-packed SRPMs from SRPM_URL_LIST
REFRESH_WORKER_CHROOT
string
default:"y"
Rebuild worker chroot when manifest or packages change?
  • n - Don’t rebuild chroot even if modified
  • y - Rebuild chroot when manifest, packages, or build script changes

Remote URLs and Repositories

SOURCE_URL
string
URL to download source files when creating *.src.rpm files. Only one URL supported.
PACKAGE_URL_LIST
string
Space-separated list of URLs to download toolchain RPM packages from.Example: PACKAGE_URL_LIST="https://custom-repo.com/rpms/x86_64"
SRPM_URL_LIST
string
Space-separated list of URLs to download pre-packed SRPMs from.
REPO_LIST
string
default:""
Space-separated list of .repo files pointing to RPM repositories. Repos are prioritized in order.Example: REPO_LIST="./custom1.repo ./custom2.repo"
USE_PREVIEW_REPO
string
default:"n"
Pull packages from upstream preview repository?
  • n - Use only base repository
  • y - Include preview repository (packages subject to change)
DAILY_BUILD_ID
string
default:""
Use daily build sources for given date.
  • "" - Disable daily build sources
  • lkg - Use last known good build
  • V-v-YYYYMMDD - Use specific date
Example: DAILY_BUILD_ID=3-0-20240227
DISABLE_UPSTREAM_REPOS
string
default:"n"
Only pull packages from local repositories?
  • n - Pull from all repositories including external
  • y - Only use local repositories (doesn’t affect toolchain hydration)
DISABLE_DEFAULT_REPOS
string
default:"n"
Disable pulling packages from PMC repositories?
  • n - Pull from all repositories including PMC
  • y - Only use local and REPO_LIST repositories
REPO_SNAPSHOT_TIME
string
default:""
Posix time to use as snapshot for remote repositories when fetching packages.Example: REPO_SNAPSHOT_TIME="1724119509"

Build Archives

TOOLCHAIN_ARCHIVE
string
default:""
Extract toolchain RPMs from this archive instead of downloading.Example: TOOLCHAIN_ARCHIVE=./toolchain_rpms.tar.gz
TOOLCHAIN_CONTAINER_ARCHIVE
string
default:""
Archive containing raw toolchain container for hydration.
PACKAGE_ARCHIVE
string
default:""
Archive to hydrate RPMs from with make hydrate-rpms.
CACHED_PACKAGES_ARCHIVE
string
default:""
Archive containing cached packages to pre-populate the build cache.

Build Behavior

HYDRATED_BUILD
string
default:"n"
Use hydrated RPMs to satisfy dependencies?
  • n - Normal build without using hydrated packages
  • y - Replace RUN nodes with PreBuilt nodes for hydrated RPMs
DELTA_BUILD
string
default:"n"
Enable fast delta builds?
  • n - Normal build
  • y - Pre-populate with published packages, only build new/changed packages
DELTA_FETCH
string
default:"y"
Download pre-built packages to avoid rebuilds?
  • n - Don’t download pre-built packages
  • y - Try to download matching pre-built packages
PRECACHE
string
default:"n"
Pre-load cache from upstream sources?
  • n - Don’t pre-load cache
  • y - Load cache with RPMs from upstream repos before building
RUN_CHECK
string
default:"n"
Run package tests during build?
  • n - Skip %check section
  • y - Run %check section to test packages
USE_CCACHE
string
default:"n"
Enable ccache for C/C++ compilation?
  • n - Disable ccache
  • y - Enable ccache to speed up recompilations

Build Performance

CONCURRENT_PACKAGE_BUILDS
string
default:"0"
Number of packages to build in parallel. Set to 0 to use number of logical CPUs.Example: CONCURRENT_PACKAGE_BUILDS=8
PACKAGE_BUILD_RETRIES
string
default:"0"
Number of times to retry building a failed package.
CHECK_BUILD_RETRIES
string
default:"0"
Number of times to retry running package tests.
CLEANUP_PACKAGE_BUILDS
string
default:"y"
Clean up intermediate build artifacts?
  • n - Keep all intermediate files
  • y - Clean up after successful builds
USE_PACKAGE_BUILD_CACHE
string
default:"y"
Use package build cache?
  • n - Disable build cache
  • y - Enable build cache for faster rebuilds

Reproducing Builds

PACKAGE_CACHE_SUMMARY
string
default:""
Path to package build summary file for reproducing builds.Example: PACKAGE_CACHE_SUMMARY=./graph_external_deps.json
IMAGE_CACHE_SUMMARY
string
default:""
Path to image build summary file for reproducing builds.Example: IMAGE_CACHE_SUMMARY=./image_deps.json
INITRD_CACHE_SUMMARY
string
default:""
Path to initrd build summary file for reproducing ISO builds.Example: INITRD_CACHE_SUMMARY=./iso_initrd/image_deps.json

Authentication

SOURCE_AUTH_MODE
string
default:""
Authentication mode for downloading source files for SRPM packing.
  • anonymous - No authentication
  • azurecli - Use Azure CLI login (requires prior az login)
CA_CERT
string
default:""
Path to root CA certificate for TLS authentication.
TLS_CERT
string
default:""
Path to TLS client certificate for authentication.
TLS_KEY
string
default:""
Path to TLS client key for authentication.

GPG Validation

VALIDATE_TOOLCHAIN_GPG
string
default:"y (when using upstream)"
Enable GPG validation of toolchain RPMs?
  • n - Disable GPG validation
  • y - Validate against TOOLCHAIN_GPG_VALIDATION_KEYS
VALIDATE_IMAGE_GPG
string
default:"n"
Enable RPM GPG signature verification during image builds?
  • n - Disable verification (for local unsigned packages)
  • y - Enforce package signatures (for production builds)
TOOLCHAIN_GPG_VALIDATION_KEYS
string
List of GPG key files for toolchain validation.
IMAGE_GPG_VALIDATION_KEYS
string
List of GPG key files for image package validation.

Logging and Debugging

LOG_LEVEL
string
default:"info"
Set logging level for toolkit.Options: panic, fatal, error, warn, info, debug, trace
LOG_COLOR
string
default:"auto"
Set logging color for terminal output.Options: always, auto, never
STOP_ON_WARNING
string
default:"n"
Stop build on warnings?
  • n - Continue on warnings
  • y - Stop on warnings
STOP_ON_PKG_FAIL
string
default:"n"
Stop build on package failure?
  • n - Continue building other packages
  • y - Stop on first package failure
STOP_ON_FETCH_FAIL
string
default:"n"
Stop build on package fetch failure?
  • n - Continue with available packages
  • y - Stop on fetch failure

Directory Customization

SPECS_DIR
string
default:"$(PROJECT_ROOT)/SPECS"
Directory containing package SPEC files.
BUILD_DIR
string
default:"$(PROJECT_ROOT)/build"
Directory for intermediate build artifacts.
OUT_DIR
string
default:"$(PROJECT_ROOT)/out"
Directory for final build outputs.
RPMS_DIR
string
default:"$(OUT_DIR)/RPMS"
Directory containing built RPM packages.
SRPMS_DIR
string
default:"$(OUT_DIR)/SRPMS"
Directory containing source RPM packages.
IMAGES_DIR
string
default:"$(OUT_DIR)/images"
Directory containing generated images.
CCACHE_DIR
string
default:"$(PROJECT_ROOT)/ccache"
Directory for ccache storage.

Version Information

RELEASE_MAJOR_ID
string
default:"3.0"
Major release version of Azure Linux.
BUILD_NUMBER
string
default:"$(GIT_COMMIT_ID)"
Build number for the current build. Defaults to git commit ID.
DIST_TAG
string
default:".azl3"
Distribution tag for the “dist” macro used by specs.
DIST_NAME_ABRV
string
default:"azl"
Abbreviation of the distribution name.
IMAGE_TAG
string
default:""
Optional tag to append to image filename.

Profiling and Tracing

ENABLE_CPU_PROFILE
string
default:"n"
Enable CPU profiling for Go tools?
ENABLE_MEM_PROFILE
string
default:"n"
Enable memory profiling for Go tools?
ENABLE_TRACE
string
default:"n"
Enable execution tracing for Go tools?

Quick Rebuild Flags

QUICK_REBUILD
string
default:"n"
Enable quick rebuild optimizations?
  • n - Don’t set quick rebuild flags
  • y - Set QUICK_REBUILD_TOOLCHAIN=y and QUICK_REBUILD_PACKAGES=y
QUICK_REBUILD_TOOLCHAIN
string
default:"n"
Enable toolchain-specific quick rebuild optimizations?
  • n - Normal toolchain build
  • y - Set incremental toolchain flags for faster builds
QUICK_REBUILD_PACKAGES
string
default:"n"
Enable package-specific quick rebuild optimizations?
  • n - Normal package build
  • y - Set delta build flags for faster builds

Build docs developers (and LLMs) love