add easyblock to install OpenSSL wrapper for OpenSSL installed in OS, or build and install OpenSSL from source if not available in OS#2429
Conversation
| # verify that the headers match our OpenSSL version | ||
| for include in ssl_include_dirs: | ||
| opensslv = read_file(os.path.join(include, 'opensslv.h')) | ||
| header_majmin_version = re.search("SHLIB_VERSION_NUMBER\s\"([0-9]+\.[0-9]+)", opensslv, re.M) |
There was a problem hiding this comment.
this regex seems fine to me
|
@lexming Fails for me with: |
minor fixes, tweaks and enhancements for OpenSSL wrapper easyblock
|
Let's see if a close/re-open wakes up GitHub Actions... |
|
Soo.. do we not want this to find the CentOS7 openssl11 packages? Because they are intentionally not installed into a standard path, since that would break the rest of the system? |
We could enhance this easyblock to make sure those are found too, but you would need to specify where to find them of course (and we could include the CentOS 7 location as a default in the easyblock)? |
|
Right, well, I'm not sure how to really suggest adding those paths, and, it's pretty much a mix here. We've got
Also, the automatic fallback method here; there isn't a practical way to update ever update it without having to revert to a live rebuild (ouch)? (as opposed to the more atomic change like with Java and modulerc) |
Micket
left a comment
There was a problem hiding this comment.
Something like this might suffice for finding system openssl11 on CentOS/RHEL 7
|
@Micket hardcoding paths into the easyblock should not be necessary. If the host system is configured to use OpenSSL 1.1 then the libs and headers will be found. If OpenSSL 1.1 is not part of the environment, we should never link to it by default. I don't want EB to catch any rogue Regarding the fallback method, a |
|
I always considered rebuilding to be the worst case scenario, especially for a common dependency, as it means a large section of software is going to break for over a minute during rebuilds (assuming the new build even succeeds). But I really think we should automatically symlink to EPEL7s |
…or unversioned libraries, minor code cleanup
|
With the addition of multiple library names per system/version, I moved the code loading and finding the library to its own function in systemtools. See easybuilders/easybuild-framework#3683 |
|
@lexming Another crash when |
|
@boegel will you stop breaking it? I'll have to ban your username from this easyblock... In fact, I introduced this bug in my last commit. I'll make a better fix 👍 |
|
@boegel fixed in fd425a2. I replaced the changing list of OpenSSL libraries in I repeated all my previous tests and they are good. |
…yBuild if something is missing in host system
more logging in OpenSSL wrapper, actually fall back to OpenSSL in EasyBuild if something is missing in host system
|
Tested extensively with easybuilders/easybuild-easyconfigs#12858 across a range of different systems, operating systems, and CPU architectures. @lexming: Thanks a lot for your efforts on this! |
Fixes issue easybuilders/easybuild-easyconfigs#11895
This easyblock looks for the installation files of OpenSSL in the host system to wrap them in the EB installation directory with symlinks
libssl.soin Python and retrieve the path to the library file usingdlinfoin Linux andctypes.macholib.dyld.dyld_findin Mac OS.gccin the system.This method does not need to crawl through any environment variables, is resilient to installations in exotic paths and integrates well within the EB environment.
Why symlinking?
If the host system lacks the libs or headers of the required version of OpenSSL, the easyblock builds and installs any component included in the easyconfig bundle (
EB_OpenSSL_wrapperis based onBundle). This approach has the advantage of automatically disabling the installation of a fallback OpenSSL in EB if the host system already has the required files. Moreover, if the fallback is installed, the result is identical to any other installation of OpenSSL in EB.Easyconfigs can be found in easybuilders/easybuild-easyconfigs#12858
edit: requires
easybuilders/easybuild-framework#3682+easybuilders/easybuild-framework#3683