Skip to content
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

openHAB directory is not relocatable #860

Open
dottedmag opened this issue Feb 7, 2019 · 2 comments
Open

openHAB directory is not relocatable #860

dottedmag opened this issue Feb 7, 2019 · 2 comments
Labels

Comments

@dottedmag
Copy link

openHAB writes absolute paths to userdata and hence moving its directory is not trivial (one has to do something like seding the userdata).

oH sets the directory to the absolute path here:

export KARAF_DATA="${OPENHAB_USERDATA}"

Here's an example from my test installation:

% grep -r /Users/dottedmag . | grep -v logs
Binary file ./userdata/cache/org.eclipse.osgi/framework.info.96 matches
./userdata/config/org/jupnp.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.jupnp.cfg"
./userdata/config/org/eclipse/smarthome/audio.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.eclipse.smarthome.audio.cfg"
./userdata/config/org/eclipse/smarthome/voice.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.eclipse.smarthome.voice.cfg"
./userdata/config/org/ops4j/pax/web.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.ops4j.pax.web.cfg"
./userdata/config/org/ops4j/pax/web.config:org.ops4j.pax.web.config.file="/Users/dottedmag/w/home-automation/openhab/runtime/etc/jetty.xml"
./userdata/config/org/ops4j/pax/url/mvn.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.ops4j.pax.url.mvn.cfg"
./userdata/config/org/ops4j/pax/url/mvn.config:org.ops4j.pax.url.mvn.defaultRepositories="file:/Users/dottedmag/w/home-automation/openhab/runtime/system@id\=system.repository@snapshots,\ file:/Users/dottedmag/w/home-automation/openhab/userdata/tmp/kar@id\=kar.repository@multi@snapshots,\ file:/Users/dottedmag/w/home-automation/openhab/userdata/system@id\=child.system.repository@snapshots"
./userdata/config/org/ops4j/pax/url/mvn.config:org.ops4j.pax.url.mvn.localRepository="/Users/dottedmag/w/home-automation/openhab/userdata/tmp/mvn"
./userdata/config/org/ops4j/pax/logging.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.ops4j.pax.logging.cfg"
./userdata/config/org/apache/karaf/log.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.log.cfg"
./userdata/config/org/apache/karaf/jaas.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.jaas.cfg"
./userdata/config/org/apache/karaf/features.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.features.cfg"
./userdata/config/org/apache/karaf/features/repos.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.features.repos.cfg"
./userdata/config/org/apache/karaf/kar.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.kar.cfg"
./userdata/config/org/apache/karaf/kar.config:karStorage="/Users/dottedmag/w/home-automation/openhab/userdata/tmp/kar"
./userdata/config/org/apache/karaf/shell.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.shell.cfg"
./userdata/config/org/apache/karaf/shell.config:hostKey="/Users/dottedmag/w/home-automation/openhab/userdata/etc/host.key"
./userdata/config/org/apache/karaf/command/acl/scope_bundle.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.command.acl.scope_bundle.cfg"
./userdata/config/org/apache/karaf/command/acl/jaas.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.command.acl.jaas.cfg"
./userdata/config/org/apache/karaf/command/acl/kar.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.command.acl.kar.cfg"
./userdata/config/org/apache/karaf/command/acl/bundle.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.command.acl.bundle.cfg"
./userdata/config/org/apache/karaf/command/acl/shell.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.command.acl.shell.cfg"
./userdata/config/org/apache/karaf/command/acl/system.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.command.acl.system.cfg"
./userdata/config/org/apache/karaf/command/acl/config.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.command.acl.config.cfg"
./userdata/config/org/apache/karaf/command/acl/feature.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.command.acl.feature.cfg"
./userdata/config/org/apache/felix/fileinstall/351e53bd-e924-46e3-a384-9feb7eef114e.config:felix.fileinstall.dir="/Users/dottedmag/w/home-automation/openhab/addons"
./userdata/config/org/apache/felix/fileinstall/351e53bd-e924-46e3-a384-9feb7eef114e.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.felix.fileinstall-deploy.cfg"
./userdata/config/org/apache/felix/fileinstall/351e53bd-e924-46e3-a384-9feb7eef114e.config:felix.fileinstall.tmpdir="/Users/dottedmag/w/home-automation/openhab/userdata/tmp/bundles"
./userdata/config/org/apache/felix/fileinstall/64e8fb94-2b2a-49ff-b884-770f384aec11.config:felix.fileinstall.dir="/Users/dottedmag/w/home-automation/openhab/addons"
./userdata/config/org/apache/felix/fileinstall/64e8fb94-2b2a-49ff-b884-770f384aec11.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.felix.fileinstall-deploy.cfg"
./userdata/config/org/apache/felix/fileinstall/64e8fb94-2b2a-49ff-b884-770f384aec11.config:felix.fileinstall.tmpdir="/Users/dottedmag/w/home-automation/openhab/userdata/tmp/bundles"
./userdata/config/org/apache/felix/eventadmin/impl/EventAdmin.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.felix.eventadmin.impl.EventAdmin.cfg"
./userdata/config/jmx/acl/org/apache/karaf/bundle.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/jmx.acl.org.apache.karaf.bundle.cfg"
./userdata/config/jmx/acl/org/apache/karaf/config.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/jmx.acl.org.apache.karaf.config.cfg"
./userdata/config/profile.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/profile.cfg"
./userdata/config/com/eclipsesource/jaxrs/connector.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/com.eclipsesource.jaxrs.connector.cfg"
./userdata/config/com/eclipsesource/jaxrs/swagger/config.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/com.eclipsesource.jaxrs.swagger.config.cfg"
./userdata/tmp/instances/instance.properties:item.0.loc = /Users/dottedmag/w/home-automation/openhab/userdata

Note that majority of these are keys felix.fileinstall.dir and felix.fileinstall.filename — can these be fixed en masse? There are few other absolute paths:

% grep -r /Users/dottedmag . | grep -v logs| grep -v felix.fileinstall
Binary file ./userdata/cache/org.eclipse.osgi/framework.info.96 matches
./userdata/config/org/ops4j/pax/web.config:org.ops4j.pax.web.config.file="/Users/dottedmag/w/home-automation/openhab/runtime/etc/jetty.xml"
./userdata/config/org/ops4j/pax/url/mvn.config:org.ops4j.pax.url.mvn.defaultRepositories="file:/Users/dottedmag/w/home-automation/openhab/runtime/system@id\=system.repository@snapshots,\ file:/Users/dottedmag/w/home-automation/openhab/userdata/tmp/kar@id\=kar.repository@multi@snapshots,\ file:/Users/dottedmag/w/home-automation/openhab/userdata/system@id\=child.system.repository@snapshots"
./userdata/config/org/ops4j/pax/url/mvn.config:org.ops4j.pax.url.mvn.localRepository="/Users/dottedmag/w/home-automation/openhab/userdata/tmp/mvn"
./userdata/config/org/apache/karaf/kar.config:karStorage="/Users/dottedmag/w/home-automation/openhab/userdata/tmp/kar"
./userdata/config/org/apache/karaf/shell.config:hostKey="/Users/dottedmag/w/home-automation/openhab/userdata/etc/host.key"
./userdata/tmp/instances/instance.properties:item.0.loc = /Users/dottedmag/w/home-automation/openhab/userdata
@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/openhab-docker-usr-share-openhab-addons-does-not-exist-after-upgrade-to-oh-3-3-0/136954/3

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/migrating-from-3-4-on-debian-to-4-0-docker/148074/7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants