-
Notifications
You must be signed in to change notification settings - Fork 124
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
⚠️ Remove rpm install method #585
Conversation
2670522
to
68658e2
Compare
/test metal3-centos-e2e-integration-test-main metal3-ubuntu-e2e-integration-test-main |
Closes metal3-io#583 Signed-off-by: Riccardo Pittau <[email protected]>
68658e2
to
050892e
Compare
/test metal3-centos-e2e-integration-test-main metal3-ubuntu-e2e-integration-test-main |
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.
Suggestion: consistent curlys + use array for BUILD_DEPS for cleaner code, while touching those lines.
sed -i '/^sushy===/d' "$UPPER_CONSTRAINTS_PATH" | ||
fi | ||
if [[ -n ${SUSHY_SOURCE:-} ]]; then | ||
sed -i '/^sushy===/d' "$UPPER_CONSTRAINTS_PATH" |
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.
sed -i '/^sushy===/d' "$UPPER_CONSTRAINTS_PATH" | |
sed -i '/^sushy===/d' "${UPPER_CONSTRAINTS_PATH}" |
sed -i '/^ironic-lib===/d' "$UPPER_CONSTRAINTS_PATH" | ||
fi | ||
if [[ -n ${IRONIC_LIB_SOURCE:-} ]]; then | ||
sed -i '/^ironic-lib===/d' "$UPPER_CONSTRAINTS_PATH" |
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.
sed -i '/^ironic-lib===/d' "$UPPER_CONSTRAINTS_PATH" | |
sed -i '/^ironic-lib===/d' "${UPPER_CONSTRAINTS_PATH}" |
|
||
python3 -m pip install --no-cache-dir --ignore-installed --prefix /usr -r "$IRONIC_PKG_LIST_FINAL" -c "${UPPER_CONSTRAINTS_PATH}" | ||
python3 -m pip install --no-cache-dir --ignore-installed --prefix /usr -r "$IRONIC_PKG_LIST_FINAL" -c "${UPPER_CONSTRAINTS_PATH}" |
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.
python3 -m pip install --no-cache-dir --ignore-installed --prefix /usr -r "$IRONIC_PKG_LIST_FINAL" -c "${UPPER_CONSTRAINTS_PATH}" | |
python3 -m pip install --no-cache-dir --ignore-installed --prefix /usr -r "${IRONIC_PKG_LIST_FINAL}" -c "${UPPER_CONSTRAINTS_PATH}" |
# emulate uid/gid configuration to match rpm install | ||
IRONIC_UID=997 | ||
IRONIC_GID=994 | ||
BUILD_DEPS="python3-devel gcc git-core python3-setuptools python3-jinja2" |
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.
If we are touching these lines now, let's use modern syntax and avoid shellcheck ignores later on. Also makes cleaner PRs going forward. Also sorted.
BUILD_DEPS="python3-devel gcc git-core python3-setuptools python3-jinja2" | |
declare -a BUILD_DEPS=( | |
gcc | |
git-core | |
python3-devel | |
python3-jinja2 | |
python3-setuptools | |
) |
dnf upgrade -y | ||
# NOTE(dtantsur): pip is a requirement of python3 in CentOS | ||
# shellcheck disable=SC2086 | ||
dnf install -y python3-pip $BUILD_DEPS |
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.
dnf install -y python3-pip $BUILD_DEPS | |
dnf install -y python3-pip "${BUILD_DEPS[@]}" |
(only if using array when defining the list)
fi | ||
# clean installed build dependencies | ||
# shellcheck disable=SC2086 | ||
dnf remove -y $BUILD_DEPS |
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.
dnf remove -y $BUILD_DEPS | |
dnf remove -y "${BUILD_DEPS[@]}" |
(only if using array when defining the list)
dnf remove -y $BUILD_DEPS | ||
fi | ||
# clean installed build dependencies | ||
# shellcheck disable=SC2086 |
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.
# shellcheck disable=SC2086 |
No longer needed with new syntax
BUILD_DEPS="python3-devel gcc git-core python3-setuptools python3-jinja2" | ||
dnf upgrade -y | ||
# NOTE(dtantsur): pip is a requirement of python3 in CentOS | ||
# shellcheck disable=SC2086 |
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.
# shellcheck disable=SC2086 |
No longer needed with new syntax
@tuminoid thanks for the comments and suggestions, I didn't want to charge the PR too much so I just went for the minimum required changes, if that's ok for you I would apply your suggestions in a follow-up since it's passing CI |
/approve I agree with the comments. But since they concern the already existing code, I think it's a good idea to address them separately. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dtantsur The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Follow up is ok as well. |
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
Follow up to metal3-io#585
Follow up to metal3-io#585 Signed-off-by: Riccardo Pittau <[email protected]>
OCPBUGS-39384,OCPBUGS-37764: Include fixes for CVE-2024-44082
Closes #583