Allow users to bring their own libdave#31
Allow users to bring their own libdave#31zfcmoe wants to merge 1 commit intoMinnDevelopment:masterfrom
Conversation
Could you elaborate? This is a very common pattern used by many libraries. |
| public static SymbolLookup getSymbolLookup() { | ||
| Path tempFile = createTemporaryFile(); | ||
| return SymbolLookup.libraryLookup(tempFile, Arena.global()); | ||
| String envPath = System.getenv().get("LIBDAVE_PATH"); |
There was a problem hiding this comment.
I would prefer using a system property for this.
Please also add some information about this to the readme.
What I had in mind is mainly that some hardened systems apply stricter security controls to The separate partition itself is not really the main issue. The bigger problem is that these restrictions can prevent files extracted there from being read or executed as expected. Because of that, it may be safer to extract the files into something like EDIT: Under normal circumstances this should not happen, but on certain specialized or hardened systems it can definitely occur if user permissions are not configured correctly. |
The project does currently not work on some Linux distros, such as CentOS Stream, due to the shared libraries requiring a recent glibc version. Also more obscure operating systems, such as FreeBSD are also not supported. This has already been pointed out by issue #30 30
This is a fairly simple fix, where one can depend only on club.mincced:jdave-api, and provide the library file separately by specifying a path as
LIBDAVE_PATH=/opt/libdave.so java -jar bot.jar.This also avoids reading a shared library from
/tmp/, which has some security implications I'm not a fan of.