-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add package name to crit protobuf files #90
Conversation
9c6f351
to
b3f89ee
Compare
Can you describe the problem a bit more in detail. |
b3f89ee
to
def02ab
Compare
Codecov Report
@@ Coverage Diff @@
## master #90 +/- ##
=======================================
Coverage 51.38% 51.38%
=======================================
Files 2 2
Lines 288 288
=======================================
Hits 148 148
Misses 105 105
Partials 35 35 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
This pull request adds a fix for the problem that occurred in containers/podman#15591 after updating go-criu to v6.0.0:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Not really convinced about this. This global protobuf namespace is very unfortunate. Can we fix it in another way? In the link there is something about a |
@adrianreber According to the language guide at https://developers.google.com/protocol-buffers/docs/proto#packages:
The |
I also looked at it and found no real solution. The thing about this change is that it seems temporary until we meet another namespace collision. So maybe we have to namespace all files now. Would something like this work: $ for i in criu-temp/images/*.proto; do if [[ "$i" == *"opts.proto" ]]; then continue; fi; sed -e 's,import\s",import "criu-,g' -i $i; done
$ for i in criu-temp/images/*.proto; do cp -v $i ./images/criu-$(basename $i); done This is really unfortunate. Maybe we need to do this change on the CRIU level. It should not break the content of the existing images, I hope, but if we include the namespacing already in CRIU the changes here are no longer necessary. |
@adrianreber @rst0git The issue is fixed in Go by adding a Unfortunately, this change on criu breaks the generated C bindings. The package name is prepended to all protobuf messages, eg.
|
If that works. That sounds much cleaner to me. |
999ed5b
to
6473aca
Compare
Looking at the change now, especially with a possible integration of this change in the main CRIU repository, I think |
@adrianreber that was indeed my first thought too, but we cannot use |
What is the error message you get? |
Something along the lines of |
To prevent namespace conflicts against protobuf files from other projects, the files of this repository are now registered under the package name `criu`. Signed-off-by: Prajwal S N <[email protected]>
6473aca
to
2b00a6d
Compare
😄 I also tried it and it was working, that's why I asked. Good to see that it works now. |
This PR works for me. @rst0git what do you think. At some point we can try to push this change to CRIU and remove the sed line here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In Podman, the
core.proto
andsa.proto
files from https://github.com/letsencrypt/boulder conflict with identically named proto files incrit
, causing a panic during the build. As a workaround, these two files have been renamed tocriu-core.proto
andcriu-sa.proto
.