-
-
Notifications
You must be signed in to change notification settings - Fork 393
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
deb files build initial commit #138
Conversation
start-stop-scripts:
exit status of the openhab server:
process owner:
setpermissions:
log files:
runtime owner:
|
What is the best way to stop the daemon?
Fine for me. Is there a special reason why it is the "openhab2" user? Could we simply use "openhab" as a user instead?
I didn't follow this on openHAB 1 and cannot judge pros/cons - so up to you what you think is best. In general, it sounds good to me not to do any unexpected permission changes when starting a service.
This was an open issue that Karaf wants to write instance information in there. I don't actually remember the latest state of the discussion. @maggu2810 & @dvanherbergen, can you comment? Was that solved with 4.0.4 or still up to us to adapt the directory layout and environment settings? |
Btw, regarding the best update strategy, this seems to be a decent way to do it. |
@theoweiss Any news on this or anything I can help with? |
I thought to get the feedback from @maggu2810 & @dvanherbergen. There are some open questions:
I'm not sure how to proceed with the log destination? If I should introduce the environment variable I would need some assistance on how this is done.
Is this issue solved? If not I would use openhab2 as owner of the runtime files.
This is because the openHAB1 deb packages are responsible for the user named "openhab". If you purge a openHAB1 debian installation the user "openhab" will be deleted by the postremove script of the deb package. I think it's a legal case to have an openHAB 2 installation on the same host, which would be damaged by the openHAB(1) purge.
systemd works best with services which don't daemonize therefore the background mode of karaf/bin/start is not the best choice. But nevertheless it seems to work now. May be I've tested this with an older karaf version? |
There are two files that will be written to "."
The directory for lock could be configured in the system.properties.
I did not have a look at the code, if you could also change this file location. |
Shouldn't we in any case have that pointing to userdata/tmp/lock for example?
Wasn't that fixed with 4.0.4? |
Karaf tries to create (if not exist) a directory instances that needs to be writable.
|
But also this directory could be configured. |
FYI, I started working on the log directory case. |
# Conflicts: # distributions/distribution-resources/src/main/resources/deb/bin/oh2_dir_layout
I've pushed changes for handling the log directory and handling docker installations. |
Great thanks - so is this PR then ready to be merged from your point of view? |
I think a review of the logdir changes would be great! I've tested it on linux and mac os and it work well for me, but you never know. The changed files are: setenv, setenv.bat, oh2_dir_layout and oh2_dir_layout.bat and org.ops4j.pax.logging.cfg. These changes will also affect non deb package installations. What's furthermore missing is the handling of karaf.instances, some minor tweaks of deb related things like conflict handling and a discussion about naming conventions openhab vs. openhab2. But maybe we could change these things with further PR('s) and give users a chance to test the current development. Furthermore as soon as a deb "testing" package is published I could make a PR for the openhab-docker project with updates for the Dockerfile. I think the docker installation should also be based on the deb package installation. |
An item on my wishlist is to see .deb packages of 1.9 addons that can be installed from openHAB 1.x installations with no special steps, so they end up in the right place and have the right names in bintray. Any chance we can keep the sensible .deb names from OH1 to minimise disruption? |
@watou This issue here is about OH2 packaging and there won't be any Debian packages for addons anymore - only for the distro itself. |
# Conflicts: # distributions/openhab-offline/pom.xml
I've tried to workaround the instance.properties problem by overriding the This works so far but it breaks checkRootInstance() Besides the karaf.instances problem the packaging is ready for testing from my point of view. |
Any comments from the karaf experts? |
You cannot mean me here. Maybe @maggu2810 or @dvanherbergen? |
I have not followed this discussion the last time... |
Thanks @maggu2810 I've already checked if I could prepare a PR for Karaf, but it's to much work. I will try to solve the issue keeping karaf.instances at it's default value and provide a ${KARAF_HOME}/instances directory which is writeable for the openhab2 user. |
@theoweiss I finally took the time to look at it. What blows up the required disk space of the build is the tar.gz distro besides the zip - but I assume this is the only one you can use as an input for the deb package, right?
If I get you right, the only problem when using "openhab" is that if a user has OH1 and OH2 installed through apt-get and he then de-installs OH1, he will also break his OH2 installation, correct? I think this is something that can be documented and is acceptable. On the long run, I very much prefer to have the straight-forward user name "openhab" instead of a kind of tweaked name "openhab2". Besides this, I would be fine to merge and have people start testing the package! |
@kaikreuzer yes only the tar.gz is working with jdeb. |
@kaikreuzer I've changed the user and group name to openhab. The openhab application directory is now writable for the openhab user and no longer owned by root. I've also added the apt-repo plugin to the maven stack, thus it's possible to add the CI http url as apt-repository. The downside is more disk space usage for the build. |
Ok, many thanks! So let's merge and test. |
Btw, your commits are lacking the "Signed-off-by" footer (see here). |
Unfortunately (for the beta3 release ;-) ) I was on vacation with my family. I've opened a new PR with squashed commits and Signed-off-by here #213 . It's meant as successor of this PR, therefore I'll close this one. |
Do not merge yet!
This PR is meant to discuss the deb packaging #66. I will add some comments soon.