Bug 457185 - Craft digiKam MacOS : libgphoto2 packaging problem.
Summary: Craft digiKam MacOS : libgphoto2 packaging problem.
Status: RESOLVED NOT A BUG
Alias: None
Product: Craft
Classification: Developer tools
Component: Blueprints (show other bugs)
Version: master
Platform: macOS (DMG) macOS
: NOR normal
Target Milestone: ---
Assignee: Hannah von Reth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-27 05:58 UTC by caulier.gilles
Modified: 2022-07-27 06:49 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description caulier.gilles 2022-07-27 05:58:58 UTC
Hi all,

While building digiKam for MacOS, libgphoto dependency is detected and code relevant is compiled fine.
If libgphoto and libusb-compat are not integrated a runtime dependencies, digiKAm will not start on MacOS as these component are missing in the bundle.

Adding libgphoto2 introduce a new packaging problem with libgphoto2_port and libgphoto2 directories:

...
23:55:14  executing command: /usr/bin/codesign --keychain /Users/packaging/Library/Keychains/login.keychain --sign Developer ID Application: K Desktop Environment e.V. (5433B4KXM8) --force --preserve-metadata=identifier,entitlements --options runtime --verbose=99 --timestamp --deep /Users/packaging/Craft/BinaryFactory/macos-64-clang/build/extragear/digikam/archive/Applications/KDE/digikam.app
23:59:09  /Users/packaging/Craft/BinaryFactory/macos-64-clang/build/extragear/digikam/archive/Applications/KDE/digikam.app: bundle format unrecognized, invalid, or unsuitable
23:59:09  In subcomponent: /Users/packaging/Craft/BinaryFactory/macos-64-clang/build/extragear/digikam/archive/Applications/KDE/digikam.app/Contents/Frameworks/libgphoto2_port/0.12.0
23:59:09  Command ['/usr/bin/codesign', '--keychain', '/Users/packaging/Library/Keychains/login.keychain', '--sign', 'Developer ID Application: K Desktop Environment e.V. (5433B4KXM8)', '--force', '--preserve-metadata=identifier,entitlements', '--options', 'runtime', '--verbose=99', '--timestamp', '--deep', '/Users/packaging/Craft/BinaryFactory/macos-64-clang/build/extragear/digikam/archive/Applications/KDE/digikam.app'] failed with exit code 1
23:59:09  Action: package for extragear/digikam:master FAILED
...

...
06:47:06  executing command: /usr/bin/codesign --keychain /Users/packaging/Library/Keychains/login.keychain --sign Developer ID Application: K Desktop Environment e.V. (5433B4KXM8) --force --preserve-metadata=identifier,entitlements --options runtime --verbose=99 --timestamp --deep /Users/packaging/Craft/BinaryFactory/macos-64-clang/build/extragear/digikam/archive/Applications/KDE/digikam.app
06:51:01  /Users/packaging/Craft/BinaryFactory/macos-64-clang/build/extragear/digikam/archive/Applications/KDE/digikam.app: bundle format unrecognized, invalid, or unsuitable
06:51:01  In subcomponent: /Users/packaging/Craft/BinaryFactory/macos-64-clang/build/extragear/digikam/archive/Applications/KDE/digikam.app/Contents/Frameworks/libgphoto2/2.5.27
06:51:01  Command ['/usr/bin/codesign', '--keychain', '/Users/packaging/Library/Keychains/login.keychain', '--sign', 'Developer ID Application: K Desktop Environment e.V. (5433B4KXM8)', '--force', '--preserve-metadata=identifier,entitlements', '--options', 'runtime', '--verbose=99', '--timestamp', '--deep', '/Users/packaging/Craft/BinaryFactory/macos-64-clang/build/extragear/digikam/archive/Applications/KDE/digikam.app'] failed with exit code 1
06:51:01  Action: package for extragear/digikam:master FAILED
...

Why signing files in these directory do not work ?

Best

Gilles Caulier
Comment 1 Hannah von Reth 2022-07-27 06:49:18 UTC
Hi Gilles,

The mac code signing doesn't like folders with '.' in the Frameworks folder.
I'd suggest to patch libgphoto to not install dot folders.
If libgphoto2_port/0.12.0 doesn't contain libraries it should not be in the Frameworks folder at all.


Btw, 
This is the craft bug tracker, not stackoverflow or a mailing list.
Cheers,

Hannah