go1.18.2 (released 2022-05-10) includes security fixes to the
syscall package, as well as bug fixes to the compiler, runtime, the
go command, and the crypto/x509, go/types, net/http/httptest,
reflect, and sync/atomic packages.
ok jsing@ (maintainer), who spotted a mistake of mine in the PLIST
if MODGO_FLAGS ends up in the environment as $GOFLAGS then go fails to
parse it and errors out:
% GOFLAGS='-p 1' go build
go: parsing $GOFLAGS: non-flag "1"
ok abieber@
<go.port.mk> deals with lots of distfiles (read: go modules);
so many, that make(1) gets noticably slow doing thousands of variable
expansions, subtitutions, etc.
Use simpler `filename{url}sufx' bsd.port.mk(5) syntax in crafting DISTFILES
to avoid duplicate variable expansions.
Improvement for `time make -C net/telegraf show=PKGNAME` on my system:
telegraf-1.21.2
- 0m05.40s real 0m04.72s user 0m00.67s system
+ 0m04.45s real 0m03.73s user 0m00.72s system
No change in distinfo or builds.
sthen apparently had the same diff but never committed it
OK espie
this way, go ports will stop polluting /tmp with go-build${timestamp}
dirs, and should use WRKBUILD as intended.
went in a bulk build without fallout, thanks ajacoutot@
size of DISTFILES.
refactor MODGO_SETUP_WORKSPACE generation to avoid regex on DISTFILES,
instead build it up from module names to pass to a shell for loop, allowing
a big reduction in command line length.
parts from espie, parts from me
- Add a version argument (second) to modgo-gen-modules-helper.
- Change modgo-gen-modules target to fetch module info for the
current MODGO_VERSION of a port. Setting MODGO_VERSION=latest
will fetch the latest version the Go ecosystem knows about.
Similarly, if MODGO_VERSION is empty, fetch the latest
verstion Go knows about.
While here:
- Add '-trimpath' to MODGO_FLAGS.
OK danj@
This release includes security fixes to the archive/zip, math/big,
net, and net/http/httputil packages, as well as bug fixes to the
linker, the go command, and the net/http package.
ok jsing (maintainer, who noticed I forgot to update plist)
from /usr/ports/distfiles when it wants to unpack modules during the
build, instead copy the files into the WRKDIR and point it there.
If there was a mistake with setting up MODGO_MODULES/MODGO_MODFILES
in a port then this change will cause it to show up in build, otherwise
it may succeed or fail randomly depending on what files are present in
distfiles (fetched by other ports).
- Add a permissions fix from sthen@
- Remove patches as they are not needed now
Tested on amd64, arm64, armv7 and i386 (ty sthen!).
armv7 has an intermittent issue with tests.
OK sthen, jsing
- De-duplicate our .mod and .zip files.
- Move chdir to a child process.
- Break MODGO_MODULES and MODGO_MODFILES values into their own lines
for easier reading.
using MODGO_MODNAME.
This is needed to work around this issue:
https://github.com/golang/go/issues/27455
which makes `make clean` because of the restrictive permissions.
input and corrections from sthen@ and jca@
ok sthen@ jca@ espie@
With this a port can be easily generated for Go applications that support Go
modules (there will be a go.mod file in the root of the project).
For example: https://github.com/jrick/domain/blob/master/go.mod
The mod file lists "github.com/jrick/domain" as the module name, so a portgen
command to build the above tool would be:
portgen go github.com/jrick/domain
OK afresh1@ kmos@