auditbeat 6.6.0

Closes #36659.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
master
Christian Moritz 2019-02-03 00:09:14 +01:00 committed by FX Coudert
parent caa129be07
commit 4b286f2c92
1 changed files with 23 additions and 14 deletions

View File

@ -1,10 +1,9 @@
class Auditbeat < Formula
desc "Lightweight Shipper for Audit Data"
homepage "https://www.elastic.co/products/beats/auditbeat"
# Pinned at 6.2.x because of a licencing issue
# See: https://github.com/Homebrew/homebrew-core/pull/28995
url "https://github.com/elastic/beats/archive/v6.2.4.tar.gz"
sha256 "87d863cf55863329ca80e76c3d813af2960492f4834d4fea919f1d4b49aaf699"
url "https://github.com/elastic/beats.git",
:tag => "v6.6.0",
:revision => "2c385a0764bdc537b6dc078a1d9bf11bb6d7bd95"
head "https://github.com/elastic/beats.git"
bottle do
@ -18,18 +17,21 @@ class Auditbeat < Formula
depends_on "python@2" => :build
resource "virtualenv" do
url "https://files.pythonhosted.org/packages/b1/72/2d70c5a1de409ceb3a27ff2ec007ecdd5cc52239e7c74990e32af57affe9/virtualenv-15.2.0.tar.gz"
sha256 "1d7e241b431e7afce47e77f8843a276f652699d1fa4f93b9d8ce0076fd7b0b54"
url "https://files.pythonhosted.org/packages/8b/f4/360aa656ddb0f4168aeaa1057d8784b95d1ce12f34332c1cf52420b6db4e/virtualenv-16.3.0.tar.gz"
sha256 "729f0bcab430e4ef137646805b5b1d8efbb43fe53d4a0f33328624a84a5121f7"
end
# Patch required to build against go 1.10.
# May be removed once upstream beats project fully supports go 1.10.
# Patch required to build against go 1.11 (Can be removed with v7.0.0)
# partially backport of https://github.com/elastic/beats/commit/8d8eaf34a6cb5f3b4565bf40ca0dc9681efea93c
patch do
url "https://raw.githubusercontent.com/Homebrew/formula-patches/1ddc0e6/auditbeat/go1.10.diff"
sha256 "cf0988ba5ff5cc8bd7502671f08ea282b19720be42bea2aaf5c236b29a01a24f"
url "https://raw.githubusercontent.com/Homebrew/formula-patches/881f5d1d/auditbeat/go1.11.diff"
sha256 "1747ea917ccd4c627fdc412d41b340ec96ce705f529b6e9d91e9bdf482eb792d"
end
def install
# remove non open source files
rm_rf "x-pack"
ENV["GOPATH"] = buildpath
(buildpath/"src/github.com/elastic/beats").install buildpath.children
@ -39,17 +41,24 @@ class Auditbeat < Formula
system "python", *Language::Python.setup_install_args(buildpath/"vendor")
end
ENV.prepend_path "PATH", buildpath/"vendor/bin"
ENV.prepend_path "PATH", buildpath/"vendor/bin" # for virtualenv
ENV.prepend_path "PATH", buildpath/"bin" # for mage (build tool)
cd "src/github.com/elastic/beats/auditbeat" do
system "make"
# don't build docs because it would fail creating the combined OSS/x-pack
# docs and we aren't installing them anyway
inreplace "magefile.go", "mage.GenerateModuleIncludeListGo, Docs)",
"mage.GenerateModuleIncludeListGo)"
system "make", "mage"
# prevent downloading binary wheels during python setup
system "make", "PIP_INSTALL_COMMANDS=--no-binary :all", "python-env"
system "make", "DEV_OS=darwin", "update"
system "mage", "-v", "build"
system "mage", "-v", "update"
(etc/"auditbeat").install Dir["auditbeat.*", "fields.yml"]
(libexec/"bin").install "auditbeat"
prefix.install "_meta/kibana"
prefix.install "build/kibana"
end
prefix.install_metafiles buildpath/"src/github.com/elastic/beats"