Sat Sep 4 14:10:34 2021 UTC ()
beats: fix obvious mistake in a patch.

Fixes build with Go 1.17.


(bsiegert)
diff -r1.67 -r1.68 pkgsrc/sysutils/beats/Makefile
diff -r1.28 -r1.29 pkgsrc/sysutils/beats/distinfo
diff -r1.1 -r1.2 pkgsrc/sysutils/beats/patches/patch-vendor_golang.org_x_crypto_blake2b_blake2bAVX2__amd64.go

cvs diff -r1.67 -r1.68 pkgsrc/sysutils/beats/Makefile (expand / switch to unified diff)

--- pkgsrc/sysutils/beats/Makefile 2021/08/11 19:35:11 1.67
+++ pkgsrc/sysutils/beats/Makefile 2021/09/04 14:10:33 1.68
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1# $NetBSD: Makefile,v 1.67 2021/08/11 19:35:11 bsiegert Exp $ 1# $NetBSD: Makefile,v 1.68 2021/09/04 14:10:33 bsiegert Exp $
2 2
3DISTNAME= beats-6.8.13 3DISTNAME= beats-6.8.13
4PKGREVISION= 6 4PKGREVISION= 7
5CATEGORIES= sysutils 5CATEGORIES= sysutils
6MASTER_SITES= ${MASTER_SITE_GITHUB:=elastic/} 6MASTER_SITES= ${MASTER_SITE_GITHUB:=elastic/}
7GITHUB_PROJECT= beats 7GITHUB_PROJECT= beats
8GITHUB_TAG= v${PKGVERSION_NOREV} 8GITHUB_TAG= v${PKGVERSION_NOREV}
9 9
10MAINTAINER= pkgsrc-users@NetBSD.org 10MAINTAINER= pkgsrc-users@NetBSD.org
11HOMEPAGE= https://www.elastic.co/products/beats 11HOMEPAGE= https://www.elastic.co/products/beats
12COMMENT= Data Shippers for Elasticsearch 12COMMENT= Data Shippers for Elasticsearch
13LICENSE= apache-2.0 13LICENSE= apache-2.0
14 14
15EXTRACT_USING= bsdtar 15EXTRACT_USING= bsdtar
16USE_TOOLS+= gmake 16USE_TOOLS+= gmake
17 17

cvs diff -r1.28 -r1.29 pkgsrc/sysutils/beats/distinfo (expand / switch to unified diff)

--- pkgsrc/sysutils/beats/distinfo 2021/01/08 08:32:18 1.28
+++ pkgsrc/sysutils/beats/distinfo 2021/09/04 14:10:33 1.29
@@ -1,11 +1,11 @@ @@ -1,11 +1,11 @@
1$NetBSD: distinfo,v 1.28 2021/01/08 08:32:18 he Exp $ 1$NetBSD: distinfo,v 1.29 2021/09/04 14:10:33 bsiegert Exp $
2 2
3SHA1 (beats-6.8.13.tar.gz) = e8940f9b6a75ed8e0e6ae9177774d2e410f865f6 3SHA1 (beats-6.8.13.tar.gz) = e8940f9b6a75ed8e0e6ae9177774d2e410f865f6
4RMD160 (beats-6.8.13.tar.gz) = 52959989dcd8002c0e2320f738cd43b76be8553b 4RMD160 (beats-6.8.13.tar.gz) = 52959989dcd8002c0e2320f738cd43b76be8553b
5SHA512 (beats-6.8.13.tar.gz) = 39f1ba06e1930ea498c13dda11cd835096adbcd075585672004fdc9e19d96971936e47f9c631ee02f59984c10858cfd914de136ddc356e8c39fe833401b42304 5SHA512 (beats-6.8.13.tar.gz) = 39f1ba06e1930ea498c13dda11cd835096adbcd075585672004fdc9e19d96971936e47f9c631ee02f59984c10858cfd914de136ddc356e8c39fe833401b42304
6Size (beats-6.8.13.tar.gz) = 35569151 bytes 6Size (beats-6.8.13.tar.gz) = 35569151 bytes
7SHA1 (patch-libbeat_common_file_stderr__other.go) = 9e1f28a9721c996ba75a7712d39c70186f549067 7SHA1 (patch-libbeat_common_file_stderr__other.go) = 9e1f28a9721c996ba75a7712d39c70186f549067
8SHA1 (patch-vendor_github.com_insomniacslk_dhcp_dhcpv4_client.go) = 4588ee4feba431bdc1c8250d58fa9ac66f733bb3 8SHA1 (patch-vendor_github.com_insomniacslk_dhcp_dhcpv4_client.go) = 4588ee4feba431bdc1c8250d58fa9ac66f733bb3
9SHA1 (patch-vendor_github.com_tsg_gopacket_pcap_pcap.go) = 887b009bb2613ed5241fbf9a9ff3e8e75df98cae 9SHA1 (patch-vendor_github.com_tsg_gopacket_pcap_pcap.go) = 887b009bb2613ed5241fbf9a9ff3e8e75df98cae
10SHA1 (patch-vendor_golang.org_x_crypto_blake2b_blake2bAVX2__amd64.go) = 2ee9c516c6f0da5789b97b498f5db7c7eae106cd 10SHA1 (patch-vendor_golang.org_x_crypto_blake2b_blake2bAVX2__amd64.go) = 210069b9740fdb03a99c9efa6becdb650688d9c2
11SHA1 (patch-vendor_golang.org_x_crypto_blake2b_blake2bAVX2__amd64.s) = b6aabeda2abad29d9f5d4032f57ea66eb4231688 11SHA1 (patch-vendor_golang.org_x_crypto_blake2b_blake2bAVX2__amd64.s) = b6aabeda2abad29d9f5d4032f57ea66eb4231688

cvs diff -r1.1 -r1.2 pkgsrc/sysutils/beats/patches/patch-vendor_golang.org_x_crypto_blake2b_blake2bAVX2__amd64.go (expand / switch to unified diff)

--- pkgsrc/sysutils/beats/patches/patch-vendor_golang.org_x_crypto_blake2b_blake2bAVX2__amd64.go 2019/03/15 15:03:02 1.1
+++ pkgsrc/sysutils/beats/patches/patch-vendor_golang.org_x_crypto_blake2b_blake2bAVX2__amd64.go 2021/09/04 14:10:33 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: patch-vendor_golang.org_x_crypto_blake2b_blake2bAVX2__amd64.go,v 1.1 2019/03/15 15:03:02 he Exp $ 1$NetBSD: patch-vendor_golang.org_x_crypto_blake2b_blake2bAVX2__amd64.go,v 1.2 2021/09/04 14:10:33 bsiegert Exp $
2 2
3We get link errors about runtime.support_avx and runtime.support_avx2, so 3We get link errors about runtime.support_avx and runtime.support_avx2, so
4revert the offending commit from 4revert the offending commit from
5https://github.com/golang/crypto/commit/b0697eccbea9adec5b7ba8008f4c33d98d733388 5https://github.com/golang/crypto/commit/b0697eccbea9adec5b7ba8008f4c33d98d733388
6I've not been able to track which version of golang.org/x/crypto is 6I've not been able to track which version of golang.org/x/crypto is
7embedded in the beats package, and frankly am befuddled that this sort 7embedded in the beats package, and frankly am befuddled that this sort
8of thing makes it into released code, in this day and age with widespread 8of thing makes it into released code, in this day and age with widespread
9use of CI etc. This coupled with the apparent widespread practice of 9use of CI etc. This coupled with the apparent widespread practice of
10"vendoring" code (copy a vendor's code and ship it as part of your source 10"vendoring" code (copy a vendor's code and ship it as part of your source
11package) makes it difficult to stamp out this sort of bugs. Sigh! 11package) makes it difficult to stamp out this sort of bugs. Sigh!
12 12
13--- vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.go.orig 2019-03-06 10:13:10.000000000 +0000 13--- vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.go.orig 2019-03-06 10:13:10.000000000 +0000
14+++ vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.go 14+++ vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.go
@@ -25,24 +25,24 @@ package) makes it difficult to stamp out @@ -25,24 +25,24 @@ package) makes it difficult to stamp out
25  25
26-//go:noescape 26-//go:noescape
27-func supportsSSE4() bool 27-func supportsSSE4() bool
28+//go:linkname x86_HasAVX internal/cpu.X86.HasAVX 28+//go:linkname x86_HasAVX internal/cpu.X86.HasAVX
29+var x86_HasAVX bool 29+var x86_HasAVX bool
30  30
31-//go:noescape 31-//go:noescape
32-func supportsAVX() bool 32-func supportsAVX() bool
33+//go:linkname x86_HasAVX2 internal/cpu.X86.HasAVX2 33+//go:linkname x86_HasAVX2 internal/cpu.X86.HasAVX2
34+var x86_HasAVX2 bool 34+var x86_HasAVX2 bool
35  35
36-//go:noescape 36-//go:noescape
37-func supportsAVX2() bool 37-func supportsAVX2() bool
38+//go:linkname x86_HasAVX internal/cpu.X86.HasSSE4 38+//go:linkname x86_HasSSE4 internal/cpu.X86.HasSSE4
39+var x86_HasSSE4 bool 39+var x86_HasSSE4 bool
40+ 40+
41+func init() { 41+func init() {
42+ useAVX2 = x86_HasAVX2 42+ useAVX2 = x86_HasAVX2
43+ useAVX = x86_HasAVX 43+ useAVX = x86_HasAVX
44+ useSSE4 = x86_HasSSE4 44+ useSSE4 = x86_HasSSE4
45+} 45+}
46  46
47 //go:noescape 47 //go:noescape
48 func hashBlocksAVX2(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) 48 func hashBlocksAVX2(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)