Bug 241827

Summary: security/theonionbox: Unbreak at runtime and prepare for urllib3 1.25.6
Product: Ports & Packages Reporter: Kai Knoblich <kai>
Component: Individual Port(s)Assignee: Yuri Victorovich <yuri>
Status: Closed FIXED    
Severity: Affects Only Me CC: joneum, kai, yuri
Priority: --- Keywords: buildisok
Version: LatestFlags: bugzilla: maintainer-feedback? (yuri)
joneum: merge-quarterly+
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 229322    
Attachments:
Description Flags
theonionbox-fix-runtime-and-prepare-for-urllib3-1.25.6.patch kai: maintainer-approval? (yuri)

Description Kai Knoblich freebsd_committer 2019-11-09 14:13:54 UTC
Created attachment 208999 [details]
theonionbox-fix-runtime-and-prepare-for-urllib3-1.25.6.patch

Hi Yuri,

attached is a patch that fixes security/theonionbox at runtime. Since the 4.3.1 release the requirements for net/py-urllib3 were tightened (= >=1.24.2,<1.25) by upstream and this causes the port to fail at runtime:

> pkg_resources.DistributionNotFound: The 'urllib3<1.25,>=1.24.2' distribution was not found and is required by theonionbox

Apart from that the requirements for security/py-stem needs also to be relaxed:

> pkg_resources.DistributionNotFound: The 'stem<=1.6,>=1.5.4' distribution was not found and is required by theonionbox

There's a second check for the dependencies in "theonionbox.py" which emits warnings when left unpatched:

> [WARN]  14:04:02.177 Required python module version 'stem<=1.6,>=1.5.4' not
>                      installed (version 'stem 1.7.1' found). Please run 'pip3
>                      install "stem<=1.6,>=1.5.4"'.
> [WARN]  14:04:02.187 Required python module version 'urllib3<1.25,>=1.24.2' not
>                      installed (version 'urllib3 1.22' found). Please run 'pip3
>                      install "urllib3<1.25,>=1.24.2"'.

The attached patch fixes all the mentioned issues and prepares security/theonionbox also to be usable with the upcoming update of net/py-urllib3 (see bug #229322).

QA:
~~~
- poudriere (11.3-RELEASE, amd64) -> OK
- Quick runtime test -> OK
Comment 1 Automation User 2019-11-24 04:55:51 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/98100927
Comment 2 Yuri Victorovich freebsd_committer 2019-11-24 05:06:36 UTC
Committed, thanks!
Comment 3 commit-hook freebsd_committer 2019-11-24 05:07:26 UTC
A commit references this bug:

Author: yuri
Date: Sun Nov 24 05:06:27 UTC 2019
New revision: 518295
URL: https://svnweb.freebsd.org/changeset/ports/518295

Log:
  security/theonionbox: Unbreak at runtime and prepare for urllib3 1.25.6

  PR:		241827
  Submitted by:	kai

Changes:
  head/security/theonionbox/Makefile
  head/security/theonionbox/files/patch-setup.py
  head/security/theonionbox/files/patch-theonionbox_theonionbox.py
Comment 4 Kai Knoblich freebsd_committer 2019-11-25 07:47:09 UTC
(In reply to Yuri Victorovich from comment #2)

Thanks for committing the changes!

I re-opened this bug due the pending MFH because the port in the 2019Q4 branch is still broken.

Can you you please MFH the changes to the 2019Q4 branch? It will also pave the way for net/py-urllib3 1.25.x then.
Comment 5 Jochen Neumeister freebsd_committer 2019-11-25 09:28:58 UTC
Approved for 2019Q4
Comment 6 Kai Knoblich freebsd_committer 2019-11-25 19:57:13 UTC
I'm closing this PR now as it's no more a blocker for bug #229322 because the approval for merging the urllib3 release 1.25.6 didn't get its approval.

Thus MFH'ing the changes in preparation for urllib3 is now obsolete. 

(In reply to Yuri Victorovich from comment #2)

I'll let you decide if you still want to do a MFH for security/theonionbox. The approval is given and some users would IMHO benefit from it.

(In reply to Jochen Neumeister from comment #5)

Thank you Jochen for the quick approval!
Comment 7 commit-hook freebsd_committer 2019-11-26 02:01:16 UTC
A commit references this bug:

Author: yuri
Date: Tue Nov 26 02:00:18 UTC 2019
New revision: 518441
URL: https://svnweb.freebsd.org/changeset/ports/518441

Log:
  MFH: r518295

  security/theonionbox: Unbreak at runtime and prepare for urllib3 1.25.6

  PR:		241827
  Submitted by:	kai

  Approved by:	ports-secteam@FreeBSD.org

Changes:
_U  branches/2019Q4/
  branches/2019Q4/security/theonionbox/Makefile
  branches/2019Q4/security/theonionbox/files/patch-setup.py
  branches/2019Q4/security/theonionbox/files/patch-theonionbox_theonionbox.py