Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jan 2018 15:38:23 +0000 (UTC)
From:      Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r460393 - in head/security/snoopy: . files
Message-ID:  <201801301538.w0UFcNUZ038813@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sunpoet
Date: Tue Jan 30 15:38:23 2018
New Revision: 460393
URL: https://svnweb.freebsd.org/changeset/ports/460393

Log:
  Update to 2.4.6
  
  - Update COMMENT
  - Add LICENSE_FILE
  - Strip shared library
  
  Changes:	https://github.com/a2o/snoopy/blob/master/ChangeLog

Added:
  head/security/snoopy/files/
  head/security/snoopy/files/patch-build-Makefile.am.common   (contents, props changed)
  head/security/snoopy/files/patch-build-snoopy.m4   (contents, props changed)
  head/security/snoopy/files/patch-configure.ac   (contents, props changed)
  head/security/snoopy/files/patch-src-configfile.c   (contents, props changed)
  head/security/snoopy/files/patch-src-datasource-sid.c   (contents, props changed)
  head/security/snoopy/files/patch-src-datasource-snoopy_version.c   (contents, props changed)
  head/security/snoopy/files/patch-src-output-socketoutput.c   (contents, props changed)
  head/security/snoopy/files/patch-src-snoopy.h   (contents, props changed)
  head/security/snoopy/files/patch-src-tsrm.c   (contents, props changed)
  head/security/snoopy/files/patch-tests-bin-snoopy-test-exec-in-threads.c   (contents, props changed)
  head/security/snoopy/files/patch-tests-bin-snoopy-test-threads.c   (contents, props changed)
  head/security/snoopy/pkg-plist   (contents, props changed)
Modified:
  head/security/snoopy/Makefile
  head/security/snoopy/distinfo

Modified: head/security/snoopy/Makefile
==============================================================================
--- head/security/snoopy/Makefile	Tue Jan 30 15:23:18 2018	(r460392)
+++ head/security/snoopy/Makefile	Tue Jan 30 15:38:23 2018	(r460393)
@@ -2,34 +2,39 @@
 # $FreeBSD$
 
 PORTNAME=	snoopy
-PORTVERSION=	1.9.0
+PORTVERSION=	2.4.6
 DISTVERSIONPREFIX=	${PORTNAME}-
 CATEGORIES=	security
 
 MAINTAINER=	sunpoet@FreeBSD.org
-COMMENT=	execve() wrapper and logger
+COMMENT=	Log every executed command to syslog
 
 LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/COPYING
 
+BUILD_DEPENDS=	bash:shells/bash
+TEST_DEPENDS=	socat:net/socat
+
 OPTIONS_DEFINE=	DOCS
 
+CONFIGURE_ARGS=	--disable-datasource-tid_kernel \
+		ac_cv_prog_SNOOPY_PROG_SOCAT_FOUND=yes
 GNU_CONFIGURE=	yes
-USES=		gmake
+INSTALL_TARGET=	install-strip
+USE_LDCONFIG=	yes
+USES=		autoreconf gmake libtool shebangfix
 
-PLIST_FILES=	bin/detect lib/snoopy.so
-PORTDOCS=	ChangeLog README.md TODO
-
 GH_ACCOUNT=	a2o
 USE_GITHUB=	yes
 
+SHEBANG_GLOB=	*.sh
+
 post-patch:
-	@${REINPLACE_CMD} '/^LIBS=/d' ${WRKSRC}/Makefile.in
-	@${REINPLACE_CMD} 's|/usr/local|${PREFIX}|g' ${WRKSRC}/README.md
+	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' ${WRKSRC}/README.md
 
-do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/detect ${STAGEDIR}${PREFIX}/bin/
-	${INSTALL_LIB} ${WRKSRC}/snoopy.so ${STAGEDIR}${PREFIX}/lib/
+do-install-DOCS-on:
 	${MKDIR} ${STAGEDIR}${DOCSDIR}/
-	cd ${WRKSRC}/ && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}/
+	cd ${WRKSRC}/ && ${INSTALL_DATA} ChangeLog README.md ${STAGEDIR}${DOCSDIR}/
+	cd ${WRKSRC}/doc/ && ${INSTALL_DATA} CONTRIBUTING.md FAQ.md FILTER_exclude_spawns_of.md HACKING.md INSTALL.md ${STAGEDIR}${DOCSDIR}/
 
 .include <bsd.port.mk>

Modified: head/security/snoopy/distinfo
==============================================================================
--- head/security/snoopy/distinfo	Tue Jan 30 15:23:18 2018	(r460392)
+++ head/security/snoopy/distinfo	Tue Jan 30 15:38:23 2018	(r460393)
@@ -1,2 +1,3 @@
-SHA256 (a2o-snoopy-snoopy-1.9.0_GH0.tar.gz) = f259dbd26a521eb0a6e1722ffc41d385436dfcbef1e6d45cfb1bc2863e9f4e2d
-SIZE (a2o-snoopy-snoopy-1.9.0_GH0.tar.gz) = 56543
+TIMESTAMP = 1475137530
+SHA256 (a2o-snoopy-snoopy-2.4.6_GH0.tar.gz) = c92919fbd959c19e2e7ae110705759bdf8b19a3ba215bd4dabfb820003bb057d
+SIZE (a2o-snoopy-snoopy-2.4.6_GH0.tar.gz) = 128845

Added: head/security/snoopy/files/patch-build-Makefile.am.common
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/snoopy/files/patch-build-Makefile.am.common	Tue Jan 30 15:38:23 2018	(r460393)
@@ -0,0 +1,8 @@
+--- build/Makefile.am.common.orig	2016-09-14 15:02:26 UTC
++++ build/Makefile.am.common
+@@ -9,4 +9,4 @@ MAINTAINERCLEANFILES = Makefile.in
+ # Note:
+ # -I$(top_srcdir) is here for #include 'lib/iniparser/src/iniparser.h' to work
+ #
+-AM_CFLAGS = -Wall -Werror -Wextra -Wno-unused-parameter -std=c99 -pedantic -I$(top_srcdir)
++AM_CFLAGS = -Wextra -Wno-unused-parameter -std=c99 -pedantic -I$(top_srcdir)

Added: head/security/snoopy/files/patch-build-snoopy.m4
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/snoopy/files/patch-build-snoopy.m4	Tue Jan 30 15:38:23 2018	(r460393)
@@ -0,0 +1,12 @@
+--- build/snoopy.m4.orig	2016-09-14 15:02:26 UTC
++++ build/snoopy.m4
+@@ -183,7 +183,8 @@ AU_DEFUN([SNOOPY_CONFIGURE_ENTITY_MSG],
+         [
+             dotLine="..................................................";
+             whatString="Snoopy $1 enabled: $3 ";
+-            whatStringPadded="$whatString${dotLine:${#whatString}}";
++            dotLine2=$(echo ${dotLine} | cut -d. -f${#whatString}-)
++            whatStringPadded="$whatString${dotLine2}";
+             if test "x$4" == "xyes"; then
+                 AC_MSG_NOTICE([$whatStringPadded YES])
+             elif test "x$4" == "xno"; then

Added: head/security/snoopy/files/patch-configure.ac
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/snoopy/files/patch-configure.ac	Tue Jan 30 15:38:23 2018	(r460393)
@@ -0,0 +1,30 @@
+--- configure.ac.orig	2016-09-14 15:02:26 UTC
++++ configure.ac
+@@ -30,7 +30,7 @@ AC_CONFIG_SRCDIR([src/eventsource/execve
+ AC_CONFIG_AUX_DIR([build/aux])
+ AC_CONFIG_MACRO_DIR([build/m4])
+ m4_include([build/snoopy.m4])
+-AM_INIT_AUTOMAKE([1.11 gnu silent-rules subdir-objects -Wall -Werror])
++AM_INIT_AUTOMAKE([1.11 gnu silent-rules subdir-objects])
+ 
+ 
+ ### Silent make output
+@@ -125,18 +125,11 @@ SNOOPY_PROG_CHECK([wc],       [WC],     
+ 
+ 
+ 
+-dnl Checks for libraries.
+-dnl FIXME: Replace `main' with a function in `-ldl':
+-AC_CHECK_LIB([dl], [dlsym], [], [
+-    AC_MSG_ERROR([A library is missing. Unable to continue.])
+-])
+-
+ dnl Checks for header files.
+ AC_CHECK_HEADERS([ \
+     ctype.h \
+     dlfcn.h \
+     errno.h \
+-    features.h \
+     grp.h \
+     limits.h \
+     pwd.h \

Added: head/security/snoopy/files/patch-src-configfile.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/snoopy/files/patch-src-configfile.c	Tue Jan 30 15:38:23 2018	(r460393)
@@ -0,0 +1,12 @@
+--- src/configfile.c.orig	2016-09-14 15:02:26 UTC
++++ src/configfile.c
+@@ -35,9 +35,6 @@
+ 
+ #include "lib/inih/src/ini.h"
+ 
+-#ifndef   _XOPEN_SOURCE   // For strdup
+-#define   _XOPEN_SOURCE   500
+-#endif
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>

Added: head/security/snoopy/files/patch-src-datasource-sid.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/snoopy/files/patch-src-datasource-sid.c	Tue Jan 30 15:38:23 2018	(r460393)
@@ -0,0 +1,10 @@
+--- src/datasource/sid.c.orig	2016-09-14 15:02:26 UTC
++++ src/datasource/sid.c
+@@ -30,7 +30,6 @@
+ #include "snoopy.h"
+ 
+ #ifndef   _XOPEN_SOURCE   /* Needed to get getpgid and getsid on older glibc */
+-#define   _XOPEN_SOURCE   500
+ #endif
+ #include <stdio.h>
+ #include <sys/types.h>

Added: head/security/snoopy/files/patch-src-datasource-snoopy_version.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/snoopy/files/patch-src-datasource-snoopy_version.c	Tue Jan 30 15:38:23 2018	(r460393)
@@ -0,0 +1,10 @@
+--- src/datasource/snoopy_version.c.orig	2016-09-14 15:02:26 UTC
++++ src/datasource/snoopy_version.c
+@@ -30,7 +30,6 @@
+ #include "snoopy.h"
+ 
+ #ifndef   _XOPEN_SOURCE   /* Needed to get getpgid and getsid on older glibc */
+-#define   _XOPEN_SOURCE   500
+ #endif
+ #include <stdio.h>
+ #include <sys/types.h>

Added: head/security/snoopy/files/patch-src-output-socketoutput.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/snoopy/files/patch-src-output-socketoutput.c	Tue Jan 30 15:38:23 2018	(r460393)
@@ -0,0 +1,10 @@
+--- src/output/socketoutput.c.orig	2016-09-14 15:02:26 UTC
++++ src/output/socketoutput.c
+@@ -30,7 +30,6 @@
+ #include "snoopy.h"
+ #include "configuration.h"
+ 
+-#include <features.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>

Added: head/security/snoopy/files/patch-src-snoopy.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/snoopy/files/patch-src-snoopy.h	Tue Jan 30 15:38:23 2018	(r460393)
@@ -0,0 +1,14 @@
+--- src/snoopy.h.orig	2016-09-14 15:02:26 UTC
++++ src/snoopy.h
+@@ -31,11 +31,6 @@
+ /* This must be the first file to be included, or implicit inclusion
+  * (by i.e. <features.h>) does the wrong thing
+  */
+-#ifdef   _XOPEN_SOURCE
+-#undef   _XOPEN_SOURCE
+-#endif
+-#define  _XOPEN_SOURCE   500
+-#include <features.h>   /* Needed for GLIBC macros here */
+ #include <syslog.h>     /* Needed for syslog defaults */
+ #include <unistd.h>     /* Needed for _SC_ARG_MAX constant */
+ 

Added: head/security/snoopy/files/patch-src-tsrm.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/snoopy/files/patch-src-tsrm.c	Tue Jan 30 15:38:23 2018	(r460393)
@@ -0,0 +1,10 @@
+--- src/tsrm.c.orig	2016-09-14 15:02:26 UTC
++++ src/tsrm.c
+@@ -25,7 +25,6 @@
+ /*
+  * Includes order: from local to global
+  */
+-#define _XOPEN_SOURCE 700   // Required by pthread_mutex_setattr
+ 
+ #include "tsrm.h"
+ 

Added: head/security/snoopy/files/patch-tests-bin-snoopy-test-exec-in-threads.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/snoopy/files/patch-tests-bin-snoopy-test-exec-in-threads.c	Tue Jan 30 15:38:23 2018	(r460393)
@@ -0,0 +1,11 @@
+--- tests/bin/snoopy-test-exec-in-threads.c.orig	2016-09-14 15:02:26 UTC
++++ tests/bin/snoopy-test-exec-in-threads.c
+@@ -31,7 +31,7 @@
+ #include <string.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+-#include <wait.h>
++#include <sys/wait.h>
+ 
+ 
+ 

Added: head/security/snoopy/files/patch-tests-bin-snoopy-test-threads.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/snoopy/files/patch-tests-bin-snoopy-test-threads.c	Tue Jan 30 15:38:23 2018	(r460393)
@@ -0,0 +1,28 @@
+--- tests/bin/snoopy-test-threads.c.orig	2016-09-14 15:02:26 UTC
++++ tests/bin/snoopy-test-threads.c
+@@ -25,7 +25,6 @@
+ /*
+  * Includes order: from local to global
+  */
+-#define   _XOPEN_SOURCE   500
+ #define   _GNU_SOURCE
+ 
+ #include <snoopy.h>
+@@ -42,7 +41,7 @@
+ #include <sys/syscall.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+-#include <wait.h>
++#include <sys/wait.h>
+ 
+ 
+ 
+@@ -307,7 +306,7 @@ int randomNumberInclusive (int nMin, int
+     int          randomNr;
+ 
+     // Seed
+-    rndSeed = (unsigned int) (pthread_self() + getpid() + syscall(SYS_gettid) + time(NULL));
++    rndSeed = (unsigned int) ((unsigned int)pthread_self() + getpid() + time(NULL));
+     srand(rndSeed);
+ 
+     // Generate

Added: head/security/snoopy/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/snoopy/pkg-plist	Tue Jan 30 15:38:23 2018	(r460393)
@@ -0,0 +1,13 @@
+etc/snoopy.ini
+lib/libsnoopy.so
+lib/libsnoopy.so.0
+lib/libsnoopy.so.0.0.0
+sbin/snoopy-disable
+sbin/snoopy-enable
+%%PORTDOCS%%%%DOCSDIR%%/CONTRIBUTING.md
+%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
+%%PORTDOCS%%%%DOCSDIR%%/FAQ.md
+%%PORTDOCS%%%%DOCSDIR%%/FILTER_exclude_spawns_of.md
+%%PORTDOCS%%%%DOCSDIR%%/HACKING.md
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL.md
+%%PORTDOCS%%%%DOCSDIR%%/README.md



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