Bug 242025 - www/mitmproxy: Fails to run: 'ldap3<2.6,>=2.5' distribution not found after www/ldap3 update
Summary: www/mitmproxy: Fails to run: 'ldap3<2.6,>=2.5' distribution not found after w...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Kai Knoblich
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2019-11-17 10:32 UTC by Alex Dupre
Modified: 2019-12-09 16:48 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (gaod)


Attachments
mitmproxy-fix-and-document-dependencies.patch (3.15 KB, patch)
2019-12-02 11:52 UTC, Kai Knoblich
no flags Details | Diff
mitmproxy-fix-and-document-dependencies-v2.patch (3.39 KB, patch)
2019-12-09 16:48 UTC, Kai Knoblich
kai: maintainer-approval? (gaod)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Dupre freebsd_committer 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 freebsd_committer freebsd_triage 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 freebsd_committer freebsd_triage 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 freebsd_committer 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 freebsd_committer 2019-11-17 17:23:45 UTC
Sorry for the mess. Any action from me is required?
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 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 freebsd_committer 2019-11-18 06:38:26 UTC
(In reply to Kai Knoblich from comment #3)
No prob, take it.
Comment 8 Kai Knoblich freebsd_committer 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 freebsd_committer 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 freebsd_committer 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 freebsd_committer 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 freebsd_committer 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.