git: 64037c225e86 - main - sysutils/zrepl-dsh2dsh: update to 0.8.4
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 06 Oct 2024 11:50:06 UTC
The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=64037c225e866017a8a382493a62862941c6416c commit 64037c225e866017a8a382493a62862941c6416c Author: Denis Shaposhnikov <993498+dsh2dsh@users.noreply.github.com> AuthorDate: 2024-10-01 14:38:25 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2024-10-06 11:49:18 +0000 sysutils/zrepl-dsh2dsh: update to 0.8.4 Changelog: https://github.com/dsh2dsh/zrepl/releases/tag/v0.8.4 Add periodic daily script. PR: 281797 --- sysutils/zrepl-dsh2dsh/Makefile | 10 ++++++---- sysutils/zrepl-dsh2dsh/distinfo | 10 +++++----- sysutils/zrepl-dsh2dsh/files/pkg-message.in | 3 +++ sysutils/zrepl-dsh2dsh/files/zrepl.daily.in | 27 +++++++++++++++++++++++++++ sysutils/zrepl-dsh2dsh/files/zrepl.yml | 17 ++++++++++++++++- sysutils/zrepl-dsh2dsh/pkg-plist | 1 + 6 files changed, 58 insertions(+), 10 deletions(-) diff --git a/sysutils/zrepl-dsh2dsh/Makefile b/sysutils/zrepl-dsh2dsh/Makefile index b299d4a4ec61..a390e0b354fe 100644 --- a/sysutils/zrepl-dsh2dsh/Makefile +++ b/sysutils/zrepl-dsh2dsh/Makefile @@ -1,7 +1,6 @@ PORTNAME= zrepl DISTVERSIONPREFIX= v -DISTVERSION= 0.8.3 -PORTREVISION= 1 +DISTVERSION= 0.8.4 CATEGORIES= sysutils PKGNAMESUFFIX= -dsh2dsh @@ -20,7 +19,7 @@ GO_BUILDFLAGS= -ldflags "${STRIP} -w -X github.com/dsh2dsh/${PORTNAME}/version.$ CONFLICTS_INSTALL= ${PORTNAME} -SUB_FILES= pkg-message 500.${PORTNAME} +SUB_FILES= pkg-message 500.${PORTNAME} ${PORTNAME}.daily OPTIONS_DEFINE= EXAMPLES @@ -32,7 +31,10 @@ post-install: ${STAGEDIR}${EXAMPLESDIR}/newsyslog.conf ${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.yml \ ${STAGEDIR}${ETCDIR}/${PORTNAME}.yml.sample - ${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/weekly + ${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily \ + ${STAGEDIR}${PREFIX}/etc/periodic/weekly + ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.daily \ + ${STAGEDIR}${PREFIX}/etc/periodic/daily/${PORTNAME} ${INSTALL_SCRIPT} ${WRKDIR}/500.${PORTNAME} \ ${STAGEDIR}${PREFIX}/etc/periodic/weekly/500.${PORTNAME} diff --git a/sysutils/zrepl-dsh2dsh/distinfo b/sysutils/zrepl-dsh2dsh/distinfo index ed630c91e26f..ca1e66007623 100644 --- a/sysutils/zrepl-dsh2dsh/distinfo +++ b/sysutils/zrepl-dsh2dsh/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1726766984 -SHA256 (go/sysutils_zrepl-dsh2dsh/zrepl-v0.8.3/v0.8.3.mod) = 6d039a394e4025517e66e4f016d60b5299d1541dca23913e1a8fa96bbedece12 -SIZE (go/sysutils_zrepl-dsh2dsh/zrepl-v0.8.3/v0.8.3.mod) = 3638 -SHA256 (go/sysutils_zrepl-dsh2dsh/zrepl-v0.8.3/v0.8.3.zip) = ba1ec6e71bb449d6e01b477387cbb003c55cb66f7820f141ce4135f862a9776c -SIZE (go/sysutils_zrepl-dsh2dsh/zrepl-v0.8.3/v0.8.3.zip) = 602193 +TIMESTAMP = 1727718613 +SHA256 (go/sysutils_zrepl-dsh2dsh/zrepl-v0.8.4/v0.8.4.mod) = 6d039a394e4025517e66e4f016d60b5299d1541dca23913e1a8fa96bbedece12 +SIZE (go/sysutils_zrepl-dsh2dsh/zrepl-v0.8.4/v0.8.4.mod) = 3638 +SHA256 (go/sysutils_zrepl-dsh2dsh/zrepl-v0.8.4/v0.8.4.zip) = f4a6f71ae6711e8307f4d1bb2a53e653b11ed3389c879597800a331db674fd39 +SIZE (go/sysutils_zrepl-dsh2dsh/zrepl-v0.8.4/v0.8.4.zip) = 605289 diff --git a/sysutils/zrepl-dsh2dsh/files/pkg-message.in b/sysutils/zrepl-dsh2dsh/files/pkg-message.in index 92f9099f1f50..c8dc1af29cda 100644 --- a/sysutils/zrepl-dsh2dsh/files/pkg-message.in +++ b/sysutils/zrepl-dsh2dsh/files/pkg-message.in @@ -7,6 +7,9 @@ SETUP BEFORE FIRST USE: - Create the log file /var/log/zrepl.log: # service newsyslog restart - Modify the %%PREFIX%%/etc/zrepl/zrepl.yml configuration file +- Create ZFS datasets like: + # zfs create -o mountpoint=none -o readonly=on zdisk/zrepl + # zfs create zdisk/zrepl/localhost - Enable the zrepl daemon to start automatically at boot: # sysrc zrepl_enable="YES" - Start the zrepl daemon: diff --git a/sysutils/zrepl-dsh2dsh/files/zrepl.daily.in b/sysutils/zrepl-dsh2dsh/files/zrepl.daily.in new file mode 100644 index 000000000000..03b663264090 --- /dev/null +++ b/sysutils/zrepl-dsh2dsh/files/zrepl.daily.in @@ -0,0 +1,27 @@ +#!/bin/sh + +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +: "${daily_zrepl_enable=NO}" +: "${daily_zrepl_warn=15m}" +: "${daily_zrepl_crit=1h}" +zrepl="%%PREFIX%%/bin/zrepl" + +case "$daily_zrepl_enable" in + [Yy][Ee][Ss]) + if service zrepl enabled; then + echo + echo "Check zrepl status:" + $zrepl monitor alive -w "$daily_zrepl_warn" -c "$daily_zrepl_crit" + $zrepl monitor snapshots + fi + ;; +esac + +# assigned in periodic.conf +# shellcheck disable=SC2086,SC2154 +exit $rc diff --git a/sysutils/zrepl-dsh2dsh/files/zrepl.yml b/sysutils/zrepl-dsh2dsh/files/zrepl.yml index 048f5d58b1a5..c52b4e016317 100644 --- a/sysutils/zrepl-dsh2dsh/files/zrepl.yml +++ b/sysutils/zrepl-dsh2dsh/files/zrepl.yml @@ -60,6 +60,22 @@ jobs: placeholder: encryption: "inherit" monitor: &monitor-snapshots + count: + - prefix: "zrepl_frequently_" + warning: 18 + critical: 30 + - prefix: "zrepl_hourly_" + warning: 32 + critical: 50 + - prefix: "zrepl_daily_" + warning: 92 + critical: 100 + - prefix: "zrepl_monthly_" + warning: 14 + critical: 15 + - prefix: "" # everything else + warning: 2 + critical: 10 latest: - prefix: "zrepl_frequently_" critical: "48h" # 2d @@ -94,7 +110,6 @@ jobs: # them one by one. #one_step: true concurrency: - steps: 4 size_estimates: 8 conflict_resolution: &conflict_resolution initial_replication: "all" diff --git a/sysutils/zrepl-dsh2dsh/pkg-plist b/sysutils/zrepl-dsh2dsh/pkg-plist index 7f2c52e6e5f6..fcb072f2a996 100644 --- a/sysutils/zrepl-dsh2dsh/pkg-plist +++ b/sysutils/zrepl-dsh2dsh/pkg-plist @@ -1,4 +1,5 @@ bin/zrepl +etc/periodic/daily/zrepl etc/periodic/weekly/500.zrepl @sample %%ETCDIR%%/zrepl.yml.sample %%PORTEXAMPLES%%%%EXAMPLESDIR%%/bandwidth_limit.yml