Looking for help with kustomize port (Go)
Nils Breunese
nils at breun.nl
Sun May 10 15:09:46 UTC 2020
Nils Breunese <nils at breun.nl> wrote:
>> Op 28 apr. 2020 om 06:30 heeft Ryan Schmidt <ryandesign at macports.org> het volgende geschreven:
>>
>>> On Apr 27, 2020, at 09:46, Nils Breunese wrote:
>>>
>>> I couldn’t figure out how to make MacPorts do the equivalent of ‘cd kustomize’ after unpacking the archive
>>
>> Perhaps you want:
>>
>> build.dir ${worksrcpath}/kustomize
>
> Thanks, that was indeed also suggested to me via GitHub and turned out to work. I was previously trying to override worksrcpath itself (I remember going through the Docs for the build.* settings, but managed to miss this one apparently). I’ve got some Go-specific ldflags left to fix, but at least it builds and runs now.
I have a working Portfile for Kustomize [0] at https://github.com/breun/macports-ports/blob/kustomize-from-source/devel/kustomize/Portfile which builds and installs a working `kustomize` binary, but I believe I still need to set the correct flags to correctly set the version, because currently the output of 'kustomize version’ is this:
----
% kustomize version
Version: {KustomizeVersion:unknown GitCommit:$Format:%H$ BuildDate:1970-01-01T00:00:00Z GoOs:darwin GoArch:amd64}
----
I’d like at least KustomizeVersion to have a value, BuildDate would be nice as well. GitCommit might not be doable when building from a source tarball. I tried adding the flags that are also set by the kustomize Homebrew formula [1], but they don't seem to have any effect.
Anyone familiar enough with Go builds to tell me how to fix this?
Thanks, Nils.
[0] https://github.com/kubernetes-sigs/kustomize
[1] https://github.com/Homebrew/homebrew-core/blob/master/Formula/kustomize.rb#L23
More information about the macports-dev
mailing list