diff --git a/omnibus/Gemfile b/omnibus/Gemfile index cfc4e0c28b34..7e636800f510 100644 --- a/omnibus/Gemfile +++ b/omnibus/Gemfile @@ -2,11 +2,14 @@ source 'https://rubygems.org' # Install omnibus gem 'chef-sugar', git: 'https://github.com/chef/chef-sugar.git', tag: 'v3.6.0' -gem 'omnibus', git: 'https://github.com/DataDog/omnibus-ruby.git', branch: (ENV['OMNIBUS_RUBY_VERSION'] || 'datadog-5.5.0') +# from tip of https://github.com/timsutton/omnibus-ruby/tree/tsutton/datadog-5.5.0-apple-silicon +gem 'omnibus', git: 'https://github.com/timsutton/omnibus-ruby.git', ref: 'fd30852b5774db318372e146806a5d08d0211d90' # Use Chef's software definitions. It is recommended that you write your own # software definitions, but you can clone/fork Chef's to get you started. -gem 'omnibus-software', git: 'https://github.com/DataDog/omnibus-software.git', branch: (ENV['OMNIBUS_SOFTWARE_VERSION'] || 'master') + +# from tip of https://github.com/timsutton/omnibus-software/tree/apple-silicon +gem 'omnibus-software', git: 'https://github.com/timsutton/omnibus-software.git', ref: 'b36fcb54d16f1a9e8f17387548a42c3b0ef6904e' gem 'mixlib-cli', '~> 1.7.0' diff --git a/omnibus/config/software/datadog-agent-integrations-py2.rb b/omnibus/config/software/datadog-agent-integrations-py2.rb index 82541b5406d7..51109f9ff1eb 100644 --- a/omnibus/config/software/datadog-agent-integrations-py2.rb +++ b/omnibus/config/software/datadog-agent-integrations-py2.rb @@ -12,7 +12,7 @@ dependency 'pip2' -if arm? +if arm? && !osx? # psycopg2 doesn't come with pre-built wheel on the arm architecture. # to compile from source, it requires the `pg_config` executable present on the $PATH dependency 'postgresql' diff --git a/omnibus/config/software/datadog-agent-integrations-py3.rb b/omnibus/config/software/datadog-agent-integrations-py3.rb index 04bf041707fb..b64b9b0081bc 100644 --- a/omnibus/config/software/datadog-agent-integrations-py3.rb +++ b/omnibus/config/software/datadog-agent-integrations-py3.rb @@ -15,7 +15,7 @@ dependency 'snowflake-connector-python-py3' dependency 'confluent-kafka-python' -if arm? +if arm? && !osx? # psycopg2 doesn't come with pre-built wheel on the arm architecture. # to compile from source, it requires the `pg_config` executable present on the $PATH dependency 'postgresql' diff --git a/omnibus/config/software/datadog-agent-mac-app.rb b/omnibus/config/software/datadog-agent-mac-app.rb index d6e7e00d2229..81b02ca9b67c 100644 --- a/omnibus/config/software/datadog-agent-mac-app.rb +++ b/omnibus/config/software/datadog-agent-mac-app.rb @@ -20,7 +20,7 @@ # Add swift runtime libs in Frameworks (same thing a full xcode build would do for a GUI app). # They are needed for the gui to run on MacOS 10.14.3 and lower - command "$(xcrun --find swift-stdlib-tool) --copy --scan-executable \"#{app_temp_dir}/MacOS/gui\" --scan-folder \"#{app_temp_dir}/Frameworks\" --platform macosx --destination \"#{app_temp_dir}/Frameworks\" --strip-bitcode --strip-bitcode-tool $(xcrun --find bitcode_strip)" + command "$(xcrun --find swift-stdlib-tool) --copy --scan-executable \"#{app_temp_dir}/MacOS/gui\" --scan-folder \"#{app_temp_dir}/Frameworks\" --platform macosx --destination \"#{app_temp_dir}/Frameworks\" --strip-bitcode" block do # defer in a block to allow getting the project's build version erb source: "Info.plist.erb", diff --git a/omnibus/config/software/datadog-agent.rb b/omnibus/config/software/datadog-agent.rb index 7125e2356cd7..3d3495e3eb44 100644 --- a/omnibus/config/software/datadog-agent.rb +++ b/omnibus/config/software/datadog-agent.rb @@ -259,7 +259,7 @@ systray_build_dir = "#{project_dir}/cmd/agent/gui/systray" # Target OSX 10.10 (it brings significant changes to Cocoa and Foundation APIs, and older versions of OSX are EOL'ed) # Add @executable_path/../Frameworks to rpath to find the swift libs in the Frameworks folder. - command 'swiftc -O -swift-version "5" -target "x86_64-apple-macosx10.10" -Xlinker \'-rpath\' -Xlinker \'@executable_path/../Frameworks\' Sources/*.swift -o gui', cwd: systray_build_dir + command 'swiftc -O -swift-version "5" -target "arm64-apple-macos11" -Xlinker \'-rpath\' -Xlinker \'@executable_path/../Frameworks\' Sources/*.swift -o gui', cwd: systray_build_dir copy "#{systray_build_dir}/gui", "#{app_temp_dir}/MacOS/" copy "#{systray_build_dir}/agent.png", "#{app_temp_dir}/MacOS/" end