Skip to content

fix for the apply of the HWLOC security patch #849

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

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

bratpiorka
Copy link
Contributor

@bratpiorka bratpiorka commented Oct 29, 2024

fix for the apply of the HWLOC security patch

This is a fix for a scenario where the user runs the cmake configuration with the UMF_LINK_HWLOC_STATICALLY setting multiple times for the same build directory. On the first run, cmake downloads the HWLOC sources and successfully applies the required security patch, but the patching fails the second time (the patch has already been applied). This PR fixes this error.

@bratpiorka bratpiorka requested a review from a team as a code owner October 29, 2024 15:18
@bratpiorka bratpiorka force-pushed the rrudnick_hwloc_patch_fix branch from dff3446 to eec25d5 Compare October 29, 2024 15:29
@bratpiorka bratpiorka changed the title fix for HWLOC security patch on Linux fix for HWLOC security patch Oct 29, 2024
@bratpiorka bratpiorka changed the title fix for HWLOC security patch fix for the apply of the HWLOC security patch Oct 29, 2024
@bratpiorka bratpiorka force-pushed the rrudnick_hwloc_patch_fix branch from eec25d5 to 05f3b94 Compare October 29, 2024 16:44
@@ -217,6 +202,22 @@ else()
message(STATUS " LIBHWLOC_LIBRARY_DIRS = ${LIBHWLOC_LIBRARY_DIRS}")
endif()

if(hwloc_targ_SOURCE_DIR)
# apply security patch for HWLOC
execute_process(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look at the options named ECHO_OUTPUT_VARIABLE, ECHO_ERROR_VARIABLE.
Generally it's not blocking, but probably you can remove all if blocks below.
Source: https://cmake.org/cmake/help/latest/command/execute_process.html

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok but this is enabled in cmake >= 3.18 and I do not want to bump min required ver right now

Copy link
Contributor

@KFilipek KFilipek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bratpiorka bratpiorka force-pushed the rrudnick_hwloc_patch_fix branch from 05f3b94 to 6c828f6 Compare October 30, 2024 13:54
@PatKamin PatKamin merged commit 3bae087 into oneapi-src:main Oct 30, 2024
74 of 75 checks passed
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.

3 participants