https://bugzilla.redhat.com/show_bug.cgi?id=1409931
Bug ID: 1409931
Summary: %gobuild incorrectly assumes all compiler flags are
compatible with getopt
Product: Fedora
Version: 25
Component: go-compilers
Assignee: jchaloup(a)redhat.com
Reporter: nalin(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: fpokorny(a)redhat.com,
golang-updates(a)lists.fedoraproject.org,
jcajka(a)redhat.com, jchaloup(a)redhat.com
Description of problem:
The current definition of %gobuild:
%gobuild(o:) go build -compiler gc -ldflags "${LDFLAGS:-} -B 0x$(head -c20
/dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
produces an (apparently harmless) error message if I try to pass flags that
aren't a single character to the macro. (In my case, "-tags".) The set of
arguments that the "go" command accepts includes some which are multiple
characters long, so if %gobuild is meant to accept them, it needs to be
corrected.
Version-Release number of selected component (if applicable):
go-compilers-golang-compiler-1-8.fc25.x86_64
How reproducible:
Always
Steps to Reproduce:
1. Modify a .spec file to pass build tags ("-tags 'foo bar'") to
%gobuild
Actual results:
gobuild: invalid option -- 't'
error: Unknown option t in gobuild()
(build continues)
Expected results:
No error message, build continues.
Additional info:
This definition seems to accept arbitrary flags and produces the results I
expect:
%define gobuild() go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20
/dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{**};
--
You are receiving this mail because:
You are on the CC list for the bug.