Bug 277626 - news/sabnzbd: Update to 4.3.2
Summary: news/sabnzbd: Update to 4.3.2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Zsolt Udvari
URL:
Keywords:
Depends on: 278707 279389
Blocks:
  Show dependency treegraph
 
Reported: 2024-03-11 10:53 UTC by Nicholas Kirby
Modified: 2024-07-06 12:20 UTC (History)
5 users (show)

See Also:
james: maintainer-feedback+


Attachments
Patch to 4.2.3 (919 bytes, patch)
2024-03-11 10:53 UTC, Nicholas Kirby
no flags Details | Diff
Patch to 4.2.3 - Change Maintainer (1.02 KB, patch)
2024-03-12 16:16 UTC, James French
james: maintainer-approval+
Details | Diff
Patch to 4.2.3 - v2 (2.92 KB, patch)
2024-04-05 03:45 UTC, Nicholas Kirby
nick: maintainer-approval+
Details | Diff
Patch to 4.2.3 - v3 (4.00 KB, patch)
2024-04-06 02:11 UTC, Nicholas Kirby
no flags Details | Diff
Patch to 4.2.3 - v4 (3.53 KB, patch)
2024-04-06 06:31 UTC, Nicholas Kirby
no flags Details | Diff
Patch to 4.2.3 - v5 (3.46 KB, patch)
2024-04-09 02:58 UTC, Nicholas Kirby
no flags Details | Diff
Patch to 4.2.3 - v6 (3.69 KB, patch)
2024-04-19 02:29 UTC, Nicholas Kirby
no flags Details | Diff
Patch to 4.3.1 (4.83 KB, patch)
2024-05-05 03:33 UTC, Nicholas Kirby
no flags Details | Diff
Poudriere build log for 4.3.1 (35.09 KB, text/plain)
2024-05-05 03:34 UTC, Nicholas Kirby
no flags Details
Patch to 4.3.1 v2 (4.84 KB, patch)
2024-05-09 03:28 UTC, Nicholas Kirby
no flags Details | Diff
Patch to 4.3.1 v3 (4.89 KB, patch)
2024-05-15 00:02 UTC, Nicholas Kirby
no flags Details | Diff
Patch to 4.3.1 v4 (4.96 KB, patch)
2024-05-17 03:54 UTC, Nicholas Kirby
no flags Details | Diff
Poudriere build log for 4.3.1 v4 (37.61 KB, text/plain)
2024-05-17 03:55 UTC, Nicholas Kirby
no flags Details
Patch to 4.3.1 - v5 (4.89 KB, patch)
2024-05-23 07:03 UTC, Nicholas Kirby
no flags Details | Diff
Patch to 4.3.2 (4.89 KB, patch)
2024-05-30 03:05 UTC, Nicholas Kirby
no flags Details | Diff
Patch to 4.3.2 v2 (4.88 KB, patch)
2024-06-16 05:58 UTC, Nicholas Kirby
no flags Details | Diff
251490 plus test (5.84 KB, patch)
2024-06-16 18:27 UTC, Zsolt Udvari
no flags Details | Diff
Patch with OPTIONS_DEF* cleanup (4.85 KB, patch)
2024-07-05 03:29 UTC, James French
no flags Details | Diff
251874 pet portfmt, portclippy (4.85 KB, patch)
2024-07-05 18:09 UTC, Zsolt Udvari
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nicholas Kirby 2024-03-11 10:53:16 UTC
Created attachment 249089 [details]
Patch to 4.2.3

Changelog: https://github.com/sabnzbd/sabnzbd/releases/tag/4.2.3
Comment 1 James French 2024-03-12 16:16:34 UTC
Created attachment 249117 [details]
Patch to 4.2.3 - Change Maintainer

Patch looks good to me. Nick has been quick to deliver good patches to keep this port updated after upstream bumps recently. As I don't have quite as much time to keep the port up to date as I did three years ago, I've approached Nick via email about taking over as Maintainer which he is happy to do.

Resubmitting the latest patch with MAINTAINER updated to Nick, thanks for taking it on!
Comment 2 Zsolt Udvari freebsd_committer freebsd_triage 2024-03-31 14:24:31 UTC
Nicholas: please run 'portfmt -D Makefile' (portfmt is part of ports-mgmt/portfmt). Could you please update your patch?
Comment 3 Zsolt Udvari freebsd_committer freebsd_triage 2024-03-31 14:25:50 UTC
(In reply to Zsolt Udvari from comment #2)
And if you add new patch, please use "Obsoletes". Thanks.
Comment 4 Nicholas Kirby 2024-04-05 03:45:44 UTC
Created attachment 249726 [details]
Patch to 4.2.3 - v2

Here you go! Thanks for sharing the portfmt tool with me, I'm fairly new to this.
Comment 5 Zsolt Udvari freebsd_committer freebsd_triage 2024-04-05 18:31:35 UTC
(In reply to Nicholas Kirby from comment #4)
Please share only one patch, against the ports tree. Now there are two patch, one is an update to 4.2.3 and other is cosmetic changes. Could you please merge into one patch?
Thanks!
Comment 6 Nicholas Kirby 2024-04-06 02:11:10 UTC
Created attachment 249750 [details]
Patch to 4.2.3 - v3

Sorry again! How is this?

It's a valuable lesson to me to actually READ it before I submit it.

Thanks again!
Comment 7 Zsolt Udvari freebsd_committer freebsd_triage 2024-04-06 05:25:24 UTC
(In reply to Nicholas Kirby from comment #6)
Something wrong, I can't "git apply":

# fetch -q 'https://bz-attachments.freebsd.org/attachment.cgi?id=249750' -o - | git  apply
error: corrupt patch at line 12

The patch utility says similar error:
# fetch -q 'https://bz-attachments.freebsd.org/attachment.cgi?id=249750' -o - | patch -N
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/news/sabnzbd/Makefile b/news/sabnzbd/Makefile
|index 6eb3eda5c..e4680e881 100644
|--- a/news/sabnzbd/Makefile
|+++ b/news/sabnzbd/Makefile
--------------------------
Patching file news/sabnzbd/Makefile using Plan A...
patch: **** malformed patch at line 12:


Could you please fix it? The "git diff --output sabnzbd.diff" would be fine (maybe as you did?).
Comment 8 Nicholas Kirby 2024-04-06 06:31:48 UTC
Created attachment 249752 [details]
Patch to 4.2.3 - v4

Alright, how is this?

I had to fix a couple of mistakes I made between my ports tree and my poudriere tree but I think this should be good!

Thanks again
Comment 9 Zsolt Udvari freebsd_committer freebsd_triage 2024-04-06 14:33:11 UTC
(In reply to Nicholas Kirby from comment #8)
Same error.
Maybe you should try apply your patch on a clean ports tree (git apply).
Comment 10 Nicholas Kirby 2024-04-09 02:58:50 UTC
Created attachment 249846 [details]
Patch to 4.2.3 - v5

Alright! I'm 99% sure I've got it this time. I made SEVERAL mistakes with previous patches!

- I had a ^M blank space at the end of every line of the previous one that was the result of how I tried to be lazy and copy the raw text to another machine for upload. I've set up a basic file share so I can get the actual tested file from my main machine for upload so it can't be adulterated before upload.
- I was building my patch in my poudriere default ports tree and not my actual ports tree so it would apply to the poudriere one and not the main one with git apply. I'm no longer doing that.

The one I am uploading I have tested applying to my normal ports tree and it works (for me)!

Thank you again for your patience.

P.S. Ha ha ha after all that I filled in this box and didn't actually attach the file. Got a big ol' RED ERROR MESSAGE.
Comment 11 Zsolt Udvari freebsd_committer freebsd_triage 2024-04-09 06:59:46 UTC
(In reply to Nicholas Kirby from comment #10)
Okay, now can apply :)
I'm testing and I'll open a review.
Thanks.
Comment 12 Zsolt Udvari freebsd_committer freebsd_triage 2024-04-09 08:48:08 UTC
Remarks:
- the COPYRIGHT.TXT in PORTDOCS, should be the LICENSE_FILE instead (see https://docs.freebsd.org/en/books/porters-handbook/book/#licenses-license and https://docs.freebsd.org/en/books/porters-handbook/book/#licenses-license_file)
- I can't find BSD2CLAUSE, BSD3CLAUSE, ISCL, PSFL in the source files, maybe should remove them?
- maybe can use msgfmt (part of gettext-tools) to generate *.mo files instead of extracted msgfmt.py
- sabnbzd/utils/pybonjour.py: there is a package, py-pybonjour. Should use it: https://docs.freebsd.org/en/books/porters-handbook/book/#bundled-libs
- sabnbzd/utils/rarfile.py: same as above
- the sabnzbd/utils/systrayiconthread.py has WTFPL license, should include into LICENSES
Comment 13 Nicholas Kirby 2024-04-19 02:29:06 UTC
Created attachment 250075 [details]
Patch to 4.2.3 - v6

Alright, sorry about the delay.

How is this?

I might need some coaching on how to get it to use gettext-tools, as my build log is seeing it as a dependency and installing it. Not sure how it generates the .mo files though.
Comment 14 Nicholas Kirby 2024-05-03 03:37:57 UTC
4.3.0 was just released. Should I wait until this has been cleared before submitting it, or should I resubmit 4.3.0 with the additional changes made here and close this one as Overcome by Events?

Thanks
Comment 15 Nicholas Kirby 2024-05-03 04:32:24 UTC
There was a change to 4.3.0 that will require additional changes to the Makefile as well as me porting the apprise python module.

Because the changes are moderate I will wait for this case to be resolved before I submit 4.3.0 although I do now have it working/buildable in my environment
Comment 16 Zsolt Udvari freebsd_committer freebsd_triage 2024-05-04 12:10:13 UTC
(In reply to Nicholas Kirby from comment #13)
Thanks your patch and sorry for delay.

You can update to 4.3.0, should upload the newest patch and edit this bug report's title (doesn't need close this bug and open a new bug).

You should check 'portlint -A', 'portfmt -D Makefile' and 'portclippy Makefile' for correct Makefile.

If it's hard to implement the option NLS you can skip it.
Comment 17 Nicholas Kirby 2024-05-05 03:33:30 UTC
Created attachment 250411 [details]
Patch to 4.3.1

Attached is the patch to 4.3.1, the first bugfix of 4.3.0 which I worked on last night.

I've run through 'portlint -A', 'portfmt -D Makefile' and 'portclippy Makefile' until I got no more errors or warnings, and consulted a couple of other bugs to see about the NLS support. 

Please review and if you have any additional reading you think might be a good idea for me in regards please feel free to email me.

bug:278707 will be required for this to build/run, a new py-apprise port to support a new notification system added to 4.3.0.

Thanks again!
Comment 18 Nicholas Kirby 2024-05-05 03:34:57 UTC
Created attachment 250412 [details]
Poudriere build log for 4.3.1
Comment 19 Nicholas Kirby 2024-05-09 03:28:07 UTC
Created attachment 250539 [details]
Patch to 4.3.1 v2

Patch updated with changes to blocking bug:278707 news/py-apprise to more correct net-im/py-apprise.
Comment 20 Nicholas Kirby 2024-05-09 03:31:21 UTC
bug 278707

sorry, I keep putting a colon in there that isn't necessary
Comment 21 Matt 2024-05-14 23:03:46 UTC
Couple of notes:
PyYaml needs to be added to the list of run depends for SABnzbd to support apprise. Not sure if this belongs in depends for apprise or SABnzbd, but SABnzbd will crash without py-yaml.

${PYTHON_PKGNAMEPREFIX}yaml>=0:devel/py-yaml@${PY_FLAVOR}

par2repair:archivers/par2cmdline should be changed to par2repair:archivers/par2cmdline-turbo since SABnzbd recommends p2c-turbo (https://sabnzbd.org/wiki/installation/par2cmdline-turbo)
Comment 22 Nicholas Kirby 2024-05-15 00:02:22 UTC
Created attachment 250661 [details]
Patch to 4.3.1 v3

Not sure how I missed PyYAML. It was in an earlier diff for py-apprise, I'll be adding it back in momentarily.

New diff for sabnzbd has turbo
Comment 23 Nicholas Kirby 2024-05-17 03:54:44 UTC
Created attachment 250713 [details]
Patch to 4.3.1 v4

Added paho-mqtt run requirement as per Matt's suggestion.
Comment 24 Nicholas Kirby 2024-05-17 03:55:14 UTC
Created attachment 250714 [details]
Poudriere build log for 4.3.1 v4
Comment 25 Zsolt Udvari freebsd_committer freebsd_triage 2024-05-17 17:46:55 UTC
(In reply to Nicholas Kirby from comment #23)
paho-mqtt is dependency of apprise, isn't?
Comment 26 Nicholas Kirby 2024-05-17 21:54:01 UTC
(In reply to Zsolt Udvari from comment #25)

Best I can tell it's a plugin of apprise that sabnzbd needs.

It's listed in the apprise requirements for sabnzbd, but not in the apprise requirements on their github.
https://github.com/sabnzbd/sabnzbd/blob/develop/requirements.txt
https://github.com/caronc/apprise/blob/master/requirements.txt

I also noticed thst paho-mqtt 2.0 is broken with apprise due to API changes so I'll have to set the version at 1.6.1
https://github.com/eclipse/paho.mqtt.python/issues/814
https://github.com/caronc/apprise/blob/master/all-plugin-requirements.txt
Comment 27 Zsolt Udvari freebsd_committer freebsd_triage 2024-05-20 19:49:56 UTC
(In reply to Nicholas Kirby from comment #26)
paho-mqtt is an optional dependency of apprise:
https://github.com/caronc/apprise/blob/master/all-plugin-requirements.txt#L13
And its version should lower than 2.0.0.

The sabnzbd requires apprise with working paho-mqtt (or can say requires apprise with paho-mqtt option).
If the paho-mqtt would be normal (and not only run-) dependency of apprise (for example LIB_DEPENDS as in C/C++ projects) then wouldn't be enough to add paho-mqtt into sabnzbd.

As you noticed too the paho-mqtt in the ports tree is 2.0.0 and the 1.6.1 isn't available.

I think we should wait until the apprise can use paho-mqtt 2.0.0.
Comment 28 Nicholas Kirby 2024-05-20 20:23:21 UTC
It builds and runs with 2.0, just won't actually work for the one simple function of MQTT messaging (other messages/notifs are fine)

But either way is fine by me!

I can keep updating/running the new version on my box and updating the diffs here for anyone else who wants to manually patch (unless there's a better place?) until it's fixed, then we can merge it?

Otherwise we can merge and add a note about MQTT as 4.2.2 doesn't have this functionality at all, so no one using sabnzbd is currently able to use it as well, so there'd be no LOSS of function.

You'd be the one to know the protocol, I just hit the Makefile with a rock until it works ;)

Let me know and I can update the diff with the latest discussed stuff (maho back to apprise, all small options by default on)

Thanks!
Comment 29 Nicholas Kirby 2024-05-23 07:03:08 UTC
Created attachment 250892 [details]
Patch to 4.3.1 - v5

Updated/corrected to be in line with Zsolt's recommendations for sabnzbd and py-apprise ports.

Once py-paho-mqtt is updated, and py-apprise is commited, this should be RTG.

Thanks again,
Nick
Comment 30 Nicholas Kirby 2024-05-30 03:05:36 UTC
Created attachment 251074 [details]
Patch to 4.3.2

Update news/py-sabctools port and news/sabnzbd port so 4.3.2 can be committed.
Comment 31 Nicholas Kirby 2024-06-14 04:50:51 UTC
sabctools was updated, so to keep in sync with sabnzbd can we get this and bug 278707 commited?

Or is there still some outstanding work that needs to be completed?

Thanks,
Nick
Comment 32 Zsolt Udvari freebsd_committer freebsd_triage 2024-06-16 05:39:58 UTC
(In reply to Nicholas Kirby from comment #30)
Can't apply:
error: patch failed: news/sabnzbd/Makefile:1
error: news/sabnzbd/Makefile: patch does not apply

Please update your patch!
Comment 33 Nicholas Kirby 2024-06-16 05:58:13 UTC
Created attachment 251490 [details]
Patch to 4.3.2 v2

Sorry about that.

Give this one a shot. I updated my ports and then rerolled the diff

Thanks again for everything
Comment 34 Zsolt Udvari freebsd_committer freebsd_triage 2024-06-16 18:27:18 UTC
Created attachment 251506 [details]
251490 plus test

I added pytest and TEST_DEPENDS (against 251490). If it's okay please approve it.
Comment 35 Nicholas Kirby 2024-06-19 03:33:36 UTC
Looks like it's trying to insist on building net-im/py-apprise as py311, so I'll have to submit a patch for that before I can go any further.

Will update in a bit when this is done and tested
Comment 36 Nicholas Kirby 2024-06-19 03:52:24 UTC
I just read UPDATING (because I am an idiot and did not read it first) and python's default version was moved to 3.11 on May 29.

This is a problem with my setup and not the port!

Will fix my environment and get back to you.

Thanks for your patience
Comment 37 Nicholas Kirby 2024-06-19 04:35:09 UTC
Everything seems good except the comment you put in the Makefile.

I'll work on having that added before the next version of sabnzbd.

But for now it should be good to go!

The reason the prior patch did not apply was because Yuri updated it on June 11 so the sabctools bump wouldn't keep it broken (reported by fallout)

Thanks again. I'll start looking into py-tavern
Comment 38 Zsolt Udvari freebsd_committer freebsd_triage 2024-06-19 17:48:07 UTC
(In reply to Nicholas Kirby from comment #37)
"I'll start looking into py-tavern"

Good :) I'll wait it. If you're ready please add its PR to "Depends on" of this PR.
Comment 39 Nicholas Kirby 2024-06-24 03:55:40 UTC
There was just a report of 4.2.2 failing to run because of the sabctools bump. Yuri fixed the build but none of us TESTED it, lol.

Py-tavern looks doable, but it's going to be a longer process than I anticipated as it will require a few updates so I can port a couple of other py ports it will depend on.

Can we commit with test broken or test removed (for now) so that 4.3.2 is usable in the meantime?
Comment 40 Zsolt Udvari freebsd_committer freebsd_triage 2024-06-24 18:52:59 UTC
Ok. But you've two OPTION_DEFINE and two OPTIONS_DEFAULT variable. Could you please merge?
Comment 41 James French 2024-07-05 03:29:25 UTC
Created attachment 251874 [details]
Patch with OPTIONS_DEF* cleanup

Have cleaned up Nick's patch as this port is still broken without this upgrade. Ref bug 279932
Comment 42 Nicholas Kirby 2024-07-05 15:55:02 UTC
(In reply to James French from comment #41)

Thanks

Sorry, I've been away the last little bit, but I should be back at it in a week or so.

I have to rebuild my test platform as well before I can resume port work, which won't be that complicated once I get the time.
Comment 43 Zsolt Udvari freebsd_committer freebsd_triage 2024-07-05 18:06:25 UTC
(In reply to James French from comment #41)
James, did you test? Does sabnzbd work well?
Comment 44 Zsolt Udvari freebsd_committer freebsd_triage 2024-07-05 18:09:25 UTC
Created attachment 251889 [details]
251874 pet portfmt, portclippy

Pet portfmt and portclippy.
Comment 45 Zsolt Udvari freebsd_committer freebsd_triage 2024-07-05 18:10:01 UTC
(In reply to Zsolt Udvari from comment #43)
Nicholas, could you test please?
Comment 46 Nicholas Kirby 2024-07-05 18:42:55 UTC
(In reply to Zsolt Udvari from comment #45)

Yes! It works. My poudriere is still chugging along in the background but I am able to update my ports tree, patch with your latest diff, build and run sabnzbd just fine.

Thanks!
Comment 47 James French 2024-07-06 04:42:04 UTC
Apologies, yes builds and runs fine with the fixed patch.
Comment 48 commit-hook freebsd_committer freebsd_triage 2024-07-06 12:20:20 UTC
A commit in branch main references this bug:

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

commit 92f517397e6c2f12f977a059665e003059a03df5
Author:     Nicholas Kirby <nick@kirby.cx>
AuthorDate: 2024-07-06 12:12:29 +0000
Commit:     Zsolt Udvari <uzsolt@FreeBSD.org>
CommitDate: 2024-07-06 12:18:30 +0000

    news/sabnzbd: update to 4.3.2

    Change maintainership to submitter.
    Add NLS option.
    Fix licenses, add LICENSE_FILE.
    Pet portlint, portclippy, portfmt.

    Changelog: https://github.com/sabnzbd/sabnzbd/releases/

    PR:             277626
    Approved by:    james@french.id.au (maintainer)

 news/sabnzbd/Makefile  | 44 ++++++++++++++++++++++++--------------------
 news/sabnzbd/distinfo  |  6 +++---
 news/sabnzbd/pkg-plist |  2 --
 3 files changed, 27 insertions(+), 25 deletions(-)
Comment 49 Zsolt Udvari freebsd_committer freebsd_triage 2024-07-06 12:20:56 UTC
Thanks for your hard work! Committed!