The update to 2.2.0 not only broke the build on aarch64 and armv7 due to use of the outdated kr/pty module, it also broke termshark's colors with our default `TERM=xterm'.
I replaced the go pty module to see if that would fix color issues, replacing worked but colors didn't. The color issue needs more work, "termshark 2.2.x not visible" https://github.com/gcla/termshark/issues/114 seems to be the same issue on other OSes/platforms. tl;dr: Use `TERM=vt100' or `TERM=xterm-256color' for a monochrome or working colorful TUI, respectively. Regardless of colors, using the new module makes arm* work and I have successfully built and used it on my Pinebook Pro, which is nice. I've added `pre-build' doing exactly what you'd do manually to replace and checksum the module upfront prior to building; it's not pretty but that's how this go ecosystem works... Should we go ahead with something like this to unbreak arm*? diff 2145336f07a5393af5af003f283c67f195886a37 /usr/ports blob - 5bd7143d7d1b08d8e6f654a43f27b75b213db1ee file + net/termshark/Makefile --- net/termshark/Makefile +++ net/termshark/Makefile @@ -1,12 +1,10 @@ # $OpenBSD: Makefile,v 1.7 2021/03/23 22:17:36 sthen Exp $ -BROKEN-aarch64= old kr/pty doesn't support OpenBSD arm arches; needs creack/pty@v1.1.11 -BROKEN-armv7= old kr/pty doesn't support OpenBSD arm arches; needs creack/pty@v1.1.11 - COMMENT= terminal UI for tshark, inspired by Wireshark MODGO_MODNAME= github.com/gcla/termshark/v2 MODGO_VERSION= v2.2.0 +REVISION= 0 DISTNAME= termshark-${MODGO_VERSION} @@ -23,6 +21,7 @@ MODULES= lang/go RUN_DEPENDS= net/wireshark,-text MODGO_MODULES= \ + github.com/creack/pty v1.1.13 \ github.com/!burnt!sushi/toml v0.3.1 \ github.com/adam-hanna/array!operations v0.2.5 \ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc \ @@ -51,7 +50,6 @@ MODGO_MODULES= \ github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 \ github.com/konsorten/go-windows-terminal-sequences v1.0.2 \ github.com/kr/pretty v0.1.0 \ - github.com/kr/pty v1.1.4 \ github.com/kr/text v0.1.0 \ github.com/lucasb-eyer/go-colorful v1.0.3 \ github.com/magiconair/properties v1.8.0 \ @@ -92,7 +90,7 @@ MODGO_MODFILES= \ github.com/go-test/deep v1.0.1 \ github.com/hashicorp/golang-lru v0.5.1 \ github.com/konsorten/go-windows-terminal-sequences v1.0.1 \ - github.com/kr/pty v1.1.1 \ + github.com/creack/pty v1.1.13 \ github.com/stretchr/objx v0.1.0 \ github.com/stretchr/testify v1.2.2 \ github.com/stretchr/testify v1.3.0 \ @@ -105,6 +103,13 @@ MODGO_MODFILES= \ golang.org/x/text v0.3.0 \ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 +pre-build: + cd ${WRKSRC} && ${MODGO_CMD} mod edit -replace \ + github.com/kr/pty=github.com/creack/pty@v1.1.13 + sed -i '/github.com\/.*\/pty/d' ${WRKSRC}/go.sum + echo 'github.com/creack/pty v1.1.13 h1:rTPnd/xocYRjutMfqide2zle1u96upp1gm6eUHKi7us=' >> ${WRKSRC}/go.sum + echo 'github.com/creack/pty v1.1.13/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=' >> ${WRKSRC}/go.sum + # *shrug* builds ok with "go get" but ports build picks up something broken do-build: -cd ${WRKSRC} && ${MODGO_BUILD_CMD} ${ALL_TARGET}/cmd/... blob - f68ae2142ae422d84a50c5d5fa666a2652e4a5de file + net/termshark/distinfo --- net/termshark/distinfo +++ net/termshark/distinfo @@ -20,6 +20,8 @@ SHA256 (go_modules/github.com/coreos/go-etcd/@v/v2.0.0 SHA256 (go_modules/github.com/coreos/go-etcd/@v/v2.0.0+incompatible.zip) = SyJnMoNbkpivZdtdB1AkpZcaoR70tFaJmjgwvM1DWwc= SHA256 (go_modules/github.com/coreos/go-semver/@v/v0.2.0.mod) = 7lARLbikHJ18hSy4jqSgh/IdaONnqPdq1u4Pt5rGvRw= SHA256 (go_modules/github.com/coreos/go-semver/@v/v0.2.0.zip) = CtB3vaUUZc6pcRiZV2PZENkcT/5M9DcPlTATrxlSUu0= +SHA256 (go_modules/github.com/creack/pty/@v/v1.1.13.mod) = BBOkGR3M1sdbDMdMtxrxVkBw8uy/zjq0ujzMnXAf2Cw= +SHA256 (go_modules/github.com/creack/pty/@v/v1.1.13.zip) = D84Nm1HNyf0g8gDEov7fuVN+d3jascvhGA9x35XVG7I= SHA256 (go_modules/github.com/davecgh/go-spew/@v/v1.1.0.mod) = vLKTkyUSN7eaF7bBm/KRNPQ+j0OMMZiYj81GGhzfBcw= SHA256 (go_modules/github.com/davecgh/go-spew/@v/v1.1.1.mod) = vLKTkyUSN7eaF7bBm/KRNPQ+j0OMMZiYj81GGhzfBcw= SHA256 (go_modules/github.com/davecgh/go-spew/@v/v1.1.1.zip) = a0SoQ5UfNxtwEMdU7MPKvv6BXVztHFuUCfstaX6KiQ0= @@ -58,9 +60,6 @@ SHA256 (go_modules/github.com/konsorten/go-windows-ter SHA256 (go_modules/github.com/konsorten/go-windows-terminal-sequences/@v/v1.0.2.zip) = TQDXG43mC8r0VPj4ZyEOvNBedcCnwnJZBPcaovIPsI4= SHA256 (go_modules/github.com/kr/pretty/@v/v0.1.0.mod) = 49XUbS9qyUpmalS16GfsFr8ZnZ9LcAgnzXMWB+/dEJo= SHA256 (go_modules/github.com/kr/pretty/@v/v0.1.0.zip) = BgY9IUV+Btwqukpb0JdxFH7D2KtAsiTyblXFp2CJykM= -SHA256 (go_modules/github.com/kr/pty/@v/v1.1.1.mod) = baTJxzZERolOXvh34Z+YXNUdZxzm6PTKh4YrRJ9t1/Y= -SHA256 (go_modules/github.com/kr/pty/@v/v1.1.4.mod) = baTJxzZERolOXvh34Z+YXNUdZxzm6PTKh4YrRJ9t1/Y= -SHA256 (go_modules/github.com/kr/pty/@v/v1.1.4.zip) = mu/49OcxZwGMnr/V6HK7rozRPc6q8q3dfV7fOJvIX7I= SHA256 (go_modules/github.com/kr/text/@v/v0.1.0.mod) = L7qVKeXBPd5i83Hvc4O68E1xMlAdrGqgjpEPnsC/hcU= SHA256 (go_modules/github.com/kr/text/@v/v0.1.0.zip) = k2OkyPHzOHo2AU3lG0d7gxoTmB/FmlZl+dIWCb6p53w= SHA256 (go_modules/github.com/lucasb-eyer/go-colorful/@v/v1.0.3.mod) = hPnDjpiEqwE8g3yxau4TlQDT1cbMqwJDmIHbLs8o9mA= @@ -163,6 +162,8 @@ SIZE (go_modules/github.com/coreos/go-etcd/@v/v2.0.0+i SIZE (go_modules/github.com/coreos/go-etcd/@v/v2.0.0+incompatible.zip) = 30740 SIZE (go_modules/github.com/coreos/go-semver/@v/v0.2.0.mod) = 35 SIZE (go_modules/github.com/coreos/go-semver/@v/v0.2.0.zip) = 10848 +SIZE (go_modules/github.com/creack/pty/@v/v1.1.13.mod) = 38 +SIZE (go_modules/github.com/creack/pty/@v/v1.1.13.zip) = 23940 SIZE (go_modules/github.com/davecgh/go-spew/@v/v1.1.0.mod) = 34 SIZE (go_modules/github.com/davecgh/go-spew/@v/v1.1.1.mod) = 34 SIZE (go_modules/github.com/davecgh/go-spew/@v/v1.1.1.zip) = 60320 @@ -201,9 +202,6 @@ SIZE (go_modules/github.com/konsorten/go-windows-termi SIZE (go_modules/github.com/konsorten/go-windows-terminal-sequences/@v/v1.0.2.zip) = 3968 SIZE (go_modules/github.com/kr/pretty/@v/v0.1.0.mod) = 67 SIZE (go_modules/github.com/kr/pretty/@v/v0.1.0.zip) = 11159 -SIZE (go_modules/github.com/kr/pty/@v/v1.1.1.mod) = 25 -SIZE (go_modules/github.com/kr/pty/@v/v1.1.4.mod) = 25 -SIZE (go_modules/github.com/kr/pty/@v/v1.1.4.zip) = 14830 SIZE (go_modules/github.com/kr/text/@v/v0.1.0.mod) = 64 SIZE (go_modules/github.com/kr/text/@v/v0.1.0.zip) = 12591 SIZE (go_modules/github.com/lucasb-eyer/go-colorful/@v/v1.0.3.mod) = 51