On Tue, Mar 23, 2021 at 10:12:28PM +0000, Stuart Henderson wrote:
> On 2021/03/23 15:47, phess...@openbsd.org wrote:
> > build failures: 17
> > http://build-failures.rhaalovely.net/aarch64/2021-03-21/net/termshark.log
> > http://build-failures.rhaalovely.net/aarch64/2021-03-21/sysutils/nomad.log
> > http://build-failures.rhaalovely.net/aarch64/2021-03-21/sysutils/terragrunt.log
> 
> These are because they use an old version of a module (github.com/kr/pty)
> 
> # github.com/kr/pty
> ../../../../go/pkg/mod/github.com/kr/pty@v1.1.4/pty_openbsd.go:24:10: 
> undefined: ptmget
> ../../../../go/pkg/mod/github.com/kr/pty@v1.1.4/pty_openbsd.go:25:34: 
> undefined: ioctl_PTMGET
> 
> This was fixed upstream in v1.1.11 (module is now at creack/pty,
> kr/pty now has a shim to point users at the new repo).
> 
> Is there any way to have go.port.mk use the newer version (like
> MODCARGO_CRATES_UPDATE with cargo/rust) or do we just need to wait for
> the various upstreams to change?

I believe we can solve this with a module replacement if we can get
update-patches unbroken.

$ cd /usr/ports/net/termshark/
$ make patch
[...]
$ cd /usr/ports/pobj/termshark-2.2.0/github.com/gcla/termshark/v2@v2.2.0/
$ go mod edit -replace=github.com/kr/pty=github.com/creack/pty@latest
$ go mod tidy
[...]
$ cd /usr/ports/net/termshark/
$ make update-patches
WRKDIST=/usr/ports/pobj/termshark-2.2.0/termshark-v2.2.0 does not exist
*** Error 1 in /usr/ports/net/termshark 
(/usr/ports/infrastructure/mk/bsd.port.mk:2588 'update-patches': 
@toedit=`WRKDIST=/usr/ports/pobj/te...)

abieber@ provided this hint, but although it runs without any errors,
it doesn't produce any patches. 

$ alias 'gopatch=WRKDIST=$(make show=WRKSRC) make update-patches'

Once this works, then we could include patches for go.{mod,sum} in the
port and consider these replacements during modgo-gen-modules
(regenerating MODGO_MODFILES after manually patching is currently not
enough, as it is missing the creack replacement.)

Reply via email to