aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/requirements
diff options
context:
space:
mode:
authorDominyk Tiller2014-11-04 04:01:10 +0000
committerMike McQuaid2014-11-07 09:12:29 +0000
commit6fbb7814d5c2a18a16e9ebe0fa49b8d2f1ba936e (patch)
tree3bca6b82502fb2269ffe610c623383bbd633fa7a /Library/Homebrew/requirements
parent8952d43819d719fc4c0cbc4838be6c6b8be1bdd2 (diff)
downloadhomebrew-6fbb7814d5c2a18a16e9ebe0fa49b8d2f1ba936e.tar.bz2
tuntap: recommend upstream signed binary.
We have an upstream signed binary available! Big big love to Mattias for this. This PR converts all the existing tuntap dependencies into binary-friendly tuntap dependencies, and adds a tuntap dependency to requirements to look for the kexts. Closes #33894. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew/requirements')
-rw-r--r--Library/Homebrew/requirements/tuntap_dependency.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/Library/Homebrew/requirements/tuntap_dependency.rb b/Library/Homebrew/requirements/tuntap_dependency.rb
new file mode 100644
index 000000000..cf306b5cd
--- /dev/null
+++ b/Library/Homebrew/requirements/tuntap_dependency.rb
@@ -0,0 +1,13 @@
+require "requirement"
+
+class TuntapDependency < Requirement
+ fatal true
+ default_formula "tuntap"
+ satisfy { self.class.binary_tuntap_installed? || Formula["tuntap"].installed? }
+
+ def self.binary_tuntap_installed?
+ File.exist?("/Library/Extensions/tun.kext") && File.exist?("/Library/Extensions/tap.kext")
+ File.exist?("/Library/LaunchDaemons/net.sf.tuntaposx.tun.plist")
+ File.exist?("/Library/LaunchDaemons/net.sf.tuntaposx.tap.plist")
+ end
+end