Repository navigation
feat(tools): rpm, mock and azldev tool definitions - #209
Merged
Merged
Conversation
Bala (0xba1a)
marked this pull request as draft
October 29, 2026 11:42
Tool YAMLs for Azure Linux / RPM work, using distro-specific commands: - rpm.yaml: rpm, rpmbuild, rpmspec, rpm2cpio, createrepo_c (azurelinux and debian). - mock.yaml: mock + mock-rpmautospec from the Azure Linux repos (azurelinux only), and adds the agent to the `mock` group. The agent runs mock as itself; mock's setuid launcher does the privileged work, so it needs sudo_access=True (verification fails fast when no-new-privileges blocks it). mock and azldev check the group database, so the membership applies to the already-running shell. - azldev.yaml: installs the azldev version pinned by a mounted repo's .azldev-version (else latest) with `go install` (azurelinux and debian; shared steps via a YAML anchor). It runs as the agent, so no root override is needed. Validated on the stock Azure Linux image with sudo_access=True: all three install in ~65s, and `azldev comp render -p util-linux` succeeds as the agent with no root-owned files left in the repository. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bala (0xba1a)
force-pushed
the
bala/azl-build-tools
branch
from
November 2, 2026 06:13
7990760 to
eccec63
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #209 +/- ##
=======================================
Coverage 77.22% 77.22%
=======================================
Files 47 47
Lines 3219 3219
=======================================
Hits 2486 2486
Misses 733 733
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Bala (0xba1a)
marked this pull request as ready for review
November 2, 2026 06:21
Kavya Sree Kaitepalli (KavyaSree2610)
approved these changes
Nov 2, 2026
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.
Summary
Tool definitions for Azure Linux and RPM work:
rpm.yaml,mock.yamlandazldev.yaml. They use the distro-specific commands from #205 and are designed for the stock Azure Linux sandbox (#207) withsudo_access=True(#208).The agent runs
mockandazldevas itself (the host uid), through itsmockgroup membership.mock's setuid launcher does the privileged work. So files they write into the repository stay owned by the host user, and the agent doesn't need to run either tool withsudo.Changes
rpm.yaml:rpm,rpmbuild,rpmspec,rpm2cpio,createrepo_c. Install commands forazurelinux(tdnf) anddebian(apt-get).mock.yaml(Azure Linux only):mockandmock-rpmautospecfrom the Azure Linux repos and adds the agent to themockgroup. Bothmockandazldevcheck the group database, not the running process's groups, so the membership applies to the already-running shell;no-new-privilegesblocksmock's setuid launcher, i.e. whensudo_accessis off;UnsupportedDistroError.azldev.yaml(Azure Linux and Debian):go install, using the version pinned by the mounted repository's.azldev-version, or the latest release if there's no pin;Testing
mockis Azure Linux only, has no root wrapper, adds the agent to themockgroup, and its verify step never callsexitin the shared shell.azldevshares its install step across distros and has no root override.test/tools/test_azurelinux_build_tools.pyinstalls and verifies all three tools on the stock Azure Linux image withsudo_access=True.sudo_access=Trueand the Azure Linux repo mounted, all three tools installed in about 65 seconds. The agent then ranazldev comp render -p util-linuxwithout sudo, as uid 1000 with only its own group in the process. It succeeded and wrote 18 files into the repository, all owned by the agent and none by root.azldevskills, the agent upgradedutil-linuxfrom 2.41.5 to 2.42.4 without runningsudo.These ran on this commit before it was rebased onto
main. The rebase only replaced #208's commit with its squash merge (identical content) and picked up an unrelated GitHub Actions bump (#206).Upcoming PRs in this stack
imageon the bots.sudofor the sandbox agent.rpm/mock/azldevtool definitions.session_optionsand skill tracking, so it can use a repository's agent skills.