From nobody Tue Feb 11 14:05:02 2025 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 4YsjrH2vZhz5ndG0; Tue, 11 Feb 2025 14:05:03 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YsjrG6m3Tz4FWM; Tue, 11 Feb 2025 14:05:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739282703; 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=yW2tUbIROAMgvHx2G41Dz/h+AhKrkbi3shq5+PKJl2U=; b=wLhVq13zzLC4fSY9yxZGvOiWSDsv3gbOy60BNzg+VA++FoRLjoT2kfDAwd1JRIgN9Gewtb s7+c8/8JPcgABrlY55kdlglnhav1gQtL2+ItNKZe0wiapJJf2y3y1VJ+wZHIPpiVhQioS8 hMO3kgcQvyqwQBfT729fL58jCQ2LKSG1qIUcvX7YUwnG04DVrmGB1uk46uZOzEGc/BAVae 7KWMeJGDJwmG4znetWOsXRxNDHOU5YNOnFLiVn7vGyx0PPBEHBL/6RWQEkaParzdQHZ8SY OO3zsXWCT9o2sZ+Nb1rAQHzKsAvC8VuUSnkoVC0FSwp8sEwRcyJaKHwD/Tc9GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739282703; 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=yW2tUbIROAMgvHx2G41Dz/h+AhKrkbi3shq5+PKJl2U=; b=gnYgmXS6u03JT+tFaowTbAgTn3RfDQ3+Fc6Uu/Cm+2tNMu+PRRuUec9w/9DYZyb/kPrgMZ SIf1NhGgvNmbtYPFkfycjN+FJzw2byr5i02hHA1YKkUumCQFbEDvz1dsYXgJtw8iWFJ6Y0 DZtR0VHv/Pju/KWoI4l+um7wDPuRAlrjKlTzloiYfRfm3t58n2/M8Ru4vrNaA0nJfhGyR8 /k4J5OQAOeISHgHbbds/QCrO0+TEVcOIbq/mXXir0PlUx6PRZTfTlQj5Vfez1CL8jPAeRI uzIz7BTetgs856mfjCyTpUCbGhFXToIq/bVRpFEENyP0dLfdz7DRW+OFt057Eg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739282703; a=rsa-sha256; cv=none; b=RzdaWha7BVZPq+AH8sKWLncHE5BZ1db/tJlTK9uduKXKAAxElo3eNaXE2ZkuyNN+KCePrB h+ngZ81PSIjcoK4CBIYz/jlRfSJeSp7kq7WgsojarQzlByuKZdxeFgJ2JEQJEYV84tpal5 9y1YXCwebJ+k/f26go+QKA0KeuMHV5slvtY05SimyeAjAPqWpmVi0r2k37cDXe0wsMU/kP qF9HLtwaXfnPeGu5vgzI+q53Dn3R9uxxiTAb1ma8QgnEMkUCEDTPSOPQuigPejwi23HjBY WEkNpUNnQ0RaRCvadh6vmCMXbWPb0FE/bUEMzREOwUG+s7+9ds32V2F5cVKQSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YsjrG5pCYz1Qh; Tue, 11 Feb 2025 14:05:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 51BE52gY041077; Tue, 11 Feb 2025 14:05:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51BE52Wp041074; Tue, 11 Feb 2025 14:05:02 GMT (envelope-from git) Date: Tue, 11 Feb 2025 14:05:02 GMT Message-Id: <202502111405.51BE52Wp041074@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Vladimir Druzenko Subject: git: 12c198cffd7a - 2025Q1 - security/crowdsec: Update 1.6.4 => 1.6.5 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: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vvd X-Git-Repository: ports X-Git-Refname: refs/heads/2025Q1 X-Git-Reftype: branch X-Git-Commit: 12c198cffd7adea0e442676f75ac5321be52f1f8 Auto-Submitted: auto-generated The branch 2025Q1 has been updated by vvd: URL: https://cgit.FreeBSD.org/ports/commit/?id=12c198cffd7adea0e442676f75ac5321be52f1f8 commit 12c198cffd7adea0e442676f75ac5321be52f1f8 Author: Marco AuthorDate: 2025-02-11 13:56:16 +0000 Commit: Vladimir Druzenko CommitDate: 2025-02-11 14:04:30 +0000 security/crowdsec: Update 1.6.4 => 1.6.5 Changelog: https://github.com/crowdsecurity/crowdsec/releases/tag/v1.6.5 PR: 284730 MFH: 2025Q1 (cherry picked from commit 2c8fd6f3ca6182a08050a942d8d9b39695848770) --- security/crowdsec/Makefile | 7 +++---- security/crowdsec/distinfo | 10 +++++----- security/crowdsec/files/crowdsec.in | 18 ++++++++++++++---- security/crowdsec/files/patch-pkg_cwhub_hub.go | 13 +++++++++++++ security/crowdsec/files/patch-pkg_hubops_download.go | 13 +++++++++++++ 5 files changed, 48 insertions(+), 13 deletions(-) diff --git a/security/crowdsec/Makefile b/security/crowdsec/Makefile index ebeec03d74c1..44d1e0f8290e 100644 --- a/security/crowdsec/Makefile +++ b/security/crowdsec/Makefile @@ -1,7 +1,6 @@ PORTNAME= crowdsec DISTVERSIONPREFIX= v -DISTVERSION= 1.6.4 -PORTREVISION= 1 +DISTVERSION= 1.6.5 CATEGORIES= security MAINTAINER= marco@crowdsec.net @@ -15,7 +14,7 @@ LIB_DEPENDS= libabsl_base.so:devel/abseil \ libre2.so:devel/re2 USES= go:1.23,modules pkgconfig -_COMMIT= 523164f6 +_COMMIT= d8dcdc91 _BUILD_DATE= $$(date -u "+%F_%T") USE_RC_SUBR= crowdsec @@ -30,7 +29,7 @@ GO_TARGET= ./cmd/crowdsec \ GO_BUILDFLAGS= -v -trimpath -tags netgo,osusergo,sqlite_omit_load_extension,re2_cgo \ -ldflags="\ - -a -s -w \ + -a -s \ -X github.com/crowdsecurity/go-cs-lib/version.Version=${DISTVERSIONPREFIX}${PKGVERSION} \ -X github.com/crowdsecurity/go-cs-lib/version.BuildDate=${_BUILD_DATE} \ -X github.com/crowdsecurity/go-cs-lib/version.Tag=${_COMMIT} \ diff --git a/security/crowdsec/distinfo b/security/crowdsec/distinfo index a38e4ac30d29..d060c226d846 100644 --- a/security/crowdsec/distinfo +++ b/security/crowdsec/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1732708457 -SHA256 (go/security_crowdsec/crowdsec-v1.6.4/v1.6.4.mod) = 8494881f2c033d1becdbdc2be4230740874f0dca703f26a60f1e2108ca7419a1 -SIZE (go/security_crowdsec/crowdsec-v1.6.4/v1.6.4.mod) = 10240 -SHA256 (go/security_crowdsec/crowdsec-v1.6.4/v1.6.4.zip) = 075555e9ebb93d45dcfd144069fcbdfb791935965be265034880f4d335292755 -SIZE (go/security_crowdsec/crowdsec-v1.6.4/v1.6.4.zip) = 1570635 +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 diff --git a/security/crowdsec/files/crowdsec.in b/security/crowdsec/files/crowdsec.in index 9952ad5c4974..ac50c9d09da5 100644 --- a/security/crowdsec/files/crowdsec.in +++ b/security/crowdsec/files/crowdsec.in @@ -59,14 +59,24 @@ crowdsec_stop_precmd() { } crowdsec_stop_postcmd() { - # don't trust sbin/daemon to send the signal - kill -TERM "$_CROWDSECPID" 2>/dev/null - # wait for process to exit before restarting, or it will find the http port in use if [ -n "$_CROWDSECPID" ]; then - wait_for_pids "$_CROWDSECPID" + # don't trust sbin/daemon to send the signal + kill -TERM "$_CROWDSECPID" 2>/dev/null fi if [ -n "$_CROWDSEC_CHILDREN" ]; then kill -TERM $_CROWDSEC_CHILDREN 2>/dev/null + fi + + sleep 5 + + if [ -n "$_CROWDSECPID" ]; then + # in case a datasource didn't respond + kill -KILL "$_CROWDSECPID" 2>/dev/null + # ensure the process is not running before restart, or it will find the http port in use + wait_for_pids "$_CROWDSECPID" + fi + if [ -n "$_CROWDSEC_CHILDREN" ]; then + kill -KILL $_CROWDSEC_CHILDREN 2>/dev/null wait_for_pids $_CROWDSEC_CHILDREN fi } diff --git a/security/crowdsec/files/patch-pkg_cwhub_hub.go b/security/crowdsec/files/patch-pkg_cwhub_hub.go new file mode 100644 index 000000000000..b87e90c287c8 --- /dev/null +++ b/security/crowdsec/files/patch-pkg_cwhub_hub.go @@ -0,0 +1,13 @@ +--- 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 diff --git a/security/crowdsec/files/patch-pkg_hubops_download.go b/security/crowdsec/files/patch-pkg_hubops_download.go new file mode 100644 index 000000000000..25fc210f1959 --- /dev/null +++ b/security/crowdsec/files/patch-pkg_hubops_download.go @@ -0,0 +1,13 @@ +--- 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 {