nbigaouette
06/07/2017, 8:47 PMmake deps phase fails if the environment variable OSQUERY_DEPS is used to place dependencies in a non-default location (see https://github.com/facebook/osquery/issues/3373). While I grep'ed the code for the hard-coded path and replaced everything with accesses to OSQUERY_DEPS (see https://github.com/facebook/osquery/pull/3387 and https://github.com/facebook/osquery/pull/3388), there is still an issue with Python (see https://github.com/facebook/osquery/issues/3373#issuecomment-306918797). I cannot use the bottled version; Python needs to be recompiled. This is fine, but I do not want to rebuild everything. Temporarily I bypassed the problem with the following patch, but I'm not sure if it's the best way:
diff --git a/tools/provision/formula/python.rb b/tools/provision/formula/python.rb
index cc511382..93d54e09 100644
--- a/tools/provision/formula/python.rb
+++ b/tools/provision/formula/python.rb
@@ -8,12 +8,14 @@ class Python < AbstractOsqueryFormula
head "https://hg.python.org/cpython", :using => :hg, :branch => "2.7"
revision 101
+ if not ENV["OSQUERY_DEPS"]
bottle do
root_url "<https://osquery-packages.s3.amazonaws.com/bottles>"
cellar :any_skip_relocation
sha256 "a43f382991e2636cd1fc01619b5790898e1e40e89da94d5997cc80a0775d8a54" => :sierra
sha256 "8245288b9906228f925215162ecba6925d23c7bf544e919ce3152d90398f738c" => :x86_64_linux
end
+ end
option :universal
option "with-quicktest", "Run `make quicktest` after the build (for devs; may fail)"
(this basically "hide" the bottle information from the formula if the environment variable is set, even if it points to the default location /usr/local/osquery, forcing a recompilation)
Does anyone would have a suggestion as how to handle this?