summaryrefslogtreecommitdiff
path: root/filesystems/zfs-periodic
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/zfs-periodic
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/zfs-periodic')
-rw-r--r--filesystems/zfs-periodic/Makefile43
-rw-r--r--filesystems/zfs-periodic/distinfo3
-rw-r--r--filesystems/zfs-periodic/pkg-descr2
-rw-r--r--filesystems/zfs-periodic/pkg-message30
4 files changed, 78 insertions, 0 deletions
diff --git a/filesystems/zfs-periodic/Makefile b/filesystems/zfs-periodic/Makefile
new file mode 100644
index 000000000000..33b3525a8c5b
--- /dev/null
+++ b/filesystems/zfs-periodic/Makefile
@@ -0,0 +1,43 @@
+PORTNAME= zfs-periodic
+PORTVERSION= 1.0.20130213
+CATEGORIES= filesystems sysutils
+
+MAINTAINER= peter@pean.org
+COMMENT= Simple way of maintaining zfs snapshots using the periodic system
+WWW= https://github.com/ross/zfs-periodic
+
+USE_GITHUB= yes
+GH_ACCOUNT= ross
+GH_TAGNAME= a481121
+
+NO_ARCH= yes
+NO_BUILD= yes
+
+PERIODIC_DIRS= etc/periodic/hourly etc/periodic/daily \
+ etc/periodic/weekly etc/periodic/monthly \
+ etc/periodic
+
+PERIODIC_FILES= etc/periodic/hourly/000.zfs-snapshot \
+ etc/periodic/daily/000.zfs-snapshot \
+ etc/periodic/weekly/000.zfs-snapshot \
+ etc/periodic/monthly/000.zfs-snapshot
+
+PLIST_FILES= ${PERIODIC_FILES} bin/zfs-snapshot
+
+post-patch:
+.for _file in ${PERIODIC_FILES}
+ @${REINPLACE_CMD} -e "s|/etc/periodic/zfs-snapshot|${PREFIX}/bin/zfs-snapshot|" \
+ ${WRKSRC}/${_file}
+.endfor
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/etc/periodic/zfs-snapshot ${STAGEDIR}${PREFIX}/bin
+.for _dir in ${PERIODIC_DIRS}
+ @${MKDIR} ${STAGEDIR}${PREFIX}/${_dir}
+.endfor
+
+.for _file in ${PERIODIC_FILES}
+ ${INSTALL_SCRIPT} ${WRKSRC}/${_file} ${STAGEDIR}${PREFIX}/${_file}
+.endfor
+
+.include <bsd.port.mk>
diff --git a/filesystems/zfs-periodic/distinfo b/filesystems/zfs-periodic/distinfo
new file mode 100644
index 000000000000..6dc4d093226b
--- /dev/null
+++ b/filesystems/zfs-periodic/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1730905184
+SHA256 (ross-zfs-periodic-1.0.20130213-a481121_GH0.tar.gz) = e0d12bb3ff466e3aaabd09c2b9685b5e5ee5f91e0d62126c05ba33c60a7b9a9b
+SIZE (ross-zfs-periodic-1.0.20130213-a481121_GH0.tar.gz) = 2527
diff --git a/filesystems/zfs-periodic/pkg-descr b/filesystems/zfs-periodic/pkg-descr
new file mode 100644
index 000000000000..29e40518d2ff
--- /dev/null
+++ b/filesystems/zfs-periodic/pkg-descr
@@ -0,0 +1,2 @@
+Scripts that uses the periodic system to create and manage zfs
+snapshots. Easily configured via /etc/periodic.conf
diff --git a/filesystems/zfs-periodic/pkg-message b/filesystems/zfs-periodic/pkg-message
new file mode 100644
index 000000000000..010d2e7d1ce1
--- /dev/null
+++ b/filesystems/zfs-periodic/pkg-message
@@ -0,0 +1,30 @@
+[
+{ type: install
+ message: <<EOM
+In order to enable periodic snapshots you need
+to add these lines to your /etc/periodic.conf
+
+hourly_output="root"
+hourly_show_success="NO"
+hourly_show_info="YES"
+hourly_show_badconfig="NO"
+hourly_zfs_snapshot_enable="YES"
+hourly_zfs_snapshot_pools="tank"
+hourly_zfs_snapshot_keep=6
+daily_zfs_snapshot_enable="YES"
+daily_zfs_snapshot_pools="tank"
+daily_zfs_snapshot_keep=7
+weekly_zfs_snapshot_enable="YES"
+weekly_zfs_snapshot_pools="tank"
+weekly_zfs_snapshot_keep=5
+monthly_zfs_snapshot_enable="YES"
+monthly_zfs_snapshot_pools="tank"
+monthly_zfs_snapshot_keep=2
+
+To get hourly snapshots you also need to add
+something like this to /etc/crontab:
+
+2 * * * * root periodic hourly
+EOM
+}
+]