diff --git a/sysutils/beats94/Makefile b/sysutils/beats94/Makefile index d6cea96bb18d..8f9331a84b4a 100644 --- a/sysutils/beats94/Makefile +++ b/sysutils/beats94/Makefile @@ -1,144 +1,150 @@ PORTNAME= beats DISTVERSIONPREFIX= v -DISTVERSION= 9.4.1 -PORTREVISION= 5 +DISTVERSION= 9.4.7 CATEGORIES= sysutils MASTER_SITES= https://raw.githubusercontent.com/${GH_ACCOUNT}/${GH_PROJECT}/${DISTVERSIONFULL}/:gomod PKGNAMESUFFIX= ${DISTVERSION:R:S|.||} DISTFILES= go.mod:gomod MAINTAINER= elastic@FreeBSD.org COMMENT= Send logs, network, metrics and heartbeat to Elasticsearch or Logstash (${DISTVERSION:R}.x version) WWW= https://www.elastic.co/products/beats/ LICENSE= APACHE20 USES= go:modules USE_GITHUB= yes GH_ACCOUNT= elastic USE_RC_SUBR= ${GO_TARGET:S,./,,g} GO_MODULE= github.com/elastic/beats/v7 CGO_CFLAGS= -I. CGO_LDFLAGS= -L. MAKE_ENV= GOBUILD_FLAGS="-mod=vendor" CONFLICTS= ${PORTNAME}* PORTSCOUT= limit:^${DISTVERSION:R:S|.|\.|}\. SUB_FILES= pkg-message -OPTIONS_DEFINE= AUDITBEAT FILEBEAT HEARTBEAT METRICBEAT PACKETBEAT -.ifmake makesum || makeplist || distclean -OPTIONS_DEFAULT= ${OPTIONS_DEFINE} -.else OPTIONS_DEFAULT= FILEBEAT HEARTBEAT METRICBEAT -.endif +OPTIONS_MULTI= BEATS +OPTIONS_MULTI_BEATS= AUDITBEAT FILEBEAT HEARTBEAT METRICBEAT PACKETBEAT OPTIONS_SUB= yes AUDITBEAT_DESC= Auditbeat +BEATS_DESC= Beats modules FILEBEAT_DESC= Filebeat HEARTBEAT_DESC= Heartbeat METRICBEAT_DESC= Metricbeat PACKETBEAT_DESC= Packetbeat AUDITBEAT_MASTER_SITES= https://artifacts.elastic.co/downloads/beats/auditbeat/:auditbeat \ ${LOCAL_MASTER_SITES:S|$|:auditbeat|} AUDITBEAT_DISTFILES= auditbeat-${DISTVERSION}-darwin-x86_64.tar.gz:auditbeat AUDITBEAT_VARS= GO_TARGET+=./auditbeat FILEBEAT_MASTER_SITES= https://artifacts.elastic.co/downloads/beats/filebeat/:filebeat \ ${LOCAL_MASTER_SITES:S|$|:filebeat|} FILEBEAT_DISTFILES= filebeat-${DISTVERSION}-darwin-x86_64.tar.gz:filebeat FILEBEAT_VARS= GO_TARGET+=./filebeat HEARTBEAT_MASTER_SITES= https://artifacts.elastic.co/downloads/beats/heartbeat/:heartbeat \ ${LOCAL_MASTER_SITES:S|$|:heartbeat|} HEARTBEAT_DISTFILES= heartbeat-${DISTVERSION}-darwin-x86_64.tar.gz:heartbeat HEARTBEAT_VARS= GO_TARGET+=./heartbeat METRICBEAT_MASTER_SITES= https://artifacts.elastic.co/downloads/beats/metricbeat/:metricbeat \ ${LOCAL_MASTER_SITES:S|$|:metricbeat|} METRICBEAT_DISTFILES= metricbeat-${DISTVERSION}-darwin-x86_64.tar.gz:metricbeat METRICBEAT_VARS= GO_TARGET+=./metricbeat PACKETBEAT_MASTER_SITES= https://artifacts.elastic.co/downloads/beats/packetbeat/:packetbeat \ ${LOCAL_MASTER_SITES:S|$|:packetbeat|} PACKETBEAT_DISTFILES= packetbeat-${DISTVERSION}-darwin-x86_64.tar.gz:packetbeat PACKETBEAT_VARS= CGO_CFLAGS+=-I/usr/include \ CGO_LDFLAGS+=-L/usr/lib \ GO_TARGET+=./packetbeat LOCAL_MASTER_SITES= LOCAL/vvd/elastic .include +.ifmake makesum || makesum-fetch || makeplist || distclean +. for O in ${OPTIONS_MULTI_BEATS} +. if !${PORT_OPTIONS:M${O}} +MASTER_SITES+= ${${O}_MASTER_SITES} +DISTFILES+= ${${O}_DISTFILES} +. endif +. endfor +.endif + post-patch: ${REINPLACE_CMD} -e "s|%%BEATSVERSION%%|v${DISTVERSION}|g" ${WRKSRC}/dev-tools/mage/settings.go .for BEATMOD in ${GO_TARGET:S,^./,,g} ${REINPLACE_CMD} -e "s|%%DATADIR%%|${DATADIR}|g" ${WRKSRC}/${BEATMOD}/*.yml .endfor do-install: ${MKDIR} ${STAGEDIR}${ETCDIR} .for BEATMOD in ${GO_TARGET:S,^./,,g} (${MKDIR} ${STAGEDIR}/var/db/beats/${BEATMOD} && \ ${INSTALL_PROGRAM} ${WRKDIR}/bin/${BEATMOD} \ ${STAGEDIR}${PREFIX}/sbin && \ ${INSTALL_DATA} ${WRKSRC}/${BEATMOD}/${BEATMOD}.yml \ ${STAGEDIR}${ETCDIR}/${BEATMOD}.yml.sample && \ ${INSTALL_DATA} ${WRKSRC}/${BEATMOD}/${BEATMOD}.reference.yml \ ${STAGEDIR}${ETCDIR}/${BEATMOD}.yml.reference) (MODULE_SRC=${WRKDIR}/${BEATMOD}-${DISTVERSION}-darwin-x86_64/module; \ if [ -d $${MODULE_SRC} ]; then \ MODULE_DEST=${STAGEDIR}${DATADIR}/${BEATMOD}/module && \ ${MKDIR} $${MODULE_DEST} && \ cd $${MODULE_SRC} && ${COPYTREE_SHARE} . $${MODULE_DEST} && \ cd $${MODULE_DEST} && \ ${FIND} . -type d -empty | ${SORT} | \ ${SED} -e 's,^\.,@dir ${DATADIR_REL}/${BEATMOD}/module,' >> ${TMPPLIST} && \ ${FIND} . -not -type d | ${SORT} | \ ${SED} -e 's,^\.,${DATADIR_REL}/${BEATMOD}/module,' >> ${TMPPLIST}; \ fi) && \ (MODULESD_SRC=${WRKDIR}/${BEATMOD}-${DISTVERSION}-darwin-x86_64/modules.d; \ if [ -d $${MODULESD_SRC} ]; then \ MODULESD_DEST=${STAGEDIR}${EXAMPLESDIR}/${BEATMOD}.modules.d && \ ${MKDIR} $${MODULESD_DEST} && \ cd $${MODULESD_SRC} && ${COPYTREE_SHARE} . $${MODULESD_DEST} && \ cd $${MODULESD_DEST} && \ ${FIND} . -type d -empty | ${SORT} | \ ${SED} -e 's,^\.,@dir ${EXAMPLESDIR_REL}/${BEATMOD}.modules.d,' >> ${TMPPLIST} && \ ${FIND} . -not -type d | ${SORT} | \ ${SED} -e 's,^\.,${EXAMPLESDIR_REL}/${BEATMOD}.modules.d,' >> ${TMPPLIST}; \ ${MKDIR} ${STAGEDIR}${ETCDIR}/${BEATMOD}.modules.d && \ ${ECHO_CMD} "The modules.d files are now in ${EXAMPLESDIR}/${BEATMOD}.modules.d" > \ ${STAGEDIR}${ETCDIR}/${BEATMOD}.modules.d/README; \ ${ECHO_CMD} ${ETCDIR_REL}/${BEATMOD}.modules.d/README >> ${TMPPLIST}; \ fi) && \ (MONITORSD_SRC=${WRKDIR}/${BEATMOD}-${DISTVERSION}-darwin-x86_64/monitors.d; \ if [ -d $${MONITORSD_SRC} ]; then \ MONITORSD_DEST=${STAGEDIR}${EXAMPLESDIR}/${BEATMOD}.monitors.d && \ ${MKDIR} $${MONITORSD_DEST} && \ cd $${MONITORSD_SRC} && ${COPYTREE_SHARE} . $${MONITORSD_DEST} && \ cd $${MONITORSD_DEST} && \ ${FIND} . -type d -empty | ${SORT} | \ ${SED} -e 's,^\.,@dir ${EXAMPLESDIR_REL}/${BEATMOD}.monitors.d,' >> ${TMPPLIST} && \ ${FIND} . -not -type d | ${SORT} | \ ${SED} -e 's,^\.,${EXAMPLESDIR_REL}/${BEATMOD}.monitors.d,' >> ${TMPPLIST}; \ ${MKDIR} ${STAGEDIR}${ETCDIR}/${BEATMOD}.monitors.d && \ ${ECHO_CMD} "The monitors.d files are now in ${EXAMPLESDIR}/${BEATMOD}.monitors.d" > \ ${STAGEDIR}${ETCDIR}/${BEATMOD}.monitors.d/README; \ ${ECHO_CMD} ${ETCDIR_REL}/${BEATMOD}.monitors.d/README >> ${TMPPLIST}; \ fi) && \ (KIBANA_SRC=${WRKDIR}/${BEATMOD}-${DISTVERSION}-darwin-x86_64/kibana; \ if [ -d $${KIBANA_SRC} ]; then \ KIBANA_PATH=${STAGEDIR}${DATADIR}/${BEATMOD}/kibana; \ ${MKDIR} $${KIBANA_PATH} && \ cd $${KIBANA_SRC} && ${COPYTREE_SHARE} . $${KIBANA_PATH}; \ cd $${KIBANA_PATH} && \ ${FIND} . -type d -empty | ${SORT} | \ ${SED} -e 's,^\.,@dir ${DATADIR_REL}/${BEATMOD}/kibana,' >> ${TMPPLIST}; \ ${FIND} . -not -type d | ${SORT} | \ ${SED} -e 's,^\.,${DATADIR_REL}/${BEATMOD}/kibana,' >> ${TMPPLIST}; \ fi) .endfor .include diff --git a/sysutils/beats94/distinfo b/sysutils/beats94/distinfo index 766a2a7e7d1d..6aea95b11ce6 100644 --- a/sysutils/beats94/distinfo +++ b/sysutils/beats94/distinfo @@ -1,15 +1,15 @@ -TIMESTAMP = 1779200000 -SHA256 (go/sysutils_beats94/elastic-beats-v9.4.1_GH0/go.mod) = c4b75713ab2a38abb61ac150608c5405c394262835b7c4659be75a70880e62da -SIZE (go/sysutils_beats94/elastic-beats-v9.4.1_GH0/go.mod) = 30590 -SHA256 (go/sysutils_beats94/elastic-beats-v9.4.1_GH0/auditbeat-9.4.1-darwin-x86_64.tar.gz) = 8df7208691946440684279fe0af161d196b862d2ea3352f7e2ea388cba3a9e7e -SIZE (go/sysutils_beats94/elastic-beats-v9.4.1_GH0/auditbeat-9.4.1-darwin-x86_64.tar.gz) = 35878374 -SHA256 (go/sysutils_beats94/elastic-beats-v9.4.1_GH0/filebeat-9.4.1-darwin-x86_64.tar.gz) = 795fec964872e73def9173946b554956bea4da66eab1e57a876d6b50913721a6 -SIZE (go/sysutils_beats94/elastic-beats-v9.4.1_GH0/filebeat-9.4.1-darwin-x86_64.tar.gz) = 56672180 -SHA256 (go/sysutils_beats94/elastic-beats-v9.4.1_GH0/heartbeat-9.4.1-darwin-x86_64.tar.gz) = cc75b64981aa46298f652107234a68f123d99e93f62390a25d14f47c63d7bea2 -SIZE (go/sysutils_beats94/elastic-beats-v9.4.1_GH0/heartbeat-9.4.1-darwin-x86_64.tar.gz) = 35657675 -SHA256 (go/sysutils_beats94/elastic-beats-v9.4.1_GH0/metricbeat-9.4.1-darwin-x86_64.tar.gz) = c27ca1f986880899b5d0ea13f097b38dd18be725069591b337528e0aa4d1f3e3 -SIZE (go/sysutils_beats94/elastic-beats-v9.4.1_GH0/metricbeat-9.4.1-darwin-x86_64.tar.gz) = 60356918 -SHA256 (go/sysutils_beats94/elastic-beats-v9.4.1_GH0/packetbeat-9.4.1-darwin-x86_64.tar.gz) = 1f19f96e87c46e0676becf1b95fa6a0d81d958441cf083e3d5c54fc5944aa71f -SIZE (go/sysutils_beats94/elastic-beats-v9.4.1_GH0/packetbeat-9.4.1-darwin-x86_64.tar.gz) = 36879790 -SHA256 (go/sysutils_beats94/elastic-beats-v9.4.1_GH0/elastic-beats-v9.4.1_GH0.tar.gz) = 491dea3aa471e58094d457c50dd9dc294e2d7fd4af7a99119848b3e50dafb0da -SIZE (go/sysutils_beats94/elastic-beats-v9.4.1_GH0/elastic-beats-v9.4.1_GH0.tar.gz) = 105680822 +TIMESTAMP = 1790000000 +SHA256 (go/sysutils_beats94/elastic-beats-v9.4.7_GH0/go.mod) = a9d44f69e79470565dd3858cb30172e296cf62f71fcc968debc6677bd7719735 +SIZE (go/sysutils_beats94/elastic-beats-v9.4.7_GH0/go.mod) = 32072 +SHA256 (go/sysutils_beats94/elastic-beats-v9.4.7_GH0/filebeat-9.4.7-darwin-x86_64.tar.gz) = 5ee49f7aa9bd7db48154a8aceee62d6f6ea6acee42a6e0b69627be94d963e8f6 +SIZE (go/sysutils_beats94/elastic-beats-v9.4.7_GH0/filebeat-9.4.7-darwin-x86_64.tar.gz) = 57838979 +SHA256 (go/sysutils_beats94/elastic-beats-v9.4.7_GH0/heartbeat-9.4.7-darwin-x86_64.tar.gz) = ca8616c1aab151b219080a5a03152a931d197576b56d0dcfd19df6366dce7a5a +SIZE (go/sysutils_beats94/elastic-beats-v9.4.7_GH0/heartbeat-9.4.7-darwin-x86_64.tar.gz) = 35767227 +SHA256 (go/sysutils_beats94/elastic-beats-v9.4.7_GH0/metricbeat-9.4.7-darwin-x86_64.tar.gz) = c6d25f4655f4fd4265bf36e46a5f0f01912cf7cb68a83c85f4a73a47e84f1509 +SIZE (go/sysutils_beats94/elastic-beats-v9.4.7_GH0/metricbeat-9.4.7-darwin-x86_64.tar.gz) = 61513680 +SHA256 (go/sysutils_beats94/elastic-beats-v9.4.7_GH0/auditbeat-9.4.7-darwin-x86_64.tar.gz) = db083347c0a0c22fe8d5967c32444e27f95598f96d6b1043a9527807555857dd +SIZE (go/sysutils_beats94/elastic-beats-v9.4.7_GH0/auditbeat-9.4.7-darwin-x86_64.tar.gz) = 36207494 +SHA256 (go/sysutils_beats94/elastic-beats-v9.4.7_GH0/packetbeat-9.4.7-darwin-x86_64.tar.gz) = b88ebd109be7cb129f97ef15ecef9953178c83e33c6f83e1f57ebeb31ea41d8c +SIZE (go/sysutils_beats94/elastic-beats-v9.4.7_GH0/packetbeat-9.4.7-darwin-x86_64.tar.gz) = 37219181 +SHA256 (go/sysutils_beats94/elastic-beats-v9.4.7_GH0/elastic-beats-v9.4.7_GH0.tar.gz) = 66f8e316c10cad7d134ffd28439dc65c6324ddea1ce0881864eb8d65971761fc +SIZE (go/sysutils_beats94/elastic-beats-v9.4.7_GH0/elastic-beats-v9.4.7_GH0.tar.gz) = 106014727 diff --git a/sysutils/beats94/files/patch-dev-tools_mage_settings.go b/sysutils/beats94/files/patch-dev-tools_mage_settings.go index 4e23ea1aa6f2..8c398d1faa21 100644 --- a/sysutils/beats94/files/patch-dev-tools_mage_settings.go +++ b/sysutils/beats94/files/patch-dev-tools_mage_settings.go @@ -1,20 +1,20 @@ ---- dev-tools/mage/settings.go.orig 2026-02-23 21:59:26 UTC +--- dev-tools/mage/settings.go.orig 2026-09-09 20:15:21 UTC +++ dev-tools/mage/settings.go -@@ -31,7 +31,6 @@ import ( +@@ -32,7 +32,6 @@ import ( "sync" "time" - "github.com/magefile/mage/sh" "golang.org/x/text/cases" "golang.org/x/text/language" "gopkg.in/yaml.v3" -@@ -282,7 +281,8 @@ func CommitHash() (string, error) { +@@ -280,7 +279,8 @@ func CommitHash() (string, error) { func CommitHash() (string, error) { var err error commitHashOnce.Do(func() { - commitHash, err = sh.Output("git", "rev-parse", "HEAD") + err = nil + commitHash = "%%BEATSVERSION%%" }) return commitHash, err } diff --git a/sysutils/beats94/files/patch-filebeat_filebeat.reference.yml b/sysutils/beats94/files/patch-filebeat_filebeat.reference.yml index 264dee0be250..f8d9de9d69ab 100644 --- a/sysutils/beats94/files/patch-filebeat_filebeat.reference.yml +++ b/sysutils/beats94/files/patch-filebeat_filebeat.reference.yml @@ -1,26 +1,26 @@ ---- filebeat/filebeat.reference.yml.orig 2026-02-23 21:59:26 UTC +--- filebeat/filebeat.reference.yml.orig 2026-09-09 20:15:21 UTC +++ filebeat/filebeat.reference.yml -@@ -1384,12 +1384,12 @@ - type: filestream +@@ -1465,12 +1465,12 @@ - type: filestream #filebeat.config: #inputs: #enabled: false - #path: inputs.d/*.yml + #path: filebeat.inputs.d/*.yml #reload.enabled: true #reload.period: 10s #modules: #enabled: true - #path: modules.d/*.yml + #path: filebeat.modules.d/*.yml #reload.enabled: true #reload.period: 10s -@@ -2463,7 +2463,7 @@ output.elasticsearch: +@@ -2544,7 +2544,7 @@ output.elasticsearch: # The directory from where to read the dashboards. The default is the `kibana` # folder in the home path. -#setup.dashboards.directory: ${path.home}/kibana +#setup.dashboards.directory: %%DATADIR%%/filebeat/kibana # The URL from where to download the dashboard archive. It is used instead of # the directory if it has a value. diff --git a/sysutils/beats94/files/patch-libbeat_autodiscover_providers_docker_docker.go b/sysutils/beats94/files/patch-libbeat_autodiscover_providers_docker_docker.go index 742bfc1be1c7..3a5391a3167c 100644 --- a/sysutils/beats94/files/patch-libbeat_autodiscover_providers_docker_docker.go +++ b/sysutils/beats94/files/patch-libbeat_autodiscover_providers_docker_docker.go @@ -1,20 +1,20 @@ ---- libbeat/autodiscover/providers/docker/docker.go.orig 2026-02-23 21:59:26 UTC +--- libbeat/autodiscover/providers/docker/docker.go.orig 2026-09-09 20:15:21 UTC +++ libbeat/autodiscover/providers/docker/docker.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -//go:build linux || darwin || windows +//go:build linux || darwin || windows || freebsd package docker -@@ -32,7 +32,7 @@ import ( +@@ -33,7 +33,7 @@ import ( "github.com/elastic/beats/v7/libbeat/common" - "github.com/elastic/elastic-agent-autodiscover/bus" -- "github.com/elastic/elastic-agent-autodiscover/docker" -+ docker "github.com/elastic/elastic-agent-autodiscover/docker" - "github.com/elastic/elastic-agent-autodiscover/utils" + "github.com/elastic/beats/v7/pkg/autodiscover/bus" +- "github.com/elastic/beats/v7/pkg/autodiscover/docker" ++ docker "github.com/elastic/beats/v7/pkg/autodiscover/docker" + "github.com/elastic/beats/v7/pkg/autodiscover/utils" "github.com/elastic/elastic-agent-libs/config" "github.com/elastic/elastic-agent-libs/keystore" diff --git a/sysutils/beats94/files/patch-libbeat_scripts_Makefile b/sysutils/beats94/files/patch-libbeat_scripts_Makefile index a84103ea085d..0aa05a339e4e 100644 --- a/sysutils/beats94/files/patch-libbeat_scripts_Makefile +++ b/sysutils/beats94/files/patch-libbeat_scripts_Makefile @@ -1,26 +1,26 @@ ---- libbeat/scripts/Makefile.orig 2026-02-23 21:59:26 UTC +--- libbeat/scripts/Makefile.orig 2026-09-09 20:15:21 UTC +++ libbeat/scripts/Makefile @@ -47,7 +47,7 @@ GOPACKAGES_STRESSTESTS=$(shell find . -type d \( -name 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 . -type d \( -name "stress" \) 2>/dev/null) -SHELL=bash +SHELL=sh ES_HOST?=elasticsearch ES_PORT?=9200 ES_USER?=beats -@@ -336,12 +336,12 @@ update: python-env fields collect config ## @build Upd - update: python-env fields collect config ## @build Update expects the most recent version of libbeat in the GOPATH +@@ -336,12 +336,12 @@ update: fields collect config ## @build Update expects + update: 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_NAME} ${ES_BEATS} --output_path $(ES_BEATS)/docs/reference/${BEAT_NAME} + @mage fieldDocs diff --git a/sysutils/beats94/files/patch-metricbeat_module_docker_docker.go b/sysutils/beats94/files/patch-metricbeat_module_docker_docker.go new file mode 100644 index 000000000000..f7ba3cf6337b --- /dev/null +++ b/sysutils/beats94/files/patch-metricbeat_module_docker_docker.go @@ -0,0 +1,11 @@ +--- metricbeat/module/docker/docker.go.orig 2026-09-09 20:15:21 UTC ++++ metricbeat/module/docker/docker.go +@@ -15,7 +15,7 @@ + // specific language governing permissions and limitations + // under the License. + +-//go:build linux || darwin || windows ++//go:build linux || darwin || windows || freebsd + + package docker + diff --git a/sysutils/beats94/files/patch-pkg_autodiscover_docker_client.go b/sysutils/beats94/files/patch-pkg_autodiscover_docker_client.go new file mode 100644 index 000000000000..24e40661dbcb --- /dev/null +++ b/sysutils/beats94/files/patch-pkg_autodiscover_docker_client.go @@ -0,0 +1,11 @@ +--- pkg/autodiscover/docker/client.go.orig 2026-09-09 20:15:21 UTC ++++ pkg/autodiscover/docker/client.go +@@ -15,7 +15,7 @@ + // specific language governing permissions and limitations + // under the License. + +-//go:build linux || darwin || windows ++//go:build linux || darwin || windows || freebsd + + package docker + diff --git a/sysutils/beats94/files/patch-pkg_autodiscover_docker_client__test.go b/sysutils/beats94/files/patch-pkg_autodiscover_docker_client__test.go new file mode 100644 index 000000000000..8c5a47ba6bae --- /dev/null +++ b/sysutils/beats94/files/patch-pkg_autodiscover_docker_client__test.go @@ -0,0 +1,11 @@ +--- pkg/autodiscover/docker/client_test.go.orig 2026-09-09 20:15:21 UTC ++++ pkg/autodiscover/docker/client_test.go +@@ -15,7 +15,7 @@ + // specific language governing permissions and limitations + // under the License. + +-//go:build integration && (linux || darwin || windows) ++//go:build integration && (linux || darwin || windows || freebsd) + + package docker + diff --git a/sysutils/beats94/files/patch-pkg_autodiscover_docker_watcher.go b/sysutils/beats94/files/patch-pkg_autodiscover_docker_watcher.go new file mode 100644 index 000000000000..27804658d157 --- /dev/null +++ b/sysutils/beats94/files/patch-pkg_autodiscover_docker_watcher.go @@ -0,0 +1,11 @@ +--- pkg/autodiscover/docker/watcher.go.orig 2026-09-09 20:15:21 UTC ++++ pkg/autodiscover/docker/watcher.go +@@ -15,7 +15,7 @@ + // specific language governing permissions and limitations + // under the License. + +-//go:build linux || darwin || windows ++//go:build linux || darwin || windows || freebsd + + package docker + diff --git a/sysutils/beats94/files/patch-pkg_autodiscover_docker_watcher__test.go b/sysutils/beats94/files/patch-pkg_autodiscover_docker_watcher__test.go new file mode 100644 index 000000000000..d0a9f6946098 --- /dev/null +++ b/sysutils/beats94/files/patch-pkg_autodiscover_docker_watcher__test.go @@ -0,0 +1,11 @@ +--- pkg/autodiscover/docker/watcher_test.go.orig 2026-09-09 20:15:21 UTC ++++ pkg/autodiscover/docker/watcher_test.go +@@ -15,7 +15,7 @@ + // specific language governing permissions and limitations + // under the License. + +-//go:build linux || darwin || windows ++//go:build linux || darwin || windows || freebsd + + package docker + diff --git a/sysutils/beats94/files/patch-vendor_github.com_elastic_elastic-agent-autodiscover_docker_client.go b/sysutils/beats94/files/patch-vendor_github.com_elastic_elastic-agent-autodiscover_docker_client.go deleted file mode 100644 index c2e25aab9f45..000000000000 --- a/sysutils/beats94/files/patch-vendor_github.com_elastic_elastic-agent-autodiscover_docker_client.go +++ /dev/null @@ -1,13 +0,0 @@ ---- vendor/github.com/elastic/elastic-agent-autodiscover/docker/client.go.orig 2026-03-16 23:39:27 UTC -+++ vendor/github.com/elastic/elastic-agent-autodiscover/docker/client.go -@@ -15,8 +15,8 @@ - // specific language governing permissions and limitations - // under the License. - --//go:build linux || darwin || windows --// +build linux darwin windows -+//go:build linux || darwin || windows || freebsd -+// +build linux darwin windows freebsd - - package docker - diff --git a/sysutils/beats94/files/patch-vendor_github.com_elastic_elastic-agent-autodiscover_docker_watcher.go b/sysutils/beats94/files/patch-vendor_github.com_elastic_elastic-agent-autodiscover_docker_watcher.go deleted file mode 100644 index 6797930ceb36..000000000000 --- a/sysutils/beats94/files/patch-vendor_github.com_elastic_elastic-agent-autodiscover_docker_watcher.go +++ /dev/null @@ -1,13 +0,0 @@ ---- vendor/github.com/elastic/elastic-agent-autodiscover/docker/watcher.go.orig 2026-03-16 23:39:27 UTC -+++ vendor/github.com/elastic/elastic-agent-autodiscover/docker/watcher.go -@@ -15,8 +15,8 @@ - // specific language governing permissions and limitations - // under the License. - --//go:build linux || darwin || windows --// +build linux darwin windows -+//go:build linux || darwin || windows || freebsd -+// +build linux darwin windows freebsd - - package docker - diff --git a/sysutils/beats94/files/patch-vendor_github.com_elastic_elastic-agent-system-metrics_metric_system_filesystem_filesystem__unix.go b/sysutils/beats94/files/patch-vendor_github.com_elastic_elastic-agent-system-metrics_metric_system_filesystem_filesystem__unix.go index 0ca0296af848..f727a2a15315 100644 --- a/sysutils/beats94/files/patch-vendor_github.com_elastic_elastic-agent-system-metrics_metric_system_filesystem_filesystem__unix.go +++ b/sysutils/beats94/files/patch-vendor_github.com_elastic_elastic-agent-system-metrics_metric_system_filesystem_filesystem__unix.go @@ -1,14 +1,14 @@ ---- vendor/github.com/elastic/elastic-agent-system-metrics/metric/system/filesystem/filesystem_unix.go.orig 2026-03-16 23:39:28 UTC +--- vendor/github.com/elastic/elastic-agent-system-metrics/metric/system/filesystem/filesystem_unix.go.orig 2026-09-21 00:00:00 UTC +++ vendor/github.com/elastic/elastic-agent-system-metrics/metric/system/filesystem/filesystem_unix.go -@@ -36,9 +36,9 @@ func (fs *FSStat) GetUsage() error { - - fs.Total = opt.UintWith(stat.Blocks).MultUint64OrNone(uint64(stat.Bsize)) - fs.Free = opt.UintWith(stat.Bfree).MultUint64OrNone(uint64(stat.Bsize)) -- fs.Avail = opt.UintWith(stat.Bavail).MultUint64OrNone(uint64(stat.Bsize)) -+ fs.Avail = opt.UintWith(uint64(stat.Bavail)).MultUint64OrNone(uint64(stat.Bsize)) +@@ -37,9 +37,9 @@ func (fs *FSStat) GetUsage() error { + blockSize := uint64(stat.Bsize) //nolint:gosec,nolintlint // G115 — statfs block size is non-negative + fs.Total = opt.UintWith(stat.Blocks).MultUint64OrNone(blockSize) + fs.Free = opt.UintWith(stat.Bfree).MultUint64OrNone(blockSize) +- fs.Avail = opt.UintWith(stat.Bavail).MultUint64OrNone(blockSize) ++ fs.Avail = opt.UintWith(uint64(stat.Bavail)).MultUint64OrNone(blockSize) fs.Files = opt.UintWith(stat.Files) - fs.FreeFiles = opt.UintWith(stat.Ffree) + fs.FreeFiles = opt.UintWith(uint64(stat.Ffree)) fs.fillMetrics() diff --git a/sysutils/beats94/files/patch-vendor_modules.txt b/sysutils/beats94/files/patch-vendor_modules.txt index cb10374bf864..9baf4fb6e6f3 100644 --- a/sysutils/beats94/files/patch-vendor_modules.txt +++ b/sysutils/beats94/files/patch-vendor_modules.txt @@ -1,10 +1,10 @@ ---- vendor/modules.txt.orig 2026-03-16 00:00:00 UTC +--- vendor/modules.txt.orig 2026-09-22 21:07:55 UTC +++ vendor/modules.txt -@@ -2021,6 +2021,7 @@ github.com/elastic/go-sysinfo/providers/darwin +@@ -2001,6 +2001,7 @@ github.com/elastic/go-sysinfo/providers/darwin github.com/elastic/go-sysinfo/internal/registry github.com/elastic/go-sysinfo/providers/aix github.com/elastic/go-sysinfo/providers/darwin +github.com/elastic/go-sysinfo/providers/freebsd github.com/elastic/go-sysinfo/providers/linux github.com/elastic/go-sysinfo/providers/shared github.com/elastic/go-sysinfo/providers/windows