Skip to content

When attempting to sign an app bundle with debug symbols shipped in it, rcodesign fails to properly detect app bundle. #128

@ProjectSynchro

Description

@ProjectSynchro

Hey there,

I'm trying to integrate rcodesign into our workflow to release universal binaries for macOS while cross-compiling.

Currently if you attempt to sign an app bundle with debug symbols included (.dSYM subdirectory in Contents/MacOS/) rcodesign tries and fails to sign the debug symbols as if they are a binary.

Here's an example when I try signing a bundle with those symbols:

[synchro@MacroSynchro dist.x86]$ rcodesign sign Naev.app/
signing Naev.app/ in place
signing bundle at Naev.app/
signing 1 nested bundles in the following order:
Contents/MacOS/naev.dSYM
entering nested bundle Contents/MacOS/naev.dSYM
signing bundle at Naev.app/Contents/MacOS/naev.dSYM into Naev.app/Contents/MacOS/naev.dSYM
signing Mach-O file Contents/Resources/DWARF/naev
section #1 size 1768190 out of bounds
Error: __LINKEDIT isn't final Mach-O segment

I can workaround this by removing the subdirectory and transplanting it back into the bundle after signing, but it would be nice to avoid having to do that.

I have found barely any documentation about this .dSYM subdirectory but when creating a debug build and creating an app bundle from it the meson build system spits out one of these .dSYM directories next to the application binary.

Does it make sense to ignore this directory when signing an app bundle?
Thanks for making this awesome tool!

Metadata

Metadata

Assignees

No one assigned

    Labels

    apple-codesignapple-codesign crate and rcodesign CLI toolbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions