-
Notifications
You must be signed in to change notification settings - Fork 82
Move OEM sysext build from vms phase to build_image #3619
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
Open
danzatt
wants to merge
6
commits into
main
Choose a base branch
from
danzatt/fix-oem-sysexts
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
cf3dd96
overlay profiles: Enable cryptsetup in SDK systemd
danzatt c22d1c2
sysext: Sign OS-dependent sysexts
danzatt 309d071
sysext: Add OS-dependent sysext compression
danzatt 7942aad
changelog: Add entry for signed OS-dependent sysexts
danzatt 0251858
sysext: Move OEM sysext build to image phase
danzatt 5d499d5
changelog: Mention OEM sysext signing changes
danzatt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| #!/bin/bash | ||
| # OEM sysext helpers. | ||
|
|
||
| get_oem_overlay_root() { | ||
| local scripts_repo="$1" | ||
| local overlay_root="/mnt/host/source/src/third_party/coreos-overlay" | ||
|
|
||
| if [[ ! -d "${overlay_root}" ]]; then | ||
| overlay_root="${scripts_repo}/sdk_container/src/third_party/coreos-overlay" | ||
| fi | ||
|
|
||
| if [[ ! -d "${overlay_root}" ]]; then | ||
| echo "No coreos-overlay repo found (tried SDK and ${scripts_repo})" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| printf '%s' "${overlay_root}" | ||
| } | ||
|
|
||
| _get_oem_ids() { | ||
| local scripts_repo arch list_var_name | ||
| scripts_repo=${1}; shift | ||
| arch=${1}; shift | ||
| list_var_name=${1}; shift | ||
|
|
||
| local overlay_root | ||
| overlay_root=$(get_oem_overlay_root "${scripts_repo}") | ||
|
|
||
| local -a ebuilds=("${overlay_root}/coreos-base/common-oem-files/common-oem-files-"*'.ebuild') | ||
| if [[ ${#ebuilds[@]} -eq 0 ]] || [[ ! -e ${ebuilds[0]} ]]; then | ||
| echo "No coreos-base/common-oem-files ebuilds?!" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| # This defines local COMMON_OEMIDS, AMD64_ONLY_OEMIDS, | ||
| # ARM64_ONLY_OEMIDS and OEMIDS variable. We don't use the last | ||
| # one. Also defines global-by-default EAPI, which we make local | ||
| # here to avoid making it global. | ||
| local EAPI | ||
| source "${ebuilds[0]}" flatcar-local-variables | ||
|
|
||
| local -n arch_oemids_ref="${arch^^}_ONLY_OEMIDS" | ||
| local all_oemids=( | ||
| "${COMMON_OEMIDS[@]}" | ||
| "${arch_oemids_ref[@]}" | ||
| ) | ||
|
|
||
| mapfile -t "${list_var_name}" < <(printf '%s\n' "${all_oemids[@]}" | sort) | ||
| } | ||
|
|
||
| # Gets a list of OEMs that are using sysexts. | ||
| # | ||
| # 1 - scripts repo | ||
| # 2 - arch | ||
| # 3 - name of an array variable to store the result in | ||
| get_oem_id_list() { | ||
| _get_oem_ids "$@" | ||
| } | ||
|
|
||
| # Gets a list of OEM sysext descriptors. | ||
| # | ||
| # 1 - scripts repo | ||
| # 2 - arch | ||
| # 3 - name of an array variable to store the result in | ||
| # | ||
| # Format: "name|metapackage|useflags" | ||
| get_oem_sysext_matrix() { | ||
| local scripts_repo arch list_var_name | ||
| scripts_repo=${1}; shift | ||
| arch=${1}; shift | ||
| list_var_name=${1}; shift | ||
|
|
||
| local -a oem_ids | ||
| _get_oem_ids "${scripts_repo}" "${arch}" oem_ids | ||
|
|
||
| local -a matrix=() | ||
| local oem_id | ||
| for oem_id in "${oem_ids[@]}"; do | ||
| matrix+=("oem-${oem_id}|coreos-base/oem-${oem_id}|${oem_id}") | ||
| done | ||
|
|
||
| local -n matrix_ref="${list_var_name}" | ||
| matrix_ref=("${matrix[@]}") | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.