From owner-svn-ports-head@freebsd.org Wed Mar 24 16:20:28 2021 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 380455B9F0E; Wed, 24 Mar 2021 16:20:28 +0000 (UTC) (envelope-from crees@bayofrum.net) Received: from mail264c50.megamailservers.eu (mail1422c50.megamailservers.eu [91.136.14.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F5D3v4ZZ2z4hFj; Wed, 24 Mar 2021 16:20:26 +0000 (UTC) (envelope-from crees@bayofrum.net) X-Authenticated-User: crees@uwclub.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1616602825; bh=l1Ly2Yy6ENEbwV6KhEr/bmq+IKkvaJdVqR6e5l44khA=; h=Date:In-Reply-To:References:Subject:To:CC:From:From; b=DHs3KyQxvcsGG31btIfFPAcUwpeg/vKr+qxLD6LcESvPQuvUhdXc8Jshz/qNv4J00 g4IX4ogkOKiC96xLKg1P7TTN/f9FfjhA3f8h4jlXwNUE+8ff5gpv5qFceGPKAThAYp pAAivuY1xHwsbc7TnRZBu4Oc6WGRcim+JL5DMAw0= Feedback-ID: crees@bayofrum. Received: from pegasus.bayofrum.net (host-92-6-216-210.as43234.net [92.6.216.210]) (authenticated bits=0) by mail264c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 12OGKMRj004666; Wed, 24 Mar 2021 16:20:24 +0000 X-Spam-Status: No X-bayofrum-MailScanner-From: crees@bayofrum.net X-bayofrum-MailScanner: Found to be clean X-bayofrum-MailScanner-ID: C4E421FA2.A6611 X-bayofrum-MailScanner-Information: Please contact the ISP for more information Received: from [10.116.129.116] (unknown [213.205.241.56]) by pegasus.bayofrum.net (Postfix) with ESMTPSA id C4E421FA2; Wed, 24 Mar 2021 16:12:03 +0000 (GMT) Date: Wed, 24 Mar 2021 16:12:04 +0000 User-Agent: K-9 Mail for Android In-Reply-To: <20210324155631.zvtmepz7ropprvwm@aniel.nours.eu> References: <202103241545.12OFjJvO092197@repo.freebsd.org> <20210324155631.zvtmepz7ropprvwm@aniel.nours.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: svn commit: r569135 - in head/security/crowdsec: . files To: Baptiste Daroussin , Sofian Brabez CC: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org From: Chris Rees Message-ID: X-CTCH-RefID: str=0001.0A742F16.605B66C8.008A, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=C+OXNjH+ c=1 sm=1 tr=0 a=4b3u17zzDsD97o3RVOSM0g==:117 a=4b3u17zzDsD97o3RVOSM0g==:17 a=IkcTkHD0fZMA:10 a=dESyimp9J3IA:10 a=6I5d2MoRAAAA:8 a=qNXND5f73KR382MpBKAA:9 a=QEXdDO2ut3YA:10 a=IjZwj45LgO3ly-622nXo:22 a=RBBcRewTFc8P4JkPnay6:22 X-Origin-Country: GB X-Rspamd-Queue-Id: 4F5D3v4ZZ2z4hFj X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Mar 2021 16:20:28 -0000 Hi Sofian, Sorry, feel as though I'm piling on here! On 24 March 2021 15:56:31 GMT, Baptiste Daroussin wro= te: >On Wed, Mar 24, 2021 at 03:45:19PM +0000, Sofian Brabez wrote: >> Author: sbz >> Date: Wed Mar 24 15:45:18 2021 >> New Revision: 569135 >> URL: https://svnweb=2Efreebsd=2Eorg/changeset/ports/569135 >>=20 >> Log: >> - Update to 1=2E0=2E9 >> - Add rc=2Ed script >>=20 >> Added: >> head/security/crowdsec/files/ >> head/security/crowdsec/files/crowdsec=2Ein (contents, props >changed) >> Modified: >> head/security/crowdsec/Makefile >> head/security/crowdsec/distinfo (contents, props changed) >>=20 >> Modified: head/security/crowdsec/Makefile >> >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/security/crowdsec/Makefile Wed Mar 24 15:25:44 >2021 (r569134) >> +++ head/security/crowdsec/Makefile Wed Mar 24 15:45:18 >2021 (r569135) >> @@ -1,7 +1,7 @@ >> # $FreeBSD$ >> =20 >> PORTNAME=3D crowdsec >> -PORTVERSION=3D 1=2E0=2E7 >> +PORTVERSION=3D 1=2E0=2E9 >> DISTVERSIONPREFIX=3D v >> CATEGORIES=3D security >> =20 >> @@ -20,6 +20,8 @@ GO_BUILDFLAGS=3D -ldflags "-s -w \ >> =20 >> GO_TARGET=3D =2E/cmd/crowdsec \ >> =2E/cmd/crowdsec-cli >> + >> +USE_RC_SUBR=3D crowdsec >> =20 >> PLIST_FILES=3D bin/crowdsec \ >> bin/crowdsec-cli >>=20 >> Modified: head/security/crowdsec/distinfo >> >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/security/crowdsec/distinfo Wed Mar 24 15:25:44 >2021 (r569134) >> +++ head/security/crowdsec/distinfo Wed Mar 24 15:45:18 >2021 (r569135) >> @@ -1,5 +1,5 @@ >> -TIMESTAMP =3D 1615033328 >> -SHA256 (go/security_crowdsec/crowdsec-v1=2E0=2E7/v1=2E0=2E7=2Emod) =3D >810ca243ce2951dd7ab23d955efc8f50410c94feb8babc47a783146a4c06c798 >> -SIZE (go/security_crowdsec/crowdsec-v1=2E0=2E7/v1=2E0=2E7=2Emod) =3D 3= 310 >> -SHA256 (go/security_crowdsec/crowdsec-v1=2E0=2E7/v1=2E0=2E7=2Ezip) =3D >1d7f5956826096405b24684db3c924476ffb7fa02f5859af5a6a2c00d8b1d753 >> -SIZE (go/security_crowdsec/crowdsec-v1=2E0=2E7/v1=2E0=2E7=2Ezip) =3D 2= 9305256 >> +TIMESTAMP =3D 1616585825 >> +SHA256 (go/security_crowdsec/crowdsec-v1=2E0=2E9/v1=2E0=2E9=2Emod) =3D >b95c6a35287b10ff019c2c3391bad1d0759415cf53cb7c0bfe7b154e479f6531 >> +SIZE (go/security_crowdsec/crowdsec-v1=2E0=2E9/v1=2E0=2E9=2Emod) =3D 3= 322 >> +SHA256 (go/security_crowdsec/crowdsec-v1=2E0=2E9/v1=2E0=2E9=2Ezip) =3D >0b61f7e5ed162796d14636243ffcc8c8e336a3a3ee7891115141447c7626e8f7 >> +SIZE (go/security_crowdsec/crowdsec-v1=2E0=2E9/v1=2E0=2E9=2Ezip) =3D 2= 9314582 >>=20 >> Added: head/security/crowdsec/files/crowdsec=2Ein >> >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/security/crowdsec/files/crowdsec=2Ein Wed Mar 24 15:45:18 >2021 (r569135) >> @@ -0,0 +1,49 @@ >> +#!/bin/sh >> + >> +# $FreeBSD$ >> +# >> +# PROVIDE: crowdsec >> +# REQUIRE: LOGIN DAEMON NETWORKING >> +# KEYWORD: shutdown >> +# >> +# Add the following lines to /etc/rc=2Econf=2Elocal or /etc/rc=2Econf >> +# to enable this service: >> +# >> +# crowdsec_enable (bool): Set it to YES to enable crowdsec agent=2E >> +# Default is "NO"=2E >> +# crowdsec_config (str): Set the agent config path=2E >> +# Default is "%%PREFIX%%/etc/crowdsec/config=2Eyaml"=2E >> +# crowdsec_flags (str): Set the extra flags to run agent=2E >> +# Default is "" >> + >> +=2E /etc/rc=2Esubr >> + >> +name=3Dcrowdsec >> +desc=3D"Crowdsec Agent" >> +rcvar=3Dcrowdsec_enable >> + >> +load_rc_config $name >> + >> +: ${crowdsec_enable:=3D"NO"} >> +: ${crowdsec_config:=3D"%%PREFIX%%/etc/crowdsec/config=2Eyaml"} >> +: ${crowdsec_flags:=3D""} Unnecessary >> + >> +pidfile=3D/var/run/${name}=2Epid >> +command=3D"%%PREFIX%%/bin/${name}" >procname=3D"%%PREFIX%%/bin/${NAME} >command=3D"/usr/sbin/daemon" >commandargs=3D"-f -T ${name} -p ${pidfile} -- ${procname} -c >${crowdsec_config} ${crowdsec_flags}" > >And you don't need the _start() function Please also run it through rclint, and rc style is to not put braces aroun= d variable names unless in the middle of a word=2E Chris