ACL: add fasttrack support#26
Open
mayankfz wants to merge 3 commits into
Open
Conversation
added 2 commits
July 9, 2026 13:37
Signed-off-by: Mayank Singh <mayansingh@microsoft.com>
Signed-off-by: Mayank Singh <mayansingh@microsoft.com>
There was a problem hiding this comment.
Pull request overview
This PR adds “FastTrack preview” repository support to the ACL image build flow by propagating a FASTTRACK_REPO_FILE environment variable into the SDK container and using it during RPM installation to prefer CVE-patched RPMs, with additional logging to help verify behavior.
Changes:
- Forward
FASTTRACK_REPO_FILEthroughacl/build_rpm_image.sh→run_sdk_container→sdk_lib/sdk_entry.sh. - In RPM-mode installs, copy the fasttrack
.repofile into the installroot and log fasttrack-available / fasttrack-installed package information. - Add repoquery-based diagnostics around fasttrack availability and installed versions.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| sdk_lib/sdk_entry.sh | Persists FASTTRACK_REPO_FILE into the SDK user environment via .bashrc. |
| run_sdk_container | Passes FASTTRACK_REPO_FILE into the SDK container environment for builds. |
| build_library/rpm/rpm_install.sh | Installs fasttrack repo config into installroot and adds fasttrack-related repoquery/verification logging. |
| acl/build_rpm_image.sh | Exports FASTTRACK_REPO_FILE so it is available to the SDK container build pipeline. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mayankfz
force-pushed
the
mayansingh/fasttrack_bridge
branch
from
July 14, 2026 05:15
f119d70 to
10449ac
Compare
mayankfz
force-pushed
the
mayansingh/fasttrack_bridge
branch
from
July 14, 2026 06:19
10449ac to
2a5f10d
Compare
mayankfz
force-pushed
the
mayansingh/fasttrack_bridge
branch
from
July 14, 2026 07:24
2a5f10d to
4e2aa2d
Compare
mayankfz
force-pushed
the
mayansingh/fasttrack_bridge
branch
from
July 14, 2026 08:20
4e2aa2d to
eeb0851
Compare
mayankfz
force-pushed
the
mayansingh/fasttrack_bridge
branch
from
July 14, 2026 09:29
eeb0851 to
f1292b7
Compare
mayankfz
force-pushed
the
mayansingh/fasttrack_bridge
branch
from
July 14, 2026 10:07
f1292b7 to
9ad5069
Compare
mayankfz
force-pushed
the
mayansingh/fasttrack_bridge
branch
from
July 14, 2026 13:17
9ad5069 to
95c8599
Compare
mayankfz
force-pushed
the
mayansingh/fasttrack_bridge
branch
from
July 14, 2026 14:15
95c8599 to
0d693b1
Compare
Comment on lines
+140
to
+153
| # Compare versions first, then releases | ||
| if [[ "${pmc_ver}" != "${base_ver}" ]]; then | ||
| if is_older "${base_ver}" "${pmc_ver}"; then | ||
| warn " ${pkg}: STALE - based on ${base_ver}-${base_rel}, upstream is at ${pmc}" | ||
| STALE=$((STALE + 1)) | ||
| else | ||
| info " ${pkg}: OK (ACL version newer than upstream)" | ||
| fi | ||
| elif [[ "${pmc_rel}" -gt "${base_rel}" ]] 2>/dev/null; then | ||
| warn " ${pkg}: STALE - based on ${base_ver}-${base_rel}, upstream is at ${pmc}" | ||
| STALE=$((STALE + 1)) | ||
| else | ||
| info " ${pkg}: OK" | ||
| fi |
Comment on lines
+101
to
+106
| if [[ -x "${BUILD_LIBRARY_DIR}/rpm/check_pmc_staleness.sh" ]]; then | ||
| if ! "${BUILD_LIBRARY_DIR}/rpm/check_pmc_staleness.sh" "${root_fs_dir}"; then | ||
| error "PMC staleness check failed - rebase stale ACL SPECs before building." | ||
| return 1 | ||
| fi | ||
| fi |
| -e IMAGE_VERSION_ID="${IMAGE_VERSION_ID:-}" | ||
| -e IMAGE_BUILD_ID="${IMAGE_BUILD_ID:-}" | ||
| -e EXTRA_KERNEL_CMDLINE="${EXTRA_KERNEL_CMDLINE:-}" | ||
| -e FASTTRACK_REPO_FILE="${FASTTRACK_REPO_FILE:+/mnt/host/source/src/scripts/__build__/fasttrack-repo/fasttrack-preview.repo}" |
Comment on lines
+429
to
+433
| local ft_name ft_evr | ||
| while IFS=' ' read -r ft_name ft_evr; do | ||
| [[ -z "${ft_name}" || -z "${ft_evr}" ]] && continue | ||
| local installed_ver | ||
| installed_ver=$(sudo rpm --dbpath="${root_fs_dir}/var/lib/rpm" -q "${ft_name}" 2>/dev/null || true) |
Comment on lines
+79
to
+103
| dnf_output="$(timeout 120 /usr/bin/dnf5 repoquery \ | ||
| --repofrompath=fasttrack-check,${FASTTRACK_URL} \ | ||
| --repo=fasttrack-check \ | ||
| --setopt=fasttrack-check.gpgcheck=0 \ | ||
| --available --latest-limit=1 \ | ||
| --queryformat="%{name} %{version}-%{release}\n" \ | ||
| ${pkg_list} 2>/dev/null)" || { warn "Failed to query fasttrack repo - skipping staleness check"; exit 0; } | ||
| else | ||
| # Prod/dev build: check against PMC directly | ||
| PMC_BASE="https://packages.microsoft.com/azurelinux/3.0/prod/base/${ARCH}" | ||
| PMC_EXTENDED="https://packages.microsoft.com/azurelinux/3.0/prod/extended/${ARCH}" | ||
| info "Checking against PMC (no fasttrack repo configured)" | ||
| info " base: ${PMC_BASE}" | ||
| info " extended: ${PMC_EXTENDED}" | ||
| info "Querying for ${#BASE_VER[@]} packages..." | ||
|
|
||
| dnf_output="$(timeout 120 /usr/bin/dnf5 repoquery \ | ||
| --repofrompath=pmc-base,${PMC_BASE} \ | ||
| --repofrompath=pmc-extended,${PMC_EXTENDED} \ | ||
| --repo=pmc-base --repo=pmc-extended \ | ||
| --setopt=pmc-base.gpgcheck=0 \ | ||
| --setopt=pmc-extended.gpgcheck=0 \ | ||
| --available --latest-limit=1 \ | ||
| --queryformat="%{name} %{version}-%{release}\n" \ | ||
| ${pkg_list} 2>/dev/null)" || { warn "Failed to query PMC repos - skipping staleness check"; exit 0; } |
…path Signed-off-by: Mayank Singh <mayansingh@microsoft.com>
mayankfz
force-pushed
the
mayansingh/fasttrack_bridge
branch
from
July 15, 2026 06:09
0d693b1 to
34e733d
Compare
Comment on lines
160
to
+163
| -e IMAGE_VERSION_ID="${IMAGE_VERSION_ID:-}" | ||
| -e IMAGE_BUILD_ID="${IMAGE_BUILD_ID:-}" | ||
| -e EXTRA_KERNEL_CMDLINE="${EXTRA_KERNEL_CMDLINE:-}" | ||
| -e FASTTRACK_REPO_FILE="${FASTTRACK_REPO_FILE:+/mnt/host/source/src/scripts/__build__/fasttrack-repo/fasttrack-preview.repo}" |
| call_docker exec "${name}" sh -c 'cp /etc/hosts /etc/hosts2; umount /etc/hosts ; mv /etc/hosts2 /etc/hosts' | ||
|
|
||
| call_docker exec "${tty[@]}" -i -e INJECT_DOCKER_SYSEXT="${INJECT_DOCKER_SYSEXT:-false}" "${name}" /mnt/host/source/src/scripts/sdk_lib/sdk_entry.sh "$@" | ||
| call_docker exec "${tty[@]}" -i -e INJECT_DOCKER_SYSEXT="${INJECT_DOCKER_SYSEXT:-false}" -e FASTTRACK_REPO_FILE="${FASTTRACK_REPO_FILE:+/mnt/host/source/src/scripts/__build__/fasttrack-repo/fasttrack-preview.repo}" "${name}" /mnt/host/source/src/scripts/sdk_lib/sdk_entry.sh "$@" |
Comment on lines
+98
to
+102
| # Check ACL SPECs for PMC staleness - fails the build if any package is stale. | ||
| # The check compares pmc_base_version/pmc_base_release metadata in each | ||
| # ACL SPEC against the current PMC repo to detect packages that need rebase. | ||
| # Packages in the exception list are allowed to be stale (e.g. waiting for | ||
| # ACL changes to land upstream). |
Comment on lines
+11
to
+12
| # Usage: check_pmc_staleness.sh <installroot> | ||
| # |
Comment on lines
+108
to
+118
| dnf_output="$(timeout 120 /usr/bin/dnf5 repoquery \ | ||
| --repofrompath=fasttrack-check,${FASTTRACK_URL} \ | ||
| --repofrompath=pmc-base,${PMC_BASE} \ | ||
| --repofrompath=pmc-extended,${PMC_EXTENDED} \ | ||
| --repo=fasttrack-check --repo=pmc-base --repo=pmc-extended \ | ||
| --setopt=fasttrack-check.gpgcheck=0 \ | ||
| --setopt=pmc-base.gpgcheck=0 \ | ||
| --setopt=pmc-extended.gpgcheck=0 \ | ||
| --available --latest-limit=1 \ | ||
| --queryformat="%{name} %{version}-%{release}\n" \ | ||
| ${pkg_list} 2>/dev/null)" || { warn "Failed to query repos - skipping staleness check"; exit 0; } |
Comment on lines
+126
to
+134
| dnf_output="$(timeout 120 /usr/bin/dnf5 repoquery \ | ||
| --repofrompath=pmc-base,${PMC_BASE} \ | ||
| --repofrompath=pmc-extended,${PMC_EXTENDED} \ | ||
| --repo=pmc-base --repo=pmc-extended \ | ||
| --setopt=pmc-base.gpgcheck=0 \ | ||
| --setopt=pmc-extended.gpgcheck=0 \ | ||
| --available --latest-limit=1 \ | ||
| --queryformat="%{name} %{version}-%{release}\n" \ | ||
| ${pkg_list} 2>/dev/null)" || { warn "Failed to query PMC repos - skipping staleness check"; exit 0; } |
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
This PR adds new feature support for Fasttrack repository integration to enable faster CVE resolution through priority installation of updated RPMs from the fasttrack-preview repository.
Change Log
Implements Fasttrack preview repository support by enabling the build system to accept and utilize a fasttrack .repo file for preferential installation of CVE-patched RPMs during image builds. The changes propagate the FASTTRACK_REPO_FILE environment variable through the SDK container workflow and add logging to track which packages are installed from the fasttrack repository.
Type of Change
Does this affect the image build?
Associated Issues
https://dev.azure.com/mariner-org/ACL/_build/results?buildId=1156891&view=results
https://dev.azure.com/mariner-org/ACL/_build/results?buildId=1156313&view=results
Merge Checklist
All applicable boxes should be checked before merging