Skip to content

Fixed CG manifest check when parsing specs with %include. #13930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 30, 2025

Conversation

PawelWMS
Copy link
Contributor

@PawelWMS PawelWMS commented May 30, 2025

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

I've updated the CG manifest check in #13645 and broke parsing spec files with the %include directive. Fixing that here + adding a small clean-up of the error messages.

Does this affect the toolchain?

No.

Associated issues
Test Methodology
  • Local runs of the check.
  • Check run for this PR for a dummy commit modifying all specs.

@PawelWMS PawelWMS requested review from a team as code owners May 30, 2025 18:03
@microsoft-github-policy-service microsoft-github-policy-service bot added Packaging specs-extended PR to fix SPECS-EXTENDED 3.0-dev PRs Destined for AzureLinux 3.0 labels May 30, 2025
@PawelWMS PawelWMS removed Packaging specs-extended PR to fix SPECS-EXTENDED labels May 30, 2025
@christopherco christopherco requested a review from Copilot May 30, 2025 19:55
Copy link
Contributor

@Copilot Copilot AI left a comment

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 fixes the CG manifest check when parsing specs that include the %include directive by introducing a new helper function and updating error messages.

  • Introduces the chroot_rpmspec function to encapsulate chrooted rpmspec calls.
  • Updates error messages and cleans up style in spec processing.

@@ -58,6 +58,35 @@ ignore_no_source_tarball=" \

alt_source_tag="Source9999"

chroot_rpmspec() {
Copy link
Preview

Copilot AI May 30, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider adding a function-level comment for 'chroot_rpmspec' explaining its purpose, expected arguments, behavior (including how the spec path is extracted), and error return conditions.

Copilot uses AI. Check for mistakes.

done

if [[ -z $sourcedir ]]; then
echo "Must pass valid spec path to 'chroot_rpmspec'!" >&2
Copy link
Preview

Copilot AI May 30, 2025

Choose a reason for hiding this comment

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

[nitpick] Improve the error message to explicitly indicate that a valid spec file path must be provided among the arguments to 'chroot_rpmspec', which could help future debugging.

Copilot uses AI. Check for mistakes.

@PawelWMS PawelWMS merged commit fda1de8 into 3.0-dev May 30, 2025
17 checks passed
@PawelWMS PawelWMS deleted the pawelwi/fix_pr_check branch May 30, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0-dev PRs Destined for AzureLinux 3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants