Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jan 2015 12:31:14 +0000 (UTC)
From:      Muhammad Moinur Rahman <bofh@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r376921 - in head/security/sancp: . files
Message-ID:  <201501131231.t0DCVEl9074949@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bofh
Date: Tue Jan 13 12:31:13 2015
New Revision: 376921
URL: https://svnweb.freebsd.org/changeset/ports/376921
QAT: https://qat.redports.org/buildarchive/r376921/

Log:
  security/sancp: Ports cleanup
  
  - Unmute INSTALL_*
  - Wrap conditional DOCS installation
  - Remove pkg-install/pkg-deinstall as those have been shifted to @dir
    framework
  - Update pkg-plist to make proper use of @sample and @dir
  - Pass Maintainership [1]
  
  Differential Revision:	https://reviews.freebsd.org/D1511
  Submitted by:		pauls@utdallas.edu [1]
  Approved by:		marino(mentor)

Deleted:
  head/security/sancp/pkg-deinstall
  head/security/sancp/pkg-install
Modified:
  head/security/sancp/Makefile
  head/security/sancp/files/pkg-message.in
  head/security/sancp/pkg-plist

Modified: head/security/sancp/Makefile
==============================================================================
--- head/security/sancp/Makefile	Tue Jan 13 12:24:07 2015	(r376920)
+++ head/security/sancp/Makefile	Tue Jan 13 12:31:13 2015	(r376921)
@@ -4,11 +4,11 @@
 PORTNAME=	sancp
 PORTVERSION=	1.6.1
 DISTVERSIONSUFFIX=	-stable
-PORTREVISION=	5
+PORTREVISION=	6
 CATEGORIES=	security
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}-stable
 
-MAINTAINER=	pauls@utdallas.edu
+MAINTAINER=	bofh@FreeBSD.org
 COMMENT=	Network connection profiler
 
 LICENSE=	QPLv1
@@ -18,8 +18,6 @@ LICENSE_PERMS=	dist-mirror dist-sell pkg
 
 ALL_TARGET=	bsd
 USE_RC_SUBR=	sancp
-LOG_DIR=	/var/log/sancp
-PLIST_SUB+=	LOG_DIR=${LOG_DIR}
 
 USERS=		sancp
 GROUPS=		sancp
@@ -31,18 +29,23 @@ PORTDOCS=	CHANGES INSTALL ISSUES \
 
 MAKE_ARGS=	CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
 		LFLAGS="${LDFLAGS}"
+SUB_FILES=	pkg-message
+
+.include <bsd.port.options.mk>
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|gcc|$${CC}|g ; s|g++|$${CXX}|g' \
 		${WRKSRC}/Makefile
 
 do-install:
-	@${INSTALL_PROGRAM} ${WRKSRC}/sancp \
+	${INSTALL_PROGRAM} ${WRKSRC}/sancp \
 		${STAGEDIR}${PREFIX}/bin
-	@${INSTALL_DATA} ${WRKSRC}/etc/sancp/sancp.conf \
-		${STAGEDIR}${PREFIX}/etc/sancp.conf.dist
+	${INSTALL_DATA} ${WRKSRC}/etc/sancp/sancp.conf \
+		${STAGEDIR}${PREFIX}/etc/sancp.conf.sample
+	${MKDIR} ${STAGEDIR}/var/log/sancp
+.if ${PORT_OPTIONS:MDOCS}
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/docs/|} ${STAGEDIR}${DOCSDIR}
-	${INSTALL} -m 750 -d ${STAGEDIR}${LOG_DIR}
+.endif
 
 .include <bsd.port.mk>

Modified: head/security/sancp/files/pkg-message.in
==============================================================================
--- head/security/sancp/files/pkg-message.in	Tue Jan 13 12:24:07 2015	(r376920)
+++ head/security/sancp/files/pkg-message.in	Tue Jan 13 12:31:13 2015	(r376921)
@@ -6,19 +6,13 @@ A startup script was installed in %%PREF
 in /etc/rc.conf using the usual rc.subr syntax.  See rc.conf(5) or go to
 http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-rcng.html
 
-Configuration files named sancp.conf-dist and sancp.conf
+Configuration files named sancp.conf.sample and sancp.conf
 were installed in %%PREFIX%%/etc.  See the INSTALL doc, located in
 %%PREFIX%%/share/doc/sancp/ for details on configuration
 options or type "sancp -h" on the commandline.
 
-Note that if you are installing sancp for use with sguil, the
-sancp.conf file will not be altered unless it is identical to
-the sancp.conf-dist file.  In that case, during the
-sguil-sensor install, the sancp.conf file will be overwritten with
-the one that comes with squil.  That file needs no editing.  If the
-sancp.conf has been altered (you used sancp for something else) a
-new conf file, named sguil-sancp.conf-sample will be installed in the
-%%PREFIX%%/etc directory.  You should use that one for sguil.
+Note that if you are installing sancp for use with sguil, you should use the
+the one that came with sguil in %%PREFIX%%/etc/sguil-sensor directory.
 
 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"
+sancp_flags="-D -P -R -u sancp -g sancp -d /var/log/sancp -c %%PREFIX%%/etc/sguil-sensor/sancp.conf"

Modified: head/security/sancp/pkg-plist
==============================================================================
--- head/security/sancp/pkg-plist	Tue Jan 13 12:24:07 2015	(r376920)
+++ head/security/sancp/pkg-plist	Tue Jan 13 12:31:13 2015	(r376921)
@@ -1,5 +1,3 @@
 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 if [ ! -f %D/etc/sancp.conf ] ; then cp -p %D/%F %B/sancp.conf; fi
-@dirrmtry /var/log/sancp
+@sample etc/sancp.conf.sample
+@dir(sancp,sancp,750) /var/log/sancp



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501131231.t0DCVEl9074949>