From 3a4d8580a5b7cf389e031a5cf3b03c0fb3c5c7e7 Mon Sep 17 00:00:00 2001 From: nikhil2611 Date: Tue, 8 Feb 2022 13:47:04 +0530 Subject: [PATCH 1/7] commented the dependency for mac platform Signed-off-by: nikhil2611 --- omnibus/config/software/gems.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omnibus/config/software/gems.rb b/omnibus/config/software/gems.rb index 26170f569..21f370865 100644 --- a/omnibus/config/software/gems.rb +++ b/omnibus/config/software/gems.rb @@ -42,7 +42,7 @@ # This is a transative dep but we need to build from source so binaries are built on current sdk. # Only matters on mac. # @todo https://github.com/guard/rb-fsevent/issues/83 -dependency "rb-fsevent-gem" if macos? +# dependency "rb-fsevent-gem" if macos? build do env = if !windows? From 11249ff7335d0f84407bd490f6534ba15c6afe86 Mon Sep 17 00:00:00 2001 From: nikhil2611 Date: Tue, 8 Feb 2022 15:35:30 +0530 Subject: [PATCH 2/7] added the latest commit id Signed-off-by: nikhil2611 --- omnibus/config/software/gems.rb | 2 +- omnibus/config/software/rb-fsevent-gem.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/omnibus/config/software/gems.rb b/omnibus/config/software/gems.rb index 21f370865..26170f569 100644 --- a/omnibus/config/software/gems.rb +++ b/omnibus/config/software/gems.rb @@ -42,7 +42,7 @@ # This is a transative dep but we need to build from source so binaries are built on current sdk. # Only matters on mac. # @todo https://github.com/guard/rb-fsevent/issues/83 -# dependency "rb-fsevent-gem" if macos? +dependency "rb-fsevent-gem" if macos? build do env = if !windows? diff --git a/omnibus/config/software/rb-fsevent-gem.rb b/omnibus/config/software/rb-fsevent-gem.rb index 20423a12a..1cf2eb8c2 100644 --- a/omnibus/config/software/rb-fsevent-gem.rb +++ b/omnibus/config/software/rb-fsevent-gem.rb @@ -19,7 +19,7 @@ # only supports SDK version >= 10.9, so we must rebuild and install. name "rb-fsevent-gem" -default_version "master" +default_version "e46390c4a12d26288e44c42539594e90a7c6fc46" source git: "https://github.com/thibaudgg/rb-fsevent.git" From 779c41896b82f6de8a69f2c4563d1c5fcc5bf5db Mon Sep 17 00:00:00 2001 From: Vikram Karve Date: Thu, 10 Feb 2022 18:49:15 +0530 Subject: [PATCH 3/7] remove rb-fsevent references to check if the default uses newer Mac SDK Signed-off-by: Vikram Karve --- omnibus/config/software/gems.rb | 5 --- omnibus/config/software/rb-fsevent-gem.rb | 50 ----------------------- 2 files changed, 55 deletions(-) delete mode 100644 omnibus/config/software/rb-fsevent-gem.rb diff --git a/omnibus/config/software/gems.rb b/omnibus/config/software/gems.rb index 26170f569..686293337 100644 --- a/omnibus/config/software/gems.rb +++ b/omnibus/config/software/gems.rb @@ -39,11 +39,6 @@ # for train dependency "google-protobuf" -# This is a transative dep but we need to build from source so binaries are built on current sdk. -# Only matters on mac. -# @todo https://github.com/guard/rb-fsevent/issues/83 -dependency "rb-fsevent-gem" if macos? - build do env = if !windows? with_standard_compiler_flags(with_embedded_path) diff --git a/omnibus/config/software/rb-fsevent-gem.rb b/omnibus/config/software/rb-fsevent-gem.rb deleted file mode 100644 index 1cf2eb8c2..000000000 --- a/omnibus/config/software/rb-fsevent-gem.rb +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright:: Copyright (c) Chef Software Inc. -# License:: Apache License, Version 2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# The author built their binary against an old SDK version and signing -# only supports SDK version >= 10.9, so we must rebuild and install. - -name "rb-fsevent-gem" -default_version "e46390c4a12d26288e44c42539594e90a7c6fc46" - -source git: "https://github.com/thibaudgg/rb-fsevent.git" - -license "Apache-2.0" -license_file "https://raw.githubusercontent.com/thibaudgg/rb-fsevent/master/LICENSE.txt" - -dependency "ruby" - -build do - env = with_standard_compiler_flags(with_embedded_path) - # Look up active sdk version. - sdk_ver = `xcrun --sdk macosx --show-sdk-version`.strip - # Newer versions of xcode on MacOS 10.15 returns a full semver so see if we - # have a full semver and account for that. - ver = Gem::Version.new(sdk_ver) - if ver.canonical_segments.count < 3 - env["MACOSX_DEPLOYMENT_TARGET"] = sdk_ver - else - env["MACOSX_DEPLOYMENT_TARGET"] = "#{ver.canonical_segments[0]}.#{ver.canonical_segments[1]}" - end - - # This needs to use our rake (>= 13.0 for ruby-3.0) and rspec rather than bundle install/exec - # against the Gemfile in the project. If the author updates their dev pin to rake >= 13.0 then - # we could revert to the prior code in here which bundle installed their bundle separately. - rake "replace_exe", env: env, cwd: "#{project_dir}/ext" - gem "build rb-fsevent.gemspec", env: env - gem "install rb-fsevent-*.gem --no-document --ignore-dependencies", env: env -end From 077f71703c6bd8500469f07a6daa4d10a1bf99a9 Mon Sep 17 00:00:00 2001 From: Vikram Karve Date: Thu, 10 Feb 2022 23:19:06 +0530 Subject: [PATCH 4/7] Revert "remove rb-fsevent references to check if the default uses newer Mac SDK" This reverts commit 3f5d9a855acf34d4831e03ff3310de85c5bfdabb. --- omnibus/config/software/gems.rb | 5 +++ omnibus/config/software/rb-fsevent-gem.rb | 50 +++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 omnibus/config/software/rb-fsevent-gem.rb diff --git a/omnibus/config/software/gems.rb b/omnibus/config/software/gems.rb index 686293337..26170f569 100644 --- a/omnibus/config/software/gems.rb +++ b/omnibus/config/software/gems.rb @@ -39,6 +39,11 @@ # for train dependency "google-protobuf" +# This is a transative dep but we need to build from source so binaries are built on current sdk. +# Only matters on mac. +# @todo https://github.com/guard/rb-fsevent/issues/83 +dependency "rb-fsevent-gem" if macos? + build do env = if !windows? with_standard_compiler_flags(with_embedded_path) diff --git a/omnibus/config/software/rb-fsevent-gem.rb b/omnibus/config/software/rb-fsevent-gem.rb new file mode 100644 index 000000000..1cf2eb8c2 --- /dev/null +++ b/omnibus/config/software/rb-fsevent-gem.rb @@ -0,0 +1,50 @@ +# +# Copyright:: Copyright (c) Chef Software Inc. +# License:: Apache License, Version 2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# The author built their binary against an old SDK version and signing +# only supports SDK version >= 10.9, so we must rebuild and install. + +name "rb-fsevent-gem" +default_version "e46390c4a12d26288e44c42539594e90a7c6fc46" + +source git: "https://github.com/thibaudgg/rb-fsevent.git" + +license "Apache-2.0" +license_file "https://raw.githubusercontent.com/thibaudgg/rb-fsevent/master/LICENSE.txt" + +dependency "ruby" + +build do + env = with_standard_compiler_flags(with_embedded_path) + # Look up active sdk version. + sdk_ver = `xcrun --sdk macosx --show-sdk-version`.strip + # Newer versions of xcode on MacOS 10.15 returns a full semver so see if we + # have a full semver and account for that. + ver = Gem::Version.new(sdk_ver) + if ver.canonical_segments.count < 3 + env["MACOSX_DEPLOYMENT_TARGET"] = sdk_ver + else + env["MACOSX_DEPLOYMENT_TARGET"] = "#{ver.canonical_segments[0]}.#{ver.canonical_segments[1]}" + end + + # This needs to use our rake (>= 13.0 for ruby-3.0) and rspec rather than bundle install/exec + # against the Gemfile in the project. If the author updates their dev pin to rake >= 13.0 then + # we could revert to the prior code in here which bundle installed their bundle separately. + rake "replace_exe", env: env, cwd: "#{project_dir}/ext" + gem "build rb-fsevent.gemspec", env: env + gem "install rb-fsevent-*.gem --no-document --ignore-dependencies", env: env +end From 92a9138d9c14a1fc7d85535a131f5afc4cf7dd91 Mon Sep 17 00:00:00 2001 From: Vikram Karve Date: Thu, 10 Feb 2022 23:19:23 +0530 Subject: [PATCH 5/7] Revert "added the latest commit id" This reverts commit 112597e72b2dfe5b7ff22c0e0ab78e3000d3fdb3. --- omnibus/config/software/gems.rb | 2 +- omnibus/config/software/rb-fsevent-gem.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/omnibus/config/software/gems.rb b/omnibus/config/software/gems.rb index 26170f569..21f370865 100644 --- a/omnibus/config/software/gems.rb +++ b/omnibus/config/software/gems.rb @@ -42,7 +42,7 @@ # This is a transative dep but we need to build from source so binaries are built on current sdk. # Only matters on mac. # @todo https://github.com/guard/rb-fsevent/issues/83 -dependency "rb-fsevent-gem" if macos? +# dependency "rb-fsevent-gem" if macos? build do env = if !windows? diff --git a/omnibus/config/software/rb-fsevent-gem.rb b/omnibus/config/software/rb-fsevent-gem.rb index 1cf2eb8c2..20423a12a 100644 --- a/omnibus/config/software/rb-fsevent-gem.rb +++ b/omnibus/config/software/rb-fsevent-gem.rb @@ -19,7 +19,7 @@ # only supports SDK version >= 10.9, so we must rebuild and install. name "rb-fsevent-gem" -default_version "e46390c4a12d26288e44c42539594e90a7c6fc46" +default_version "master" source git: "https://github.com/thibaudgg/rb-fsevent.git" From 22adf815330d8bcb70375803b945f7646558587f Mon Sep 17 00:00:00 2001 From: Vikram Karve Date: Thu, 10 Feb 2022 23:19:27 +0530 Subject: [PATCH 6/7] Revert "commented the dependency for mac platform" This reverts commit 75f47a900eb5521a30525b6bf4ab6fd8af771a7b. --- omnibus/config/software/gems.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omnibus/config/software/gems.rb b/omnibus/config/software/gems.rb index 21f370865..26170f569 100644 --- a/omnibus/config/software/gems.rb +++ b/omnibus/config/software/gems.rb @@ -42,7 +42,7 @@ # This is a transative dep but we need to build from source so binaries are built on current sdk. # Only matters on mac. # @todo https://github.com/guard/rb-fsevent/issues/83 -# dependency "rb-fsevent-gem" if macos? +dependency "rb-fsevent-gem" if macos? build do env = if !windows? From a0a5890412470a30e751eadda685f65b380f6f32 Mon Sep 17 00:00:00 2001 From: Vikram Karve Date: Thu, 10 Feb 2022 23:22:32 +0530 Subject: [PATCH 7/7] Update rb-fsevent version to latest as we pull latest in rb-fsevent-gem.rb Signed-off-by: Vikram Karve --- components/gems/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/gems/Gemfile.lock b/components/gems/Gemfile.lock index f8f673936..dcd476fe0 100644 --- a/components/gems/Gemfile.lock +++ b/components/gems/Gemfile.lock @@ -837,7 +837,7 @@ GEM rack (2.2.3) rainbow (3.1.1) rake (13.0.1) - rb-fsevent (0.11.0) + rb-fsevent (0.11.1) rb-inotify (0.10.1) ffi (~> 1.0) rb-readline (0.5.5)