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 Homebrew/homebrew#33894.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Dominyk Tiller 2014-11-04 04:01:10 +00:00 committed by Mike McQuaid
parent c5f549e33c
commit 97eac8853e
3 changed files with 15 additions and 0 deletions

View File

@ -120,6 +120,7 @@ class DependencyCollector
when :python3 then Python3Dependency.new(tags) when :python3 then Python3Dependency.new(tags)
when :java then JavaDependency.new(tags) when :java then JavaDependency.new(tags)
when :osxfuse then OsxfuseDependency.new(tags) when :osxfuse then OsxfuseDependency.new(tags)
when :tuntap then TuntapDependency.new(tags)
# Tiger's ld is too old to properly link some software # Tiger's ld is too old to properly link some software
when :ld64 then LD64Dependency.new if MacOS.version < :leopard when :ld64 then LD64Dependency.new if MacOS.version < :leopard
when :ant then ant_dep(spec, tags) when :ant then ant_dep(spec, tags)

View File

@ -6,6 +6,7 @@ require 'requirements/maximum_macos_requirement'
require 'requirements/mpi_dependency' require 'requirements/mpi_dependency'
require 'requirements/osxfuse_dependency' require 'requirements/osxfuse_dependency'
require 'requirements/python_dependency' require 'requirements/python_dependency'
require 'requirements/tuntap_dependency'
require 'requirements/unsigned_kext_requirement' require 'requirements/unsigned_kext_requirement'
require 'requirements/x11_dependency' require 'requirements/x11_dependency'

View File

@ -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