You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Source files |`source-files`| array of [SourceFileReference](#source-file-references)| No | Additional source files to download for this component |
15
+
| Default package config |`default-package-config`|[PackageConfig](package-groups.md#package-config)| No | Default configuration applied to all binary packages produced by this component; overrides project defaults and package-group defaults |
16
+
| Package overrides |`packages`| map of string → [PackageConfig](package-groups.md#package-config)| No | Exact per-package configuration overrides; highest priority in the resolution order |
15
17
16
18
### Bare Components
17
19
@@ -190,6 +192,58 @@ The `hints` field provides non-essential metadata about how or when to build a c
190
192
hints = { expensive = true }
191
193
```
192
194
195
+
## Package Configuration
196
+
197
+
Components can customize the configuration for the binary packages they produce. There are two fields for this, applied at different levels of specificity.
198
+
199
+
### Default Package Config
200
+
201
+
The `default-package-config` field provides a component-level default that applies to **all** binary packages produced by this component. It overrides any matching [package groups](package-groups.md) but is itself overridden by the `packages` map.
202
+
203
+
```toml
204
+
[components.curl.default-package-config.publish]
205
+
channel = "rpm-base"
206
+
```
207
+
208
+
### Per-Package Overrides
209
+
210
+
The `[components.<name>.packages.<pkgname>]` map lets you override config for a **specific** binary package by its exact name. This is the highest-priority layer and overrides all inherited defaults:
211
+
212
+
```toml
213
+
# Override just one subpackage
214
+
[components.curl.packages.curl-devel.publish]
215
+
channel = "rpm-devel"
216
+
```
217
+
218
+
### Resolution Order
219
+
220
+
For each binary package produced by a component, the effective config is assembled in this order (later layers win):
221
+
222
+
1. Project `default-package-config`
223
+
2. Package group containing this package name (if any)
The `[[components.<name>.source-files]]` array defines additional source files that azldev should download before building. These are files not available in the dist-git repository or lookaside cache — typically binaries, pre-built artifacts, or files from custom hosting.
Package groups let you apply shared configuration to named sets of binary packages. They are defined under `[package-groups.<name>]` in the TOML configuration.
4
+
5
+
Package groups are evaluated at build time, after the binary RPMs are produced. They are analogous to [component groups](component-groups.md), which apply shared configuration to sets of components.
6
+
7
+
## Field Reference
8
+
9
+
| Field | TOML Key | Type | Required | Description |
| Description |`description`| string | No | Human-readable description of this group |
12
+
| Packages |`packages`| string array | No | Explicit list of binary package names that belong to this group |
13
+
| Default package config |`default-package-config`|[PackageConfig](#package-config)| No | Configuration inherited by all packages listed in this group |
14
+
15
+
## Packages
16
+
17
+
The `packages` field is an explicit list of binary package names (as they appear in the RPM `Name` tag) that belong to this group. Membership is determined by exact name match — no glob patterns or wildcards are supported.
| Channel |`channel`| string | No | Publish channel for this package. Use `"none"` to signal to downstream tooling that this package should not be published. |
47
+
48
+
## Resolution Order
49
+
50
+
When determining the effective config for a binary package, azldev applies config layers in this order — later layers override earlier ones:
51
+
52
+
1.**Project `default-package-config`** — lowest priority; applies to all packages in the project
53
+
2.**Package group** — the group (if any) whose `packages` list contains the package name
54
+
3.**Component `default-package-config`** — applies to all packages produced by that component
Copy file name to clipboardExpand all lines: docs/user/reference/config/project.md
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,8 @@ The `[project]` section defines metadata and directory layout for an azldev proj
11
11
| Work directory |`work-dir`| string | No | Path to the temporary working directory for build artifacts (relative to this config file) |
12
12
| Output directory |`output-dir`| string | No | Path to the directory where final build outputs (RPMs, SRPMs) are placed (relative to this config file) |
13
13
| Default distro |`default-distro`|[DistroReference](distros.md#distro-references)| No | The default distro and version to use when building components |
14
+
| Default package config |`default-package-config`|[PackageConfig](package-groups.md#package-config)| No | Project-wide default applied to every binary package before group and component overrides |
15
+
| Package groups |`package-groups`| map of string → [PackageGroupConfig](package-groups.md)| No | Named groups of binary packages with shared configuration |
14
16
15
17
## Directory Paths
16
18
@@ -33,6 +35,27 @@ default-distro = { name = "azurelinux", version = "4.0" }
33
35
34
36
Components inherit their spec source and build environment from the default distro's configuration unless they override it explicitly. See [Configuration Inheritance](../../explanation/config-system.md#configuration-inheritance) for details.
35
37
38
+
## Default Package Config
39
+
40
+
The `[default-package-config]` section defines the lowest-priority configuration layer applied to every binary package produced by any component in the project. It is overridden by [package groups](package-groups.md), [component-level defaults](components.md#package-configuration), and explicit per-package overrides.
41
+
42
+
The most common use is to set a project-wide default publish channel:
43
+
44
+
```toml
45
+
[default-package-config.publish]
46
+
channel = "rpm-base"
47
+
```
48
+
49
+
See [Package Groups](package-groups.md#resolution-order) for the full resolution order.
50
+
51
+
## Package Groups
52
+
53
+
The `[package-groups.<name>]` section defines named groups of binary packages. Each group lists its members explicitly in the `packages` field and provides a `default-package-config` that is applied to all listed packages.
54
+
55
+
This is currently used to route different types of packages (e.g., `-devel`, `-debuginfo`) to different publish channels, though groups can also carry other future configuration.
56
+
57
+
See [Package Groups](package-groups.md) for the full field reference.
58
+
36
59
## Example
37
60
38
61
```toml
@@ -42,10 +65,22 @@ log-dir = "build/logs"
42
65
work-dir = "build/work"
43
66
output-dir = "out"
44
67
default-distro = { name = "azurelinux", version = "4.0" }
Copy file name to clipboardExpand all lines: internal/projectconfig/component.go
+15-5Lines changed: 15 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -128,6 +128,14 @@ type ComponentConfig struct {
128
128
129
129
// Source file references for this component.
130
130
SourceFiles []SourceFileReference`toml:"source-files,omitempty" json:"sourceFiles,omitempty" table:"-" jsonschema:"title=Source files,description=Source files to download for this component"`
131
+
132
+
// Default configuration applied to all binary packages produced by this component.
133
+
// Takes precedence over package-group defaults; overridden by explicit Packages entries.
134
+
DefaultPackageConfigPackageConfig`toml:"default-package-config,omitempty" json:"defaultPackageConfig,omitempty" table:"-" jsonschema:"title=Default package config,description=Default configuration applied to all binary packages produced by this component"`
135
+
136
+
// Per-package configuration overrides, keyed by exact binary package name.
137
+
// Takes precedence over DefaultPackageConfig and package-group defaults.
0 commit comments