On Mon, Apr 06, 2020 at 05:15:17PM -0600, Aaron Bieber wrote:
> Round two! This time with espie@'s bsd.port.mk fix:
> https://marc.info/?l=openbsd-ports-cvs&m=158618354824687&w=2
>
> This resolves the issue with the conversion of [A-Z] letters to ![a-z] in the
> package path.
>
> With this diff I can generate ports for the following without issue:
>
> github.com/jrick/domain
> github.com/jrick/ss
> github.com/junegunn/fzf
> github.com/qbit/gavin
> golang.zx2c4.com/wireguard
> humungus.tedunangst.com/r/honk
> suah.dev/ogvt
>
> There are still some issues with things like github.com/restic/restic and
> github.com/gohugoio/hugo . For some reason the build looks for some files that
> 'go mod graph' doesn't list.
>
> For most go apps that follow the module guidelines:
> https://github.com/golang/go/wiki/Modules
I wanted to port vgrep so i gave this a shot:
[08:29] c64:/usr/ports/ $/usr/ports/infrastructure/bin/portgen go
github.com/vrothberg/vgrep
Fatal: one category in go lang/go should match PKGPATH=mystuff/go/vgrep (in
mystuff/go/vgrep)
*** Error 1 in /home/ports/mystuff/go/vgrep
(/usr/ports/infrastructure/mk/bsd.port.mk:3691 '.BEGIN': @exit 1)
Fatal: one category in go lang/go should match PKGPATH=mystuff/go/vgrep (in
mystuff/go/vgrep)
*** Error 1 in /home/ports/mystuff/go/vgrep
(/usr/ports/infrastructure/mk/bsd.port.mk:3691 '.BEGIN': @exit 1)
Fatal: one category in go lang/go should match PKGPATH=mystuff/go/vgrep (in
mystuff/go/vgrep)
*** Error 1 in /home/ports/mystuff/go/vgrep
(/usr/ports/infrastructure/mk/bsd.port.mk:3691 '.BEGIN': @exit 1)
Fatal: one category in go lang/go should match PKGPATH=mystuff/go/vgrep (in
mystuff/go/vgrep)
*** Error 1 in /home/ports/mystuff/go/vgrep
(/usr/ports/infrastructure/mk/bsd.port.mk:3691 '.BEGIN': @exit 1)
Fatal: one category in go lang/go should match PKGPATH=mystuff/go/vgrep (in
mystuff/go/vgrep)
*** Error 1 in /home/ports/mystuff/go/vgrep
(/usr/ports/infrastructure/mk/bsd.port.mk:3691 '.BEGIN': @exit 1)
Can't stat : No such file or directory
at /usr/ports/infrastructure/lib/OpenBSD/PortGen/Port.pm line 251.
Fatal: one category in go lang/go should match PKGPATH=mystuff/go/vgrep (in
mystuff/go/vgrep)
*** Error 1 in /home/ports/mystuff/go/vgrep
(/usr/ports/infrastructure/mk/bsd.port.mk:3691 '.BEGIN': @exit 1)
Fatal: one category in go lang/go should match PKGPATH=mystuff/go/vgrep (in
mystuff/go/vgrep)
*** Error 1 in /home/ports/mystuff/go/vgrep
(/usr/ports/infrastructure/mk/bsd.port.mk:3691 '.BEGIN': @exit 1)
Fatal: one category in go lang/go should match PKGPATH=mystuff/go/vgrep (in
mystuff/go/vgrep)
*** Error 1 in /home/ports/mystuff/go/vgrep
(/usr/ports/infrastructure/mk/bsd.port.mk:3691 '.BEGIN': @exit 1)
/usr/ports/mystuff/go/vgrep
that's a lot of yelling at a user :)
that generated this (under mystuff/go/vgrep):
# $OpenBSD$
COMMENT = todo
MODGO_MODNAME = github.com/vrothberg/vgrep
MODGO_VERSION = v0.0.0-20200412142857-0810837a928d
DISTNAME = vgrep-${MODGO_VERSION}
PKGNAME = vgrep-20200412142857
CATEGORIES = go
# unknown license -> 'unknown license'
PERMIT_PACKAGE = unknown license
PERMIT_DISTFILES = unknown license
MODULES = lang/go
MODGO_MODULES = github.com/davecgh/go-spew v1.1.1
\
github.com/jessevdk/go-flags v1.4.0
\
github.com/konsorten/go-windows-terminal-sequences v1.0.2
\
github.com/kr/pretty v0.1.0
\
github.com/kr/pty v1.1.1
\
github.com/kr/text v0.1.0
\
github.com/nightlyone/lockfile
v0.0.0-20180618180623-0ad87eef1443 \
github.com/pmezard/go-difflib v1.0.0
\
github.com/sirupsen/logrus v1.5.0
\
github.com/stretchr/objx v0.1.0
\
github.com/stretchr/testify v1.4.0
\
golang.org/x/sys
v0.0.0-20191218084908-4a24b4065292 \
gopkg.in/check.v1
v1.0.0-20180628173108-788fd7840127 \
gopkg.in/yaml.v2 v2.2.2
MODGO_MODFILES = github.com/davecgh/go-spew
v1.1.0 \
github.com/davecgh/go-spew
v1.1.1 \
github.com/jessevdk/go-flags
v1.4.0 \
github.com/konsorten/go-windows-terminal-sequences
v1.0.1 \
github.com/konsorten/go-windows-terminal-sequences
v1.0.2 \
github.com/kr/pretty
v0.1.0 \
github.com/kr/pty
v1.1.1 \
github.com/kr/text
v0.1.0 \
github.com/nightlyone/lockfile
v0.0.0-20180618180623-0ad87eef1443 \
github.com/pmezard/go-difflib
v1.0.0 \
github.com/sirupsen/logrus
v1.5.0 \
github.com/stretchr/objx
v0.1.0 \
github.com/stretchr/testify
v1.2.2 \
github.com/stretchr/testify
v1.4.0 \
golang.org/x/sys
v0.0.0-20190422165155-953cdadca894 \
golang.org/x/sys
v0.0.0-20191218084908-4a24b4065292 \
gopkg.in/check.v1
v0.0.0-20161208181325-20d25e280405 \
gopkg.in/check.v1
v1.0.0-20180628173108-788fd7840127 \
gopkg.in/yaml.v2
v2.2.2
.include <bsd.port.mk>
i'm not sure where/how i was supposed to specify i wanted the latest tag
(v2.2.0) and not git HEAD, from my understanding the perl code calls a url with
/@latest ?
i manually specified MODGO_VERSION=v2.2.0, but make makesum complains that its
gone:
1586760011>> Fetch
https://proxy.golang.org/github.com/vrothberg/vgrep/@v/v2.2.0.zip
ftp: Error retrieving
https://proxy.golang.org/github.com/vrothberg/vgrep/@v/v2.2.0.zip: 410 Gone
looking manually at the URL, i get this:
not found: github.com/vrothberg/[email protected]: invalid version: module contains
a go.mod file, so major version must be compatible: should be v0 or v1, not v2
what . the . hell is this sorcery/mumbojumbo ? i just wanted to do an easy port
:)
Landry