Fri Dec 2 05:40:00 2011 UTC ()
Initial import of mrsync version 20090219 into the Packages Collection.
mrsync is a tool to transfer files from a master to many remote
machines in LAN using Unix multicast sockets. It dynamically adjusts
its transfer speed to ease on the network and to leave no one behind.
4 hours for 140GB to 100 targets in 1Gbit LAN
Status:
Vendor Tag: TNF
Release Tags: pkgsrc-base
(agc)
diff -r0 -r1.1.1.1 pkgsrc/sysutils/mrsync/Makefile
diff -r0 -r1.1.1.1 pkgsrc/sysutils/mrsync/DESCR
diff -r0 -r1.1.1.1 pkgsrc/sysutils/mrsync/PLIST
diff -r0 -r1.1.1.1 pkgsrc/sysutils/mrsync/distinfo
diff -r0 -r1.1.1.1 pkgsrc/sysutils/mrsync/patches/patch-aa
diff -r0 -r1.1.1.1 pkgsrc/sysutils/mrsync/patches/patch-ab
diff -r0 -r1.1.1.1 pkgsrc/sysutils/mrsync/patches/patch-ac
diff -r0 -r1.1.1.1 pkgsrc/sysutils/mrsync/patches/patch-ad
diff -r0 -r1.1.1.1 pkgsrc/sysutils/mrsync/patches/patch-ae
diff -r0 -r1.1.1.1 pkgsrc/sysutils/mrsync/patches/patch-af
diff -r0 -r1.1.1.1 pkgsrc/sysutils/mrsync/patches/patch-ag
diff -r0 -r1.1.1.1 pkgsrc/sysutils/mrsync/patches/patch-ah
# $NetBSD: Makefile,v 1.1.1.1 2011/12/02 05:40:00 agc Exp $
DISTNAME= mrsync.20090219
PKGNAME= ${DISTNAME:S/./-/}
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=mrsync/}
EXTRACT_SUFX= .zip
MAINTAINER= agc@NetBSD.org
HOMEPAGE= http://mrsync.sourceforge.net/
COMMENT= Multicast data replication and synchronisation tool
LICENSE= gnu-gpl-v2
PKG_DESTDIR_SUPPORT= user-destdir
PKG_INSTALLATION_TYPES= overwrite pkgviews
WRKSRC= ${WRKDIR}
INSTALLATION_DIRS= bin
pre-configure:
cd ${WRKSRC} && cp Makefile.linux Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/multicaster ${DESTDIR}${PREFIX}/bin/multicaster
${INSTALL_PROGRAM} ${WRKSRC}/multicatcher ${DESTDIR}${PREFIX}/bin/multicatcher
${INSTALL_PROGRAM} ${WRKSRC}/rtt ${DESTDIR}${PREFIX}/bin/rtt
${INSTALL_PROGRAM} ${WRKSRC}/rttcatcher ${DESTDIR}${PREFIX}/bin/rttcatcher
${INSTALL_PROGRAM} ${WRKSRC}/trFilelist ${DESTDIR}${PREFIX}/bin/trFilelist
.include "../../mk/bsd.pkg.mk"
mrsync is a tool to transfer files from a master to many remote
machines in LAN using Unix multicast sockets. It dynamically adjusts
its transfer speed to ease on the network and to leave no one behind.
4 hours for 140GB to 100 targets in 1Gbit LAN
@comment $NetBSD: PLIST,v 1.1.1.1 2011/12/02 05:40:00 agc Exp $
bin/multicaster
bin/multicatcher
bin/rtt
bin/rttcatcher
bin/trFilelist
$NetBSD: distinfo,v 1.1.1.1 2011/12/02 05:40:00 agc Exp $
SHA1 (mrsync.20090219.zip) = 841e3b93bf513d08042f1610109fdf68143e62a1
RMD160 (mrsync.20090219.zip) = 868402646862ed133416cd661360bd40e335e474
Size (mrsync.20090219.zip) = 97238 bytes
SHA1 (patch-aa) = 9e7a2b8d46a89977dcc80b9b33ae7f49ff1e6bda
SHA1 (patch-ab) = de8495d0bf72e0298f45e916b0db5cce0659bcf4
SHA1 (patch-ac) = e0b48d09591a8e33d2b55f2784b5314b62da275f
SHA1 (patch-ad) = dc0630875c95f802b16679e005083170d40d3f73
SHA1 (patch-ae) = 2018659a8373af5d2078d34c717871fa6f5d786a
SHA1 (patch-af) = 1921ad7e3b1e3582226ac3cecc204de68fbae52e
SHA1 (patch-ag) = b565b6fcdcabbbe5864ec971d2282d85d429337e
SHA1 (patch-ah) = 53c422965f4e4e5a2b511c32db19408a7d065743
$NetBSD: patch-aa,v 1.1.1.1 2011/12/02 05:40:00 agc Exp $
Generalise this for every platform
--- Makefile.linux 2011/11/30 20:31:57 1.1
+++ Makefile.linux 2011/11/30 20:32:48
@@ -5,13 +5,13 @@
SUNFLAG = # -D_SUN on Solaris machines
IPV6FLAG = # -DIPV6 for IPv6
DEBUG = # -g -ggdb
-CC = gcc-2.95.3.ren # 32-bit compiler
+CC = cc # 32-bit compiler
CFLAGS = -O ${DEBUG} -Wall ${SUNFLAG} ${IPV6FLAG} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
#LIBS = -lsocket # for Solaris
LIBS = # there is no special lib needed, unless your system put the lib in non-standard place
# The directory to install mrsync and others in.
-bindir = /usr/local/bin
+bindir = ${DESTDIR}${PREFIX}/bin
# ----- end of system dependent section -------
@@ -38,32 +38,36 @@
# multicasting
${OBJ1}: main.h proto.h
-multicaster: multicaster.o global.o setup_socket.o set_mcast.o \
+MULTICASTEROBJS= multicaster.o global.o setup_socket.o set_mcast.o \
parse_synclist.o \
sends.o complaints.o backup.o \
timing.o signal.o id_map.o
- ${CC} ${CFLAGS} -o $@ $^ ${LIBS}
+multicaster: ${MULTICASTEROBJS}
+ ${CC} ${CFLAGS} -o $@ ${MULTICASTEROBJS} ${LIBS}
-multicatcher: multicatcher.o global.o setup_socket.o set_catcher_mcast.o \
+MULTICATCHEROBJS= multicatcher.o global.o setup_socket.o set_catcher_mcast.o \
page_reader.o complaint_sender.o \
file_operations.o signal.o timing.o
- ${CC} ${CFLAGS} -o $@ $^ ${LIBS}
+multicatcher: ${MULTICATCHEROBJS}
+ ${CC} ${CFLAGS} -o $@ ${MULTICATCHEROBJS} ${LIBS}
# for rtt and rttcatcher
${OBJ4}: rttmain.h rttproto.h
-rtt: rtt.o setup_socket.o set_mcast.o \
+RTTOBJS= rtt.o setup_socket.o set_mcast.o \
rttsends.o rttcomplaints.o timing.o signal.o
- ${CC} ${CFLAGS} -o $@ $^ ${LIBS}
+rtt: ${RTTOBJS}
+ ${CC} ${CFLAGS} -o $@ ${RTTOBJS} ${LIBS}
-rttcatcher: rttcatcher.o setup_socket.o set_catcher_mcast.o \
+RTTCATCHEROBJS= rttcatcher.o setup_socket.o set_catcher_mcast.o \
rttpage_reader.o rttcomplaint_sender.o rttmissings.o \
signal.o timing.o
- ${CC} ${CFLAGS} -o $@ $^ ${LIBS}
+rttcatcher: ${RTTCATCHEROBJS}
+ ${CC} ${CFLAGS} -o $@ ${RTTCATCHEROBJS} ${LIBS}
# misc
trFilelist: trFilelist.o
- ${CC} ${CFLAGS} -o $@ $^ ${LIBS}
+ ${CC} ${CFLAGS} -o $@ trFilelist.o ${LIBS}
# to clean up
clean:
$NetBSD: patch-ab,v 1.1.1.1 2011/12/02 05:40:00 agc Exp $
get the right prototypes
--- setup_socket.c 2011/11/30 20:33:53 1.1
+++ setup_socket.c 2011/11/30 20:34:13
@@ -36,10 +36,12 @@
*/
-#include <sys/socket.h>
#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/select.h>
#include <sys/un.h>
#include <stdio.h>
+#include <string.h>
#include <stdlib.h>
#include <netinet/in.h> /* sockaddr_in{} and other Internet defns */
#include <arpa/inet.h> /* inet(3) functions */
$NetBSD: patch-ac,v 1.1.1.1 2011/12/02 05:40:00 agc Exp $
get the right headers for BSD
--- set_mcast.c 2011/11/30 20:37:22 1.1
+++ set_mcast.c 2011/11/30 20:37:50
@@ -27,10 +27,10 @@
#include "main.h"
#include <net/if.h>
-#ifdef _SUN
-#include <sys/sockio.h> /* define SIOCGIFADDR */
-#else
+#ifdef __linux__
#include <linux/sockios.h>
+#else
+#include <sys/sockio.h> /* define SIOCGIFADDR */
#endif
#define SA struct sockaddr
$NetBSD: patch-ad,v 1.1.1.1 2011/12/02 05:40:00 agc Exp $
get the right headers
--- sends.c 2011/11/30 20:38:41 1.1
+++ sends.c 2011/11/30 20:39:07
@@ -35,10 +35,10 @@
#include "main.h"
#include <net/if.h>
-#ifdef _SUN
-#include <sys/sockio.h> /* define SIOCGIFADDR */
-#else
+#ifdef _linux__
#include <linux/sockios.h>
+#else
+#include <sys/sockio.h> /* define SIOCGIFADDR */
#endif
extern char * my_MCAST_ADDR; /* defined in multicaster.c */
$NetBSD: patch-ae,v 1.1.1.1 2011/12/02 05:40:00 agc Exp $
Get rid of some minor lint
--- multicatcher.c 2011/11/30 21:06:19 1.1
+++ multicatcher.c 2011/11/30 21:06:59
@@ -121,7 +121,7 @@
exit(BAD_EXIT);
}
- fprintf(stderr, "my_pid= %lu\n", getpid());
+ fprintf(stderr, "my_pid= %lu\n", (unsigned long)getpid());
if (!backup_suffix) default_suffix();
get_tmp_suffix(); /* get a unique tmp_name for the tmp file */
$NetBSD: patch-af,v 1.1.1.1 2011/12/02 05:40:00 agc Exp $
Get the headers right
--- set_catcher_mcast.c 2011/11/30 21:07:45 1.1
+++ set_catcher_mcast.c 2011/11/30 21:08:08
@@ -29,10 +29,10 @@
#include "main.h"
#include <net/if.h>
-#ifdef _SUN
-#include <sys/sockio.h> /* define SIOCGIFADDR */
-#else
+#ifdef _linux__
#include <linux/sockios.h>
+#else
+#include <sys/sockio.h> /* define SIOCGIFADDR */
#endif
#define SA struct sockaddr
$NetBSD: patch-ag,v 1.1.1.1 2011/12/02 05:40:00 agc Exp $
Define a function which is not there
--- file_operations.c 2011/11/30 21:09:26 1.1
+++ file_operations.c 2011/11/30 21:11:00
@@ -95,6 +95,12 @@
return;
}
+static char *
+tmpnam_r(char *s)
+{
+ return s ? tmpnam(s) : NULL;
+}
+
void get_tmp_suffix()
{
/* this is called once in each multicatcher */
$NetBSD: patch-ah,v 1.1.1.1 2011/12/02 05:40:00 agc Exp $
Get the right header files
--- rttsends.c 2011/11/30 21:11:57 1.1
+++ rttsends.c 2011/11/30 21:12:19
@@ -26,10 +26,10 @@
#include "rttmain.h"
#include <net/if.h>
-#ifdef _SUN
-#include <sys/sockio.h> /* define SIOCGIFADDR */
-#else
+#ifdef __linux__
#include <linux/sockios.h>
+#else
+#include <sys/sockio.h> /* define SIOCGIFADDR */
#endif
extern char * my_MCAST_ADDR;