Bug 286647 - textproc/opensearch update to 3.0
Summary: textproc/opensearch update to 3.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL: https://github.com/opensearch-project...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-07 11:57 UTC by Sven Ruediger
Modified: 2025-05-12 11:57 UTC (History)
3 users (show)

See Also:
admin: maintainer-feedback+


Attachments
update port to major 3.0 (4.03 KB, patch)
2025-05-07 11:57 UTC, Sven Ruediger
no flags Details | Diff
update port to major 3.0 (4.87 KB, patch)
2025-05-08 09:05 UTC, Sven Ruediger
admin: maintainer-approval-
Details | Diff
v1 (5.16 KB, patch)
2025-05-10 01:18 UTC, Vladimir Druzenko
vvd: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Ruediger 2025-05-07 11:57:44 UTC
Created attachment 260235 [details]
update port to major 3.0

This patch updates Opensearch to new major release 3.0
Comment 1 Sven Ruediger 2025-05-07 12:14:05 UTC
Created diff: https://reviews.freebsd.org/D50236
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 13:15:27 UTC
Comment on attachment 260235 [details]
update port to major 3.0

Are you from opensearch@ group?
Comment 3 Sven Ruediger 2025-05-07 13:17:18 UTC
(In reply to Vladimir Druzenko from comment #2)
correct
see: https://wiki.freebsd.org/OpenSearch
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 13:24:19 UTC
I see 2 committers in the group.
I can either take this PR or leave it for the committers in the group. What do you prefer?
Comment 5 Sven Ruediger 2025-05-07 13:27:19 UTC
The update has been successfully tested in a test environment.
Committing this patch right away would be nice. 

Thanks!
Comment 6 Juraj Lutter freebsd_committer freebsd_triage 2025-05-07 13:27:59 UTC
(In reply to Vladimir Druzenko from comment #4)
Just do it.
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 15:42:43 UTC
1. Keep "PORTREVISION?= 0" - used in slave ports.

2. After remove line "opensearch-security/whitelist.yml" you must remove "\" from previous line: "opensearch-security/tenants.yml \".

3. Are you sure about deletion from "config/jvm.options":
-21-:--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED
I just added to www/tomcat* ports options --add-opens=XXX - some applications fails without.

4. Warnings from portclippy:
# PORTNAME block
PORTNAME
DISTVERSION
+DISTVERSIONSUFFIX
PORTREVISION
-DISTVERSIONSUFFIX
CATEGORIES
MASTER_SITES
PKGNAMESUFFIX

# Maintainer block
MAINTAINER
COMMENT
WWW

# License block
LICENSE

# Dependencies
BUILD_DEPENDS
RUN_DEPENDS

-CONFLICTS

# USES block
USES
JAVA_VERSION
USE_RC_SUBR

# USES=shebangfix related variables
SHEBANG_FILES

# Conflicts
+CONFLICTS

# Standard bsd.port.mk variables
NO_BUILD

# WRKSRC block
WRKSRC

# Options definitions
OPTIONS_DEFINE
OPTIONS_DEFAULT

1, 2 and 4 I already fixed.
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 15:58:44 UTC
5. Replace PORTVERSION with DISTVERSION in WRKSRC:
-WRKSRC=         ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+WRKSRC=         ${WRKDIR}/${PORTNAME}-${DISTVERSION}
Comment 9 Sven Ruediger 2025-05-07 16:07:45 UTC
(In reply to Vladimir Druzenko from comment #7)
Thanks, 

for 2. the incubator module causes

WARNING: Using incubator modules: jdk.incubator.vector
WARNING: Unknown module: org.apache.arrow.memory.core specified to --add-opens
Comment 10 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 16:38:46 UTC
6. portlint -t
WARN: Makefile: [44]: use a tab (not space) after a variable name
WARN: Makefile: [60]: use a tab (not space) after a variable name
FATAL: Makefile: [75]: use a tab (not space) after a variable name

[44] PLUGINS_CONFIG_FILES?= \
[60] PLUGINS_CONFIG_FILES+= \
[75] PLUGINS_SAMPLE_CONFIG_FILES= \
Comment 11 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 16:46:48 UTC
(In reply to Sven Ruediger from comment #9)
Maybe replace with "--add-opens=java.base/java.nio=ALL-UNNAMED"?
Added in this commit:
https://github.com/opensearch-project/OpenSearch/commit/07cb4c9f17cfa86924e0457968cdd69d9ad84572

This option "work":
$ java --add-opens=java.base/java.nio=ALL-UNNAMED --version
openjdk 21.0.7 2025-04-15
OpenJDK Runtime Environment (build 21.0.7+6-1)
OpenJDK 64-Bit Server VM (build 21.0.7+6-1, mixed mode, sharing)
Comment 12 Sven Ruediger 2025-05-08 09:05:48 UTC
Created attachment 260256 [details]
update port to major 3.0

fixes lints
readded nio (-> readding experimental feature)
Comment 13 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-08 12:20:25 UTC
(In reply to Sven Ruediger from comment #12)
2. I think opensearch-security/whitelist.yml must be moved into block:
 .if ${PKGNAMESUFFIX} == "210" || ${PKGNAMESUFFIX} == "213" || ${PKGNAMESUFFIX} == "216"
 PLUGINS_CONFIG_FILES+=  \
                 opensearch-performance-analyzer/agent-stats-metadata \
                 opensearch-performance-analyzer/log4j2.xml \
                 opensearch-performance-analyzer/opensearch_security.policy \
                 opensearch-performance-analyzer/performance-analyzer.properties \
                 opensearch-performance-analyzer/plugin-stats-metadata \
                 opensearch-performance-analyzer/rca.conf \
                 opensearch-performance-analyzer/rca_idle_cluster_manager.conf \
                 opensearch-performance-analyzer/rca_cluster_manager.conf \
                 opensearch-performance-analyzer/supervisord.conf \
+                opensearch-security/whitelist.yml
 .endif
Comment 14 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-08 12:47:57 UTC
Slave ports (textproc/opensearch210, textproc/opensearch213, textproc/opensearch216) are broken:
===>  Patching for opensearch210-2.10.0_1
===>  Applying FreeBSD patches for opensearch210-2.10.0_1 from /usr/ports/textproc/opensearch210/../../textproc/opensearch/files
1 out of 3 hunks failed--saving rejects to config/jvm.options.rej
===>  FAILED Applying FreeBSD patch-config_jvm.options
===> FAILED to apply cleanly FreeBSD patch(es)  patch-config_jvm.options
*** Error code 1
Comment 15 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-08 12:55:11 UTC
(In reply to Sven Ruediger from comment #12)
In previous patch you removed "-XX:HeapDumpPath=data" from config/jvm.options, but in this patch - no. Is any reason or you forgot or it was mistake in 1st patch?
Comment 16 commit-hook freebsd_committer freebsd_triage 2025-05-09 21:22:21 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=812aa75d177edeb9897402b3133131ddf729b402

commit 812aa75d177edeb9897402b3133131ddf729b402
Author:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
AuthorDate: 2025-05-09 21:17:15 +0000
Commit:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2025-05-09 21:17:15 +0000

    textproc/opensearch*: Preparing for major update of opensearch ports

    - Now opensearch216 and opensearch-dashboards216 are master ports.
      opensearch and opensearch-dashboards can be updated to 3.0 without
      issues with slave ports

    With hat:       opensearch
    PR:             286647 286648

 textproc/opensearch-dashboards210/Makefile         |   6 +-
 textproc/opensearch-dashboards213/Makefile         |   4 +-
 textproc/opensearch-dashboards216/Makefile         |  83 +++++++++--
 textproc/opensearch-dashboards216/distinfo         |   2 +-
 .../files/opensearch-dashboards.in (new)           |  79 +++++++++++
 .../files/pkg-deinstall.in (new)                   |  20 +++
 textproc/opensearch-dashboards216/pkg-descr (new)  |   3 +
 textproc/opensearch210/Makefile                    |   4 +-
 textproc/opensearch213/Makefile                    |   6 +-
 textproc/opensearch216/Makefile                    | 155 +++++++++++++++++++--
 textproc/opensearch216/distinfo                    |   2 +-
 textproc/opensearch216/files/opensearch.in (new)   | 115 +++++++++++++++
 .../files/patch-config_jvm.options (new)           |  23 +++
 .../files/patch-config_opensearch.yml (new)        |  15 ++
 textproc/opensearch216/files/pkg-message.in (new)  |  27 ++++
 textproc/opensearch216/pkg-descr (new)             |   2 +
 16 files changed, 520 insertions(+), 26 deletions(-)
Comment 17 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-10 01:18:38 UTC
Created attachment 260301 [details]
v1

Patch with all my suggestions.
Even though this port is no longer master for other versions, I didn't remove everything necessary for that from it.
If there are no objections, I will commit this patch in the next few days.
Comment 18 Sven Ruediger 2025-05-12 11:00:04 UTC
Comment on attachment 260301 [details]
v1

LGTM 
Please commit this with the leftovers from 2.x. We will remove the downstream parameters after some additional testing.

Thanks!
Comment 19 commit-hook freebsd_committer freebsd_triage 2025-05-12 11:53:02 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7b83ac43359a1705399dee19d9f13a5bbb2ada6d

commit 7b83ac43359a1705399dee19d9f13a5bbb2ada6d
Author:     Sven Ruediger <admin@hackacad.net>
AuthorDate: 2025-05-12 11:42:29 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-05-12 11:52:35 +0000

    textproc/opensearch: Update 2.17.1 => 3.0.0

    Changelogs:
    https://github.com/opensearch-project/OpenSearch/releases/tag/2.18.0
    https://github.com/opensearch-project/OpenSearch/releases/tag/2.19.1
    https://github.com/opensearch-project/OpenSearch/releases/tag/3.0.0

    Improve port:
    - replace PORTREVISION with DISTVERSION;
    - fix warnings from portclippy and portlint.

    PR:     286647

 textproc/opensearch/Makefile                       | 26 +++++++++++-----------
 textproc/opensearch/distinfo                       |  6 ++---
 textproc/opensearch/files/patch-config_jvm.options | 15 ++++++++++---
 3 files changed, 28 insertions(+), 19 deletions(-)
Comment 20 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-12 11:57:59 UTC
Thanks.