View | Details | Raw Unified | Return to bug 260262 | Differences between
and this patch

Collapse All | Expand All

(-)b/security/crowdsec-firewall-bouncer/Makefile (-6 / +4 lines)
Lines 1-5 Link Here
1
PORTNAME=	crowdsec-firewall-bouncer
1
PORTNAME=	crowdsec-firewall-bouncer
2
PORTVERSION=	0.0.17	# NOTE: change BUILD_VERSION and BUILD_TAG as well
2
PORTVERSION=	0.0.20  # NOTE: change BUILD_VERSION and BUILD_TAG as well
3
DISTVERSIONPREFIX=	v
3
DISTVERSIONPREFIX=	v
4
CATEGORIES=	security
4
CATEGORIES=	security
5
5
Lines 19-24 RUN_DEPENDS= crowdsec>0:security/crowdsec Link Here
19
USE_GITHUB=	yes
19
USE_GITHUB=	yes
20
GH_ACCOUNT=	crowdsecurity
20
GH_ACCOUNT=	crowdsecurity
21
GH_PROJECT=	cs-firewall-bouncer
21
GH_PROJECT=	cs-firewall-bouncer
22
GH_TAGNAME=	v0.0.20-freebsd
22
#GH_TAGNAME is automatically set from DISTVERSION
23
#GH_TAGNAME is automatically set from DISTVERSION
23
24
24
USE_RC_SUBR=	crowdsec_firewall
25
USE_RC_SUBR=	crowdsec_firewall
Lines 28-41 SUB_FILES= pkg-message \ Link Here
28
29
29
# BUILD_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))
30
# BUILD_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))
30
# BUILD_TAG=$(git rev-parse HEAD)
31
# BUILD_TAG=$(git rev-parse HEAD)
31
MAKE_ENV=	BUILD_VERSION="v0.0.17" \
32
MAKE_ENV=	BUILD_VERSION="v0.0.20" \
32
		BUILD_TAG="b330209afcdefd0046fd6790999bbb342c02f1b3"
33
		BUILD_TAG="a456a4debdf3d3551c89b8490bb942f626027310"
33
34
34
ETCDIR=		${PREFIX}/etc/crowdsec/bouncers
35
ETCDIR=		${PREFIX}/etc/crowdsec/bouncers
35
36
36
do-patch:
37
	cd ${WRKSRC} && go mod download github.com/mattn/go-sqlite3
38
39
post-patch:
37
post-patch:
40
	${REINPLACE_CMD} 's,$${BACKEND},pf,g' \
38
	${REINPLACE_CMD} 's,$${BACKEND},pf,g' \
41
		${WRKSRC}/config/crowdsec-firewall-bouncer.yaml
39
		${WRKSRC}/config/crowdsec-firewall-bouncer.yaml
(-)b/security/crowdsec-firewall-bouncer/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1637702397
1
TIMESTAMP = 1640213523
2
SHA256 (crowdsecurity-cs-firewall-bouncer-v0.0.17_GH0.tar.gz) = 53af239b86c6b554da3711e3686d7d3036d33b2e561bfb00e195b6c8a06918c8
2
SHA256 (crowdsecurity-cs-firewall-bouncer-v0.0.20-v0.0.20-freebsd_GH0.tar.gz) = 95f8abf5f44e700e7f0a41edf5367715ce06918cb0de7a5d084bdca277563171
3
SIZE (crowdsecurity-cs-firewall-bouncer-v0.0.17_GH0.tar.gz) = 143037
3
SIZE (crowdsecurity-cs-firewall-bouncer-v0.0.20-v0.0.20-freebsd_GH0.tar.gz) = 3018717
(-)b/security/crowdsec-firewall-bouncer/files/patch-Makefile (-6 / +6 lines)
Lines 1-11 Link Here
1
--- Makefile.orig	2021-12-07 09:00:17 UTC
1
--- Makefile.orig	2021-12-22 22:57:23 UTC
2
+++ Makefile
2
+++ Makefile
3
@@ -11,7 +11,7 @@ GOGET=$(GOCMD) get
3
@@ -11,7 +11,7 @@ BUILD_VERSION?="$(shell git describe --tags `git rev-l
4
 BUILD_VERSION?="$(shell git describe --tags `git rev-list --tags --max-count=1`)"
5
 BUILD_GOVERSION="$(shell go version | cut -d " " -f3 | sed -r 's/[go]+//g')"
4
 BUILD_GOVERSION="$(shell go version | cut -d " " -f3 | sed -r 's/[go]+//g')"
6
 BUILD_TIMESTAMP=$(shell date +%F"_"%T)
5
 BUILD_TIMESTAMP=$(shell date +%F"_"%T)
7
-BUILD_TAG="$(shell git rev-parse HEAD)"
6
 BUILD_TAG?="$(shell git rev-parse HEAD)"
8
+BUILD_TAG?="$(shell git rev-parse HEAD)"
7
-export LD_OPTS=-ldflags "-s -w -X github.com/crowdsecurity/cs-firewall-bouncer/pkg/version.Version=$(BUILD_VERSION) \
9
 export LD_OPTS=-ldflags "-s -w -X github.com/crowdsecurity/cs-firewall-bouncer/pkg/version.Version=$(BUILD_VERSION) \
8
+export LD_OPTS=-mod vendor -modcacherw --ldflags "-s -w -X github.com/crowdsecurity/cs-firewall-bouncer/pkg/version.Version=$(BUILD_VERSION) \
10
 -X github.com/crowdsecurity/cs-firewall-bouncer/pkg/version.BuildDate=$(BUILD_TIMESTAMP) \
9
 -X github.com/crowdsecurity/cs-firewall-bouncer/pkg/version.BuildDate=$(BUILD_TIMESTAMP) \
11
 -X github.com/crowdsecurity/cs-firewall-bouncer/pkg/version.Tag=$(BUILD_TAG) \
10
 -X github.com/crowdsecurity/cs-firewall-bouncer/pkg/version.Tag=$(BUILD_TAG) \
11
 -X github.com/crowdsecurity/cs-firewall-bouncer/pkg/version.GoVersion=$(BUILD_GOVERSION)"
(-)b/security/crowdsec/Makefile (-3 / +4 lines)
Lines 1-5 Link Here
1
PORTNAME=	crowdsec
1
PORTNAME=	crowdsec
2
PORTVERSION=	1.2.1	# NOTE: change BUILD_VERSION and BUILD_TAG as well
2
PORTVERSION=	1.2.2	# NOTE: change BUILD_VERSION and BUILD_TAG as well
3
DISTVERSIONPREFIX=	v
3
DISTVERSIONPREFIX=	v
4
CATEGORIES=	security
4
CATEGORIES=	security
5
5
Lines 18-23 USES= gmake Link Here
18
USE_GITHUB=	yes
18
USE_GITHUB=	yes
19
GH_ACCOUNT=	crowdsecurity
19
GH_ACCOUNT=	crowdsecurity
20
GH_PROJECT=	crowdsec
20
GH_PROJECT=	crowdsec
21
GH_TAGNAME=	v1.2.2-freebsd
21
#GH_TAGNAME is automatically set from DISTVERSION
22
#GH_TAGNAME is automatically set from DISTVERSION
22
23
23
USE_RC_SUBR=	crowdsec
24
USE_RC_SUBR=	crowdsec
Lines 29-36 SUB_FILES= pkg-message \ Link Here
29
30
30
# BUILD_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))
31
# BUILD_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))
31
# BUILD_TAG=$(git rev-parse HEAD)
32
# BUILD_TAG=$(git rev-parse HEAD)
32
MAKE_ENV=	BUILD_VERSION="v1.2.1" \
33
MAKE_ENV=	BUILD_VERSION="v1.2.2" \
33
		BUILD_TAG="dd03d073558e380c283afe66942f537c3da647ff"
34
		BUILD_TAG="7865ec368e54e28b23b54a187b9f96999f361f12"
34
35
35
PLUGIN_DIR=	${PREFIX}/lib/crowdsec/plugins
36
PLUGIN_DIR=	${PREFIX}/lib/crowdsec/plugins
36
STAGE_PLUGINS=	${STAGEDIR}${PLUGIN_DIR}
37
STAGE_PLUGINS=	${STAGEDIR}${PLUGIN_DIR}
(-)b/security/crowdsec/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1637702390
1
TIMESTAMP = 1640118841
2
SHA256 (crowdsecurity-crowdsec-v1.2.1_GH0.tar.gz) = e3a9bbb70b1995a83c5001d06dbbcb5f59d43e4d7c18b60548f305a62d2dd6a3
2
SHA256 (crowdsecurity-crowdsec-v1.2.2-v1.2.2-freebsd_GH0.tar.gz) = 25f8503122b38e10f837c4eb8cf7e43ceb15de9a05ea7e89384715a7567ad8cd
3
SIZE (crowdsecurity-crowdsec-v1.2.1_GH0.tar.gz) = 659398
3
SIZE (crowdsecurity-crowdsec-v1.2.2-v1.2.2-freebsd_GH0.tar.gz) = 16571481
(-)b/security/crowdsec/files/crowdsec.in (-8 / +3 lines)
Lines 48-54 crowdsec_precmd() { Link Here
48
        cs_cli hub update || :
48
        cs_cli hub update || :
49
    fi
49
    fi
50
50
51
    if [ -z "$(cs_cli machines list -o raw)" ]; then
51
    if [ "$(cs_cli machines list -o json)" = "[]" ]; then
52
        echo "Registering LAPI"
52
        echo "Registering LAPI"
53
        cs_cli machines add --auto || :
53
        cs_cli machines add --auto || :
54
    fi
54
    fi
Lines 59-71 crowdsec_precmd() { Link Here
59
        cs_cli capi register || :
59
        cs_cli capi register || :
60
    fi
60
    fi
61
61
62
    cs_cli collections inspect crowdsecurity/linux >/dev/null || cs_cli collections install crowdsecurity/linux || :
62
    cs_cli collections inspect crowdsecurity/freebsd | grep ^installed | grep -q true || \
63
63
        cs_cli collections install crowdsecurity/freebsd || :
64
    DATA_DIR=$(Config ConfigPaths.DataDir)
65
    if [ ! -f "${DATA_DIR}/GeoLite2-City.mmdb" ]; then
66
        echo "Installing GeoIP enricher"
67
        cs_cli parsers install crowdsecurity/geoip-enrich || :
68
    fi
69
}
64
}
70
65
71
crowdsec_start()
66
crowdsec_start()
(-)b/security/crowdsec/files/patch-Makefile (-8 / +22 lines)
Lines 1-11 Link Here
1
--- Makefile.orig	2021-11-17 09:15:38 UTC
1
--- Makefile.orig	2021-12-21 21:18:22 UTC
2
+++ Makefile
2
+++ Makefile
3
@@ -42,7 +42,7 @@ BUILD_VERSION?="$(shell git describe --tags `git rev-l
3
@@ -44,14 +44,14 @@ BUILD_CODENAME=$(shell cat RELEASE.json | jq -r .CodeN
4
 BUILD_GOVERSION="$(shell go version | cut -d " " -f3 | sed -E 's/[go]+//g')"
5
 BUILD_CODENAME=$(shell cat RELEASE.json | jq -r .CodeName)
6
 BUILD_TIMESTAMP=$(shell date +%F"_"%T)
4
 BUILD_TIMESTAMP=$(shell date +%F"_"%T)
7
-BUILD_TAG="$(shell git rev-parse HEAD)"
5
 BUILD_TAG?="$(shell git rev-parse HEAD)"
8
+BUILD_TAG?="$(shell git rev-parse HEAD)"
9
 
6
 
10
 export LD_OPTS=-ldflags "-s -w -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Version=$(BUILD_VERSION) \
7
-export LD_OPTS=-ldflags "-s -w -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Version=$(BUILD_VERSION) \
8
+export LD_OPTS=-mod vendor -modcacherw -ldflags "-s -w -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Version=$(BUILD_VERSION) \
11
 -X github.com/crowdsecurity/crowdsec/pkg/cwversion.System=$(SYSTEM) \
9
 -X github.com/crowdsecurity/crowdsec/pkg/cwversion.System=$(SYSTEM) \
12
- 
10
 -X github.com/crowdsecurity/crowdsec/pkg/cwversion.BuildDate=$(BUILD_TIMESTAMP) \
11
 -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Codename=$(BUILD_CODENAME)  \
12
 -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Tag=$(BUILD_TAG) \
13
 -X github.com/crowdsecurity/crowdsec/pkg/cwversion.GoVersion=$(BUILD_GOVERSION)"
14
 
15
-export LD_OPTS_STATIC=-ldflags "-s -w -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Version=$(BUILD_VERSION) \
16
+export LD_OPTS_STATIC=-mod vendor -modcacherw -ldflags "-s -w -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Version=$(BUILD_VERSION) \
17
 -X github.com/crowdsecurity/crowdsec/pkg/cwversion.BuildDate=$(BUILD_TIMESTAMP) \
18
 -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Codename=$(BUILD_CODENAME)  \
19
 -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Tag=$(BUILD_TAG) \
20
@@ -176,4 +176,4 @@ check_release:
21
 release: check_release build package
22
 
23
 .PHONY:
24
-release_static: check_release static package_static
25
\ No newline at end of file
26
+release_static: check_release static package_static

Return to bug 260262