From nobody Mon Jan 3 13:07:47 2022 X-Original-To: freebsd-ports@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 12C871922BA0 for ; Mon, 3 Jan 2022 13:08:02 +0000 (UTC) (envelope-from marco@crowdsec.net) Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JSGJJ4yjcz3P0r for ; Mon, 3 Jan 2022 13:08:00 +0000 (UTC) (envelope-from marco@crowdsec.net) Received: by mail-lj1-x231.google.com with SMTP id u22so55669018lju.7 for ; Mon, 03 Jan 2022 05:08:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crowdsec-net.20210112.gappssmtp.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=EShQHbIf5XD5hDjQOY1mWfNWBx2sHFGlD9YoswP4FaM=; b=KuziC4vErZEv3CDFvcCYoqcLGTtvr/guoON53/0UiDLkMwQMZgg2B1jhvHtOY3+Par 0ky99GvZfyHUiAn9Ot4mXLAfIBXCufoB1tfODtbwuq8ikC4jidaSlNT5UDTDuGPe2y7g 1himjn9393CBCos70cIhZxidxR/YHgaRw6+W0BDdZpjPdhMlk18TXgm1evCQGsz1f7Qx 5O5zar/sAH9HC/jNsE04m1n2uxvPPL8E6qMPbA921Ywv0D9aWxXYHsYckp+fQTwj89xL H3rmkgslieVCmtxuNU5ZAlDu5s0On1FRrzGpxFLXCcYJHivzNvmJb3I9E1huMBESjWGi I6Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=EShQHbIf5XD5hDjQOY1mWfNWBx2sHFGlD9YoswP4FaM=; b=aogll0v3MddvXf9zbat3A1e1aB81h0grl71EVzfis0SNd5V6gri4iXVT/uFUxsZeR/ FNzcjpFdDS14IYbDQ3jFqKgwn6ASNPmmX1K5VHSNkMPirjE4Iz6lS8n3Hp61yOzKOe21 WdrBmNCB+R0gAn7kVqYKnIC1bKLLOkyLHWSgowOKS/OJpVBw+QhK5gJ1V4T+grJ9gpNw psFJ6rJ2qkOnPYGVcbmwHBJZE8xa/Pul9hYK/ey54XgJuyEP2jBDXsPoGuCnJRHgA37o 4ZaB1eiUN0lAMRkTDmIboHQYQ7DpPkUjpwvgiXElyK3Cjbxlt1SGRAhEqfe0pbCpH9wE Cc1w== X-Gm-Message-State: AOAM530guQDe9kEKGJqUPjP9WtrweW4IAwNPnYdyqDt171cpRAFpCiHO IjUSywGY1QDCmPbI1hMzTUIlxIyNv+fbapyh5XGxbU7397dSpg== X-Google-Smtp-Source: ABdhPJxmsv1/FbbanouFeLzHgHYtPmAhuu5YFn0TXPsRWRlmSFiMFoY+Qb72ObiiYX6Yhwf2rdV1WGJqCNtJ7aNEK1I= X-Received: by 2002:a2e:7503:: with SMTP id q3mr33973427ljc.388.1641215278681; Mon, 03 Jan 2022 05:07:58 -0800 (PST) List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 From: marco+freebsd@crowdsec.net Date: Mon, 3 Jan 2022 14:07:47 +0100 Message-ID: Subject: Go dependencies and broken port To: freebsd-ports@freebsd.org Content-Type: multipart/alternative; boundary="000000000000afa6c605d4ad3538" X-Rspamd-Queue-Id: 4JSGJJ4yjcz3P0r X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=crowdsec-net.20210112.gappssmtp.com header.s=20210112 header.b=KuziC4vE; dmarc=none; spf=pass (mx1.freebsd.org: domain of marco@crowdsec.net designates 2a00:1450:4864:20::231 as permitted sender) smtp.mailfrom=marco@crowdsec.net X-Spamd-Result: default: False [0.99 / 15.00]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[crowdsec-net.20210112.gappssmtp.com:s=20210112]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; TO_DN_NONE(0.00)[]; NEURAL_SPAM_MEDIUM(0.25)[0.246]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[crowdsec.net]; NEURAL_SPAM_SHORT(0.99)[0.990]; DKIM_TRACE(0.00)[crowdsec-net.20210112.gappssmtp.com:+]; NEURAL_SPAM_LONG(0.25)[0.252]; FROM_NO_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::231:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[freebsd]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --000000000000afa6c605d4ad3538 Content-Type: text/plain; charset="UTF-8" Hello! I am in charge of maintaining the ports of security/crowdsec and security/crowdsec-firewall-bouncer, which are currently broken since a couple of weeks for not providing all Go dependencies before build time. I work for the upstream company but had little previous freebsd experience, hence the bug on my first port submission. Now, for the short term, I have submitted a fix that builds from a git tag with all vendored dependencies, and added the patch to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260264 I understand the previous maintainer (to whom the bug is assigned) has little time right now to review and commit again, so if somebody could have a look it would be greatly appreciated. In the long term, I'd like to avoid vendoring everything, which is not recommended by core Go devs anymore. The version of the port I inherited made use of go:modules from Mk/Uses/ go.mk, but our software has since grown some plugins as sub-projects with their own dependencies. It was a lot simpler to just call our own Makefile, as I did in https://github.com/crowdsecurity/packaging-freebsd/blob/master/security/crowdsec/Makefile My approach should then be to port the technique from go.mk to our Makefile (and run "go mod download", "go mod vendor".. by hand). A bit tricky (it would create one set of .zip and .mod for each plugin) but it should be doable. What do you think? Is there a simpler way? Thanks, Marco --000000000000afa6c605d4ad3538 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello!

I am in charge of maintaining the ports= of security/crowdsec and security/crowdsec-firewall-bouncer, which are cur= rently broken since a couple of weeks for not providing all Go=C2=A0 depend= encies before build time.
I work for the upstream company but had= little previous freebsd experience, hence the bug on my first port submiss= ion.

Now, for the short term, I have submitted a fix that builds from a git tag=20 with all vendored dependencies, and added the patch to https:= //bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260264

I understand the previous maintainer (to whom the bug is assigned) has=20 little time right now to review and commit again,=C2=A0 so if somebody coul= d=20 have a look it would be greatly appreciated.

In the long term, = I'd like to avoid vendoring everything, which is not recommended by cor= e Go devs anymore.
The version of the port I inherited made use o= f go:modules from Mk/Uses/go.mk, but our software has since grown some plugins as sub-projects with=20 their own dependencies. It was a lot simpler to just call our own=20 Makefile, as I did in https://= github.com/crowdsecurity/packaging-freebsd/blob/master/security/crowdsec/Ma= kefile

My approach should then be to port the = technique from go.mk to our Makefile (and run = "go mod download", "go mod vendor".. by hand).

A bit tricky (it would create one set of .zip and .mod for each plugin)=20 but it should be doable. What do you think? Is there a simpler way?

= Thanks,
Marco
--000000000000afa6c605d4ad3538--