summaryrefslogtreecommitdiff
path: root/filesystems/zrepl/files
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@FreeBSD.org>2024-09-27 12:48:46 +0200
committerRobert Clausecker <fuz@FreeBSD.org>2024-11-06 16:17:35 +0100
commit6e2da9672f79f44048d597f0f61e4646cdeade9d (patch)
treec92e4b3158e3419e8cec38e00227d08dcdaab3e9 /filesystems/zrepl/files
parentmath/sdpa: speed up build (diff)
filesystems: add new category for file systems and related utilities
The filesystems category houses file systems and file system utilities. It is added mainly to turn the sysutils/fusefs-* pseudo-category into a proper one, but is also useful for the sundry of other file systems related ports found in the tree. Ports that seem like they belong there are moved to the new category. Two ports, sysutils/fusefs-funionfs and sysutils/fusefs-fusepak are not moved as they currently don't fetch and don't have TIMESTAMP set in their distinfo, but that is required to be able to push a rename of the port by the pre-receive hook. Approved by: portmgr (rene) Reviewed by: mat Pull Request: https://github.com/freebsd/freebsd-ports/pull/302 PR: 281988
Diffstat (limited to 'filesystems/zrepl/files')
-rw-r--r--filesystems/zrepl/files/500.zrepl.in41
-rw-r--r--filesystems/zrepl/files/newsyslog.conf5
-rw-r--r--filesystems/zrepl/files/patch-go.mod89
-rw-r--r--filesystems/zrepl/files/patch-go.sum28
-rw-r--r--filesystems/zrepl/files/patch-vendor_modules.txt277
-rw-r--r--filesystems/zrepl/files/pkg-message.in37
-rw-r--r--filesystems/zrepl/files/syslog.conf7
-rw-r--r--filesystems/zrepl/files/zrepl.in80
-rw-r--r--filesystems/zrepl/files/zrepl.yml13
9 files changed, 577 insertions, 0 deletions
diff --git a/filesystems/zrepl/files/500.zrepl.in b/filesystems/zrepl/files/500.zrepl.in
new file mode 100644
index 000000000000..b7f1b3abb4d3
--- /dev/null
+++ b/filesystems/zrepl/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/filesystems/zrepl/files/newsyslog.conf b/filesystems/zrepl/files/newsyslog.conf
new file mode 100644
index 000000000000..647b87247baa
--- /dev/null
+++ b/filesystems/zrepl/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 1000 @T00 JNC
diff --git a/filesystems/zrepl/files/patch-go.mod b/filesystems/zrepl/files/patch-go.mod
new file mode 100644
index 000000000000..abb50a71b69c
--- /dev/null
+++ b/filesystems/zrepl/files/patch-go.mod
@@ -0,0 +1,89 @@
+--- go.mod.orig 2023-03-24 22:49:20 UTC
++++ go.mod
+@@ -1,6 +1,6 @@
+ module github.com/zrepl/zrepl
+
+-go 1.12
++go 1.17
+
+ require (
+ github.com/fatih/color v1.7.0
+@@ -15,37 +15,68 @@ require (
+ github.com/google/uuid v1.1.2
+ github.com/jinzhu/copier v0.0.0-20170922082739-db4671f3a9b8
+ github.com/juju/ratelimit v1.0.1
+- github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect
+ github.com/kr/pretty v0.1.0
+- github.com/leodido/go-urn v1.2.1 // indirect
+ github.com/lib/pq v1.2.0
+- github.com/mattn/go-colorable v0.1.4 // indirect
+ github.com/mattn/go-isatty v0.0.8
+ github.com/montanaflynn/stats v0.5.0
+- github.com/onsi/ginkgo v1.10.2 // indirect
+- github.com/onsi/gomega v1.7.0 // indirect
+ github.com/pkg/errors v0.8.1
+ github.com/pkg/profile v1.2.1
+ github.com/problame/go-netssh v0.0.0-20200601114649-26439f9f0dc5
+ github.com/prometheus/client_golang v1.2.1
+ github.com/prometheus/common v0.7.0
+ github.com/robfig/cron/v3 v3.0.1
+- github.com/sergi/go-diff v1.0.1-0.20180205163309-da645544ed44 // indirect; go1.12 thinks it needs this
+ github.com/spf13/cobra v0.0.2
+ github.com/spf13/pflag v1.0.5
+ github.com/stretchr/testify v1.6.1
+ github.com/willf/bitset v1.1.10
+ github.com/yudai/gojsondiff v0.0.0-20170107030110-7b1b7adf999d
+- github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect; go1.12 thinks it needs this
+- github.com/yudai/pp v2.0.1+incompatible // indirect
+ github.com/zrepl/yaml-config v0.0.0-20191220194647-cbb6b0cf4bdd
+ gitlab.com/tslocum/cview v1.5.3
+ golang.org/x/net v0.0.0-20210119194325-5f4716e94777
+ golang.org/x/sync v0.0.0-20190423024810-112230192c58
+- golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c
++ golang.org/x/sys v0.6.0
+ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135
+- google.golang.org/genproto v0.0.0-20210122163508-8081c04a3579 // indirect
+ google.golang.org/grpc v1.35.0
+ google.golang.org/protobuf v1.25.0
++)
++
++require (
++ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
++ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 // indirect
++ github.com/beorn7/perks v1.0.1 // indirect
++ github.com/cespare/xxhash/v2 v2.1.0 // indirect
++ github.com/davecgh/go-spew v1.1.1 // indirect
++ github.com/ftrvxmtrx/fd v0.0.0-20150925145434-c6d800382fff // indirect
++ github.com/gdamore/encoding v1.0.0 // indirect
++ github.com/go-playground/locales v0.13.0 // indirect
++ github.com/go-playground/universal-translator v0.17.0 // indirect
++ github.com/inconshreveable/mousetrap v1.0.0 // indirect
++ github.com/konsorten/go-windows-terminal-sequences v1.0.1 // indirect
++ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 // indirect
++ github.com/kr/text v0.1.0 // indirect
++ github.com/leodido/go-urn v1.2.1 // indirect
++ github.com/lucasb-eyer/go-colorful v1.0.3 // indirect
++ github.com/mattn/go-colorable v0.1.4 // indirect
++ github.com/mattn/go-runewidth v0.0.10 // indirect
++ github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
++ github.com/onsi/ginkgo v1.10.2 // indirect
++ github.com/onsi/gomega v1.7.0 // indirect
++ github.com/pmezard/go-difflib v1.0.0 // indirect
++ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 // indirect
++ github.com/prometheus/procfs v0.0.5 // indirect
++ github.com/rivo/uniseg v0.2.0 // indirect
++ github.com/sergi/go-diff v1.0.1-0.20180205163309-da645544ed44 // indirect; go1.12 thinks it needs this
++ github.com/sirupsen/logrus v1.4.2 // indirect
++ github.com/theckman/goconstraint v1.11.0 // indirect
++ github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect; go1.12 thinks it needs this
++ github.com/yudai/pp v2.0.1+incompatible // indirect
++ gitlab.com/tslocum/cbind v0.1.4 // indirect
++ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect
++ golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf // indirect
++ golang.org/x/text v0.3.5 // indirect
++ google.golang.org/appengine v1.4.0 // indirect
++ google.golang.org/genproto v0.0.0-20210122163508-8081c04a3579 // indirect
++ gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
+ gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
++ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
+ )
diff --git a/filesystems/zrepl/files/patch-go.sum b/filesystems/zrepl/files/patch-go.sum
new file mode 100644
index 000000000000..7a439ab0bf98
--- /dev/null
+++ b/filesystems/zrepl/files/patch-go.sum
@@ -0,0 +1,28 @@
+--- go.sum.orig 2023-03-24 22:49:23 UTC
++++ go.sum
+@@ -25,7 +25,6 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.202012
+ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+ github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
+ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
+-github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
+ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+ github.com/ftrvxmtrx/fd v0.0.0-20150925145434-c6d800382fff h1:zk1wwii7uXmI0znwU+lqg+wFL9G5+vm5I+9rv2let60=
+ github.com/ftrvxmtrx/fd v0.0.0-20150925145434-c6d800382fff/go.mod h1:yUhRXHewUVJ1k89wHKP68xfzk7kwXUx/DV1nx4EBMbw=
+@@ -92,8 +91,6 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m
+ github.com/juju/ratelimit v1.0.1 h1:+7AIFJVQ0EQgq/K9+0Krm7m530Du7tIz0METWzN0RgY=
+ github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk=
+ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
+-github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 h1:uC1QfSlInpQF+M0ao65imhwqKnz3Q2z/d8PWZRMQvDM=
+-github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k=
+ github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
+ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY=
+@@ -235,6 +232,8 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go
+ golang.org/x/sys v0.0.0-20210113181707-4bcb84eeeb78/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+ golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk=
+ golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
++golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
++golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+ golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf h1:MZ2shdL+ZM/XzY3ZGOnh4Nlpnxz5GSOhOmtHo3iPU6M=
+ golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
diff --git a/filesystems/zrepl/files/patch-vendor_modules.txt b/filesystems/zrepl/files/patch-vendor_modules.txt
new file mode 100644
index 000000000000..90f922b88bf2
--- /dev/null
+++ b/filesystems/zrepl/files/patch-vendor_modules.txt
@@ -0,0 +1,277 @@
+--- vendor/modules.txt.orig 2023-03-24 22:50:20 UTC
++++ vendor/modules.txt
+@@ -1,21 +1,30 @@
+ # github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
++## explicit
+ github.com/alecthomas/template
+ github.com/alecthomas/template/parse
+ # github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4
++## explicit
+ github.com/alecthomas/units
+ # github.com/beorn7/perks v1.0.1
++## explicit; go 1.11
+ github.com/beorn7/perks/quantile
+ # github.com/cespare/xxhash/v2 v2.1.0
++## explicit; go 1.13
+ github.com/cespare/xxhash/v2
+ # github.com/davecgh/go-spew v1.1.1
++## explicit
+ github.com/davecgh/go-spew/spew
+ # github.com/fatih/color v1.7.0
++## explicit
+ github.com/fatih/color
+ # github.com/ftrvxmtrx/fd v0.0.0-20150925145434-c6d800382fff
++## explicit
+ github.com/ftrvxmtrx/fd
+ # github.com/gdamore/encoding v1.0.0
++## explicit; go 1.9
+ github.com/gdamore/encoding
+ # github.com/gdamore/tcell v1.2.0
++## explicit; go 1.12
+ github.com/gdamore/tcell
+ github.com/gdamore/tcell/terminfo
+ github.com/gdamore/tcell/terminfo/a/ansi
+@@ -26,6 +35,7 @@ github.com/gdamore/tcell/terminfo/v/vt102
+ github.com/gdamore/tcell/terminfo/v/vt220
+ github.com/gdamore/tcell/terminfo/x/xterm
+ # github.com/gdamore/tcell/v2 v2.2.0
++## explicit; go 1.12
+ github.com/gdamore/tcell/v2
+ github.com/gdamore/tcell/v2/terminfo
+ github.com/gdamore/tcell/v2/terminfo/a/aixterm
+@@ -65,117 +75,171 @@ github.com/gdamore/tcell/v2/terminfo/x/xterm
+ github.com/gdamore/tcell/v2/terminfo/x/xterm_kitty
+ github.com/gdamore/tcell/v2/terminfo/x/xterm_termite
+ # github.com/gitchander/permutation v0.0.0-20181107151852-9e56b92e9909
++## explicit
+ github.com/gitchander/permutation
+ # github.com/go-logfmt/logfmt v0.4.0
++## explicit
+ github.com/go-logfmt/logfmt
+ # github.com/go-playground/locales v0.13.0
++## explicit; go 1.13
+ github.com/go-playground/locales
+ github.com/go-playground/locales/currency
+ # github.com/go-playground/universal-translator v0.17.0
++## explicit; go 1.13
+ github.com/go-playground/universal-translator
+ # github.com/go-playground/validator v9.31.0+incompatible
++## explicit
+ github.com/go-playground/validator
+ # github.com/go-playground/validator/v10 v10.4.1
++## explicit; go 1.13
+ github.com/go-playground/validator/v10
+ # github.com/go-sql-driver/mysql v1.4.1-0.20190907122137-b2c03bcae3d4
++## explicit
+ github.com/go-sql-driver/mysql
+ # github.com/golang/protobuf v1.4.3
++## explicit; go 1.9
+ github.com/golang/protobuf/proto
+ github.com/golang/protobuf/ptypes
+ github.com/golang/protobuf/ptypes/any
+ github.com/golang/protobuf/ptypes/duration
+ github.com/golang/protobuf/ptypes/timestamp
+ # github.com/google/uuid v1.1.2
++## explicit
+ github.com/google/uuid
+ # github.com/inconshreveable/mousetrap v1.0.0
++## explicit
+ github.com/inconshreveable/mousetrap
+ # github.com/jinzhu/copier v0.0.0-20170922082739-db4671f3a9b8
++## explicit
+ github.com/jinzhu/copier
+ # github.com/juju/ratelimit v1.0.1
++## explicit
+ github.com/juju/ratelimit
+ # github.com/konsorten/go-windows-terminal-sequences v1.0.1
++## explicit
+ github.com/konsorten/go-windows-terminal-sequences
+ # github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515
++## explicit
+ github.com/kr/logfmt
+ # github.com/kr/pretty v0.1.0
++## explicit
+ github.com/kr/pretty
+ # github.com/kr/text v0.1.0
++## explicit
+ github.com/kr/text
+ # github.com/leodido/go-urn v1.2.1
++## explicit; go 1.13
+ github.com/leodido/go-urn
+ # github.com/lib/pq v1.2.0
++## explicit
+ github.com/lib/pq
+ github.com/lib/pq/oid
+ github.com/lib/pq/scram
+ # github.com/lucasb-eyer/go-colorful v1.0.3
++## explicit; go 1.12
+ github.com/lucasb-eyer/go-colorful
+ # github.com/mattn/go-colorable v0.1.4
++## explicit
+ github.com/mattn/go-colorable
+ # github.com/mattn/go-isatty v0.0.8
++## explicit
+ github.com/mattn/go-isatty
+ # github.com/mattn/go-runewidth v0.0.10
++## explicit; go 1.9
+ github.com/mattn/go-runewidth
+ # github.com/matttproud/golang_protobuf_extensions v1.0.1
++## explicit
+ github.com/matttproud/golang_protobuf_extensions/pbutil
+ # github.com/montanaflynn/stats v0.5.0
++## explicit
+ github.com/montanaflynn/stats
++# github.com/onsi/ginkgo v1.10.2
++## explicit
++# github.com/onsi/gomega v1.7.0
++## explicit
+ # github.com/pkg/errors v0.8.1
++## explicit
+ github.com/pkg/errors
+ # github.com/pkg/profile v1.2.1
++## explicit
+ github.com/pkg/profile
+ # github.com/pmezard/go-difflib v1.0.0
++## explicit
+ github.com/pmezard/go-difflib/difflib
+ # github.com/problame/go-netssh v0.0.0-20200601114649-26439f9f0dc5
++## explicit; go 1.11
+ github.com/problame/go-netssh
+ github.com/problame/go-netssh/internal/circlog
+ # github.com/prometheus/client_golang v1.2.1
++## explicit; go 1.11
+ github.com/prometheus/client_golang/prometheus
+ github.com/prometheus/client_golang/prometheus/internal
+ github.com/prometheus/client_golang/prometheus/promhttp
+ # github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4
++## explicit; go 1.9
+ github.com/prometheus/client_model/go
+ # github.com/prometheus/common v0.7.0
++## explicit; go 1.11
+ github.com/prometheus/common/expfmt
+ github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg
+ github.com/prometheus/common/log
+ github.com/prometheus/common/model
+ # github.com/prometheus/procfs v0.0.5
++## explicit
+ github.com/prometheus/procfs
+ github.com/prometheus/procfs/internal/fs
+ github.com/prometheus/procfs/internal/util
+ # github.com/rivo/uniseg v0.2.0
++## explicit; go 1.12
+ github.com/rivo/uniseg
+ # github.com/robfig/cron/v3 v3.0.1
++## explicit; go 1.12
+ github.com/robfig/cron/v3
+ # github.com/sergi/go-diff v1.0.1-0.20180205163309-da645544ed44
++## explicit
+ github.com/sergi/go-diff/diffmatchpatch
+ # github.com/sirupsen/logrus v1.4.2
++## explicit
+ github.com/sirupsen/logrus
+ # github.com/spf13/cobra v0.0.2
++## explicit
+ github.com/spf13/cobra
+ # github.com/spf13/pflag v1.0.5
++## explicit; go 1.12
+ github.com/spf13/pflag
+ # github.com/stretchr/testify v1.6.1
++## explicit; go 1.13
+ github.com/stretchr/testify/assert
+ github.com/stretchr/testify/require
+ # github.com/theckman/goconstraint v1.11.0
++## explicit
+ github.com/theckman/goconstraint/go1.11/gte
+ # github.com/willf/bitset v1.1.10
++## explicit
+ github.com/willf/bitset
+ # github.com/yudai/gojsondiff v0.0.0-20170107030110-7b1b7adf999d
++## explicit
+ github.com/yudai/gojsondiff
+ github.com/yudai/gojsondiff/formatter
+ # github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82
++## explicit
+ github.com/yudai/golcs
++# github.com/yudai/pp v2.0.1+incompatible
++## explicit
+ # github.com/zrepl/yaml-config v0.0.0-20191220194647-cbb6b0cf4bdd
++## explicit
+ github.com/zrepl/yaml-config
+ # gitlab.com/tslocum/cbind v0.1.4
++## explicit; go 1.15
+ gitlab.com/tslocum/cbind
+ # gitlab.com/tslocum/cview v1.5.3
++## explicit; go 1.12
+ gitlab.com/tslocum/cview
+ # golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
++## explicit; go 1.11
+ golang.org/x/crypto/sha3
+ # golang.org/x/net v0.0.0-20210119194325-5f4716e94777
++## explicit; go 1.11
+ golang.org/x/net/http/httpguts
+ golang.org/x/net/http2
+ golang.org/x/net/http2/hpack
+@@ -184,8 +248,10 @@ golang.org/x/net/internal/timeseries
+ golang.org/x/net/trace
+ golang.org/x/net/websocket
+ # golang.org/x/sync v0.0.0-20190423024810-112230192c58
++## explicit
+ golang.org/x/sync/semaphore
+-# golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c
++# golang.org/x/sys v0.6.0
++## explicit; go 1.17
+ golang.org/x/sys/cpu
+ golang.org/x/sys/internal/unsafeheader
+ golang.org/x/sys/plan9
+@@ -194,8 +260,10 @@ golang.org/x/sys/windows
+ golang.org/x/sys/windows/registry
+ golang.org/x/sys/windows/svc/eventlog
+ # golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf
++## explicit; go 1.11
+ golang.org/x/term
+ # golang.org/x/text v0.3.5
++## explicit; go 1.11
+ golang.org/x/text/encoding
+ golang.org/x/text/encoding/internal/identifier
+ golang.org/x/text/secure/bidirule
+@@ -203,6 +271,7 @@ golang.org/x/text/transform
+ golang.org/x/text/unicode/bidi
+ golang.org/x/text/unicode/norm
+ # golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135
++## explicit
+ golang.org/x/tools/go/gcexportdata
+ golang.org/x/tools/go/internal/gcimporter
+ golang.org/x/tools/go/internal/packagesdriver
+@@ -211,10 +280,13 @@ golang.org/x/tools/internal/fastwalk
+ golang.org/x/tools/internal/gopathwalk
+ golang.org/x/tools/internal/semver
+ # google.golang.org/appengine v1.4.0
++## explicit
+ google.golang.org/appengine/cloudsql
+ # google.golang.org/genproto v0.0.0-20210122163508-8081c04a3579
++## explicit; go 1.11
+ google.golang.org/genproto/googleapis/rpc/status
+ # google.golang.org/grpc v1.35.0
++## explicit; go 1.11
+ google.golang.org/grpc
+ google.golang.org/grpc/attributes
+ google.golang.org/grpc/backoff
+@@ -260,6 +332,7 @@ google.golang.org/grpc/stats
+ google.golang.org/grpc/status
+ google.golang.org/grpc/tap
+ # google.golang.org/protobuf v1.25.0
++## explicit; go 1.9
+ google.golang.org/protobuf/encoding/prototext
+ google.golang.org/protobuf/encoding/protowire
+ google.golang.org/protobuf/internal/descfmt
+@@ -290,6 +363,10 @@ google.golang.org/protobuf/types/known/anypb
+ google.golang.org/protobuf/types/known/durationpb
+ google.golang.org/protobuf/types/known/timestamppb
+ # gopkg.in/alecthomas/kingpin.v2 v2.2.6
++## explicit
+ gopkg.in/alecthomas/kingpin.v2
++# gopkg.in/go-playground/assert.v1 v1.2.1
++## explicit
+ # gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
++## explicit
+ gopkg.in/yaml.v3
diff --git a/filesystems/zrepl/files/pkg-message.in b/filesystems/zrepl/files/pkg-message.in
new file mode 100644
index 000000000000..b210277014d0
--- /dev/null
+++ b/filesystems/zrepl/files/pkg-message.in
@@ -0,0 +1,37 @@
+[
+{ type: install
+ message: <<EOM
+Messages from filesystems/zrepl:
+
+SETUP BEFORE FIRST USE:
+- Create the log file /var/log/zrepl.log:
+ # service newsyslog restart
+- Teach syslogd to redirect facility local0 to the zrepl.log file:
+ # service syslogd reload
+- Modify the %%PREFIX%%/etc/zrepl/zrepl.yml configuration file
+- For remote backups, create the SSH key pair and authorized_keys file
+- Enable the zrepl daemon to start automatically at boot:
+ # sysrc zrepl_enable="YES"
+- Start the zrepl daemon:
+ # service zrepl start
+
+Documentation: https://zrepl.github.io/
+Changelog: https://zrepl.github.io/master/changelog.html
+
+DANGER - SNAPSHOT PRUNING REQUIRES EXPLICIT KEEP RULES:
+For any ZFS snapshot that you want to keep, at least one rule must match.
+This also applies to snapshots taken by means other than zrepl
+(e.g. snapshots taken manually or via boot environment tools).
+
+In order to automatically warn the operator of impending certificate
+expiration, add this line to /etc/periodic.conf:
+
+ weekly_zrepl_enable="YES"
+
+More config details in the zrepl periodic script:
+
+ %%LOCALBASE%%/etc/periodic/weekly/500.zrepl
+
+EOM
+}
+]
diff --git a/filesystems/zrepl/files/syslog.conf b/filesystems/zrepl/files/syslog.conf
new file mode 100644
index 000000000000..c825c409d5a6
--- /dev/null
+++ b/filesystems/zrepl/files/syslog.conf
@@ -0,0 +1,7 @@
+# Syslog configuration file for zrepl.
+# See syslog.conf(5) for details.
+#
+# SELECTOR ACTION
+# FACILITY.[!<=>]LEVEL
+!zrepl
+local0.info /var/log/zrepl.log
diff --git a/filesystems/zrepl/files/zrepl.in b/filesystems/zrepl/files/zrepl.in
new file mode 100644
index 000000000000..6a2510f80572
--- /dev/null
+++ b/filesystems/zrepl/files/zrepl.in
@@ -0,0 +1,80 @@
+#!/bin/sh
+
+# PROVIDE: zrepl
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# zrepl_enable (bool): Set to YES to enable the zrepl service.
+# Default: NO
+# zrepl_config (str): File containing zrepl configuration details.
+# Default: %%PREFIX%%/etc/zrepl/zrepl.yml
+# zrepl_user (str): The user account used to run the zrepl daemon.
+# Do not specifically set this to an empty string as this
+# will cause the daemon to run as root.
+# Default: root
+# zrepl_group (str): The group account used to run the zrepl daemon.
+# Do not specifically set this to an empty string as this
+# will cause the daemon to run with group wheel.
+# Default: wheel
+# zrepl_flags (str): Extra flags passed to zrepl
+# Default: ""
+# zrepl_facility (str): Syslog facility to use
+# Default: local0
+# zrepl_priority (str): Syslog priority to use
+# Default: alert
+
+. /etc/rc.subr
+name=zrepl
+rcvar=${name}_enable
+load_rc_config $name
+
+: ${zrepl_enable:="NO"}
+: ${zrepl_config:="%%PREFIX%%/etc/zrepl/zrepl.yml"}
+: ${zrepl_user:="root"}
+: ${zrepl_group:="wheel"}
+: ${zrepl_flags:=""}
+: ${zrepl_facility:="local0"}
+: ${zrepl_priority:="alert"}
+: ${zrepl_options:="${zrepl_flags} --config ${zrepl_config}"}
+
+pidfile="/var/run/zrepl.pid"
+command="/usr/sbin/daemon"
+procname="%%PREFIX%%/bin/zrepl"
+command_args="-p ${pidfile} -S -l ${zrepl_facility} -s ${zrepl_priority} -T ${name} \
+ ${procname} ${zrepl_options} daemon"
+
+start_precmd="zrepl_precmd"
+stop_postcmd="zrepl_postcmd"
+restart_precmd="zrepl_checkconfig"
+configtest_cmd="zrepl_checkconfig"
+extra_commands="configtest"
+
+zrepl_precmd()
+{
+ if [ ! -d "/var/run/zrepl/stdinserver" ]; then
+ install -d -g ${zrepl_group} -o ${zrepl_user} -m 0700 -- "/var/run/zrepl";
+ install -d -g ${zrepl_group} -o ${zrepl_user} -m 0700 -- "/var/run/zrepl/stdinserver";
+ fi
+
+ if [ ! -e "${pidfile}" ]; then
+ install -g ${zrepl_group} -o ${zrepl_user} -- /dev/null "${pidfile}";
+ fi
+
+ zrepl_checkconfig
+}
+
+zrepl_postcmd()
+{
+ rm -f -- "${pidfile}"
+}
+
+zrepl_checkconfig()
+{
+ echo "Performing sanity check on zrepl configuration:"
+ eval ${procname} ${zrepl_options} configcheck
+}
+
+run_rc_command "$1"
diff --git a/filesystems/zrepl/files/zrepl.yml b/filesystems/zrepl/files/zrepl.yml
new file mode 100644
index 000000000000..94e924c4eb7e
--- /dev/null
+++ b/filesystems/zrepl/files/zrepl.yml
@@ -0,0 +1,13 @@
+# zrepl main configuration file.
+# For documentation, refer to https://zrepl.github.io/
+#
+global:
+ logging:
+ - type: "stdout"
+ level: "error"
+ format: "human"
+ - type: "syslog"
+ level: "info"
+ format: "logfmt"
+
+# Add "jobs:" section(s) here for your specific use cases.