From d249d6c45ab1dd4f67a766b68a8de879e28d2617 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Thu, 4 Aug 2016 19:43:31 +0100 Subject: [PATCH] ucspi-tools: migrate to boneyard (#3589) Upstream hasn't cut a release in over 18 months. In the mean time this has gone through 10 formula revisions & has a whole vendored LibreSSL because upstream isn't keeping up with LibreSSL development, sadly, which is rapid & regularly breaking. I'm uncomfortable keeping an unsupported LibreSSL buried inside this formula when it looks increasingly like that's going to become a permanent fixture rather than the temporary hack it was intended to be when inserted initially. We wouldn't accept this formula today due to notability issues in our audit and our usage data shows only 18 "known" installations since analytics were switched on a few months ago. Let's remove this from Homebrew until the situation improves in terms of mandating LibreSSL but not matching its release cadence. --- Formula/ucspi-tools.rb | 104 ----------------------------------------- tap_migrations.json | 1 + 2 files changed, 1 insertion(+), 104 deletions(-) delete mode 100644 Formula/ucspi-tools.rb diff --git a/Formula/ucspi-tools.rb b/Formula/ucspi-tools.rb deleted file mode 100644 index cf5175aec4e..00000000000 --- a/Formula/ucspi-tools.rb +++ /dev/null @@ -1,104 +0,0 @@ -class UcspiTools < Formula - desc "Various tools to handle UCSPI connections" - homepage "https://github.com/younix/ucspi/blob/master/README.md" - revision 10 - - stable do - url "https://github.com/younix/ucspi/archive/v1.2.tar.gz" - sha256 "38cd0ae9113324602a600a6234d60ec9c3a8c13c8591e9b730f91ffb77e5412a" - - # LibreSSL is still in rapid development & the release branch we follow - # moves much quicker than the ucspi project. Since ucspi-tools breaks - # every LibreSSL update vendor until new release is available. - resource "libressl" do - url "http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.2.7.tar.gz" - sha256 "7e2c68b383bba8efb7dce5ea1eccfda77048547d1d2a7355c072efd7ccd893cd" - end - - # LibreSSL renamed a function between the 2.1.3 and 2.1.4 release which ucspi uses. - # https://github.com/younix/ucspi/issues/2 - # http://www.freshbsd.org/commit/openbsd/2b22762d1139c74c743195f46b41fea0b9459ecd - patch do - url "https://github.com/younix/ucspi/pull/3.diff" - sha256 "932aa6fcde21dc4eb3ad4474a6cd5f413f4da076b1de1491360a60584e0e514e" - end - end - - bottle do - sha256 "dcb8b5831d2efd0387780ee4b6bb205071e6246b80e33a8ede14d0f453a6e55e" => :el_capitan - sha256 "9094348d82cf0baf6d9b3d740bb6de28a5bfa769c54aeb67cdc03446bb5704f6" => :yosemite - sha256 "b88e7cffbd5dbd26d6b0dec0ce785b208401c57d4c990a7eb3dd5861187ecb38" => :mavericks - end - - head do - url "https://github.com/younix/ucspi.git" - - depends_on "libressl" - end - - depends_on "pkg-config" => :build - depends_on "ucspi-tcp" - - def install - if build.stable? - vendordir = libexec/"vendor/libressl" - resource("libressl").stage do - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{vendordir} - --with-openssldir=#{vendordir}/etc - --sysconfdir=#{vendordir}/etc - ] - - # https://github.com/libressl-portable/portable/issues/121 - args << "--disable-asm" if MacOS.version <= :snow_leopard - - system "./configure", *args - system "make" - system "make", "check" - system "make", "install" - - # It looks for the headers prior to checking pkg-config so we - # can't just pass PKG_CONFIG_PATH sadly. - ENV.prepend_path "PATH", vendordir/"bin" - ENV.prepend_path "PKG_CONFIG_PATH", "#{vendordir}/lib/pkgconfig" - ENV.prepend "CFLAGS", "-I#{vendordir}/include" - end - end - - system "make", "PREFIX=#{prefix}", "install", "CFLAGS=#{ENV.cflags}" - end - - def post_install - return unless File.exist?(libexec/"vendor") - - keychains = %w[ - /Library/Keychains/System.keychain - /System/Library/Keychains/SystemRootCertificates.keychain - ] - - certs_list = `security find-certificate -a -p #{keychains.join(" ")}` - certs = certs_list.scan( - /-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----/m - ) - - valid_certs = certs.select do |cert| - IO.popen("openssl x509 -inform pem -checkend 0 -noout", "w") do |openssl_io| - openssl_io.write(cert) - openssl_io.close_write - end - - $?.success? - end - - # LibreSSL install a default pem - We prefer to use OS X for consistency. - rm_f libexec/"vendor/libressl/etc/cert.pem" - (libexec/"vendor/libressl/etc/cert.pem").atomic_write(valid_certs.join("\n")) - end - - test do - out = shell_output("#{bin}/tlsc 2>&1", 1) - assert_equal "tlsc [-hCH] [-c cert_file] [-f ca_file] [-p ca_path] program [args...]\n", out - end -end diff --git a/tap_migrations.json b/tap_migrations.json index 509dd7d13a3..6ba769e4f25 100644 --- a/tap_migrations.json +++ b/tap_migrations.json @@ -266,6 +266,7 @@ "ttytter": "homebrew/boneyard", "tuntap": "caskroom/cask", "tup": "homebrew/fuse", + "ucspi-tools": "homebrew/boneyard", "uim": "homebrew/x11", "ume": "homebrew/games", "upnp-router-control": "homebrew/gui",