-
Notifications
You must be signed in to change notification settings - Fork 2
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
cleanup secureboot #97
Conversation
nkraetzschmar
commented
Sep 5, 2024
- deprecate secureboot and make_repart_* support from builder (move into feature image scripts)
- this simplifies the build process by moving more design decisions into the feature configs
builder/make_get_artifact_rules
Outdated
done | ||
done | ||
|
||
# printf 'DEBUG: [%s] %s -> %s\n' "$0" "$*" "${extensions[*]}" >&2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this in the future? Otherwise I would remove this.
builder/make_get_image_dependencies
Outdated
done | ||
|
||
if [ -z "$script" ]; then | ||
printf 'no image or convert script found to build %s\n' "${extension#.}" | ||
exit 1 | ||
fi | ||
|
||
# printf 'DEBUG: [%s] %s -> %s %s\n' "$0" "$*" "$script" "$input" >&2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
builder/make_list_build_artifacts
Outdated
done | ||
done | ||
|
||
if [ "${#artifacts[@]}" = 3 ] && [ -n "$(./parse_features --feature-dir "features" --cname "$cname" platforms)" ]; then | ||
artifacts+=(".build/$cname-$COMMIT.raw") | ||
fi | ||
|
||
# printf 'DEBUG: [%s] %s -> %s\n' "$0" "$*" "${artifacts[*]}" >&2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please consider the commends I did.
applied comments and merged in latest changes from main |
@@ -11,8 +11,8 @@ artifacts=(".build/$cname-$COMMIT.tar" ".build/$cname-$COMMIT.release" ".build/$ | |||
|
|||
for feature in "${features[@]}"; do | |||
for i in "features/$feature/"{image,convert}.*; do | |||
extension="$(grep -E -o '(\.[a-z][a-zA-Z0-9\-_]*)*$' <<< "$i")" | |||
artifacts+=(".build/$cname-$COMMIT$extension") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I see this right, we have this part of the code duplicated within this project? Not only is this code difficult to read/understand for someone who doesn't know the regex by hard. It also adds the issue that it is challenging to maintain.
Please put it into a function that can be called with some documentation to it. Since you've changed the extension that is included, this should be part of the documentation as well. I couldn't tell why we suddenly needed the tilde.
@@ -7,8 +7,9 @@ extensions=(release manifest raw) | |||
|
|||
for feature in "features/"*; do | |||
for i in "$feature/"{image,convert}.*; do | |||
extension="$(grep -E -o '(\.[a-z][a-zA-Z0-9\-_]*)*$' <<< "$i")" | |||
extensions+=("${extension:1}") | |||
extension="$(grep -E -o '(\.[a-z][a-zA-Z0-9\-_~]*)*$' <<< "$i")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we talked about this. Please write down what this grep does and why it's necessary. Lastly, write down where the same function is used as well.
@@ -11,8 +11,8 @@ artifacts=(".build/$cname-$COMMIT.tar" ".build/$cname-$COMMIT.release" ".build/$ | |||
|
|||
for feature in "${features[@]}"; do | |||
for i in "features/$feature/"{image,convert}.*; do | |||
extension="$(grep -E -o '(\.[a-z][a-zA-Z0-9\-_]*)*$' <<< "$i")" | |||
artifacts+=(".build/$cname-$COMMIT$extension") | |||
extension="$(grep -E -o '(\.[a-z][a-zA-Z0-9\-_~]*)*$' <<< "$i")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I think the usage of here-string should be stated, not everyone is familiar with this concept of bash. Someone could misread this and only thing of <<
instead of three. Maybe we could make this a bit more obviously?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please the comments I did. In general, we have to add some more documentation and make the code more maintainable. I would to see this for the files that are changed in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM