Friday, March 08, 2019

Re: Update lang/go to 1.12

On 2019/02/28 04:22, Joel Sing wrote:
> The following updates lang/go to 1.12, along with the golang.org/x packages.
>
> One of the key differences between 1.11 and 1.12 is that GOCACHE is no longer
> optional, hence go.port.mk now specifies a cache location.

I've built dependent ports, diffs below for some GOCACHE fallout:

- sysutils/amazon-ssm-agent, textproc/loccount: doesn't use the module,
needs GOCACHE=${WRKDIR}/go-cache adding to MAKE_ENV

- sysutils/fleetctl, sysutils/prometheus: uses the module but not the
default targets, needs GOCACHE=${MODGO_GOCACHE} adding to do-build

Any objection to shipping packages for go-bootstrap? Otherwise people
building lang/go have an outdated bootstrap which they have to manually
rebuild. (Also included in the diff).

- sysutils/beats/packetbeat is also broken, not sure how to fix that,
maybe some vendored thing is in need of an update

cd /usr/obj/ports/packetbeat-6.4.3/go/src/github.com/elastic/beats/vendor/github.com/tsg/gopacket/pcap
CGO_LDFLAGS='"-g" "-O2" "-lpcap"' /usr/local/go/pkg/tool/openbsd_amd64/cgo -objdir $WORK/b354/ -importpath github.com/elastic/beats/vendor/github.com/tsg/gopacket/pcap -- -I $WORK/b354/ -g -O2 ./pcap.go ./pcap_poll_common.go
# github.com/elastic/beats/vendor/github.com/tsg/gopacket/pcap
/usr/obj/ports/packetbeat-6.4.3/go/src/github.com/elastic/beats/vendor/github.com/tsg/gopacket/pcap/pcap.go:173:7
: identifier "_Ctype_struct_bpf_program" may conflict with identifiers generated by cgo
/usr/obj/ports/packetbeat-6.4.3/go/src/github.com/elastic/beats/vendor/github.com/tsg/gopacket/pcap/pcap.go:385:13: identifier "_Ctype_struct_pcap_stat" may conflict with identifiers generated by cgo
/usr/obj/ports/packetbeat-6.4.3/go/src/github.com/elastic/beats/vendor/github.com/tsg/gopacket/pcap/pcap.go:446:10: identifier "_Ctype_struct_bpf_program" may conflict with identifiers generated by cgo
/usr/obj/ports/packetbeat-6.4.3/go/src/github.com/elastic/beats/vendor/github.com/tsg/gopacket/pcap/pcap.go:489:21: identifier "_Ctype_struct_bpf_program" may conflict with identifiers generated by cgo
/usr/obj/ports/packetbeat-6.4.3/go/src/github.com/elastic/beats/vendor/github.com/tsg/gopacket/pcap/pcap.go:552:34: identifier "_Ctype_struct_pcap_addr" may conflict with identifiers generated by cgo
/usr/obj/ports/packetbeat-6.4.3/go/src/github.com/elastic/beats/vendor/github.com/tsg/gopacket/pcap/pcap.go:555:56: identifier "_Ctype_struct_pcap_addr" may conflict with identifiers generated by cgo
/usr/obj/ports/packetbeat-6.4.3/go/src/github.com/elastic/beats/vendor/github.com/tsg/gopacket/pcap/pcap.go:821:13: identifier "_Ctype_struct_pcap_pkthdr" may conflict with identifiers generated by cgo

Index: sysutils/amazon-ssm-agent/Makefile
===================================================================
RCS file: /cvs/ports/sysutils/amazon-ssm-agent/Makefile,v
retrieving revision 1.48
diff -u -p -r1.48 Makefile
--- sysutils/amazon-ssm-agent/Makefile 31 Jan 2019 20:20:31 -0000 1.48
+++ sysutils/amazon-ssm-agent/Makefile 8 Mar 2019 13:55:26 -0000
@@ -29,7 +29,7 @@ ALL_TARGET= build-openbsd-386
.endif

USE_GMAKE= Yes
-MAKE_ENV= SKIP_CHECKSTYLE=Yes
+MAKE_ENV= SKIP_CHECKSTYLE=Yes GOCACHE=${WRKDIR}/go-cache
MAKE_FILE= makefile

WRKSRC= ${WRKDIR}/src/github.com/aws/amazon-ssm-agent
Index: sysutils/prometheus/Makefile
===================================================================
RCS file: /cvs/ports/sysutils/prometheus/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- sysutils/prometheus/Makefile 14 Apr 2018 22:53:54 -0000 1.2
+++ sysutils/prometheus/Makefile 8 Mar 2019 13:55:26 -0000
@@ -25,7 +25,8 @@ USE_GMAKE = Yes
MODULES= lang/go

do-build:
- cd ${WRKSRC} && GOPATH=${MODGO_WORKSPACE} ${MAKE_PROGRAM} \
+ cd ${WRKSRC} && GOMAXPROCS=${MAKE_JOBS} GOCACHE=${MODGO_GOCACHE} \
+ GOPATH=${MODGO_WORKSPACE} ${MAKE_PROGRAM} \
PROMU="${LOCALBASE}/bin/promu -v" build

do-install:
Index: sysutils/fleetctl/Makefile
===================================================================
RCS file: /cvs/ports/sysutils/fleetctl/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- sysutils/fleetctl/Makefile 14 Apr 2018 22:53:54 -0000 1.3
+++ sysutils/fleetctl/Makefile 8 Mar 2019 13:55:26 -0000
@@ -22,7 +22,7 @@ BUILD_DEPENDS = shells/bash
NO_TEST = Yes

do-build:
- cd ${WRKSRC} && ${LOCALBASE}/bin/bash build
+ cd ${WRKSRC} && env GOCACHE=${MODGO_GOCACHE} ${LOCALBASE}/bin/bash build

do-install:
${INSTALL_PROGRAM} ${WRKSRC}/bin/fleetctl ${PREFIX}/bin/
Index: lang/go-bootstrap/Makefile
===================================================================
RCS file: /cvs/ports/lang/go-bootstrap/Makefile,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile
--- lang/go-bootstrap/Makefile 10 May 2018 18:41:04 -0000 1.10
+++ lang/go-bootstrap/Makefile 8 Mar 2019 13:55:26 -0000
@@ -9,16 +9,14 @@ RELEASE = 20171003
DISTNAME = go${VERSION}-bootstrap-${RELEASE}
PKGNAME = go-bootstrap-${VERSION}.${RELEASE}
CATEGORIES = lang
-REVISION = 0
+REVISION = 1

HOMEPAGE = https://golang.org/

MAINTAINER = Joel Sing <jsing@openbsd.org>

# software: BSD, documentation: CC-BY-3.0
-PERMIT_PACKAGE_CDROM = bootstrap only
-PERMIT_PACKAGE_FTP = bootstrap only
-PERMIT_DISTFILES_FTP = bootstrap only
+PERMIT_PACKAGE_CDROM = Yes

WANTLIB = c m pthread

No comments:

Post a Comment