That’s neat. We should add something like this directly in the go MODULE.
— Antoine > On 30 Nov 2019, at 11:49, Stuart Henderson <[email protected]> wrote: > > On 2019/11/30 11:16, Philipp Buehler wrote: >> Hi porters, >> >> it's time to make a port out of my packer-vmm plugin. >> https://github.com/double-p/packer-builder-openbsd-vmm >> >> As this is my first ports try at all, I am missing something blatantly >> obvious. >> >> The Makefile is in 'examples/Makefile.ports' and trying a >> 'make fake' per Porters Guide, this fails like so: >> === >> ==> Building for packer-builder-openbsd-vmm-0.9.0 >> cd >> /usr/ports/pobj/packer-builder-openbsd-vmm-0.9.0/go/src/github.com/double-p/packer-builder-openbsd-vmm >> && GOMAXPROCS=1 >> GOCACHE=/usr/ports/pobj/packer-builder-openbsd-vmm-0.9.0/go-cache >> GOPATH=/usr/ports/pobj/packer-builder-openbsd-vmm-0.9.0/go make >> builder/openbsd-vmm/builder.go:9:2: cannot find package >> "github.com/hashicorp/packer/common" in any of: >> /usr/local/go/src/github.com/hashicorp/packer/common (from $GOROOT) >> >> /usr/ports/pobj/packer-builder-openbsd-vmm-0.9.0/go/src/github.com/hashicorp/packer/common >> (from $GOPATH) >> === >> ..and more of the same. >> >> Clearly I need to (let) fetch the required (sub)packages - but how? List all >> subs in go.mod? >> I was looking into several lang/go ports, but cant say I am getting the >> magic sauce :) >> >> TIA, >> -- >> pb >> > > Here's one way to do it. > > <Makefile>
