#1 Rename binary to protoc-gen-go
Closed 5 years ago by jchaloup. Opened 5 years ago by eclipseo.
Unknown source master  into  master

@@ -5,7 +5,7 @@

  

  Name:           golang-googlecode-goprotobuf

  Version:        0

- Release:        0.36%{?dist}

+ Release:        0.37%{?dist}

  Summary:        Go support for Google protocol buffers

  License:        BSD

  URL:            %gourl
@@ -42,11 +42,11 @@

  %build

  %gobuildroot

  

- %gobuild -o _bin/protoc %{goipath}/protoc-gen-go

+ %gobuild -o _bin/protoc-gen-go %{goipath}/protoc-gen-go

  

  %install

  install -d %{buildroot}%{_bindir}

- install -m 755 _bin/protoc %{buildroot}/%{_bindir}/protoc

+ install -m 755 _bin/protoc-gen-go %{buildroot}/%{_bindir}/protoc-gen-go

  

  # source codes for building projects

  files=$(find . -name "testdata" -type d)
@@ -61,13 +61,17 @@

  

  %files

  %doc AUTHORS CONTRIBUTORS LICENSE README.md

- %{_bindir}/protoc

+ %{_bindir}/protoc-gen-go

  

  %files devel -f devel.file-list

  %license LICENSE

  %doc *.md AUTHORS CONTRIBUTORS

  

  %changelog

+ * Mon May 07 2018 Robert-André Mauchin <zebob.m@gmail.com> - 0-0.37.git5afd06f

+ - Rename binary to protoc-gen-go

+ - Fix bug #1567650

+ 

  * Sun Mar 18 2018 Jan Chaloupka <jchaloup@redhat.com> - 0-0.36.git5afd06f

  - Bump to 5afd06f9d81a86d6e3bb7dc702d6bd148ea3ff23

  

Attempt to fix bug #1567650 https://bugzilla.redhat.com/show_bug.cgi?id=1567650

Currently the binary is named /usr/bin/protoc, which conflicts with the protobuf-compiler package.

From protoc-gen-go/main.go:

// protoc-gen-go is a plugin for the Google protocol buffer compiler to generate
// Go code. Run it by building this program and putting it in your path with
// the name
// protoc-gen-go
// That word 'go' at the end becomes part of the option string set for the
// protocol compiler, so once the protocol compiler (protoc) is installed
// you can run
// protoc --go_out=output_directory input_directory/file.proto
// to generate Go bindings for the protocol defined by file.proto.

The binary should thus be named protoc-gen-go in order to be run with protoc from the protobuf-compiler package.

Pull-Request has been closed by jchaloup

5 years ago