Ok, so I just changed our snap to use the prepare step and indeed, for Go it's not good enough, the patches are applied before "go install" but I'm guess snapcraft must copy the git tree to the gopath prior to that, so "go install" doesn't rebuild the modified code and we end up with an unpatched binary.
Ok, so I just changed our snap to use the prepare step and indeed, for Go it's not good enough, the patches are applied before "go install" but I'm guess snapcraft must copy the git tree to the gopath prior to that, so "go install" doesn't rebuild the modified code and we end up with an unpatched binary.