From owner-svn-ports-head@FreeBSD.ORG Mon Oct 7 14:11:46 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 07A84411; Mon, 7 Oct 2013 14:11:46 +0000 (UTC) (envelope-from danilo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DA2402694; Mon, 7 Oct 2013 14:11:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r97EBjhq045469; Mon, 7 Oct 2013 14:11:45 GMT (envelope-from danilo@svn.freebsd.org) Received: (from danilo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r97EBik5045463; Mon, 7 Oct 2013 14:11:44 GMT (envelope-from danilo@svn.freebsd.org) Message-Id: <201310071411.r97EBik5045463@svn.freebsd.org> From: Danilo Egea Gondolfo Date: Mon, 7 Oct 2013 14:11:44 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r329707 - in head/security/sancp: . files X-SVN-Group: ports-head 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.14 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: Mon, 07 Oct 2013 14:11:46 -0000 Author: danilo Date: Mon Oct 7 14:11:44 2013 New Revision: 329707 URL: http://svnweb.freebsd.org/changeset/ports/329707 Log: - Increment PORTREVISION [1] - Add LICENSE [1] - Minor changes in files/{pkg-message.in, sancp.in} [1] - Add stage support [1] - Remove indefinite article from COMMENT - Fix build with clang PR: ports/182445 Submitted by: Paul Schmehl (maintainer) [1] Approved by: wg/culot (mentors, implicit) Added: head/security/sancp/files/patch-sancp.cc (contents, props changed) Modified: head/security/sancp/Makefile head/security/sancp/files/pkg-message.in head/security/sancp/files/sancp.in head/security/sancp/pkg-plist Modified: head/security/sancp/Makefile ============================================================================== --- head/security/sancp/Makefile Mon Oct 7 14:04:05 2013 (r329706) +++ head/security/sancp/Makefile Mon Oct 7 14:11:44 2013 (r329707) @@ -4,36 +4,45 @@ PORTNAME= sancp PORTVERSION= 1.6.1 DISTVERSIONSUFFIX= -stable -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= security MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}-stable MAINTAINER= pauls@utdallas.edu -COMMENT= A network connection profiler +COMMENT= Network connection profiler + +LICENSE= QPLv1 +LICENSE_NAME= Q PUBLIC LICENSE v1.0 +LICENSE_FILE= ${WRKSRC}/LICENSE +LICENSE_PERMS= auto-accept ALL_TARGET= bsd USE_RC_SUBR= sancp -SUB_FILES= pkg-message +LOG_DIR= /var/log/sancp +PLIST_SUB+= LOG_DIR=${LOG_DIR} USERS= sancp GROUPS= sancp -PORTDOCS= CHANGES INSTALL ISSUES README \ - SETUP fields.LIST LICENSE +OPTIONS_DEFINE= DOCS + +PORTDOCS= CHANGES INSTALL ISSUES \ + README SETUP fields.LIST + +MAKE_ARGS= CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \ + LFLAGS="${LDFLAGS}" -NO_STAGE= yes -post-extract: - @cd ${WRKSRC} && ${MV} LICENSE docs/ +post-patch: + @${REINPLACE_CMD} -e 's|gcc|$${CC}|g ; s|g++|$${CXX}|g' \ + ${WRKSRC}/Makefile do-install: - @${INSTALL_PROGRAM} ${WRKSRC}/sancp ${PREFIX}/bin - @${INSTALL_DATA} ${WRKSRC}/etc/sancp/sancp.conf ${PREFIX}/etc/sancp.conf-dist - @${CP} -n ${PREFIX}/etc/sancp.conf-dist ${PREFIX}/etc/sancp.conf || ${TRUE} - -.if !defined(NOPORTDOCS) - @${INSTALL} -d ${DOCSDIR}/ - cd ${WRKSRC}/docs/ && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} -.endif - @${CAT} ${PKGMESSAGE} + @${INSTALL_PROGRAM} ${WRKSRC}/sancp \ + ${STAGEDIR}${PREFIX}/bin + @${INSTALL_DATA} ${WRKSRC}/etc/sancp/sancp.conf \ + ${STAGEDIR}${PREFIX}/etc/sancp.conf.dist + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/docs/|} ${STAGEDIR}${DOCSDIR} + ${INSTALL} -m 750 -d ${STAGEDIR}${LOG_DIR} .include Added: head/security/sancp/files/patch-sancp.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/sancp/files/patch-sancp.cc Mon Oct 7 14:11:44 2013 (r329707) @@ -0,0 +1,15 @@ +--- sancp.cc.orig 2013-10-04 17:55:19.000000000 +0000 ++++ sancp.cc 2013-10-04 17:56:55.000000000 +0000 +@@ -271,10 +271,10 @@ + /******************************************************************* + * Function for C code to call C++ code (used by pcap_functions.c) * + *******************************************************************/ +- ++ + extern "C" void ProcessMyPacket(char *user, struct pcap_pkthdr * pkthdr, u_char * pkt) + { +- extern struct gvars gVars; ++ struct gvars gVars; + CBuffer *buffer; + struct cnx *new_cnx=0; + gVars.timeptr.tv_sec=pkthdr->ts.tv_sec; Modified: head/security/sancp/files/pkg-message.in ============================================================================== --- head/security/sancp/files/pkg-message.in Mon Oct 7 14:04:05 2013 (r329706) +++ head/security/sancp/files/pkg-message.in Mon Oct 7 14:11:44 2013 (r329707) @@ -20,9 +20,5 @@ sancp.conf has been altered (you used sa new conf file, named sguil-sancp.conf-sample will be installed in the %%PREFIX%%/etc directory. You should use that one for sguil. -All of the configuration options for sancp are documented in the -startup script in %%PREFIX%%/etc/rc.d (don't forget to specify interface -in /etc/rc.conf) - If you're running sguil, you probably want to use at least the following flags: sancp_flags="-D -P -R -u sancp -g sancp -d /var/log/sancp" Modified: head/security/sancp/files/sancp.in ============================================================================== --- head/security/sancp/files/sancp.in Mon Oct 7 14:04:05 2013 (r329706) +++ head/security/sancp/files/sancp.in Mon Oct 7 14:11:44 2013 (r329707) @@ -16,41 +16,6 @@ # Default: %%PREFIX%%/etc/sancp.conf # sancp_interface (str): Default: none - MUST BE SET # -# Command Line Options: (cmdline) -# --------------------- -# -# -? or -h this help screen -# -c specify the configuration/rules filename -# -d specify the directory for output files -# -i set the network device to listen on (default: 'any') -# -g set a group identity -# -u set a user identity -# -r pcap file to read (overrides -i) -# -B "" set a bpf expression (alternative to -F ) -# -D (daemon) forks, prints msgs to syslog only and overrides -C option -# -K (console) enable additional printing of 'realtimes' to stdout (suppressed by option -D) -# -F file containing a bpf filter expression, overrides (alternative to -B) -# -H --human-readable write IP addresses in dotted notation and TCPflag fields in hex -# -R Set default for realtime to 'pass' (default is 'log') disables realtime, but rules can override -# -S Set default for stats to 'pass' (default is 'log') disables stats, but rules can override -# -P Set default for pcap to 'pass' (default is 'log') disables pcap, but rules can override -# -I or --enable_icmp_mixed record 'code' and 'type' fields for ICMP -# to the fields 's_port' and 'd_port'. -# note: affects how related icmp packets are correlated -# -V display version -# --shift (debug) force interpretation of packet starting at byte[2] -# normally performed when reading from the 'any' interface -# --strip-80211 strip 802.1Q headers from 802.1Q packets; used to -# decode 802.1Q encapsulated packets - affects -A option, -# --log-facility where facility can be 'LOCAL1' - 'LOCAL7' -# The default log facility used by SANCP is LOG_DAEMON -# -# Debug mode for pcap data logging -# -A records ALL traffic frames to a pcap file named 'debug_pcap_raw' -# (despite rules). Packets are logged here prior to decoding or handling. -# Use -F or -B option to restrict what is collectedi. -# Pcap data logged using this option is affected by the --strip-80211 cmdline option -# The configuration file equivalent to this is 'default debug_pcap_raw enable' . /etc/rc.subr Modified: head/security/sancp/pkg-plist ============================================================================== --- head/security/sancp/pkg-plist Mon Oct 7 14:04:05 2013 (r329706) +++ head/security/sancp/pkg-plist Mon Oct 7 14:11:44 2013 (r329707) @@ -1,4 +1,5 @@ bin/sancp -@unexec if cmp -s %D/etc/sancp.conf %D/etc/sancp.conf-dist; then rm -f %D/etc/sancp.conf; fi -etc/sancp.conf-dist -@exec cp -n %D/%F %B/sancp.conf +@unexec if cmp -s %D/etc/sancp.conf %D/etc/sancp.conf.dist ; then rm -f %D/etc/sancp.conf ; fi +etc/sancp.conf.dist +@exec if [ ! -f %D/etc/sancp.conf ] ; then cp -p %D/%F %B/sancp.conf; fi +@dirrmtry /var/log/sancp