Bug 286648 - textproc/opensearch-dashboards update to 3.0
Summary: textproc/opensearch-dashboards 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 12:00 UTC by Sven Ruediger
Modified: 2025-05-12 11:58 UTC (History)
2 users (show)

See Also:
admin: maintainer-feedback+


Attachments
update port to major 3.0 (1.15 KB, patch)
2025-05-07 12:00 UTC, Sven Ruediger
admin: maintainer-approval-
Details | Diff
update port to major 3.0 (2.20 KB, patch)
2025-05-08 11:50 UTC, Sven Ruediger
no flags Details | Diff
v1 (2.22 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 12:00:11 UTC
Created attachment 260236 [details]
update port to major 3.0

This patch update OpenSearch Dashboards to 3.0
Comment 1 Sven Ruediger 2025-05-07 12:14:32 UTC
Created diff: https://reviews.freebsd.org/D50237
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 16:06:18 UTC
1. Keep "PORTREVISION?= 0" - used in slave ports.

2. Maybe we need to bump node version:
-BUILD_DEPENDS=  npm-node18>0:www/npm-node18
+BUILD_DEPENDS=  npm-node20>0:www/npm-node20
-USES=           nodejs:18,build,run python:build
+USES=           nodejs:20,build,run python:build
-NODE_VER=       18.18.0
+NODE_VER=       20.19.0
-        @${REINPLACE_CMD} -e 's|14.20.1|${NODE_VER}|g' ${WRKSRC}/package.json
+        @${REINPLACE_CMD} -e 's|20.10.5|${NODE_VER}|g' ${WRKSRC}/package.json
Check this:
https://github.com/opensearch-project/OpenSearch-Dashboards/blob/3.0.0/package.json#L113

3. Replace PORTVERSION with DISTVERSION in WRKSRC:
-WRKSRC=         ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+WRKSRC=         ${WRKDIR}/${PORTNAME}-${DISTVERSION}

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

# Maintainer block
MAINTAINER
COMMENT
WWW

# License block
LICENSE
LICENSE_FILE

-CONFLICTS

# Dependencies
BUILD_DEPENDS

# USES block
USES
USE_RC_SUBR

# Conflicts
+CONFLICTS

# Standard bsd.port.mk variables
+NO_BUILD
SUB_FILES
SUB_LIST

# WRKSRC block
WRKSRC

-NO_BUILD

1, 3 and 4 are obvious, 3 need testing - I'll run poudriere testport soon (just after poudriere testport textproc/opensearch finihed).
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 16:30:47 UTC
5. portlint -t
FATAL: Makefile: [5]: use a tab (not space) after a variable name

[5] MASTER_SITES=   https://artifacts.opensearch.org/${PORTNAME}/${DISTVERSION}/
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 18:03:56 UTC
6. Add "NO_ARCH=yes":
pkg-static: DEVELOPER_MODE: Notice: arch "FreeBSD:14:amd64" -- no architecture specific files found:
**** could this package use a wildcard architecture?
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 19:01:07 UTC
2. IMHO, we can remove lines:
-NODE_VER=       18.18.0
-        @${REINPLACE_CMD} -e 's|14.20.1|${NODE_VER}|g' ${WRKSRC}/package.json
         ${RM} \
                 ${WRKSRC}/bin/*.orig \
-                ${WRKSRC}/bin/*.bak \
-                ${WRKSRC}/package.json.bak
+                ${WRKSRC}/bin/*.bak
Comment 6 Sven Ruediger 2025-05-08 11:50:35 UTC
Created attachment 260261 [details]
update port to major 3.0

Apply lint fixes and minor tweaks provided by vvd@
Comment 7 Sven Ruediger 2025-05-08 11:54:13 UTC
I'm not shure about the effects of NO_ARCH=yes on the build process.
Would this fix any build issues?
I tested it on 15:aarch64 and 14.2:amd64 without any issues.
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-08 12:12:14 UTC
(In reply to Sven Ruediger from comment #7)
> Ports that do not have any architecture-dependent files
> or requirements are identified by setting NO_ARCH=yes.
> 
> NO_ARCH is meant to indicate that there is no need to
> build a package for each of the supported architectures.
> The goal is to reduce the amount of resources spent on
> building and distributing the packages such as network
> bandwidth and disk space on mirrors and on distribution media.
https://docs.freebsd.org/en/books/porters-handbook/book/#dads-arch-neutral
Comment 9 commit-hook freebsd_committer freebsd_triage 2025-05-09 21:22:22 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 10 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-10 01:18:58 UTC
Created attachment 260302 [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 11 commit-hook freebsd_committer freebsd_triage 2025-05-12 11:54:03 UTC
A commit in branch main references this bug:

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

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

    textproc/opensearch-dashboards: Update 2.17.1 => 3.0.0

    Release Notes:
    https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/release-notes/opensearch-dashboards.release-notes-2.18.0.md
    https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/release-notes/opensearch-dashboards.release-notes-2.19.0.md
    https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/release-notes/opensearch-dashboards.release-notes-2.19.1.md
    https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/release-notes/opensearch-dashboards.release-notes-3.0.0.md

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

    PR:     286648

 textproc/opensearch-dashboards/Makefile | 25 ++++++++++---------------
 textproc/opensearch-dashboards/distinfo |  6 +++---
 2 files changed, 13 insertions(+), 18 deletions(-)
Comment 12 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-12 11:58:08 UTC
Thanks.