From nobody Tue Sep 26 15:29:56 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 4Rw3bK0P88z4vHkJ; Tue, 26 Sep 2023 15:30:21 +0000 (UTC) (envelope-from dan@langille.org) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4Rw3bJ5LS7z4TZQ; Tue, 26 Sep 2023 15:30:20 +0000 (UTC) (envelope-from dan@langille.org) Authentication-Results: mx1.freebsd.org; none Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 7ACF93200948; Tue, 26 Sep 2023 11:30:18 -0400 (EDT) Received: from imap42 ([10.202.2.92]) by compute5.internal (MEProxy); Tue, 26 Sep 2023 11:30:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=langille.org; h= cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1695742218; x=1695828618; bh=OG ituMVSmTPujt7VqM0GseUCxtzv+cbGZzcikhamEH0=; b=NbtQWWm9YoFEsg3KjW +eAHdcHNG4CrJixyV9gI3bPNKPXAxv4ieyMgWyDumHJXw0UkJ9rxPC3Hugu4Y+R3 AJllShaK2nXcXYdC9l3skRDd069NcPHcYb3xeSXAmkhiBOC86GGJiRNEDmbzz6vm ync1xV2LBwfpCJfXOZSkicfw6ygHhg0TNzDYo6QFFPtonQqbiaTTz7QeKZAUB/j+ mqDfdKaB5ONsjQ1qLyT5mrdu9HGpDx1fVf8q7PwBS0749VVncpqZjl1+tInKhdzK NHSbMVCRNYNIZRnEN1NTnkS9Qadp4Qn5GD5PJXF1KQZQOMjC9vl1pghF2PbZHYjH sdOQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1695742218; x=1695828618; bh=OGituMVSmTPuj t7VqM0GseUCxtzv+cbGZzcikhamEH0=; b=pesSquWeA10tOzR5RfDCmANv73GTT KxuEilWJO1k/SbKHhUc3kPPP4I7DczsmazPb1GYYbsti9CTJR8a+eDp28TpBiUIN OTFp8BCR3fI3d23zj7xt1C7I7M5+T1reVw8CXyZkVXLFZ0+z808JjlYNQQ3bSMgG p/bP9I+ogI015WY3Oo/0baDohO/d6JWGa4x4bFfz6h1bRTPvfQTOahMh14xz1ZG4 dwW5kYVvAPRRMx86vTiHh68wblui9H2aE0Bxg5qWbV3pLIlCvS82Cq1e3B51Q2Gc +0fO/otPM0sVToRY/UK17gS3fSdZVhALP7GlTwOzFQhfrJ71YvlDrKQXA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvjedrtddtgdehlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecuufhusghsthcuvhgrrhhsucdlhedtmdenucfjughrpe fofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfffgrnhcunfgrnhhg ihhllhgvfdcuoegurghnsehlrghnghhilhhlvgdrohhrgheqnecuggftrfgrthhtvghrnh epgfdvgfehgfetteeijedtgedvffdtgfegveektdduteejvdfgieeltedvfefgffejnecu ffhomhgrihhnpehfrhgvvggsshgurdhorhhgpdhitghinhhgrgdrtghomhdpghhithhhuh gsrdgtohhmpdhpohhrthdrmhhkpdgtohhnfhdrlhhotggrlhenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegurghnsehlrghnghhilhhlvgdroh hrgh X-ME-Proxy: Feedback-ID: ifbf9424e:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id B96DCBC007D; Tue, 26 Sep 2023 11:30:17 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-957-ga1ccdb4cff-fm-20230919.001-ga1ccdb4c 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 Message-Id: <403c2f9d-53a7-4831-9628-38eae3249c04@app.fastmail.com> In-Reply-To: <202309261525.38QFPX4q085082@gitrepo.freebsd.org> References: <202309261525.38QFPX4q085082@gitrepo.freebsd.org> Date: Tue, 26 Sep 2023 11:29:56 -0400 From: "Dan Langille" To: dvl , ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: Re: git: 67e1373470a6 - main - net-mgmt/icingadb: Add new port Content-Type: text/plain X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:29838, ipnet:64.147.123.0/24, country:US] X-Rspamd-Queue-Id: 4Rw3bJ5LS7z4TZQ Why PORTREVISION= 5? Local changes to get it to build, and not reverted before committing. My apologies. On Tue, Sep 26, 2023, at 11:25 AM, Dan Langille wrote: > The branch main has been updated by dvl: > > URL: > https://cgit.FreeBSD.org/ports/commit/?id=67e1373470a6751d7843cdbba88e13facb43acac > > commit 67e1373470a6751d7843cdbba88e13facb43acac > Author: Dan Langille > AuthorDate: 2023-09-26 15:19:52 +0000 > Commit: Dan Langille > CommitDate: 2023-09-26 15:22:01 +0000 > > net-mgmt/icingadb: Add new port > > Publish, synchronize, and visualize Icinga data > > https://icinga.com/docs/icinga-db/latest/doc/02-Installation/ > --- > net-mgmt/Makefile | 1 + > net-mgmt/icingadb/Makefile | 48 +++++++++++++++++++ > net-mgmt/icingadb/distinfo | 7 +++ > net-mgmt/icingadb/files/icingadb.in | 55 ++++++++++++++++++++++ > net-mgmt/icingadb/files/patch-pkg_config_config.go | 11 +++++ > net-mgmt/icingadb/pkg-descr | 11 +++++ > net-mgmt/icingadb/pkg-plist | 8 ++++ > 7 files changed, 141 insertions(+) > > diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile > index 0c7b72eec009..19f98aed89f7 100644 > --- a/net-mgmt/Makefile > +++ b/net-mgmt/Makefile > @@ -87,6 +87,7 @@ > SUBDIR += icinga-php-library > SUBDIR += icinga-php-thirdparty > SUBDIR += icinga2 > + SUBDIR += icingadb > SUBDIR += icingaweb2 > SUBDIR += icingaweb2-module-businessprocess > SUBDIR += icingaweb2-module-cube > diff --git a/net-mgmt/icingadb/Makefile b/net-mgmt/icingadb/Makefile > new file mode 100644 > index 000000000000..2bf4a417406a > --- /dev/null > +++ b/net-mgmt/icingadb/Makefile > @@ -0,0 +1,48 @@ > +PORTNAME= icingadb > +DISTVERSIONPREFIX= v > +DISTVERSION= 1.1.1 > +PORTREVISION= 5 > +CATEGORIES= net-mgmt > + > +MAINTAINER= dvl@FreeBSD.org > +COMMENT= Publish, synchronize, and visualize Icinga data > +WWW= https://icinga.com/docs/icinga-db/latest/doc/02-Installation/ > + > +LICENSE= GPLv2 > +LICENSE_FILE= ${WRKSRC}/LICENSE > + > +USES= go:modules > + > +USE_RC_SUBR= icingadb > + > +PLIST_SUB= PORTNAME=${PORTNAME} > + > +# As copied from net-mgmt/icinga2 > +ICINGA2USER?= icinga > +ICINGA2GROUP?= icinga > +USERS= ${ICINGA2USER} > +GROUPS= ${ICINGA2GROUP} > + > +SUB_LIST= ICINGA2GROUP=${ICINGA2GROUP} \ > + ICINGA2USER=${ICINGA2USER} > + > +USE_GITHUB= yes > +GH_ACCOUNT= Icinga > +GH_PROJECT= icingadb > + > +GO_MODULE= github.com/icinga/icingadb > +GO_TARGET= ./cmd/icingadb > + > +SUB_LIST+= ICINGA2USER=${ICINGA2USER} \ > + PREFIX=${PREFIX} > + > +post-patch: > + @${REINPLACE_CMD} -e 's|%%PREFIX|${PREFIX}|g' > ${WRKSRC}/pkg/config/config.go > + > +post-install: > + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} > + ${MKDIR} ${STAGEDIR}${ETCDIR} > + (cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}) > + ${INSTALL_DATA} ${WRKSRC}/config.example.yml > ${STAGEDIR}${ETCDIR}/config.yml.sample > + > +.include > diff --git a/net-mgmt/icingadb/distinfo b/net-mgmt/icingadb/distinfo > new file mode 100644 > index 000000000000..29e6472e8ee5 > --- /dev/null > +++ b/net-mgmt/icingadb/distinfo > @@ -0,0 +1,7 @@ > +TIMESTAMP = 1694197114 > +SHA256 (go/net-mgmt_icingadb/Icinga-icingadb-v1.1.1_GH0/v1.1.1.mod) = > a1c31eb3ce2da460c847b048f5020a1707273df2d46169f37511de4cee9b5685 > +SIZE (go/net-mgmt_icingadb/Icinga-icingadb-v1.1.1_GH0/v1.1.1.mod) = > 1508 > +SHA256 (go/net-mgmt_icingadb/Icinga-icingadb-v1.1.1_GH0/v1.1.1.zip) = > 7988ae8a59b5904a461b922bb50d35c9e1ebd5e659486d40425f01594fc2a21c > +SIZE (go/net-mgmt_icingadb/Icinga-icingadb-v1.1.1_GH0/v1.1.1.zip) = > 3872935 > +SHA256 > (go/net-mgmt_icingadb/Icinga-icingadb-v1.1.1_GH0/Icinga-icingadb-v1.1.1_GH0.tar.gz) > = 8f4246765dc364917170905e38b01c62a6c44eab7d333c131fc46691a47c150a > +SIZE > (go/net-mgmt_icingadb/Icinga-icingadb-v1.1.1_GH0/Icinga-icingadb-v1.1.1_GH0.tar.gz) > = 3868785 > diff --git a/net-mgmt/icingadb/files/icingadb.in > b/net-mgmt/icingadb/files/icingadb.in > new file mode 100644 > index 000000000000..ab55bbfa3f37 > --- /dev/null > +++ b/net-mgmt/icingadb/files/icingadb.in > @@ -0,0 +1,55 @@ > +#!/bin/sh > + > +# PROVIDE: icingadb > +# REQUIRE: SERVERS mysql postgresql > +# KEYWORD: shutdown > +# > +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf > +# to enable this service: > +# > +# icingadb_enable: Set to NO by default. > +# Set it to YES to enable icingadb > +# icingadb_user: The user account used to run the daemon. > +# Default: %%ICINGA2USER%% > +# icingadb_group: The group account used to run the daemon. > +# Default: %%ICINGA2GROUP%% > +# > + > +. /etc/rc.subr > + > +name=icingadb > +rcvar="${name}_enable" > + > +load_rc_config $name > + > +: ${icingadb_enable:="NO"} > +: ${icingadb_user:="%%ICINGA2USER%%"} > +: ${icingadb_group:="%%ICINGA2GROUP%%"} > + > +icingadb_pid="/var/run/icingadb/icingadb.pid" > +icingadb_logfile="/var/log/icinga2/$name.log" > +icingadb_daemonflags="-o ${icingadb_logfile}" > + > +pidfile="$icingadb_pid" > +command="/usr/sbin/daemon" > + > +start_precmd=icingadb_precmd > + > +icingadb_precmd() > +{ > + [ -f ${icingadb_logfile} ] || install -g $icingadb_group -o > $icingadb_user -m 644 /dev/null ${icingadb_logfile} > + > + if [ ! -d "/var/run/icingadb" ]; then > + install -d -o ${icingadb_user} -g ${icingadb_group} -m 0775 > "/var/run/icingadb" > + fi > + if [ ! -e ${pidfile} ]; then > + install -o ${icingadb_user} -g ${icingadb_group} /dev/null > ${pidfile}; > + else > + chown ${icingadb_user}:${icingadb_group} ${pidfile}; > + fi > + > +} > + > +command_args="$icingadb_daemonflags -P $pidfile -t ${name} -T ${name} > %%PREFIX%%/bin/$name -c %%PREFIX%%/etc/icingadb/config.yml" > + > +run_rc_command "$1" > diff --git a/net-mgmt/icingadb/files/patch-pkg_config_config.go > b/net-mgmt/icingadb/files/patch-pkg_config_config.go > new file mode 100644 > index 000000000000..1b5b0066118c > --- /dev/null > +++ b/net-mgmt/icingadb/files/patch-pkg_config_config.go > @@ -0,0 +1,11 @@ > +--- pkg/config/config.go.orig 2023-09-08 17:19:58 UTC > ++++ pkg/config/config.go > +@@ -46,7 +46,7 @@ type Flags struct { > + // Version decides whether to just print the version and exit. > + Version bool `long:"version" description:"print version and exit"` > + // Config is the path to the config file > +- Config string `short:"c" long:"config" description:"path to config > file" required:"true" default:"/etc/icingadb/config.yml"` > ++ Config string `short:"c" long:"config" description:"path to config > file" required:"true" default:"%%PREFIX%%/etc/icinga2/icingadb.yml"` > + } > + > + // FromYAMLFile returns a new Config value created from the given > YAML config file. > diff --git a/net-mgmt/icingadb/pkg-descr b/net-mgmt/icingadb/pkg-descr > new file mode 100644 > index 000000000000..44543ed68c3c > --- /dev/null > +++ b/net-mgmt/icingadb/pkg-descr > @@ -0,0 +1,11 @@ > +Icinga DB is a set of components for publishing, synchronizing and > visualizing > +monitoring data in the Icinga ecosystem, consisting of: > + > +* Icinga DB Web which connects to both a Redis server and a database > to view and > + work with most up-to-date monitoring data > +* Icinga 2 with its Icinga DB feature enabled, responsible for > publishing the > + data to the Redis server, i.e. configuration and its runtime > updates, check > + results, state changes, downtimes, acknowledgements, notifications, > and other > + events such as flapping > +* And the Icinga DB daemon, which synchronizes the data between the > Redis server > + and the database > diff --git a/net-mgmt/icingadb/pkg-plist b/net-mgmt/icingadb/pkg-plist > new file mode 100644 > index 000000000000..dd7f07a70e47 > --- /dev/null > +++ b/net-mgmt/icingadb/pkg-plist > @@ -0,0 +1,8 @@ > +bin/%%PORTNAME%% > +@sample(root,wheel,0640) etc/%%PORTNAME%%/config.yml.sample > +%%EXAMPLESDIR%%/schema/pgsql/upgrades/1.1.1.sql > +%%EXAMPLESDIR%%/schema/pgsql/schema.sql > +%%EXAMPLESDIR%%/schema/mysql/schema.sql > +%%EXAMPLESDIR%%/schema/mysql/upgrades/1.1.1.sql > +%%EXAMPLESDIR%%/schema/mysql/upgrades/1.0.0.sql > +%%EXAMPLESDIR%%/schema/mysql/upgrades/1.0.0-rc2.sql -- Dan Langille dan@langille.org