Bug 277626 - news/sabnzbd: Update to 4.3.2
Summary: news/sabnzbd: Update to 4.3.2
Status: In Progress
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-05-30 03:05 UTC (History)
3 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

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.