From owner-svn-ports-head@freebsd.org Tue Jun 27 16:51:57 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0131FD8AB06; Tue, 27 Jun 2017 16:51:57 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D142B73C83; Tue, 27 Jun 2017 16:51:56 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RGptvP012451; Tue, 27 Jun 2017 16:51:55 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RGptRc012449; Tue, 27 Jun 2017 16:51:55 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201706271651.v5RGptRc012449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Tue, 27 Jun 2017 16:51:55 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r444511 - in head/net/mpd5: . files X-SVN-Group: ports-head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: in head/net/mpd5: . files X-SVN-Commit-Revision: 444511 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 16:51:57 -0000 Author: eugen Date: Tue Jun 27 16:51:55 2017 New Revision: 444511 URL: https://svnweb.freebsd.org/changeset/ports/444511 Log: - Add new patch from upstream to improve stability of the daemon; - simplify PORTDOCS and avoid usage of != in port's Makefile; - add LICENSE; - take maintainership; - bump PORTREVISION. Added: head/net/mpd5/files/patch-console.c (contents, props changed) Modified: head/net/mpd5/Makefile Modified: head/net/mpd5/Makefile ============================================================================== --- head/net/mpd5/Makefile Tue Jun 27 16:19:19 2017 (r444510) +++ head/net/mpd5/Makefile Tue Jun 27 16:51:55 2017 (r444511) @@ -3,14 +3,17 @@ PORTNAME= mpd DISTVERSION= 5.8 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= SF/${PORTNAME}/Mpd5/Mpd-${PORTVERSION} PKGNAMESUFFIX= 5 DIST_SUBDIR= mpd5 -MAINTAINER= mav@FreeBSD.org +MAINTAINER= eugen@FreeBSD.org COMMENT= Multi-link PPP daemon based on netgraph(4) +LICENSE= BSD + OPTIONS_DEFINE= NG_IPACCT NG_IPACCT_DESC= Use ng_ipacct kernel module from port @@ -31,11 +34,9 @@ RUN_DEPENDS+= /boot/modules/ng_ipacct.ko:net-mgmt/ng_i .endif USE_RC_SUBR= mpd5 -HTMLNUM!= jot 70 1 CONFSUF= conf secret script DOCSDIR= ${PREFIX}/share/doc/mpd5 -PORTDOCS= ${HTMLNUM:S/^/mpd/:S/$/.html/} mpd.html mpd.ps README \ - mpd_toc.html +PORTDOCS= README mpd* PLIST_FILES= ${CONFSUF:S/^/etc\/mpd5\/mpd./:S/$/.sample/} sbin/mpd5 .if !defined(WITHOUT_MAN) Added: head/net/mpd5/files/patch-console.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/mpd5/files/patch-console.c Tue Jun 27 16:51:55 2017 (r444511) @@ -0,0 +1,76 @@ +--- src/console.h.orig 2016-01-06 22:42:06.000000000 +0700 ++++ src/console.h 2017-06-16 21:12:59.268715000 +0700 +@@ -119,6 +119,7 @@ + extern int ConsoleStat(Context ctx, int ac, char *av[], void *arg); + extern Context StdConsoleConnect(Console c); + extern void ConsoleShutdown(Console c); ++ extern void ConsoleCancelCleanup(void *rwlock); + + extern int UserCommand(Context ctx, int ac, char *av[], void *arg); + extern int UserStat(Context ctx, int ac, char *av[], void *arg); +--- src/console.c.orig 2016-01-06 22:42:06.000000000 +0700 ++++ src/console.c 2017-06-16 21:54:48.919442000 +0700 +@@ -175,6 +175,14 @@ ConsoleClose(Console c) + return 0; + } + ++void ++ConsoleCancelCleanup(void *rwlock) ++{ ++ pthread_rwlock_t p = (pthread_rwlock_t)rwlock; ++ ++ RWLOCK_UNLOCK(p); ++} ++ + /* + * ConsoleStat() + */ +@@ -192,13 +200,14 @@ ConsoleStat(Context ctx, int ac, char *a + Printf("\tIP-Address : %s\r\n", u_addrtoa(&c->addr,addrstr,sizeof(addrstr))); + Printf("\tPort : %d\r\n", c->port); + ++ pthread_cleanup_push(ConsoleCancelCleanup, c->lock); + RWLOCK_RDLOCK(c->lock); + Printf("Active sessions:\r\n"); + SLIST_FOREACH(s, &c->sessions, next) { + Printf("\tUsername: %s\tFrom: %s\r\n", + s->user.username, u_addrtoa(&s->peer_addr,addrstr,sizeof(addrstr))); + } +- RWLOCK_UNLOCK(c->lock); ++ pthread_cleanup_pop(1); + + Printf("Global options:\r\n"); + OptStat(ctx, &c->options, gConfList); +@@ -905,13 +914,14 @@ UserStat(Context ctx, int ac, char *av[] + ConsoleUser u; + + Printf("Configured users:\r\n"); ++ pthread_cleanup_push(ConsoleCancelCleanup, gUsersLock); + RWLOCK_RDLOCK(gUsersLock); + ghash_walk_init(gUsers, &walk); + while ((u = ghash_walk_next(gUsers, &walk)) != NULL) { + Printf("\tUsername: %-15s Priv: %s\r\n", u->username, + ((u->priv == 2)?"admin":((u->priv == 1)?"operator":"user"))); + } +- RWLOCK_UNLOCK(gUsersLock); ++ pthread_cleanup_pop(1); + + return 0; + } +--- src/log.c.orig 2016-01-06 22:42:06.000000000 +0700 ++++ src/log.c 2017-06-16 21:16:19.643625000 +0700 +@@ -256,12 +256,13 @@ vLogPrintf(const char *fmt, va_list args + #ifdef SYSLOG_FACILITY + syslog(LOG_INFO, "%s", buf); + #endif ++ pthread_cleanup_push(ConsoleCancelCleanup, gConsole.lock); + RWLOCK_RDLOCK(gConsole.lock); + SLIST_FOREACH(s, &gConsole.sessions, next) { + if (Enabled(&s->options, CONSOLE_LOGGING)) + s->write(s, "%s\r\n", buf); + } +- RWLOCK_UNLOCK(gConsole.lock); ++ pthread_cleanup_pop(1); + #ifdef SYSLOG_FACILITY + } else { + vsyslog(LOG_INFO, fmt, args);