Repository navigation
kt: content-release fixes and stale docs - #92
Open
shreeya-patel98 wants to merge 4 commits into
Open
shreeya-patel98 wants to merge 4 commits into
shreeya-patel98 wants to merge 4 commits into
Conversation
Several sections no longer match the code:
- kt setup: list the repos it actually clones from kernels.yaml
(dist-git-tree, not dist-git-tree-lts/-cbr), say that private_repos
are cloned too and that re-running it updates existing repos
- the NOTE on lts/cbr dist-git: they use the public dist-git-tree
unless overridden in .private_repos.yaml
- kt checkout: local branch is {<user>}_<branch>, or
{<user>}_<extra>_<branch> with -e/--extra, not {<user>}/<branch>;
fix the lts-9.2 example branch names
- content-release: list its prerequisites (<base_path>/kernel-tools and
<base_path>/mock-configs), say that --prepare releases the local src
branch, that cbr needs no depot credentials, and where the logs and
RPMs end up
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The documented NFS export grants guest root users across the subnet root-level write access to host release repositories and tooling, requiring restricted, read-only, root-squashed access.
1 open issue
What changed in this PR
This PR improves kt content-release reliability by preventing stale build artifacts and repeated preparation of an already tagged source HEAD. It also updates setup and release documentation to match current behavior.
Changes:
- Rotate previous build artifacts into
build_files.prevbefore each build. - Reject preparation when HEAD already carries a release tag, with unit tests for both safeguards.
- Refresh setup, checkout, release prerequisites, output paths, and CentOS 7 NFS instructions.
| File | Description |
|---|---|
tests/kt/commands/test_content_release_prepare.py |
Tests release-tag detection and rejection. |
tests/kt/commands/test_content_release_build.py |
Tests clean build directories and artifact rotation. |
kt/KT.md |
Updates workflow documentation and adds NFS setup instructions. |
kt/commands/content_release/impl.py |
Adds tagged-HEAD protection and build-directory rotation. |
Review effort: Balanced
CentOS 7 vms (cbr-7.9) mount <base_path> from the host over NFS. kt writes the mount into cloud-init but does not set up the export on the host, and nothing documented it. Without the export the mount fails silently and content-release --test fails with "No package ... available" for every RPM in build_files. Document the export, the nfs-server service and the libvirt firewall zone services needed. The export has to be writable because kt vm --test builds and installs the kernel and kselftests in the shared source tree, partly under sudo; use all_squash to the user's uid/gid so root in a vm writes as that user instead of as root on the host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--build picks the SRPM as the first *.src.rpm found in build_files and --test installs every RPM in it, but build_files is reused across builds. After a version bump or a redone release, RPMs of the previous build are still there and may be built or installed instead of the new ones. mock also appends to build.log/root.log in its resultdir, so the logs of several builds end up mixed together. Move a non-empty build_files to build_files.prev (replacing an older one) before building, so only one previous build is kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mkdistgitdiff.py releases the commits between the last tag (found with git describe) and HEAD, and then tags HEAD. Running --prepare a second time, e.g. to redo a release that was never pushed, finds the tag it created itself, so the range is empty. A content release with no patches is still committed and the version bumped again. Check for a ciq_kernel-/fips_kernel- tag on the src HEAD before running mkdistgitdiff.py and fail with the command to delete it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shreeya-patel98
force-pushed
the
{shreeya}_kt_fixes
branch
from
December 1, 2026 11:27
9651674 to
a76ad2b
Compare
shreeya-patel98
requested review from
LATENTBOUNCE,
PlaidCat,
bmastbergen and
hailmo-ciq
December 1, 2026 11:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes and doc updates from setting up kt and running content releases
(lts-9.2, cbr-7.9).
kt: KT.md: fix stale setup, checkout and content-release docs
The repos kt setup clones, the lts/cbr dist-git note, the checkout branch
name (
{user}_<branch>,-e/--extra), content-release prerequisites, andwhere its logs and RPMs end up no longer matched the code.
kt: KT.md: document the NFS export needed by CentOS 7 vms
cbr-7.9 vms mount base_path over NFS, but kt doesn't set up the export and
it isn't documented anywhere. Without it the mount fails silently and
--testreports "No package ... available" for every RPM. The export iswritable (kt vm --test builds and installs in the shared tree, partly under
sudo) but uses
all_squashto the user's uid/gid, so root in a vm neveracts as root on the host.
kt content-release: start each build with an empty build_files
--buildtakes the first*.src.rpmin build_files and--testinstallsevery RPM in it, but build_files was reused across builds, so a previous
build's RPMs could be built or installed instead of the new ones (and
mock's logs got mixed). A non-empty build_files is now moved to
build_files.prev.
kt content-release: refuse to prepare an already tagged HEAD
Re-running
--preparefound the tag it had just created, so the commitrange was empty, yet a content release with no patches was committed and
the version bumped again. It now fails and prints the
git tag -dcommand.Testing
pre-commit (ruff check/format) passes.
kt content-release lts-9.2 --buildwith this branch;the previous build moved to build_files.prev, the new build_files held only
the fresh SRPM, and the binary RPM build started from it.
workspaces whose HEAD carries the release tag; both refused with the
correct
git tag -dcommand. The check runs before mkdistgitdiff.py, sonothing is changed when it fails.
content-release cbr-7.9 --test(NFSv4.1 mount, RPMs installed, new kernel booted). With the
all_squashexport, in the cbr-7.9 vm: root reads RPMs and
yum reinstalls one from theshare, user and root writes in the shared source tree work and land on the
host owned by the user, and
chown rootfrom the vm is refused.🤖 Generated with Claude Code
Coverage Report