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

cctools erase the signature of osx-arm64 binaries #5000

Closed
2 tasks done
folmos-at-orange opened this issue Sep 11, 2023 · 4 comments
Closed
2 tasks done

cctools erase the signature of osx-arm64 binaries #5000

folmos-at-orange opened this issue Sep 11, 2023 · 4 comments
Labels
stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity type::bug describes erroneous operation, use severity::* to classify the type

Comments

@folmos-at-orange
Copy link

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

I am packaging a binary executable with conda build. After compilation, I added some code to build.sh to sign my executables so when they are executed there aren't any annoying popups in macOS about "incoming connections" (my executable uses MPICH).

However, when packaging, the cctools package erases my signature. This is evidenced in the logs with messages of the type [cctools-port]: generating fake signature for ....

I did not find any documentation on how to pass certificate information to conda build to sign a package's binary files (the contents, not the package). Is there any "good" way to accomplish this? Or a workaround?

Thanks in advance.

Conda Info

No response

Conda Config

No response

Conda list

No response

Additional Context

No response

@folmos-at-orange folmos-at-orange added the type::bug describes erroneous operation, use severity::* to classify the type label Sep 11, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in 🧭 Planning Sep 11, 2023
@jaimergp
Copy link
Contributor

I think conda-build's signing should prevent those errors for you, no need to sign on your own.

@dholth
Copy link
Contributor

dholth commented Sep 26, 2023

conda wants to replace prefixes in (some?) binaries on installation, so that the C libraries are relocatable / point to libraries within the environment used. This is a tricky combination with signed executables.

@folmos-at-orange
Copy link
Author

Yes it is tricky indeed. In the end I did the relocation myself. First I set my self in meta.yaml

  • binary_relocation to either false or the list of other files that need to be relocated (usually entry points).
  • detect_binary_files_with_prefix to false

In the build.sh I build, then relocate myself with install_name_tool by deleting and then re-setting the RPATH to @loader_path/../lib. Then I sign myself the executable with codesign.

I think there should be a mechanism to execute operations after the conda relocation process. This would be generic and solve this problem in particular.

Copy link

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    - What OS and version you reproduced the issue on
    - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Sep 27, 2024
@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label Oct 27, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 27, 2024
@github-project-automation github-project-automation bot moved this from 🆕 New to 🏁 Done in 🧭 Planning Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity type::bug describes erroneous operation, use severity::* to classify the type
Projects
Archived in project
Development

No branches or pull requests

3 participants