Skip to content

Commit

Permalink
fix Score-P configure when install paths contains 'yes/no'
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Nov 28, 2024
1 parent 97ab723 commit 63fbf75
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 6 deletions.
98 changes: 98 additions & 0 deletions easybuild/easyconfigs/s/Score-P/Score-P-8.0_fix-path-check.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
In various places paths passed via the commandline are validated that they are not "yes" or "no".
However, that check was too broad, checking for any matching substring in the given path.
This could fail if some folder included "yes" or "no".
Make the check more strict to ensure that we do only abort when "yes" or "no" is actually passed.

Author: Alexander Grund (TU Dresden)
Ported to upstream patch from build-config/common/m4/afs_external_lib.m4 to the generated configure files.

diff -ur scorep-8.0-orig/build-backend/configure scorep-8.0/build-backend/configure
--- scorep-8.0-orig/build-backend/configure 2024-11-28 13:53:42.539876288 +0100
+++ scorep-8.0/build-backend/configure 2024-11-28 13:58:04.917444170 +0100
@@ -37776,7 +37776,7 @@
esac ;; #(
set2set3) :
case ${with_libbfd_lib}${with_libbfd_include} in #(
- *yes*|*no*) :
+ yes,*|no,*|*,yes|*,no) :
as_fn_error $? "Both, --with-libbfd-lib and --with-libbfd-include require a <path>." "$LINENO" 5 ;; #(
*) :

@@ -46006,7 +46006,7 @@
esac ;; #(
set2set3) :
case ${with_libunwind_lib}${with_libunwind_include} in #(
- *yes*|*no*) :
+ yes,*|no,*|*,yes|*,no) :
as_fn_error $? "Both, --with-libunwind-lib and --with-libunwind-include require a <path>." "$LINENO" 5 ;; #(
*) :

@@ -56137,7 +56137,7 @@
esac ;; #(
set2set3) :
case ${with_liblustreapi_lib}${with_liblustreapi_include} in #(
- *yes*|*no*) :
+ yes,*|no,*|*,yes|*,no) :
as_fn_error $? "Both, --with-liblustreapi-lib and --with-liblustreapi-include require a <path>." "$LINENO" 5 ;; #(
*) :

diff -ur scorep-8.0-orig/build-mpi/configure scorep-8.0/build-mpi/configure
--- scorep-8.0-orig/build-mpi/configure 2024-11-28 13:53:42.542876249 +0100
+++ scorep-8.0/build-mpi/configure 2024-11-28 13:57:20.805021198 +0100
@@ -35736,7 +35736,7 @@
esac ;; #(
set2set3) :
case ${with_libbfd_lib}${with_libbfd_include} in #(
- *yes*|*no*) :
+ yes,*|no,*|*,yes|*,no) :
as_fn_error $? "Both, --with-libbfd-lib and --with-libbfd-include require a <path>." "$LINENO" 5 ;; #(
*) :

@@ -44343,7 +44343,7 @@
esac ;; #(
set2set3) :
case ${with_libunwind_lib}${with_libunwind_include} in #(
- *yes*|*no*) :
+ yes,*|no,*|*,yes|*,no) :
as_fn_error $? "Both, --with-libunwind-lib and --with-libunwind-include require a <path>." "$LINENO" 5 ;; #(
*) :

@@ -53306,7 +53306,7 @@
esac ;; #(
set2set3) :
case ${with_liblustreapi_lib}${with_liblustreapi_include} in #(
- *yes*|*no*) :
+ yes,*|no,*|*,yes|*,no) :
as_fn_error $? "Both, --with-liblustreapi-lib and --with-liblustreapi-include require a <path>." "$LINENO" 5 ;; #(
*) :

diff -ur scorep-8.0-orig/build-shmem/configure scorep-8.0/build-shmem/configure
--- scorep-8.0-orig/build-shmem/configure 2024-11-28 13:53:42.541876262 +0100
+++ scorep-8.0/build-shmem/configure 2024-11-28 13:57:42.765733935 +0100
@@ -35545,7 +35545,7 @@
esac ;; #(
set2set3) :
case ${with_libbfd_lib}${with_libbfd_include} in #(
- *yes*|*no*) :
+ yes,*|no,*|*,yes|*,no) :
as_fn_error $? "Both, --with-libbfd-lib and --with-libbfd-include require a <path>." "$LINENO" 5 ;; #(
*) :

@@ -43965,7 +43965,7 @@
esac ;; #(
set2set3) :
case ${with_libunwind_lib}${with_libunwind_include} in #(
- *yes*|*no*) :
+ yes,*|no,*|*,yes|*,no) :
as_fn_error $? "Both, --with-libunwind-lib and --with-libunwind-include require a <path>." "$LINENO" 5 ;; #(
*) :

@@ -52914,7 +52914,7 @@
esac ;; #(
set2set3) :
case ${with_liblustreapi_lib}${with_liblustreapi_include} in #(
- *yes*|*no*) :
+ yes,*|no,*|*,yes|*,no) :
as_fn_error $? "Both, --with-liblustreapi-lib and --with-liblustreapi-include require a <path>." "$LINENO" 5 ;; #(
*) :

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ toolchain = {'name': 'gompi', 'version': '2022a'}

source_urls = ['https://perftools.pages.jsc.fz-juelich.de/cicd/scorep/tags/scorep-%(version)s']
sources = ['scorep-%(version)s.tar.gz']
checksums = ['7bbde9a0721d27cc6205baf13c1626833bcfbabb1f33b325a2d67976290f7f8a']
patches = ['Score-P-8.0_fix-path-check.patch']
checksums = [
{'scorep-8.4.tar.gz': '7bbde9a0721d27cc6205baf13c1626833bcfbabb1f33b325a2d67976290f7f8a'},
{'Score-P-8.0_fix-path-check.patch': '6502490954eaf4bbcf9bbdbebc290dc2c666a68dd1b0bd579f1450e489901998'},
]

dependencies = [
('CUDA', '11.7.0', '', SYSTEM),
Expand Down
6 changes: 5 additions & 1 deletion easybuild/easyconfigs/s/Score-P/Score-P-8.4-gompi-2022a.eb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ toolchain = {'name': 'gompi', 'version': '2022a'}

source_urls = ['https://perftools.pages.jsc.fz-juelich.de/cicd/scorep/tags/scorep-%(version)s']
sources = ['scorep-%(version)s.tar.gz']
checksums = ['7bbde9a0721d27cc6205baf13c1626833bcfbabb1f33b325a2d67976290f7f8a']
patches = ['Score-P-8.0_fix-path-check.patch']
checksums = [
{'scorep-8.4.tar.gz': '7bbde9a0721d27cc6205baf13c1626833bcfbabb1f33b325a2d67976290f7f8a'},
{'Score-P-8.0_fix-path-check.patch': '6502490954eaf4bbcf9bbdbebc290dc2c666a68dd1b0bd579f1450e489901998'},
]

dependencies = [
('CubeLib', '4.8.2'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ toolchain = {'name': 'gompi', 'version': '2022b'}

source_urls = ['https://perftools.pages.jsc.fz-juelich.de/cicd/scorep/tags/scorep-%(version)s']
sources = ['scorep-%(version)s.tar.gz']
checksums = ['7bbde9a0721d27cc6205baf13c1626833bcfbabb1f33b325a2d67976290f7f8a']
patches = ['Score-P-8.0_fix-path-check.patch']
checksums = [
{'scorep-8.4.tar.gz': '7bbde9a0721d27cc6205baf13c1626833bcfbabb1f33b325a2d67976290f7f8a'},
{'Score-P-8.0_fix-path-check.patch': '6502490954eaf4bbcf9bbdbebc290dc2c666a68dd1b0bd579f1450e489901998'},
]

dependencies = [
('CUDA', '12.0.0', '', SYSTEM),
Expand Down
6 changes: 5 additions & 1 deletion easybuild/easyconfigs/s/Score-P/Score-P-8.4-gompi-2022b.eb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ toolchain = {'name': 'gompi', 'version': '2022b'}

source_urls = ['https://perftools.pages.jsc.fz-juelich.de/cicd/scorep/tags/scorep-%(version)s']
sources = ['scorep-%(version)s.tar.gz']
checksums = ['7bbde9a0721d27cc6205baf13c1626833bcfbabb1f33b325a2d67976290f7f8a']
patches = ['Score-P-8.0_fix-path-check.patch']
checksums = [
{'scorep-8.4.tar.gz': '7bbde9a0721d27cc6205baf13c1626833bcfbabb1f33b325a2d67976290f7f8a'},
{'Score-P-8.0_fix-path-check.patch': '6502490954eaf4bbcf9bbdbebc290dc2c666a68dd1b0bd579f1450e489901998'},
]

dependencies = [
('CubeLib', '4.8.2'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ toolchain = {'name': 'gompi', 'version': '2023a'}

source_urls = ['https://perftools.pages.jsc.fz-juelich.de/cicd/scorep/tags/scorep-%(version)s']
sources = ['scorep-%(version)s.tar.gz']
checksums = ['7bbde9a0721d27cc6205baf13c1626833bcfbabb1f33b325a2d67976290f7f8a']
patches = ['Score-P-8.0_fix-path-check.patch']
checksums = [
{'scorep-8.4.tar.gz': '7bbde9a0721d27cc6205baf13c1626833bcfbabb1f33b325a2d67976290f7f8a'},
{'Score-P-8.0_fix-path-check.patch': '6502490954eaf4bbcf9bbdbebc290dc2c666a68dd1b0bd579f1450e489901998'},
]

dependencies = [
('CUDA', '12.1.1', '', SYSTEM),
Expand Down
6 changes: 5 additions & 1 deletion easybuild/easyconfigs/s/Score-P/Score-P-8.4-gompi-2023a.eb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ toolchain = {'name': 'gompi', 'version': '2023a'}

source_urls = ['https://perftools.pages.jsc.fz-juelich.de/cicd/scorep/tags/scorep-%(version)s']
sources = ['scorep-%(version)s.tar.gz']
checksums = ['7bbde9a0721d27cc6205baf13c1626833bcfbabb1f33b325a2d67976290f7f8a']
patches = ['Score-P-8.0_fix-path-check.patch']
checksums = [
{'scorep-8.4.tar.gz': '7bbde9a0721d27cc6205baf13c1626833bcfbabb1f33b325a2d67976290f7f8a'},
{'Score-P-8.0_fix-path-check.patch': '6502490954eaf4bbcf9bbdbebc290dc2c666a68dd1b0bd579f1450e489901998'},
]

dependencies = [
('CubeLib', '4.8.2'),
Expand Down

0 comments on commit 63fbf75

Please sign in to comment.