From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Oct 29 16:10:19 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9758E16A4D0 for ; Fri, 29 Oct 2004 16:10:19 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7623E43D48 for ; Fri, 29 Oct 2004 16:10:19 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i9TGAJQh070124 for ; Fri, 29 Oct 2004 16:10:19 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i9TGAJbm070123; Fri, 29 Oct 2004 16:10:19 GMT (envelope-from gnats) Date: Fri, 29 Oct 2004 16:10:19 GMT Message-Id: <200410291610.i9TGAJbm070123@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: "Yuri Y. Bushmelev" Subject: Re: ports/73285: flow-tools port improvements X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Yuri Y. Bushmelev" List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Oct 2004 16:10:19 -0000 The following reply was made to PR ports/73285; it has been noted by GNATS. From: "Yuri Y. Bushmelev" To: freebsd-gnats-submit@FreeBSD.org, jay-dev@simcom.ru Cc: Subject: Re: ports/73285: flow-tools port improvements Date: Fri, 29 Oct 2004 20:02:27 +0400 Hmm... flow-tools postgresql support seems more buggy.. I rewrite first and last patches: ====== /usr/ports/net-mgmt/flow-tools/Makefile patch ====== --- Makefile.orig Fri Oct 29 16:08:11 2004 +++ Makefile Fri Oct 29 19:55:35 2004 @@ -25,6 +25,18 @@ flow-tag.1 flow-tools.1 flow-tools-examples.1 \ flow-xlate.1 +.if defined(WITH_PGSQL) +CONFIGURE_ARGS+= --with-pgsql=${PREFIX} +POSTGRESQL_PORT?= databases/postgresql7 +LIB_DEPENDS= pq.3:${PORTSDIR}/${POSTGRESQL_PORT} +.endif + +.if defined(WITH_MYSQL) +CONFIGURE_ARGS+= --with-mysql=${PREFIX} +USE_MYSQL= yes +DEFAULT_MYSQL_VER= 323 +.endif + post-patch: ${TOUCH} -r ${WRKSRC}/configure.in.orig ${WRKSRC}/configure.in ${REINPLACE_CMD}\ ====== end of patch ====== ====== /usr/ports/net-mgmt/flow-tools/files/patch-flow-export.c patch ====== --- flow-export.c.orig Fri Oct 29 19:27:49 2004 +++ flow-export.c Fri Oct 29 19:31:02 2004 @@ -115,13 +115,14 @@ struct jump format[] = {{format0}, {format1}, {format2}, {format3}, {format4}, {format5}}; +int debug=0; + int main(int argc, char **argv) { int i, format_index, ret, ascii_mask; struct ftio ftio; struct ftprof ftp; struct options opt; - int debug; /* init fterr */ fterr_setid(argv[0]); @@ -864,8 +865,7 @@ struct ftver ftv; char fields[1024], values[1024], query[3*1024]; char *rec; - char *db_host, *db_name, *db_table, *db_user, *db_pwd, *db_tmp, *tmp; - char *db_port; + char *db_host, *db_name, *db_table, *db_user, *db_pwd, *db_port, *tmp; int len; PGconn *conn; @@ -891,7 +891,7 @@ db_name = strsep(&tmp, ":"); db_table = strsep(&tmp, ":"); - if (!db_user || !db_pwd || !db_host || !db_tmp || !db_name || !db_table) { + if (!db_user || !db_pwd || !db_host || !db_port || !db_name || !db_table) { fterr_warnx("Missing field in dbaseURI, expecting user:pwd:host:port:name:table."); return -1; } @@ -1199,10 +1199,10 @@ if (xfields & FT_XFIELD_EXADDR) { if (comma) fmt_buf[len++] = ','; - if (quote) fmt_buf[len++] = '"'; + if (quote) fmt_buf[len++] = '\''; len += fmt_ipv4(fmt_buf+len, *((u_int32*)(rec+fo->exaddr)), FMT_JUST_LEFT); - if (quote) fmt_buf[len++] = '"'; + if (quote) fmt_buf[len++] = '\''; comma = 1; } @@ -1257,28 +1257,28 @@ if (xfields & FT_XFIELD_SRCADDR) { if (comma) fmt_buf[len++] = ','; - if (quote) fmt_buf[len++] = '"'; + if (quote) fmt_buf[len++] = '\''; len += fmt_ipv4(fmt_buf+len, *((u_int32*)(rec+fo->srcaddr)), FMT_JUST_LEFT); - if (quote) fmt_buf[len++] = '"'; + if (quote) fmt_buf[len++] = '\''; comma = 1; } if (xfields & FT_XFIELD_DSTADDR) { if (comma) fmt_buf[len++] = ','; - if (quote) fmt_buf[len++] = '"'; + if (quote) fmt_buf[len++] = '\''; len += fmt_ipv4(fmt_buf+len, *((u_int32*)(rec+fo->dstaddr)), FMT_JUST_LEFT); - if (quote) fmt_buf[len++] = '"'; + if (quote) fmt_buf[len++] = '\''; comma = 1; } if (xfields & FT_XFIELD_NEXTHOP) { if (comma) fmt_buf[len++] = ','; - if (quote) fmt_buf[len++] = '"'; + if (quote) fmt_buf[len++] = '\''; len += fmt_ipv4(fmt_buf+len, *((u_int32*)(rec+fo->nexthop)), FMT_JUST_LEFT); - if (quote) fmt_buf[len++] = '"'; + if (quote) fmt_buf[len++] = '\''; comma = 1; } @@ -1375,19 +1375,19 @@ if (xfields & FT_XFIELD_PEER_NEXTHOP) { if (comma) fmt_buf[len++] = ','; - if (quote) fmt_buf[len++] = '"'; + if (quote) fmt_buf[len++] = '\''; len += fmt_ipv4(fmt_buf+len, *((u_int32*)(rec+fo->peer_nexthop)), FMT_JUST_LEFT); - if (quote) fmt_buf[len++] = '"'; + if (quote) fmt_buf[len++] = '\''; comma = 1; } if (xfields & FT_XFIELD_ROUTER_SC) { if (comma) fmt_buf[len++] = ','; - if (quote) fmt_buf[len++] = '"'; + if (quote) fmt_buf[len++] = '\''; len += fmt_ipv4(fmt_buf+len, *((u_int32*)(rec+fo->router_sc)), FMT_JUST_LEFT); - if (quote) fmt_buf[len++] = '"'; + if (quote) fmt_buf[len++] = '\''; comma = 1; } ====== end of patch ====== -- WBR, Jay