Bug 294193 - news/nzbhydra2: Update 7.9.0 to 8.5.3
Summary: news/nzbhydra2: Update 7.9.0 to 8.5.3
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:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-04-02 00:01 UTC by Marcel Bischoff
Modified: 2026-04-07 00:10 UTC (History)
1 user (show)

See Also:
marcel: maintainer-feedback+
vvd: merge-quarterly+


Attachments
Patch (1.23 KB, patch)
2026-04-02 00:01 UTC, Marcel Bischoff
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Bischoff 2026-04-02 00:01:02 UTC
Created attachment 269306 [details]
Patch

Tested with "poudriere testport" on 15.0-RELEASE amd64.

Changes:

    https://github.com/theotherp/nzbhydra2/compare/v7.9.0...v8.5.3
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2026-04-02 03:17:34 UTC
8.2.0 or 8.5.3?
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2026-04-02 03:35:29 UTC
2.
> You need to install Java 17 (not lower, not higher).
-JAVA_VERSION=17+
+JAVA_VERSION=17

3. Warnings from portclippy.

4. zip:
-EXTRACT_SUFFIX=.zip
USES=           java python zip
-EXTRACT_AFTER_ARGS=
+EXTRACT_BEFORE_ARGS=    -qo \
                        -x '*.exe' -x '*.cmd' \
                        -x executables \
                        -x other/* -x other \
                        -x WindowsService \
                        -x nzbhydra2wrapper.py
5.
+NO_ARCH=        yes

6.
do-install:
        (cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}/${DATADIR})
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2026-04-02 09:35:31 UTC
7. Respect substitutions variables USER, GROUP, DATADIR:
SUB_LIST=       PYTHON_CMD=${PYTHON_CMD} \
                JAVA=${JAVA} \
                DISTVERSION=${DISTVERSION} \
                USER=${USERS} \
                GROUP=${GROUPS}

--- files/nzbhydra2.in.orig
+++ files/nzbhydra2.in
@@ -10,15 +10,15 @@
 # nzbhydra2_enable (bool):     Set to NO by default.
 #                      Set it to YES to enable it.
 # nzbhydra2_user:      The user account nzbhydra daemon runs as what
-#                      you want it to be. It uses '_sabnzbd' user by
+#                      you want it to be. It uses '%%USER%%' user by
 #                      default. Do not sets it as empty or it will run
 #                      as root.
 # nzbhydra2_group:     The group account nzbhydra daemon runs as what
-#                      you want it to be. It uses 'nzbhydra2' group by
+#                      you want it to be. It uses '%%GROUP%%' group by
 #                      default. Do not sets it as empty or it will run
 #                      as wheel.
 # nzbhydra2_dir:       Directory where nzbhydra lives.
-#                      Default: %%PREFIX%%/share/nzbhydra2
+#                      Default: %%DATADIR%%
 # nzbhydra2_data_dir:  Data directory for nzbhydra (DB, Logs, config)
 #                      Default: %%PREFIX%%/nzbhydra2

@@ -30,9 +30,9 @@
 load_rc_config ${name}

 : ${nzbhydra2_enable:="NO"}
-: ${nzbhydra2_user:="nzbhydra2"}
-: ${nzbhydra2_group:="nzbhydra2"}
-: ${nzbhydra2_dir:="%%PREFIX%%/share/nzbhydra2"}
+: ${nzbhydra2_user:="%%USER%%"}
+: ${nzbhydra2_group:="%%GROUP%%"}
+: ${nzbhydra2_dir:="%%DATADIR%%"}
 : ${nzbhydra2_data_dir:="%%PREFIX%%/nzbhydra2"}

 pidfile="/var/run/nzbhydra2/nzbhydra2.pid"
@@ -45,7 +45,7 @@
        export XDG_CONFIG_HOME=${nzbhydra2_data_dir}
        export NZBHYDRA_DISABLE_UPDATE=1

-       find "%%PREFIX%%/share/nzbhydra2/lib/" ! -name "core-%%DISTVERSION%%-exec.jar" -delete
+       find "${nzbhydra2_dir}/lib/" ! -name "core-%%DISTVERSION%%-exec.jar" -delete

        if [ -f ${pidfile} ]; then
                rm -f ${pidfile}
Comment 4 Marcel Bischoff 2026-04-02 11:03:39 UTC
(In reply to Vladimir Druzenko from comment #1)
Sorry, I should have gone to bed last night instead of working. It should've been 8.5.3 and somehow I mixed things up. Please excuse the confusion and additional work.
Comment 5 Marcel Bischoff 2026-04-02 11:08:36 UTC
Thanks for looking through it. It didn't use to raise any flags in the past.

I will follow chapter 10 from the Porter's Handbook more closely from now on. Thanks for the heads-up and taking the time to review and make suggestions. I will implement them in short order.
Comment 6 Vladimir Druzenko freebsd_committer freebsd_triage 2026-04-02 11:27:52 UTC
(In reply to Marcel Bischoff from comment #5)
All suggestions already implemented in my local tree and build tested in poudriere and on live system 14.4 amd64.
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2026-04-06 19:44:21 UTC
(In reply to Marcel Bischoff from comment #5)
If you don't mind, I can just commit my patch. If you'd like to review it before committing, I can attach it to the PR.
Comment 8 Marcel Bischoff 2026-04-06 22:45:52 UTC
(In reply to Vladimir Druzenko from comment #7)
I'm all for the quickest way to get this done, so please go ahead with it. I trust you have comprehensively checked it.
Comment 9 commit-hook freebsd_committer freebsd_triage 2026-04-07 00:07:36 UTC
A commit in branch main references this bug:

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

commit 238f7a8c944f5984ac31f66846a534e6bc706641
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2026-04-06 23:46:02 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2026-04-07 00:05:57 +0000

    news/nzbhydra2: Update 7.9.0 => 8.5.3

    Changelog:
    https://github.com/theotherp/nzbhydra2/blob/v8.5.3/changelog.md

    - Use exact Java version 17: "You need to install Java 17 (not lower,
      not higher)".
    - Fix warnings from portclippy.
    - Distfiles is zip: add USES+=zip, remove EXTRACT_SUFFIX=.zip, adjust
      EXTRACT_*_ARGS.
    - Add NO_ARCH.
    - Simplify do-install.
    - Remove LICENSE from installation - already installed via LICENSE.
    - Sort plist.
    - Respect substitutions variables USER, GROUP, DATADIR in rc.d script.

    PR:             294193
    Approved by:    Marcel Bischoff <marcel@herrbischoff.com> (maintainer)
    Sponsored by:   UNIS Labs
    MFH:            2026Q2

 news/nzbhydra2/Makefile           | 43 ++++++++++++++++++---------------------
 news/nzbhydra2/distinfo           |  6 +++---
 news/nzbhydra2/files/nzbhydra2.in | 14 ++++++-------
 3 files changed, 30 insertions(+), 33 deletions(-)
Comment 10 commit-hook freebsd_committer freebsd_triage 2026-04-07 00:09:37 UTC
A commit in branch 2026Q2 references this bug:

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

commit 3ac2a0640ca05ec4d6841b03913cb763f7497ade
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2026-04-06 23:46:02 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2026-04-07 00:08:42 +0000

    news/nzbhydra2: Update 7.9.0 => 8.5.3

    Changelog:
    https://github.com/theotherp/nzbhydra2/blob/v8.5.3/changelog.md

    - Use exact Java version 17: "You need to install Java 17 (not lower,
      not higher)".
    - Fix warnings from portclippy.
    - Distfiles is zip: add USES+=zip, remove EXTRACT_SUFFIX=.zip, adjust
      EXTRACT_*_ARGS.
    - Add NO_ARCH.
    - Simplify do-install.
    - Remove LICENSE from installation - already installed via LICENSE.
    - Sort plist.
    - Respect substitutions variables USER, GROUP, DATADIR in rc.d script.

    PR:             294193
    Approved by:    Marcel Bischoff <marcel@herrbischoff.com> (maintainer)
    Sponsored by:   UNIS Labs
    MFH:            2026Q2

    (cherry picked from commit 238f7a8c944f5984ac31f66846a534e6bc706641)

 news/nzbhydra2/Makefile           | 43 ++++++++++++++++++---------------------
 news/nzbhydra2/distinfo           |  6 +++---
 news/nzbhydra2/files/nzbhydra2.in | 14 ++++++-------
 3 files changed, 30 insertions(+), 33 deletions(-)
Comment 11 Vladimir Druzenko freebsd_committer freebsd_triage 2026-04-07 00:10:40 UTC
Thanks.