From 58845d1aa19631a7db4c0bbfd61b360a03273b15 Mon Sep 17 00:00:00 2001 From: EricFromCanada Date: Fri, 10 Apr 2020 17:58:47 -0400 Subject: [PATCH] salt 3000.1 Co-Authored-By: Alexander Bayandin --- Formula/salt.rb | 120 ++++++++++-------------------------------------- 1 file changed, 25 insertions(+), 95 deletions(-) diff --git a/Formula/salt.rb b/Formula/salt.rb index cf087723d3b8f..0b64e50c4a5c8 100644 --- a/Formula/salt.rb +++ b/Formula/salt.rb @@ -3,9 +3,8 @@ class Salt < Formula desc "Dynamic infrastructure communication bus" homepage "https://s.saltstack.com/community/" - url "https://files.pythonhosted.org/packages/28/63/ad60e60c982810d55e23012e2359c96f92694842a476708f44e5d671a9b6/salt-3000.tar.gz" - sha256 "04fbc64933b375cbbefc9576bcc65167b74d5eec7f58e64d096d67529ea66500" - revision 2 + url "https://files.pythonhosted.org/packages/b5/7b/e591ad97f038f32298ee6303414767cdd8df811c9daf5b48c37afe9610c3/salt-3000.1.tar.gz" + sha256 "5ad18044b4a47690d09c3ebc842a64d58144d63f40019e867683377dbf337aab" head "https://github.com/saltstack/salt.git", :branch => "develop", :shallow => false bottle do @@ -22,112 +21,31 @@ class Salt < Formula depends_on "python" depends_on "zeromq" - # Saltstack's Git filesystem backend depends on pygit2 which depends on libgit2 - # pygit2 must be the same version as libgit2 - mismatched versions are incompatible - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/7b/db/1d037ccd626d05a7a47a1b81ea73775614af83c2b3e53d86a0bb41d8d799/Jinja2-2.10.3.tar.gz" - sha256 "9fe95f19286cfefaa917656583d020be14e7859c6b0252588391e47db34527de" - end - - resource "M2Crypto" do - url "https://files.pythonhosted.org/packages/74/18/3beedd4ac48b52d1a4d12f2a8c5cf0ae342ce974859fba838cbbc1580249/M2Crypto-0.35.2.tar.gz" - sha256 "4c6ad45ffb88670c590233683074f2440d96aaccb05b831371869fc387cbd127" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - end - - resource "backports_abc" do - url "https://files.pythonhosted.org/packages/68/3c/1317a9113c377d1e33711ca8de1e80afbaf4a3c950dd0edfaf61f9bfe6d8/backports_abc-0.5.tar.gz" - sha256 "033be54514a03e255df75c5aee8f9e672f663f93abb723444caec8fe43437bde" - end + # Homebrew installs optional dependencies: M2Crypto, pygit2 resource "cached-property" do url "https://files.pythonhosted.org/packages/57/8e/0698e10350a57d46b3bcfe8eff1d4181642fd1724073336079cb13c5cf7f/cached-property-1.5.1.tar.gz" sha256 "9217a59f14a5682da7c4b8829deadbfc194ac22e9908ccf7c8820234e80a1504" end - resource "certifi" do - url "https://files.pythonhosted.org/packages/41/bf/9d214a5af07debc6acf7f3f257265618f1db242a3f8e49a9b516f24523a6/certifi-2019.11.28.tar.gz" - sha256 "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f" - end - resource "cffi" do - url "https://files.pythonhosted.org/packages/2d/bf/960e5a422db3ac1a5e612cb35ca436c3fc985ed4b7ed13a1b4879006f450/cffi-1.13.2.tar.gz" - sha256 "599a1e8ff057ac530c9ad1778293c665cb81a791421f46922d80a86473c13346" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz" - sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407" + url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" + sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" end - resource "msgpack" do - url "https://files.pythonhosted.org/packages/74/0a/de673c1c987f5779b65ef69052331ec0b0ebd22958bda77a8284be831964/msgpack-0.6.2.tar.gz" - sha256 "ea3c2f859346fcd55fc46e96885301d9c2f7a36d453f5d8f2967840efa1e1830" + resource "M2Crypto" do + url "https://files.pythonhosted.org/packages/74/18/3beedd4ac48b52d1a4d12f2a8c5cf0ae342ce974859fba838cbbc1580249/M2Crypto-0.35.2.tar.gz" + sha256 "4c6ad45ffb88670c590233683074f2440d96aaccb05b831371869fc387cbd127" end resource "pycparser" do - url "https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz" - sha256 "a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" - end - - resource "pycrypto" do - url "https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz" - sha256 "f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c" + url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" + sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" end resource "pygit2" do - url "https://files.pythonhosted.org/packages/1d/c4/e0ba65178512a724a86b39565d7f9286c16d7f8e45e2f665973065c4a495/pygit2-1.1.1.tar.gz" - sha256 "9255d507d5d87bf22dfd57997a78908010331fc21f9a83eca121a53f657beb3c" - end - - resource "pyzmq" do - url "https://files.pythonhosted.org/packages/3c/83/7ecbe9b762829f589fa9734026e0ccb63cb128fe5615ae1698f65df72bfe/pyzmq-18.1.1.tar.gz" - sha256 "8c69a6cbfa94da29a34f6b16193e7c15f5d3220cb772d6d17425ff3faa063a6d" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/01/62/ddcf76d1d19885e8579acb1b1df26a852b03472c0e46d2b959a714c90608/requests-2.22.0.tar.gz" - sha256 "11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4" - end - - resource "singledispatch" do - url "https://files.pythonhosted.org/packages/d9/e9/513ad8dc17210db12cb14f2d4d190d618fb87dd38814203ea71c87ba5b68/singledispatch-3.4.0.3.tar.gz" - sha256 "5b06af87df13818d14f08a028e42f566640aef80805c3b50c5056b086e3c2b9c" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "tornado" do - url "https://files.pythonhosted.org/packages/e3/7b/e29ab3d51c8df66922fea216e2bddfcb6430fb29620e5165b16a216e0d3c/tornado-4.5.3.tar.gz" - sha256 "6d14e47eab0e15799cf3cdcc86b0b98279da68522caace2bd7ce644287685f0a" - end - - resource "typing" do - url "https://files.pythonhosted.org/packages/67/b0/b2ea2bd67bfb80ea5d12a5baa1d12bda002cab3b6c9b48f7708cd40c34bf/typing-3.7.4.1.tar.gz" - sha256 "91dfe6f3f706ee8cc32d38edbbf304e9b7583fb37108fef38229617f8b3eba23" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/ad/fc/54d62fa4fc6e675678f9519e677dfc29b8964278d75333cf142892caf015/urllib3-1.25.7.tar.gz" - sha256 "f3c5fd51747d450d4dcf6f923c81f78f811aab8205fda64b0aba34a4e48b0745" + url "https://files.pythonhosted.org/packages/a5/97/49cb02500d851a172c287cafe04eca864771d99ace6a81967d9a99f0c39e/pygit2-1.2.0.tar.gz" + sha256 "f991347f5b11589ac8dc5a3c8257a514cf802545b75c11133a43ae9f76388278" end def install @@ -142,7 +60,17 @@ def install # Fix building of M2Crypto on High Sierra https://github.com/Homebrew/homebrew-core/pull/45895 ENV.delete("HOMEBREW_SDKROOT") if MacOS.version == :high_sierra - virtualenv_install_with_resources + # Do not install PyObjC since it causes broken linkage + # https://github.com/Homebrew/homebrew-core/pull/52835#issuecomment-617502578 + File.write(buildpath/"pkg/osx/req_pyobjc.txt", "") + + venv = virtualenv_create(libexec, "python3") + venv.pip_install resources + + system libexec/"bin/pip", "install", "-v", "--ignore-installed", buildpath + system libexec/"bin/pip", "uninstall", "-y", "salt" + venv.pip_install_and_link buildpath + prefix.install libexec/"share" # man pages (etc/"saltstack").install (buildpath/"conf").children # sample config files end @@ -151,6 +79,8 @@ def caveats <<~EOS Sample configuration files have been placed in #{etc}/saltstack. Saltstack will not use these by default. + + Homebrew's installation does not include PyObjC. EOS end