aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreik <eik@FreeBSD.org>2004-08-25 00:30:50 +0800
committereik <eik@FreeBSD.org>2004-08-25 00:30:50 +0800
commit46067adb0c782529b45ae3f6e7e81f28578b9079 (patch)
treef33042248ac079eda5a7ba3117def9e8d549b0b5
parent8d07b4d8418e7f93aedcf79ebf44ed18cadf2764 (diff)
downloadfreebsd-ports-gnome-46067adb0c782529b45ae3f6e7e81f28578b9079.tar.gz
freebsd-ports-gnome-46067adb0c782529b45ae3f6e7e81f28578b9079.tar.zst
freebsd-ports-gnome-46067adb0c782529b45ae3f6e7e81f28578b9079.zip
enable copying of fifos/sockets
Requested by: Eike Bernhardt <eike@unorganized.net> PR: 59814 Obtained from: Thomas Quinot <thomas@cuivre.fr.eu.org>
-rw-r--r--net/rsync/Makefile2
-rw-r--r--net/rsync/distinfo2
-rw-r--r--net/rsync/files/patch-rsync.h18
-rw-r--r--net/rsync/files/patch-syscall.c39
4 files changed, 60 insertions, 1 deletions
diff --git a/net/rsync/Makefile b/net/rsync/Makefile
index 0b870819b9a8..3523ff66e529 100644
--- a/net/rsync/Makefile
+++ b/net/rsync/Makefile
@@ -7,7 +7,7 @@
PORTNAME= rsync
PORTVERSION= 2.6.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= net ipv6
MASTER_SITES= http://rsync.samba.org/ftp/%SUBDIR%/ \
ftp://sunsite.auc.dk/pub/unix/%SUBDIR%/ \
diff --git a/net/rsync/distinfo b/net/rsync/distinfo
index 579857711242..cd94e46f84e3 100644
--- a/net/rsync/distinfo
+++ b/net/rsync/distinfo
@@ -1,2 +1,4 @@
MD5 (rsync-2.6.2.tar.gz) = bcacd9a9108a9e4760832212ec3d658d
SIZE (rsync-2.6.2.tar.gz) = 515402
+MD5 (rsync-2.6.2-2.6.3pre1.diffs.gz) = 2ecd11b83c06a18c764ccee5dbdb25ab
+SIZE (rsync-2.6.2-2.6.3pre1.diffs.gz) = 102947
diff --git a/net/rsync/files/patch-rsync.h b/net/rsync/files/patch-rsync.h
new file mode 100644
index 000000000000..d9039e2c5f59
--- /dev/null
+++ b/net/rsync/files/patch-rsync.h
@@ -0,0 +1,18 @@
+#
+# enable copying of fifos/sockets
+# <http://lists.samba.org/archive/rsync/2002-June/002966.html>
+# <http://www.freebsd.org/cgi/query-pr.cgi?pr=59814>
+#
+--- rsync.h.orig Tue Aug 24 16:37:59 2004
++++ rsync.h Tue Aug 24 16:38:28 2004
+@@ -156,6 +156,10 @@
+ #include <sys/socket.h>
+ #endif
+
++#ifdef HAVE_SYS_UN_H
++#include <sys/un.h>
++#endif
++
+ #ifdef HAVE_STRING_H
+ #include <string.h>
+ #endif
diff --git a/net/rsync/files/patch-syscall.c b/net/rsync/files/patch-syscall.c
new file mode 100644
index 000000000000..a68cac8c7225
--- /dev/null
+++ b/net/rsync/files/patch-syscall.c
@@ -0,0 +1,39 @@
+#
+# enable copying of fifos/sockets
+# <http://lists.samba.org/archive/rsync/2002-June/002966.html>
+# <http://www.freebsd.org/cgi/query-pr.cgi?pr=59814>
+#
+--- syscall.c.orig Wed Feb 18 23:33:21 2004
++++ syscall.c Tue Aug 24 17:56:25 2004
+@@ -76,6 +76,31 @@
+ {
+ if (dry_run) return 0;
+ RETURN_ERROR_IF_RO_OR_LO;
++#if HAVE_MKFIFO
++ if (S_ISFIFO(mode))
++ return mkfifo(pathname, mode);
++#endif
++#if HAVE_SYS_UN_H
++ if (S_ISSOCK(mode)) {
++ int fd;
++ struct sockaddr_un *su;
++ size_t len;
++ if ((fd = socket(PF_UNIX, SOCK_STREAM, 0)) == -1)
++ return -1;
++ unlink(pathname);
++ len = sizeof(*su) - sizeof(su->sun_path) + strlen(pathname);
++ if ((su = calloc(1, len + 1)) == NULL)
++ return -1;
++ su->sun_len = len;
++ su->sun_family = AF_UNIX;
++ strcpy(su->sun_path, pathname);
++ if (bind(fd, (const struct sockaddr *)su, len) < 0)
++ return -1;
++ free(su);
++ close(fd);
++ return do_chmod(pathname, mode);
++ }
++#endif
+ return mknod(pathname, mode, dev);
+ }
+ #endif