Bug 292351 - java/netbeans - Port updating to latest version Netbeans 28
Summary: java/netbeans - Port updating to latest version Netbeans 28
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Vladimir Druzenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-10 21:33 UTC by Paolo Enriello
Modified: 2026-03-02 17:30 UTC (History)
4 users (show)

See Also:


Attachments
distinfo file (158 bytes, text/plain)
2026-01-10 21:33 UTC, Paolo Enriello
no flags Details
Makefile file (1.47 KB, text/plain)
2026-01-10 21:34 UTC, Paolo Enriello
no flags Details
pkg-plist file (250.71 KB, text/plain)
2026-01-10 21:35 UTC, Paolo Enriello
no flags Details
Netbeans update (154.09 KB, patch)
2026-01-11 05:11 UTC, Simon Wollwage
no flags Details | Diff
NetBeans git diff patch (1.10 KB, patch)
2026-01-16 09:07 UTC, Paolo Enriello
no flags Details | Diff
NetBeans diff 2026-02-03 (absolute) (163.68 KB, patch)
2026-02-03 12:50 UTC, Paolo Enriello
no flags Details | Diff
v3 (165.65 KB, patch)
2026-02-03 21:36 UTC, Vladimir Druzenko
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Enriello 2026-01-10 21:33:24 UTC
Created attachment 267013 [details]
distinfo file

I made an update to the port and attach the three modified files in the ports tree:
- distfile
- Makefile
- pkg-plist

The fourth file `pkg-descr` is the same so do not attach here. If the current port version (NetBeans 17) is installed you have to uninstall it, the ports cannot coexists.

I start to ask in the forum at this thread before to post this bug report

https://forums.freebsd.org/threads/updating-the-port-java-netbeans.101188/
Comment 1 Paolo Enriello 2026-01-10 21:34:41 UTC
Created attachment 267014 [details]
Makefile file
Comment 2 Paolo Enriello 2026-01-10 21:35:12 UTC
Created attachment 267015 [details]
pkg-plist file
Comment 3 Simon Wollwage freebsd_triage 2026-01-11 05:11:04 UTC
Created attachment 267027 [details]
Netbeans update

^Triage: created patch file.

It is easier to apply if provided in form of a patch file. I went ahead and did it for you. If you need to update it later, the process is easy:

Go into the ports tree (/usr/src or wherever you have it stored) and run the following command:

git diff -u > /where/you/want/to/store/the/patch

and upload that file instead.


Also, this port currently doesn't have a maintainer, so you can take that up if you want to.
Comment 4 elephant 2026-01-12 05:50:08 UTC
I did the following.

# removed package netbeans (17).
$ pkg remove netbeans


# clone repo, apply patch file, and build the port.
$ git clone freebsd-ports
$ cd freebsd-ports/java/netbeans
$ git apply patch-file
$ sudo make

Appears to build fine so time to install ...

$ sudo make install

I get the following error:

~/work/freebsd-ports/java/netbeans $ sudo make install
===>  Installing for netbeans-28
===>  Checking if netbeans is already installed
===>   Registering installation for netbeans-28
pkg-static: Unable to access file ~/work/freebsd-ports/java/netbeans/work/stage/usr/local/netbeans-28/websvccommon/update_tracking/org-netbeans-modules-websvc-saas-ui.xml@owner:No such file or directory
*** Error code 1

Stop.
make: stopped making "install" in ~/work/freebsd-ports/java/netbeans

I do have a org-netbeans-modules-websvc-saas-ui.xml file but it does not end with "@owner".
Comment 5 elephant 2026-01-12 05:50:56 UTC
Forgot to add ... this is on 15.0-RELEASE with an Intel 64 bit processor.
Comment 6 elephant 2026-01-12 08:39:00 UTC
A little more info ... I copied the file so that the copy included the @owner suffix and repeated the "sudo make install". The install completed.

I now have netbeans 28 up and running. Will throw some less than trivial projects at over the next few days.
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2026-01-12 09:25:02 UTC
1.
USES=           cpe java shebangfix zip
SHEBANG_FILES=  extide/ant/bin/antRun.pl \
                extide/ant/bin/complete-ant-cmd.pl \
                extide/ant/bin/runant.pl \
                extide/ant/bin/runant.py
perl_OLD_CMD=  /usr/bin/perl
perl_CMD=      ${LOCALBASE}/bin/perl
python_OLD_CMD=        /usr/bin/python
python_CMD=    ${LOCALBASE}/bin/python${PYTHON_DEFAULT}
1.1. Why not: USES+=perl:run python:run?
1.2. Without lines perl_OLD_CMD, perl_CMD and python_OLD_CMD result is the same.

2. Why installs files *.cmd, *.bat, *.exe, *.dll, netbeans-28/profiler/lib/deployed/*?
jdk15:
hpux-pa_risc2.0
hpux-pa_risc2.0w
linux
linux-amd64
mac
solaris-amd64
solaris-i386
solaris-sparc
solaris-sparcv9
windows
windows-amd64

jdk16:
hpux-pa_risc2.0
hpux-pa_risc2.0w
linux
linux-amd64
mac
solaris-amd64
solaris-i386
solaris-sparc
solaris-sparcv9
windows
windows-amd64
We can use NO_ARCH=yes without these files.
BTW, jdk15 and jdk16 removed from ports many years ago. 

3. @${FIND} ${WRKSRC} -name "*.orig" -delete
Does nothing - no files "*.orig".

4. Use RLN instead of LN:
-       cd ${STAGEDIR}${PREFIX} && ${LN} -sf ../${PORTNAME}-${DISTVERSION}/bin/netbeans bin/${PORTNAME}
-       cd ${STAGEDIR}${PREFIX} && ${LN} -sf ../${PORTNAME}-${DISTVERSION}/bin/netbeans bin/${PORTNAME}-${DISTVERSION}
+       ${RLN} ${STAGEDIR}${PREFIX}/${PORTNAME}-${DISTVERSION}/bin/${PORTNAME} \
+               ${STAGEDIR}${PREFIX}/bin
+       ${RLN} ${STAGEDIR}${PREFIX}/${PORTNAME}-${DISTVERSION}/bin/${PORTNAME} \
+               ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-${DISTVERSION}

5. Fix warnings from portclippy:
# USES block
USES
CPE_VENDOR
JAVA_VERSION

-NO_BUILD

# USES=shebangfix related variables
SHEBANG_FILES
perl_OLD_CMD
perl_CMD
python_OLD_CMD
python_CMD

-WRKSRC

# Standard bsd.port.mk variables
DATADIR
+DESKTOP_ENTRIES
+NO_BUILD

# WRKSRC block
+WRKSRC

# Packaging list block
PLIST_SUB

-DESKTOP_ENTRIES

6. The port has no maintainer - who wants to become the maintainer of this port?
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 2026-01-12 09:26:30 UTC
(In reply to unitrunker from comment #6)
Build fine for me too with current patch.
Comment 9 Paolo Enriello 2026-01-13 12:27:41 UTC
Sorry for the delay. Yes I want to be the maintainer. There's just one thing I want: is it possible to change the maintainer's email address?
Comment 10 Vladimir Druzenko freebsd_committer freebsd_triage 2026-01-13 17:25:18 UTC
(In reply to Paolo from comment #9)
Update patch with changed MAINTAINER and taking into account my questions and comments in comment #7.
Comment 11 Paolo Enriello 2026-01-16 09:07:11 UTC
Created attachment 267190 [details]
NetBeans git diff patch
Comment 12 Paolo Enriello 2026-01-16 09:12:13 UTC
The patch has:
- Changed maintainer e-mail address
- Removed the line in `post-patch` that delete `*.orig` files
- Added a new-line `\n` at the end of `pkg-plist` file to prevent `@owner` error

I take in account comment #7 by Vladimir Druzenko but still in progress.

Thanks to you all
Comment 13 Vladimir Druzenko freebsd_committer freebsd_triage 2026-02-01 22:11:13 UTC
(In reply to Paolo from comment #12)
Check please 1 and 2 from my list.
Comment 14 Paolo Enriello 2026-02-03 12:50:53 UTC
Created attachment 267733 [details]
NetBeans diff 2026-02-03 (absolute)

The patch contains poit 1 and 2 of comment #7 (I hope).

- `USES += perl:run python:run` modified to `USES += perl5 python:run`. The `python_CMD` variable not removed (should be to remove it too?)
- Removed all .exe, .dll, .bat, .cmd, .dylib files and `MacOS-*`, `Windows-*` directories (maybe `SunOS-*` too should be removed).

I'm trying to ask some questions about removing unnecessary files and directories, but I'm not used to mailinglists (to tell the truth, I don't like them).

To try the new port I make those steps:
- Uninstalled NetBeans: `pkg delete netbeans`
- Copied the new files in the ports tree (distinfo, Makefile, pkg-plist)
- Autoremoved unused packages (openjdkXXs auto-removed)
- Removed NetBeans user cache and configuration (`/home/NAME/.cache/netbeas/NN` and `/home/NAME/.netbeans/NN` directories)
- Installed new port: `make -C /usr/ports/java/netbeans install clean`
- It works! But... not testet all (the profiler, I removed the entire sub-directories and files in `/usr/local/netbeans-28/profiler/lib/deployed/*).
Comment 15 Paolo Enriello 2026-02-03 12:56:44 UTC
Sorry, forgot to mention which mailinglist: I'm trying to ask questions in the Apache NetBeans Dev mailinglist for info
Comment 16 Vladimir Druzenko freebsd_committer freebsd_triage 2026-02-03 21:36:03 UTC
Created attachment 267745 [details]
v3

Test please my patch.
Comment 17 Paolo Enriello 2026-02-05 09:08:17 UTC
For me the **v3** patch installs with no errors (same procedure: uninstalling NetBeans, autoremove packages, clean distfiles/ports-db, clean NetBeans cache/config, reboot and reinstalling). I thought to install on a new VM to test perl and python, but NetBeans works in GUI, so installing the GUI (XFCE) perl and python are already installed (should be).
Comment 18 Vladimir Druzenko freebsd_committer freebsd_triage 2026-02-05 22:42:13 UTC
(In reply to Paolo from comment #12)
> - Changed maintainer e-mail address
Is it your email: freethread.pe@gmail.com?
Use same email as in bugzilla: paolo.enriello@hotmail.com.
Or change it in bugzilla.
Comment 19 Paolo Enriello 2026-02-06 06:40:09 UTC
Ok, updated e-mail in bugzilla.
One last thing, to update future releases I will post the diff in this thread or is better to open a new thread? In short, how should I behave in the future?
Comment 20 Vladimir Druzenko freebsd_committer freebsd_triage 2026-02-06 09:37:29 UTC
(In reply to Paolo Enriello from comment #19)
For each future update, please create a new PR in this Bugzilla.
Comment 21 commit-hook freebsd_committer freebsd_triage 2026-02-06 09:55:37 UTC
A commit in branch main references this bug:

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

commit b381b02bcdac173423c4ef719a32d880e2501ab3
Author:     Paolo Enriello <freethread.pe@gmail.com>
AuthorDate: 2026-02-06 09:39:19 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2026-02-06 09:53:58 +0000

    java/netbeans: Update 17 => 28, take maintainership

    Changelogs:
    https://github.com/apache/netbeans/releases/tag/18
    https://github.com/apache/netbeans/releases/tag/19
    https://github.com/apache/netbeans/releases/tag/20
    https://github.com/apache/netbeans/releases/tag/21
    https://github.com/apache/netbeans/releases/tag/22
    https://github.com/apache/netbeans/releases/tag/23
    https://github.com/apache/netbeans/releases/tag/24
    https://github.com/apache/netbeans/releases/tag/25
    https://github.com/apache/netbeans/releases/tag/26
    https://github.com/apache/netbeans/releases/tag/27
    https://github.com/apache/netbeans/releases/tag/28

    - Repalce PORTVERSION with DISTVERSION.
    - Remove shebangfix variables with default values.
    - Parametrize netbeans with PORTNAME.
    - Fix warnings from portclippy.
    - Exclude from extract binary files for other OSes - add NO_ARCH.
    - Use RLN instead of LN -s in post-install.

    PR:             292351
    Co-authored-by: Vladimir Druzenko <vvd@FreeBSD.org>

 java/netbeans/Makefile  |   55 +-
 java/netbeans/distinfo  |    6 +-
 java/netbeans/pkg-plist | 1381 ++++++++++++++---------------------------------
 3 files changed, 434 insertions(+), 1008 deletions(-)
Comment 22 Vladimir Druzenko freebsd_committer freebsd_triage 2026-02-06 10:03:49 UTC
Thanks.
Comment 23 commit-hook freebsd_committer freebsd_triage 2026-03-02 17:30:10 UTC
A commit in branch 2026Q1 references this bug:

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

commit 3fc823dd5c8e8ba13e765a193d4a7975f32240b4
Author:     Paolo Enriello <freethread.pe@gmail.com>
AuthorDate: 2026-02-06 09:39:19 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2026-03-02 17:28:28 +0000

    java/netbeans: Update 17 => 28, take maintainership

    Changelogs:
    https://github.com/apache/netbeans/releases/tag/18
    https://github.com/apache/netbeans/releases/tag/19
    https://github.com/apache/netbeans/releases/tag/20
    https://github.com/apache/netbeans/releases/tag/21
    https://github.com/apache/netbeans/releases/tag/22
    https://github.com/apache/netbeans/releases/tag/23
    https://github.com/apache/netbeans/releases/tag/24
    https://github.com/apache/netbeans/releases/tag/25
    https://github.com/apache/netbeans/releases/tag/26
    https://github.com/apache/netbeans/releases/tag/27
    https://github.com/apache/netbeans/releases/tag/28

    - Repalce PORTVERSION with DISTVERSION.
    - Remove shebangfix variables with default values.
    - Parametrize netbeans with PORTNAME.
    - Fix warnings from portclippy.
    - Exclude from extract binary files for other OSes - add NO_ARCH.
    - Use RLN instead of LN -s in post-install.

    PR:             292351 293537
    Co-authored-by: Vladimir Druzenko <vvd@FreeBSD.org>
    MFH:            2026Q1
    (cherry picked from commit b381b02bcdac173423c4ef719a32d880e2501ab3)

 java/netbeans/Makefile  |   55 +-
 java/netbeans/distinfo  |    6 +-
 java/netbeans/pkg-plist | 1381 ++++++++++++++---------------------------------
 3 files changed, 434 insertions(+), 1008 deletions(-)