Bug 425652 - Directory path with dot leads to failing MacOS builds
Summary: Directory path with dot leads to failing MacOS builds
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kwindowsystem
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other macOS
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-21 20:11 UTC by Julian Steinmann
Modified: 2020-09-02 05:21 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Steinmann 2020-08-21 20:11:47 UTC
When building applications that in some way depend on KWindowSystems on MacOS, the codesign executable crashes and leaves the build failing (see e.g. https://binary-factory.kde.org/view/MacOS/job/Elisa_Nightly_macos/900/). According to Hannah, this is the case because of the . (dots) in the directory name, which for some reason codesign program by Apple doesn't like at all. If we could remove these dots, we wouldn't need to blacklist KWindowSystems for nearly every single application on Binary Factory.

I believe that the path with dots comes from the last line of this file: https://invent.kde.org/frameworks/kwindowsystem/-/blob/master/src/config-kwindowsystem.h.cmake
Given that I have absolutely no experience with the code, I am reluctant to change something, as I have no idea where this could break things.
Comment 1 Hannah von Reth 2020-08-21 20:55:38 UTC
As the binary factory logs are not permanent:

05:29: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=entitlements --options runtime --verbose=99 --deep /Users/packaging/Craft/BinaryFactory/macos-64-clang/build/kde/applications/elisa/archive/Applications/KDE/elisa.app
05:29:42  /Users/packaging/Craft/BinaryFactory/macos-64-clang/build/kde/applications/elisa/archive/Applications/KDE/elisa.app: bundle format unrecognized, invalid, or unsuitable
05:29:42  In subcomponent: /Users/packaging/Craft/BinaryFactory/macos-64-clang/build/kde/applications/elisa/archive/Applications/KDE/elisa.app/Contents/PlugIns/kf5/org.kde.kwindowsystem.platforms
Comment 2 Vlad Zahorodnii 2020-08-21 21:15:08 UTC
It would be nice to just s/org.kde.kwindowsystem.platforms/kwindowsystem/g, but I'm not sure that we can do it because kwayland-integration and kwin install their own platform plugins. Perhaps kwindowsystem needs to search for platform plugins in several places for some time being.
Comment 3 Bug Janitor Service 2020-08-21 21:28:37 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kwindowsystem/-/merge_requests/9
Comment 4 Hannah von Reth 2020-08-21 22:56:42 UTC
Julian Steinmann the other one is PlugIns/org.kde.kdecoration2
I'll be on vacation the next to weeks I hope to have as less contact to a pc as possible :D
Comment 5 Vlad Zahorodnii 2020-08-22 09:07:08 UTC
> the other one is PlugIns/org.kde.kdecoration2

Uh, does plasma run on macOS?
Comment 6 Vlad Zahorodnii 2020-09-02 05:21:30 UTC
Git commit b605d17fa61c31e41fbdaef19b16acb6ac900bc6 by Vlad Zahorodnii.
Committed on 21/08/2020 at 21:42.
Pushed by vladz into branch 'master'.

Install platform plugins in a directory with no dots in file name

It seems like codesign doesn't like if a platform plugin includes
multiple dots in its file path.

M  +1    -1    src/config-kwindowsystem.h.cmake
M  +2    -2    src/platforms/wayland/CMakeLists.txt
M  +2    -2    src/platforms/xcb/CMakeLists.txt
M  +13   -7    src/pluginwrapper.cpp

https://invent.kde.org/frameworks/kwindowsystem/commit/b605d17fa61c31e41fbdaef19b16acb6ac900bc6