Usage
Core Parameters
Path to the DOT graph file to build (output from grapher)
Path to save the built DOT graph file
Path to save the CSV file with build state information
The directory to create the build folder
Full path to worker_chroot.tar.gz
Full path to local.repo
The directory to use as the local repo and to submit RPM packages to
Directory that contains already built toolchain RPMs. Should contain top level directories for architecture.
The output directory for source RPM packages
The cache directory containing downloaded dependency RPMS from Azure Linux Base
Directory to store package build logs
The distribution tag SRPMs will be built with (e.g., .azl3)
The distro release version that the SRPM will be built with
The distro build number that the SRPM will be built with
Type of build agent to build packages with. Options:
chroot, testBuild Control Parameters
Number of concurrent build agents to spawn. If set to 0, automatically sets to the logical CPU count.
Sets the number of times to try building a package before giving up
Sets the minimum number of times to test a package if the tests fail
Sets the maximum number of cascading dependency rebuilds caused by a package being rebuilt (leave unset for unbounded)
Sets the number of additional layers in the graph beyond the goal packages to build
Max duration for any individual package build/test (e.g., 2h, 30m)
Max number of CPUs used for package building
Package Selection Parameters
Space separated list of top-level packages that should be built. Omit to build all packages.
Space separated list of base package names that should be rebuilt
Space separated list of specs ignoring rebuilds if their dependencies have been updated
Optional image config file to extract a package list from
Base directory for relative file paths from the config. Defaults to config’s directory.
Test Parameters
Space separated list of tests that should be run. Omit to run package tests.
Space separated list of package tests that should be re-run
Space separated list of package tests that should not be run
Build Options
Stop the entire build on first package failure
Don’t delete the chroot folders after builds are done
Disables using prebuilt cached packages
Optimize the build process by allowing cached implicit packages to optimize the initial build graph
Allow toolchain packages to rebuild without causing an error
Path to a list of RPMs which are created by the toolchain. RPMs from this list are considered ‘prebuilt’ and will not be rebuilt.
Ccache Parameters
Automatically install and use ccache during package builds
The directory used to store ccache outputs
The ccache configuration file path
License Checking
Do additional validation of licenses after the build. Options:
none, warn, error, defaultFile containing license names to check for
File containing license exceptions
File to save the license check results to
File to save the license check summary to
Advanced Parameters
Optional file path to an rpmmacros file for rpmbuild to use
Path to the build agent that will be invoked to build packages
File that stores timestamps for this program
Path to the log file
Log level (panic, fatal, error, warn, info, debug, trace)
How It Works
- Load Graph: Reads the dependency graph from the grapher tool
- Initialize Build State: Determines which packages need to be built
- Start Workers: Spawns the specified number of build worker processes
- Schedule Builds: Identifies leaf nodes (packages with all dependencies met) and assigns them to workers
- Monitor Progress: Tracks build results and updates the graph
- Handle Dependencies: As packages complete, unblocks dependent packages
- Cascade Updates: Optionally rebuilds packages whose dependencies changed
- Finalize: Saves the final graph and build state CSV
Build Agents
Chroot Agent
The standard build agent that uses chroot environments (via pkgworker):- Isolated build environments
- Full RPM build support
- Suitable for production builds
Test Agent
A simplified agent for testing the scheduler:- Mocks package builds
- Useful for debugging scheduler logic
- Not for production use
Example Usage
Standard Full Build
Build Specific Packages
Build with Tests
Rebuild Specific Packages
Development Build with Ccache
Build from Image Config
Build State CSV
The scheduler generates a CSV file with the following information for each package:- Package name and version
- Build status (success, failed, cached, skipped)
- Build time
- Dependencies
- Build attempt number
- Tracking build progress
- Analyzing build performance
- Identifying problematic packages
- CI/CD reporting
Worker Pool Management
The scheduler manages a pool of concurrent workers:- Automatic Scaling: Set
--workers 0to use all available CPU cores - Resource Control: Use
--max-cputo limit CPU usage per package - Timeout Protection:
--timeoutprevents runaway builds - Retry Logic:
--build-attemptshandles transient failures
Build Optimization
Caching
- Use
--no-cacheto force rebuild all packages - Default behavior reuses already-built packages when possible
--optimize-with-cached-implicitenables aggressive graph pruning
Cascading Rebuilds
When a package is rebuilt, its dependents may also need rebuilding:--max-cascading-rebuildslimits the cascade depth- Prevents excessive rebuilds in large dependency chains
- Set to 0 to disable cascading rebuilds entirely
Toolchain Handling
--toolchain-manifestlists packages considered “prebuilt”--allow-toolchain-rebuildspermits rebuilding toolchain packages- Toolchain packages are typically built separately and reused
Notes
- The scheduler automatically handles build parallelism based on the dependency graph
- Failed builds can be retried with
--build-attempts - Use
--stop-on-failurein CI/CD to fail fast - The
--no-cleanupflag is useful for debugging build failures - License checking can be enforced to ensure compliance
- Build logs for each package are saved in
--build-logs-dir - The scheduler gracefully handles SIGINT/SIGTERM for clean shutdown
See Also
- Grapher - Generates input dependency graphs
- Package Generator - The worker that builds individual packages