-
Notifications
You must be signed in to change notification settings - Fork 62
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
[ML] Make the ML native code more ".app"-like on macOS #593
Conversation
This functionality may be required for notarization on macOS Catalina.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The values can be extracted from a program built after this change as follows:
bash-3.2$ launchctl plist __TEXT,__info_plist .objs/autodetect
{
"CFBundleIdentifier" = "co.elastic.ml-cpp.autodetect";
"CFBundleDevelopmentRegion" = "English";
"CFBundleDisplayName" = "autodetect";
"CFBundleName" = "autodetect";
"CFBundleVersion" = "8.0.0";
"CFBundleInfoDictionaryVersion" = "6.0";
};
mk/make_info_plist.sh
Outdated
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>co.elastic.ml-cpp.$ML_TARGET</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly what to use here beyond co.elastic
is not decided. I've used the repo name followed by the program name as a start.
<key>CFBundleDisplayName</key> | ||
<string>$ML_TARGET</string> | ||
<key>CFBundleVersion</key> | ||
<string>$ML_VERSION_NUM</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This deliberately excludes qualifiers like beta1
or SNAPSHOT
- the field only tolerates digits and periods.
Static analysis files are now named *.xml (after all .plist files really are .xml files)
Also make sure the identifier only uses valid characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - just spotted one thing which I think is the cause of the CI failure
set_env.sh
Outdated
@@ -36,7 +36,7 @@ case `uname` in | |||
if [ -z "$CPP_CROSS_COMPILE" ] ; then | |||
BUNDLE_PLATFORM=linux-x86_64 | |||
else | |||
if [ "$CPP_CROSS_COMPILE" = macosx ] ; then | |||
if [ "$CPP_CROSS_COMPILE" = macos ] ; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will also require a change to CPP_CROSS_COMPILE
in dev-tools//docker/macosx_builder/Dockerfile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are actually quite a few places I'll have to change to switch CPP_CROSS_COMPILE
from using macosx
to macos
, and it will introduce an annoying discrepancy between branches in the Jenkins infrastructure. So I think I'll revert this one place in this PR. Maybe a future PR can do the rename fully.
This is the Java side of elastic/ml-cpp#593 with a fallback so that ml-cpp bundles with either the new or old directory structure work for the time being. A few days after merging the C++ changes a followup to this change will be made that removes the fallback.
When this PR started out we thought we'd be shipping a number of standalone "command line tools". But that didn't work with notarization, so we had to make a more radical change, to become an app. (I also removed some dead code related to detecting Linux MUSL.)
I think this is ready now, but this PR must not be merged until a few days after elastic/elasticsearch#47013 |
This is the Java side of elastic/ml-cpp#593 with a fallback so that ml-cpp bundles with either the new or old directory structure work for the time being. A few days after merging the C++ changes a followup to this change will be made that removes the fallback.
This change removes the temporary controller location fallback introduced in elastic#47013. Relates elastic/ml-cpp#593
elastic/elasticsearch#47104 needs to be merged a few days after this |
This is the Java side of elastic/ml-cpp#593 with a fallback so that ml-cpp bundles with either the new or old directory structure work for the time being. A few days after merging the C++ changes a followup to this change will be made that removes the fallback.
Successful notarization and acceptance by Gatekeeper on macOS Catalina requires that the ML programs and dynamic libraries be arranged into the directory structure used by macOS apps. Backport of elastic#593
Fixes a bug introduced in elastic#593
Fixes a bug introduced in elastic#593
Fixes a bug introduced in #593
Successful notarization and acceptance by Gatekeeper on macOS Catalina requires that the ML programs and dynamic libraries be arranged into the directory structure used by macOS apps. Backport of #593
Successful notarization and acceptance by Gatekeeper on macOS Catalina requires that the ML programs and dynamic libraries be arranged into the directory structure used by macOS apps. Backport of elastic#593
This is the Java side of elastic/ml-cpp#593 with a fallback so that ml-cpp bundles with either the new or old directory structure work for the time being. A few days after merging the C++ changes a followup to this change will be made that removes the fallback.
Successful notarization and acceptance by Gatekeeper on macOS Catalina requires that the ML programs and dynamic libraries be arranged into the directory structure used by macOS apps. Backport of #593
This change removes the temporary controller location fallback introduced in #47013. Relates elastic/ml-cpp#593
This change removes the temporary controller location fallback introduced in #47013. Relates elastic/ml-cpp#593
This change removes the temporary controller location fallback introduced in #47013. Relates elastic/ml-cpp#593
This is the Java side of elastic/ml-cpp#593 with a fallback so that ml-cpp bundles with either the new or old directory structure work for the time being. A few days after merging the C++ changes a followup to this change will be made that removes the fallback.
Successful notarization and acceptance by Gatekeeper on macOS Catalina requires that the ML programs and dynamic libraries be arranged into the directory structure used by macOS apps. Backport of elastic#593
Successful notarization and acceptance by Gatekeeper on macOS Catalina requires that the ML programs and dynamic libraries be arranged into the directory structure used by macOS apps. Backport of #593
This change removes the temporary controller location fallback introduced in #47013. Relates elastic/ml-cpp#593
Successful notarization and acceptance by Gatekeeper on macOS
Catalina requires that the ML programs and dynamic libraries be
arranged into the directory structure used by macOS apps.