Bug 248525

Summary: news/sabnzbdplus: Update to 3.0.0
Product: Ports & Packages Reporter: James French <james>
Component: Individual Port(s)Assignee: Florian Smeets <flo>
Status: Closed FIXED    
Severity: Affects Some People CC: colmconn, fernape, flo, hertzsae, joshruehlig
Priority: --- Keywords: buildisok, needs-qa
Version: LatestFlags: bugzilla: maintainer-feedback? (joshruehlig)
Hardware: Any   
OS: Any   
URL: https://github.com/sabnzbd/sabnzbd/releases/tag/3.0.0
Attachments:
Description Flags
Patch to 3.0.0
none
Update to 3.0.0, fix gettext
none
3.0.0A1 Example Patch
none
Update to 3.0.0, take Maintainership, Added Desktop Options
none
Patch per 217221, with CherryPy Version Requirement Set none

Description James French 2020-08-08 04:24:01 UTC
Created attachment 217079 [details]
Patch to 3.0.0

SabNZB 3.0.0 has been released and has been ported to python3 (removing the dependency on Python 2)

The attached patch should bring the port up to date and bring it out of Deprecated state.
Comment 1 joshruehlig 2020-08-08 05:04:26 UTC
Thanks! I'm a little rusty patching/building ports, but hopefully can find some time this weekend to test this out and comment.
Comment 2 Automation User 2020-08-08 05:48:17 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/175643247
Comment 3 Fernando ApesteguĂ­a freebsd_committer freebsd_triage 2020-08-11 16:09:26 UTC
^Triage: If there is a changelog or release notes URL available for this version, please add it to the URL field.

Q/A:
- installing gettext translation files, please define USES[+]=gettext
 as appropriate
Comment 4 James French 2020-08-12 05:25:18 UTC
Created attachment 217165 [details]
Update to 3.0.0, fix gettext

Fixed USES+=gettext.

Missed this one during my testing as the jail I run this already had gettext installed for a different package.

I haven't added a dependency on textproc/py-python-gettext as upstream ship their own version in the tools folder
Comment 5 Fernando ApesteguĂ­a freebsd_committer freebsd_triage 2020-08-12 05:31:58 UTC
(In reply to James French from comment #4)
Thanks for taking care of that.
Comment 6 colmconn 2020-08-13 19:14:44 UTC
Quick question, this patch moves notify2 from being an optional build time option to now being a requirement (i.e., to RUN_DEPENDS from OPTIONS_DEFINE where it was not enabled by default). This represents a change form the previous 2.3.9 package. What was the justification for this change?

The version of cherrypy currently in ports (5.4.0) will cause sabnzb 3 to crash (see https://github.com/sabnzbd/sabnzbd/issues/1524). This was never an issue before since SAB used to include cherrypy as part of its source. Since V3 this is no longer the case. I opened a bug against cherrypy https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247597 for this reason but it has elicited no response from the maintainer. It might be worth noting in the pkg-message that SAB may crash when changing the theme (e.g., Glitter - Default to Glitter - Night) when it uses cherrypy-5.4.0 from ports and that the problem lies not within SAB but in cherrypy. (I've got cherrypy 8.9.1 built locally as a package and SAB works fine with it.
Comment 7 joshruehlig 2020-08-13 19:48:55 UTC
Created attachment 217202 [details]
3.0.0A1 Example Patch

I also attached an example patch for version 3.0.0Alpha1 from flo@smeets.xyz a few month back. I'll check to see it if there is anything in there that may be worth integrating into our current patch.

While we are updating this port, does anyone want to take over maintainership? I have a young son now and another one on the way, so I can't guarantee I will be able to be very responsive to port updates/reviews for the next few years.

Thanks
Comment 8 joshruehlig 2020-08-13 20:21:28 UTC
@colmconn@gmail.com
I think it makes sense to require 'notify2' since it is listed in "requirements.txt" in SABnzbd's source files. It may actually not be needed at the moment, but then at least we will be consistent with what the program expects.

Thank you for the investigation on the CherryPy bug! I think the proper way to fix this is to get the version in the ports tree updated, and in the sabnzbdplus port we can require at minimum the newer (working) version. If you submit a proposed patch for py-cherrypy, the developer will need to respond within 2 weeks or the patch can be approved without their approval.
Comment 9 joshruehlig 2020-08-13 20:23:03 UTC
(In reply to joshruehlig from comment #7)
@flo, any reason you added py-six in your patch? Do we no longer need it?
Comment 10 James French 2020-08-14 03:11:10 UTC
(In reply to joshruehlig from comment #7)

I'm happy enough to take it over, but I'll give Florian first right of refusal on it before I update my patch with that change.
Comment 11 James French 2020-08-14 06:43:57 UTC
(In reply to joshruehlig from comment #8)

A bit of testing shows that the port works without notify2, but I agree as it's in requirements.txt, there's no guarantee that future versions will still be happy so it probably should be a dependency.

I'd be happy enough to compromise and make it a port option for now.

I've also submitted a patch on the cherrypy bug to take it all the way up to 17.4.2 (the last supported version with Python 2 support). I can confirm that version fixes the crash issue so it's probably better to resolve it on that bug. CherryPy 18.6.0 is the latest release but it needs a dependency not yet in the ports tree and Python 2 support was dropped in 18.0.0. While Python 2 is still in the tree for the next six months or so, it's probably better to keep a supported (LTS) version rather than the bleeding edge.
Comment 12 joshruehlig 2020-08-14 06:55:51 UTC
Awesome thanks for the quick patch for CherryPy! Hopefully we can get Nicola to review, or at least respond if they no longer plan on maintaining that port so we can get your patch reviewed quickly.

In the meantime I'll try both applying both patches and make sure everything works on a fresh system.
Comment 13 Florian Smeets freebsd_committer freebsd_triage 2020-08-14 23:04:53 UTC
(In reply to joshruehlig from comment #9)
I don't recall why I added py-six, it was quite some time ago. It might have been required in Alpha1 ?!

I'll try to test the cherry changes and do some final test with sabnzbd 3.0.0 and try to commit everything tomorrow. We can commit the py-cherry port based on maintainer timeout.

I would only maintain it if no one else would step up, so James French, it's all yours :)
Comment 14 James French 2020-08-15 05:52:24 UTC
Created attachment 217221 [details]
Update to 3.0.0, take Maintainership, Added Desktop Options

Updated patch, moves notify2 to be an option as discussed above, and I also added dbus and pygobject3 as additional options. The three of them work in tandem for a desktop install. I've made none of them default for now.

I've also taken maintainership in this patch.
Comment 15 joshruehlig 2020-08-15 10:09:32 UTC
Can we require cherrypy>=17.4.2, (assuming these will get updated together) that way we avoid the possibility of having a configuration that is known to crash.
Comment 16 James French 2020-08-15 10:20:06 UTC
Created attachment 217230 [details]
Patch per 217221, with CherryPy Version Requirement Set

(In reply to joshruehlig from comment #15)

Done, this is the same as the patch in attachment 217221 [details] with the version requirement set to 8.9.1 (which was the earliest confirmed working version on the cherrypy bug).

I won't obsolete the other patch as if cherrypy doesn't get updated we should still be able to update this port. The crash is an existing issue with the current version of sabnzbd in the tree as is.
Comment 17 joshruehlig 2020-08-15 10:25:58 UTC
Comment on attachment 217230 [details]
Patch per 217221, with CherryPy Version Requirement Set

Thanks, hopefully can test tomorrow and report back/update the flags.
Comment 18 commit-hook freebsd_committer freebsd_triage 2020-08-16 20:58:26 UTC
A commit references this bug:

Author: flo
Date: Sun Aug 16 20:58:02 UTC 2020
New revision: 545135
URL: https://svnweb.freebsd.org/changeset/ports/545135

Log:
  - update to 3.0.0
  - pass maintainership to submitter

  PR:		248525
  Submitted by:	James French <james@french.id.au>
  Approved by:	joshruehlig@gmail.com (previous maintainer)

Changes:
  head/news/sabnzbdplus/Makefile
  head/news/sabnzbdplus/distinfo
  head/news/sabnzbdplus/files/patch-SABnzbd.py
  head/news/sabnzbdplus/pkg-plist
Comment 19 Florian Smeets freebsd_committer freebsd_triage 2020-08-17 17:00:30 UTC
Committed. Thanks.
Comment 20 joshruehlig 2020-08-21 08:14:03 UTC
Thank you all for getting this done. Testing on a fresh VM install and the port is working great.