Skip to content

Commit

Permalink
packetbeat: use macos python
Browse files Browse the repository at this point in the history
  • Loading branch information
branchvincent committed Dec 16, 2024
1 parent 1544459 commit 7628972
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions Formula/p/packetbeat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class Packetbeat < Formula

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
Expand All @@ -35,7 +35,7 @@ def install

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 @@ def install
"$@"
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

0 comments on commit 7628972

Please sign in to comment.