aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/freebsd-snapshot
diff options
context:
space:
mode:
authormnag <mnag@FreeBSD.org>2005-09-24 04:16:31 +0800
committermnag <mnag@FreeBSD.org>2005-09-24 04:16:31 +0800
commite588eb43fe78a2e77894f60fb0decd85215bc1bb (patch)
tree322895c84a4767e6a36989aabf629537dc4c0d80 /sysutils/freebsd-snapshot
parentaf0f1a6441dce192baf749129e53ce5e7dfe30d2 (diff)
downloadfreebsd-ports-gnome-e588eb43fe78a2e77894f60fb0decd85215bc1bb.tar.gz
freebsd-ports-gnome-e588eb43fe78a2e77894f60fb0decd85215bc1bb.tar.zst
freebsd-ports-gnome-e588eb43fe78a2e77894f60fb0decd85215bc1bb.zip
New port
"UFS2 snapshot utilities by Ralf S. Engelschall" PR: ports/86144 Submitted by: Graham Todd <gtodd@bellanet.org> Approved by: pav (mentor)
Diffstat (limited to 'sysutils/freebsd-snapshot')
-rw-r--r--sysutils/freebsd-snapshot/Makefile49
-rw-r--r--sysutils/freebsd-snapshot/distinfo2
-rw-r--r--sysutils/freebsd-snapshot/files/patch-amd.map.snap11
-rw-r--r--sysutils/freebsd-snapshot/files/patch-snapshot25
-rw-r--r--sysutils/freebsd-snapshot/files/patch-snapshot.827
-rw-r--r--sysutils/freebsd-snapshot/files/pkg-deinstall.in16
-rw-r--r--sysutils/freebsd-snapshot/files/pkg-message.in24
-rw-r--r--sysutils/freebsd-snapshot/pkg-descr6
8 files changed, 160 insertions, 0 deletions
diff --git a/sysutils/freebsd-snapshot/Makefile b/sysutils/freebsd-snapshot/Makefile
new file mode 100644
index 000000000000..7fb122ce6a22
--- /dev/null
+++ b/sysutils/freebsd-snapshot/Makefile
@@ -0,0 +1,49 @@
+# New ports collection makefile for: freebsd-snapshot
+# Date created: 2005-09-07
+# Whom: gtodd@bellanet.org
+#
+# $FreeBSD$
+#
+
+PORTNAME= freebsd-snapshot
+DISTVERSION= 20050402.1
+CATEGORIES= sysutils
+MASTER_SITES= http://people.freebsd.org/~rse/dist/
+
+MAINTAINER= gtodd@bellanet.org
+COMMENT= UFS2 snapshot utilities by Ralf S. Engelschall
+
+USE_REINPLACE= yes
+NO_BUILD= yes
+
+MAN8= snapshot.8 periodic-snapshot.8
+
+PLIST_FILES= sbin/snapshot \
+ sbin/periodic-snapshot \
+ etc/amd.map.snap
+
+SUB_FILES= pkg-message pkg-deinstall
+PKGMESSAGE= ${WRKDIR}/pkg-message
+PKGDEINSTALLL= ${WRKDIR}/pkg-deinstall
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500000
+IGNORE= FreeBSD lower then 5.x doesn't support snapshot
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" \
+ ${WRKSRC}/amd.map.snap ${WRKSRC}/snapshot ${WRKSRC}/snapshot.8
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/snapshot ${PREFIX}/sbin/
+ ${INSTALL_SCRIPT} ${WRKSRC}/periodic-snapshot ${PREFIX}/sbin/
+ ${INSTALL_MAN} ${WRKSRC}/snapshot.8 ${PREFIX}/man/man8/
+ ${INSTALL_MAN} ${WRKSRC}/periodic-snapshot.8 ${PREFIX}/man/man8/
+ ${INSTALL_DATA} ${WRKSRC}/amd.map.snap ${PREFIX}/etc/
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/sysutils/freebsd-snapshot/distinfo b/sysutils/freebsd-snapshot/distinfo
new file mode 100644
index 000000000000..489c96fc3808
--- /dev/null
+++ b/sysutils/freebsd-snapshot/distinfo
@@ -0,0 +1,2 @@
+MD5 (freebsd-snapshot-20050402.1.tar.gz) = 54ae93e0b3073bcd616a47de4543dc77
+SIZE (freebsd-snapshot-20050402.1.tar.gz) = 14622
diff --git a/sysutils/freebsd-snapshot/files/patch-amd.map.snap b/sysutils/freebsd-snapshot/files/patch-amd.map.snap
new file mode 100644
index 000000000000..48624f1b3764
--- /dev/null
+++ b/sysutils/freebsd-snapshot/files/patch-amd.map.snap
@@ -0,0 +1,11 @@
+--- amd.map.snap.orig Wed Sep 7 23:13:55 2005
++++ amd.map.snap Wed Sep 7 23:14:14 2005
+@@ -3,6 +3,6 @@
+ #
+
+ /defaults type:=program
+-* mount:="/usr/sbin/snapshot snapshot mount /${key} ${fs}";\
+- unmount:="/usr/sbin/snapshot snapshot umount ${fs}"
++* mount:="%%PREFIX%%/sbin/snapshot snapshot mount /${key} ${fs}";\
++ unmount:="%%PREFIX%%/sbin/snapshot snapshot umount ${fs}"
+
diff --git a/sysutils/freebsd-snapshot/files/patch-snapshot b/sysutils/freebsd-snapshot/files/patch-snapshot
new file mode 100644
index 000000000000..ce8426748bc8
--- /dev/null
+++ b/sysutils/freebsd-snapshot/files/patch-snapshot
@@ -0,0 +1,25 @@
+--- snapshot.orig Thu Sep 15 17:44:46 2005
++++ snapshot Thu Sep 15 17:47:59 2005
+@@ -29,7 +29,7 @@
+ ##
+
+ # make sure system tools are used first
+-PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH"
++PATH="/bin:/usr/bin:/sbin:/usr/sbin:%%PREFIX%%/sbin:$PATH"
+
+ # option defaults
+ fs_subdir=".snap"
+
+
+cat files/patch-periodic-snapshot
+--- periodic-snapshot.orig Thu Sep 15 17:44:57 2005
++++ periodic-snapshot Thu Sep 15 17:46:31 2005
+@@ -29,7 +29,7 @@
+ ##
+
+ # make sure system tools are used first
+-PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH"
++PATH="/bin:/usr/bin:/sbin:/usr/sbin:%%PREFIX%%/sbin:$PATH"
+
+ # configuration defaults
+ snapshot_enable="NO"
diff --git a/sysutils/freebsd-snapshot/files/patch-snapshot.8 b/sysutils/freebsd-snapshot/files/patch-snapshot.8
new file mode 100644
index 000000000000..629036dc7201
--- /dev/null
+++ b/sysutils/freebsd-snapshot/files/patch-snapshot.8
@@ -0,0 +1,27 @@
+--- snapshot.8.orig Thu Sep 8 21:28:06 2005
++++ snapshot.8 Thu Sep 8 21:29:26 2005
+@@ -219,12 +219,12 @@
+ By using an
+ .Xr amd 8
+ map
+-.Pa /etc/amd.map.snap
++.Pa %%PREFIX%%/etc/amd.map.snap
+ containing
+ .Bd -literal -offset indent
+ /defaults type:=program
+-* mount:="/usr/sbin/snapshot snapshot mount /${key} ${fs}";\\
+- unmount:="/usr/sbin/snapshot snapshot umount ${fs}"
++* mount:="%%PREFIX%%/sbin/snapshot snapshot mount /${key} ${fs}";\\
++ unmount:="%%PREFIX%%/sbin/snapshot snapshot umount ${fs}"
+ .Ed
+ .Pp
+ and a
+@@ -232,7 +232,7 @@
+ configuration of
+ .Bd -literal -offset indent
+ amd_enable="YES"
+-amd_flags="-a /.am -c 1800 -w 60 -l syslog /snap /etc/amd.map.snap"
++amd_flags="-a /.am -c 1800 -w 60 -l syslog /snap %%PREFIX%%/etc/amd.map.snap"
+ .Ed
+ .Pp
+ even non-privileged users can access arbitrary snapshots
diff --git a/sysutils/freebsd-snapshot/files/pkg-deinstall.in b/sysutils/freebsd-snapshot/files/pkg-deinstall.in
new file mode 100644
index 000000000000..fb806b41820a
--- /dev/null
+++ b/sysutils/freebsd-snapshot/files/pkg-deinstall.in
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+case $2 in
+ POST-DEINSTALL)
+ echo "If you completly remove this port, do not forget"
+ echo "then remove lines included by you in:"
+ echo ""
+ echo "crontab"
+ echo "periodic.conf"
+ echo "rc.conf"
+ echo ""
+ ;;
+esac
diff --git a/sysutils/freebsd-snapshot/files/pkg-message.in b/sysutils/freebsd-snapshot/files/pkg-message.in
new file mode 100644
index 000000000000..284b6f3e7f87
--- /dev/null
+++ b/sysutils/freebsd-snapshot/files/pkg-message.in
@@ -0,0 +1,24 @@
+To periodic and Flexible Backup Snapshot Creation
+
+Edit your crontab and include this:
+
+# Perform hourly/daily/weekly maintenance (FreeBSD UFS2 snapshots only).
+0 * * * * root %%PREFIX%%/sbin/periodic-snapshot hourly
+0 0 * * * root %%PREFIX%%/sbin/periodic-snapshot daily
+0 0 * * 0 root %%PREFIX%%/sbin/periodic-snapshot weekly
+
+and edit your periodic.conf and include this:
+
+# UFS2 Snapshot Creation
+snapshot_enable="YES"
+snapshot_schedule="/,/usr:2:1:0 /var:0:2:4 /home:2:6:8@8,12,16,20"
+
+----
+
+To easy Access to Backup Snapshot Data
+
+Edit your rc.conf and include this:
+
+# UFS2 Snapshot Access
+amd_enable="YES"
+amd_flags="-a /.am -c 1800 -w 60 -l syslog /snap %%PREFIX%%/etc/amd.map.snap"
diff --git a/sysutils/freebsd-snapshot/pkg-descr b/sysutils/freebsd-snapshot/pkg-descr
new file mode 100644
index 000000000000..8df7798c9378
--- /dev/null
+++ b/sysutils/freebsd-snapshot/pkg-descr
@@ -0,0 +1,6 @@
+FreeBSD UFS2 Snapshots Management Environment
+
+For more information on these utilities see WWW.
+
+Author: Graham Todd <gtodd@bellanet.org>
+WWW: http://people.freebsd.org/~rse/snapshot/