forked from pool/python-pysnmp
- Update to version 6.6.2
* Deleted more obsolete items. * Removed unused dependencies. * Cleaned up sync API leftover. * Retired temporary sync API. * Removed package postfix. A helper release to enable migration. * Merged changes from 4.4.13. * Fixed more access descriptors. * Initial work to support pysmi-lextudio 1.3.0 and above. * Removed package postfix. A helper release to enable migration. * Restricted pysmi-lextudio version to 1.2.0 to avoid breaking changes. * Fixed walkCmd bug. * Fixed bulkWalkCmd bug. * Added sync oneliner back. * Fix annotations. * Added walkCmd() and bulkWalkCmd() to hlapi. * Improved Slim class to support IPv6. * Added some sync API based on asyncio. * Added custom socket support in openServerMode. * Fixed various bugs in RFC3414 error handling. * Reverted some changes in 6.0.2 on asyncio dispatch. * Deleted asyncore related bits. * Simplified asyncio dispatch. * Added ignoreNonIncreasingOid option to nextCmd and bulkCmd. * Fixed a dispatch bug related to "Slim.close". * Improved asyncio "runDispatcher" method to support timeout. * Changed internal defaults to asyncio. * Converted asyncore samples to asyncio. - Update to version 5.1.0 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pysnmp?expand=0&rev=53
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.osc
|
3
pysnmp-5.0.28.tar.gz
Normal file
3
pysnmp-5.0.28.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:404f84ff5d8b737d4b86cf078e5908b899ed22ca0d9d26a28d9b105f289d3476
|
||||||
|
size 458256
|
3
pysnmp-6.2.2.tar.gz
Normal file
3
pysnmp-6.2.2.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:58a94b4c2b717c81ece3cb7061103e05a4b8c2f19044e527481b3ada101962df
|
||||||
|
size 470689
|
1325
python-pysnmp.changes
Normal file
1325
python-pysnmp.changes
Normal file
File diff suppressed because it is too large
Load Diff
85
python-pysnmp.spec
Normal file
85
python-pysnmp.spec
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python-pysnmp
|
||||||
|
#
|
||||||
|
# Copyright (c) 2024 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Name: python-pysnmp
|
||||||
|
Version: 6.2.2
|
||||||
|
Release: 0
|
||||||
|
Summary: A pure-Python SNMPv1/v2c/v3 library
|
||||||
|
License: BSD-2-Clause
|
||||||
|
URL: https://github.com/lextudio/pysnmp
|
||||||
|
Source: https://github.com/lextudio/pysnmp/archive/refs/tags/v%{version}.tar.gz#/pysnmp-%{version}.tar.gz
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
|
BuildRequires: %{python_module poetry-core}
|
||||||
|
BuildRequires: %{python_module pysmi}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: net-snmp
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
Requires: python-pyasn1 >= 0.4.8
|
||||||
|
Requires: python-pysmi
|
||||||
|
Requires: python-pysnmpcrypto
|
||||||
|
BuildArch: noarch
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
|
%description
|
||||||
|
This project is a SNMP v1/v2c/v3 engine written in the Python
|
||||||
|
programming language.
|
||||||
|
|
||||||
|
* Complete SNMPv1/v2c and SNMPv3 engine support
|
||||||
|
* Can act as Manager and/or Agent
|
||||||
|
* Manager and Agent side MIB support
|
||||||
|
* Asynchronous operations support
|
||||||
|
* Pure-Python implementation
|
||||||
|
* py2exe and .egg friendly
|
||||||
|
* Twisted binding
|
||||||
|
|
||||||
|
%package -n python-pysnmp-doc
|
||||||
|
Summary: PySNMP documentation
|
||||||
|
Provides: %{python_module pysnmp-doc = %{version}}
|
||||||
|
|
||||||
|
%description -n python-pysnmp-doc
|
||||||
|
PySNMP documentation and examples.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1 -n pysnmp-%{version}
|
||||||
|
# Remove uneeded files
|
||||||
|
find docs -name "\.*" -exec rm -Rf {} +
|
||||||
|
|
||||||
|
%build
|
||||||
|
%pyproject_wheel
|
||||||
|
|
||||||
|
%install
|
||||||
|
%pyproject_install
|
||||||
|
chmod -x docs/net-snmptrapd.conf docs/net-snmpd.conf
|
||||||
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
|
### Disable checks since those require a running snmpd
|
||||||
|
#%%check
|
||||||
|
#%%python_expand PYTHONPATH=%%{buildroot}%%{$python_sitelib} ./runtests.sh
|
||||||
|
|
||||||
|
%files %{python_files}
|
||||||
|
%license LICENSE.rst
|
||||||
|
%doc CHANGES.rst README.md THANKS.txt TODO.txt docs examples
|
||||||
|
%{python_sitelib}/pysnmp
|
||||||
|
%{python_sitelib}/pysnmp-%{version}.dist-info
|
||||||
|
|
||||||
|
%files -n python-pysnmp-doc
|
||||||
|
%license LICENSE.rst
|
||||||
|
%doc docs examples
|
||||||
|
|
||||||
|
%changelog
|
41
support-new-pyasn1.patch
Normal file
41
support-new-pyasn1.patch
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
Index: pysnmp-5.0.28/pysnmp/proto/api/verdec.py
|
||||||
|
===================================================================
|
||||||
|
--- pysnmp-5.0.28.orig/pysnmp/proto/api/verdec.py
|
||||||
|
+++ pysnmp-5.0.28/pysnmp/proto/api/verdec.py
|
||||||
|
@@ -6,19 +6,20 @@
|
||||||
|
#
|
||||||
|
from pyasn1.type import univ
|
||||||
|
from pyasn1.codec.ber import decoder, eoo
|
||||||
|
+from pyasn1.codec.streaming import readFromStream
|
||||||
|
from pyasn1.error import PyAsn1Error
|
||||||
|
from pysnmp.proto.error import ProtocolError
|
||||||
|
|
||||||
|
|
||||||
|
def decodeMessageVersion(wholeMsg):
|
||||||
|
try:
|
||||||
|
- seq, wholeMsg = decoder.decode(
|
||||||
|
+ wholeMsg, seq = decoder.decode(
|
||||||
|
wholeMsg, asn1Spec=univ.Sequence(),
|
||||||
|
- recursiveFlag=False, substrateFun=lambda a, b, c: (a, b[:c])
|
||||||
|
+ recursiveFlag=False, substrateFun=lambda a, b, c, d: readFromStream(b, c)
|
||||||
|
)
|
||||||
|
ver, wholeMsg = decoder.decode(
|
||||||
|
wholeMsg, asn1Spec=univ.Integer(),
|
||||||
|
- recursiveFlag=False, substrateFun=lambda a, b, c: (a, b[:c])
|
||||||
|
+ recursiveFlag=False, substrateFun=lambda a, b, c, d: readFromStream(b, c)
|
||||||
|
)
|
||||||
|
if eoo.endOfOctets.isSameTypeWith(ver):
|
||||||
|
raise ProtocolError('EOO at SNMP version component')
|
||||||
|
Index: pysnmp-5.0.28/pyproject.toml
|
||||||
|
===================================================================
|
||||||
|
--- pysnmp-5.0.28.orig/pyproject.toml
|
||||||
|
+++ pysnmp-5.0.28/pyproject.toml
|
||||||
|
@@ -27,7 +27,7 @@ include = ["docs", "tests", "examples"]
|
||||||
|
|
||||||
|
[tool.poetry.dependencies]
|
||||||
|
python = "^3.7"
|
||||||
|
-pyasn1 = ">=0.4.8, <0.5.0"
|
||||||
|
+pyasn1 = "^0.5.0"
|
||||||
|
pysnmpcrypto = "^0.0.4"
|
||||||
|
pysmi-lextudio = "^1.0.4"
|
||||||
|
|
Reference in New Issue
Block a user