etcd icon indicating copy to clipboard operation
etcd copied to clipboard

[makefile can't set GO_BUILD_FLAGS through env ]

Open rensx5514 opened this issue 3 years ago • 4 comments

What happened?

Makefile .PHONY: build build: GO_BUILD_FLAGS="-v" ./scripts/build.sh ./bin/etcd --version ./bin/etcdctl version ./bin/etcdutl version GO_BUILD_FLAGS="-v" will overwrite GO_BUILD_FLAGS in env.

What did you expect to happen?

Makefile .PHONY: build build: GO_BUILD_FLAGS="-v" ./scripts/build.sh ./bin/etcd --version ./bin/etcdctl version ./bin/etcdutl version It should set as following. GO_BUILD_FLAGS +=" -v"

How can we reproduce it (as minimally and precisely as possible)?

Repair it in Makefile!!! .PHONY: build build: GO_BUILD_FLAGS="-v" ./scripts/build.sh ./bin/etcd --version ./bin/etcdctl version ./bin/etcdutl version It should set as following. GO_BUILD_FLAGS +=" -v"

Anything else we need to know?

No response

Etcd version (please run commands below)

$ etcd --version
# paste output here

$ etcdctl version
# paste output here

It affects all etcd versions obviously.

Etcd configuration (command line flags or environment variables)

paste your configuration here

Etcd debug information (please run commands blow, feel free to obfuscate the IP address or FQDN in the output)

$ etcdctl member list -w table
# paste output here

$ etcdctl --endpoints=<member list> endpoint status -w table
# paste output here

Relevant log output

No response

rensx5514 avatar Aug 29 '22 08:08 rensx5514

/important , We need it to add compile-security-option like "-buildmode=pie -trimpath" @bmizerany @technoweenie @drnic @pjjw

rensx5514 avatar Aug 29 '22 08:08 rensx5514

Can i work on this one?

theVJagrawal avatar Sep 09 '22 05:09 theVJagrawal

Sure, Makefile definetly needs more love.

serathius avatar Sep 09 '22 08:09 serathius

Sure, Makefile definetly needs more love.

wuwuwuwu, I also want to work on this one.

rensx5514 avatar Sep 09 '22 08:09 rensx5514

PR #14868 for reading go build flags from env GO_BUILD_FLAGS. -trimpath already exists in building etcd, etcdutl & etcdctl.

Bhargav-InfraCloud avatar Nov 29 '22 17:11 Bhargav-InfraCloud