-
Notifications
You must be signed in to change notification settings - Fork 10
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
Signing script called twice for each binary in jar #126
Comments
Hi, sorry about that and apologies for the slow reply. Unfortunately the reason for the slow reply is that I haven't been able to reproduce this problem. Using the same script and your instructions, I see the "Signing:" line being printed only once. I think it'd be useful here to see a log file. Could you do a run that exhibits this problem and then run |
Hey @mikehearn - I've got something better - a straightforward reproduction: https://github.com/alwaysbemark/conveyor-reproduction When I run
I suspect it's the way I'm including the JAR file: https://github.com/alwaysbemark/conveyor-reproduction/blob/main/build.gradle#L14 Thanks in advance! |
Thanks! That helps a lot. If we adjust the script a bit to contain
So the reason it's being called twice is because the JNA library contains two Mac binaries. It might be a bit surprising that Conveyor includes both but it's by design: https://conveyor.hydraulic.dev/15.1/configs/jvm/#native-code
Basically, Conveyor defaults to tampering with JARs as little as possible to avoid breaking things. To make the extra
... and of course fix the usage of the signing script ...
then the script is invoked once, for the bundle, and not at all for I'll have a think about how to avoid this being confusing. Probably, we should detect that the app includes JNA and print a hint suggesting to turn on library extraction. |
Oh, by the way. If you try the above then Conveyor will crash. It's fixed in the next release already but the cause is that your JNA jar is "corrupted" by the presence of Apple MacDouble metadata files named like |
Thanks Mike - that makes sense. I had no idea that both MacOS binaries are included and signed and it being called twice was a tad confusing but this makes sense. Also aware of the native library extraction feature but have yet to tinker with it. For the binary invocation - we do refer to the files/entitlements/identifiers, I just removed them from the example for the sake of brevity :) All clear now - happy to close this for now, thank you so much :) |
Describe the bug
We have a signing script set up via
app.mac.sign.scripts
. The script sets up an SSH tunnel to our intranet and uses an internal service to sign individual binaries or app bundles. The signing process seems to work but for some reason the entire script is called twice for each binary.To Reproduce
Set up the scripts as such:
With a script that looks like this (with irrelevant commands sanitised):
Run
conveyor -Kapp.machines=mac.aarch64 make mac-app --rerun
.Observe the line
being printed twice (of course, dependent on the binaries that you need signed).
Expected behavior
The script runs only once, signing the binary.
Desktop (please complete the following information):
MacOS.
Thanks in advance!
The text was updated successfully, but these errors were encountered: