Add unsigned kext requirement.

Creates a new requirement that dictates packages are unable to install due to requiring a signed kext to function.

Closes Homebrew/homebrew#33404.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Dominyk Tiller 2014-10-20 21:45:40 +01:00 committed by Mike McQuaid
parent 418a9de2c9
commit 7099f54ef7
11 changed files with 77 additions and 66 deletions

View file

@ -1,23 +1,24 @@
require 'formula'
require "formula"
class Fuse4xKext < Formula
homepage 'http://fuse4x.github.io'
url 'https://github.com/fuse4x/kext/archive/fuse4x_0_9_2.tar.gz'
sha1 '4222c14b38325d9e41fb0925d2681dda3e73e861'
homepage "http://fuse4x.github.io"
url "https://github.com/fuse4x/kext/archive/fuse4x_0_9_2.tar.gz"
sha1 "4222c14b38325d9e41fb0925d2681dda3e73e861"
bottle do
cellar :any
revision 4
sha1 '1d1ab89b714ea897c981f356a659afaff977a0da' => :mavericks
sha1 '0a03e6a51e40fe3456b8f132549516e4cb996985' => :mountain_lion
sha1 '6f306f38557d016f5eaa0c999f2092d0767870e6' => :lion
sha1 "1d1ab89b714ea897c981f356a659afaff977a0da" => :mavericks
sha1 "0a03e6a51e40fe3456b8f132549516e4cb996985" => :mountain_lion
sha1 "6f306f38557d016f5eaa0c999f2092d0767870e6" => :lion
end
depends_on :xcode => :build
depends_on UnsignedKextRequirement
def install
ENV.delete('CC')
ENV.delete('CXX')
ENV.delete("CC")
ENV.delete("CXX")
args = [
"-sdk",
@ -28,7 +29,7 @@ class Fuse4xKext < Formula
"SYMROOT=build",
# Build a 32-bit kernel extension on Leopard and a fat binary for Snow
# Leopard/Lion.
"ARCHS=i386 #{'x86_64' if MacOS.prefer_64_bit?}", 'ONLY_ACTIVE_ARCH=NO'
"ARCHS=i386 #{"x86_64" if MacOS.prefer_64_bit?}", "ONLY_ACTIVE_ARCH=NO"
]
xcodebuild *args
@ -62,7 +63,7 @@ class Fuse4xKext < Formula
# filesystem layout convention from Apple.
# Check if the user has fuse4x kext in the old location.
# Remove this check Q4 2012 when it become clear that everyone migrated to 0.9.0+
if File.exist?('/System/Library/Extensions/fuse4x.kext/')
if File.exist?("/System/Library/Extensions/fuse4x.kext/")
message += <<-EOS.undent
You have older version of fuse4x installed. Please remove it by running:

View file

@ -1,31 +1,32 @@
require 'formula'
require "formula"
class Fuse4x < Formula
homepage 'http://fuse4x.github.io'
url 'https://github.com/fuse4x/fuse/archive/fuse4x_0_9_2.tar.gz'
sha1 '3a9700f716eff930dcd2426772c642a09adcc73a'
homepage "http://fuse4x.github.io"
url "https://github.com/fuse4x/fuse/archive/fuse4x_0_9_2.tar.gz"
sha1 "3a9700f716eff930dcd2426772c642a09adcc73a"
depends_on 'autoconf' => :build
depends_on 'automake' => :build
depends_on 'libtool' => :build
depends_on 'gettext' => :build
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "gettext" => :build
depends_on ConflictsWithBinaryOsxfuse
depends_on 'fuse4x-kext'
depends_on UnsignedKextRequirement
depends_on "fuse4x-kext"
conflicts_with 'osxfuse', :because => 'both install `fuse.pc`'
conflicts_with "osxfuse", :because => "both install `fuse.pc`"
def install
# Build universal if the hardware can handle it---otherwise 32 bit only
MacOS.prefer_64_bit? ? ENV.universal_binary : ENV.m32
inreplace 'makeconf.sh', 'libtoolize', 'glibtoolize'
system './makeconf.sh'
inreplace "makeconf.sh", "libtoolize", "glibtoolize"
system "./makeconf.sh"
# force 64bit inodes on 10.5. On 10.6+ this is no-op.
ENV.append_to_cflags "-D_DARWIN_USE_64_BIT_INODE"
system "./configure", "--disable-dependency-tracking",
"--disable-static",
"--prefix=#{prefix}"
system "make install"
system "make", "install"
end
end

View file

@ -12,6 +12,7 @@ class Horndis < Formula
sha1 "af083937c77de9d628d9cf6858296be61846ad63" => :lion
end
depends_on UnsignedKextRequirement
depends_on :xcode => :build
def install

View file

@ -1,9 +1,9 @@
require 'formula'
require "formula"
class Iodine < Formula
homepage 'http://code.kryo.se/iodine/'
url 'http://code.kryo.se/iodine/iodine-0.7.0.tar.gz'
sha1 'f4c49305b6f46a547b160b3bd8c962942d701a63'
homepage "http://code.kryo.se/iodine/"
url "http://code.kryo.se/iodine/iodine-0.7.0.tar.gz"
sha1 "f4c49305b6f46a547b160b3bd8c962942d701a63"
bottle do
cellar :any
@ -12,7 +12,7 @@ class Iodine < Formula
sha1 "1afe02179eaa83f66382eaf296023c574e351f79" => :lion
end
depends_on 'tuntap'
depends_on "tuntap"
def install
system "make", "install", "prefix=#{prefix}"

View file

@ -1,12 +1,12 @@
require 'formula'
require "formula"
class Miredo < Formula
homepage 'http://www.remlab.net/miredo/'
url 'http://www.remlab.net/files/miredo/miredo-1.2.6.tar.xz'
sha1 '630c84e9919952f6f4792ceda54a12e0aef43bbf'
homepage "http://www.remlab.net/miredo/"
url "http://www.remlab.net/files/miredo/miredo-1.2.6.tar.xz"
sha1 "630c84e9919952f6f4792ceda54a12e0aef43bbf"
depends_on 'tuntap'
depends_on 'judy'
depends_on "tuntap"
depends_on "judy"
patch :DATA
@ -18,7 +18,7 @@ class Miredo < Formula
]
system "./configure", *args
system "make install"
system "make", "install"
end
end

View file

@ -15,6 +15,7 @@ class Osxfuse < Formula
depends_on :macos => :snow_leopard
depends_on :xcode => :build
depends_on ConflictsWithBinaryOsxfuse
depends_on UnsignedKextRequirement
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build

View file

@ -2,15 +2,18 @@ require "formula"
class Peervpn < Formula
homepage "http://www.peervpn.net"
url "http://www.peervpn.net/files/peervpn-0-029.tar.gz"
version "0.029"
sha1 "ebe2214aa002de2a7c1c69f257f8113c2b6ac8a7"
url "http://www.peervpn.net/files/peervpn-0-040.tar.gz"
version "0.040"
sha1 "45f815445a2d654e2da56de965633743d25f3468"
depends_on "openssl"
depends_on "tuntap"
patch :DATA if MacOS.version == :snow_leopard
def install
# Remove the Linux-only lrt lib from the makefile or else compile = nope.
inreplace "Makefile", "LIBS+=-lrt -lcrypto -lz", "LIBS+=-lcrypto -lz"
system "make"
bin.install "peervpn"
etc.install "peervpn.conf"

View file

@ -1,19 +1,21 @@
require 'formula'
require "formula"
class S3fs < Formula
homepage 'http://code.google.com/p/s3fs/'
url 'https://github.com/s3fs-fuse/s3fs-fuse/archive/v1.76.tar.gz'
sha1 '478aa3230b5d85bfe95d9962ee2f1d8cd35fa070'
homepage "http://code.google.com/p/s3fs/"
url "https://github.com/s3fs-fuse/s3fs-fuse/archive/v1.76.tar.gz"
sha1 "478aa3230b5d85bfe95d9962ee2f1d8cd35fa070"
revision 1
depends_on "pkg-config" => :build
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "openssl"
depends_on "fuse4x"
def install
system "./autogen.sh"
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make install"
system "make", "install"
end
def caveats; <<-EOS.undent

View file

@ -1,9 +1,9 @@
require 'formula'
require "formula"
class Stormfs < Formula
homepage 'https://github.com/benlemasurier/stormfs'
url 'https://github.com/benlemasurier/stormfs/archive/v0.03.tar.gz'
sha1 'bae7aeb409b910dd3844cd930f3ad9427d7e1609'
homepage "https://github.com/benlemasurier/stormfs"
url "https://github.com/benlemasurier/stormfs/archive/v0.03.tar.gz"
sha1 "bae7aeb409b910dd3844cd930f3ad9427d7e1609"
depends_on "pkg-config" => :build
depends_on "autoconf" => :build
@ -16,6 +16,6 @@ class Stormfs < Formula
system "./autogen.sh"
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
system "make", "install"
end
end

View file

@ -23,6 +23,8 @@ class Tuntap < Formula
sha1 "a3e380d8080ce9cf75f04cc80dcc869cf93b0276" => :lion
end
depends_on UnsignedKextRequirement
def install
cd "tuntap" if build.head?
ENV.j1 # to avoid race conditions (can't open: ../tuntap.o)

View file

@ -1,17 +1,17 @@
require 'formula'
require "formula"
class Vpnc < Formula
homepage 'http://www.unix-ag.uni-kl.de/~massar/vpnc/'
url 'http://ftp.debian.org/debian/pool/main/v/vpnc/vpnc_0.5.3r512.orig.tar.gz'
version '0.5.3r512'
sha256 'd421ac20b6c65d22d2ee88066e487f740f4d367f9143b6045bcb8fa177b384fe'
homepage "http://www.unix-ag.uni-kl.de/~massar/vpnc/"
url "http://ftp.debian.org/debian/pool/main/v/vpnc/vpnc_0.5.3r512.orig.tar.gz"
version "0.5.3r512"
sha256 "d421ac20b6c65d22d2ee88066e487f740f4d367f9143b6045bcb8fa177b384fe"
revision 2
depends_on 'pkg-config' => :build
depends_on 'libgcrypt'
depends_on 'libgpg-error'
depends_on 'gnutls'
depends_on 'tuntap'
depends_on "pkg-config" => :build
depends_on "libgcrypt"
depends_on "libgpg-error"
depends_on "gnutls"
depends_on "tuntap"
fails_with :llvm do
build 2334
@ -27,28 +27,28 @@ class Vpnc < Formula
ENV.deparallelize
inreplace ["vpnc-script", "vpnc-disconnect"] do |s|
s.gsub! "/var/run/vpnc", (var + 'run/vpnc')
s.gsub! "/var/run/vpnc", (var + "run/vpnc")
end
inreplace "vpnc.8.template" do |s|
s.gsub! "/etc/vpnc", (etc + 'vpnc')
s.gsub! "/etc/vpnc", (etc + "vpnc")
end
inreplace "Makefile" do |s|
s.change_make_var! "PREFIX", prefix
s.change_make_var! "ETCDIR", (etc + 'vpnc')
s.change_make_var! "ETCDIR", (etc + "vpnc")
s.gsub! /^#OPENSSL/, "OPENSSL" if build.include? "hybrid"
end
inreplace "config.c" do |s|
s.gsub! "/etc/vpnc", (etc + 'vpnc')
s.gsub! "/var/run/vpnc", (var + 'run/vpnc')
s.gsub! "/etc/vpnc", (etc + "vpnc")
s.gsub! "/var/run/vpnc", (var + "run/vpnc")
end
system "make"
(var + 'run/vpnc').mkpath
system "make install"
(var + "run/vpnc").mkpath
system "make", "install"
end
end