diff options
author | tv <tv@pkgsrc.org> | 2006-05-16 18:02:04 +0000 |
---|---|---|
committer | tv <tv@pkgsrc.org> | 2006-05-16 18:02:04 +0000 |
commit | 613dddc385f6c4eca09b274235e5c938d1234538 (patch) | |
tree | f21e22a9b91bb93b9bfdac0df701d70105343d4e /net/freenet-tools | |
parent | d6c170add5af3211caf8c067d2aec4d8646de62c (diff) | |
download | pkgsrc-613dddc385f6c4eca09b274235e5c938d1234538.tar.gz |
Update to 0.2.25. No offical changelog; mainly, incorporates Interix
patches originally created for pkgsrc, and adds broadcast/receive real-time
FCP commands (experimental Entropy extensions).
Add patch making all FCP protocol commands use \r\n as EOL, now required
by Freenet (\n wasn't enough).
Diffstat (limited to 'net/freenet-tools')
-rw-r--r-- | net/freenet-tools/Makefile | 10 | ||||
-rw-r--r-- | net/freenet-tools/PLIST | 4 | ||||
-rw-r--r-- | net/freenet-tools/distinfo | 11 | ||||
-rw-r--r-- | net/freenet-tools/patches/patch-aa | 289 | ||||
-rw-r--r-- | net/freenet-tools/patches/patch-ab | 31 |
5 files changed, 266 insertions, 79 deletions
diff --git a/net/freenet-tools/Makefile b/net/freenet-tools/Makefile index a827b9f1e0a..e9ce14a1a04 100644 --- a/net/freenet-tools/Makefile +++ b/net/freenet-tools/Makefile @@ -1,10 +1,9 @@ -# $NetBSD: Makefile,v 1.10 2006/03/22 22:50:32 tv Exp $ +# $NetBSD: Makefile,v 1.11 2006/05/16 18:02:04 tv Exp $ # -DISTNAME= ft-0.2.23 +DISTNAME= ft-0.2.25 PKGNAME= ${DISTNAME:S/ft-/freenet-tools-/} WRKSRC= ${WRKDIR}/ft -PKGREVISION= 1 CATEGORIES= net www MASTER_SITES= http://entropy.stop1984.com/files/ EXTRACT_SUFX= .tgz @@ -16,13 +15,14 @@ COMMENT= Freenet Tools, freesite manipulation tools for Freenet and Entropy USE_TOOLS+= gmake MAKE_FLAGS+= CC=${CC:Q} LD=${CC:Q} CFLAGS=${CFLAGS:M*:Q} LDFLAGS=${LDFLAGS:M*:Q} -CFLAGS+= -DFT_BIN=\"${PREFIX}/bin\" +CFLAGS+= -DFT_BIN=\"${PREFIX}/bin\" -D_DEBUG INSTALLATION_DIRS= bin do-install: ${INSTALL_PROGRAM} ${WRKSRC}/ft ${PREFIX}/bin/ft -.for f in fcpchk fcpget fcpgetsite fcphello fcpinv fcpkey fcpput fcpputsite +.for f in fcpbroadcast fcpchk fcpget fcpgetsite fcphello fcpinv fcpkey \ + fcpput fcpputsite fcpreceive ${LN} -s -f ft ${PREFIX}/bin/${f} .endfor diff --git a/net/freenet-tools/PLIST b/net/freenet-tools/PLIST index b1c787869d6..6e736976e7c 100644 --- a/net/freenet-tools/PLIST +++ b/net/freenet-tools/PLIST @@ -1,4 +1,5 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2004/03/29 18:43:47 tv Exp $ +@comment $NetBSD: PLIST,v 1.2 2006/05/16 18:02:04 tv Exp $ +bin/fcpbroadcast bin/fcpchk bin/fcpget bin/fcpgetsite @@ -7,4 +8,5 @@ bin/fcpinv bin/fcpkey bin/fcpput bin/fcpputsite +bin/fcpreceive bin/ft diff --git a/net/freenet-tools/distinfo b/net/freenet-tools/distinfo index 714b9d45fb9..b31e314972b 100644 --- a/net/freenet-tools/distinfo +++ b/net/freenet-tools/distinfo @@ -1,7 +1,6 @@ -$NetBSD: distinfo,v 1.4 2005/02/24 12:13:46 agc Exp $ +$NetBSD: distinfo,v 1.5 2006/05/16 18:02:04 tv Exp $ -SHA1 (ft-0.2.23.tgz) = b247b56ff84ec871292c3fc2e55b812f19ab0f23 -RMD160 (ft-0.2.23.tgz) = 2d73d0efc9e0fb099a07ec10dbf357d3b589c085 -Size (ft-0.2.23.tgz) = 40547 bytes -SHA1 (patch-aa) = 9e7675096a524eb6cfd064eaa00f36e02d85f62f -SHA1 (patch-ab) = 77110bb0ff189cc46a7bc79253bf17f6fd17dc18 +SHA1 (ft-0.2.25.tgz) = 03ea81e62d4de15035866472946a26f35aabea72 +RMD160 (ft-0.2.25.tgz) = 3187a522ddaca121e17a3c1407e9bcf889339a7e +Size (ft-0.2.25.tgz) = 41201 bytes +SHA1 (patch-aa) = 182c4f803a6ad12f2672dce2271fceea53085034 diff --git a/net/freenet-tools/patches/patch-aa b/net/freenet-tools/patches/patch-aa index 62e86f0d55c..e50c4938a85 100644 --- a/net/freenet-tools/patches/patch-aa +++ b/net/freenet-tools/patches/patch-aa @@ -1,37 +1,254 @@ -$NetBSD: patch-aa,v 1.2 2004/10/29 17:06:50 tv Exp $ +$NetBSD: patch-aa,v 1.3 2006/05/16 18:02:04 tv Exp $ ---- ftmain.c.orig Thu May 20 06:31:47 2004 -+++ ftmain.c -@@ -218,9 +218,9 @@ void usage(int cmd) - } - } - --#ifdef __CYGWIN__ --/* The CYGWIN libc does not have a timegm() function */ --time_t cyg_timegm(struct tm *tm) -+#if defined(__CYGWIN__) || defined(__INTERIX) -+/* Replacement timegm() function for libc's missing it */ -+time_t timegm(struct tm *tm) - { - time_t time_temp; - struct tm *tm_temp; -@@ -234,7 +234,9 @@ time_t cyg_timegm(struct tm *tm) - tm_temp = gmtime(&time_temp); - return (time_t)(time_temp + (time_temp - mktime(tm_temp))); - } -+#endif - -+#ifdef __CYGWIN__ - //////////////////////////////////////////////////////// - // private popen2() - in-fact this is exact copy of - // newlib/libc/posix.c/popen.c with fork() instead of vfork() -@@ -420,8 +422,7 @@ int main(int argc, char **argv) - } else { - progname = strdup(argv[0]); - free(progpath); -- progpath = calloc(256, 1); -- getcwd(progpath, 256); -+ progpath = FT_BIN; - } - ext = strrchr(progname, '.'); - if (NULL == ext) { +--- ftfcp.c.orig 2005-06-24 08:57:55.000000000 -0400 ++++ ftfcp.c +@@ -235,7 +235,7 @@ int fcp_send_cmds(pid_t pid, fcp_t *f, c + for (i = 0, cmd = cmds; i < count; i++, cmd++) { + switch (cmd->type) { + case ARG_NONE: +- rc = sk_printf(&f->conn, "%s\n", cmd->name); ++ rc = sk_printf(&f->conn, "%s\r\n", cmd->name); + if (0 != rc) { + LOG(L_ERROR,("{%d} sending command '%s' failed (%s)\n", + pid, cmd->name, strerror(errno))); +@@ -252,7 +252,7 @@ int fcp_send_cmds(pid_t pid, fcp_t *f, c + LOG(L_DEBUG,("{%d} skip %s=%s\n", pid, cmd->name, arg)); + break; + } +- rc = sk_printf(&f->conn, "%s=%s\n", cmd->name, arg); ++ rc = sk_printf(&f->conn, "%s=%s\r\n", cmd->name, arg); + if (0 != rc) { + LOG(L_ERROR,("{%d} sending command '%s=%s' failed (%s)\n", + pid, cmd->name, arg, strerror(errno))); +@@ -268,7 +268,7 @@ int fcp_send_cmds(pid_t pid, fcp_t *f, c + LOG(L_DEBUG,("{%d} skip %s=%s\n", pid, cmd->name, arg)); + break; + } +- rc = sk_printf(&f->conn, "%s=%s\n", cmd->name, arg); ++ rc = sk_printf(&f->conn, "%s=%s\r\n", cmd->name, arg); + if (0 != rc) { + LOG(L_ERROR,("{%d} sending command '%s=%s' failed (%s)\n", + pid, cmd->name, arg, strerror(errno))); +@@ -277,7 +277,7 @@ int fcp_send_cmds(pid_t pid, fcp_t *f, c + LOG(L_DEBUG,("{%d} sent %s=%s\n", pid, cmd->name, arg)); + break; + case ARG_STRING: +- rc = sk_printf(&f->conn, "%s=%s\n", cmd->name, cmd->arg); ++ rc = sk_printf(&f->conn, "%s=%s\r\n", cmd->name, cmd->arg); + if (0 != rc) { + LOG(L_ERROR,("{%d} sending command '%s=%s' failed (%s)\n", + pid, cmd->name, cmd->arg, strerror(errno))); +@@ -1309,52 +1309,52 @@ int fcp_put(fcp_t *f, const char *uri, i + } + LOG(L_DEBUG,("{%d} sent 00 00 00 02\n", pid)); + +- if (0 != sk_printf(&f->conn, "ClientPut\n")) { ++ if (0 != sk_printf(&f->conn, "ClientPut\r\n")) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent ClientPut\n", pid)); + + if (htl > 0) { +- if (0 != sk_printf(&f->conn, "HopsToLive=%x\n", htl)) { ++ if (0 != sk_printf(&f->conn, "HopsToLive=%x\r\n", htl)) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent HopsToLive=%x\n", pid, htl)); + } + +- if (0 != sk_printf(&f->conn, "URI=%s\n", uri)) { ++ if (0 != sk_printf(&f->conn, "URI=%s\r\n", uri)) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent URI=%s\n", pid, uri)); + + size = f->datasize + f->metasize; +- if (0 != sk_printf(&f->conn, "DataLength=%x\n", size)) { ++ if (0 != sk_printf(&f->conn, "DataLength=%x\r\n", size)) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent DataLength=%x\n", pid, size)); + + if (f->metasize > 0) { + size = f->metasize; +- if (0 != sk_printf(&f->conn, "MetadataLength=%x\n", size)) { ++ if (0 != sk_printf(&f->conn, "MetadataLength=%x\r\n", size)) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent MetadataLength=%x\n", pid, size)); + } + + if (0 != delete) { +- if (0 != sk_printf(&f->conn, "RemoveLocalKey=%s\n", "yes")) { ++ if (0 != sk_printf(&f->conn, "RemoveLocalKey=%s\r\n", "yes")) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent RemoveLocalKey=%s\n", pid, "yes")); + } + + if (0 != meta_only) { +- if (0 != sk_printf(&f->conn, "MetadataOnly=%s\n", "yes")) { ++ if (0 != sk_printf(&f->conn, "MetadataOnly=%s\r\n", "yes")) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent MetadataOnly=%s\n", pid, "yes")); + } + +- if (0 != sk_printf(&f->conn, "Data\n")) { ++ if (0 != sk_printf(&f->conn, "Data\r\n")) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent Data\n", pid)); +@@ -1465,13 +1465,13 @@ int fcp_chk(fcp_t *f) + } + LOG(L_DEBUG,("{%d} sent 00 00 00 02\n", pid)); + +- if (0 != sk_printf(&f->conn, "GenerateCHK\n")) { ++ if (0 != sk_printf(&f->conn, "GenerateCHK\r\n")) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent GenerateCHK\n", pid)); + + size = f->datasize + f->metasize; +- if (0 != sk_printf(&f->conn, "DataLength=%x\n", size)) { ++ if (0 != sk_printf(&f->conn, "DataLength=%x\r\n", size)) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent DataLength=%x\n", +@@ -1479,12 +1479,12 @@ int fcp_chk(fcp_t *f) + + if (f->metasize > 0) { + size = f->metasize; +- if (0 != sk_printf(&f->conn, "MetadataLength=%x\n", size)) { ++ if (0 != sk_printf(&f->conn, "MetadataLength=%x\r\n", size)) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent MetadataLength=%x\n", pid, size)); + } +- if (0 != sk_printf(&f->conn, "Data\n")) { ++ if (0 != sk_printf(&f->conn, "Data\r\n")) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent Data\n", pid)); +@@ -1745,29 +1745,29 @@ int fcp_encode_segment(fcp_t *f, size_t + } + LOG(L_DEBUG,("{%d} sent 00 00 00 02\n", pid)); + +- if (0 != sk_printf(&f->conn, "FECEncodeSegment\n")) { ++ if (0 != sk_printf(&f->conn, "FECEncodeSegment\r\n")) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent FECEncodeSegment\n", pid)); + + #if 0 +- if (0 != sk_printf(&f->conn, "RequestedLists=\n")) { ++ if (0 != sk_printf(&f->conn, "RequestedLists=\r\n")) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent RequestedList=\n", pid)); + #endif +- if (0 != sk_printf(&f->conn, "DataLength=%x\n", f->metasize + datalen)) { ++ if (0 != sk_printf(&f->conn, "DataLength=%x\r\n", f->metasize + datalen)) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent DataLength=%x\n", pid, f->metasize + datalen)); + + #if 0 /* This is stupid, but the metadata size is not specified */ +- if (0 != sk_printf(&f->conn, "MetadataLength=%x\n", f->metasize)) { ++ if (0 != sk_printf(&f->conn, "MetadataLength=%x\r\n", f->metasize)) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent MetadataLength=%x\n", pid, f->metasize)); + #endif +- if (0 != sk_printf(&f->conn, "Data\n")) { ++ if (0 != sk_printf(&f->conn, "Data\r\n")) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent Data\n", pid)); +@@ -1907,22 +1907,22 @@ int fcp_segment_file(fcp_t **pf, const c + } + LOG(L_DEBUG,("{%d} sent 00 00 00 02\n", pid)); + +- if (0 != sk_printf(&f->conn, "FECSegmentFile\n")) { ++ if (0 != sk_printf(&f->conn, "FECSegmentFile\r\n")) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent FECSegmentFile\n", pid)); + +- if (0 != sk_printf(&f->conn, "AlgoName=%s\n", algo_name)) { ++ if (0 != sk_printf(&f->conn, "AlgoName=%s\r\n", algo_name)) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent AlgoName=%s\n", pid, algo_name)); + +- if (0 != sk_printf(&f->conn, "FileLength=%x\n", file_length)) { ++ if (0 != sk_printf(&f->conn, "FileLength=%x\r\n", file_length)) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent FileLength=%x\n", pid, file_length)); + +- if (0 != sk_printf(&f->conn, "EndMessage\n")) { ++ if (0 != sk_printf(&f->conn, "EndMessage\r\n")) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent EndMessage\n", pid)); +@@ -2013,32 +2013,32 @@ int fcp_broadcast(fcp_t *f, int htl, + } + LOG(L_DEBUG,("{%d} sent 00 00 00 02\n", pid)); + +- if (0 != sk_printf(&f->conn, "ClientBroadcast\n")) { ++ if (0 != sk_printf(&f->conn, "ClientBroadcast\r\n")) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent ClientBroadcast\n", pid)); + +- if (0 != sk_printf(&f->conn, "HopsToLive=%x\n", htl)) { ++ if (0 != sk_printf(&f->conn, "HopsToLive=%x\r\n", htl)) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent HopsToLive=%x\n", pid, htl)); + +- if (0 != sk_printf(&f->conn, "Channel=%s\n", channel)) { ++ if (0 != sk_printf(&f->conn, "Channel=%s\r\n", channel)) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent Channel=%s\n", pid, channel)); + +- if (0 != sk_printf(&f->conn, "Sender=%s\n", sender)) { ++ if (0 != sk_printf(&f->conn, "Sender=%s\r\n", sender)) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent Sender=%s\n", pid, sender)); + +- if (0 != sk_printf(&f->conn, "Payload=%s\n", payload)) { ++ if (0 != sk_printf(&f->conn, "Payload=%s\r\n", payload)) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent Payload=%s\n", pid, payload)); + +- if (0 != sk_printf(&f->conn, "EndMessage\n")) { ++ if (0 != sk_printf(&f->conn, "EndMessage\r\n")) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent EndMessage\n", pid)); +@@ -2101,17 +2101,17 @@ int fcp_receive(fcp_t *f, int id) + } + LOG(L_DEBUG,("{%d} sent 00 00 00 02\n", pid)); + +- if (0 != sk_printf(&f->conn, "ClientReceive\n")) { ++ if (0 != sk_printf(&f->conn, "ClientReceive\r\n")) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent ClientReceive\n", pid)); + +- if (0 != sk_printf(&f->conn, "ID=%x\n", id)) { ++ if (0 != sk_printf(&f->conn, "ID=%x\r\n", id)) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent ID=%x\n", pid, id)); + +- if (0 != sk_printf(&f->conn, "EndMessage\n")) { ++ if (0 != sk_printf(&f->conn, "EndMessage\r\n")) { + goto bailout; + } + LOG(L_DEBUG,("{%d} sent EndMessage\n", pid)); diff --git a/net/freenet-tools/patches/patch-ab b/net/freenet-tools/patches/patch-ab deleted file mode 100644 index 7de9a8f11c9..00000000000 --- a/net/freenet-tools/patches/patch-ab +++ /dev/null @@ -1,31 +0,0 @@ -$NetBSD: patch-ab,v 1.1 2004/10/29 17:06:50 tv Exp $ - ---- ft.h.orig Thu May 20 06:31:46 2004 -+++ ft.h -@@ -44,7 +44,6 @@ - #include <dirent.h> - - #ifdef __CYGWIN__ --#define timegm(x) cyg_timegm(x) - #define OPEN_RB "rb" - #define OPEN_WB "wb" - #else -@@ -111,8 +110,16 @@ enum { - #define UNKNOWNERROR "UNKNOWN" - #endif - --#ifdef __CYGWIN__ --time_t cyg_timegm(struct tm *tm); -+#if defined(__CYGWIN__) || defined(__INTERIX) -+time_t timegm(struct tm *tm); -+#endif -+ -+#ifdef __INTERIX -+#define socklen_t int -+#define strtoull _strtouq -+ -+/* hidden version of strtoull() in libc */ -+u_quad_t _strtouq(const char *, char **, int); - #endif - - #ifdef __cplusplus |