Skip to content
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

Cdi Shared Server Binary #10382

Merged
merged 21 commits into from
Oct 22, 2024
Merged

Conversation

Adub17030MS
Copy link
Contributor

@Adub17030MS Adub17030MS commented Sep 6, 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 (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/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

CDI rpm build needs to be able to build the cdi-containerimage-server binary as not a dynamic executable. Currently, it is being built as a dynamically linked binary, which causes k8s VM cloning issues for our tests and Nexus. The changes in this pr modify the go build flags to enable this desired behavior.

Change Log
  • Added CGO_ENABLED=0 to disable Cgo, ensuring fully static binaries.
  • Removed -buildmode=pie for cdi-containerimage-server build, which previously enabled dynamic linking behavior.

These changes guarantee that the cdi-containerimage-server binary is statically linked and does not depend on any external shared libraries at runtime.

Does this affect the toolchain?

NO

Associated issues

https://dev.azure.com/mariner-org/ECF/_workitems/edit/8682

Links to CVEs
Test Methodology

@Adub17030MS Adub17030MS force-pushed the adityadubey/CdiSharedServerBinary branch from 23ffd83 to 3a2ca74 Compare October 17, 2024 18:34
@Adub17030MS Adub17030MS marked this pull request as ready for review October 22, 2024 22:08
@Adub17030MS Adub17030MS requested a review from a team as a code owner October 22, 2024 22:08
@Adub17030MS Adub17030MS merged commit 17aea59 into 3.0-dev Oct 22, 2024
12 checks passed
@Adub17030MS Adub17030MS deleted the adityadubey/CdiSharedServerBinary branch October 22, 2024 22:19
durgajagadeesh pushed a commit to durgajagadeesh/azurelinux_djpalli that referenced this pull request Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants