Bug 247597

Summary: www/py-cherrypy: can py-cherrypy be upated to at least 8.9.1?
Product: Ports & Packages Reporter: colmconn
Component: Individual Port(s)Assignee: Nicola Vitale <nivit>
Status: Closed FIXED    
Severity: Affects Only Me CC: flo, james, joshruehlig
Priority: --- Flags: bugzilla: maintainer-feedback? (nivit)
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on: 250379    
Bug Blocks:    
Attachments:
Description Flags
Update to 18.6.0
none
Patch to 17.4.2 (Includes Python 2 support) none

Description colmconn 2020-06-27 17:31:52 UTC
Can www/py-cherrypy be updated to 8.9.1? 

The upcoming version 3 of sabnzbd, which no longer includes its own copy of the cherrypy source, crashes with the  version www/py-cherrypy (5.4.0) currently in ports. See https://github.com/sabnzbd/sabnzbd/issues/1524

I've patched (locally) the Makefile for www/py-cherrypy to build 8.9.1 and installed the resultant package in conjunction with a SAB 3 package which I've also built locally. The combination of  www/py-cherrypy 8.9.1 and SAB 3 solved the issue I was having where SAB 3 trying to restart itself resulted in a crash of SAB.

Below is the patch to www/py-cherrypy/Makefile I created. I also had to delete the patch file from files to get www/py-cherrypy to build successfully.

I built www/py-cherrypy for python 3.7.

--- Makefile.orig       2020-06-27 12:46:00.039224445 -0400
+++ Makefile    2020-06-27 12:47:30.267259451 -0400
@@ -2,8 +2,8 @@
 # $FreeBSD: head/www/py-cherrypy/Makefile 537989 2020-06-05 06:23:55Z jbeich $
 
 PORTNAME=      cherrypy
-PORTVERSION=   5.4.0
-PORTREVISION=  4
+PORTVERSION=   8.9.1
+PORTREVISION=  1
 CATEGORIES=    www python
 MASTER_SITES=  CHEESESHOP
 PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -22,9 +22,8 @@
 
 PORTEXAMPLES=  *
 
-USES=          python shebangfix
+USES=          python
 USE_PYTHON=    distutils autoplist concurrent
-SHEBANG_FILES= cherrypy/cherryd
 
 .include <bsd.port.options.mk>
Comment 1 Florian Smeets freebsd_committer freebsd_triage 2020-08-13 20:05:09 UTC
@Nicola, can we get a reaction on this? Are you OK with updating the port? 

@colmconn would you mind updating the port to the latest version? If we are going to touch it I think it might make the most sense to update to an up to date version?
Comment 2 James French 2020-08-14 03:54:20 UTC
Created attachment 217206 [details]
Update to 18.6.0

Attached should be a first pass at bring the port up to 18.6.0

We're looking at a fairly big jump here, so there may be warts. I've done my own testing and it seems ok on the handful of packages I use with it, but it could do with some closer scrutiny as I fully expect other breakage.

One important thing to note is that upstream dropped support for Python 2 in the 18.0.0 release. It might be a better option to only update the port as far as the latest release on the v17 branch for now at least until Python 2.7 gets dropped from the ports tree. Upstream have kept that branch as an LTS release specifically for Python 2 users.
Comment 3 James French 2020-08-14 04:51:33 UTC
Created attachment 217207 [details]
Patch to 17.4.2 (Includes Python 2 support)

Found the first issue, 18.6.0 depends on jaraco.collections which isn't currently in the ports tree. There was also a few issues with dependencies in the patch (missing ${PY_FLAVORS} and some added runtime dependencies.

Killing many birds with one stone, and attached is a patch for 17.4.2 which leaves us with Python 2 support, a supported upstream release and a working port.
Comment 4 joshruehlig 2020-08-14 17:46:34 UTC
Comment on attachment 217207 [details]
Patch to 17.4.2 (Includes Python 2 support)

I think we should have the "maintainer-approval = ?" flag on this attachment.
Comment 5 commit-hook freebsd_committer freebsd_triage 2020-08-16 20:29:20 UTC
A commit references this bug:

Author: flo
Date: Sun Aug 16 20:28:51 UTC 2020
New revision: 545134
URL: https://svnweb.freebsd.org/changeset/ports/545134

Log:
  Update to 17.4.2

  The upcoming update of news/sabnzbd to 3.0.0 needs an updated cherrypy.

  This is not the newest release of cherrypy as that has dependencies that
  aren't in ports yet, but this gets us from a 2016 release to a 2019 release

  PR:		247597
  Submitted by:	James French <james@french.id.au>
  Approved by:	maintainer timeout

Changes:
  head/www/py-cherrypy/Makefile
  head/www/py-cherrypy/distinfo
  head/www/py-cherrypy/files/
Comment 6 Florian Smeets freebsd_committer freebsd_triage 2020-08-16 20:30:03 UTC
Committed. Thanks.