Skip to content

Update CBL-Mariner build prerequisites #5063

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 2 commits into from
Mar 21, 2023
Merged

Update CBL-Mariner build prerequisites #5063

merged 2 commits into from
Mar 21, 2023

Conversation

anphel31
Copy link
Member

@anphel31 anphel31 commented Mar 12, 2023

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

What does the PR accomplish, why was it needed?
Update the documents describing the build machine prerequisites.

Change Log
  • Use tdnf instead of dnf to install on Mariner
  • Remove python2, bison and gcc from Mariner prereqs
  • Remove python-minimal and bison from Ubuntu prereqs
Does this affect the toolchain?

NO

Test Methodology
  • Manual builds on Azure virtual machines using the images and script below.

Mariner test image: (note: some additional parameters are used as well, such as --admin-username and --ssh-key-values)

az vm create --image MicrosoftCBLMariner:CBL-Mariner:cbl-mariner-2-gen2:latest --size Standard_D16ds_v5 --os-disk-size-gb 120 --public-ip-sku Standard

Ubuntu test image:

az vm create --image Canonical:UbuntuServer:18.04-LTS:latest --size Standard_D16ds_v5 --os-disk-size-gb 120 --public-ip-sku Standard

Test build:

mkdir mariner-2 && cd mariner-2
git clone -b 2.0-stable https://github.com/microsoft/CBL-Mariner.git --depth 1
cd CBL-Mariner/toolkit

sudo make go-tools REBUILD_TOOLS=y

sudo make toolchain REBUILD_TOOLS=y REBUILD_TOOLCHAIN=y 2>&1 | tee ./toolchain.log

sudo make build-packages SRPM_PACK_LIST="tree" REBUILD_TOOLS=y
sudo make image CONFIG_FILE=./imageconfigs/core-efi.json REBUILD_TOOLS=y SRPM_PACK_LIST="tree" REFRESH_WORKER_CHROOT=n
sudo make iso CONFIG_FILE=./imageconfigs/full.json REBUILD_TOOLS=y SRPM_PACK_LIST="tree" REFRESH_WORKER_CHROOT=n

@anphel31 anphel31 requested a review from a team as a code owner March 12, 2023 22:19
@microsoft-github-policy-service microsoft-github-policy-service bot added the main PR Destined for main label Mar 12, 2023
Copy link
Member

@mfrw mfrw left a comment

Choose a reason for hiding this comment

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

LGTM :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
main PR Destined for main
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants