Looking for help with kustomize port (Go)

Nils Breunese nils at breun.nl
Mon Apr 27 14:46:40 UTC 2020


Hello,

I was looking for kustomize [0] in MacPorts and when I didn’t find it, I decided to try to create a port for it myself. Although I already maintain a couple of other Go-based ports I couldn’t get this one to work, so I decided to use the pre-built binary [1] for now.

I submitted this as a pull request [2] and got the feedback that a port that builds from source is preferred. The main issue I have when trying a Portfile that builds from source is that the build instructions [4] say to go into the kustomize subdir in the archive and run 'go install .’. I couldn’t figure out how to make MacPorts do the equivalent of ‘cd kustomize’ after unpacking the archive and I also don’t think ‘go install .’ is the command that should be run, because that tries to install the file into ~/go/bin.

Maybe someone who is a bit more familiar with Go could take a look at my initial attempt to build from source and modify it to work? I would be fine with maintaining it for updates afterwards.

Nils.

[0] https://kustomize.io
[1] https://github.com/breun/macports-ports/blob/kustomize-3.5.4/devel/kustomize/Portfile
[2] https://github.com/macports/macports-ports/pull/6875
[3] https://github.com/breun/macports-ports/blob/kustomize-from-source/devel/kustomize/Portfile
[4] https://github.com/kubernetes-sigs/kustomize/blob/master/docs/INSTALL.md#build-the-kustomize-cli-from-local-source


More information about the macports-dev mailing list