Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filebeat, heartbeat, packetbeat: remove python #201310

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions Formula/f/filebeat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

depends_on "go" => :build
depends_on "mage" => :build
depends_on "[email protected]" => :build

uses_from_macos "python" => :build
uses_from_macos "rsync" => :build

def install

Check failure on line 27 in Formula/f/filebeat.rb

View workflow job for this annotation

GitHub Actions / Linux

`brew install --verbose --formula --build-bottle filebeat` failed on Linux!

mv /tmp/homebrew-unpack-20241216-5578-u9clgv/tools /tmp/filebeat-20241216-5578-dvpula/tools mv /tmp/homebrew-unpack-20241216-5578-u9clgv/updatecli-compose.yaml /tmp/filebeat-20241216-5578-dvpula/updatecli-compose.yaml mv /tmp/homebrew-unpack-20241216-5578-u9clgv/winlogbeat /tmp/filebeat-20241216-5578-dvpula/winlogbeat mv /tmp/homebrew-unpack-20241216-5578-u9clgv/x-pack /tmp/filebeat-20241216-5578-dvpula/x-pack ==> make PIP_INSTALL_PARAMS=--no-binary :all python-env error: subprocess-exited-with-error × Building wheel for grpcio (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [2858 lines of output] <string>:40: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html Found cython-generated files... running bdist_wheel running build running build_py running build_project_metadata creating pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_channel.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_utilities.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_grpcio_metadata.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_typing.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_simple_stubs.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_common.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_auth.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/__init__.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_compression.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_runtime_protos.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_interceptor.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_observability.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_server.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_plugin_wrapping.py -> pyb/lib.linux-x86_64-cpython-313/grpc creating pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_channel.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_typing.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_call.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_base_server.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/__init__.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_metadata.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_base_call.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_base_channel.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_interceptor.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_server.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_utils.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio creating pyb/lib.linux-x86_64-cpython-313/grpc/beta copying src/python/grpcio/grpc/beta/_server_adaptations.py -> pyb/lib.linux-x86_64-cpython-313/grpc/beta copying src/python/grpcio/grpc/beta/_client_adaptations.py -> pyb/lib.linux-x86_64-cpython-313/grpc/beta copying src/python/grpcio/grpc/beta/__init__.py -> pyb/lib.linux-x86_64-cpython-313/grpc/beta copying src/python/grpcio/grpc/beta/_metadata.py -> pyb/lib.linux-x86_64-cpython-313/grpc/beta copying src/python/grpcio/grpc/beta/interfaces.py -> pyb/lib.linux-x86_64-cpython-313/grpc/beta copying src/python/grpcio/grpc/beta/implementations.py -> pyb/lib.linux-x86_64-cpython-313/grpc/beta
# remove non open source files
rm_r("x-pack")

Expand All @@ -39,8 +39,8 @@
system "mage", "-v", "build"
system "mage", "-v", "update"

(etc/"filebeat").install Dir["filebeat.*", "fields.yml", "modules.d"]
(etc/"filebeat"/"module").install Dir["build/package/modules/*"]
pkgetc.install Dir["filebeat.*", "fields.yml", "modules.d"]
(pkgetc/"module").install Dir["build/package/modules/*"]
(libexec/"bin").install "filebeat"
prefix.install "build/kibana"
end
Expand All @@ -55,8 +55,7 @@
"$@"
EOS

chmod 0555, bin/"filebeat" # generate_completions_from_executable fails otherwise
generate_completions_from_executable(bin/"filebeat", "completion", shells: [:bash, :zsh])
generate_completions_from_executable(libexec/"bin/filebeat", "completion", shells: [:bash, :zsh])
end

service do
Expand Down Expand Up @@ -92,8 +91,8 @@
log_file.append_lines "foo bar baz"
sleep 5

assert_predicate testpath/"meta.json", :exist?
assert_predicate testpath/"registry/filebeat", :exist?
assert_path_exists testpath/"meta.json"
assert_path_exists testpath/"registry/filebeat"
ensure
Process.kill("TERM", pid)
Process.wait(pid)
Expand Down
7 changes: 3 additions & 4 deletions Formula/h/heartbeat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

depends_on "go" => :build
depends_on "mage" => :build
depends_on "[email protected]" => :build

uses_from_macos "python" => :build
uses_from_macos "netcat" => :test

def install

Check failure on line 25 in Formula/h/heartbeat.rb

View workflow job for this annotation

GitHub Actions / Linux

`brew install --verbose --formula --build-bottle heartbeat` failed on Linux!

mv /tmp/homebrew-unpack-20241216-14854-c5njxy/tools /tmp/heartbeat-20241216-14854-ry8pcp/tools mv /tmp/homebrew-unpack-20241216-14854-c5njxy/updatecli-compose.yaml /tmp/heartbeat-20241216-14854-ry8pcp/updatecli-compose.yaml mv /tmp/homebrew-unpack-20241216-14854-c5njxy/winlogbeat /tmp/heartbeat-20241216-14854-ry8pcp/winlogbeat mv /tmp/homebrew-unpack-20241216-14854-c5njxy/x-pack /tmp/heartbeat-20241216-14854-ry8pcp/x-pack ==> make PIP_INSTALL_PARAMS=--no-binary :all python-env error: subprocess-exited-with-error × Building wheel for grpcio (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [2858 lines of output] <string>:40: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html Found cython-generated files... running bdist_wheel running build running build_py running build_project_metadata creating pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_channel.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_utilities.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_grpcio_metadata.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_typing.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_simple_stubs.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_common.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_auth.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/__init__.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_compression.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_runtime_protos.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_interceptor.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_observability.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_server.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_plugin_wrapping.py -> pyb/lib.linux-x86_64-cpython-313/grpc creating pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_channel.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_typing.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_call.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_base_server.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/__init__.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_metadata.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_base_call.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_base_channel.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_interceptor.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_server.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_utils.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio creating pyb/lib.linux-x86_64-cpython-313/grpc/beta copying src/python/grpcio/grpc/beta/_server_adaptations.py -> pyb/lib.linux-x86_64-cpython-313/grpc/beta copying src/python/grpcio/grpc/beta/_client_adaptations.py -> pyb/lib.linux-x86_64-cpython-313/grpc/beta copying src/python/grpcio/grpc/beta/__init__.py -> pyb/lib.linux-x86_64-cpython-313/grpc/beta copying src/python/grpcio/grpc/beta/_metadata.py -> pyb/lib.linux-x86_64-cpython-313/grpc/beta copying src/python/grpcio/grpc/beta/interfaces.py -> pyb/lib.linux-x86_64-cpython-313/grpc/beta copying src/python/grpcio/grpc/beta/implementations.py -> pyb/lib.linux-x86_64-cpython-3
# remove non open source files
rm_r("x-pack")

Expand All @@ -33,7 +33,7 @@
ENV.deparallelize
system "mage", "-v", "update"

(etc/"heartbeat").install Dir["heartbeat.*", "fields.yml"]
pkgetc.install Dir["heartbeat.*", "fields.yml"]
(libexec/"bin").install "heartbeat"
end

Expand All @@ -47,8 +47,7 @@
"$@"
EOS

chmod 0555, bin/"heartbeat" # generate_completions_from_executable fails otherwise
generate_completions_from_executable(bin/"heartbeat", "completion", shells: [:bash, :zsh])
generate_completions_from_executable(libexec/"bin/heartbeat", "completion", shells: [:bash, :zsh])
end

def post_install
Expand Down
13 changes: 4 additions & 9 deletions Formula/p/packetbeat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

depends_on "go" => :build
depends_on "mage" => :build
depends_on "[email protected]" => :build

uses_from_macos "python" => :build
uses_from_macos "libpcap"

def install

Check failure on line 25 in Formula/p/packetbeat.rb

View workflow job for this annotation

GitHub Actions / Linux

`brew install --verbose --formula --build-bottle packetbeat` failed on Linux!

mv /tmp/homebrew-unpack-20241216-24200-4j7cnh/tools /tmp/packetbeat-20241216-24200-eemfzq/tools mv /tmp/homebrew-unpack-20241216-24200-4j7cnh/updatecli-compose.yaml /tmp/packetbeat-20241216-24200-eemfzq/updatecli-compose.yaml mv /tmp/homebrew-unpack-20241216-24200-4j7cnh/winlogbeat /tmp/packetbeat-20241216-24200-eemfzq/winlogbeat mv /tmp/homebrew-unpack-20241216-24200-4j7cnh/x-pack /tmp/packetbeat-20241216-24200-eemfzq/x-pack ==> make PIP_INSTALL_PARAMS=--no-binary :all python-env error: subprocess-exited-with-error × Building wheel for grpcio (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [2858 lines of output] <string>:40: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html Found cython-generated files... running bdist_wheel running build running build_py running build_project_metadata creating pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_channel.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_utilities.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_grpcio_metadata.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_typing.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_simple_stubs.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_common.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_auth.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/__init__.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_compression.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_runtime_protos.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_interceptor.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_observability.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_server.py -> pyb/lib.linux-x86_64-cpython-313/grpc copying src/python/grpcio/grpc/_plugin_wrapping.py -> pyb/lib.linux-x86_64-cpython-313/grpc creating pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_channel.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_typing.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_call.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_base_server.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/__init__.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_metadata.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_base_call.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_base_channel.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_interceptor.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_server.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio copying src/python/grpcio/grpc/aio/_utils.py -> pyb/lib.linux-x86_64-cpython-313/grpc/aio creating pyb/lib.linux-x86_64-cpython-313/grpc/beta copying src/python/grpcio/grpc/beta/_server_adaptations.py -> pyb/lib.linux-x86_64-cpython-313/grpc/beta copying src/python/grpcio/grpc/beta/_client_adaptations.py -> pyb/lib.linux-x86_64-cpython-313/grpc/beta copying src/python/grpcio/grpc/beta/__init__.py -> pyb/lib.linux-x86_64-cpython-313/grpc/beta copying src/python/grpcio/grpc/beta/_metadata.py -> pyb/lib.linux-x86_64-cpython-313/grpc/beta copying src/python/grpcio/grpc/beta/interfaces.py -> pyb/lib.linux-x86_64-cpython-313/grpc/beta copying src/python/grpcio/grpc/beta/implementations.py -> pyb/lib.linux-x86_64-cpyth
# remove non open source files
rm_r("x-pack")

Expand All @@ -35,7 +35,7 @@

inreplace "packetbeat.yml", "packetbeat.interfaces.device: any", "packetbeat.interfaces.device: en0"

(etc/"packetbeat").install Dir["packetbeat.*", "fields.yml"]
pkgetc.install Dir["packetbeat.*", "fields.yml"]
(libexec/"bin").install "packetbeat"
prefix.install "_meta/kibana"
end
Expand All @@ -50,20 +50,15 @@
"$@"
SH

chmod 0555, bin/"packetbeat" # generate_completions_from_executable fails otherwise
generate_completions_from_executable(bin/"packetbeat", "completion", shells: [:bash, :zsh])
generate_completions_from_executable(libexec/"bin/packetbeat", "completion", shells: [:bash, :zsh])
end

service do
run opt_bin/"packetbeat"
end

test do
eth = if OS.mac?
"en"
else
"eth"
end
eth = OS.mac? ? "en" : "eth"
assert_match "0: #{eth}0", shell_output("#{bin}/packetbeat devices")
assert_match version.to_s, shell_output("#{bin}/packetbeat version")
end
Expand Down
Loading