From nobody Mon Feb 06 18:30:33 2023 X-Original-To: dev-commits-ports-all@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 4P9ZZK4Nzsz3n2dm; Mon, 6 Feb 2023 18:30:33 +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 4P9ZZK3ywjz3Kd5; Mon, 6 Feb 2023 18:30:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675708233; 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=NYBJIgy93PcV6RIzOH+AN9X0wEQsFijmrr9/qK9ORfs=; b=tqTIXKdOUtPv1+fEQXvmB9+NGiDZPGrVIiY91iWclA9b7LKIqomzw3xVb5JasuGRKvhw92 O8EyI1NtAHqJ2hbJ6AsB0zZpFmGsjY0kwQTx6fNB/AvCvzcGDzEklk79/qFuH66wBzjd2t A5cmd0BD6nTty9rgwHcuJ/GVC6BzJIVDK/aIR1qczK4hT7ZlCpYvgY2D4MMxlBYtJpa8eg b8Ij5wB6Kk78i2N3k+FmoQrggoxfmLlcuJLcLyXWN97flzO8PtrL6ObU75N18CP5UV55+p lI1VLH5aLQUTosotaErsdHnaBDMzbIC8T8EV64vW49co/DaHWa7jP66b+dcMsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675708233; 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=NYBJIgy93PcV6RIzOH+AN9X0wEQsFijmrr9/qK9ORfs=; b=U0WhKoffCUEFDWLsCqtXOSBIzLy827OGkav08UX7R7cBmjDR4WD7D71uv17BX8NSqxoQBa vZMj6YirkRFNHdlDKPYiwDiifxQBFxeLcMX9FA4HQSvBh3iWB3vtabvr2lECznwR343Y+7 QYTlZhjds/t/no52dgy90wlw7IjAfA3b3WT26xyVYd+ElwXEd0S+GOUJNkQHSGFJkYdcUv 3Bg1VHSy7vxzDQPjdOnk8ZpjgSuojI522TBZAEzZ0FN+ETZ+N/DMt1aS98Ql+SkbeeZQkO PTFK1xkop+ynOYKVmciExVs6t5jLDDiFvBuLbfS1AZKFENTV6MeNENkye4YcFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675708233; a=rsa-sha256; cv=none; b=VIACWdqT4+P2AM5ND0O1P9GzgvL55omShb8JE7bquE7vRWzmWR7uCATPoZSqjSf0J8h7+D o9neMRvCJ+XvW4IN6bcTtSe7nFNcFcHn2Zgp1tomejePm6D0ltvYL/9Dx9p9ififzn9TUC sVy6JbP3lr+eEGvDFaCDBKosCTaTTMMk5Eb3zBcsWLoTRsFVEKpCpYizCqg955YB3sE1yc 12eGX4/q0ynbSBzsNbYcFbJedEdYW7DnhjYCwvclnKXaQ+mDGk9E+yY8cf1DudhB57avXr OblqTtTRCSbW6ht9slX83PdbiDkhbVTP73puqDGbKXpJTsH0vhwAF6Zc/w3f6A== 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 4P9ZZK32GmzlBS; Mon, 6 Feb 2023 18:30:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 316IUXZa028086; Mon, 6 Feb 2023 18:30:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 316IUXB4028085; Mon, 6 Feb 2023 18:30:33 GMT (envelope-from git) Date: Mon, 6 Feb 2023 18:30:33 GMT Message-Id: <202302061830.316IUXB4028085@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jochen Neumeister Subject: git: 446cd084d5ff - main - net-mgmt/icingaweb2-module-director: Enable Icinga Director Background Daemon List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: joneum X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 446cd084d5ffbc2c421f5d1875a82c66544ac58d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by joneum: URL: https://cgit.FreeBSD.org/ports/commit/?id=446cd084d5ffbc2c421f5d1875a82c66544ac58d commit 446cd084d5ffbc2c421f5d1875a82c66544ac58d Author: Jochen Neumeister AuthorDate: 2023-02-06 18:22:03 +0000 Commit: Jochen Neumeister CommitDate: 2023-02-06 18:30:27 +0000 net-mgmt/icingaweb2-module-director: Enable Icinga Director Background Daemon Deploys in the director don't work/finish since the last update. The reason is, that the update didn't enable the Icinga Director Background Daemon, that has been mandatory since 1.7.0, see https://github.com/Icinga/icingaweb2-module-director/blob/master/doc/75-Background-Daemon.md PR: 269227 Reported by: flo Sponsored by: Netzkommune GmbH --- GIDs | 2 +- UIDs | 2 +- net-mgmt/icingaweb2-module-director/Makefile | 18 ++++++++++++-- .../files/icinga-director.in | 29 ++++++++++++++++++++++ net-mgmt/icingaweb2-module-director/pkg-plist | 1 + 5 files changed, 48 insertions(+), 4 deletions(-) diff --git a/GIDs b/GIDs index 23d9c2564c1b..4b5cb168fbc5 100644 --- a/GIDs +++ b/GIDs @@ -258,7 +258,7 @@ promscale:*:314: lavinmq:*:315: nut:*:316: hedgedoc:*:317: -# free: 318 +# free: 318, UID used by icingadirector # free: 319 # free: 320 # free: 321 diff --git a/UIDs b/UIDs index b41b0f6ccb9c..c2ecbb8c766b 100644 --- a/UIDs +++ b/UIDs @@ -263,7 +263,7 @@ promscale:*:314:314::0:0:Promscale:/nonexistent:/usr/sbin/nologin lavinmq:*:315:315::0:0:LavinMQ user:/nonexistent:/usr/sbin/nologin nut:*:316:316::0:0:Network UPS Tools user:/nonexistent:/usr/sbin/nologin hedgedoc:*:317:317::0:0:HedgeDoc user:/nonexistent:/usr/sbin/nologin -# free: 318 +icingadirector:*:318:183::0:0:icingadirector user:/nonexistent:/usr/sbin/nologin # free: 319 # free: 320 # free: 321 diff --git a/net-mgmt/icingaweb2-module-director/Makefile b/net-mgmt/icingaweb2-module-director/Makefile index 7ad9e7cf7cd1..db0d3a986dbd 100644 --- a/net-mgmt/icingaweb2-module-director/Makefile +++ b/net-mgmt/icingaweb2-module-director/Makefile @@ -15,6 +15,19 @@ LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= icingaweb2${PHP_PKGNAMESUFFIX}>=2.11.4:net-mgmt/icingaweb2@${PHP_FLAVOR} USES= php:web,flavors +USE_PHP= pcntl +USE_RC_SUBR= icinga-director + +DIRECTOR_USER?= icingadirector +DIRECTOR_GROUP?= icinga + +USERS= ${DIRECTOR_USER} +GROUPS= ${DIRECTOR_GROUP} + +SUB_LIST+= DIRECTOR_GROUP=${DIRECTOR_GROUP} \ + DIRECTOR_USER=${DIRECTOR_USER} +PLIST_SUB+= DIRECTOR_GROUP=${DIRECTOR_GROUP} \ + DIRECTOR_USER=${DIRECTOR_USER} USE_GITHUB= yes GH_ACCOUNT= icinga @@ -22,14 +35,15 @@ GH_ACCOUNT= icinga NO_BUILD= yes NO_ARCH= yes -OPTIONS_DEFINE= NLS +OPTIONS_DEFINE= NLS NLS_USES= gettext -NLS_USE= php=intl +NLS_USE= PHP=intl WWWDIR?= ${PREFIX}/www/icingaweb2/modules/${PORTNAME:C/^.*-//} do-install: + @${MKDIR} ${STAGEDIR}/var/run/icinga-director @${MKDIR} ${STAGEDIR}${WWWDIR} (cd ${WRKSRC} && \ ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}) diff --git a/net-mgmt/icingaweb2-module-director/files/icinga-director.in b/net-mgmt/icingaweb2-module-director/files/icinga-director.in new file mode 100644 index 000000000000..2f29fe26506e --- /dev/null +++ b/net-mgmt/icingaweb2-module-director/files/icinga-director.in @@ -0,0 +1,29 @@ +#!/bin/sh + +# PROVIDE: icinga_director +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add these lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# icinga_director_enable (bool): Set to NO by default. +# Set it to YES to enable icinga_director. +# icinga_director_user: The user account used to run the daemon. +# Default: %%DIRECTOR_USER%% + +. /etc/rc.subr + +name=icinga_director +rcvar=icinga_director_enable + +load_rc_config $name + +: ${icinga_director_enable:="NO"} +: ${icinga_director_user:="%%DIRECTOR_USER%%"} + +pidfile=/var/run/icinga-director/${name}.pid +command=/usr/sbin/daemon +command_args="-c -f -P $pidfile %%PREFIX%%/bin/icingacli director daemon run" + +run_rc_command "$1" diff --git a/net-mgmt/icingaweb2-module-director/pkg-plist b/net-mgmt/icingaweb2-module-director/pkg-plist index 0a5c0a5869d9..f94b39325970 100644 --- a/net-mgmt/icingaweb2-module-director/pkg-plist +++ b/net-mgmt/icingaweb2-module-director/pkg-plist @@ -1129,3 +1129,4 @@ %%WWWDIR%%/test/phpunit-compat.php %%WWWDIR%%/test/setup_vendor.sh %%WWWDIR%%/test/travis-prepare.sh +@dir(%%DIRECTOR_USER%%,DIRECTOR_GROUP%%,0775) /var/run/icinga-director