Skip to content

Fix error when doing password hashing for aarch64 offline image builds#10111

Merged
dmcilvaney merged 3 commits intomicrosoft:3.0-devfrom
dmcilvaney:damcilva/3.0/toolchain/restore_openssl
Aug 12, 2024
Merged

Fix error when doing password hashing for aarch64 offline image builds#10111
dmcilvaney merged 3 commits intomicrosoft:3.0-devfrom
dmcilvaney:damcilva/3.0/toolchain/restore_openssl

Conversation

@dmcilvaney
Copy link
Copy Markdown
Contributor

@dmcilvaney dmcilvaney commented Aug 12, 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

In https://github.com/microsoft/azurelinux/pull/9037/files#diff-4399971797c1c0942b710773d3f583fb0c697de6dd1edc655a5b80e4e1f79462R169 we accidentally dropped the openssl command line tools from the chroot environment. This won't have affected most packages since they will be using openssl-devel, or have explicit BuildRequires: openssl, but it DOES affect offline image build (since that uses the chroot as an isolation layer). A call to openssl passwd ... to hash a plain-text password from the user would fail with exec: "openssl": executable file not found in $PATH. (But only for aarch64, we install grub2-pc

if runtime.GOARCH == "amd64" {
for x86_64 which has a runtime dependency on openssl so we would get it installed by happenstance).

This may have some unexpected impacts on packages! While I believe the impact will be fairly minor, I cannot exclude the possibility that some packages may run ./configure or similar and detect the absence/presence of the openssl command line tool without having an explicit build requirement for it.

Change Log
  • Restore openssl to the chroot
  • Add some more documentation for pre-hashed passwords
Does this affect the toolchain?

YES (sort of, the implicit build dependencies provided by the chroot can have big knock-on affects).

Associated issues
Test Methodology

@dmcilvaney dmcilvaney requested review from a team as code owners August 12, 2024 20:11
Comment thread toolkit/docs/formats/imageconfig.md Outdated
@dmcilvaney dmcilvaney merged commit 71a14dd into microsoft:3.0-dev Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants