FreeBSD Bugzilla – Attachment 202620 Details for
Bug 236094
sysutils/beats: fails to build with Go 1.12
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch file
beats-6.6.0.patch (text/plain), 6.10 KB, created by
Dmitri Goutnik
on 2019-03-05 21:47:47 UTC
(
hide
)
Description:
patch file
Filename:
MIME Type:
Creator:
Dmitri Goutnik
Created:
2019-03-05 21:47:47 UTC
Size:
6.10 KB
patch
obsolete
>Index: sysutils/beats/Makefile >=================================================================== >--- sysutils/beats/Makefile (revision 494738) >+++ sysutils/beats/Makefile (working copy) >@@ -12,8 +12,6 @@ > > LICENSE= APACHE20 > >-BROKEN= fails to build >- > USE_GITHUB= yes > GH_ACCOUNT= elastic > >@@ -23,11 +21,10 @@ > USE_RC_SUBR= ${GO_TARGETS} > > OPTIONS_DEFAULT=FILEBEAT HEARTBEAT METRICBEAT >-OPTIONS_DEFINE= FILEBEAT HEARTBEAT METRICBEAT PACKETBEAT > OPTIONS_SUB= yes > > OPTIONS_MULTI= BEATS >-OPTIONS_MULTI_BEATS=${OPTIONS_DEFAULT} >+OPTIONS_MULTI_BEATS=${OPTIONS_DEFAULT} PACKETBEAT > > FILEBEAT_DESC= Filebeat > FILEBEAT_VARS= GO_TARGETS+=filebeat >@@ -45,9 +42,8 @@ > > .include <bsd.port.options.mk> > >-.if ${PORT_OPTIONS:MPACKETBEAT} >-BROKEN= An underlying library is currently broken under FreeBSD >-.endif >+post-patch: >+ ${CP} ${FILESDIR}/bindtodevice_freebsd.go ${GO_WRKSRC}/vendor/github.com/insomniacslk/dhcp/dhcpv4/ > > do-build: > @for GO_TARGET in ${GO_TARGETS}; do \ >Index: sysutils/beats/files/bindtodevice_freebsd.go >=================================================================== >--- sysutils/beats/files/bindtodevice_freebsd.go (nonexistent) >+++ sysutils/beats/files/bindtodevice_freebsd.go (working copy) >@@ -0,0 +1,14 @@ >+package dhcpv4 >+ >+import ( >+ "net" >+ "syscall" >+) >+ >+func BindToInterface(fd int, ifname string) error { >+ iface, err := net.InterfaceByName(ifname) >+ if err != nil { >+ return err >+ } >+ return syscall.SetsockoptInt(fd, syscall.IPPROTO_IP, syscall.IP_RECVIF, iface.Index) >+} > >Property changes on: sysutils/beats/files/bindtodevice_freebsd.go >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: sysutils/beats/files/patch-vendor_github.com_docker_docker_pkg_system_mknod.go >=================================================================== >--- sysutils/beats/files/patch-vendor_github.com_docker_docker_pkg_system_mknod.go (nonexistent) >+++ sysutils/beats/files/patch-vendor_github.com_docker_docker_pkg_system_mknod.go (working copy) >@@ -0,0 +1,11 @@ >+--- vendor/github.com/docker/docker/pkg/system/mknod.go.orig 2019-03-01 01:30:18 UTC >++++ vendor/github.com/docker/docker/pkg/system/mknod.go >+@@ -9,7 +9,7 @@ import ( >+ // Mknod creates a filesystem node (file, device special file or named pipe) named path >+ // with attributes specified by mode and dev. >+ func Mknod(path string, mode uint32, dev int) error { >+- return syscall.Mknod(path, mode, dev) >++ return syscall.Mknod(path, mode, uint64(dev)) >+ } >+ >+ // Mkdev is used to build the value of linux devices (in /dev/) which specifies major > >Property changes on: sysutils/beats/files/patch-vendor_github.com_docker_docker_pkg_system_mknod.go >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: sysutils/beats/files/patch-vendor_github.com_tsg_gopacket_pcap_pcap.go >=================================================================== >--- sysutils/beats/files/patch-vendor_github.com_tsg_gopacket_pcap_pcap.go (nonexistent) >+++ sysutils/beats/files/patch-vendor_github.com_tsg_gopacket_pcap_pcap.go (working copy) >@@ -0,0 +1,60 @@ >+--- vendor/github.com/tsg/gopacket/pcap/pcap.go.orig 2019-03-01 02:07:58 UTC >++++ vendor/github.com/tsg/gopacket/pcap/pcap.go >+@@ -170,7 +170,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 +382,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 +443,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 +486,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 +549,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 +818,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) >+ > >Property changes on: sysutils/beats/files/patch-vendor_github.com_tsg_gopacket_pcap_pcap.go >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 236094
:
202477
|
202620
|
202654
|
202836