From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 79CD2159C96 for ; Thu, 25 Jul 2024 07:21:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C07A8E29F9; Thu, 25 Jul 2024 07:21:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 999E1E29F9 for ; Thu, 25 Jul 2024 07:21:33 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9D0CF340806 for ; Thu, 25 Jul 2024 07:21:32 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 07AD61B89 for ; Thu, 25 Jul 2024 07:21:31 +0000 (UTC) From: "Florian Schmaus" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Florian Schmaus" Message-ID: <1721892039.e765c8b50800a67f21a7b5e65a13a6a6971b5b8b.flow@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/openhab-bin/, app-misc/openhab-bin/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-misc/openhab-bin/files/openhab.initd app-misc/openhab-bin/openhab-bin-4.2.0-r1.ebuild app-misc/openhab-bin/openhab-bin-4.2.0.ebuild X-VCS-Directories: app-misc/openhab-bin/ app-misc/openhab-bin/files/ X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: e765c8b50800a67f21a7b5e65a13a6a6971b5b8b X-VCS-Branch: master Date: Thu, 25 Jul 2024 07:21:31 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 87b4d283-ae53-407c-8df8-d353056c8ad7 X-Archives-Hash: b499bd9eb88b8754161e738ea8e74829 commit: e765c8b50800a67f21a7b5e65a13a6a6971b5b8b Author: Florian Schmaus gentoo org> AuthorDate: Wed Jul 24 11:59:40 2024 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Thu Jul 25 07:20:39 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e765c8b5 app-misc/openhab-bin: add support for OpenRC Thanks to Xavier Miller for the initial patches. Closes: https://bugs.gentoo.org/936265 Signed-off-by: Florian Schmaus gentoo.org> app-misc/openhab-bin/files/openhab.initd | 18 ++++++++++++++++++ ...ab-bin-4.2.0.ebuild => openhab-bin-4.2.0-r1.ebuild} | 11 +++++++++++ 2 files changed, 29 insertions(+) diff --git a/app-misc/openhab-bin/files/openhab.initd b/app-misc/openhab-bin/files/openhab.initd new file mode 100644 index 000000000000..a5899b24994f --- /dev/null +++ b/app-misc/openhab-bin/files/openhab.initd @@ -0,0 +1,18 @@ +#!/sbin/openrc-run + +pidfile=/run/${SVCNAME}.pid + +command_user="openhab:openhab" +command="/usr/bin/openhab" +command_args="daemon" +command_background=true + +depend() { + need net +} + +stop() { + ebegin "Stopping ${RC_SVCNAME}" + ${command} stop + eend $? +} diff --git a/app-misc/openhab-bin/openhab-bin-4.2.0.ebuild b/app-misc/openhab-bin/openhab-bin-4.2.0-r1.ebuild similarity index 88% rename from app-misc/openhab-bin/openhab-bin-4.2.0.ebuild rename to app-misc/openhab-bin/openhab-bin-4.2.0-r1.ebuild index 9b1c384fe722..6625624aba64 100644 --- a/app-misc/openhab-bin/openhab-bin-4.2.0.ebuild +++ b/app-misc/openhab-bin/openhab-bin-4.2.0-r1.ebuild @@ -96,6 +96,8 @@ export JAVA_HOME exec /usr/share/openhab/runtime/bin/karaf "\$@" EOF newbin "${DISTDIR}"/openhab-cli-2024-01-14 openhab-cli + + newinitd "${FILESDIR}"/openhab.initd openhab } pkg_postinst() { @@ -120,5 +122,14 @@ pkg_postinst() { if [[ -v openhab_service_active ]]; then edob systemctl start openhab fi + elif [[ -d /run/openrc ]]; then + einfo "Follow these steps to complete the update of OpenHAB:" + einfo + einfo "1. Stop the OpenHAB's service" + einfo "$ rc-service openhab stop" + einfo "2. Clean OpenHAB's cache" + einfo "$ openahb-cli clean-cache" + einfo "3. Restart OpenHAB's service" + einfo "$ rc-service openhab start" fi }