Date: Sat, 12 Mar 2022 18:24:31 GMT From: =?utf-8?Q?Fernando Apestegu=C3=ADa?= <fernape@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: d6ce96e20b6a - main - security/crowdsec: update to 1.3.2 Message-ID: <202203121824.22CIOV7v076485@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by fernape: URL: https://cgit.FreeBSD.org/ports/commit/?id=d6ce96e20b6a2ce4b4d4cd9bf386b967a1b76ddd commit d6ce96e20b6a2ce4b4d4cd9bf386b967a1b76ddd Author: Fernando ApesteguĂa <fernape@FreeBSD.org> AuthorDate: 2022-03-11 13:27:29 +0000 Commit: Fernando ApesteguĂa <fernape@FreeBSD.org> 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 <bsd.port.mk> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202203121824.22CIOV7v076485>