aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Leidinger <netchild@FreeBSD.org>2023-09-04 17:20:47 +0000
committerAlexander Leidinger <netchild@FreeBSD.org>2023-09-04 17:22:49 +0000
commitc3383035389f393897c1287ab1682afb3c0ffea3 (patch)
tree0cfdb0ddc63371641cb3e159d4bdab0be57a1d7b
parentaa9736e3e5f6856f5eb5e26837169b0f6022eec8 (diff)
downloadports-c3383035389f393897c1287ab1682afb3c0ffea3.tar.gz
ports-c3383035389f393897c1287ab1682afb3c0ffea3.zip
misc/openhab: take runtime user into account, fix piddir handling
The rc.d script lost the runtime user handling and the piddir was not set which caused warnings in the prestart routine. Noticed by: Martin ehk <rehak@tekkirk.org>
-rw-r--r--UPDATING11
-rw-r--r--misc/openhab/Makefile2
-rw-r--r--misc/openhab/files/openhab.in6
3 files changed, 15 insertions, 4 deletions
diff --git a/UPDATING b/UPDATING
index 7ded41161f91..24e99771a386 100644
--- a/UPDATING
+++ b/UPDATING
@@ -5,6 +5,17 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
+20230904:
+ AUTHOR: netchild@FreeBSD.org
+ AFFECTS: users of misc/openhab
+
+ The rc.d script of 4.0.2 had an error which didn't take the user to
+ run openhab into account. After installing the update and stopping
+ openhab run (for the default settings)
+ chown -R openhab:openhab /var/db/openhab/userdata /var/log/openhab
+ If you use other directories for the userdata and logs, you need to
+ adapt accordingly.
+
20230822:
AUTHOR: arrowd@FreeBSD.org
AFFECTS: users of sysutils/polkit together with sysutils/consolekit2
diff --git a/misc/openhab/Makefile b/misc/openhab/Makefile
index 4e2313d4e650..c33dd44857e6 100644
--- a/misc/openhab/Makefile
+++ b/misc/openhab/Makefile
@@ -1,6 +1,6 @@
PORTNAME= openhab
PORTVERSION= 4.0.2
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= misc java
MASTER_SITES= https://openhab.jfrog.io/artifactory/libs-release-local/org/openhab/distro/openhab/${PORTVERSION}/
DISTNAME= openhab-${PORTVERSION}
diff --git a/misc/openhab/files/openhab.in b/misc/openhab/files/openhab.in
index 5c2ce115c27e..7acec2be6e34 100644
--- a/misc/openhab/files/openhab.in
+++ b/misc/openhab/files/openhab.in
@@ -58,7 +58,7 @@ eval "_openhab_conf_dir=\${${name}_conf_dir:-'%%PREFIX%%/etc/openhab'}"
eval "_openhab_runtime_dir=\${${name}_runtime_dir:-'%%PREFIX%%/libexec/openhab/runtime'}"
eval "_openhab_userdata_dir=\${${name}_userdata_dir:-'/var/db/openhab/userdata'}"
eval "_openhab_log_dir=\${${name}_log_dir:-'/var/log/openhab'}"
-eval "_openhab_piddir=\${${name}_piddir}"
+eval "_openhab_piddir=\${${name}_piddir:-/var/run/${name}}"
eval "_openhab_java_opts=\${${name}_java_opts:-''}"
@@ -78,12 +78,12 @@ export OPENHAB_LOGDIR="${_openhab_log_dir}"
export LC_ALL=en_US.UTF-8
export JAVA_VERSION=17
-pidfile=/var/run/${name}/${name}.pid
+pidfile=${_openhab_piddir}/${name}.pid
start_precmd="openhab_prestart"
command=/usr/sbin/daemon
-command_args="-p ${pidfile} -c -t openhab ${OPENHAB_HOME}/start.sh server"
+command_args="-u ${_openhab_user} -p ${pidfile} -c -t openhab ${OPENHAB_HOME}/start.sh server"
openhab_prestart() {
# Make sure we have our RUNDIR, even if it's on a tmpfs