From nobody Mon Sep 16 20:20:32 2024 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 4X6x9s0Gpwz5Wshn; Mon, 16 Sep 2024 20:20: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X6x9r5CJrz40dJ; Mon, 16 Sep 2024 20:20:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726518032; 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=d5fNbN24Deb873+30bl4Nfg8XP9umTP5T4Hl2jHHajs=; b=lqlfx9JM/XzrUMyD4UwzrZqqKPQav82oN/FITdNA1G1OY9mZGeMKgVePlx08MLeQ+LzSor UUnKb+wmGJOvmUxJMpjhYVXmwbHzE8x8CWGNNlfpsM9q3tjzQwELY77U0tjfYkoKS+6t+1 jFYKsjEKfN30nb6tjJCjLL6hSEy7ph1n0uYH/XqcZVf2320dgDvu3l2+9o1NW6EYaV2cjP MqIgO2H+kplU5YysK4n/RqIPvSjzes9bhQUQXfXwR8jxmHqWaBoKYGvR1Wx3IM6v8p3yfp 2w9UdNnvHeienWOoOlaptYVUDbnsbzlwLCCurAzsoeizIj8lUE9WPrZqiyUj5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726518032; a=rsa-sha256; cv=none; b=L3z/L8/6f27TWJl35Ym6cIodAbb/02TafakHsu6w3Bj8T5/t9VEQyBfw6cjfKtkpKIoCds 0oqpXjPHbw6GBRqYDuCL619b+7SPkZ68ox8o3T4SeFAYe4lqu0d3m7rEXHGKxxdIu/pKUR Vta1hgprLPb81JSnr9xnCABzhhCrpiaCuF3crr9+WIBss/msCXHD7Pc1mYVvu40pilyCb0 CfgPPK49ImsznRuoofHFRdYUiRT6O1J9ncujWkxN0I0EPu5OEpuMRbzaPHKyqKSN5fDyZf Aqpa0VyhD8/ZHlAl6z0xb3Zu7X4ZgLnMgVwqCDjL7SU5glDzYjsyCzH5TV/Lbg== 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=1726518032; 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=d5fNbN24Deb873+30bl4Nfg8XP9umTP5T4Hl2jHHajs=; b=J6TQih9R2z6nZWxIDm4Sa/cy76+x6NgwULY4nJrzy27qKIhRIo43SrL0Ai7pzZX6ApUyV8 ggV7cuoFJoNrxAaZa/rF0jaOez2a8IGXqL31g0+tI4G6N/O3peBbS+nGQN/+vhqJVnAF5I xiR140O18/eDIIWZyYcHopgSC23DWmqd/iWmnECb7EyFDrW6OAi3tEOUbtEnT9quYlx4rJ wfEFHHqlY3a1IHltOEbPeSIHDipqDQno6EzEqQ+qp64cd11rTUumlWZ4C7K/gzukVreSSa 5McyxTMvso6M25jODFqzgM0ss7trTU86yVCOEUXbvXHD12QQSyMxADGEuiJ8/g== 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 4X6x9r3S4tz17jh; Mon, 16 Sep 2024 20:20:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48GKKWrs063099; Mon, 16 Sep 2024 20:20:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48GKKWv6063081; Mon, 16 Sep 2024 20:20:32 GMT (envelope-from git) Date: Mon, 16 Sep 2024 20:20:32 GMT Message-Id: <202409162020.48GKKWv6063081@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: 833afe4f6fa6 - main - sysutils/zrepl-dsh2dsh: ZFS dataset replication tool (fork with more features) 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: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 833afe4f6fa662eb9e9ddbcac028a9b4db21879d Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=833afe4f6fa662eb9e9ddbcac028a9b4db21879d commit 833afe4f6fa662eb9e9ddbcac028a9b4db21879d Author: Denis Shaposhnikov AuthorDate: 2024-09-12 10:27:18 +0000 Commit: Robert Clausecker CommitDate: 2024-09-16 20:14:23 +0000 sysutils/zrepl-dsh2dsh: ZFS dataset replication tool (fork with more features) Cross-platform ZFS replication tool written in Go that supports feature detection, bookmarks, and other new features. This is a fork with more features like * support of shell patterns for datasets definitions * new log formatters * ability to log into a file * ability to configure command piplines between `zfs send` and `zfs recv` * Icinga/Nagios checks * fast skip "keep all" pruning * snapshots can be named using local time in timestamps * configurable RPC timeout * configurable path to zfs binary * faster replication and so on. WWW: https://github.com/dsh2dsh/zrepl PR: 251576 --- sysutils/Makefile | 1 + sysutils/zrepl-dsh2dsh/Makefile | 47 +++++++++ sysutils/zrepl-dsh2dsh/distinfo | 5 + sysutils/zrepl-dsh2dsh/files/500.zrepl.in | 41 ++++++++ sysutils/zrepl-dsh2dsh/files/newsyslog.conf | 5 + sysutils/zrepl-dsh2dsh/files/pkg-message.in | 35 +++++++ sysutils/zrepl-dsh2dsh/files/zrepl.in | 80 +++++++++++++++ sysutils/zrepl-dsh2dsh/files/zrepl.yml | 148 ++++++++++++++++++++++++++++ sysutils/zrepl-dsh2dsh/pkg-descr | 17 ++++ sysutils/zrepl-dsh2dsh/pkg-plist | 23 +++++ 10 files changed, 402 insertions(+) diff --git a/sysutils/Makefile b/sysutils/Makefile index a90d99f04fc8..c27a1e74b5fe 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -1719,6 +1719,7 @@ SUBDIR += zpool-iostat-viz SUBDIR += zrep SUBDIR += zrepl + SUBDIR += zrepl-dsh2dsh SUBDIR += zsd SUBDIR += zsm SUBDIR += ztop diff --git a/sysutils/zrepl-dsh2dsh/Makefile b/sysutils/zrepl-dsh2dsh/Makefile new file mode 100644 index 000000000000..c17df694bca6 --- /dev/null +++ b/sysutils/zrepl-dsh2dsh/Makefile @@ -0,0 +1,47 @@ +PORTNAME= zrepl +DISTVERSIONPREFIX= v +DISTVERSION= 0.7.8 +CATEGORIES= sysutils +PKGNAMESUFFIX= -dsh2dsh + +MAINTAINER= dsh@bamus.cz +COMMENT= ZFS dataset replication tool (fork with more features) +WWW= https://github.com/dsh2dsh/${PORTNAME} + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= go:1.22,modules ncurses +USE_RC_SUBR= ${PORTNAME} + +GO_MODULE= github.com/dsh2dsh/${PORTNAME} +GO_BUILDFLAGS= -ldflags "${STRIP} -w -X github.com/dsh2dsh/${PORTNAME}/version.${PORTNAME}Version=${DISTVERSIONFULL}" + +CONFLICTS_INSTALL= ${PORTNAME} + +SUB_FILES= pkg-message 500.${PORTNAME} + +OPTIONS_DEFINE= EXAMPLES + +post-install: + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} \ + ${STAGEDIR}${ETCDIR} \ + ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d \ + ${STAGEDIR}/var/run/${PORTNAME} + ${INSTALL_DATA} ${FILESDIR}/newsyslog.conf \ + ${STAGEDIR}${EXAMPLESDIR}/newsyslog.conf + ${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.yml \ + ${STAGEDIR}${ETCDIR}/${PORTNAME}.yml.sample + ${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/weekly + ${INSTALL_SCRIPT} ${WRKDIR}/500.${PORTNAME} \ + ${STAGEDIR}${PREFIX}/etc/periodic/weekly/500.${PORTNAME} + +post-install-EXAMPLES-on: + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/hooks + (cd ${WRKSRC}/config/samples && \ + ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}) + ${INSTALL_DATA} \ + ${WRKSRC}/dist/grafana/grafana-prometheus-${PORTNAME}.json \ + ${STAGEDIR}${EXAMPLESDIR} + +.include diff --git a/sysutils/zrepl-dsh2dsh/distinfo b/sysutils/zrepl-dsh2dsh/distinfo new file mode 100644 index 000000000000..77e2b6aa4cb4 --- /dev/null +++ b/sysutils/zrepl-dsh2dsh/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1718809873 +SHA256 (go/sysutils_zrepl-dsh2dsh/zrepl-v0.7.8/v0.7.8.mod) = 6de73508b106ec921d08bc908dd74e461a0f3b37040791d3945ce48c11a2acbd +SIZE (go/sysutils_zrepl-dsh2dsh/zrepl-v0.7.8/v0.7.8.mod) = 2984 +SHA256 (go/sysutils_zrepl-dsh2dsh/zrepl-v0.7.8/v0.7.8.zip) = 742801772c8511d8d7f03284520437128a70f8536b9722c9e9990335b6f14d17 +SIZE (go/sysutils_zrepl-dsh2dsh/zrepl-v0.7.8/v0.7.8.zip) = 589396 diff --git a/sysutils/zrepl-dsh2dsh/files/500.zrepl.in b/sysutils/zrepl-dsh2dsh/files/500.zrepl.in new file mode 100644 index 000000000000..b7f1b3abb4d3 --- /dev/null +++ b/sysutils/zrepl-dsh2dsh/files/500.zrepl.in @@ -0,0 +1,41 @@ +#!/bin/sh + +# Check zrepl SSL certificates for impending expiration each week +# +# Add the following lines to /etc/periodic.conf: +# +# weekly_zrepl_enable (bool): Set to "NO" by default +# weekly_zrepl_warntime (int): Set to one month's worth of seconds by default + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +# 30 days in seconds +: ${weekly_zrepl_warntime="2592000"} + +rc=0 +case "$weekly_zrepl_enable" in + [Yy][Ee][Ss]) + echo + echo "Check Zrepl certificates for upcoming expiration:" + + for cert in `/usr/bin/find %%ETCDIR%% -maxdepth 1 -name *.crt`; do + /usr/bin/openssl x509 --in "${cert}" \ + -checkend "${weekly_zrepl_warntime}" + + if [ $? -gt 0 ]; then + echo "${cert} will expire soon" + /usr/bin/openssl x509 --in "${cert}" -noout -enddate + rc=3 + fi + done + ;; + *) rc=0;; +esac + +exit $rc diff --git a/sysutils/zrepl-dsh2dsh/files/newsyslog.conf b/sysutils/zrepl-dsh2dsh/files/newsyslog.conf new file mode 100644 index 000000000000..82bb8667cdd7 --- /dev/null +++ b/sysutils/zrepl-dsh2dsh/files/newsyslog.conf @@ -0,0 +1,5 @@ +# Newsyslog configuration file for zrepl. +# See newsyslog.conf(5) for details. +# +# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] +/var/log/zrepl.log 644 7 * 24 JNC diff --git a/sysutils/zrepl-dsh2dsh/files/pkg-message.in b/sysutils/zrepl-dsh2dsh/files/pkg-message.in new file mode 100644 index 000000000000..92f9099f1f50 --- /dev/null +++ b/sysutils/zrepl-dsh2dsh/files/pkg-message.in @@ -0,0 +1,35 @@ +[ +{ type: install + message: <