freebsd-ports/sysutils/beats8/files/patch-libbeat_scripts_Makefile
Juraj Lutter c7e874cca9 sysutils/beats8: New port
Add sysutils/beats8, beats component for ELK 8.x.

There are many breaking changes in 8.x versions, see
https://www.elastic.co/guide/en/beats/libbeat/8.5/breaking-changes-8.0.html
for details.

Release notes for ELK 8.x are located here:
https://www.elastic.co/guide/en/beats/libbeat/8.5/release-notes.html
2022-11-26 22:03:17 +01:00

26 lines
1.5 KiB
Text

--- libbeat/scripts/Makefile.orig 2022-09-27 13:19:27 UTC
+++ libbeat/scripts/Makefile
@@ -47,7 +47,7 @@ GOFILES = $(shell find . -type f -name '*.go' 2>/dev/n
GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "*/vendor/*" 2>/dev/null)
GOFILES_ALL = $(GOFILES) $(shell find $(ES_BEATS) -type f -name '*.go' 2>/dev/null)
GOPACKAGES_STRESSTESTS=$(shell find . -name '*.go' 2>/dev/null | xargs grep -l '\+build.*stresstest' | xargs -n1 dirname | uniq)
-SHELL=bash
+SHELL=sh
ES_HOST?=elasticsearch
ES_PORT?=9200
ES_USER?=beats
@@ -352,12 +352,12 @@ ifndef EXCLUDE_COMMON_UPDATE_TARGET
update: python-env fields collect config ## @build Update expects the most recent version of libbeat in the GOPATH
@echo "Updating generated files for ${BEAT_NAME}"
-ifneq ($(shell [[ $(BEAT_NAME) == libbeat || $(BEAT_NAME) == metricbeat ]] && echo true ),true)
+ifneq ($(shell [[ $(BEAT_NAME) = libbeat || $(BEAT_NAME) = metricbeat ]] && echo true ),true)
mkdir -p include
go run ${INSTALL_FLAG} ${ES_BEATS}/dev-tools/cmd/asset/asset.go -license $(LICENSE) -pkg include -in fields.yml -out include/fields.go $(BEAT_NAME)
endif
-ifneq ($(shell [[ $(BEAT_NAME) == libbeat || $(BEAT_NAME) == metricbeat ]] && echo true ),true)
+ifneq ($(shell [[ $(BEAT_NAME) = libbeat || $(BEAT_NAME) = metricbeat ]] && echo true ),true)
@# Update docs
@mkdir -p docs
@${PYTHON_ENV_EXE} ${ES_BEATS}/libbeat/scripts/generate_fields_docs.py $(PWD)/fields.yml ${BEAT_TITLE} ${ES_BEATS}