FreeBSD Bugzilla – Attachment 232327 Details for
Bug 262426
security/crowdsec: update to 1.3.2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch from 1.2.3 to 1.3.2
0001-security-crowdsec-update-to-v1.3.2.patch (text/plain), 9.68 KB, created by
marco
on 2022-03-08 21:26:21 UTC
(
hide
)
Description:
patch from 1.2.3 to 1.3.2
Filename:
MIME Type:
Creator:
marco
Created:
2022-03-08 21:26:21 UTC
Size:
9.68 KB
patch
obsolete
>From 98f25e52a9d10c475d3ec0f9c954bffbaa617cbd Mon Sep 17 00:00:00 2001 >From: Marco Mariani <marco@crowdsec.net> >Date: Tue, 8 Mar 2022 22:14:56 +0100 >Subject: [PATCH] security/crowdsec: update to v1.3.2 > >- updated executables to upstream v1.3.2 >- removed log rotation with newsyslog (implemented natively in the executable) >- fixed notifier plugin support for freebsd >--- > security/crowdsec/Makefile | 43 +++++++++---------- > security/crowdsec/distinfo | 6 +-- > .../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, 39 insertions(+), 57 deletions(-) > delete mode 100644 security/crowdsec/files/crowdsec.conf-newsyslog > >diff --git a/security/crowdsec/Makefile b/security/crowdsec/Makefile >index 6fad13f10378..a6282642907b 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="/usr/local/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 \ >@@ -130,6 +130,5 @@ do-install: > # > > @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} >- ${INSTALL_DATA} ${FILESDIR}/crowdsec.conf-newsyslog ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d/crowdsec.conf.sample > > .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 >-- >2.32.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 262426
:
232327
|
232374
|
232382