From owner-dev-commits-src-all@freebsd.org Wed Jul 7 18:15:58 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 88C0265A985; Wed, 7 Jul 2021 18:15:58 +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 4GKnfk01RVz4dqQ; Wed, 7 Jul 2021 18:15:58 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 DCDA411E6B; Wed, 7 Jul 2021 18:15:57 +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 167IFvvC007722; Wed, 7 Jul 2021 18:15:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 167IFvon007721; Wed, 7 Jul 2021 18:15:57 GMT (envelope-from git) Date: Wed, 7 Jul 2021 18:15:57 GMT Message-Id: <202107071815.167IFvon007721@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 48b4fe050328 - main - zfs: attach zpool_influxdb to build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48b4fe0503282f03d25e23f44109c5cb6d450f7c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2021 18:15:58 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=48b4fe0503282f03d25e23f44109c5cb6d450f7c commit 48b4fe0503282f03d25e23f44109c5cb6d450f7c Author: Martin Matuska AuthorDate: 2021-07-07 17:45:52 +0000 Commit: Martin Matuska CommitDate: 2021-07-07 18:15:12 +0000 zfs: attach zpool_influxdb to build From the zpool_influxdb.8 manual page: zpool_influxdb produces InfluxDB-line-protocol-compatible metrics from zpools. Like the zpool command, zpool_influxdb reads the current pool status and statistics. Unlike the zpool command which is intended for humans, zpool_influxdb formats the output in the InfluxDB line protocol. The expected use is as a plugin to a metrics collector or aggregator, such as Telegraf. zpool_influxdb is installed into /usr/libexec/zfs/ Differential revision: https://reviews.freebsd.org/D31094 MFC after: 3 days --- cddl/Makefile | 2 +- cddl/usr.libexec/Makefile | 13 +++++++++++ cddl/usr.libexec/zpool_influxdb/Makefile | 28 ++++++++++++++++++++++ cddl/usr.libexec/zpool_influxdb/Makefile.depend | 31 +++++++++++++++++++++++++ etc/mtree/BSD.debug.dist | 2 ++ etc/mtree/BSD.usr.dist | 2 ++ 6 files changed, 77 insertions(+), 1 deletion(-) diff --git a/cddl/Makefile b/cddl/Makefile index 7b9d13146afa..284a370c0167 100644 --- a/cddl/Makefile +++ b/cddl/Makefile @@ -3,7 +3,7 @@ .include SUBDIR= lib .WAIT \ - sbin share usr.bin usr.sbin + sbin share usr.bin usr.libexec usr.sbin SUBDIR.${MK_TESTS}+= tests diff --git a/cddl/usr.libexec/Makefile b/cddl/usr.libexec/Makefile new file mode 100644 index 000000000000..6280cbab5766 --- /dev/null +++ b/cddl/usr.libexec/Makefile @@ -0,0 +1,13 @@ +# $FreeBSD$ + +.include + +SUBDIR= ${_zpool_influxdb} + +.if ${MK_ZFS} != "no" +_zpool_influxdb= zpool_influxdb +.endif + +SUBDIR_PARALLEL= + +.include diff --git a/cddl/usr.libexec/zpool_influxdb/Makefile b/cddl/usr.libexec/zpool_influxdb/Makefile new file mode 100644 index 000000000000..2fb22f02ef32 --- /dev/null +++ b/cddl/usr.libexec/zpool_influxdb/Makefile @@ -0,0 +1,28 @@ +# $FreeBSD$ + +ZFSTOP= ${SRCTOP}/sys/contrib/openzfs + +.PATH: ${ZFSTOP}/cmd/zpool_influxdb +.PATH: ${ZFSTOP}/man/man8 + +PROG= zpool_influxdb +MAN= zpool_influxdb.8 +BINDIR?= /usr/libexec/zfs + +WARNS?= 0 +CSTD= c99 + +CFLAGS+= \ + -DIN_BASE \ + -I${ZFSTOP}/include \ + -I${ZFSTOP}/lib/libspl/include \ + -I${ZFSTOP}/lib/libspl/include/os/freebsd \ + -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \ + -DHAVE_ISSETUGID \ + -include ${SRCTOP}/sys/modules/zfs/zfs_config.h \ + -DSYSCONFDIR=\"/etc\" \ + -DPKGDATADIR=\"/usr/share/zfs\" + +LIBADD= nvpair spl zfs + +.include diff --git a/cddl/usr.libexec/zpool_influxdb/Makefile.depend b/cddl/usr.libexec/zpool_influxdb/Makefile.depend new file mode 100644 index 000000000000..53090da6e2fc --- /dev/null +++ b/cddl/usr.libexec/zpool_influxdb/Makefile.depend @@ -0,0 +1,31 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + cddl/lib/libavl \ + cddl/lib/libnvpair \ + cddl/lib/libumem \ + cddl/lib/libuutil \ + cddl/lib/libzfs \ + cddl/lib/libzfs_core \ + gnu/lib/csu \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libexpat \ + lib/libgeom \ + lib/libmd \ + lib/libsbuf \ + lib/libthr \ + lib/libutil \ + lib/libz \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/etc/mtree/BSD.debug.dist b/etc/mtree/BSD.debug.dist index d377e9fe1f69..551137beefa3 100644 --- a/etc/mtree/BSD.debug.dist +++ b/etc/mtree/BSD.debug.dist @@ -54,6 +54,8 @@ .. sm.bin .. + zfs + .. .. sbin .. diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index b4bac9406f79..97d17cedb5a1 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -156,6 +156,8 @@ .. sm.bin .. + zfs + .. .. local ..