summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormanu <manu@pkgsrc.org>2015-09-25 13:21:52 +0000
committermanu <manu@pkgsrc.org>2015-09-25 13:21:52 +0000
commitee4f8b3556b8dd84cdd4126089680683aedb86f1 (patch)
tree6fc6124d905892862d29b11ea75212ac55717039
parent9763bbdb101129c24df412d88de2336864c2d355 (diff)
downloadpkgsrc-ee4f8b3556b8dd84cdd4126089680683aedb86f1.tar.gz
Add syncffsd
syncffsd uses rsync(1) to replicate a directory tree to another host. This involves detecting changes, something NetBSD is not well prepared to handle. The kqueue(2) interface can detect changes, but it needs to use a file descriptor for every node monitored, and this does not scales very well for huge directories trees. syncffsd attempts to improve the situation until kqueue(2) gets better, by using FFS superblock's fs_time field, which is updated on every filesystem change. This lets syncffsd detects a change immediatly if the filesystem is mounted synchronous, or after a few seconds if mounted with WAPBL(4) enabled. Once a change is detected, the relevant nodes are found by walking source looking for files that changed since the previous filesystem modification. The resulting nodes are deduped (i.e.: we do not retain a node in a directory if the directory itself changed), and are fed to rsync(1).
-rw-r--r--net/syncffsd/DESCR16
-rw-r--r--net/syncffsd/Makefile18
-rw-r--r--net/syncffsd/PLIST4
-rw-r--r--net/syncffsd/distinfo5
4 files changed, 43 insertions, 0 deletions
diff --git a/net/syncffsd/DESCR b/net/syncffsd/DESCR
new file mode 100644
index 00000000000..140a70ede1e
--- /dev/null
+++ b/net/syncffsd/DESCR
@@ -0,0 +1,16 @@
+syncffsd uses rsync(1) to replicate a directory tree to another host.
+This involves detecting changes, something NetBSD is not well prepared to
+handle. The kqueue(2) interface can detect changes, but it needs to use a
+file descriptor for every node monitored, and this does not scales very
+well for huge directories trees.
+
+syncffsd attempts to improve the situation until kqueue(2) gets better,
+by using FFS superblock's fs_time field, which is updated on every
+filesystem change. This lets syncffsd detects a change immediatly if the
+filesystem is mounted synchronous, or after a few seconds if mounted with
+WAPBL(4) enabled.
+
+Once a change is detected, the relevant nodes are found by walking source
+looking for files that changed since the previous filesystem modification.
+The resulting nodes are deduped (i.e.: we do not retain a node in
+a directory if the directory itself changed), and are fed to rsync(1).
diff --git a/net/syncffsd/Makefile b/net/syncffsd/Makefile
new file mode 100644
index 00000000000..21858f04ced
--- /dev/null
+++ b/net/syncffsd/Makefile
@@ -0,0 +1,18 @@
+# $NetBSD: Makefile,v 1.1 2015/09/25 13:21:52 manu Exp $
+
+DISTNAME= syncffsd-0.7
+CATEGORIES= net
+MASTER_SITES= http://ftp.espci.fr/pub/syncffsd/
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= manu@NetBSD.org
+HOMEPAGE= http://ftp.espci.fr/pub/syncffsd/
+COMMENT= FFS filesystem miroring using rsync
+LICENSE= modified-bsd
+
+RCD_SCRIPTS= syncffsd
+
+MAKE_ENV+= VARBASE=${VARBASE}
+MAKE_ENV+= PREFIX=${PREFIX}
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/syncffsd/PLIST b/net/syncffsd/PLIST
new file mode 100644
index 00000000000..7a1f7d120c4
--- /dev/null
+++ b/net/syncffsd/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1 2015/09/25 13:21:52 manu Exp $
+sbin/syncffsd
+libexec/nagios/check_syncffsd
+man/man8/syncffsd.8
diff --git a/net/syncffsd/distinfo b/net/syncffsd/distinfo
new file mode 100644
index 00000000000..cc9734ddba3
--- /dev/null
+++ b/net/syncffsd/distinfo
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1 2015/09/25 13:21:52 manu Exp $
+
+SHA1 (syncffsd-0.7.tgz) = e36595fed276d6fd235644d4c4a8513ab0fd29bb
+RMD160 (syncffsd-0.7.tgz) = c6956ff283aecad875e1e2c85a4342bc66306ecf
+Size (syncffsd-0.7.tgz) = 65077 bytes