Bug 256361 - security/py-requests-credssp: Fails to run: broken dependencies (ModuleNotFoundError: No module named 'spnego')
Summary: security/py-requests-credssp: Fails to run: broken dependencies (ModuleNotFou...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Kevin Bowling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-02 00:50 UTC by Pavel Timofeev
Modified: 2021-06-23 21:30 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (rozhuk.im)
kbowling: merge-quarterly+


Attachments
port patch (1.20 KB, patch)
2021-06-02 00:50 UTC, Pavel Timofeev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Timofeev 2021-06-02 00:50:51 UTC
Created attachment 225484 [details]
port patch

Actualize python module list security/py-requests-credssp depends on:
- Remove security/py-ntlm-auth
- Add security/py-pyspnego
- Cosmetic s/>=0/>0/
- Bump port revision

To verify deps for 1.2.0 version see https://github.com/jborean93/requests-credssp/blob/v1.2.0/setup.py#L24-L29

Also there is extra dependency on security/py-gssapi. Not sure if it should be added as well
Comment 1 Pavel Timofeev 2021-06-02 00:54:08 UTC
I was using ansible for deploy Windows machine and found out it was not working properly. I was getting error:

UNREACHABLE! => {"changed": false, "msg": "credssp: requests auth method is credssp, but requests-credssp is not installed", "unreachable": true}


However requests-credssp was installed. To see what example was wrong I tried:

$ python3 -c "from requests_credssp import HttpCredSSPAuth"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/requests_credssp/__init__.py", line 6, in <module>
    from requests_credssp.credssp import HttpCredSSPAuth
  File "/usr/local/lib/python3.7/site-packages/requests_credssp/credssp.py", line 10, in <module>
    import spnego
ModuleNotFoundError: No module named 'spnego'

This is how I found it
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2021-06-02 01:01:34 UTC
(In reply to timp87 from comment #1)

Thank you for the report. To confirm, the port currently fails to run?
Comment 3 Pavel Timofeev 2021-06-02 01:11:18 UTC
(In reply to Kubilay Kocak from comment #2)
I'm not sure if it fails always, but at least it fails in my case
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-06-23 21:28:03 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b774f59d2df7d9df10c3b39f68796360e79c89e8

commit b774f59d2df7d9df10c3b39f68796360e79c89e8
Author:     Pavel Timofeev <timp87@gmail.com>
AuthorDate: 2021-06-23 21:26:32 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2021-06-23 21:27:36 +0000

    security/py-requests-credssp: Fix dependencies

    The module requires and uses spnego for NTLM.

    PR:             256361
    Approved by:    maintainer timeout

 security/py-requests-credssp/Makefile | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2021-06-23 21:30:04 UTC
A commit in branch 2021Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3e55273e25e24d0707265e48545a31016e749db3

commit 3e55273e25e24d0707265e48545a31016e749db3
Author:     Pavel Timofeev <timp87@gmail.com>
AuthorDate: 2021-06-23 21:26:32 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2021-06-23 21:29:37 +0000

    security/py-requests-credssp: Fix dependencies

    The module requires and uses spnego for NTLM.

    PR:             256361
    Approved by:    maintainer timeout

    (cherry picked from commit b774f59d2df7d9df10c3b39f68796360e79c89e8)

 security/py-requests-credssp/Makefile | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Comment 6 Kevin Bowling freebsd_committer freebsd_triage 2021-06-23 21:30:23 UTC
The patch is an obvious correction to the module's dependencies.  Thanks for your contribution!