net-mgmt/ccnet: Upgrade version 3.1.4 => 4.0.6

PR:		197979
Submitted by:	maintainer (JingFeng Yan)
This commit is contained in:
John Marino 2015-03-01 17:19:46 +00:00
parent ec2aebba99
commit f65a191ed1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=380214
12 changed files with 121 additions and 160 deletions

View file

@ -1,8 +1,8 @@
# $FreeBSD$
PORTNAME= ccnet
PORTVERSION= 3.1.4
PORTREVISION= 4
PORTVERSION= 4.0.6
PORTREVISION= 5
CATEGORIES= net-mgmt devel
MAINTAINER= yan_jingfeng@yahoo.com
@ -23,8 +23,8 @@ LIB_DEPENDS= libsearpc.so:${PORTSDIR}/devel/libsearpc \
USE_GITHUB= yes
GH_ACCOUNT= haiwen
GH_TAGNAME= v3.1.4
GH_COMMIT= 6b55658
GH_TAGNAME= v${PORTVERSION}-server
GH_COMMIT= 1e1aeae
USES= autoreconf libtool pkgconfig pathfix python:2
PATHFIX_MAKEFILEIN= Makefile.am

View file

@ -1,2 +1,2 @@
SHA256 (ccnet-3.1.4.tar.gz) = 5838cff989fe1910aeda5a2801f331d479f76e7d2c00cb8d87f016a7e9b0ea8d
SIZE (ccnet-3.1.4.tar.gz) = 216920
SHA256 (ccnet-4.0.6.tar.gz) = 4030d931c2aaad5d2d783c4afb2e2cda556a91307c26a378c91602540255b7eb
SIZE (ccnet-4.0.6.tar.gz) = 218569

View file

@ -0,0 +1,18 @@
--- Makefile.am.orig 2015-01-27 22:28:22.000000000 -0500
+++ Makefile.am 2015-01-27 22:33:35.000000000 -0500
@@ -24,9 +24,13 @@
install-data-local:
if MACOS
sed -i '' -e "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles)
+else
+if BSD
+ sed -i '' "s|(DESTDIR)|${PREFIX}|g" $(pcfiles)
else
${SED} -i "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles)
endif
+endif
dist-hook:
- git log --format='%H' -1 > $(distdir)/latest_commit
\ No newline at end of file
+ git log --format='%H' -1 > $(distdir)/latest_commit

View file

@ -1,11 +1,78 @@
--- configure.ac.orig 2014-06-10 04:41:45.000000000 -0400
+++ configure.ac 2014-08-26 18:17:12.161128916 -0400
@@ -218,7 +218,7 @@
LIB_GDI32=
LIB_RT=
--- configure.ac.orig 2014-12-03 21:47:39.000000000 -0500
+++ configure.ac 2015-01-27 23:56:25.000000000 -0500
@@ -51,8 +51,16 @@
AC_MSG_RESULT(no)
fi
+AC_MSG_CHECKING(for BSD)
+if test `uname | grep -e BSD -e DragonFly | wc -l` = "1"; then
+ bbsd=true
+ AC_MSG_RESULT(compile in BSD)
+else
+ AC_MSG_RESULT(no)
+fi
+
AC_MSG_CHECKING(for Linux)
-if test "$bmac" != "true" -a "$bwin32" != "true"; then
+if test "$bmac" != "true" -a "$bwin32" != "true" -a "$bbsd" != "true"; then
blinux=true
AC_MSG_RESULT(compile in linux)
else
@@ -154,6 +162,7 @@
AM_CONDITIONAL([WIN32], [test "$bwin32" = "true"])
AM_CONDITIONAL([MACOS], [test "$bmac" = "true"])
AM_CONDITIONAL([LINUX], [test "$blinux" = "true"])
+AM_CONDITIONAL([BSD], [test "$bbsd" = "true"])
# check libraries
@@ -192,6 +201,7 @@
LIBS=
LIB_RESOLV=
LIB_UUID=-lrpcrt4
+ LIB_KVM=
LIB_IPHLPAPI=-liphlpapi
LIB_SHELL32=-lshell32
LIB_PSAPI=-lpsapi
@@ -204,11 +214,25 @@
LIB_INTL=
- LIB_RESOLV=-lresolv
+ LIB_RESOLV=
LIB_UUID=-luuid
LIB_RESOLV=-lresolv
LIB_UUID=
+ LIB_KVM=
LIB_IPHLPAPI=
LIB_SHELL32=
LIB_PSAPI=
MSVC_CFLAGS=
LIB_DIRWATCH="-framework CoreServices"
+elif test "$bbsd" = true ; then
+ LIB_WS32=
+ LIB_GDI32=
+ LIB_RT=
+ LIB_INTL=
+ LIB_RESOLV=
+ LIB_UUID=-luuid
+ LIB_KVM=-lkvm
+ LIB_IPHLPAPI=
+ LIB_SHELL32=
+ LIB_PSAPI=
+ MSVC_CFLAGS=
+ LIB_DIRWATCH=
else
LIB_WS32=
LIB_GDI32=
@@ -216,6 +240,7 @@
LIB_INTL=
LIB_RESOLV=-lresolv
LIB_UUID=-luuid
+ LIB_KVM=
LIB_IPHLPAPI=
LIB_SHELL32=
LIB_PSAPI=
@@ -229,6 +254,7 @@
AC_SUBST(LIB_INTL)
AC_SUBST(LIB_RESOLV)
AC_SUBST(LIB_UUID)
+AC_SUBST(LIB_KVM)
AC_SUBST(LIB_IPHLPAPI)
AC_SUBST(LIB_SHELL32)
AC_SUBST(LIB_PSAPI)

View file

@ -1,55 +1,10 @@
--- lib/Makefile.am.orig 2014-11-11 10:10:39.971972968 -0500
+++ lib/Makefile.am 2014-11-11 10:37:36.712929368 -0500
@@ -19,7 +19,6 @@
peer-common.h \
string-util.h \
libccnet_utils.h \
- ccnet-object.h \
rpc-common.h \
net.h \
utils.h \
@@ -60,12 +59,14 @@
--- lib/Makefile.am.orig 2015-01-27 22:48:22.000000000 -0500
+++ lib/Makefile.am 2015-01-27 22:49:06.000000000 -0500
@@ -61,6 +61,7 @@
libccnetd_la_LDFLAGS = -no-undefined
libccnetd_la_LIBADD = @GLIB2_LIBS@ @GOBJECT_LIBS@ @SSL_LIBS@ @LIB_GDI32@ \
- -lsqlite3 -levent @LIB_WS32@ @LIB_UUID@ \
+ -lsqlite3 -levent @LIB_WS32@ @LIB_UUID@ -lkvm \
-lsqlite3 @LIBEVENT_LIBS@ @LIB_WS32@ @LIB_UUID@ \
+ @LIB_KVM@ \
@LIB_SHELL32@ @LIB_PSAPI@ @SEARPC_LIBS@
ccnet_object_define = ccnetobj.vala
+valac_gen = ccnetobj.c ccnet-object.h
+
ccnet-client.c: ccnet-object.h
ccnet-object.h: ${ccnet_object_define}
@@ -78,15 +79,23 @@
searpc_gen = searpc-signature.h searpc-marshal.h
-gensource: ${searpc_gen}
+gensource: ${searpc_gen} ${valac_gen}
-${searpc_gen}: $(top_srcdir)/lib/rpc_table.py
+rpc_table.stamp: ${top_srcdir}/lib/rpc_table.py
+ @rm -f rpc_table.tmp
+ @touch rpc_table.tmp
@echo "[libsearpc]: generating rpc header files"
- @PYTHON@ `which searpc-codegen.py` $(top_srcdir)/lib/rpc_table.py
+ @PYTHON@ `which searpc-codegen.py` ${top_srcdir}/lib/rpc_table.py
@echo "[libsearpc]: done"
+ @mv -f rpc_table.tmp $@
+
+${searpc_gen}: rpc_table.stamp
clean-local:
rm -f ${searpc_gen}
- rm -f $(top_srcdir)/lib/rpc_table.pyc
+ rm -f rpc_table.pyc
+ rm -f rpc_table.stamp
+ rm -f rpc_table.tmp
+ rm -f ${valac_gen}
-CLEANFILES = ${searpc_gen}
+CLEANFILES = ${searpc_gen} ${valac_gen}

View file

@ -1,11 +1,14 @@
--- lib/net.c.orig 2014-09-02 21:06:10.181095833 -0400
+++ lib/net.c 2014-09-02 21:06:40.052390263 -0400
@@ -154,7 +154,7 @@
--- lib/net.c.orig 2015-01-27 23:18:59.000000000 -0500
+++ lib/net.c 2015-01-27 23:23:04.000000000 -0500
@@ -152,7 +152,11 @@
snprintf (buf, sizeof(buf), "%d", port);
- if ( (n = getaddrinfo(NULL, buf, &hints, &res) ) != 0) {
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ if ( (n = getaddrinfo("0.0.0.0", buf, &hints, &res) ) != 0) {
+#else
if ( (n = getaddrinfo(NULL, buf, &hints, &res) ) != 0) {
+#endif
ccnet_warning ("getaddrinfo fails: %s\n", gai_strerror(n));
return -1;
}

View file

@ -1,5 +1,5 @@
--- lib/utils.c.orig 2014-07-31 06:20:28.000000000 -0400
+++ lib/utils.c 2014-11-21 23:06:33.789257323 -0500
--- lib/utils.c.orig 2015-01-27 23:13:50.000000000 -0500
+++ lib/utils.c 2015-01-27 23:18:04.000000000 -0500
@@ -43,6 +43,16 @@
#include <event2/util.h>
@ -17,11 +17,12 @@
extern int inet_pton(int af, const char *src, void *dst);
@@ -1465,14 +1475,19 @@
@@ -1465,14 +1475,20 @@
}
#endif /* ifdef WIN32 */
-#ifdef __linux__
+
/* read the link of /proc/123/exe and compare with `process_name' */
static int
-find_process_in_dirent(struct dirent *dir, const char *process_name)
@ -39,7 +40,7 @@
return -1;
}
@@ -1496,7 +1511,8 @@
@@ -1496,7 +1512,8 @@
}
/* read the /proc fs to determine whether some process is running */
@ -49,7 +50,7 @@
{
DIR *proc_dir = opendir("/proc");
if (!proc_dir) {
@@ -1510,7 +1526,7 @@
@@ -1510,7 +1527,7 @@
/* /proc/[1-9][0-9]* */
if (first > '9' || first < '1')
continue;
@ -58,7 +59,7 @@
if (pid > 0) {
closedir(proc_dir);
return TRUE;
@@ -1520,6 +1536,18 @@
@@ -1520,6 +1537,18 @@
closedir(proc_dir);
return FALSE;
}
@ -77,7 +78,7 @@
#endif
#ifdef __APPLE__
@@ -1530,6 +1558,108 @@
@@ -1530,6 +1559,108 @@
}
#endif

View file

@ -1,17 +0,0 @@
--- Makefile.am.orig 2014-07-21 07:24:46.000000000 -0400
+++ Makefile.am 2014-07-21 07:25:02.000000000 -0400
@@ -22,11 +22,7 @@
ACLOCAL_AMFLAGS = -I m4
install-data-local:
-if MACOS
- sed -i '' -e "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles)
-else
- sed -i "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles)
-endif
+ sed -i '' "s|(DESTDIR)|${PREFIX}|g" $(pcfiles)
dist-hook:
- git log --format='%H' -1 > $(distdir)/latest_commit
\ No newline at end of file
+ git log --format='%H' -1 > $(distdir)/latest_commit

View file

@ -1,5 +1,5 @@
--- net/common/getgateway.c.orig 2014-07-28 14:30:13.000000000 -0400
+++ net/common/getgateway.c 2014-07-28 14:30:29.000000000 -0400
--- net/common/getgateway.c.orig 2015-01-27 23:26:41.000000000 -0500
+++ net/common/getgateway.c 2015-01-27 23:27:58.000000000 -0500
@@ -34,7 +34,7 @@
#undef USE_SYSCTL_NET_ROUTE
#endif

View file

@ -1,45 +0,0 @@
--- net/common/processors/rcvcmd-proc.c.orig 2014-09-02 15:49:07.244090539 -0400
+++ net/common/processors/rcvcmd-proc.c 2014-09-02 15:52:55.749963338 -0400
@@ -221,7 +221,7 @@
int i;
commands = g_strsplit_set (line, " \t", 10);
- for (i=0, pcmd = commands; *pcmd; pcmd++)
+ for (i = 0, pcmd = commands; *pcmd; pcmd++)
i++;
if (i == 0) {
@@ -234,7 +234,6 @@
if (c == NULL) {
ccnet_processor_send_response (processor, SC_UNKNONW_CMD,
SS_UNKNONW_CMD, NULL, 0);
- return;
} else
c->handler (processor, i, commands);
@@ -534,7 +533,7 @@
ret = -1;
out:
- g_free (addr);
+ g_free (addr_port);
g_free (role);
g_free (peer_id);
if (peer) g_object_unref (peer);
@@ -707,6 +706,7 @@
if (addr_port) {
peer = ccnet_peer_manager_add_resolve_peer (
processor->session->peer_mgr, addr, port);
+ g_free (peer->intend_role);
peer->intend_role = g_strdup(role);
ccnet_processor_send_response (processor, SC_OK, SS_OK, NULL, 0);
ret = 0;
@@ -736,7 +736,7 @@
ret = -1;
out:
- g_free (addr);
+ g_free (addr_port);
g_free (role);
g_free (peer_id);
if (peer) g_object_unref (peer);

View file

@ -1,11 +0,0 @@
--- net/common/processors/service-proxy-proc.c.orig 2014-09-02 15:47:22.827928455 -0400
+++ net/common/processors/service-proxy-proc.c 2014-09-02 15:47:36.619949159 -0400
@@ -43,7 +43,7 @@
{
ServiceProxyPriv *priv = GET_PRIV(processor);
if (priv->name) {
- free (priv->name);
+ g_free (priv->name);
priv->name = NULL;
}

View file

@ -1,10 +0,0 @@
--- net/common/session.c.orig 2014-09-03 04:04:21.072122386 -0400
+++ net/common/session.c 2014-09-03 04:04:58.071390609 -0400
@@ -168,6 +168,7 @@
g_free (name);
g_free (user_name);
g_free (port_str);
+ g_free (lport_str);
#ifdef CCNET_SERVER
g_free (service_url);
#endif