From nobody Wed Aug 30 06:52:34 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RbFNL3rr1z4rnM1; Wed, 30 Aug 2023 06:52:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RbFNL2n9mz4dDr; Wed, 30 Aug 2023 06:52:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693378354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aVnv6RwgdpwG8N1ddo5DFrq+fEGCkpxVdYPNhheY8nk=; b=fqKmKlZV34LAD4azpGEVDkD19mey74WxUEaaCwHUltDGPRw3eTXSLsaCOZ7R2Cl0vES+Xk 139ldNmYrJKnyE+Cwtvt1LoBXDhFyv2JF5hKWU0U5MpUPZBLMpMamO/9PW2AJeBWEtHErK bIdLdt2QUH57YLdnF0lRKwbdwVe5QBW/XS9mYg23XRC7t1bf7ECf8ro5lf6oVtoa+07LRx iePu9jFV8cmJvrLXScxnlocBkstuImhHKFXVLWkMzMU9ZFE4zTnH2GtkpXrlZ86DIDDsdD ccbn74dErmC7NksbWAkL9HOIrm07i6K3rbC3Q/iwp3MAsNaM9FKQhH6/WW4l4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693378354; a=rsa-sha256; cv=none; b=NrvZ9XQ733Uhn4lUOzc2ooRPBsnvUxeE4tmKhmt2Bch3cnafS4cn1TVMHZ5Q3J4+rE+z6V hpf3XQK12QfcQqWuGLrUX/1wdRPSfZrA8LyLpP78SmvI71JWehoeA/kB9njzRwCmSDRGEz 7ef+OWAyl1A903mXOM0v2aKOSaeF65LyG/yCUFkYLIxsQmxmpfbpdI+Bmquw+us+IL3LQn V3o131lExL2YNOEWsv2ZY8Ga4M5HVWPYhS57Ce5fBhg7QZ06fjx1ULzO7KNo7iucIcTISD h2K+4eeBXl5Da+mQPtyb2MwsB95qoRijZNfBwUFz1ySIms7RfUZ1D0mNxZ7Z5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693378354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aVnv6RwgdpwG8N1ddo5DFrq+fEGCkpxVdYPNhheY8nk=; b=K2pwcs1AMiZvpyj6b0kq3kdDrk3RZ3Q0eea0TAskM2IBCzVzQx48M/2K+uyMzougWYmFKj ZffdD0ym26oyj1cXI6a4/lDdcod0b1/ed56E4boqKjrmz98LUm0jvJ3/rpqKR1ja9UtACw M+MJYx5E9sI0bvSrtwGwj15FtlvmlO2ZAVYeScy7i1oVOfIYeAlAcp20jEaTxW9rbP6T7L +quy7Q4Ts8L6y2WfJGE9FSTVflEn9RnzoFwvuFX8Q9yIc3t/NZU08ym6dwAwbBZm6j1tEc MpnIHLg1rMfqseSkF8j9Leaas3xaJKFqSGRKBStkaqLWJrMY0KxKoUMnr5PVjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RbFNL1szKz8h8; Wed, 30 Aug 2023 06:52:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37U6qYCK096262; Wed, 30 Aug 2023 06:52:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37U6qYut096259; Wed, 30 Aug 2023 06:52:34 GMT (envelope-from git) Date: Wed, 30 Aug 2023 06:52:34 GMT Message-Id: <202308300652.37U6qYut096259@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Alexander Leidinger Subject: git: b5bb6426f206 - main - misc/openhab*: update to 4.0.2, rc.d script changes List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: netchild X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b5bb6426f206a1e1807810539ea20d42d48b9509 Auto-Submitted: auto-generated The branch main has been updated by netchild: URL: https://cgit.FreeBSD.org/ports/commit/?id=b5bb6426f206a1e1807810539ea20d42d48b9509 commit b5bb6426f206a1e1807810539ea20d42d48b9509 Author: Alexander Leidinger AuthorDate: 2023-08-30 06:46:55 +0000 Commit: Alexander Leidinger CommitDate: 2023-08-30 06:52:28 +0000 misc/openhab*: update to 4.0.2, rc.d script changes The rc.d script is now instance-aware (like the tomcat port). [1] This allows to make a copy of the rc.d script to a different name and use similar-named rc.conf variables to start a second instance of openhab. Submitted by: Jürgen Weber [1] --- misc/openhab-addons/Makefile | 2 +- misc/openhab-addons/distinfo | 6 +-- misc/openhab/Makefile | 2 +- misc/openhab/distinfo | 6 +-- misc/openhab/files/openhab.in | 86 ++++++++++++++++++++++++++++--------------- misc/openhab/pkg-plist | 3 +- 6 files changed, 66 insertions(+), 39 deletions(-) diff --git a/misc/openhab-addons/Makefile b/misc/openhab-addons/Makefile index 1559d52441ed..41dc21b3aefc 100644 --- a/misc/openhab-addons/Makefile +++ b/misc/openhab-addons/Makefile @@ -1,5 +1,5 @@ PORTNAME= openhab-addons -PORTVERSION= 4.0.1 +PORTVERSION= 4.0.2 CATEGORIES= misc java MASTER_SITES= https://openhab.jfrog.io/artifactory/libs-release-local/org/openhab/distro/openhab-addons/${PORTVERSION}/ DISTNAME= openhab-addons-${PORTVERSION} diff --git a/misc/openhab-addons/distinfo b/misc/openhab-addons/distinfo index c23fe4e5a2f8..81ff74122b23 100644 --- a/misc/openhab-addons/distinfo +++ b/misc/openhab-addons/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1690713414 -SHA256 (openhab-addons-4.0.1.kar) = edb34f7ad477ccfc5f9b171958139b780d27354384463c4b8e2a9d6d895bb75c -SIZE (openhab-addons-4.0.1.kar) = 393905810 +TIMESTAMP = 1693376683 +SHA256 (openhab-addons-4.0.2.kar) = de1fbbb2944176712852161b1311e69f3663f46854d216abab7f3b2c49638cfa +SIZE (openhab-addons-4.0.2.kar) = 393906978 diff --git a/misc/openhab/Makefile b/misc/openhab/Makefile index cf6b12a3c61f..4e2313d4e650 100644 --- a/misc/openhab/Makefile +++ b/misc/openhab/Makefile @@ -1,5 +1,5 @@ PORTNAME= openhab -PORTVERSION= 4.0.1 +PORTVERSION= 4.0.2 PORTREVISION= 0 CATEGORIES= misc java MASTER_SITES= https://openhab.jfrog.io/artifactory/libs-release-local/org/openhab/distro/openhab/${PORTVERSION}/ diff --git a/misc/openhab/distinfo b/misc/openhab/distinfo index 70611c625ab0..5a0b738b3a28 100644 --- a/misc/openhab/distinfo +++ b/misc/openhab/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1690711802 -SHA256 (openhab-4.0.1.zip) = 9a3dee1ceea3fae5c1673da954886a0432d8cc121eac8d3d1220264e3ae59ecc -SIZE (openhab-4.0.1.zip) = 104031926 +TIMESTAMP = 1693376325 +SHA256 (openhab-4.0.2.zip) = f132b501fe997daf83db8fbb7d8d8910c87d5620c1adc3abb6ec1c609bac62ac +SIZE (openhab-4.0.2.zip) = 104058457 diff --git a/misc/openhab/files/openhab.in b/misc/openhab/files/openhab.in index 042c5110e564..5c2ce115c27e 100644 --- a/misc/openhab/files/openhab.in +++ b/misc/openhab/files/openhab.in @@ -28,47 +28,73 @@ . /etc/rc.subr -name=openhab -rcvar=openhab_enable - -load_rc_config $name - -: ${openhab_enable:="NO"} -: ${openhab_user:="openhab"} -: ${openhab_group:="openhab"} -: ${openhab_http_port:="8080"} -: ${openhab_https_port:="8443"} -: ${openhab_listen_address:="0.0.0.0"} -: ${openhab_backup_dir:="/var/db/openhab/backups"} -: ${openhab_home_dir:="%%PREFIX%%/libexec/openhab"} -: ${openhab_conf_dir:="%%PREFIX%%/etc/openhab"} -: ${openhab_runtime_dir:="%%PREFIX%%/libexec/openhab/runtime"} -: ${openhab_userdata_dir:="/var/db/openhab/userdata"} -: ${openhab_log_dir:="/var/log/openhab"} - -export OPENHAB_USER="${openhab_user}" -export OPENHAB_GROUP="${openhab_group}" -export OPENHAB_HTTP_PORT="${openhab_http_port}" -export OPENHAB_HTTPS_PORT="${openhab_https_port}" -export OPENHAB_HTTP_ADDRESS="${openhab_listen_address}" +case $0 in +/etc/rc*) + # during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown), + # so get the name of the script from $_file + name=$_file + ;; +*) + name=$0 + ;; +esac + +name=${name##*/} +rcvar=${name}_enable + +load_rc_config "${name}" + +eval "${rcvar}=\${${rcvar}:-'NO'}" +eval "_openhab_user=\${${name}_user:-'openhab'}" +eval "_openhab_group=\${${name}_group:-'openhab'}" + +eval "_openhab_http_port=\${${name}_http_port:-'8080'}" +eval "_openhab_https_port=\${${name}_https_port:-'8443'}" +eval "_openhab_listen_address=\${${name}_listen_address:-'0.0.0.0'}" + +eval "_openhab_backup_dir=\${${name}_backup_dir:-'/var/db/openhab/backups'}" +eval "_openhab_home_dir=\${${name}_home_dir:-'%%PREFIX%%/libexec/openhab'}" +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_java_opts=\${${name}_java_opts:-''}" + +export OPENHAB_USER="${_openhab_user}" +export OPENHAB_GROUP="${_openhab_group}" +export OPENHAB_HTTP_PORT="${_openhab_http_port}" +export OPENHAB_HTTPS_PORT="${_openhab_https_port}" +export OPENHAB_HTTP_ADDRESS="${_openhab_listen_address}" export OPENHAB_BACKUPS="${openhab_backup_dir}" -export EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/cuau0 -Dsun.nio.fs.watchservice=polling ${openhab_java_opts}" -export OPENHAB_HOME="${openhab_home_dir}" -export OPENHAB_CONF="${openhab_conf_dir}" -export OPENHAB_RUNTIME="${openhab_runtime_dir}" -export OPENHAB_USERDATA="${openhab_userdata_dir}" -export OPENHAB_LOGDIR="${openhab_log_dir}" +export EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/cuau0 -Dsun.nio.fs.watchservice=polling ${_openhab_java_opts}" +export OPENHAB_HOME="${_openhab_home_dir}" +export OPENHAB_CONF="${_openhab_conf_dir}" +export OPENHAB_RUNTIME="${_openhab_runtime_dir}" +export OPENHAB_USERDATA="${_openhab_userdata_dir}" +export OPENHAB_LOGDIR="${_openhab_log_dir}" # for UTF-8 encoding, language can be set inside openhab: export LC_ALL=en_US.UTF-8 export JAVA_VERSION=17 pidfile=/var/run/${name}/${name}.pid +start_precmd="openhab_prestart" + command=/usr/sbin/daemon command_args="-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 + install -d -o ${_openhab_user} -g ${_openhab_group} -m 0755 "${_openhab_piddir}" + + install -d -o ${_openhab_user} -g ${_openhab_group} -m 0755 "${_openhab_log_dir}" +} + + openhab_stop() { - ${OPENHAB_RUNTIME}/bin/stop + su -m ${_openhab_user} -c "${OPENHAB_RUNTIME}/bin/stop" if [ -e ${pidfile} ]; then wait_for_pids $(cat ${pidfile}) fi diff --git a/misc/openhab/pkg-plist b/misc/openhab/pkg-plist index 66f207a5e57f..1a433fa0fd08 100644 --- a/misc/openhab/pkg-plist +++ b/misc/openhab/pkg-plist @@ -233,8 +233,9 @@ libexec/openhab/runtime/system/org/javassist/javassist/3.27.0-GA/javassist-3.27. libexec/openhab/runtime/system/org/jctools/jctools-core/2.1.2/jctools-core-2.1.2.jar libexec/openhab/runtime/system/org/jline/jline/3.21.0/jline-3.21.0.jar libexec/openhab/runtime/system/org/jmdns/jmdns/3.5.8/jmdns-3.5.8.jar -libexec/openhab/runtime/system/org/jupnp/org.jupnp/2.7.0/org.jupnp-2.7.0.jar +libexec/openhab/runtime/system/org/jupnp/org.jupnp/2.7.1.OH1/org.jupnp-2.7.1.OH1.jar libexec/openhab/runtime/system/org/jvnet/staxex/stax-ex/1.7.4/stax-ex-1.7.4.jar +libexec/openhab/runtime/system/org/openhab/base-fixes/1.0.0/base-fixes-1.0.0.jar libexec/openhab/runtime/system/org/openhab/core/bundles/org.openhab.core.addon.marketplace.karaf/%%PORTVERSION%%/org.openhab.core.addon.marketplace.karaf-%%PORTVERSION%%.jar libexec/openhab/runtime/system/org/openhab/core/bundles/org.openhab.core.addon.marketplace/%%PORTVERSION%%/org.openhab.core.addon.marketplace-%%PORTVERSION%%.jar libexec/openhab/runtime/system/org/openhab/core/bundles/org.openhab.core.addon/%%PORTVERSION%%/org.openhab.core.addon-%%PORTVERSION%%.jar