Skip to content

ACL: add fasttrack support#26

Open
mayankfz wants to merge 3 commits into
aclmainfrom
mayansingh/fasttrack_bridge
Open

ACL: add fasttrack support#26
mayankfz wants to merge 3 commits into
aclmainfrom
mayansingh/fasttrack_bridge

Conversation

@mayankfz

@mayankfz mayankfz commented Jul 9, 2026

Copy link
Copy Markdown

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.

  • build_library/rpm/rpm_install.sh: Adds fasttrack preview repo file copying to installroot, logs available fasttrack packages before installation, and verifies which installed packages came from fasttrack after installation
  • run_sdk_container and sdk_lib/sdk_entry.sh: Forward FASTTRACK_REPO_FILE environment variable through the SDK container and into the build environment
  • acl/build_rpm_image.sh: Exports FASTTRACK_REPO_FILE variable to make it available for the ACL image build pipeline

Type of Change

  • Image build change (base image, sysexts, OEM images)
  • Package/SPEC update
  • CI/automation change
  • SDK/toolchain update
  • Configuration change
  • Documentation update
  • Bug fix

Does this affect the image build?

  • Yes
  • No

Associated Issues

Merge Checklist

All applicable boxes should be checked before merging

  • Image builds successfully with this change (or image build is not affected)
  • Any updated packages/SPECs build successfully
  • Relevant kola tests pass
  • All package sources are available
  • Source files have up-to-date hashes/manifests
  • Documentation has been updated to match any changes
  • Ready to merge

Mayank Singh added 2 commits July 9, 2026 13:37
Signed-off-by: Mayank Singh <mayansingh@microsoft.com>
Signed-off-by: Mayank Singh <mayansingh@microsoft.com>
@mayankfz
mayankfz marked this pull request as ready for review July 10, 2026 08:14
@mayankfz
mayankfz requested a review from a team as a code owner July 10, 2026 08:14
Copilot AI review requested due to automatic review settings July 10, 2026 08:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_FILE through acl/build_rpm_image.shrun_sdk_containersdk_lib/sdk_entry.sh.
  • In RPM-mode installs, copy the fasttrack .repo file 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.

Comment thread build_library/rpm/rpm_install.sh Outdated
Comment thread build_library/rpm/rpm_install.sh Outdated
Comment thread run_sdk_container
Copilot AI review requested due to automatic review settings July 10, 2026 13:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.

Comment thread build_library/rpm/rpm_install.sh Outdated
Comment thread run_sdk_container
Comment thread run_sdk_container
Comment thread build_library/rpm/build_image_util.sh
Copilot AI review requested due to automatic review settings July 14, 2026 05:15
@mayankfz
mayankfz force-pushed the mayansingh/fasttrack_bridge branch from f119d70 to 10449ac Compare July 14, 2026 05:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.

Comment thread build_library/rpm/rpm_install.sh Outdated
Comment thread build_library/rpm/rpm_install.sh Outdated
Comment thread sdk_lib/sdk_entry.sh
Comment thread build_library/rpm/check_pmc_staleness.sh
Comment thread build_library/rpm/check_pmc_staleness.sh
Comment thread build_library/rpm/build_image_util.sh Outdated
Copilot AI review requested due to automatic review settings July 14, 2026 06:19
@mayankfz
mayankfz force-pushed the mayansingh/fasttrack_bridge branch from 10449ac to 2a5f10d Compare July 14, 2026 06:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.

Comment thread run_sdk_container
Comment thread build_library/rpm/rpm_install.sh Outdated
Comment thread build_library/rpm/check_pmc_staleness.sh
Comment thread build_library/rpm/check_pmc_staleness.sh Outdated
Comment thread build_library/rpm/build_image_util.sh
Comment thread build_library/rpm/rpm_install.sh Outdated
Copilot AI review requested due to automatic review settings July 14, 2026 07:24
@mayankfz
mayankfz force-pushed the mayansingh/fasttrack_bridge branch from 2a5f10d to 4e2aa2d Compare July 14, 2026 07:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.

Comment thread sdk_lib/sdk_entry.sh
Comment thread run_sdk_container
Comment thread build_library/rpm/rpm_install.sh
Comment thread build_library/rpm/rpm_install.sh Outdated
Comment thread build_library/rpm/check_pmc_staleness.sh Outdated
Comment thread build_library/rpm/build_image_util.sh
Copilot AI review requested due to automatic review settings July 14, 2026 08:20
@mayankfz
mayankfz force-pushed the mayansingh/fasttrack_bridge branch from 4e2aa2d to eeb0851 Compare July 14, 2026 08:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.

Comment thread build_library/rpm/rpm_install.sh Outdated
Comment thread run_sdk_container
Comment thread run_sdk_container
Comment thread build_library/rpm/check_pmc_staleness.sh
Comment thread build_library/rpm/build_image_util.sh
Copilot AI review requested due to automatic review settings July 14, 2026 09:29
@mayankfz
mayankfz force-pushed the mayansingh/fasttrack_bridge branch from eeb0851 to f1292b7 Compare July 14, 2026 09:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Comment thread build_library/rpm/rpm_install.sh Outdated
Comment thread build_library/rpm/build_image_util.sh
Comment thread build_library/rpm/check_pmc_staleness.sh
Copilot AI review requested due to automatic review settings July 14, 2026 10:07
@mayankfz
mayankfz force-pushed the mayansingh/fasttrack_bridge branch from f1292b7 to 9ad5069 Compare July 14, 2026 10:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.

Comment thread sdk_lib/sdk_entry.sh
Comment thread build_library/rpm/rpm_install.sh Outdated
Comment thread build_library/rpm/rpm_install.sh Outdated
Comment thread build_library/rpm/check_pmc_staleness.sh
Comment thread build_library/rpm/build_image_util.sh
Copilot AI review requested due to automatic review settings July 14, 2026 13:17
@mayankfz
mayankfz force-pushed the mayansingh/fasttrack_bridge branch from 9ad5069 to 95c8599 Compare July 14, 2026 13:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.

Comment thread build_library/rpm/rpm_install.sh
Comment thread run_sdk_container
Comment thread run_sdk_container
Comment thread build_library/rpm/check_pmc_staleness.sh
Comment thread build_library/rpm/check_pmc_staleness.sh Outdated
Comment thread build_library/rpm/check_pmc_staleness.sh
Comment thread build_library/rpm/check_pmc_staleness.sh Outdated
Comment thread build_library/rpm/check_pmc_staleness.sh Outdated
Copilot AI review requested due to automatic review settings July 14, 2026 14:15
@mayankfz
mayankfz force-pushed the mayansingh/fasttrack_bridge branch from 95c8599 to 0d693b1 Compare July 14, 2026 14:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.

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
Comment thread run_sdk_container
-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>
Copilot AI review requested due to automatic review settings July 15, 2026 06:09
@mayankfz
mayankfz force-pushed the mayansingh/fasttrack_bridge branch from 0d693b1 to 34e733d Compare July 15, 2026 06:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.

Comment thread run_sdk_container
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}"
Comment thread run_sdk_container
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; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants