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
└── azldev.schema.json # Authoritative schema for all TOML config files
30
32
```
31
33
34
+
## Rendered Specs (`specs/`)
35
+
36
+
The `specs/` directory (as specified by `rendered-specs-dir` config) contains rendered spec files generated by `azldev comp render`. These are the final specs with all overlays applied — ready for check-in. After adding or modifying components/overlays, re-render:
37
+
38
+
```bash
39
+
azldev comp render -p <name># Single component
40
+
azldev comp render -a # All components (slow)
41
+
```
42
+
43
+
To inspect what a component's spec looks like after overlays, read `specs/<first-char>/<name>/<name>.spec` directly — no need to run `prep-sources` just to view the result. Use `prep-sources` when you need the full source tree (tarballs) or want to diff pre/post overlay output for debugging.
44
+
32
45
## Key Concepts
33
46
34
47
**Components** = unit of packaging (→ one or more RPMs). Spec sources: upstream (default, from Fedora dist-git), local, or pinned upstream. See [`comp-toml.instructions.md`](instructions/comp-toml.instructions.md#spec-source-types) for syntax.
@@ -52,13 +65,15 @@ Run all commands from the repo root (where `azldev.toml` lives). If the terminal
52
65
| Add a component |`azldev comp add`|
53
66
| Build a component |`azldev comp build -p <name> -q`|
54
67
| Build chain (auto-publish to local repo) |`azldev comp build --local-repo-with-publish ./base/out -p <a> -p <b> -q`|
68
+
| Render all specs for check-in |`azldev comp render -a`|
69
+
| Render a single component |`azldev comp render -p <name>`|
description: ALWAYS refer to this when working with rendered spec files (`*.spec`) in the `specs/` directory.
4
+
---
5
+
6
+
# Rendered Spec Files (`specs/*.spec`)
7
+
8
+
## What are rendered specs?
9
+
10
+
Rendered specs are generated by the `azldev comp render` command based on the component definitions and overlays. They are output to the `specs/` directory (as specified by `rendered-specs-dir` config) and should not be edited directly.
11
+
12
+
They are meant to be consumed by downstream processes (e.g., build pipelines) and are the source of truth for all subsequent steps. Any changes to the spec should be made via the component definition and overlays, not by editing the rendered spec.
13
+
14
+
## Changing a rendered spec
15
+
16
+
To change a rendered spec, modify the component's `.comp.toml` and/or its overlays. Then re-run the render command to regenerate the spec:
17
+
18
+
```bash
19
+
# VERY SLOW - Re-render all specs, removes any stale specs that are no longer defined in the components
20
+
azldev comp render -a --clean-stale -O json
21
+
```
22
+
23
+
```bash
24
+
# Small set, will NOT remove stale specs, faster for iterative development
# Test build (RPMs land in base/out/ per project.toml output-dir)
82
94
azldev comp build -p <name> -q
83
95
```
84
96
85
-
For testing the built RPMs, see the [`skill-mock`](../skill-mock/SKILL.md) skill. New components always need a smoke-test. For the full inner loop cycle (investigate → modify → verify → build → test → inspect), see [`skill-build-component`](../skill-build-component/SKILL.md).
97
+
For testing the built RPMs, see the [`skill-mock`](../skill-mock/SKILL.md) skill. New components always need a smoke-test. For the full inner loop cycle (investigate → modify → render → build → test → inspect), see [`skill-build-component`](../skill-build-component/SKILL.md).
> **Prefer `comp render` for quick verification.** It's faster than `prep-sources` since it skips downloading source tarballs. Use `prep-sources` when you need the full source tree or want to diff pre/post overlay output for debugging.
66
+
65
67
> Use a temp dir for `prep-sources` output. Use `--force` to overwrite an existing output dir.
66
68
67
69
> Package builds are often very long, so adjust command timeouts accordingly when using shell tools to run builds, or use background mode if available.
68
70
69
71
## Debugging Build Failures
70
72
71
-
### 1. Diff sources pre/post overlay
73
+
### 1. Render and inspect the spec
74
+
75
+
The fastest way to verify overlays applied correctly:
76
+
77
+
```bash
78
+
azldev comp render -p <name>
79
+
# Inspect the result
80
+
cat specs/<first-char>/<name>/<name>.spec
81
+
```
82
+
83
+
### 2. Diff sources pre/post overlay (deep debug)
84
+
85
+
When you need to understand exactly what upstream provides vs. what overlays change:
If `prep-sources` fails, the error message will identify which overlay failed and why.
23
-
24
-
### 2. Inspect the upstream spec/sources
36
+
### 3. Inspect the upstream spec/sources
25
37
26
38
Look at the pre-overlay output dir — this is what the overlay is trying to modify. Common root cause: upstream changed and the overlay's assumptions no longer hold.
27
39
@@ -61,5 +73,5 @@ For overlay type reference (all 12 types with key fields), see [`comp-toml.instr
61
73
-**Test incrementally.** Apply one overlay at a time and verify with `prep-sources`. Debugging 10 overlays at once is painful.
62
74
-**Minimize overlays.** Each is a potential failure point. Prefer the smallest delta from upstream.
63
75
-**Verify in chroot.** If overlays apply but the build still fails, use [`skill-mock`](../skill-mock/SKILL.md) to inspect the build environment.
64
-
-**Follow the inner loop.** The full cycle is: investigate → modify → verify → build → test → inspect. See [`skill-build-component`](../skill-build-component/SKILL.md) for details.
76
+
-**Follow the inner loop.** The full cycle is: investigate → modify → render → build → test → inspect. See [`skill-build-component`](../skill-build-component/SKILL.md) for details.
65
77
-**Smoke-test after fixing overlays.** A clean apply and successful build don't guarantee working RPMs. See [`skill-mock`](../skill-mock/SKILL.md).
Copy file name to clipboardExpand all lines: AGENTS.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ For project context and architecture, see [`.github/copilot-instructions.md`](.g
9
9
### Examples of changes that should trigger a final test prior to sign-off (not an exhaustive list)
10
10
11
11
- Version bumps or pinning a new upstream version
12
-
- Adding, modifying, or removing overlays (trivial edits may only require `prep-sources` verification, but when in doubt, do a full build + smoke-test)
12
+
- Adding, modifying, or removing overlays (trivial edits may only require `render` verification, but when in doubt, do a full build + smoke-test)
- Modifying local spec files or source files (again, trivial edits may not require a full rebuild, but when in doubt, test)
15
15
- Adding a new component (first build)
@@ -33,9 +33,11 @@ Do NOT skip testing for changes that affect RPM output. Do NOT tell the user "th
33
33
34
34
- Always run `azldev comp list -p <name> -q -O json` before modifying a component.
35
35
- Prefer overlays over forking/local specs when customizing upstream packages.
36
-
- Use `azldev comp prep-sources -p <name> --force -o <dir> -q` to verify overlays apply cleanly before building. Always use `--force` to overwrite an existing output dir, `rm -rf` requires user confirmation which is disruptive.
37
-
- Follow the inner loop cycle: investigate → modify → verify → build → test → inspect. See [`skill-build-component`](.github/skills/skill-build-component/SKILL.md).
38
-
- Note: Use your best judgement, some packages are VERY slow to build (e.g., `kernel`), in those cases you may want to do multiple iterations of investigate → modify → verify with `prep-sources` before doing a full build + test.
36
+
- After modifying overlays or component config, re-render with `azldev comp render -p <name>` and inspect `specs/<first-char>/<name>/` to verify the result. This is the fastest verification path.
37
+
- Note: Changing a global snapshot time may affect all components that depend on it, potentially causing widespread rebuilds. Full re-render is time-consuming, but may be done by `azldev comp render -a --clean-stale`.
38
+
- Use `prep-sources` for deeper debugging: `azldev comp prep-sources -p <name> --skip-overlays --force -o <pre-dir> -q` and `azldev comp prep-sources -p <name> --force -o <post-dir> -q` to diff pre/post overlay output when you need to understand what upstream provides vs. what overlays change. Always use `--force` to overwrite an existing output dir, `rm -rf` requires user confirmation which is disruptive.
39
+
- Follow the inner loop cycle: investigate → modify → render → build → test → inspect. See [`skill-build-component`](.github/skills/skill-build-component/SKILL.md).
40
+
- Note: Use your best judgement, some packages are VERY slow to build (e.g., `kernel`), in those cases you may want to do multiple iterations of investigate → modify → verify with `render` before doing a full build + test.
39
41
-`prep-sources -o <dir>` output is ad-hoc (user-chosen dir). `comp build` output goes to project-configured dirs (`base/out/`, `base/build/`). Don't conflate them.
40
42
- For temporary files, ensure they are all placed inside the project's defined work directory (`azldev config dump -q -f json 2>&1 | grep 'workDir'`). Example commands use `base/build/work/scratch/`, and all temp directories should be inside it unless there's a specific reason not to be.
0 commit comments