aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorlioux <lioux@FreeBSD.org>2004-07-21 06:08:44 +0800
committerlioux <lioux@FreeBSD.org>2004-07-21 06:08:44 +0800
commit4f56334c65a2de083acebf182f25511f591d1e6e (patch)
tree8dda0dbd84c3fbec56b53c3298270b234eba8b07 /sysutils
parent80928c47912c37360b385d403e6f3630265f3dd1 (diff)
downloadfreebsd-ports-gnome-4f56334c65a2de083acebf182f25511f591d1e6e.tar.gz
freebsd-ports-gnome-4f56334c65a2de083acebf182f25511f591d1e6e.tar.zst
freebsd-ports-gnome-4f56334c65a2de083acebf182f25511f591d1e6e.zip
New port dolly version 0.57: A program to clone harddisks/partitions
over a fast switched network
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/dolly/Makefile85
-rw-r--r--sysutils/dolly/distinfo2
-rw-r--r--sysutils/dolly/files/extra-bzip2-patch-dolly.c20
-rw-r--r--sysutils/dolly/pkg-descr21
5 files changed, 129 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 37a0d4519315..68fe9333adea 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -94,6 +94,7 @@
SUBDIR += diskusage
SUBDIR += dmidecode
SUBDIR += doconfig
+ SUBDIR += dolly
SUBDIR += dt
SUBDIR += dtc
SUBDIR += du2ps
diff --git a/sysutils/dolly/Makefile b/sysutils/dolly/Makefile
new file mode 100644
index 000000000000..d3194ee6102f
--- /dev/null
+++ b/sysutils/dolly/Makefile
@@ -0,0 +1,85 @@
+# New ports collection makefile for: dolly
+# Date created: Thu Jul 15 10:01:46 UTC 2004
+# Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= dolly
+PORTVERSION= 0.57
+CATEGORIES= sysutils net
+MASTER_SITES= http://www.cs.inf.ethz.ch/CoPs/patagonia/dolly/
+DISTNAME= ${PORTNAME}.${PORTVERSION}
+
+MAINTAINER= lioux@FreeBSD.org
+COMMENT= A program to clone harddisks/partitions over a fast switched network
+
+USE_REINPLACE= yes
+
+OPTIONS= BZIP2 "bzip2 instead of gzip for compressing" on \
+ HIGHEST_COMPRESSION "Highest rather than fastest compression" on
+
+PLIST_FILES= bin/${PORTNAME}
+PORTDOCS= README
+
+do-configure:
+# C{C,FLAGS} safeness
+ @${REINPLACE_CMD} -E \
+ -e 's|^(CC[[:space:]]*=).*$$|\1${CC}|' \
+ -e 's|^(CFLAGS[[:space:]]*=.*)$$|\1 ${CFLAGS}|' \
+ ${BUILD_WRKSRC}/${MAKEFILE}
+
+do-install:
+.ifndef(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+. for file in ${PORTDOCS}
+ @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}/
+. endfor
+.endif
+ @${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/
+
+.include <bsd.port.pre.mk>
+
+# Correctly depend upon bzip2 if necessary
+.ifdef(WITH_BZIP2)
+. if !exists(/usr/bin/bzip2)
+RUN_DEPENDS+= bzip2:${PORTSDIR}/archivers/bzip2
+. endif
+
+EXTRA_PATCHES+= ${FILESDIR}/extra-bzip2-patch-dolly.c
+.endif
+
+post-patch:
+# fix comment error
+ @${REINPLACE_CMD} -E \
+ -e 's|use gzip|use gunzip|' \
+ ${WRKSRC}/dolly.c
+# Properly reference bzip2 instead of gzip
+.ifdef(WITH_BZIP2)
+ @${REINPLACE_CMD} -E \
+ -e 's|/usr/bin/gzip|${BZIP2_CMD}|' \
+ -e 's|gzip|bzip2|' \
+ -e 's|/usr/bin/gunzip|${BZCAT}|' \
+ ${WRKSRC}/dolly.c
+# Use specific FreeBSD references
+# Fix spelling
+ @${REINPLACE_CMD} -E \
+ -e 's|gnu-zipped|bzipped|' \
+ -e 's|sda([[:digit:]])|da\1|g' \
+ -e 's|/sda|/da|g' \
+ -e 's|sda_|da_|g' \
+ -e 's|hypennormal|hyphennormal|' \
+ ${WRKSRC}/README
+ @${REINPLACE_CMD} -E \
+ -e 's|gunzip|bzcat|' \
+ -e 's|\.gz|\.bz2|g' \
+ ${WRKSRC}/*
+.endif
+# Highest compression possible
+.ifdef(WITH_HIGHEST_COMPRESSION)
+ @${REINPLACE_CMD} -E \
+ -e 's|-cf|-9cf|' \
+ ${WRKSRC}/dolly.c
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/sysutils/dolly/distinfo b/sysutils/dolly/distinfo
new file mode 100644
index 000000000000..107dfd5ce871
--- /dev/null
+++ b/sysutils/dolly/distinfo
@@ -0,0 +1,2 @@
+MD5 (dolly.0.57.tar.gz) = 2ac8b92897e3b6cee8d5d6cd75aae806
+SIZE (dolly.0.57.tar.gz) = 20363
diff --git a/sysutils/dolly/files/extra-bzip2-patch-dolly.c b/sysutils/dolly/files/extra-bzip2-patch-dolly.c
new file mode 100644
index 000000000000..83c2c783740b
--- /dev/null
+++ b/sysutils/dolly/files/extra-bzip2-patch-dolly.c
@@ -0,0 +1,20 @@
+--- dolly.c.orig Fri Jul 16 13:04:17 2004
++++ dolly.c Fri Jul 16 13:06:23 2004
+@@ -200,7 +200,7 @@
+ if((sp = strchr(sp2, ' ')) == NULL) {
+ sp = sp2 + strlen(sp2);
+ }
+- if(compressed_in && (strncmp(&sp2[sp - sp2 - 3], ".gz", 3) != 0)) {
++ if(compressed_in && (strncmp(&sp2[sp - sp2 - 4], ".bz2", 4) != 0)) {
+ char tmp_str[256];
+ strncpy(tmp_str, sp2, sp - sp2);
+ tmp_str[sp - sp2] = '\0';
+@@ -235,7 +235,7 @@
+ if((sp = strchr(sp2, ' ')) == NULL) {
+ sp = sp2 + strlen(sp2);
+ }
+- if(compressed_out && (strncmp(&sp2[sp - sp2 - 3], ".gz", 3) != 0)) {
++ if(compressed_out && (strncmp(&sp2[sp - sp2 - 4], ".bz2", 4) != 0)) {
+ char tmp_str[256];
+ strncpy(tmp_str, sp2, sp - sp2);
+ tmp_str[sp - sp2] = '\0';
diff --git a/sysutils/dolly/pkg-descr b/sysutils/dolly/pkg-descr
new file mode 100644
index 000000000000..659364d11c9f
--- /dev/null
+++ b/sysutils/dolly/pkg-descr
@@ -0,0 +1,21 @@
+[ excerpt taken from distfile's README ]
+
+Dolly is used to clone the installation of one machine to (possibly
+many) other machines. It can distribute image-files (even gnu-zipped),
+partitions or whole hard disk drives to other partitions or hard
+disk drives. As it forms a "virtual TCP ring" to distribute data,
+it works best with fast switched networks (we were able to clone a
+2 GB Windows NT partition to 15 machines in our cluster over Gigabit
+Ethernet in less than 4 minutes).
+
+As dolly clones whole partitions block-wise it works for most
+filesystems. We used it to clone partitions of the following type:
+Linux, Windows NT, Oberon, Solaris (most of our machines have multi
+boot setups). We have a small (additional) Linux installation on
+all of our machines or use a small one-floppy-disk-linux (e.g.
+muLinux) to do the cloning. On newer machines we use PXE to boot a
+small system in a RAM disk. From that system we then clone the hard
+disks in the machines.
+
+Author: Felix Rauch <rauch@inf.ethz.ch>
+WWW: http://www.cs.inf.ethz.ch/CoPs/patagonia/dolly.html