From nobody Sun May 11 06:30:18 2025 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZwCXW0x4tz5wQht; Sun, 11 May 2025 06:30:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZwCXW0BS1z3db7; Sun, 11 May 2025 06:30:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746945019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M07bv2tPuPeTSGckPC/aziCrQFH45bVQCeEjpTp4FPI=; b=iwoHFoSi5FFzCVzq32tMcTNW/MFZgW0+Q+7C0blHD1lPqMZucFYnRAhKwH2xHPNrm0b/Ra VXhjoZu4YUMa8kn1WUqAz1JWLRZmo0f6+bQSriSteRRuAGe9pWwVdQlDt8YVMhP4JAz2ug qffT1U/F3jJA5akfKq/e33GbLiV8HOnEYj/tTC3w++eDhUM2Z9wtE16s8LKbNhlyA/IdRt Cz5FANR2iNxBEOS+1791+5Oiz4EqFoSNE/bY5i586ADVGc2UqBiXRFWG7KCvBD7jfWGmjP A7wgo0uvKk7hE0A/W2Du4ZokYPNqeRhuufnKf8Gk09njAugZ+1tX8lEWjqZ0zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746945019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M07bv2tPuPeTSGckPC/aziCrQFH45bVQCeEjpTp4FPI=; b=D61OWebakyTwJ6fp05XBJAHiqEuC4Ay1REA3DlVF2CLZzVrhcZs4NB8nuVj1hRLUCPRNT6 iDTXs4m1DCEeQgWnT+FnrlULqsYF1xUkWHgAobW6b2RCUeux0n1nzNsvUXHWTCQ+9cH7qO FWGT++QueT9TwxM+VW+nHkWdDP0ewA1pbL0nEsRIDN4MKCBwT12LsJ5tB3Gme3SvRNXYTC pzYHxp5p/RO+BdVRyGUNT4XWBXPI3IOja1Io7Vavz0NTuVD6n2WVUIDf7sKVMlmgSFxJ7Q 6OQhXmbwk3Rq6pcoCHGOQUT2yuGSejLBUg/Hw8OD2AeWBI9ZhsjhZMvYBS8FMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746945019; a=rsa-sha256; cv=none; b=vgdvp6mDn5YqAb6w4aXrTvysZ72jzYHVGi+b6hTH0BXfKbaa/mFV7QkyxFotts2UzCEGx7 8zMqsuWnQ67J/VpVrbf6IHVlL/9rIh0RrhYgJAsFus9+6yrfwPJAg+iqefakHcVQe7lwPy gAX1HrZCdL40RziDQmANA33zndOmkDPugnTPra+eYYreKOzIrRspHHd4fTHQ8y7x7UbNV/ TTOClafSkUOEDftVPGY/39jIpYJ+6/teN5PJ3qC8DlpIrAo0XgkvWXfWe9Gw7bGB3FDJON 2cT1OeEIx5bfqRztJyxJKAFlBP7Zsu8bhXwv0//bQO+7gF+4L39NXjcvT2e56g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZwCXV6L0Vz4Nr; Sun, 11 May 2025 06:30:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54B6UISW078444; Sun, 11 May 2025 06:30:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54B6UIhU078441; Sun, 11 May 2025 06:30:18 GMT (envelope-from git) Date: Sun, 11 May 2025 06:30:18 GMT Message-Id: <202505110630.54B6UIhU078441@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jose Alonso Cardenas Marquez Subject: git: 759b193ef516 - main - textproc/opensearch-dashboards219: New port: Visualization dashboards for OpenSearch List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: acm X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 759b193ef516818f25e13640549fcd7105080f43 Auto-Submitted: auto-generated The branch main has been updated by acm: URL: https://cgit.FreeBSD.org/ports/commit/?id=759b193ef516818f25e13640549fcd7105080f43 commit 759b193ef516818f25e13640549fcd7105080f43 Author: Jose Alonso Cardenas Marquez AuthorDate: 2025-05-11 06:29:34 +0000 Commit: Jose Alonso Cardenas Marquez CommitDate: 2025-05-11 06:29:34 +0000 textproc/opensearch-dashboards219: New port: Visualization dashboards for OpenSearch OpenSearch Dashboards is the default visualization tool for data in OpenSearch. It also serves as a user interface for many of the OpenSearch plugins, including security, alerting, Index State Management, SQL, and more. --- textproc/Makefile | 1 + textproc/opensearch-dashboards219/Makefile | 92 ++++++++++++++++++++++ textproc/opensearch-dashboards219/distinfo | 5 ++ .../files/opensearch-dashboards.in | 79 +++++++++++++++++++ .../files/pkg-deinstall.in | 20 +++++ textproc/opensearch-dashboards219/pkg-descr | 3 + 6 files changed, 200 insertions(+) diff --git a/textproc/Makefile b/textproc/Makefile index c65b9057068a..ea1e5af14694 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -522,6 +522,7 @@ SUBDIR += opensearch-dashboards210 SUBDIR += opensearch-dashboards213 SUBDIR += opensearch-dashboards216 + SUBDIR += opensearch-dashboards219 SUBDIR += opensearch13 SUBDIR += opensearch210 SUBDIR += opensearch213 diff --git a/textproc/opensearch-dashboards219/Makefile b/textproc/opensearch-dashboards219/Makefile new file mode 100644 index 000000000000..dfe6740216b9 --- /dev/null +++ b/textproc/opensearch-dashboards219/Makefile @@ -0,0 +1,92 @@ +PORTNAME= opensearch-dashboards +DISTVERSION= 2.19.1 +DISTVERSIONSUFFIX= -linux-${OPENSEARCH_ARCH} +CATEGORIES= textproc www +MASTER_SITES= https://artifacts.opensearch.org/releases/bundle/${PORTNAME}/${DISTVERSION}/ +PKGNAMESUFFIX= 219 + +MAINTAINER= opensearch@FreeBSD.org +COMMENT= Visualization dashboards for OpenSearch +WWW= https://opensearch.org + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +ONLY_FOR_ARCHS= aarch64 amd64 + +CONFLICTS= opensearch-dashboards opensearch-dashboards210 opensearch-dashboards213 \ + opensearch-dashboards216 + +BUILD_DEPENDS= npm-node18>0:www/npm-node18 + +USES= nodejs:18,build,run python:build +USE_RC_SUBR= ${PORTNAME} + +SUB_FILES= pkg-deinstall +SUB_LIST= PORTNAME="${PORTNAME}" \ + PKGNAMESUFFIX="${PKGNAMESUFFIX}" \ + WWWDIR=${WWWDIR} + +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} + +NODE_VER= 18.18.0 +NO_BUILD= yes + +_DEVDIR= ${WRKDIR}/.devdir + +.include + +.if ${ARCH} == "aarch64" +OPENSEARCH_ARCH= arm64 +.else +OPENSEARCH_ARCH= x64 +.endif + +post-patch: + @${REINPLACE_CMD} -e 's|14.20.1|${NODE_VER}|g' ${WRKSRC}/package.json + ${RM} \ + ${WRKSRC}/bin/*.orig \ + ${WRKSRC}/bin/*.bak \ + ${WRKSRC}/package.json.bak + ${RM} -r ${WRKSRC}/plugins/reportsDashboards/.chromium + +do-install: + ${MKDIR} ${STAGEDIR}${WWWDIR} ${STAGEDIR}${ETCDIR} + ${INSTALL_DATA} ${WRKSRC}/config/opensearch_dashboards.yml ${STAGEDIR}${ETCDIR}/opensearch_dashboards.yml.sample + (cd ${WRKSRC} && \ + ${COPYTREE_SHARE} "data node_modules package.json plugins src" ${STAGEDIR}${WWWDIR} && \ + ${COPYTREE_BIN} bin ${STAGEDIR}${WWWDIR}) + +post-install: + ${ECHO} "@sample ${ETCDIR}/opensearch_dashboards.yml.sample" >> ${TMPPLIST} + ${FIND} -s ${STAGEDIR}${WWWDIR} -not -type d | ${SORT} | \ + ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} + ${ECHO} "@dir(www,www) ${WWWDIR}/data" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/reportsDashboards/node_modules/set-interval-async/test/resources/legacy" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/reportsDashboards/node_modules/set-interval-async/test/resources/fixed" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/reportsDashboards/node_modules/set-interval-async/test/resources/dynamic" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/reportsDashboards/node_modules/set-interval-async/examples/fixed" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/reportsDashboards/node_modules/set-interval-async/examples/dynamic" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/observabilityDashboards/server/adaptors/integrations/__test__" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/observabilityDashboards/server/adaptors/integrations/repository/__test__" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/securityAnalyticsDashboards/test/mocks/Alerts/components/AlertFlyout" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/securityAnalyticsDashboards/test/mocks/CreateDetector/components/ConfigureAlerts/components/AlertCondition" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/securityAnalyticsDashboards/test/mocks/Detectors/components/AlertTriggerView" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/securityAnalyticsDashboards/test/mocks/Detectors/components/DetectorBasicDetailsView" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/securityAnalyticsDashboards/test/mocks/Detectors/components/DetectorRulesView" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/securityAnalyticsDashboards/test/mocks/Detectors/components/FieldMappingsView" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/securityAnalyticsDashboards/test/mocks/Detectors/components/UpdateAlertConditions" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/securityAnalyticsDashboards/test/mocks/Detectors/components/UpdateDetectorBasicDetails" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/securityAnalyticsDashboards/test/mocks/Detectors/components/UpdateDetectorRules" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/securityAnalyticsDashboards/test/mocks/Detectors/components/UpdateFieldMappings" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/securityAnalyticsDashboards/test/mocks/Detectors/containers/AlertTriggersView" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/securityAnalyticsDashboards/test/mocks/Detectors/containers/DetectorDetails" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/securityAnalyticsDashboards/test/mocks/Detectors/containers/DetectorDetailsView" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/securityAnalyticsDashboards/test/mocks/Detectors/containers/Detectors" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/securityAnalyticsDashboards/test/mocks/Detectors/containers/EditFieldMappings" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/securityAnalyticsDashboards/test/mocks/Rules/components/DeleteModal" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/securityAnalyticsDashboards/test/mocks/Rules/components/RuleEditor/components" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/securityAnalyticsDashboards/test/mocks/Rules/components/RulesTable" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins/securityDashboards/server/multitenancy/test" >> ${TMPPLIST} + +.include diff --git a/textproc/opensearch-dashboards219/distinfo b/textproc/opensearch-dashboards219/distinfo new file mode 100644 index 000000000000..28a08b40f649 --- /dev/null +++ b/textproc/opensearch-dashboards219/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1746944520 +SHA256 (opensearch-dashboards-2.19.1-linux-arm64.tar.gz) = b73be280109669a412de8e620dc1090c02850f3675bb89e56ff6d1031dd1847c +SIZE (opensearch-dashboards-2.19.1-linux-arm64.tar.gz) = 348067725 +SHA256 (opensearch-dashboards-2.19.1-linux-x64.tar.gz) = 3981a0bde67bf81b7c32541dff3965b0f7d341a0af0951b73767eab6ccf56261 +SIZE (opensearch-dashboards-2.19.1-linux-x64.tar.gz) = 348191923 diff --git a/textproc/opensearch-dashboards219/files/opensearch-dashboards.in b/textproc/opensearch-dashboards219/files/opensearch-dashboards.in new file mode 100644 index 000000000000..7043fa9301a9 --- /dev/null +++ b/textproc/opensearch-dashboards219/files/opensearch-dashboards.in @@ -0,0 +1,79 @@ +#!/bin/sh + +# PROVIDE: opensearch_dashboards +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown + +. /etc/rc.subr + +name=opensearch_dashboards +rcvar=opensearch_dashboards_enable + +load_rc_config $name + +: ${opensearch_dashboards_enable:="NO"} +: ${opensearch_dashboards_config:="%%ETCDIR%%/opensearch_dashboards.yml"} +: ${opensearch_dashboards_user:="www"} +: ${opensearch_dashboards_group:="www"} +: ${opensearch_dashboards_log:="/var/log/opensearch_dashboards.log"} +: ${opensearch_dashboards_syslog_output_enable:="NO"} + +start_precmd="opensearch_dashboards_start_precmd" +reload_cmd="opensearch_dashboards_reload_cmd" +extra_commands="reload" + +if checkyesno opensearch_dashboards_syslog_output_enable; then + if [ -n "${opensearch_dashboards_syslog_output_tag}" ]; then + opensearch_dashboards_syslog_output_flags="-T ${opensearch_dashboards_syslog_output_tag}" + else + opensearch_dashboards_syslog_output_flags="-T ${name}" + fi + if [ -n "${opensearch_dashboards_syslog_output_priority}" ]; then + opensearch_dashboards_syslog_output_flags="${opensearch_dashboards_syslog_output_flags} -s ${opensearch_dashboards_syslog_output_priority}" + fi + if [ -n "${opensearch_dashboards_syslog_output_facility}" ]; then + opensearch_dashboards_syslog_output_flags="${opensearch_dashboards_syslog_output_flags} -l ${opensearch_dashboards_syslog_output_facility}" + fi +fi + +NODE="%%LOCALBASE%%/bin/node" + +required_files="${opensearch_dashboards_config}" +pidfile="/var/run/${name}.pid" + +command="/usr/sbin/daemon" +command_args="-f ${opensearch_dashboards_syslog_output_flags} -P ${pidfile} -t ${name} \ + /usr/bin/env NODE_ENV=production ${opensearch_dashboards_env} \ + ${NODE} %%WWWDIR%%/src/cli/dist serve \ + --config ${opensearch_dashboards_config} --log-file ${opensearch_dashboards_log} \ + ${opensearch_dashboards_args}" + +opensearch_dashboards_start_precmd() +{ + if [ ! -e "${pidfile}" ]; then + install -m 0600 -o ${opensearch_dashboards_user} -g ${opensearch_dashboards_group} /dev/null ${pidfile} + fi + if [ ! -f ${opensearch_dashboards_log} ]; then + install -o ${opensearch_dashboards_user} -g ${opensearch_dashboards_group} -m 640 /dev/null ${opensearch_dashboards_log} + fi + if [ ! -d %%WWWDIR%%/optimize ]; then + install -d -o ${opensearch_dashboards_user} -g ${opensearch_dashboards_group} %%WWWDIR%%/optimize + else + # We may have installed a plugin as root which will cause files in here + # to be owned by root:wheel. Fix with a chown. + chown -R ${opensearch_dashboards_user}:${opensearch_dashboards_group} %%WWWDIR%%/optimize + fi +} + +opensearch_dashboards_reload_cmd() +{ + if [ -z "$rc_pid" ]; then + _run_rc_notrunning + return 1 + else + pkill -HUP -P ${rc_pid} + fi +} + +run_rc_command "$1" diff --git a/textproc/opensearch-dashboards219/files/pkg-deinstall.in b/textproc/opensearch-dashboards219/files/pkg-deinstall.in new file mode 100644 index 000000000000..0699ab559805 --- /dev/null +++ b/textproc/opensearch-dashboards219/files/pkg-deinstall.in @@ -0,0 +1,20 @@ +#!/bin/sh + +case "$2" in +POST-DEINSTALL) + if [ -d %%WWWDIR%%/optimize ]; then + /usr/bin/find %%WWWDIR%%/optimize/ -delete + fi + + cat <