FreeBSD Bugzilla – Attachment 202654 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]
236094.diff
236094.diff (text/plain), 8.88 KB, created by
Palle Girgensohn
on 2019-03-06 16:00:59 UTC
(
hide
)
Description:
236094.diff
Filename:
MIME Type:
Creator:
Palle Girgensohn
Created:
2019-03-06 16:00:59 UTC
Size:
8.88 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 494803) >+++ Makefile (working copy) >@@ -2,7 +2,7 @@ > # $FreeBSD$ > > PORTNAME= beats >-PORTVERSION= 6.6.0 >+PORTVERSION= 6.6.1 > PORTREVISION= 0 > DISTVERSIONPREFIX=v > CATEGORIES= sysutils >@@ -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 >@@ -43,12 +40,6 @@ > > MAKE_ENV+= GOBUILD_FLAGS="" > >-.include <bsd.port.options.mk> >- >-.if ${PORT_OPTIONS:MPACKETBEAT} >-BROKEN= An underlying library is currently broken under FreeBSD >-.endif >- > do-build: > @for GO_TARGET in ${GO_TARGETS}; do \ > cd ${GO_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GMAKE} -C $${GO_TARGET} ;\ >Index: distinfo >=================================================================== >--- distinfo (revision 494803) >+++ distinfo (working copy) >@@ -1,3 +1,3 @@ >-TIMESTAMP = 1550092172 >-SHA256 (elastic-beats-v6.6.0_GH0.tar.gz) = 0e55beab8945ba4c8035afcd22ae263d2c955dfc47e420d5231780ab53391342 >-SIZE (elastic-beats-v6.6.0_GH0.tar.gz) = 29109311 >+TIMESTAMP = 1551887194 >+SHA256 (elastic-beats-v6.6.1_GH0.tar.gz) = 3da3a445927b84b64405470018aaa941f42f0bec571f265a0b621bfb218278f1 >+SIZE (elastic-beats-v6.6.1_GH0.tar.gz) = 29108620 >Index: files/patch-libbeat_scripts_Makefile >=================================================================== >--- files/patch-libbeat_scripts_Makefile (revision 494803) >+++ files/patch-libbeat_scripts_Makefile (working copy) >@@ -1,6 +1,6 @@ >---- libbeat/scripts/Makefile.orig 2018-02-01 16:56:52.000000000 +0100 >-+++ libbeat/scripts/Makefile 2018-02-07 12:53:00.911420000 +0100 >-@@ -27,7 +27,7 @@ >+--- libbeat/scripts/Makefile.orig 2019-02-13 15:31:53.000000000 +0100 >++++ libbeat/scripts/Makefile 2019-03-06 16:38:06.728865000 +0100 >+@@ -35,7 +35,7 @@ > GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "*/vendor/*") > GOFILES_ALL = $(GOFILES) $(shell find $(ES_BEATS) -type f -name '*.go') > GOPACKAGES_STRESSTESTS=$(shell find . -name '*.go' | xargs awk 'FNR>1 {nextfile} /\+build.*stresstest/ {print FILENAME; nextfile}' | xargs dirname | uniq) >@@ -9,3 +9,21 @@ > ES_HOST?="elasticsearch" > PWD=$(shell pwd) > BUILD_DIR?=$(shell pwd)/build >+@@ -107,7 +107,7 @@ >+ .PHONY: crosscompile >+ crosscompile: ## @build Cross-compile beat for the OS'es specified in GOX_OS variable. The binaries are placed in the build/bin directory. >+ crosscompile: $(GOFILES) >+-ifneq ($(shell [[ $(BEAT_NAME) == journalbeat ]] && echo true ),true) >++ifneq ($(shell [ $(BEAT_NAME) = journalbeat ] && echo true ),true) >+ go get github.com/mitchellh/gox >+ mkdir -p ${BUILD_DIR}/bin >+ gox -output="${BUILD_DIR}/bin/{{.Dir}}-{{.OS}}-{{.Arch}}" -os="$(strip $(GOX_OS))" -osarch="$(strip $(GOX_OSARCH))" ${GOX_FLAGS} >+@@ -337,7 +337,7 @@ >+ @chmod 0640 ${BEAT_NAME}.reference.yml >+ endif >+ >+-ifneq ($(shell [[ $(BEAT_NAME) == libbeat || $(BEAT_NAME) == metricbeat ]] && echo true ),true) >++ifneq ($(shell [ $(BEAT_NAME) = libbeat -o $(BEAT_NAME) = metricbeat ] && echo true ),true) >+ mkdir -p include >+ go run ${ES_BEATS}/dev-tools/cmd/asset/asset.go -license $(LICENSE) -pkg include -in fields.yml -out include/fields.go $(BEAT_NAME) >+ endif >Index: files/patch-vendor_github.com_docker_docker_pkg_system_mknod.go >=================================================================== >--- files/patch-vendor_github.com_docker_docker_pkg_system_mknod.go (nonexistent) >+++ 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: 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: files/patch-vendor_github.com_insomniacslk_dhcp_dhcpv4_bindtodevice_freebsd.go >=================================================================== >--- files/patch-vendor_github.com_insomniacslk_dhcp_dhcpv4_bindtodevice_freebsd.go (nonexistent) >+++ files/patch-vendor_github.com_insomniacslk_dhcp_dhcpv4_bindtodevice_freebsd.go (working copy) >@@ -0,0 +1,17 @@ >+--- /dev/null 2019-03-06 16:46:20.128821000 +0100 >++++ vendor/github.com/insomniacslk/dhcp/dhcpv4/bindtodevice_freebsd.go 2019-03-06 16:43:25.453458000 +0100 >+@@ -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: files/patch-vendor_github.com_insomniacslk_dhcp_dhcpv4_bindtodevice_freebsd.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: files/patch-vendor_github.com_tsg_gopacket_pcap_pcap.go >=================================================================== >--- files/patch-vendor_github.com_tsg_gopacket_pcap_pcap.go (nonexistent) >+++ 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: 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
Working