diff --git a/sysutils/beats/Makefile b/sysutils/beats/Makefile index 02aecf33c37a..b943f28342f4 100644 --- a/sysutils/beats/Makefile +++ b/sysutils/beats/Makefile @@ -1,13 +1,12 @@ -# $NetBSD: Makefile,v 1.51 2020/04/12 11:01:46 bsiegert Exp $ +# $NetBSD: Makefile,v 1.52 2020/04/15 13:00:55 jperkin Exp $ -DISTNAME= beats-6.6.2 -PKGREVISION= 11 +DISTNAME= beats-6.8.8 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_GITHUB:=elastic/} GITHUB_PROJECT= beats GITHUB_TAG= v${PKGVERSION_NOREV} -MAINTAINER= fhajny@NetBSD.org +MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= https://www.elastic.co/products/beats COMMENT= Data Shippers for Elasticsearch LICENSE= apache-2.0 @@ -34,10 +33,12 @@ PLIST.audit= yes .for beat in ${BEATS} CHECK_RELRO_SKIP+= bin/${beat} -CONF_FILES+= share/examples/beats/${beat}.yml \ - ${PKG_SYSCONFDIR}/${beat}.yml +CONF_FILES+= share/examples/beats/${beat}.yml \ + ${PKG_SYSCONFDIR}/${beat}.yml .endfor +BUILD_DEFS+= VARBASE + BEATS_DIR?= ${VARBASE}/db/beats BEATS_LOGDIR?= ${VARBASE}/log/beats diff --git a/sysutils/beats/distinfo b/sysutils/beats/distinfo index 687c646208b9..7c69967c5bac 100644 --- a/sysutils/beats/distinfo +++ b/sysutils/beats/distinfo @@ -1,10 +1,11 @@ -$NetBSD: distinfo,v 1.26 2019/03/18 12:36:42 he Exp $ +$NetBSD: distinfo,v 1.27 2020/04/15 13:00:55 jperkin Exp $ -SHA1 (beats-6.6.2.tar.gz) = ca8b05fa23d383e90b5d8357224491b8d3f38c10 -RMD160 (beats-6.6.2.tar.gz) = cdb95337644c09a40a2eb556b76e9cff6e93bde7 -SHA512 (beats-6.6.2.tar.gz) = 1bc16fdd4525a197e4deeedb29fbc77ec44418c5eb371be95fa09555c1344a2e423aab83207c8313ac6cd33ce7fe91fe7ca06837302917465b5e1803dbf7f66d -Size (beats-6.6.2.tar.gz) = 29119533 bytes +SHA1 (beats-6.8.8.tar.gz) = 2619cff0df437439b2a800dde11fdfc8935dca5f +RMD160 (beats-6.8.8.tar.gz) = b4916e3a5f7afcfc35e9fc860cccf7ff44ca93c0 +SHA512 (beats-6.8.8.tar.gz) = 6a86948000e77d32587c523d018e4f1561ec7f44f68644971f44f8fd23351b3aad48f3682563467020204de1447a9ed34bd9366d2b44c13bdcb2a28af41ab6d6 +Size (beats-6.8.8.tar.gz) = 35564363 bytes +SHA1 (patch-libbeat_common_file_stderr__other.go) = 9e1f28a9721c996ba75a7712d39c70186f549067 SHA1 (patch-vendor_github.com_insomniacslk_dhcp_dhcpv4_client.go) = 4588ee4feba431bdc1c8250d58fa9ac66f733bb3 -SHA1 (patch-vendor_github.com_tsg_gopacket_pcap_pcap.go) = 2ef13f84cbf2e1da428e7b08625ffa6111ebcdf5 +SHA1 (patch-vendor_github.com_tsg_gopacket_pcap_pcap.go) = 887b009bb2613ed5241fbf9a9ff3e8e75df98cae SHA1 (patch-vendor_golang.org_x_crypto_blake2b_blake2bAVX2__amd64.go) = 2ee9c516c6f0da5789b97b498f5db7c7eae106cd SHA1 (patch-vendor_golang.org_x_crypto_blake2b_blake2bAVX2__amd64.s) = b6aabeda2abad29d9f5d4032f57ea66eb4231688 diff --git a/sysutils/beats/patches/patch-libbeat_common_file_stderr__other.go b/sysutils/beats/patches/patch-libbeat_common_file_stderr__other.go new file mode 100644 index 000000000000..c775d5fa936b --- /dev/null +++ b/sysutils/beats/patches/patch-libbeat_common_file_stderr__other.go @@ -0,0 +1,20 @@ +$NetBSD: patch-libbeat_common_file_stderr__other.go,v 1.1 2020/04/15 13:00:55 jperkin Exp $ + +Use more portable unix.Dup2(). + +--- libbeat/common/file/stderr_other.go.orig 2020-03-05 13:27:52.000000000 +0000 ++++ libbeat/common/file/stderr_other.go +@@ -21,11 +21,11 @@ package file + + import ( + "os" +- "syscall" ++ "golang.org/x/sys/unix" + ) + + // RedirectStandardError causes all standard error output to be directed to the + // given file. + func RedirectStandardError(toFile *os.File) error { +- return syscall.Dup2(int(toFile.Fd()), 2) ++ return unix.Dup2(int(toFile.Fd()), 2) + } diff --git a/sysutils/beats/patches/patch-vendor_github.com_tsg_gopacket_pcap_pcap.go b/sysutils/beats/patches/patch-vendor_github.com_tsg_gopacket_pcap_pcap.go index 7c82807dea5f..ceb5f96b6d1a 100644 --- a/sysutils/beats/patches/patch-vendor_github.com_tsg_gopacket_pcap_pcap.go +++ b/sysutils/beats/patches/patch-vendor_github.com_tsg_gopacket_pcap_pcap.go @@ -1,8 +1,9 @@ -$NetBSD: patch-vendor_github.com_tsg_gopacket_pcap_pcap.go,v 1.1 2017/01/05 16:43:09 fhajny Exp $ +$NetBSD: patch-vendor_github.com_tsg_gopacket_pcap_pcap.go,v 1.2 2020/04/15 13:00:55 jperkin Exp $ Just require pcap, fixes NetBSD. +Pull in upstream patch to fix newer cgo syntax. ---- vendor/github.com/tsg/gopacket/pcap/pcap.go.orig 2016-12-06 07:41:08.000000000 +0000 +--- vendor/github.com/tsg/gopacket/pcap/pcap.go.orig 2020-03-05 13:27:52.000000000 +0000 +++ vendor/github.com/tsg/gopacket/pcap/pcap.go @@ -8,14 +8,7 @@ package pcap @@ -20,3 +21,61 @@ Just require pcap, fixes NetBSD. #include #include +@@ -170,7 +163,7 @@ type InterfaceAddress struct { + // BPF is a compiled filter program, useful for offline packet matching. + type BPF struct { + orig string +- bpf _Ctype_struct_bpf_program // takes a finalizer, not overriden by outsiders ++ bpf C.struct_bpf_program // takes a finalizer, not overriden by outsiders + } + + // BlockForever, when passed into OpenLive/SetTimeout, causes it to block forever +@@ -382,7 +375,7 @@ func (p *Handle) Error() error { + + // Stats returns statistics on the underlying pcap handle. + func (p *Handle) Stats() (stat *Stats, err error) { +- var cstats _Ctype_struct_pcap_stat ++ var cstats C.struct_pcap_stat + if -1 == C.pcap_stats(p.cptr, &cstats) { + return nil, p.Error() + } +@@ -443,7 +436,7 @@ func (p *Handle) SetBPFFilter(expr strin + } + } + +- var bpf _Ctype_struct_bpf_program ++ var bpf C.struct_bpf_program + cexpr := C.CString(expr) + defer C.free(unsafe.Pointer(cexpr)) + +@@ -486,7 +479,7 @@ func (b *BPF) String() string { + } + + // BPF returns the compiled BPF program. +-func (b *BPF) BPF() _Ctype_struct_bpf_program { ++func (b *BPF) BPF() C.struct_bpf_program { + return b.bpf + } + +@@ -549,10 +542,10 @@ func FindAllDevs() (ifs []Interface, err + return + } + +-func findalladdresses(addresses *_Ctype_struct_pcap_addr) (retval []InterfaceAddress) { ++func findalladdresses(addresses *C.struct_pcap_addr) (retval []InterfaceAddress) { + // TODO - make it support more than IPv4 and IPv6? + retval = make([]InterfaceAddress, 0, 1) +- for curaddr := addresses; curaddr != nil; curaddr = (*_Ctype_struct_pcap_addr)(curaddr.next) { ++ for curaddr := addresses; curaddr != nil; curaddr = (*C.struct_pcap_addr)(curaddr.next) { + var a InterfaceAddress + var err error + // In case of a tun device on Linux the link layer has no curaddr.addr. +@@ -818,7 +811,7 @@ func (h *Handle) NewDumper(file string) + // Writes a packet to the file. The return values of ReadPacketData + // can be passed to this function as arguments. + func (d *Dumper) WritePacketData(data []byte, ci gopacket.CaptureInfo) (err error) { +- var pkthdr _Ctype_struct_pcap_pkthdr ++ var pkthdr C.struct_pcap_pkthdr + pkthdr.caplen = C.bpf_u_int32(ci.CaptureLength) + pkthdr.len = C.bpf_u_int32(ci.Length) +