From nobody Sat Mar 12 18:24:31 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 86CBC1A053B5; Sat, 12 Mar 2022 18:24:31 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KGB673Llxz4rp0; Sat, 12 Mar 2022 18:24:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647109471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bb4BNLUGm3/koVgPPF0wxxRUZb3JNv1mXyr92o+Izgg=; b=D8EpJAbN+wLjO+7OVk0AKpKomDMhY6/iw7ccfvrPFuXi0HjHHZkqwIocqdIr0D8SVShxXo BVA+Dxh25+E5Vx/7QZkti9+rLlkXCNoMYEjVtYsu5OU8EqUk5jTkNiLgAAOsHDGVAqwMbh AdE8UYQdoIgiQpLkxnle3D15nXeS7CKm9lD8JXcHVXgk0QKlWSAh6gwbbNPzcB53S8ZchF lmA/nuz7IDleeO1/SyybkOme0VdHvskhzfm0+c0lv/Y4SqR6yP2Kt6y4kIwLqoJ8YoMhkM DJDGMohJOyZqCFBCUVPHyN2en1NUGOgc+Ivx9PrY1YDbRtRUnIZ2AbfpGimB+A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 52ABB20A5; Sat, 12 Mar 2022 18:24:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22CIOVkW076486; Sat, 12 Mar 2022 18:24:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22CIOV7v076485; Sat, 12 Mar 2022 18:24:31 GMT (envelope-from git) Date: Sat, 12 Mar 2022 18:24:31 GMT Message-Id: <202203121824.22CIOV7v076485@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: =?utf-8?Q?Fernando Apestegu=C3=ADa?= Subject: git: d6ce96e20b6a - main - security/crowdsec: update to 1.3.2 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d6ce96e20b6a2ce4b4d4cd9bf386b967a1b76ddd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647109471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bb4BNLUGm3/koVgPPF0wxxRUZb3JNv1mXyr92o+Izgg=; b=qIKpx6mCuUY3ChG6BVaFvumyfePz4Z46OdgDYuOjbvuQBk6Ho49X6lWiQjjbwci1gDucOV nIcUk+PHTZpk3h9vELVrrNS3fhE7Yv2jzHgNHCTdHPuSjxE2gY8J8/6qcIoH0hGnvP8s2Y V7J8w9AGIU87RODPF3hfci1LeETbzAUQaWyoPZaxFfwXtaI6YyCh4/OFtC6a+pj9MwSK9V mBmoofeK8xA/nS6+yQRf9wAZxr3qFFQQl9HxYu81hkVIK7gvkD7kOC0XKyhyf1gfRgypyd S1wONlxjFgE2b1TNAGuqrxChKn5DOL2RPwHjJRH5joeXnbc5BjLZAw3BaX7dVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647109471; a=rsa-sha256; cv=none; b=bbXHpm9IHU53yMFh5mW3gfEiMzgT17LqIXwIiIEDy40PBnGcPYvkb8nSAJGQUBgVf9PT2u X+ZZxcx4jL7rfaOqOjw7dpVvvFi6EPKiZ4nkNJ5S2oXO69/91Wz7DfoFYdMaP8S8fHyotI 15yiGKKjhW4d65bS0VFyKD+zgCfwGXllw7fHQ50IktRmm/V1CbZWtMJANbOAb7f07QXkPg Ms4R4B5xt9GJQqXr7yglljKtO3fhJHJjo5mdeWxoeg0u1aOZnrFEWrMmGcjU1xQ1FspM7g P22bn275tryLd60wDknmXLoF1V+C3nUdEakk/FMxn0wMZ5UOYWRZO4LhNWZF9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by fernape: URL: https://cgit.FreeBSD.org/ports/commit/?id=d6ce96e20b6a2ce4b4d4cd9bf386b967a1b76ddd commit d6ce96e20b6a2ce4b4d4cd9bf386b967a1b76ddd Author: Fernando ApesteguĂ­a AuthorDate: 2022-03-11 13:27:29 +0000 Commit: Fernando ApesteguĂ­a CommitDate: 2022-03-12 18:21:43 +0000 security/crowdsec: update to 1.3.2 PR: 262426 Reported by: marco+freebsd@crowdsec.net (maintainer) --- security/crowdsec/Makefile | 55 ++++++++++++++----------- security/crowdsec/distinfo | 6 +-- security/crowdsec/files/crowdsec.conf-newsyslog | 3 -- security/crowdsec/files/crowdsec.in | 1 + security/crowdsec/files/patch-Makefile | 32 ++++---------- security/crowdsec/pkg-plist | 11 +++-- 6 files changed, 48 insertions(+), 60 deletions(-) diff --git a/security/crowdsec/Makefile b/security/crowdsec/Makefile index 6fad13f10378..7e0cf429c350 100644 --- a/security/crowdsec/Makefile +++ b/security/crowdsec/Makefile @@ -1,6 +1,5 @@ PORTNAME= crowdsec -PORTVERSION= 1.2.3 # NOTE: change BUILD_VERSION and BUILD_TAG as well -PORTREVISION= 1 +PORTVERSION= 1.3.2 # NOTE: change BUILD_VERSION and BUILD_TAG as well DISTVERSIONPREFIX= v CATEGORIES= security @@ -15,23 +14,28 @@ BUILD_DEPENDS= git:devel/git@lite \ jq:textproc/jq USES= gmake +ALL_TARGET= build USE_GITHUB= yes GH_ACCOUNT= crowdsecurity GH_PROJECT= crowdsec -GH_TAGNAME= v1.2.3-freebsd +GH_TAGNAME= v1.3.2-freebsd-wip #GH_TAGNAME is automatically set from DISTVERSION +OPTIONS_DEFINE= FIREWALL_BOUNCER +OPTIONS_DEFAULT= + +FIREWALL_BOUNCER_DESC= Depend on security/crowdsec-firewall-bouncer +FIREWALL_BOUNCER_RUN_DEPENDS= crowdsec-firewall-bouncer>=0.0.23.r2:security/crowdsec-firewall-bouncer + USE_RC_SUBR= crowdsec -SUB_FILES= pkg-message \ - pkg-install \ - pkg-deinstall +SUB_FILES= pkg-deinstall pkg-install pkg-message -# BUILD_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1)) -# BUILD_TAG=$(git rev-parse HEAD) -MAKE_ENV= BUILD_VERSION="v1.2.3" \ - BUILD_TAG="fc4be1e0ffc5888f2824358464cb2426cd4472e1" +MAKE_ENV= BUILD_VERSION="v1.3.2" \ + BUILD_TAG="716251323da59f1ce04fb1fc38af0a72629b5d78" \ + DEFAULT_CONFIGDIR="${PREFIX}/etc/crowdsec" \ + DEFAULT_DATADIR="/var/db/crowdsec/data" PLUGIN_DIR= ${PREFIX}/lib/crowdsec/plugins STAGE_PLUGINS= ${STAGEDIR}${PLUGIN_DIR} @@ -39,17 +43,10 @@ STAGE_BIN= ${STAGEDIR}${PREFIX}/bin post-patch: @${REINPLACE_CMD} 's,/etc/crowdsec/,${ETCDIR}/,g' \ - ${WRKSRC}/pkg/csconfig/config.go \ - ${WRKSRC}/pkg/cstest/hubtest_item.go \ - ${WRKSRC}/cmd/crowdsec-cli/machines.go \ - ${WRKSRC}/cmd/crowdsec-cli/main.go \ - ${WRKSRC}/cmd/crowdsec/main.go \ ${WRKSRC}/config/config.yaml \ ${WRKSRC}/config/profiles.yaml @${REINPLACE_CMD} 's,/var/lib/,/var/db/,g' \ - ${WRKSRC}/pkg/csconfig/config.go \ - ${WRKSRC}/pkg/metabase/database.go \ ${WRKSRC}/config/config.yaml \ ${WRKSRC}/config/profiles.yaml @@ -81,6 +78,9 @@ do-install: @${MV} ${STAGEDIR}${ETCDIR}/config.yaml \ ${STAGEDIR}${ETCDIR}/config.yaml.sample + @${MV} ${STAGEDIR}${ETCDIR}/console.yaml \ + ${STAGEDIR}${ETCDIR}/console.yaml.sample + @${MV} ${STAGEDIR}${ETCDIR}/profiles.yaml \ ${STAGEDIR}${ETCDIR}/profiles.yaml.sample @@ -96,19 +96,19 @@ do-install: @${MKDIR} ${STAGEDIR}${ETCDIR}/notifications/email @${MV} ${WRKSRC}/plugins/notifications/email/email.yaml \ - ${STAGEDIR}${ETCDIR}/notifications/email/email.yaml.sample + ${STAGEDIR}${ETCDIR}/notifications/email.yaml.sample @${MKDIR} ${STAGEDIR}${ETCDIR}/notifications/http @${MV} ${WRKSRC}/plugins/notifications/http/http.yaml \ - ${STAGEDIR}${ETCDIR}/notifications/http/http.yaml.sample + ${STAGEDIR}${ETCDIR}/notifications/http.yaml.sample @${MKDIR} ${STAGEDIR}${ETCDIR}/notifications/slack @${MV} ${WRKSRC}/plugins/notifications/slack/slack.yaml \ - ${STAGEDIR}${ETCDIR}/notifications/slack/slack.yaml.sample + ${STAGEDIR}${ETCDIR}/notifications/slack.yaml.sample @${MKDIR} ${STAGEDIR}${ETCDIR}/notifications/splunk @${MV} ${WRKSRC}/plugins/notifications/splunk/splunk.yaml \ - ${STAGEDIR}${ETCDIR}/notifications/splunk/splunk.yaml.sample + ${STAGEDIR}${ETCDIR}/notifications/splunk.yaml.sample # updated by "cscli machines" at first service start @${MV} ${STAGEDIR}${ETCDIR}/local_api_credentials.yaml \ @@ -126,10 +126,15 @@ do-install: @${MKDIR} ${STAGEDIR}/var/db/crowdsec/data # - # Log rotation + # Cleanup # - @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} - ${INSTALL_DATA} ${FILESDIR}/crowdsec.conf-newsyslog ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d/crowdsec.conf.sample - + @${RM} ${STAGEDIR}${ETCDIR}/crowdsec.service + @${RM} ${STAGEDIR}${ETCDIR}/dev.yaml + @${RM} ${STAGEDIR}${ETCDIR}/user.yaml + @${RMDIR} ${STAGEDIR}${ETCDIR}/notifications/email + @${RMDIR} ${STAGEDIR}${ETCDIR}/notifications/http + @${RMDIR} ${STAGEDIR}${ETCDIR}/notifications/slack + @${RMDIR} ${STAGEDIR}${ETCDIR}/notifications/splunk + .include diff --git a/security/crowdsec/distinfo b/security/crowdsec/distinfo index a87959633114..562330baea8d 100644 --- a/security/crowdsec/distinfo +++ b/security/crowdsec/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1642022158 -SHA256 (crowdsecurity-crowdsec-v1.2.3-v1.2.3-freebsd_GH0.tar.gz) = 9b3dd5fcc7b67cf89a1a661009a215b9a7f7a0efeb598456480e57fbd6e9bb4b -SIZE (crowdsecurity-crowdsec-v1.2.3-v1.2.3-freebsd_GH0.tar.gz) = 19122216 +TIMESTAMP = 1646686224 +SHA256 (crowdsecurity-crowdsec-v1.3.2-v1.3.2-freebsd-wip_GH0.tar.gz) = e805f8e60213fd49fa2e0fa182d6d91591dc26f378733139bd5609b5b914d5b3 +SIZE (crowdsecurity-crowdsec-v1.3.2-v1.3.2-freebsd-wip_GH0.tar.gz) = 20005916 diff --git a/security/crowdsec/files/crowdsec.conf-newsyslog b/security/crowdsec/files/crowdsec.conf-newsyslog deleted file mode 100644 index 560519c5a99f..000000000000 --- a/security/crowdsec/files/crowdsec.conf-newsyslog +++ /dev/null @@ -1,3 +0,0 @@ -# logfilename [owner:group] mode count size(kb) when flags [/pid_file] [sig_num] -/var/log/crowdsec.log root:wheel 644 10 20480 * JC /var/run/crowdsec.pid -/var/log/crowdsec_api.log root:wheel 644 10 20480 * JC /var/run/crowdsec.pid diff --git a/security/crowdsec/files/crowdsec.in b/security/crowdsec/files/crowdsec.in index 113d66aed599..a63e7ca47da9 100644 --- a/security/crowdsec/files/crowdsec.in +++ b/security/crowdsec/files/crowdsec.in @@ -1,6 +1,7 @@ #!/bin/sh # PROVIDE: crowdsec +# BEFORE: crowdsec_firewall # REQUIRE: LOGIN DAEMON NETWORKING # KEYWORD: shutdown # diff --git a/security/crowdsec/files/patch-Makefile b/security/crowdsec/files/patch-Makefile index 840e31a44477..68ea23023ecf 100644 --- a/security/crowdsec/files/patch-Makefile +++ b/security/crowdsec/files/patch-Makefile @@ -1,26 +1,12 @@ ---- Makefile.orig 2021-12-21 21:18:22 UTC +--- Makefile.orig 2022-02-10 09:11:04 UTC +++ Makefile -@@ -44,14 +44,14 @@ BUILD_CODENAME=$(shell cat RELEASE.json | jq -r .CodeN - BUILD_TIMESTAMP=$(shell date +%F"_"%T) - BUILD_TAG?="$(shell git rev-parse HEAD)" +@@ -58,8 +58,8 @@ LD_OPTS_VARS= \ + -X github.com/crowdsecurity/crowdsec/pkg/csconfig.defaultConfigDir=$(DEFAULT_CONFIGDIR) \ + -X github.com/crowdsecurity/crowdsec/pkg/csconfig.defaultDataDir=$(DEFAULT_DATADIR) --export LD_OPTS=-ldflags "-s -w -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Version=$(BUILD_VERSION) \ -+export LD_OPTS=-mod vendor -modcacherw -ldflags "-s -w -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Version=$(BUILD_VERSION) \ - -X github.com/crowdsecurity/crowdsec/pkg/cwversion.System=$(SYSTEM) \ - -X github.com/crowdsecurity/crowdsec/pkg/cwversion.BuildDate=$(BUILD_TIMESTAMP) \ - -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Codename=$(BUILD_CODENAME) \ - -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Tag=$(BUILD_TAG) \ - -X github.com/crowdsecurity/crowdsec/pkg/cwversion.GoVersion=$(BUILD_GOVERSION)" +-export LD_OPTS=-ldflags "-s -w $(LD_OPTS_VARS)" +-export LD_OPTS_STATIC=-ldflags "-s -w $(LD_OPTS_VARS) -extldflags '-static'" ++export LD_OPTS=-mod vendor -modcacherw -ldflags "-s -w $(LD_OPTS_VARS)" ++export LD_OPTS_STATIC=-mod vendor -modcacherw -ldflags "-s -w $(LD_OPTS_VARS) -extldflags '-static'" --export LD_OPTS_STATIC=-ldflags "-s -w -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Version=$(BUILD_VERSION) \ -+export LD_OPTS_STATIC=-mod vendor -modcacherw -ldflags "-s -w -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Version=$(BUILD_VERSION) \ - -X github.com/crowdsecurity/crowdsec/pkg/cwversion.BuildDate=$(BUILD_TIMESTAMP) \ - -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Codename=$(BUILD_CODENAME) \ - -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Tag=$(BUILD_TAG) \ -@@ -176,4 +176,4 @@ check_release: - release: check_release build package - - .PHONY: --release_static: check_release static package_static -\ No newline at end of file -+release_static: check_release static package_static + RELDIR = crowdsec-$(BUILD_VERSION) diff --git a/security/crowdsec/pkg-plist b/security/crowdsec/pkg-plist index 635dcc3da591..730535931c6d 100644 --- a/security/crowdsec/pkg-plist +++ b/security/crowdsec/pkg-plist @@ -8,12 +8,13 @@ bin/crowdsec-cli @mode 0644 @sample %%ETCDIR%%/acquis.yaml.sample @sample %%ETCDIR%%/config.yaml.sample +@sample %%ETCDIR%%/console.yaml.sample @sample %%ETCDIR%%/profiles.yaml.sample @sample %%ETCDIR%%/simulation.yaml.sample -@sample %%ETCDIR%%/notifications/email/email.yaml.sample -@sample %%ETCDIR%%/notifications/http/http.yaml.sample -@sample %%ETCDIR%%/notifications/slack/slack.yaml.sample -@sample %%ETCDIR%%/notifications/splunk/splunk.yaml.sample +@sample %%ETCDIR%%/notifications/email.yaml.sample +@sample %%ETCDIR%%/notifications/http.yaml.sample +@sample %%ETCDIR%%/notifications/slack.yaml.sample +@sample %%ETCDIR%%/notifications/splunk.yaml.sample %%ETCDIR%%/patterns/aws %%ETCDIR%%/patterns/bacula %%ETCDIR%%/patterns/bro @@ -38,7 +39,6 @@ bin/crowdsec-cli %%ETCDIR%%/patterns/smb %%ETCDIR%%/patterns/ssh %%ETCDIR%%/patterns/tcpdump -@sample etc/newsyslog.conf.d/crowdsec.conf.sample @mode 0755 lib/crowdsec/plugins/notification-email lib/crowdsec/plugins/notification-http @@ -47,4 +47,3 @@ lib/crowdsec/plugins/notification-splunk @dir %%ETCDIR%%/hub @dir /var/db/crowdsec/data @dir /var/db/crowdsec -@dir etc/newsyslog.conf.d