-
Notifications
You must be signed in to change notification settings - Fork 15
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
bash escaping #4
Comments
Fixed this, the build plugin sadly doesn't work with the gotify/server binary:
Looking at the go.sum file both this plugin and gotify/server use:
@eternal-flame-AD Do you have any idea why it is like this? |
Yeah, the built package hash did not match:( It did not occur last time, please allow me some time to investigate to this. |
I also hit this problem:( I found that the plugin hash is different when built with The following is a proof of concept: go build -buildmode=plugin
objdump -t -T gotify-netlify.so| grep go.link.pkghashbytes.github.com/gin-contrib/sse
0000000000c0b500 g DO .rodata 0000000000000028 Base go.link.pkghashbytes.github.com/gin-contrib/sse
readelf -x .rodata gotify-netlify.so| grep c0b500
0x00c0b500 64623739 64333338 35643238 37353664 db79d3385d28756d In the server repo: go build
objdump -t -T server| grep go.link.pkghashbytes.github.com/gin-contrib/sse
0000000001402c80 g O .rodata 0000000000000028 go.link.pkghashbytes.github.com/gin-contrib/sse
0000000001402c80 g DO .rodata 0000000000000028 Base go.link.pkghashbytes.github.com/gin-contrib/sse
readelf -x .rodata server| grep 1402c80
0x01402c80 64623739 64333338 35643238 37353664 db79d3385d28756d go build -mod=vendor
objdump -t -T server| grep go.link.pkghashbytes.github.com/gin-contrib/sse
0000000001402c80 g O .rodata 0000000000000028 go.link.pkghashbytes.github.com/gin-contrib/sse
0000000001402c80 g DO .rodata 0000000000000028 Base go.link.pkghashbytes.github.com/gin-contrib/sse
readelf -x .rodata server| grep 1402c80
0x01402c80 30643132 38613663 30376338 66303361 0d128a6c07c8f03a In addition: |
I will add write a tool to add the package hash comparison to the CI process. |
This seems like a bug in Go or? |
I may need to look into the source code to take a look at how the package was hashed to see whether this was intentional. Please allow me some time to do this. |
Okay I have finally dug out the whole chain of events that caused the different package hash. The package hash is generated in https://github.com/golang/go/blob/master/src/cmd/link/internal/ld/lib.go#L771 . Reading that part of the code we know that the hash is generated by hashing the first line and something between two double dollar signs. Then I compared the compilation result of the So you think this is a bug that should be submitted to golang? |
Now everything makes sense. Adding |
This sounds like a bug, could you add an issue for this on golang github? Thanks for investigating this issue! I added mod vendor mostly to prevent 502 errors https://travis-ci.org/gotify/server/builds/500530056#L3188 I guess it is because the build downloads the dependencies 5 times. |
Maybe we can mount the gopath in the docker image then it probably caches this too. |
Downloading dependencies for so many times does not look elegant. But I think the 502 is maybe just a temporary error, in the plugin template I downloaded dependencies 6 times and no 502 occurred in ~3 subsequent builds. Still it worth trying mounting gopath/mod to prevent downloading dependencies repeatedly. |
See gotify/plugin-template#4 tl;dr: Using vendor makes plugins incompatible.
See gotify/plugin-template#4 tl;dr: Using vendor makes plugins incompatible.
See gotify/plugin-template#4 tl;dr: Using vendor makes plugins incompatible.
plugin-template/.travis.yml
Line 24 in 3c4123f
This parenthesis should be escaped. See https://travis-ci.com/eternal-flame-AD/gotify-netlify/builds/102894043#L611
The text was updated successfully, but these errors were encountered: