Skip to content

Fixed toolkit's handling of RPMs with epoch values in their name#10629

Merged
PawelWMS merged 11 commits into3.0-devfrom
pawelwi/fixing_rpm_paths
Oct 5, 2024
Merged

Fixed toolkit's handling of RPMs with epoch values in their name#10629
PawelWMS merged 11 commits into3.0-devfrom
pawelwi/fixing_rpm_paths

Conversation

@PawelWMS
Copy link
Copy Markdown
Contributor

@PawelWMS PawelWMS commented Oct 4, 2024

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

Continuation of #10587

We've recently started seeing builds failing with following errors:

failed to clone (7.70-506.azl3.noarch) from RPM repo

This seems to be related with invalid parsing of the tdnf provides output where the tool's regex failed to take a potential : into the account. A few lines above the mentioned error, we can see TDNF finding the right package:

time="2024-09-30T21:52:54Z" level=debug msg="Executing: [tdnf provides perl(ExtUtils::MakeMaker) --releasever=3.0 --disablerepo=* --enablerepo=toolchain-repo]"
time="2024-09-30T21:52:54Z" level=debug msg="tdnf search for provide 'perl(ExtUtils::MakeMaker)':
Loaded plugin: tdnfrepogpgcheck
[using capability match for 'perl(ExtUtils::MakeMaker)']
perl-ExtUtils-MakeMaker-2:7.70-506.azl3.noarch : Create a module Makefile
Repo	 : toolchain-repo

The : character in 2:7.70-506.azl3.noarch is what confused the regex.

The current (as of 09/30/2024) version of TDNF (3.5.6) is printing the versions without the epoch and that's why we haven't hit this issue until now. It seems that the bump to version 3.5.8 added the epoch number to the tdnf provides output.

Sample output for 3.5.6:

root [ / ]# tdnf provides 'perl(ExtUtils::MakeMaker)'
Loaded plugin: tdnfrepogpgcheck
[using capability match for 'perl(ExtUtils::MakeMaker)']
perl-ExtUtils-MakeMaker-7.70-506.azl3.noarch : Create a module Makefile
Repo     : azurelinux-official-base

Notice no epoch in 7.70-506.azl3.noarch.

Does this affect the toolchain?

No.

Test Methodology
  • Local Go tests.
  • Delta 3.0-dev build with number "3.0.20241004-pawelwi-651817".

@PawelWMS PawelWMS requested a review from a team as a code owner October 4, 2024 22:21
@PawelWMS PawelWMS merged commit c8978ab into 3.0-dev Oct 5, 2024
@PawelWMS PawelWMS deleted the pawelwi/fixing_rpm_paths branch October 5, 2024 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants