FS#75432 - [impacket] missing dependency

Attached to Project: Community Packages
Opened by Alexandre ZANNI (noraj) - Tuesday, 26 July 2022, 21:26 GMT
Last edited by Jelle van der Waa (jelly) - Monday, 05 June 2023, 18:53 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

impacket actually requires python-setuptools at runtime. It's not listed in setup.py or requirements.txt but it's `import pkg_resources` (cf. https://github.com/SecureAuthCorp/impacket/blob/3c6713e309cae871d685fa443d3e21b7026a2155/impacket/version.py#L10) in `impacket/version.py`. So without setup tools it's triggering the following error

```
ModuleNotFoundError: No module named 'pkg_resources'
```

Additional info:
* package version(s) : 0.9.24
This task depends upon

Closed by  Jelle van der Waa (jelly)
Monday, 05 June 2023, 18:53 GMT
Reason for closing:  Fixed
Additional comments about closing:  0.9.24-3
Comment by Toolybird (Toolybird) - Wednesday, 27 July 2022, 04:23 GMT
There is mention of this pkg_resources thing in the wiki [1]. It seems like the pkg is doing something legacy and/or deprecated. Worth reporting upstream?

[1] https://wiki.archlinux.org/title/Python_package_guidelines#setuptools_or_distutils
Comment by Alexandre ZANNI (noraj) - Wednesday, 27 July 2022, 17:18 GMT
Yes impacket doesn't follow PEP517 so we must include setuptools as a dependency. We can still report upstream but they won't move quickly so in the meantime this is the way to go.

> If the resulting package includes executables which import the deprecated pkg_resources module, then setuptools must be additionally specified as a depends in the split package_*() functions; alternatively, if the PKGBUILD only installs the Python package for a single version of Python, setuptools should be moved from makedepends to depends.

Update: I mentioned it upstream https://github.com/SecureAuthCorp/impacket/issues/885#issuecomment-1197218746

Loading...