|Summary:||www/mitmproxy: Fails to run: 'ldap3<2.6,>=2.5' distribution not found after www/ldap3 update|
|Product:||Ports & Packages||Reporter:||Alex Dupre <ale>|
|Component:||Individual Port(s)||Assignee:||Kai Knoblich <kai>|
|Severity:||Affects Many People||CC:||gaod, kai, koobs, python, rm|
Description Alex Dupre 2019-11-17 10:32:17 UTC
pkg_resources.DistributionNotFound: The 'ldap3<2.6,>=2.5' distribution was not found and is required by mitmproxy And if I manual change the dep to allow ldap3 2.6 I get: pkg_resources.DistributionNotFound: The 'dataclasses' distribution was not found and is required by wsproto
Comment 1 Kubilay Kocak 2019-11-17 11:40:21 UTC
Notes: - Ruslan (rm@) updated ldap3 to 2.6 in ports r516400 - This port doesn't (but should) document its pinned version dependencies accurately (>=2.5,<2.6), or patch them after confirming they work with alter versions Does upstream have support for ldap3 >= 2.6? Are there any upstream bug reports, PR's, commits regarding this issue?
Comment 2 Kubilay Kocak 2019-11-17 11:49:22 UTC
dependencies were bumped in https://github.com/mitmproxy/mitmproxy/commit/b4ffc929a2d0216c3a0910e633f31212c12136cd These changes haven't yet seen release. @Maintainer, please provide a patch to update this ports *_DEPENDS lines to include *all* maximum versions specified in setup.py, which ensures at least that committers/contributors can see if there are any ports which depend on specific maximum versions of a dependency. Separately, this issue requires the following to progress: - A minimum (not changing this ports PORTVERSION) backport of an upstream commit, or another change - That allows ldap3 versions >=2.6 to be used - QA verified that mitmproxy indeed completely functions with ldap3 >= 2.6 mitmproxy test suite support in the port (make test) would be perfect for QA.
Comment 3 Kai Knoblich 2019-11-17 13:53:34 UTC
(In reply to Alex Dupre from comment #0) Hi Alex, thanks for reporting. It's ok for you if I take this PR?
Comment 4 Hung-Yi Chen 2019-11-17 14:11:05 UTC
I'll file a patch for dependencies first.
Comment 5 Ruslan Makhmatkhanov 2019-11-17 17:23:45 UTC
Sorry for the mess. Any action from me is required?
Comment 6 Kubilay Kocak 2019-11-18 00:54:34 UTC
(In reply to Ruslan Makhmatkhanov from comment #5) Nope, just CC'd you given the ldap3 upgrade was the source of the regression, and that having ports document their max version in dependency lines would have helped you with QA showing you this port wouldn't have worked with the update.
Comment 7 Alex Dupre 2019-11-18 06:38:26 UTC
(In reply to Kai Knoblich from comment #3) No prob, take it.
Comment 8 Kai Knoblich 2019-11-28 17:32:04 UTC
As Alex already pointed out in comment #0 a trivial fix by relaxing the version requirements for net/py-ldap3 won't help, as the devel/py-dataclasses package is also missing. The update of net/py-ldap3 was not the only cause as an earlier commit (net/py-wsproto in ports r511877) already broke www/mitmproxy because it misses a Python 3.6 specific dependency (= devel/py-dataclasses). This means that www/mitmproxy is also broken in the 2019Q4 branch at the moment. I'll commit soon a fix for net/py-wsproto and merge that into to the 2019Q4 branch to bring www/mitmproxy there back into a working state.
Comment 9 commit-hook 2019-11-28 17:51:44 UTC
A commit references this bug: Author: kai Date: Thu Nov 28 17:51:34 UTC 2019 New revision: 518596 URL: https://svnweb.freebsd.org/changeset/ports/518596 Log: net/py-wsproto: Fix runtime dependencies and Python version restriction * Update the RUN_DEPENDS and limit the port to Python 3.6 or newer as the support for Python 2.7 and 3.5 was dropped with the 0.15.0 release. Python 3.6 needs also the devel/py-dataclasses package as an additional dependency to work properly. * Add a "do-test" target while I'm here to make future QA easier. * Bump PORTREVISION for package change. PR: 242025 (related) Approved by: portmgr blanket (runtime fix) MFH: 2019Q4 (runtime fix) Changes: head/net/py-wsproto/Makefile
Comment 10 commit-hook 2019-11-28 18:01:48 UTC
A commit references this bug: Author: kai Date: Thu Nov 28 18:01:19 UTC 2019 New revision: 518597 URL: https://svnweb.freebsd.org/changeset/ports/518597 Log: MFH: r518596 net/py-wsproto: Fix runtime dependencies and Python version restriction * Update the RUN_DEPENDS and limit the port to Python 3.6 or newer as the support for Python 2.7 and 3.5 was dropped with the 0.15.0 release. Python 3.6 needs also the devel/py-dataclasses package as an additional dependency to work properly. * Add a "do-test" target while I'm here to make future QA easier. * Bump PORTREVISION for package change. PR: 242025 (related) Approved by: portmgr blanket (runtime fix) Approved by: ports-secteam bugfix blanket Changes: _U branches/2019Q4/ branches/2019Q4/net/py-wsproto/Makefile
Comment 11 Kai Knoblich 2019-12-02 11:52:49 UTC
Created attachment 209602 [details] mitmproxy-fix-and-document-dependencies.patch Attached is a patch that fixes the dependency for net/py-ldap3 and "documents" the RUN_DEPENDS in the port's Makefile to reduce the probability of runtime failures in the future. The patch doesn't contain support for the test suite because I would wait with it IMHO because there's work in progress for the 5.0 release at the moment and the dependencies have been changed significantly since the 4.0.4 release. (In reply to Hung-Yi Chen from comment #4) Sorry for the case if you've already worked yourself on a patch for it. If you have a better/extended patch for it, just attach it in this PR and I'll obsolete my patch then. Does the attached patch bring www/mitmproxy back into a working state?
Comment 12 Kai Knoblich 2019-12-09 16:48:21 UTC
Created attachment 209808 [details] mitmproxy-fix-and-document-dependencies-v2.patch Since ports r519201 (= update of devel/py-urwid) the patch needs to be a bit adjusted. Attached is a revised version of the patch that also relaxes the requirements for devel/py-urwid.
Comment 13 commit-hook 2019-12-16 19:37:52 UTC
A commit references this bug: Author: kai Date: Mon Dec 16 19:37:00 UTC 2019 New revision: 520286 URL: https://svnweb.freebsd.org/changeset/ports/520286 Log: www/mitmproxy: Unbreak at runtime * After r511877 (initial cause, already fixed in r518596) and r516400  the port was broken at runtime. Unbreak it by relaxing the version range for net/py-ldap3. Also relax the version range for devel/py-urwid which was recently updated in r519201. * Adjust the RUN_DEPENDS by making them more specific (as given in setup.py) to reduce the likelihood of runtime errors in the future. * Bump PORTREVISION due changed code. A MFH is not required as www/mitmproxy in the 2019Q4 branch isn't affected and was already fixed with r518597. PR: 242025 Reported by: ale  Approved by: maintainer timeout (2 weeks) Changes: head/www/mitmproxy/Makefile head/www/mitmproxy/files/patch-setup.py
Comment 14 Kai Knoblich 2019-12-16 19:41:50 UTC
Committed, both versions of www/mitmproxy (head + 2019Q4) should work properly again.