forked from pool/python-pysnmp
Compare commits
10 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| f17bf3294a | |||
| 2820f26e2e | |||
| 4e4d238312 | |||
| df575c1f2a | |||
| d986b616e0 | |||
| fd83e12feb | |||
| b8e7fdd6a5 | |||
| 2e7e5b6413 | |||
| fa226e5631 | |||
| 01c88e1bf2 |
14
download-mibs.sh
Normal file
14
download-mibs.sh
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
MIBS="LEXTUDIO-TEST-MIB CISCO-IPSEC-TC CISCO-SMI CISCO-TC CISCO-ENHANCED-IPSEC-FLOW-MIB"
|
||||||
|
URL_BASE="https://raw.githubusercontent.com/lextudio/mibs.pysnmp.com/refs/heads/master/asn1"
|
||||||
|
|
||||||
|
tmpdir=$(mktemp -d)
|
||||||
|
for mib in $MIBS; do
|
||||||
|
curl -o $tmpdir/$mib $URL_BASE/$mib
|
||||||
|
done
|
||||||
|
|
||||||
|
tar -czvf mibs.tgz -C $tmpdir .
|
||||||
|
rm -rf $tmpdir
|
||||||
3
mibs.tgz
Normal file
3
mibs.tgz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:5644b9424172e6a3dd05fe87c1fcc4e4b1a42b4a01910c96120c2b8736b95af8
|
||||||
|
size 56364
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:404f84ff5d8b737d4b86cf078e5908b899ed22ca0d9d26a28d9b105f289d3476
|
|
||||||
size 458256
|
|
||||||
3
pysnmp-7.1.22.tar.gz
Normal file
3
pysnmp-7.1.22.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6bda6ac80d65fac77fd40f259405fc066b4218a616bf16b4345b3e98ca70feeb
|
||||||
|
size 463898
|
||||||
@@ -1,3 +1,141 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 6 04:26:48 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Update to 7.1.22:
|
||||||
|
* Dropped support for Python 3.9.
|
||||||
|
* Added Python 3.14 to test matrix.
|
||||||
|
* Fixed a bug in bulk walk command when lookupMib is set to False.
|
||||||
|
* Implemented v1arch dispatcher timeout support.
|
||||||
|
* Resolved dispatcher resource leak issue.
|
||||||
|
* Upgraded pysmi dependency to 1.6.1.
|
||||||
|
* Fixed an SNMPv2-SMI issue.
|
||||||
|
* Fixed a few MIB related issues.
|
||||||
|
* Improved shadow cloning patch.
|
||||||
|
* Fixed v1arch local address issue.
|
||||||
|
* Fixed shadow cloning issue.
|
||||||
|
* Fixed a resource leak issue.
|
||||||
|
* Updated built-in MIBs to match latest PySMI compiled results.
|
||||||
|
* Fixed two bugs in MIB related code and improved compatibility layer.
|
||||||
|
* Method names are revised to be PEP 8 compliant. Compatibility layer is
|
||||||
|
added to support most of the old method names, but will be removed in the
|
||||||
|
next major release, 8.0.
|
||||||
|
* Python 3.8 support is dropped.
|
||||||
|
* Python 3.13 support is added.
|
||||||
|
* The pysmi dependency is now optional.
|
||||||
|
- Add a script to download MIBs that the testsuite requires.
|
||||||
|
- Fix formatting in early changelog entries.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 19 18:16:03 UTC 2024 - Martin Hauke <mardnh@gmx.de>
|
||||||
|
|
||||||
|
- Update to version 7.1.4
|
||||||
|
* Dumped pysnmpcrypto dependency and bind to cryptography if
|
||||||
|
presented.
|
||||||
|
- Update to version 7.1.3
|
||||||
|
* Fixed a bulkCmd IndexError bug.
|
||||||
|
* Cleaned up nextCmd/bulkCmd related code.
|
||||||
|
* Revised docs and examples accordingly.
|
||||||
|
- Update to version 7.1.2
|
||||||
|
* Revised v1arch hlapi and its docs/examples.
|
||||||
|
* Revised nextCmd, bulkCmd, walkCmd, and bulkWalkCmd returned
|
||||||
|
collections.
|
||||||
|
* Moved Slim class to v1arch.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 12 17:46:06 UTC 2024 - Martin Hauke <mardnh@gmx.de>
|
||||||
|
|
||||||
|
- Update to version 7.1.1
|
||||||
|
* Reimplemented walkCmd and bulkWalkCmd.
|
||||||
|
- Update to version 7.1.0
|
||||||
|
* Removed pyasn1.compat dependency.
|
||||||
|
* Switched to async DNS resolver.
|
||||||
|
- Update to version 7.0.3
|
||||||
|
* The high-level API (hlapi) extended to cover lightweight SNMP
|
||||||
|
v1arch in hope to ease the use of packet-level SNMP API.
|
||||||
|
* The signature of the hlapi .sendNotification() call has changed
|
||||||
|
to accept *varBinds instead of a sequence of varBinds.
|
||||||
|
- Update to version 7.0.2
|
||||||
|
* Fixed a duplicate item issue in bulkWalkCmd.
|
||||||
|
- Update to version 7.0.1
|
||||||
|
* Many really old backward-compatibility code snippets removed.
|
||||||
|
Most importantly, everything related to (non-standard) UNIX
|
||||||
|
domain socket transport are gone.
|
||||||
|
* The MIB instrumentation API overhauled in backward incompatible
|
||||||
|
way:
|
||||||
|
+ MIB instrumentation methods signatures simplified to accept
|
||||||
|
just var-binds (as var-arg), the rest of the parameters
|
||||||
|
packed into opaque kwargs
|
||||||
|
+ CommandResponder application passes snmpEngine and optionally
|
||||||
|
user-supplied cbCtx object throughout the MIB instrumentation
|
||||||
|
methods. The goal is to let MIB objects access/modify whatever
|
||||||
|
custom Python objects they need while being called back.
|
||||||
|
* Cherry-picked many minor fixes from etingof/master branch.
|
||||||
|
- Update to version 7.0.0
|
||||||
|
* Applied PEP8 recommended names.
|
||||||
|
This breaks backward compatibility.
|
||||||
|
- Update to version 6.2.6
|
||||||
|
* Removed pyasn1.compat dependency.
|
||||||
|
- Update to version 6.2.5
|
||||||
|
* Improved OrderedDict performance.
|
||||||
|
* User credentials changes are now reflected in the LCD.
|
||||||
|
* Other cleanup.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 29 08:33:51 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
- Update to version 6.2.4
|
||||||
|
* Deleted more obsolete items.
|
||||||
|
- Update to version 6.2.3
|
||||||
|
* Removed unused dependencies.
|
||||||
|
- Enable tests
|
||||||
|
- Get source from pypi, github tag doesn't have the latest version and
|
||||||
|
looks like the releases are not done in the github.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Jul 20 09:33:35 UTC 2024 - Martin Hauke <mardnh@gmx.de>
|
||||||
|
|
||||||
|
- Update to version 6.2.2
|
||||||
|
* 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
|
||||||
|
* Removed package postfix. A helper release to enable migration.
|
||||||
|
- Update to version 5.0.34
|
||||||
|
Changes since 5.0.28
|
||||||
|
* Fixed a v3 authentication issue when wrong user name is used.
|
||||||
|
* Fixed an import error with Python 3.12.
|
||||||
|
* Added timeout and retries to Slim class.
|
||||||
|
* Added experimental Python 3.12 support based on pyasyncore.
|
||||||
|
But all asyncore based API is deprecated and will be removed
|
||||||
|
in the next major release.
|
||||||
|
* Added pyasn1 0.5.1 support.
|
||||||
|
* Fix asyncio hlapi double awaitable returns.
|
||||||
|
- Drop patch:
|
||||||
|
* support-new-pyasn1.patch (not longer needed)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 1 08:12:53 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
Thu Feb 1 08:12:53 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
@@ -1107,7 +1245,7 @@ Tue Mar 23 13:13:13 CET 2010 - boris@steki.net
|
|||||||
for utils sub package main package.
|
for utils sub package main package.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 16 2009 James Oakley <jfunk@funktronics.ca> - 4.1.10-1
|
Mon Feb 16 2009 - James Oakley <jfunk@funktronics.ca> - 4.1.10-1
|
||||||
|
|
||||||
- Update to 4.1.10a
|
- Update to 4.1.10a
|
||||||
- Internal MIB indexing method __indexMib() unmangled to facilitate
|
- Internal MIB indexing method __indexMib() unmangled to facilitate
|
||||||
@@ -1196,7 +1334,7 @@ Mon Feb 16 2009 James Oakley <jfunk@funktronics.ca> - 4.1.10-1
|
|||||||
should be a one-based.
|
should be a one-based.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Apr 23 2007 James Oakley <jfunk@funktronics.ca> - 4.1.7-1
|
Mon Apr 23 2007 - James Oakley <jfunk@funktronics.ca> - 4.1.7-1
|
||||||
|
|
||||||
- Update to 4.1.7
|
- Update to 4.1.7
|
||||||
- Low-level debugging facility implemented
|
- Low-level debugging facility implemented
|
||||||
@@ -1257,22 +1395,22 @@ Mon Apr 23 2007 James Oakley <jfunk@funktronics.ca> - 4.1.7-1
|
|||||||
- A handful of minor fixes applied (SourceForge tracker IDs #1537592,
|
- A handful of minor fixes applied (SourceForge tracker IDs #1537592,
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jun 22 2006 James Oakley <jfunk@funktronics.ca> - 4.1.6-1
|
Thu Jun 22 2006 - James Oakley <jfunk@funktronics.ca> - 4.1.6-1
|
||||||
|
|
||||||
- Update
|
- Update
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Oct 19 2005 James Oakley <jfunk@funktronics.ca> - 4.1.4-ft.4
|
Wed Oct 19 2005 - James Oakley <jfunk@funktronics.ca> - 4.1.4-ft.4
|
||||||
|
|
||||||
- Fix SNMPv1 requestid problem
|
- Fix SNMPv1 requestid problem
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Oct 12 2005 James Oakley <jfunk@funktronics.ca> - 4.1.4-ft.3
|
Wed Oct 12 2005 - James Oakley <jfunk@funktronics.ca> - 4.1.4-ft.3
|
||||||
|
|
||||||
- Build for SL10
|
- Build for SL10
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Sep 28 2005 James Oakley <jfunk@funktronics.ca> - 4.1.4-ft.2
|
Wed Sep 28 2005 - James Oakley <jfunk@funktronics.ca> - 4.1.4-ft.2
|
||||||
|
|
||||||
- Add requirements
|
- Add requirements
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pysnmp
|
# spec file for package python-pysnmp
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC and contributors
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -17,24 +17,28 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: python-pysnmp
|
Name: python-pysnmp
|
||||||
Version: 5.0.28
|
Version: 7.1.22
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A pure-Python SNMPv1/v2c/v3 library
|
Summary: A pure-Python SNMPv1/v2c/v3 library
|
||||||
License: BSD-2-Clause
|
License: BSD-2-Clause
|
||||||
URL: https://github.com/lextudio/pysnmp
|
URL: https://github.com/lextudio/pysnmp
|
||||||
Source: https://github.com/lextudio/pysnmp/archive/refs/tags/v%{version}.tar.gz#/pysnmp-%{version}.tar.gz
|
Source0: https://github.com/lextudio/pysnmp/archive/refs/tags/v%{version}.tar.gz#/pysnmp-%{version}.tar.gz
|
||||||
# PATCH-FIX-UPSTREAM ish? Sourced from gh#pyasn1/pyasn1/issues/28
|
# Generated by download-mibs.sh
|
||||||
Patch0: support-new-pyasn1.patch
|
Source1: mibs.tgz
|
||||||
|
Source99: download-mibs.sh
|
||||||
|
BuildRequires: %{python_module flit-core}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module poetry-core}
|
BuildRequires: %{python_module pyasn1}
|
||||||
BuildRequires: %{python_module pysmi}
|
BuildRequires: %{python_module pysmi}
|
||||||
|
BuildRequires: %{python_module pytest-asyncio}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: net-snmp
|
BuildRequires: net-snmp
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
|
Requires: python-cryptography
|
||||||
Requires: python-pyasn1 >= 0.4.8
|
Requires: python-pyasn1 >= 0.4.8
|
||||||
Requires: python-pysmi
|
Requires: python-pysmi
|
||||||
Requires: python-pysnmpcrypto
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@@ -58,7 +62,7 @@ Provides: %{python_module pysnmp-doc = %{version}}
|
|||||||
PySNMP documentation and examples.
|
PySNMP documentation and examples.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n pysnmp-%{version}
|
%autosetup -p1 -n pysnmp-%{version} -a1
|
||||||
# Remove uneeded files
|
# Remove uneeded files
|
||||||
find docs -name "\.*" -exec rm -Rf {} +
|
find docs -name "\.*" -exec rm -Rf {} +
|
||||||
|
|
||||||
@@ -70,15 +74,23 @@ find docs -name "\.*" -exec rm -Rf {} +
|
|||||||
chmod -x docs/net-snmptrapd.conf docs/net-snmpd.conf
|
chmod -x docs/net-snmptrapd.conf docs/net-snmpd.conf
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
### Disable checks since those require a running snmpd
|
%check
|
||||||
#%%check
|
mibdump --generate-mib-texts NET-SNMP-EXAMPLES-MIB
|
||||||
#%%python_expand PYTHONPATH=%%{buildroot}%%{$python_sitelib} ./runtests.sh
|
mibdump --generate-mib-texts IF-MIB
|
||||||
|
mibdump --generate-mib-texts ./LEXTUDIO-TEST-MIB
|
||||||
|
mibdump --generate-mib-texts ./CISCO-ENHANCED-IPSEC-FLOW-MIB
|
||||||
|
|
||||||
|
# Running tests with python -m to make it work with the import path
|
||||||
|
%{python_expand #
|
||||||
|
# Not running asyncio tests that requires network
|
||||||
|
$python -m pytest -v -m 'not asyncio'
|
||||||
|
}
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE.rst
|
%license LICENSE.rst
|
||||||
%doc CHANGES.txt README.md THANKS.txt TODO.txt docs examples
|
%doc README.md docs examples
|
||||||
%{python_sitelib}/pysnmp
|
%{python_sitelib}/pysnmp
|
||||||
%{python_sitelib}/pysnmp_lextudio-%{version}.dist-info
|
%{python_sitelib}/pysnmp-%{version}.dist-info
|
||||||
|
|
||||||
%files -n python-pysnmp-doc
|
%files -n python-pysnmp-doc
|
||||||
%license LICENSE.rst
|
%license LICENSE.rst
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
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