Created attachment 232800 [details] Update pysnmp to the latest version from GitHub The site snmplabs.com is dead. The github repo has not received any updates in years. The original code does not work properly on Python 3.9 An actively developed fork can be found at https://github.com/pysnmp . I'm providing a patch which does the bare minimum to build the pysnmp and it's dependencies: - pysnmp - pysmi - pyasn1 - pyasn1-modules I have not updated py-pysnmp-mibs as it seems not necessary since version 4 of pysnmp.
OK, thanks for the contribution. Maintainer approved
cc'ing other involved maintainers
(In reply to Kajetan Staszkiewicz from comment #0) I am glad that there is some apparent activity in the wider world surrounding PySNMP. Thank you for calling our attention to it. As much as I have worried about the abandoned state of the project, and about its long-time author and maintainer, Ilya Etinof, this new project does not instill much confidence as a proper successor. At least not yet. The GitHub organization claims that "This organization has no public members.", the new project has disabled GitHub issues, and there have been only three active committers since Ilya's last tag on 2019-09-24, v4.4.12, one of them evidently a bot, the others ostensibly in the employ of Splunk. The initial impression I get is that Splunk relies on PySNMP internally, and made the decision to allocate sufficient resources to mitigate its own risk with respect to an abandoned project. The fact that at least some of those commits appear in a public GitHub project is a nod to the wider PySNMP community, and for that I am grateful. Nevertheless, this is clearly not a healthy, thriving successor project at the moment. I will be happy to prepare a patch to switch net-mgmt/py-pysmi over to the new upstream. I will also be thinking carefully about whether this port is one I should continue to maintain and depend upon.
LeXstudio has stepped [0] up to fill the large hole left by Ilya's sad and untimely passing. I have submitted an update to net-mgmt/py-pysmi (bug #271230) to follow the LeXstudio fork. If mhjacks agrees, this bug could be closed OBE. [0] https://github.com/etingof/pysnmp/issues/429
maintainer approved, thanks. John and I have been discussing this offline; I work at Red Hat now and engineers who worked with Ilya have expressed their support and hope for the LeXtudio fork internally. (That's not a corporate endorsement; just a reflection of internal engineering discussions.)
Hello, I had a look at updating the Port and switching to lextudio, however, I am running into the following error when building: ===> License BSD2CLAUSE accepted by the user ===> py39-pysnmp-5.0.28 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by py39-pysnmp-5.0.28 for building ===> Extracting for py39-pysnmp-5.0.28 => SHA256 Checksum OK for lextudio-pysnmp-v5.0.28_GH0.tar.gz. ===> Patching for py39-pysnmp-5.0.28 ===> py39-pysnmp-5.0.28 depends on package: py39-setuptools>0 - found ===> py39-pysnmp-5.0.28 depends on package: py39-poetry-core>0 - found ===> py39-pysnmp-5.0.28 depends on file: /usr/local/bin/python3.9 - found ===> py39-pysnmp-5.0.28 depends on package: py39-build>=0 - found ===> py39-pysnmp-5.0.28 depends on package: py39-installer>=0 - found ===> Configuring for py39-pysnmp-5.0.28 ===> Building for py39-pysnmp-5.0.28 * Getting build dependencies for wheel... * Building wheel... Successfully built pysnmp_lextudio-5.0.28-py3-none-any.whl ===> Staging for py39-pysnmp-5.0.28 ===> py39-pysnmp-5.0.28 depends on package: py39-pyasn1>0 - found ===> py39-pysnmp-5.0.28 depends on package: py39-pycryptodomex>0 - found ===> py39-pysnmp-5.0.28 depends on package: py39-pysmi>0 - found ===> py39-pysnmp-5.0.28 depends on file: /usr/local/bin/python3.9 - found ===> Generating temporary packing list Traceback (most recent call last): File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/usr/local/lib/python3.9/site-packages/installer/__main__.py", line 98, in <module> _main(sys.argv[1:], "python -m installer") File "/usr/local/lib/python3.9/site-packages/installer/__main__.py", line 86, in _main with WheelFile.open(args.wheel) as source: File "/usr/local/lib/python3.9/contextlib.py", line 119, in __enter__ return next(self.gen) File "/usr/local/lib/python3.9/site-packages/installer/sources.py", line 162, in open with zipfile.ZipFile(path) as f: File "/usr/local/lib/python3.9/zipfile.py", line 1248, in __init__ self.fp = io.open(file, filemode) FileNotFoundError: [Errno 2] No such file or directory: '/tmp/py-pysnmp/net/fafnir/git/freebsd/ports/main/net-mgmt/py-pysnmp/work-py39/pysnmp-5.0.28/dist/pysnmp-5.0.28*.whl' *** Error code 1 Stop. make[1]: stopped in /net/fafnir/git/freebsd/ports/main/net-mgmt/py-pysnmp *** Error code 1 Stop. make: stopped in /net/fafnir/git/freebsd/ports/main/net-mgmt/py-pysnmp Does that look familiar at all to anyone?
(In reply to Alastair Hogge from comment #6) Thank you for your attention to this matter. An email list or IRC would probably be a more appropriate venue for this kind of question. So as not to let the opportunity go to waste, my best guess is that the name of the port and the name of the source tarball are different, and you haven't yet told the port that in a way that it understands. I would expect the top of your Makefile to look something like this: PORTNAME= pysnmp DISTVERSION= 5.0.28 CATEGORIES= net-mgmt python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DISTNAME= ${PORTNAME}_lextudio-${PORTVERSION} See net-mgmt/py-pysmi for a working example of this.
(In reply to John W. O'Brien from comment #7) Hi John, Thanks for the advice, I have subscribed to freebsd-python@freebsd.org and will continue the thread there.
Please do not change the Python package name in pyproject.toml et al unless for name normalisation [0]. If anything, change the PORTNAME (or create a new port) to match the Python package metadata, which for https://github.com/lextudio/pysnmp is pysnmp-lextudio and https://github.com/pysnmp/pysnmp is pysnmplib. Not allowing any name overrides whatsoever in our PEP-517 support is deliberate not least for software supply chain security/integrity. [0] https://packaging.python.org/en/latest/specifications/name-normalization/
(In reply to Charlie Li from comment #9) Thanks Charlie, I like those suggestions and will work towards those aims.
Created attachment 243605 [details] New pure-Python library pysnmp-lextudio forked from net-mgmt/py-pysnmp Hello, I have attempted a port of pysnmp-lextudio based on the current net-mgmt/py-pysnmp.
The lextudio fork of pysnmp requires another new (bug #272713) port to build the documentation.
Created attachment 243707 [details] New pure-Python library py-pysnmp-lextudio forked from net-mgmt/py-pysnmp Prefix py- to Port.
Created attachment 243722 [details] New pure-Python library py-pysnmplib forked from net-mgmt/py-pysnmp Here is the patch for py-snmplib.
Created attachment 243723 [details] New pure-Python library py-pysnmp-lextudio forked from net-mgmt/py-pysnmp Update with ${CONFLICTS_INSTALL} on the other Python SNMP library.
Ah damn, I forgot to include ${PORTS}/net-mgmt/Makefile additions. Will correct later.
Created attachment 243724 [details] New pure-Python library py-pysnmp-lextudio forked from net-mgmt/py-pysnmp Update net-mgmt/Makefile
Created attachment 243725 [details] New pure-Python library py-pysnmplib forked from net-mgmt/py-pysnmp Update net-mgmt/Makefile
Hello, I created two separate reviews for the new Ports, review D42152 net-mgmt/py-pysnmplib, and review D42153 net-mgmt/py-pysnmp-lextudio. I do not know about maintainer status of the new ports, so I left them with ports@freebsd.org, if mhjacks@swbell.net, or no-one else wants to maintain both ports, I will look after them. Thanks.