From owner-svn-ports-all@freebsd.org Fri Nov 6 18:38:47 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6212D446072; Fri, 6 Nov 2020 18:38:47 +0000 (UTC) (envelope-from leres@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CSTgC2BfCz4byZ; Fri, 6 Nov 2020 18:38:47 +0000 (UTC) (envelope-from leres@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E6C5290D8; Fri, 6 Nov 2020 18:38:47 +0000 (UTC) (envelope-from leres@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A6IclWM069363; Fri, 6 Nov 2020 18:38:47 GMT (envelope-from leres@FreeBSD.org) Received: (from leres@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A6IckYN069359; Fri, 6 Nov 2020 18:38:46 GMT (envelope-from leres@FreeBSD.org) Message-Id: <202011061838.0A6IckYN069359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: leres set sender to leres@FreeBSD.org using -f From: Craig Leres Date: Fri, 6 Nov 2020 18:38:46 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r554309 - in head/security/zeek: . files X-SVN-Group: ports-head X-SVN-Commit-Author: leres X-SVN-Commit-Paths: in head/security/zeek: . files X-SVN-Commit-Revision: 554309 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2020 18:38:47 -0000 Author: leres Date: Fri Nov 6 18:38:46 2020 New Revision: 554309 URL: https://svnweb.freebsd.org/changeset/ports/554309 Log: security/zeek: Fix build on armv7 and allow running as non-root user Apply Renato Botelho's fix for the ARCH used in PLIST_SUB (with some changes). Essentially use uname -m instead of trying to fix up the ARCH defined by bsd.port.mk (uname -p). While we're here: - Convert networks.cfg, node.cfg, and zeekctl.cfg to use @sample - Use @sample to avoid clobbering site.zeek (oops). - Remove unnecessary subshell for the post-build-NETMAP-on target. - Silence the annoying "use ZeekControl.plugin instead of BroControl.plugin" nag. - Reformat the rc.d script. - Update the rc.d script to honor the zeek_user rc.d variable and update pkg-message.in with hints on how to run as user zeek. - Explain how to configure zeek to ignore checksum errors when NIC checksum offloading is in use. - Make share/zeekctl/scripts owned by user zeek to allow "zeekctl install" when running as user zeek. PR: 250886 Reported by: garga Modified: head/security/zeek/Makefile head/security/zeek/files/pkg-message.in head/security/zeek/files/zeek.in head/security/zeek/pkg-plist Modified: head/security/zeek/Makefile ============================================================================== --- head/security/zeek/Makefile Fri Nov 6 18:22:47 2020 (r554308) +++ head/security/zeek/Makefile Fri Nov 6 18:38:46 2020 (r554309) @@ -3,6 +3,7 @@ PORTNAME= zeek PORTVERSION= 3.0.11 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= https://old.zeek.org/downloads/ DISTFILES= ${DISTNAME}${EXTRACT_SUFX} @@ -45,7 +46,7 @@ CMAKE_ARGS+= -GNinja \ ZEEKUSER?= zeek ZEEKGROUP?= zeek -PLIST_SUB+= ARCH=${ARCH:S/aarch64/arm64/} \ +PLIST_SUB+= ARCH=${UNAME_M} \ ZEEKUSER=${ZEEKUSER} \ ZEEKGROUP=${ZEEKGROUP} \ LCASE_OPSYS=${OPSYS:tl} @@ -98,13 +99,18 @@ ZEEKCTL_RUN_DEPENDS= ${LOCALBASE}/bin/bash:shells/bash USE_RC_SUBR= zeek .endif +post-patch: + # Silence the "use ZeekControl.plugin instead of BroControl.plugin" nag + @${REINPLACE_CMD} -e 's/^print/#&/' \ + ${WRKSRC}/aux/zeekctl/BroControl/__init__.py + post-install-ZEEKCTL-on: ${MKDIR} ${STAGEDIR}${PREFIX}/logs ${MKDIR} ${STAGEDIR}${PREFIX}/spool/tmp ${MKDIR} ${STAGEDIR}${PREFIX}/spool/installed-scripts-do-not-touch/auto ${MKDIR} ${STAGEDIR}${PREFIX}/spool/installed-scripts-do-not-touch/site .for F in zeekctl.cfg networks.cfg node.cfg - ${MV} ${STAGEDIR}${PREFIX}/etc/${F} ${STAGEDIR}${PREFIX}/etc/${F}.example + ${MV} ${STAGEDIR}${PREFIX}/etc/${F} ${STAGEDIR}${PREFIX}/etc/${F}.sample .endfor ${RM} ${STAGEDIR}${PREFIX}/share/zeekctl/scripts/zeekctl-config.sh ${LN} -s ../../../spool/zeekctl-config.sh \ @@ -112,14 +118,20 @@ post-install-ZEEKCTL-on: post-install: ${RM} -r ${STAGEDIR}${PREFIX}/share/zeek/cmake + ${MV} ${STAGEDIR}${DATADIR}/site/local.zeek \ + ${STAGEDIR}${DATADIR}/site/local.zeek.sample pre-install-ZEEKCTL-on: ${MKDIR} ${STAGEDIR}${PREFIX}/etc/rc.d post-build-NETMAP-on: ${LN} -s ../.build ${WRKSRC}/build - (cd ${WRKSRC_bro_netmap} && ./configure --bro-dist=${WRKSRC} \ + cd ${WRKSRC_bro_netmap} && ./configure --bro-dist=${WRKSRC} \ --install-root=${STAGEDIR}${PREFIX}/lib/zeek/plugins && \ - make && make install) + make && make install -.include +.include + +UNAME_M!= ${UNAME} -m + +.include Modified: head/security/zeek/files/pkg-message.in ============================================================================== --- head/security/zeek/files/pkg-message.in Fri Nov 6 18:22:47 2020 (r554308) +++ head/security/zeek/files/pkg-message.in Fri Nov 6 18:38:46 2020 (r554309) @@ -1,12 +1,39 @@ [ { type: install message: <