Bug 265462 - security/crowdsec: update to 1.4.1
Summary: security/crowdsec: update to 1.4.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Nuno Teixeira
URL: https://github.com/crowdsecurity/crow...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-26 20:02 UTC by marco
Modified: 2022-08-04 18:37 UTC (History)
2 users (show)

See Also:
marco: maintainer-feedback+


Attachments
patch for crowdsec 1.4.1 (2.58 KB, patch)
2022-07-26 20:02 UTC, marco
marco: maintainer-approval+
Details | Diff
crowdsec-1.4.1 variables fixed v1 (2.20 KB, patch)
2022-08-02 12:43 UTC, Nuno Teixeira
eduardo: maintainer-approval? (marco)
Details | Diff
patch for crowdsec 1.4.1 v2 (2.58 KB, patch)
2022-08-04 10:26 UTC, marco
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description marco 2022-07-26 20:02:48 UTC
Created attachment 235497 [details]
patch for crowdsec 1.4.1

Performance improvements, TLS support and more.

Full changelog: https://github.com/crowdsecurity/crowdsec/releases/tag/v1.4.1
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2022-07-26 20:02:48 UTC
Maintainer informed via mail
Comment 2 Nuno Teixeira freebsd_committer freebsd_triage 2022-07-27 10:04:12 UTC
Hi,

Maintainer e-mail address differs from bugzilla.
Would you like to update bugzilla email?

Cheers
Comment 3 marco 2022-08-02 07:54:12 UTC
(In reply to Nuno Teixeira from comment #2)

done, thanks
Comment 4 Nuno Teixeira freebsd_committer freebsd_triage 2022-08-02 12:43:32 UTC
Created attachment 235632 [details]
crowdsec-1.4.1 variables fixed v1

Sugestion:

1. switch to DISTVERSION
---
 PORTNAME=      crowdsec
-PORTVERSION=   1.3.4   # NOTE: change BUILD_VERSION and BUILD_TAG as well
-PORTREVISION=  2
 DISTVERSIONPREFIX=     v
+DISTVERSION=   1.4.1   # NOTE: change _BUILD_TAG as well
 CATEGORIES=    security
---

2. remove #GH_TAGNAME comment
   add user varialble _BUILD_TAG (short hash)
---
-GH_TAGNAME=    v1.3.4-freebsd
-#GH_TAGNAME is automatically set from DISTVERSION
+GH_TAGNAME=    v1.4.1-freebsd
+_BUILD_TAG=    527995f
---

3. substitute BUILD_VERSION variable
   substitute BUILD_VERSION variable
---
-MAKE_ENV=      BUILD_VERSION="v1.3.4" \
-               BUILD_TAG="c196ed45b62c12d9c6549da927c37c64bd08c642" \
+MAKE_ENV=      BUILD_VERSION="${DISTVERSIONFULL}" \
+               BUILD_TAG="${_BUILD_TAG}" \
---

Question: since GH_TAGNAME could be a hash of a commit id to do a snapshot, in this example a commit id, why it is needed to mention hash in BUILD_TAG?

IMO, BUILD_TAG=${GH_TAGNAME} will be sufficient

Could you test it?

Cheers
Comment 5 marco 2022-08-03 13:55:03 UTC
Hi, thanks for suggestion!

Long story short: I have tested, I agree and also GH_TAGNAME= ${DISTVERSIONFULL}-freebsd

do you need a new patch?


Now the long story.

I need the freebsd release tags because I include vendored dependencies, which are not used in the other builds. But if I reference only the commit hash in GH_TAGNAME then I would have nothing, anywhere, that references the tag name. I could remove the 1.3.4-freebsd and its packages would still accidentally build while taking the code from the 1.4.1-freebsd history... I don't like that.

On the other hand the (misnamed) BUILD_TAG variable is used by the "cscli" command to display the version number. The makefile calls "git rev-parse HEAD" under Linux but I can't do that while building from a zip file.

If I set it to the tag name it would render as "v1.4.1-v1.4.1-freebsd".

Ideally, I should be able to avoid a separate release tag by retrieving the dependencies before the build step, but I have not been able to replicate the functionality provided by go:modules, or configure it for my case.
Comment 6 Nuno Teixeira freebsd_committer freebsd_triage 2022-08-03 22:05:02 UTC
(In reply to marco from comment #5)

Hi Marco,

Ok, please upload a new patch so I can commit.

Cheers
Comment 7 marco 2022-08-04 10:26:38 UTC
Created attachment 235676 [details]
patch for crowdsec 1.4.1 v2

done. thanks!
Comment 8 commit-hook freebsd_committer freebsd_triage 2022-08-04 18:35:30 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3dac205de1896cb1e3362d2b74a672ef94d10654

commit 3dac205de1896cb1e3362d2b74a672ef94d10654
Author:     Marco <marco@crowdsec.net>
AuthorDate: 2022-08-04 18:32:44 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2022-08-04 18:34:51 +0000

    security/crowdsec: Update to 1.4.1

     - Performance improvements, TLS support and more.

    ChangeLog:      https://github.com/crowdsecurity/crowdsec/releases/tag/v1.4.1
    PR:             265462

 security/crowdsec/Makefile | 17 +++++++++--------
 security/crowdsec/distinfo |  6 +++---
 2 files changed, 12 insertions(+), 11 deletions(-)
Comment 9 Nuno Teixeira freebsd_committer freebsd_triage 2022-08-04 18:37:12 UTC
Committed, thanks!