Closed hauntingEcho closed 4 years ago
There are a few misconceptions here:
/addons
dir is where you place add-on .jar files that you want to be installed. These .jar files contain the code of the add-ons and not the data they operate on. See the documentation. Any add-on specific data is stored in /userdata
. Usually there is none. Some TTS voice add-ons cache synthesized speech audio files in /userdata/cache
The reason these libraries are extracted to /userdata/tmp
is because they are embedded into the nrjavaserial library we use for serial communications. It uses this mechanism so it can dynamically extract/load the correct native library code depending on the architecture.
As a developer that is a really convenient way for shipping native code so you don't have to add the library to the java library path (without it ever being used at all) so it can be loaded on demand.
The only catch so far seems to be it doesn't work well with a filesystem having the noexec
flag as you reported in https://github.com/openhab/openhab-docker/issues/286.
If you want to keep using the noexec
flag you should reconfigure the java.io.tmpdir
for your specific use case.
You could also create an issue/PR to make this location more configurable in the nrjavaserial library. Though there can also be other code in openHAB that may have very good reasons to create executable files in the java.io.tmpdir
that won't be addressed by this.
Using the
openhab/openhab:2.5.3-armhf-debian
image, any addon installation seems to be going to theuserdata/tmp
folder rather than theaddons
folder.I currently have the Zigbee Binding addon installed, and can see its associated serial libraries in
userdata/tmp
whileaddons
is empty: