security/crowdsec: update to 1.6.8

PR:		285673
Pull Request:	https://github.com/freebsd/freebsd-ports/pull/378
This commit is contained in:
marco 2025-04-15 12:33:33 +02:00 committed by Gleb Popov
parent f37cc43f3a
commit 2a873b3784
5 changed files with 9 additions and 36 deletions

View file

@ -1,7 +1,6 @@
PORTNAME= crowdsec
DISTVERSIONPREFIX= v
DISTVERSION= 1.6.5
PORTREVISION= 4
DISTVERSION= 1.6.8
CATEGORIES= security
MAINTAINER= marco@crowdsec.net
@ -14,8 +13,8 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libabsl_base.so:devel/abseil \
libre2.so:devel/re2
USES= go:1.23,modules pkgconfig
_COMMIT= d8dcdc91
USES= go:1.24,modules pkgconfig
_COMMIT= f209766e
_BUILD_DATE= $$(date -u "+%F_%T")
USE_RC_SUBR= crowdsec

View file

@ -1,5 +1,5 @@
TIMESTAMP = 1738941832
SHA256 (go/security_crowdsec/crowdsec-v1.6.5/v1.6.5.mod) = f288295700dd0a49cd69d520167cd00826d974877450cc627f8f839850c0d617
SIZE (go/security_crowdsec/crowdsec-v1.6.5/v1.6.5.mod) = 10932
SHA256 (go/security_crowdsec/crowdsec-v1.6.5/v1.6.5.zip) = 1d9642ab9b6cdbc9dd8f1a1331d9d72da06f0b876b2970499e3f27443889cad5
SIZE (go/security_crowdsec/crowdsec-v1.6.5/v1.6.5.zip) = 1669439
TIMESTAMP = 1742918468
SHA256 (go/security_crowdsec/crowdsec-v1.6.8/v1.6.8.mod) = fc6fecb30189e6d764fa8c14b20914d34084808f4a3b676582ee113ab1615eff
SIZE (go/security_crowdsec/crowdsec-v1.6.8/v1.6.8.mod) = 10955
SHA256 (go/security_crowdsec/crowdsec-v1.6.8/v1.6.8.zip) = 9d61fe2253c77600884df933467be4efb5d2059e4c453b1d48f10a9c7916647c
SIZE (go/security_crowdsec/crowdsec-v1.6.8/v1.6.8.zip) = 1753101

View file

@ -1,13 +0,0 @@
--- pkg/cwhub/hub.go.orig 2025-02-10 13:37:25 UTC
+++ pkg/cwhub/hub.go
@@ -165,7 +165,9 @@ func (h *Hub) Update(ctx context.Context, indexProvide
}
if !downloaded {
- fmt.Println("Nothing to do, the hub index is up to date.")
+ // use logger and the message will be silenced in the cron job
+ // (no mail if nothing happened)
+ h.logger.Info("Nothing to do, the hub index is up to date.")
}
return nil

View file

@ -1,13 +0,0 @@
--- pkg/hubops/download.go.orig 2025-02-10 13:37:39 UTC
+++ pkg/hubops/download.go
@@ -114,6 +114,10 @@ func downloadDataSet(ctx context.Context, dataFolder s
}
for _, dataS := range data.Data {
+ if dataS.SourceURL == "" {
+ continue
+ }
+
// XXX: check context cancellation
destPath, err := cwhub.SafePath(dataFolder, dataS.DestPath)
if err != nil {

View file

@ -8,7 +8,7 @@ sleep "$(jot -r 1 1 300)"
# favor the opnsense plugin's cron if it's there
test -e /usr/local/etc/cron.d/oscrowdsec.cron && exit 0
%%PREFIX%%/bin/cscli --error -o human hub update
%%PREFIX%%/bin/cscli --error -o human hub update >/dev/null
upgraded=$(%%PREFIX%%/bin/cscli --error -o human hub upgrade)
if [ -n "$upgraded" ]; then