
Thorsten Kukuk <kukuk@suse.de> writes:
On Thu, Aug 20, Hans-Peter Jansen wrote:
It seems to miss the library located here (inside the build environment):
/usr/share/go/1.14/contrib/src/github.com/spf13/pflag
Could some kind soul help me to get over this nuisance.
go 1.14 has now modules support, no idea if the old hacks do really work with it anymore.
The correct "fix" from go perspective is, to use the vendor directory. So "go mod init ...", packaging the vendor directory and "go build -mod=vendor ..." Or course only if your package does not provide the vendor directory already. More and more packages do that. If there are already go.mod, go.sum files and a vendor directory,then most likely "go -mod=vendor ..." is enough.
From a build service and maintenance perspective, this is of course a nightmare: it's next to impossible to find out which packages use a module with security problems and which need an update.
A workaround would be to tweak the go provides generator to parse the go.mod file and generate additional provides of this form: Provides: bundled(golang(github.com/davecgh/go-spew)) = 1.1.1 which can be queried using standard rpm tools. Cheers, Dan -- Dan Čermák <dcermak@suse.com> Software Engineer Development tools SUSE Software Solutions Germany GmbH Maxfeldstr. 5 90409 Nuremberg Germany (HRB 36809, AG Nürnberg) Managing Director: Felix Imendörffer