script/build-git: update Ubuntu 24.04 APT sources #5889
Merged
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.
As of Ubuntu 24.04, the primary list of sources for APT moved to the
/etc/apt/sources.list.d/ubuntu.sourcesfile instead of the legacy/etc/apt/sources.listfile, and was rewritten to make use of thedeb822format, which is based on RFC 822. From the Ubuntu 24.04 release notes:As GitHub Actions are now migrating their
ubuntu-latestrunners to Ubuntu 24.04, per actions/runner-images#10636, we need to adjust the script our CI jobs use to build custom versions of Git so that it is able to fetch the necessary source packages it requires.We therefore update the script so it checks for the presence of an
/etc/apt/sources.list.d/ubuntu.sourcesfile, and if that exists, adds thedeb-srcarchive type to theTypes:lines of the entries in that file; otherwise, the script adds thedeb-srctype to the entries in the/etc/apt/sources.listfile as it did previously.A successful run of our
Build with latest GitandBuild with earliest GitCI jobs on anubuntu-24.04runner demonstrates these changes work as expected.