From nobody Fri Jun 7 17:54:43 2024 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 4VwpkC4KS5z5Ly5t; Fri, 07 Jun 2024 17:54:43 +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 4VwpkC2BBpz53bK; Fri, 7 Jun 2024 17:54:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717782883; 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=uOCj2sbNIMVApmzbhjhlbzAAewTiomq6WpwAKepT5Qo=; b=AbCC2ENajaPVo000QtgOgSdK45oIP0nnTY8oHaZYkz4qOqEeFQFOEzkITWJNyPSLOKMxEl vkCgerw2GC5cAHOHh56TRJbaW52PJcG1DBxxTJhLS5RX6V749NjxGhWyv0dQIBDuZ9F9+o EPDUr5BOacA8Ll05NGH1G1qfjVYYI0iyWSZFgxkxM1rSRQlRJsSewsWHAAwmNVQ8EOBLpu 9Cpju/WV25wW+lM2O4TQk7f0klavqzwIhYLqNjMaUyNp6qELz9CPtz6yy8WWsVwbTAwWUe tD56DQe32kjtOvrUd9KrZzYrjrdLKPCRsbqTwTBd7NbZUU89eYwJpcOSF0SZnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717782883; a=rsa-sha256; cv=none; b=p/vIpAyfXDp61NKDItJhhqNeFBmlMiA1wOY5SsvbRWkhYND47eERJIBNgxB031hHQVTj+F ikqr7o/acBTJMgbUu0+10hYc6tG4TVGnbzviOvWL1m50ZqXpm9MR9BUbVR/ZFdYYxDy3Lf S5vxFWtxAbXA41aCRvjFUazre6EKK7LDDOJ5BoNCr5l6nCAXHrk4uX59Lhp+r1gp7UgtEk 9QFFbah7pgqEDn9+8S6BD55HEzfGWd7rM2sM3SGAmGVM0LXAVhC8YvQ+H8fbxA3+v+WrGl 53BTXNBRL0tRlDTIfd0Y0A02O11lrZFqtGOZumbiUt5G7QGKMO3xASQthqWYTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717782883; 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=uOCj2sbNIMVApmzbhjhlbzAAewTiomq6WpwAKepT5Qo=; b=aZfLBdICt16F9d2dbnMM1qRphqzFWfZVGsYYn82AOWf+x4pr0NNcYI64TmRKm9ylJPQaND QU95pufr2kwxEuy03/T7T/3lSig5mJtm1DLCg8ApfdbGASOZ+e7RrqGOby/If7IIgF7WYi 6VErnw4P3Apll2ieV5lHtkfnu8EXPaM45tl/vcxeb18y84UhDAnLGaek9AZklE8I+dvmh2 nIr+jJKTccgZV3Bs9oxuxO7PYEmYz+mS3bLfmpu6N+36FtZULcu9pznpG1O4IEv13dOfEH hVJ8OPd8lKQPY5999AnOt6vU5PHafzBuf0+pmKfTDDRSfwitshoWLRe/l3eGWg== 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 4VwpkC1TYtzPVN; Fri, 7 Jun 2024 17:54:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 457HshCs092187; Fri, 7 Jun 2024 17:54:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 457HshfG092184; Fri, 7 Jun 2024 17:54:43 GMT (envelope-from git) Date: Fri, 7 Jun 2024 17:54:43 GMT Message-Id: <202406071754.457HshfG092184@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Fernando =?utf-8?Q?Apestegu=C3=ADa?= Subject: git: d29154698a39 - main - security/crowdsec: update to 1.6.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: 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: fernape X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d29154698a39a8bc2227e35fa4b6b2a6ac49973e Auto-Submitted: auto-generated The branch main has been updated by fernape: URL: https://cgit.FreeBSD.org/ports/commit/?id=d29154698a39a8bc2227e35fa4b6b2a6ac49973e commit d29154698a39a8bc2227e35fa4b6b2a6ac49973e Author: Fernando ApesteguĂ­a AuthorDate: 2024-06-07 11:44:45 +0000 Commit: Fernando ApesteguĂ­a CommitDate: 2024-06-07 17:54:27 +0000 security/crowdsec: update to 1.6.2 ChangeLog: https://github.com/crowdsecurity/crowdsec/releases/tag/v1.6.2 PR: 279515 Reported by: marco@crowdsec.net (maintainer) --- security/crowdsec/Makefile | 13 +++++--- security/crowdsec/distinfo | 10 +++--- security/crowdsec/files/crowdsec.in | 5 +-- .../crowdsec/files/patch-pkg_csconfig_database.go | 36 ---------------------- .../crowdsec/files/patch-pkg_types_getfstype.go | 8 ----- .../files/patch-pkg_types_getfstype__freebsd.go | 28 ----------------- security/crowdsec/pkg-plist | 4 ++- 7 files changed, 17 insertions(+), 87 deletions(-) diff --git a/security/crowdsec/Makefile b/security/crowdsec/Makefile index b73a2d5e3487..4e3e5e7e7f69 100644 --- a/security/crowdsec/Makefile +++ b/security/crowdsec/Makefile @@ -1,7 +1,8 @@ PORTNAME= crowdsec DISTVERSIONPREFIX= v -DISTVERSION= 1.6.1 -PORTREVISION= 2 +DISTVERSION= 1.6.2 +# the remote tag was moved for 1.6.2, so we force another tag to avoid the version on proxy.golang.org +DISTVERSIONSUFFIX= -final CATEGORIES= security MAINTAINER= marco@crowdsec.net @@ -14,8 +15,8 @@ LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libabsl_base.so:devel/abseil \ libre2.so:devel/re2 -USES= go:1.21,modules pkgconfig -_COMMIT= 0746e0c0 +USES= go:1.22,modules pkgconfig +_COMMIT= 16bfab86 _BUILD_DATE= $$(date -u "+%F_%T") USE_RC_SUBR= crowdsec @@ -31,7 +32,7 @@ GO_TARGET= ./cmd/crowdsec \ GO_BUILDFLAGS= -v -trimpath -tags netgo,osusergo,sqlite_omit_load_extension,re2_cgo \ -ldflags="\ -a -s -w \ - -X github.com/crowdsecurity/go-cs-lib/version.Version=${DISTVERSIONPREFIX}${DISTVERSION}-freebsd \ + -X github.com/crowdsecurity/go-cs-lib/version.Version=${DISTVERSIONPREFIX}${DISTVERSION} \ -X github.com/crowdsecurity/go-cs-lib/version.BuildDate=${_BUILD_DATE} \ -X github.com/crowdsecurity/go-cs-lib/version.Tag=${_COMMIT} \ -X ${GO_MODULE}/pkg/cwversion.Codename=alphaga \ @@ -138,7 +139,9 @@ do-install: # @${MKDIR} ${STAGEDIR}${ETCDIR}/hub + @${MKDIR} ${STAGEDIR}${ETCDIR}/acquis.d @${MKDIR} ${STAGEDIR}/var/db/crowdsec/data + @${MKDIR} ${STAGEDIR}/var/db/crowdsec/data/trace # # Cron diff --git a/security/crowdsec/distinfo b/security/crowdsec/distinfo index 9cb7e50d131c..fc31557d4e7f 100644 --- a/security/crowdsec/distinfo +++ b/security/crowdsec/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1713296982 -SHA256 (go/security_crowdsec/crowdsec-v1.6.1/v1.6.1.mod) = b7957886889cef4dd7166ae8996a93d0f2f5071a8b2155c16c190388f71baeee -SIZE (go/security_crowdsec/crowdsec-v1.6.1/v1.6.1.mod) = 10066 -SHA256 (go/security_crowdsec/crowdsec-v1.6.1/v1.6.1.zip) = fbcee972b1c5b24b4b3a278381f2bd8837ca122e302defc747a76123a8c079c9 -SIZE (go/security_crowdsec/crowdsec-v1.6.1/v1.6.1.zip) = 1483959 +TIMESTAMP = 1717420493 +SHA256 (go/security_crowdsec/crowdsec-v1.6.2-final/v1.6.2-final.mod) = 0cd8f4a237f0901164c8d80fa76c6bc7354054e867c7719c9691f4e5ae4b4a31 +SIZE (go/security_crowdsec/crowdsec-v1.6.2-final/v1.6.2-final.mod) = 10156 +SHA256 (go/security_crowdsec/crowdsec-v1.6.2-final/v1.6.2-final.zip) = e07898b78bd6ff09a1913b7cb8f69b6c3dd3c2add5b4554cc5b8084c91eb96ff +SIZE (go/security_crowdsec/crowdsec-v1.6.2-final/v1.6.2-final.zip) = 1505724 diff --git a/security/crowdsec/files/crowdsec.in b/security/crowdsec/files/crowdsec.in index 703a3045657d..ba0a40a19250 100644 --- a/security/crowdsec/files/crowdsec.in +++ b/security/crowdsec/files/crowdsec.in @@ -14,8 +14,6 @@ # Default is "%%PREFIX%%/etc/crowdsec/config.yaml". # crowdsec_machine_name (str): Name for the crowdsec instance when it's running its own lapi. # Default is "localhost". -# crowdsec_flags (str): Set the extra flags to run the agent. -# Default is "" . /etc/rc.subr @@ -27,7 +25,6 @@ load_rc_config "$name" : "${crowdsec_enable:=NO}" : "${crowdsec_config:=%%PREFIX%%/etc/crowdsec/config.yaml}" : "${crowdsec_machine_name:=localhost}" -: "${crowdsec_flags:=}" pidfile=/var/run/${name}_daemon.pid pidfile_crowdsec=/var/run/${name}.pid @@ -35,7 +32,7 @@ required_files="$crowdsec_config" command="/usr/sbin/daemon" command_crowdsec="%%PREFIX%%/bin/crowdsec" command_cscli="%%PREFIX%%/bin/cscli" -command_args="-f -P ${pidfile} -p ${pidfile_crowdsec} -r -R 10 -t \"${name}\" -- ${command_crowdsec} -c ${crowdsec_config} ${crowdsec_flags}" +command_args="-f -P ${pidfile} -p ${pidfile_crowdsec} -r -R 10 -t \"${name}\" -- ${command_crowdsec} -c ${crowdsec_config}" reload_cmd="${name}_reload" start_precmd="${name}_precmd" configtest_cmd="${name}_configtest" diff --git a/security/crowdsec/files/patch-pkg_csconfig_database.go b/security/crowdsec/files/patch-pkg_csconfig_database.go deleted file mode 100644 index c34546376722..000000000000 --- a/security/crowdsec/files/patch-pkg_csconfig_database.go +++ /dev/null @@ -1,36 +0,0 @@ ---- pkg/csconfig/database.go.orig 2024-04-24 21:31:39 UTC -+++ pkg/csconfig/database.go -@@ -76,26 +76,24 @@ func (c *Config) LoadDBConfig(inCli bool) error { - if c.DbConfig.UseWal == nil { - dbDir := filepath.Dir(c.DbConfig.DbPath) - isNetwork, fsType, err := types.IsNetworkFS(dbDir) -- if err != nil { -+ switch { -+ case err != nil: - log.Warnf("unable to determine if database is on network filesystem: %s", err) - log.Warning("You are using sqlite without WAL, this can have a performance impact. If you do not store the database in a network share, set db_config.use_wal to true. Set explicitly to false to disable this warning.") -- return nil -- } -- if isNetwork { -+ case isNetwork: - log.Debugf("database is on network filesystem (%s), setting useWal to false", fsType) - c.DbConfig.UseWal = ptr.Of(false) -- } else { -+ default: - log.Debugf("database is on local filesystem (%s), setting useWal to true", fsType) - c.DbConfig.UseWal = ptr.Of(true) - } - } else if *c.DbConfig.UseWal { - dbDir := filepath.Dir(c.DbConfig.DbPath) - isNetwork, fsType, err := types.IsNetworkFS(dbDir) -- if err != nil { -+ switch { -+ case err != nil: - log.Warnf("unable to determine if database is on network filesystem: %s", err) -- return nil -- } -- if isNetwork { -+ case isNetwork: - log.Warnf("database seems to be stored on a network share (%s), but useWal is set to true. Proceed at your own risk.", fsType) - } - } diff --git a/security/crowdsec/files/patch-pkg_types_getfstype.go b/security/crowdsec/files/patch-pkg_types_getfstype.go deleted file mode 100644 index 9b9775265421..000000000000 --- a/security/crowdsec/files/patch-pkg_types_getfstype.go +++ /dev/null @@ -1,8 +0,0 @@ ---- pkg/types/getfstype.go.orig 2024-04-24 21:23:59 UTC -+++ pkg/types/getfstype.go -@@ -1,4 +1,4 @@ --//go:build !windows -+//go:build !windows && !freebsd - - package types - diff --git a/security/crowdsec/files/patch-pkg_types_getfstype__freebsd.go b/security/crowdsec/files/patch-pkg_types_getfstype__freebsd.go deleted file mode 100644 index 0fe3a5157120..000000000000 --- a/security/crowdsec/files/patch-pkg_types_getfstype__freebsd.go +++ /dev/null @@ -1,28 +0,0 @@ ---- pkg/types/getfstype_freebsd.go.orig 2024-04-24 21:25:32 UTC -+++ pkg/types/getfstype_freebsd.go -@@ -0,0 +1,25 @@ -+//go:build freebsd -+ -+package types -+ -+import ( -+ "fmt" -+ "syscall" -+) -+ -+func GetFSType(path string) (string, error) { -+ var fsStat syscall.Statfs_t -+ -+ if err := syscall.Statfs(path, &fsStat); err != nil { -+ return "", fmt.Errorf("failed to get filesystem type: %w", err) -+ } -+ -+ bs := fsStat.Fstypename -+ -+ b := make([]byte, len(bs)) -+ for i, v := range bs { -+ b[i] = byte(v) -+ } -+ -+ return string(b), nil -+} diff --git a/security/crowdsec/pkg-plist b/security/crowdsec/pkg-plist index dd1afd08742f..d96c9de762dd 100644 --- a/security/crowdsec/pkg-plist +++ b/security/crowdsec/pkg-plist @@ -49,5 +49,7 @@ lib/crowdsec/plugins/notification-sentinel lib/crowdsec/plugins/notification-slack lib/crowdsec/plugins/notification-splunk @dir %%ETCDIR%%/hub -@dir /var/db/crowdsec/data +@dir %%ETCDIR%%/acquis.d @dir /var/db/crowdsec +@dir /var/db/crowdsec/data +@dir /var/db/crowdsec/data/trace