Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpc/rpc.pb.go: missing source [open source compliance] #9

Closed
onlyjob opened this issue Nov 11, 2019 · 6 comments
Closed

rpc/rpc.pb.go: missing source [open source compliance] #9

onlyjob opened this issue Nov 11, 2019 · 6 comments

Comments

@onlyjob
Copy link

onlyjob commented Nov 11, 2019

rpc/rpc.pb.go is a generated file but its source is missing...

Would it be possible to commit it to this repository please?

@rst0git
Copy link
Member

rst0git commented Nov 11, 2019

Hi @onlyjob, the source file is in the CRIU's repository.
https://github.com/checkpoint-restore/criu/blob/criu-dev/images/rpc.proto

rpc/rpc.pb.go can be generated with:

make rpc/rpc.pb.go

@onlyjob
Copy link
Author

onlyjob commented Nov 11, 2019

The problem is that source release is not comprehensive. Downstream we can not download on build and another repository (with .proto file) is not available. Effectively it is partially an open source compliance problem (because generated file is shipped without sources - like pre-compiled binary) but also partially a technical problem because without source we can not ensure integrity of build by re-building all pre-generated files.

@adrianreber
Copy link
Member

Hmm, this is difficult. We did not include the original file, because it is part of CRIU and we actually, in the go bindings, do not want that file in the repository. We only want the result from the protobuf compiler. The Makefile rule is just as a convenience to easy update the file if necessary.

I understand your point of view, but for us generating the file is not part of the build process. Another motivation to leave out the generation of the build process is to not require the protobuf compiler during build as well as to make sure that the generated file matches what we expect. I often had problems generating protobuf output because of different versions of the protobuf compiler.

@onlyjob
Copy link
Author

onlyjob commented Nov 12, 2019

This is precisely why source should be committed to this repository. Yes it would duplicate the original file but that is the only way to take care of situations where/when generated file should be updated from the source by the different compiler. Proper interoperability requires to re-build such files for consistency and sometimes it is just necessary to regenerate such files in order to avoid FTBFS due to mismatch between different .pb.go files produced by incompatible compiler versions.
Imagine what (chaos) will happen if all libraries bundle source-less pre-generated files produced by different compiler versions. This is precisely what we are trying to avoid and that's why it is necessary to provide sources.
I don't see much drama if that one .proto file will have to be updated from parent repository once in a while.

@kolyshkin
Copy link
Contributor

Maybe there's a way to add criu as a git submodule? It won't be required to build, but in case someone wants to regenerate the protobuf files there will be a way to do it.

@onlyjob care to implement it?

@adrianreber
Copy link
Member

Should be solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants