mirror of
git://slackware.nl/current.git
synced 2024-12-26 09:58:59 +01:00
Fri Nov 9 21:46:09 UTC 2018
a/udisks2-2.6.5-x86_64-3.txz: Rebuilt. Recompiled against net-snmp-5.8. ap/hplip-3.18.10-x86_64-2.txz: Rebuilt. Recompiled against net-snmp-5.8. d/bison-3.2.1-x86_64-1.txz: Upgraded. d/meson-0.48.2-x86_64-1.txz: Upgraded. l/pycairo-1.18.0-x86_64-1.txz: Upgraded. n/bridge-utils-1.6-x86_64-1.txz: Upgraded. n/net-snmp-5.8-x86_64-1.txz: Upgraded. Shared library .so-version bump. n/ntp-4.2.8p12-x86_64-2.txz: Rebuilt. Recompiled against net-snmp-5.8. n/php-7.2.12-x86_64-2.txz: Rebuilt. Recompiled against net-snmp-5.8. xap/blackbox-0.74-x86_64-2.txz: Rebuilt. When building, don't install anything to the system. Thanks to Didier Spaier. xap/sane-1.0.27-x86_64-4.txz: Rebuilt. Recompiled against net-snmp-5.8. extra/aspell-word-lists/aspell-ar-1.2_0-x86_64-1.txz: Added. extra/aspell-word-lists/aspell-ast-0.01-x86_64-1.txz: Added. extra/aspell-word-lists/aspell-ca-2.1.5_1-x86_64-1.txz: Upgraded. extra/aspell-word-lists/aspell-de_alt-2.1_1-x86_64-1.txz: Added. extra/aspell-word-lists/aspell-fy-0.12_0-x86_64-1.txz: Added. extra/aspell-word-lists/aspell-grc-0.02_0-x86_64-1.txz: Added. extra/aspell-word-lists/aspell-hy-0.10.0_0-x86_64-1.txz: Added. extra/aspell-word-lists/aspell-ky-0.01_0-x86_64-1.txz: Added. extra/aspell-word-lists/aspell-ml-0.03_1-x86_64-1.txz: Added. extra/aspell-word-lists/aspell-pt_PT-20070510_0-x86_64-1.txz: Added. extra/aspell-word-lists/aspell-tk-0.01_0-x86_64-1.txz: Added.
This commit is contained in:
parent
0e6f7049d6
commit
374248fe50
46 changed files with 1855 additions and 3324 deletions
|
@ -11,9 +11,48 @@
|
|||
<description>Tracking Slackware development in git.</description>
|
||||
<language>en-us</language>
|
||||
<id xmlns="http://www.w3.org/2005/Atom">urn:uuid:c964f45e-6732-11e8-bbe5-107b4450212f</id>
|
||||
<pubDate>Fri, 9 Nov 2018 02:42:22 GMT</pubDate>
|
||||
<lastBuildDate>Fri, 9 Nov 2018 07:59:40 GMT</lastBuildDate>
|
||||
<pubDate>Fri, 9 Nov 2018 21:46:09 GMT</pubDate>
|
||||
<lastBuildDate>Sat, 10 Nov 2018 07:59:42 GMT</lastBuildDate>
|
||||
<generator>maintain_current_git.sh v 1.10</generator>
|
||||
<item>
|
||||
<title>Fri, 9 Nov 2018 21:46:09 GMT</title>
|
||||
<pubDate>Fri, 9 Nov 2018 21:46:09 GMT</pubDate>
|
||||
<link>https://git.slackware.nl/current/tag/?h=20181109214609</link>
|
||||
<guid isPermaLink="false">20181109214609</guid>
|
||||
<description>
|
||||
<![CDATA[<pre>
|
||||
a/udisks2-2.6.5-x86_64-3.txz: Rebuilt.
|
||||
Recompiled against net-snmp-5.8.
|
||||
ap/hplip-3.18.10-x86_64-2.txz: Rebuilt.
|
||||
Recompiled against net-snmp-5.8.
|
||||
d/bison-3.2.1-x86_64-1.txz: Upgraded.
|
||||
d/meson-0.48.2-x86_64-1.txz: Upgraded.
|
||||
l/pycairo-1.18.0-x86_64-1.txz: Upgraded.
|
||||
n/bridge-utils-1.6-x86_64-1.txz: Upgraded.
|
||||
n/net-snmp-5.8-x86_64-1.txz: Upgraded.
|
||||
Shared library .so-version bump.
|
||||
n/ntp-4.2.8p12-x86_64-2.txz: Rebuilt.
|
||||
Recompiled against net-snmp-5.8.
|
||||
n/php-7.2.12-x86_64-2.txz: Rebuilt.
|
||||
Recompiled against net-snmp-5.8.
|
||||
xap/blackbox-0.74-x86_64-2.txz: Rebuilt.
|
||||
When building, don't install anything to the system. Thanks to Didier Spaier.
|
||||
xap/sane-1.0.27-x86_64-4.txz: Rebuilt.
|
||||
Recompiled against net-snmp-5.8.
|
||||
extra/aspell-word-lists/aspell-ar-1.2_0-x86_64-1.txz: Added.
|
||||
extra/aspell-word-lists/aspell-ast-0.01-x86_64-1.txz: Added.
|
||||
extra/aspell-word-lists/aspell-ca-2.1.5_1-x86_64-1.txz: Upgraded.
|
||||
extra/aspell-word-lists/aspell-de_alt-2.1_1-x86_64-1.txz: Added.
|
||||
extra/aspell-word-lists/aspell-fy-0.12_0-x86_64-1.txz: Added.
|
||||
extra/aspell-word-lists/aspell-grc-0.02_0-x86_64-1.txz: Added.
|
||||
extra/aspell-word-lists/aspell-hy-0.10.0_0-x86_64-1.txz: Added.
|
||||
extra/aspell-word-lists/aspell-ky-0.01_0-x86_64-1.txz: Added.
|
||||
extra/aspell-word-lists/aspell-ml-0.03_1-x86_64-1.txz: Added.
|
||||
extra/aspell-word-lists/aspell-pt_PT-20070510_0-x86_64-1.txz: Added.
|
||||
extra/aspell-word-lists/aspell-tk-0.01_0-x86_64-1.txz: Added.
|
||||
</pre>]]>
|
||||
</description>
|
||||
</item>
|
||||
<item>
|
||||
<title>Fri, 9 Nov 2018 02:42:22 GMT</title>
|
||||
<pubDate>Fri, 9 Nov 2018 02:42:22 GMT</pubDate>
|
||||
|
|
|
@ -1,3 +1,34 @@
|
|||
Fri Nov 9 21:46:09 UTC 2018
|
||||
a/udisks2-2.6.5-x86_64-3.txz: Rebuilt.
|
||||
Recompiled against net-snmp-5.8.
|
||||
ap/hplip-3.18.10-x86_64-2.txz: Rebuilt.
|
||||
Recompiled against net-snmp-5.8.
|
||||
d/bison-3.2.1-x86_64-1.txz: Upgraded.
|
||||
d/meson-0.48.2-x86_64-1.txz: Upgraded.
|
||||
l/pycairo-1.18.0-x86_64-1.txz: Upgraded.
|
||||
n/bridge-utils-1.6-x86_64-1.txz: Upgraded.
|
||||
n/net-snmp-5.8-x86_64-1.txz: Upgraded.
|
||||
Shared library .so-version bump.
|
||||
n/ntp-4.2.8p12-x86_64-2.txz: Rebuilt.
|
||||
Recompiled against net-snmp-5.8.
|
||||
n/php-7.2.12-x86_64-2.txz: Rebuilt.
|
||||
Recompiled against net-snmp-5.8.
|
||||
xap/blackbox-0.74-x86_64-2.txz: Rebuilt.
|
||||
When building, don't install anything to the system. Thanks to Didier Spaier.
|
||||
xap/sane-1.0.27-x86_64-4.txz: Rebuilt.
|
||||
Recompiled against net-snmp-5.8.
|
||||
extra/aspell-word-lists/aspell-ar-1.2_0-x86_64-1.txz: Added.
|
||||
extra/aspell-word-lists/aspell-ast-0.01-x86_64-1.txz: Added.
|
||||
extra/aspell-word-lists/aspell-ca-2.1.5_1-x86_64-1.txz: Upgraded.
|
||||
extra/aspell-word-lists/aspell-de_alt-2.1_1-x86_64-1.txz: Added.
|
||||
extra/aspell-word-lists/aspell-fy-0.12_0-x86_64-1.txz: Added.
|
||||
extra/aspell-word-lists/aspell-grc-0.02_0-x86_64-1.txz: Added.
|
||||
extra/aspell-word-lists/aspell-hy-0.10.0_0-x86_64-1.txz: Added.
|
||||
extra/aspell-word-lists/aspell-ky-0.01_0-x86_64-1.txz: Added.
|
||||
extra/aspell-word-lists/aspell-ml-0.03_1-x86_64-1.txz: Added.
|
||||
extra/aspell-word-lists/aspell-pt_PT-20070510_0-x86_64-1.txz: Added.
|
||||
extra/aspell-word-lists/aspell-tk-0.01_0-x86_64-1.txz: Added.
|
||||
+--------------------------+
|
||||
Fri Nov 9 02:42:22 UTC 2018
|
||||
a/efibootmgr-16-x86_64-2.txz: Rebuilt.
|
||||
Reverted to previous version. We'd tried this before and it still doesn't
|
||||
|
|
724
FILELIST.TXT
724
FILELIST.TXT
File diff suppressed because it is too large
Load diff
1
extra/source/aspell-word-lists/build/aspell5-tk
Normal file
1
extra/source/aspell-word-lists/build/aspell5-tk
Normal file
|
@ -0,0 +1 @@
|
|||
1
|
1
extra/source/aspell-word-lists/build/aspell6-ar
Normal file
1
extra/source/aspell-word-lists/build/aspell6-ar
Normal file
|
@ -0,0 +1 @@
|
|||
1
|
1
extra/source/aspell-word-lists/build/aspell6-ast
Normal file
1
extra/source/aspell-word-lists/build/aspell6-ast
Normal file
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -1 +1 @@
|
|||
5
|
||||
1
|
||||
|
|
1
extra/source/aspell-word-lists/build/aspell6-de_alt
Normal file
1
extra/source/aspell-word-lists/build/aspell6-de_alt
Normal file
|
@ -0,0 +1 @@
|
|||
1
|
1
extra/source/aspell-word-lists/build/aspell6-fy
Normal file
1
extra/source/aspell-word-lists/build/aspell6-fy
Normal file
|
@ -0,0 +1 @@
|
|||
1
|
1
extra/source/aspell-word-lists/build/aspell6-grc
Normal file
1
extra/source/aspell-word-lists/build/aspell6-grc
Normal file
|
@ -0,0 +1 @@
|
|||
1
|
1
extra/source/aspell-word-lists/build/aspell6-hy
Normal file
1
extra/source/aspell-word-lists/build/aspell6-hy
Normal file
|
@ -0,0 +1 @@
|
|||
1
|
1
extra/source/aspell-word-lists/build/aspell6-ky
Normal file
1
extra/source/aspell-word-lists/build/aspell6-ky
Normal file
|
@ -0,0 +1 @@
|
|||
1
|
1
extra/source/aspell-word-lists/build/aspell6-ml
Normal file
1
extra/source/aspell-word-lists/build/aspell6-ml
Normal file
|
@ -0,0 +1 @@
|
|||
1
|
1
extra/source/aspell-word-lists/build/aspell6-pt_PT
Normal file
1
extra/source/aspell-word-lists/build/aspell6-pt_PT
Normal file
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -389,13 +389,22 @@ gzip ./source/n/pidentd/doinst.sh
|
|||
gzip ./source/n/pidentd/pidentd.conf.diff
|
||||
gzip ./source/n/cifs-utils/cifs-utils-6.7-talloc.patch
|
||||
gzip ./source/n/autofs/doinst.sh
|
||||
gzip ./source/n/net-snmp/net-snmp-5.7.3-Remove-U64-typedef.patch
|
||||
gzip ./source/n/net-snmp/net-snmp-5.7.3-openssl.patch
|
||||
gzip ./source/n/net-snmp/net-snmp-5.7.2-cert-path.patch
|
||||
gzip ./source/n/net-snmp/net-snmp-5.8-agentx-disconnect-crash.patch
|
||||
gzip ./source/n/net-snmp/net-snmp-5.7.2-pie.patch
|
||||
gzip ./source/n/net-snmp/net-snmp-5.8-Remove-U64-typedef.patch
|
||||
gzip ./source/n/net-snmp/net-snmp-5.8-autofs-skip.patch
|
||||
gzip ./source/n/net-snmp/net-snmp-5.8-python3.patch
|
||||
gzip ./source/n/net-snmp/net-snmp-5.7.2-autoreconf.patch
|
||||
gzip ./source/n/net-snmp/net-snmp-5.8-cflags.patch
|
||||
gzip ./source/n/net-snmp/net-snmp-5.8-multilib.patch
|
||||
gzip ./source/n/net-snmp/snmpd.conf
|
||||
gzip ./source/n/net-snmp/doinst.sh
|
||||
gzip ./source/n/net-snmp/net-snmp-5.7.3-Fix-Makefile-PL.patch
|
||||
gzip ./source/n/net-snmp/net-snmp-5.7.3-mariadb-10.2.8.diff
|
||||
gzip ./source/n/net-snmp/net-snmp.net-snmp-create-v3-user.etc.snmpd.conf.diff
|
||||
gzip ./source/n/net-snmp/net-snmp-5.8-libnetsnmptrapd-against-MYSQL_LIBS.patch
|
||||
gzip ./source/n/net-snmp/net-snmp-5.8-dir-fix.patch
|
||||
gzip ./source/n/net-snmp/net-snmp-5.7.3-iterator-fix.patch
|
||||
gzip ./source/n/net-snmp/net-snmp-5.8-modern-rpm-api.patch
|
||||
gzip ./source/n/net-snmp/net-snmp-5.8-test-debug.patch
|
||||
gzip ./source/n/epic5/openssl-1.1.patch
|
||||
gzip ./source/n/uucp/policy.h.diff
|
||||
gzip ./source/n/ulogd/doinst.sh
|
||||
|
@ -542,7 +551,6 @@ gzip ./source/n/dovecot/dovecot.default.shadow.auth.diff
|
|||
gzip ./source/n/dovecot/dovecot.glibc228.patch
|
||||
gzip ./source/n/dovecot/doinst.sh
|
||||
gzip ./source/n/dovecot/dovecot.config.README.diff
|
||||
gzip ./source/n/bridge-utils/bridge-utils-1.5-linux_3.8.x.patch
|
||||
gzip ./source/n/biff+comsat/biff+comsat.badutmp.diff
|
||||
gzip ./source/n/biff+comsat/biff+comsat.offset.diff
|
||||
gzip ./source/n/biff+comsat/biff+comsat-0.17.diff
|
||||
|
|
|
@ -29,7 +29,7 @@ cd $(dirname $0) ; CWD=$(pwd)
|
|||
PKGNAM=udisks2
|
||||
SRCNAM=udisks
|
||||
VERSION=${VERSION:-$(echo $SRCNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
|
||||
BUILD=${BUILD:-2}
|
||||
BUILD=${BUILD:-3}
|
||||
|
||||
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
|
||||
|
||||
|
@ -91,6 +91,16 @@ find . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
# Temporarily omit LVM2 support since it uses a removed API. We'll upgrade
|
||||
# udisks2 soon (and add newly required deps) to handle this, but since it
|
||||
# was broken after the LVM2 upgrade recently and nobody noticed yet it's
|
||||
# probably OK for it to be like this for a little while.
|
||||
if [ "$VERSION" = "2.6.5" ]; then
|
||||
LVM2_SUPPORT="--disable-lvm2"
|
||||
else
|
||||
LVM2_SUPPORT="--enable-lvm2"
|
||||
fi
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
|
@ -101,7 +111,7 @@ CXXFLAGS="$SLKCFLAGS" \
|
|||
--disable-static \
|
||||
--mandir=/usr/man \
|
||||
--docdir=/usr/doc/$PKGNAM-$VERSION \
|
||||
--enable-lvm2 \
|
||||
$LVM2_SUPPORT \
|
||||
--build=$TARGET || exit 1
|
||||
|
||||
make $NUMJOBS || make || exit 1
|
||||
|
|
|
@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd)
|
|||
|
||||
PKGNAM=hplip
|
||||
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
|
||||
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
https://github.com/mesonbuild/meson/releases/download/0.48.1/meson-0.48.1.tar.gz
|
||||
https://github.com/mesonbuild/meson
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
commit 5eebb7f9288b7881ffb929b1fd494fe3ac3be27d
|
||||
Author: Russell Senior <russell@personaltelco.net>
|
||||
Date: Wed Mar 6 12:49:42 2013 -0800
|
||||
|
||||
bridge-utils: Fix compile against linux-3.8.x
|
||||
|
||||
Linux 3.8 has a header, include/uapi/linux/if_bridge.h that uses a
|
||||
struct in6_addr but doesn't define it. The trivial seeming fix of
|
||||
including the header that does define it causes more problems. The
|
||||
problem was discussed on mailing lists in January 2013. The final
|
||||
suggestion I found was here:
|
||||
|
||||
http://www.redhat.com/archives/libvir-list/2013-January/msg01253.html
|
||||
|
||||
This is intended to implement that suggestion.
|
||||
|
||||
Signed-off-by: Russell Senior <russell@personaltelco.net>
|
||||
|
||||
diff --git a/libbridge/libbridge.h b/libbridge/libbridge.h
|
||||
index 39964f2..dd14bae 100644
|
||||
--- a/libbridge/libbridge.h
|
||||
+++ b/libbridge/libbridge.h
|
||||
@@ -20,6 +20,7 @@
|
||||
#define _LIBBRIDGE_H
|
||||
|
||||
#include <sys/socket.h>
|
||||
+#include <netinet/in.h>
|
||||
#include <linux/if.h>
|
||||
#include <linux/if_bridge.h>
|
||||
|
|
@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
|
|||
|
||||
PKGNAM=bridge-utils
|
||||
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
|
||||
BUILD=${BUILD:-2}
|
||||
BUILD=${BUILD:-1}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
|
@ -68,7 +68,7 @@ mkdir -p $TMP $PKG
|
|||
|
||||
cd $TMP
|
||||
rm -rf bridge-utils-$VERSION
|
||||
tar xf $CWD/bridge-utils-$VERSION.tar.xz || exit 1
|
||||
tar xvf $CWD/bridge-utils-$VERSION.tar.xz || exit 1
|
||||
cd bridge-utils-$VERSION || exit 1
|
||||
|
||||
chown -R root:root .
|
||||
|
@ -78,9 +78,6 @@ find . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
# Apply patches:
|
||||
zcat $CWD/bridge-utils-1.5-linux_3.8.x.patch.gz | patch -p1 --verbose || exit 1
|
||||
|
||||
# Configure:
|
||||
autoconf
|
||||
./configure \
|
||||
|
|
1
source/n/bridge-utils/bridge-utils.url
Normal file
1
source/n/bridge-utils/bridge-utils.url
Normal file
|
@ -0,0 +1 @@
|
|||
https://www.kernel.org/pub/linux/utils/net/bridge-utils/
|
10
source/n/net-snmp/net-snmp-5.7.2-autoreconf.patch
Normal file
10
source/n/net-snmp/net-snmp-5.7.2-autoreconf.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
926223 - net-snmp: Does not support aarch64 in f19 and rawhide
|
||||
|
||||
Update autoconf version to make the test suite happy.
|
||||
|
||||
diff -up net-snmp-5.7.2/dist/autoconf-version.autoreconf net-snmp-5.7.2/dist/autoconf-version
|
||||
--- net-snmp-5.7.2/dist/autoconf-version.autoreconf 2013-03-25 13:00:15.002745347 +0100
|
||||
+++ net-snmp-5.7.2/dist/autoconf-version 2013-03-25 13:00:17.207736442 +0100
|
||||
@@ -1 +1 @@
|
||||
-2.68
|
||||
+2.69
|
30
source/n/net-snmp/net-snmp-5.7.2-cert-path.patch
Normal file
30
source/n/net-snmp/net-snmp-5.7.2-cert-path.patch
Normal file
|
@ -0,0 +1,30 @@
|
|||
1134475 - dependency in perl package
|
||||
|
||||
Use hardcoded path to configuration directories instead of net-snmp-config.
|
||||
net-snmp-config is in net-snmp-devel package and we do not want net-snmp-perl
|
||||
depending on -devel.
|
||||
|
||||
diff -up net-snmp-5.7.2/local/net-snmp-cert.cert-path net-snmp-5.7.2/local/net-snmp-cert
|
||||
--- net-snmp-5.7.2/local/net-snmp-cert.cert-path 2012-10-10 00:28:58.000000000 +0200
|
||||
+++ net-snmp-5.7.2/local/net-snmp-cert 2014-09-01 12:05:10.582427036 +0200
|
||||
@@ -819,8 +819,7 @@ sub set_default {
|
||||
sub cfg_path {
|
||||
my $path;
|
||||
|
||||
- $path = `$NetSNMP::Cert::CFGTOOL --snmpconfpath`;
|
||||
- chomp $path;
|
||||
+ $path = "/etc/snmp:/usr/share/snmp:/usr/lib64/snmp:/home/jsafrane/.snmp:/var/lib/net-snmp";
|
||||
return (wantarray ? split(':', $path) : $path);
|
||||
}
|
||||
|
||||
@@ -1414,8 +1413,8 @@ sub checkReqs {
|
||||
die("$NetSNMP::Cert::OPENSSL (v$ossl_ver): must be $ossl_min_ver or later")
|
||||
if ($ossl_ver cmp $ossl_min_ver) < 0;
|
||||
|
||||
- die("$NetSNMP::Cert::CFGTOOL not found: please install")
|
||||
- if system("$NetSNMP::Cert::CFGTOOL > /dev/null 2>&1");
|
||||
+# die("$NetSNMP::Cert::CFGTOOL not found: please install")
|
||||
+# if system("$NetSNMP::Cert::CFGTOOL > /dev/null 2>&1");
|
||||
}
|
||||
|
||||
sub initOpts {
|
24
source/n/net-snmp/net-snmp-5.7.2-pie.patch
Normal file
24
source/n/net-snmp/net-snmp-5.7.2-pie.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
diff -up net-snmp-5.7.2/agent/Makefile.in.pie net-snmp-5.7.2/agent/Makefile.in
|
||||
--- net-snmp-5.7.2/agent/Makefile.in.pie 2012-10-10 00:28:58.000000000 +0200
|
||||
+++ net-snmp-5.7.2/agent/Makefile.in 2012-10-18 09:45:13.298613099 +0200
|
||||
@@ -294,7 +294,7 @@ getmibstat.o: mibgroup/kernel_sunos5.c
|
||||
$(CC) $(CFLAGS) -o $@ -D_GETMIBSTAT_TEST -DDODEBUG -c $?
|
||||
|
||||
snmpd$(EXEEXT): ${LAGENTOBJS} $(USELIBS) $(AGENTLIB) $(HELPERLIB) $(MIBLIB) $(LIBTARG)
|
||||
- $(LINK) $(CFLAGS) -o $@ ${LAGENTOBJS} ${LDFLAGS} ${OUR_AGENT_LIBS}
|
||||
+ $(LINK) $(CFLAGS) -o $@ -pie ${LAGENTOBJS} ${LDFLAGS} ${OUR_AGENT_LIBS}
|
||||
|
||||
libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION): ${LLIBAGENTOBJS} $(USELIBS)
|
||||
$(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) ${LAGENTLIBS} @LD_NO_UNDEFINED@ $(LDFLAGS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) @AGENTLIBS@
|
||||
diff -up net-snmp-5.7.2/apps/Makefile.in.pie net-snmp-5.7.2/apps/Makefile.in
|
||||
--- net-snmp-5.7.2/apps/Makefile.in.pie 2012-10-10 00:28:58.000000000 +0200
|
||||
+++ net-snmp-5.7.2/apps/Makefile.in 2012-10-18 09:44:27.827774580 +0200
|
||||
@@ -170,7 +170,7 @@ snmptest$(EXEEXT): snmptest.$(OSUFFIX
|
||||
$(LINK) ${CFLAGS} -o $@ snmptest.$(OSUFFIX) ${LDFLAGS} ${LIBS}
|
||||
|
||||
snmptrapd$(EXEEXT): $(TRAPD_OBJECTS) $(USETRAPLIBS) $(INSTALLLIBS)
|
||||
- $(LINK) ${CFLAGS} -o $@ $(TRAPD_OBJECTS) $(INSTALLLIBS) ${LDFLAGS} ${TRAPLIBS}
|
||||
+ $(LINK) ${CFLAGS} -o $@ -pie $(TRAPD_OBJECTS) $(INSTALLLIBS) ${LDFLAGS} ${TRAPLIBS}
|
||||
|
||||
snmptrap$(EXEEXT): snmptrap.$(OSUFFIX) $(USELIBS)
|
||||
$(LINK) ${CFLAGS} -o $@ snmptrap.$(OSUFFIX) ${LDFLAGS} ${LIBS}
|
|
@ -1,22 +0,0 @@
|
|||
diff -up net-snmp-5.7.3/perl/ASN/Makefile.PL.orig net-snmp-5.7.3/perl/ASN/Makefile.PL
|
||||
--- net-snmp-5.7.3/perl/ASN/Makefile.PL.orig 2016-05-06 10:35:30.005905040 +0200
|
||||
+++ net-snmp-5.7.3/perl/ASN/Makefile.PL 2016-05-06 10:35:57.518776400 +0200
|
||||
@@ -3,6 +3,7 @@ require 5;
|
||||
use Config;
|
||||
use Getopt::Long;
|
||||
my $lib_version;
|
||||
+my %MakeParams = ();
|
||||
|
||||
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
|
||||
# the contents of the Makefile that is written.
|
||||
diff -up net-snmp-5.7.3/perl/Makefile.PL.orig net-snmp-5.7.3/perl/Makefile.PL
|
||||
--- net-snmp-5.7.3/perl/Makefile.PL.orig 2016-05-06 10:34:38.975143641 +0200
|
||||
+++ net-snmp-5.7.3/perl/Makefile.PL 2016-05-06 10:35:13.326983024 +0200
|
||||
@@ -2,6 +2,7 @@ use ExtUtils::MakeMaker;
|
||||
use Config;
|
||||
use Getopt::Long;
|
||||
require 5;
|
||||
+my %MakeParams = ();
|
||||
|
||||
%MakeParams = InitMakeParams();
|
||||
|
File diff suppressed because it is too large
Load diff
14
source/n/net-snmp/net-snmp-5.7.3-iterator-fix.patch
Normal file
14
source/n/net-snmp/net-snmp-5.7.3-iterator-fix.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
diff -urNp old/agent/mibgroup/host/data_access/swrun.c new/agent/mibgroup/host/data_access/swrun.c
|
||||
--- old/agent/mibgroup/host/data_access/swrun.c 2018-03-26 09:00:39.932335587 +0200
|
||||
+++ new/agent/mibgroup/host/data_access/swrun.c 2018-03-26 09:03:00.845876681 +0200
|
||||
@@ -102,7 +102,9 @@ swrun_count_processes_by_name( char *nam
|
||||
return 0; /* or -1 */
|
||||
|
||||
it = CONTAINER_ITERATOR( swrun_container );
|
||||
- while ((entry = (netsnmp_swrun_entry*)ITERATOR_NEXT( it )) != NULL) {
|
||||
+ for (entry = (netsnmp_swrun_entry*)ITERATOR_FIRST( it );
|
||||
+ entry;
|
||||
+ entry = (netsnmp_swrun_entry*)ITERATOR_NEXT( it )) {
|
||||
if (0 == strcmp( entry->hrSWRunName, name ))
|
||||
i++;
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
diff -ur net-snmp-5.7.3.save/apps/Makefile.in net-snmp-5.7.3/apps/Makefile.in
|
||||
--- net-snmp-5.7.3.save/apps/Makefile.in 2014-12-08 15:23:22.000000000 -0500
|
||||
+++ net-snmp-5.7.3/apps/Makefile.in 2017-09-19 11:52:48.993729966 -0400
|
||||
@@ -204,7 +204,7 @@
|
||||
$(LINK) ${CFLAGS} -o $@ snmpdf.$(OSUFFIX) ${LDFLAGS} ${LIBS}
|
||||
|
||||
libnetsnmptrapd.$(LIB_EXTENSION)$(LIB_VERSION): $(LLIBTRAPD_OBJS)
|
||||
- $(LIB_LD_CMD) $@ ${LLIBTRAPD_OBJS} $(MIBLIB) $(USELIBS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS)
|
||||
+ $(LIB_LD_CMD) $@ ${LLIBTRAPD_OBJS} $(MIBLIB) $(USELIBS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) $(MYSQL_LIBS)
|
||||
$(RANLIB) $@
|
||||
|
||||
snmpinforminstall:
|
||||
diff -ur net-snmp-5.7.3.save/apps/snmptrapd_sql.c net-snmp-5.7.3/apps/snmptrapd_sql.c
|
||||
--- net-snmp-5.7.3.save/apps/snmptrapd_sql.c 2014-12-08 15:23:22.000000000 -0500
|
||||
+++ net-snmp-5.7.3/apps/snmptrapd_sql.c 2017-09-19 11:56:10.127008022 -0400
|
||||
@@ -50,10 +50,16 @@
|
||||
#undef PACKAGE_STRING
|
||||
#undef PACKAGE_TARNAME
|
||||
#undef PACKAGE_VERSION
|
||||
-#include <my_global.h>
|
||||
-#include <my_sys.h>
|
||||
#include <mysql.h>
|
||||
#include <errmsg.h>
|
||||
+#ifndef MYSQL_VERSION_ID
|
||||
+#include <mysql_version.h>
|
||||
+#endif
|
||||
+#if MYSQL_VERSION_ID < 100000
|
||||
+#include <my_config.h>
|
||||
+#include <my_global.h>
|
||||
+#include <my_sys.h>
|
||||
+#endif
|
||||
|
||||
netsnmp_feature_require(container_fifo)
|
||||
|
||||
@@ -437,6 +443,7 @@
|
||||
return -1;
|
||||
}
|
||||
|
||||
+#if MYSQL_VERSION_ID < 100000
|
||||
#ifdef HAVE_BROKEN_LIBMYSQLCLIENT
|
||||
my_init();
|
||||
#else
|
||||
@@ -445,6 +452,7 @@
|
||||
|
||||
/** load .my.cnf values */
|
||||
load_defaults ("my", _sql.groups, ¬_argc, ¬_argv);
|
||||
+#endif
|
||||
for(i=0; i < not_argc; ++i) {
|
||||
if (NULL == not_argv[i])
|
||||
continue;
|
||||
@@ -542,6 +550,10 @@
|
||||
return -1;
|
||||
}
|
||||
|
||||
+#if MYSQL_VERSION_ID > 100000
|
||||
+ mysql_options(_sql.conn, MYSQL_READ_DEFAULT_GROUP, "snmptrapd");
|
||||
+#endif
|
||||
+
|
||||
/** try to connect; we'll try again later if we fail */
|
||||
(void) netsnmp_mysql_connect();
|
||||
|
|
@ -1,303 +0,0 @@
|
|||
diff -urNp old/apps/snmpusm.c new/apps/snmpusm.c
|
||||
--- old/apps/snmpusm.c 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ new/apps/snmpusm.c 2017-02-20 15:20:36.994022905 +0100
|
||||
@@ -190,7 +190,7 @@ get_USM_DH_key(netsnmp_variable_list *va
|
||||
oid *keyoid, size_t keyoid_len) {
|
||||
u_char *dhkeychange;
|
||||
DH *dh;
|
||||
- BIGNUM *other_pub;
|
||||
+ BIGNUM *p, *g, *pub_key, *other_pub;
|
||||
u_char *key;
|
||||
size_t key_len;
|
||||
|
||||
@@ -205,25 +205,29 @@ get_USM_DH_key(netsnmp_variable_list *va
|
||||
dh = d2i_DHparams(NULL, &cp, dhvar->val_len);
|
||||
}
|
||||
|
||||
- if (!dh || !dh->g || !dh->p) {
|
||||
+ if (dh)
|
||||
+ DH_get0_pqg(dh, &p, NULL, &g);
|
||||
+
|
||||
+ if (!dh || !g || !p) {
|
||||
SNMP_FREE(dhkeychange);
|
||||
return SNMPERR_GENERR;
|
||||
}
|
||||
|
||||
- DH_generate_key(dh);
|
||||
- if (!dh->pub_key) {
|
||||
+ if (!DH_generate_key(dh)) {
|
||||
SNMP_FREE(dhkeychange);
|
||||
return SNMPERR_GENERR;
|
||||
}
|
||||
|
||||
- if (vars->val_len != (unsigned int)BN_num_bytes(dh->pub_key)) {
|
||||
+ DH_get0_key(dh, &pub_key, NULL);
|
||||
+
|
||||
+ if (vars->val_len != (unsigned int)BN_num_bytes(pub_key)) {
|
||||
SNMP_FREE(dhkeychange);
|
||||
fprintf(stderr,"incorrect diffie-helman lengths (%lu != %d)\n",
|
||||
- (unsigned long)vars->val_len, BN_num_bytes(dh->pub_key));
|
||||
+ (unsigned long)vars->val_len, BN_num_bytes(pub_key));
|
||||
return SNMPERR_GENERR;
|
||||
}
|
||||
|
||||
- BN_bn2bin(dh->pub_key, dhkeychange + vars->val_len);
|
||||
+ BN_bn2bin(pub_key, dhkeychange + vars->val_len);
|
||||
|
||||
key_len = DH_size(dh);
|
||||
if (!key_len) {
|
||||
diff -urNp old/configure new/configure
|
||||
--- old/configure 2017-02-20 10:08:16.440396223 +0100
|
||||
+++ new/configure 2017-02-20 10:57:15.749734281 +0100
|
||||
@@ -23176,9 +23176,9 @@ $as_echo "#define HAVE_AES_CFB128_ENCRYP
|
||||
fi
|
||||
|
||||
|
||||
- as_ac_Lib=`$as_echo "ac_cv_lib_${CRYPTO}''_EVP_MD_CTX_create" | $as_tr_sh`
|
||||
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_create in -l${CRYPTO}" >&5
|
||||
-$as_echo_n "checking for EVP_MD_CTX_create in -l${CRYPTO}... " >&6; }
|
||||
+ as_ac_Lib=`$as_echo "ac_cv_lib_${CRYPTO}''_EVP_MD_CTX_new" | $as_tr_sh`
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -l${CRYPTO}" >&5
|
||||
+$as_echo_n "checking for EVP_MD_CTX_new in -l${CRYPTO}... " >&6; }
|
||||
if eval \${$as_ac_Lib+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
@@ -23193,11 +23193,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
-char EVP_MD_CTX_create ();
|
||||
+char EVP_MD_CTX_new ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
-return EVP_MD_CTX_create ();
|
||||
+return EVP_MD_CTX_new ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -23216,10 +23216,10 @@ eval ac_res=\$$as_ac_Lib
|
||||
$as_echo "$ac_res" >&6; }
|
||||
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
|
||||
|
||||
-$as_echo "#define HAVE_EVP_MD_CTX_CREATE /**/" >>confdefs.h
|
||||
+$as_echo "#define HAVE_EVP_MD_CTX_NEW /**/" >>confdefs.h
|
||||
|
||||
|
||||
-$as_echo "#define HAVE_EVP_MD_CTX_DESTROY /**/" >>confdefs.h
|
||||
+$as_echo "#define HAVE_EVP_MD_CTX_FREE /**/" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
@@ -23293,7 +23293,7 @@ char SSL_library_init ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
-return SSL_library_init ();
|
||||
+return OPENSSL_init_ssl(0, NULL);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
diff -urNp old/configure.d/config_os_libs2 new/configure.d/config_os_libs2
|
||||
--- old/configure.d/config_os_libs2 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ new/configure.d/config_os_libs2 2017-02-20 10:56:21.041616611 +0100
|
||||
@@ -292,11 +292,11 @@ if test "x$tryopenssl" != "xno" -a "x$tr
|
||||
AC_DEFINE(HAVE_AES_CFB128_ENCRYPT, 1,
|
||||
[Define to 1 if you have the `AES_cfb128_encrypt' function.]))
|
||||
|
||||
- AC_CHECK_LIB(${CRYPTO}, EVP_MD_CTX_create,
|
||||
- AC_DEFINE([HAVE_EVP_MD_CTX_CREATE], [],
|
||||
- [Define to 1 if you have the `EVP_MD_CTX_create' function.])
|
||||
- AC_DEFINE([HAVE_EVP_MD_CTX_DESTROY], [],
|
||||
- [Define to 1 if you have the `EVP_MD_CTX_destroy' function.]))
|
||||
+ AC_CHECK_LIB(${CRYPTO}, EVP_MD_CTX_new,
|
||||
+ AC_DEFINE([HAVE_EVP_MD_CTX_NEW], [],
|
||||
+ [Define to 1 if you have the `EVP_MD_CTX_new' function.])
|
||||
+ AC_DEFINE([HAVE_EVP_MD_CTX_FREE], [],
|
||||
+ [Define to 1 if you have the `EVP_MD_CTX_free' function.]))
|
||||
fi
|
||||
if echo " $transport_result_list " | $GREP "DTLS" > /dev/null; then
|
||||
AC_CHECK_LIB(ssl, DTLSv1_method,
|
||||
@@ -307,7 +307,7 @@ if test "x$tryopenssl" != "xno" -a "x$tr
|
||||
TLSPROG=yes
|
||||
fi
|
||||
if echo " $transport_result_list " | $GREP "TLS" > /dev/null; then
|
||||
- AC_CHECK_LIB(ssl, SSL_library_init,
|
||||
+ AC_CHECK_LIB(ssl, OPENSSL_init_ssl,
|
||||
AC_DEFINE(HAVE_LIBSSL, 1,
|
||||
[Define to 1 if you have the `ssl' library (-lssl).])
|
||||
LIBCRYPTO=" -lssl $LIBCRYPTO",
|
||||
diff -urNp old/include/net-snmp/net-snmp-config.h.in new/include/net-snmp/net-snmp-config.h.in
|
||||
--- old/include/net-snmp/net-snmp-config.h.in 2017-02-20 10:08:16.443522417 +0100
|
||||
+++ new/include/net-snmp/net-snmp-config.h.in 2017-02-20 10:24:05.790584283 +0100
|
||||
@@ -149,11 +149,11 @@
|
||||
/* Define to 1 if you have the `eval_pv' function. */
|
||||
#undef HAVE_EVAL_PV
|
||||
|
||||
-/* Define to 1 if you have the `EVP_MD_CTX_create' function. */
|
||||
-#undef HAVE_EVP_MD_CTX_CREATE
|
||||
+/* Define to 1 if you have the `EVP_MD_CTX_new' function. */
|
||||
+#undef HAVE_EVP_MD_CTX_NEW
|
||||
|
||||
-/* Define to 1 if you have the `EVP_MD_CTX_destroy' function. */
|
||||
-#undef HAVE_EVP_MD_CTX_DESTROY
|
||||
+/* Define to 1 if you have the `EVP_MD_CTX_free' function. */
|
||||
+#undef HAVE_EVP_MD_CTX_FREE
|
||||
|
||||
/* Define if you have EVP_sha224/256 in openssl */
|
||||
#undef HAVE_EVP_SHA224
|
||||
diff -urNp old/snmplib/keytools.c new/snmplib/keytools.c
|
||||
--- old/snmplib/keytools.c 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ new/snmplib/keytools.c 2017-02-20 10:30:27.412068264 +0100
|
||||
@@ -149,8 +149,8 @@ generate_Ku(const oid * hashtype, u_int
|
||||
*/
|
||||
#ifdef NETSNMP_USE_OPENSSL
|
||||
|
||||
-#ifdef HAVE_EVP_MD_CTX_CREATE
|
||||
- ctx = EVP_MD_CTX_create();
|
||||
+#ifdef HAVE_EVP_MD_CTX_NEW
|
||||
+ ctx = EVP_MD_CTX_new();
|
||||
#else
|
||||
ctx = malloc(sizeof(*ctx));
|
||||
if (!EVP_MD_CTX_init(ctx))
|
||||
@@ -259,8 +259,8 @@ generate_Ku(const oid * hashtype, u_int
|
||||
memset(buf, 0, sizeof(buf));
|
||||
#ifdef NETSNMP_USE_OPENSSL
|
||||
if (ctx) {
|
||||
-#ifdef HAVE_EVP_MD_CTX_DESTROY
|
||||
- EVP_MD_CTX_destroy(ctx);
|
||||
+#ifdef HAVE_EVP_MD_CTX_FREE
|
||||
+ EVP_MD_CTX_free(ctx);
|
||||
#else
|
||||
EVP_MD_CTX_cleanup(ctx);
|
||||
free(ctx);
|
||||
diff -urNp old/snmplib/scapi.c new/snmplib/scapi.c
|
||||
--- old/snmplib/scapi.c 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ new/snmplib/scapi.c 2017-02-20 10:27:34.152379515 +0100
|
||||
@@ -486,14 +486,14 @@ sc_hash(const oid * hashtype, size_t has
|
||||
}
|
||||
|
||||
/** initialize the pointer */
|
||||
-#ifdef HAVE_EVP_MD_CTX_CREATE
|
||||
- cptr = EVP_MD_CTX_create();
|
||||
+#ifdef HAVE_EVP_MD_CTX_NEW
|
||||
+ cptr = EVP_MD_CTX_new();
|
||||
#else
|
||||
cptr = malloc(sizeof(*cptr));
|
||||
#if defined(OLD_DES)
|
||||
memset(cptr, 0, sizeof(*cptr));
|
||||
#else
|
||||
- EVP_MD_CTX_init(cptr);
|
||||
+ EVP_MD_CTX_init(&cptr);
|
||||
#endif
|
||||
#endif
|
||||
if (!EVP_DigestInit(cptr, hashfn)) {
|
||||
@@ -507,11 +507,11 @@ sc_hash(const oid * hashtype, size_t has
|
||||
/** do the final pass */
|
||||
EVP_DigestFinal(cptr, MAC, &tmp_len);
|
||||
*MAC_len = tmp_len;
|
||||
-#ifdef HAVE_EVP_MD_CTX_DESTROY
|
||||
- EVP_MD_CTX_destroy(cptr);
|
||||
+#ifdef HAVE_EVP_MD_CTX_FREE
|
||||
+ EVP_MD_CTX_free(cptr);
|
||||
#else
|
||||
#if !defined(OLD_DES)
|
||||
- EVP_MD_CTX_cleanup(cptr);
|
||||
+ EVP_MD_CTX_cleanup(&cptr);
|
||||
#endif
|
||||
free(cptr);
|
||||
#endif
|
||||
diff -urNp old/snmplib/snmp_openssl.c new/snmplib/snmp_openssl.c
|
||||
--- old/snmplib/snmp_openssl.c 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ new/snmplib/snmp_openssl.c 2017-02-20 12:46:00.059727928 +0100
|
||||
@@ -47,7 +47,7 @@ void netsnmp_init_openssl(void) {
|
||||
DEBUGMSGTL(("snmp_openssl", "initializing\n"));
|
||||
|
||||
/* Initializing OpenSSL */
|
||||
- SSL_library_init();
|
||||
+ OPENSSL_init_ssl(0, NULL);
|
||||
SSL_load_error_strings();
|
||||
ERR_load_BIO_strings();
|
||||
OpenSSL_add_all_algorithms();
|
||||
@@ -164,11 +164,11 @@ netsnmp_openssl_cert_dump_names(X509 *oc
|
||||
oname_entry = X509_NAME_get_entry(osubj_name, i);
|
||||
netsnmp_assert(NULL != oname_entry);
|
||||
|
||||
- if (oname_entry->value->type != V_ASN1_PRINTABLESTRING)
|
||||
+ if (X509_NAME_ENTRY_get_data(oname_entry)->type != V_ASN1_PRINTABLESTRING)
|
||||
continue;
|
||||
|
||||
/** get NID */
|
||||
- onid = OBJ_obj2nid(oname_entry->object);
|
||||
+ onid = OBJ_obj2nid(X509_NAME_ENTRY_get_object(oname_entry));
|
||||
if (onid == NID_undef) {
|
||||
prefix_long = prefix_short = "UNKNOWN";
|
||||
}
|
||||
@@ -179,9 +179,9 @@ netsnmp_openssl_cert_dump_names(X509 *oc
|
||||
|
||||
DEBUGMSGT(("9:cert:dump:names",
|
||||
"[%02d] NID type %d, ASN type %d\n", i, onid,
|
||||
- oname_entry->value->type));
|
||||
+ X509_NAME_ENTRY_get_data(oname_entry)->type));
|
||||
DEBUGMSGT(("9:cert:dump:names", "%s/%s: '%s'\n", prefix_long,
|
||||
- prefix_short, ASN1_STRING_data(oname_entry->value)));
|
||||
+ prefix_short, ASN1_STRING_data(X509_NAME_ENTRY_get_data(oname_entry))));
|
||||
}
|
||||
}
|
||||
#endif /* NETSNMP_FEATURE_REMOVE_CERT_DUMP_NAMES */
|
||||
@@ -470,7 +470,7 @@ netsnmp_openssl_cert_get_hash_type(X509
|
||||
if (NULL == ocert)
|
||||
return 0;
|
||||
|
||||
- return _nid2ht(OBJ_obj2nid(ocert->sig_alg->algorithm));
|
||||
+ return _nid2ht(X509_get_signature_nid(ocert));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -487,7 +487,7 @@ netsnmp_openssl_cert_get_fingerprint(X50
|
||||
if (NULL == ocert)
|
||||
return NULL;
|
||||
|
||||
- nid = OBJ_obj2nid(ocert->sig_alg->algorithm);
|
||||
+ nid = X509_get_signature_nid(ocert);
|
||||
DEBUGMSGT(("9:openssl:fingerprint", "alg %d, cert nid %d (%d)\n", alg, nid,
|
||||
_nid2ht(nid)));
|
||||
|
||||
diff -urNp old/win32/net-snmp/net-snmp-config.h new/win32/net-snmp/net-snmp-config.h
|
||||
--- old/win32/net-snmp/net-snmp-config.h 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ new/win32/net-snmp/net-snmp-config.h 2017-02-20 10:23:20.796778512 +0100
|
||||
@@ -1366,11 +1366,11 @@
|
||||
/* Define to 1 if you have the <openssl/aes.h> header file. */
|
||||
#define HAVE_OPENSSL_AES_H 1
|
||||
|
||||
-/* Define to 1 if you have the `EVP_MD_CTX_create' function. */
|
||||
-#define HAVE_EVP_MD_CTX_CREATE 1
|
||||
+/* Define to 1 if you have the `EVP_MD_CTX_new' function. */
|
||||
+#define HAVE_EVP_MD_CTX_NEW 1
|
||||
|
||||
-/* Define to 1 if you have the `EVP_MD_CTX_destroy' function. */
|
||||
-#define HAVE_EVP_MD_CTX_DESTROY 1
|
||||
+/* Define to 1 if you have the `EVP_MD_CTX_free' function. */
|
||||
+#define HAVE_EVP_MD_CTX_FREE 1
|
||||
|
||||
/* Define to 1 if you have the `AES_cfb128_encrypt' function. */
|
||||
#define HAVE_AES_CFB128_ENCRYPT 1
|
||||
diff -urNp old/win32/net-snmp/net-snmp-config.h.in new/win32/net-snmp/net-snmp-config.h.in
|
||||
--- old/win32/net-snmp/net-snmp-config.h.in 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ new/win32/net-snmp/net-snmp-config.h.in 2017-02-20 10:22:51.348367754 +0100
|
||||
@@ -1366,11 +1366,11 @@
|
||||
/* Define to 1 if you have the <openssl/aes.h> header file. */
|
||||
#define HAVE_OPENSSL_AES_H 1
|
||||
|
||||
-/* Define to 1 if you have the `EVP_MD_CTX_create' function. */
|
||||
-#define HAVE_EVP_MD_CTX_CREATE 1
|
||||
+/* Define to 1 if you have the `EVP_MD_CTX_new' function. */
|
||||
+#define HAVE_EVP_MD_CTX_NEW 1
|
||||
|
||||
-/* Define to 1 if you have the `EVP_MD_CTX_destroy' function. */
|
||||
-#define HAVE_EVP_MD_CTX_DESTROY 1
|
||||
+/* Define to 1 if you have the `EVP_MD_CTX_free' function. */
|
||||
+#define HAVE_EVP_MD_CTX_FREE 1
|
||||
|
||||
/* Define to 1 if you have the `AES_cfb128_encrypt' function. */
|
||||
#define HAVE_AES_CFB128_ENCRYPT 1
|
12
source/n/net-snmp/net-snmp-5.8-Remove-U64-typedef.patch
Normal file
12
source/n/net-snmp/net-snmp-5.8-Remove-U64-typedef.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -urNp a/include/net-snmp/library/int64.h b/include/net-snmp/library/int64.h
|
||||
--- a/include/net-snmp/library/int64.h 2018-07-18 14:37:16.543348832 +0200
|
||||
+++ b/include/net-snmp/library/int64.h 2018-07-18 15:31:31.516999288 +0200
|
||||
@@ -10,7 +10,7 @@ extern "C" {
|
||||
* Note: using the U64 typedef is deprecated because this typedef conflicts
|
||||
* with a typedef with the same name defined in the Perl header files.
|
||||
*/
|
||||
- typedef struct counter64 U64;
|
||||
+// typedef struct counter64 U64;
|
||||
#endif
|
||||
|
||||
#define I64CHARSZ 21
|
12
source/n/net-snmp/net-snmp-5.8-agentx-disconnect-crash.patch
Normal file
12
source/n/net-snmp/net-snmp-5.8-agentx-disconnect-crash.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -urNp a/agent/mibgroup/agentx/master.c b/agent/mibgroup/agentx/master.c
|
||||
--- a/agent/mibgroup/agentx/master.c 2018-07-18 12:13:49.953014652 +0200
|
||||
+++ b/agent/mibgroup/agentx/master.c 2018-07-18 12:20:23.537626773 +0200
|
||||
@@ -221,7 +221,7 @@ agentx_got_response(int operation,
|
||||
/* response is too late, free the cache */
|
||||
if (magic)
|
||||
netsnmp_free_delegated_cache((netsnmp_delegated_cache*) magic);
|
||||
- return 0;
|
||||
+ return 1;
|
||||
}
|
||||
requests = cache->requests;
|
||||
|
199
source/n/net-snmp/net-snmp-5.8-autofs-skip.patch
Normal file
199
source/n/net-snmp/net-snmp-5.8-autofs-skip.patch
Normal file
|
@ -0,0 +1,199 @@
|
|||
diff -urNp b/agent/mibgroup/hardware/fsys/fsys_mntctl.c net-snmp-5.8/agent/mibgroup/hardware/fsys/fsys_mntctl.c
|
||||
--- b/agent/mibgroup/hardware/fsys/fsys_mntctl.c 2018-07-18 16:12:20.674499629 +0200
|
||||
+++ net-snmp-5.8/agent/mibgroup/hardware/fsys/fsys_mntctl.c 2018-07-18 16:15:46.782859398 +0200
|
||||
@@ -43,8 +43,9 @@ _fsys_type( int type)
|
||||
|
||||
case MNT_NFS:
|
||||
case MNT_NFS3:
|
||||
- case MNT_AUTOFS:
|
||||
return NETSNMP_FS_TYPE_NFS;
|
||||
+ case MNT_AUTOFS:
|
||||
+ return NETSNMP_FS_TYPE_AUTOFS;
|
||||
|
||||
/*
|
||||
* The following code covers selected filesystems
|
||||
@@ -156,10 +157,12 @@ netsnmp_fsys_arch_load( void )
|
||||
|
||||
/*
|
||||
* Optionally skip retrieving statistics for remote mounts
|
||||
+ * AUTOFS is skipped by default
|
||||
*/
|
||||
- if ( (entry->flags & NETSNMP_FS_FLAG_REMOTE) &&
|
||||
+ if ( ((entry->flags & NETSNMP_FS_FLAG_REMOTE) &&
|
||||
netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
|
||||
- NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES))
|
||||
+ NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES)) ||
|
||||
+ entry->type == (NETSNMP_FS_TYPE_AUTOFS))
|
||||
continue;
|
||||
|
||||
if ( statfs( entry->path, &stat_buf ) < 0 ) {
|
||||
diff -urNp b/agent/mibgroup/hardware/fsys/fsys_mntent.c net-snmp-5.8/agent/mibgroup/hardware/fsys/fsys_mntent.c
|
||||
--- b/agent/mibgroup/hardware/fsys/fsys_mntent.c 2018-07-18 16:12:20.674499629 +0200
|
||||
+++ net-snmp-5.8/agent/mibgroup/hardware/fsys/fsys_mntent.c 2018-07-18 16:15:46.782859398 +0200
|
||||
@@ -150,6 +150,13 @@ _fsys_type( char *typename )
|
||||
!strcmp(typename, MNTTYPE_LOFS))
|
||||
return NETSNMP_FS_TYPE_OTHER;
|
||||
|
||||
+ /* Detection of AUTOFS.
|
||||
+ * This file system will be ignored by default
|
||||
+ */
|
||||
+ else if ( !strcmp(typename, MNTTYPE_AUTOFS))
|
||||
+ return NETSNMP_FS_TYPE_AUTOFS;
|
||||
+
|
||||
+
|
||||
/*
|
||||
* All other types are silently skipped
|
||||
*/
|
||||
@@ -239,6 +246,10 @@ netsnmp_fsys_arch_load( void )
|
||||
NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES))
|
||||
continue;
|
||||
|
||||
+ /* Skip AUTOFS enteries */
|
||||
+ if ( entry->type == (NETSNMP_FS_TYPE_AUTOFS))
|
||||
+ continue;
|
||||
+
|
||||
#ifdef irix6
|
||||
if ( NSFS_STATFS( entry->path, &stat_buf, sizeof(struct statfs), 0) < 0 )
|
||||
#else
|
||||
diff -urNp b/agent/mibgroup/hardware/fsys/mnttypes.h net-snmp-5.8/agent/mibgroup/hardware/fsys/mnttypes.h
|
||||
--- b/agent/mibgroup/hardware/fsys/mnttypes.h 2018-07-18 16:12:20.674499629 +0200
|
||||
+++ net-snmp-5.8/agent/mibgroup/hardware/fsys/mnttypes.h 2018-07-18 16:15:46.782859398 +0200
|
||||
@@ -165,6 +165,9 @@
|
||||
#ifndef MNTTYPE_APP
|
||||
#define MNTTYPE_APP "app"
|
||||
#endif
|
||||
+#ifndef MNTTYPE_AUTOFS
|
||||
+#define MNTTYPE_AUTOFS "autofs"
|
||||
+#endif
|
||||
#ifndef MNTTYPE_DEVPTS
|
||||
#define MNTTYPE_DEVPTS "devpts"
|
||||
#endif
|
||||
diff -urNp b/agent/mibgroup/host/hr_filesys.c net-snmp-5.8/agent/mibgroup/host/hr_filesys.c
|
||||
--- b/agent/mibgroup/host/hr_filesys.c 2018-07-18 16:12:20.668499652 +0200
|
||||
+++ net-snmp-5.8/agent/mibgroup/host/hr_filesys.c 2018-07-18 16:15:46.783859399 +0200
|
||||
@@ -834,6 +834,27 @@ Check_HR_FileSys_NFS (void)
|
||||
return 0; /* no NFS file system */
|
||||
}
|
||||
|
||||
+/* This function checks whether current file system is an AutoFs
|
||||
+ * HRFS_entry must be valid prior to calling this function
|
||||
+ * return 1 if AutoFs, 0 otherwise
|
||||
+ */
|
||||
+int
|
||||
+Check_HR_FileSys_AutoFs (void)
|
||||
+{
|
||||
+#if HAVE_GETFSSTAT
|
||||
+ if ( HRFS_entry->HRFS_type != NULL &&
|
||||
+#if defined(MNTTYPE_AUTOFS)
|
||||
+ !strcmp( HRFS_entry->HRFS_type, MNTTYPE_AUTOFS)
|
||||
+#else
|
||||
+ !strcmp( HRFS_entry->HRFS_type, "autofs")
|
||||
+#endif
|
||||
+ )
|
||||
+#endif /* HAVE_GETFSSTAT */
|
||||
+ return 1; /* AUTOFS */
|
||||
+
|
||||
+ return 0; /* no AUTOFS */
|
||||
+}
|
||||
+
|
||||
void
|
||||
End_HR_FileSys(void)
|
||||
{
|
||||
diff -urNp b/agent/mibgroup/host/hr_filesys.h net-snmp-5.8/agent/mibgroup/host/hr_filesys.h
|
||||
--- b/agent/mibgroup/host/hr_filesys.h 2018-07-18 16:12:20.669499648 +0200
|
||||
+++ net-snmp-5.8/agent/mibgroup/host/hr_filesys.h 2018-07-18 16:15:46.784859400 +0200
|
||||
@@ -10,6 +10,7 @@ extern void Init_HR_FileSys(void);
|
||||
extern FindVarMethod var_hrfilesys;
|
||||
extern int Get_Next_HR_FileSys(void);
|
||||
extern int Check_HR_FileSys_NFS(void);
|
||||
+extern int Check_HR_FileSys_AutoFs(void);
|
||||
|
||||
extern int Get_FSIndex(char *);
|
||||
extern long Get_FSSize(char *); /* Temporary */
|
||||
diff -urNp b/agent/mibgroup/host/hrh_filesys.c net-snmp-5.8/agent/mibgroup/host/hrh_filesys.c
|
||||
--- b/agent/mibgroup/host/hrh_filesys.c 2018-07-18 16:12:20.668499652 +0200
|
||||
+++ net-snmp-5.8/agent/mibgroup/host/hrh_filesys.c 2018-07-18 16:15:46.785859402 +0200
|
||||
@@ -429,3 +429,9 @@ Check_HR_FileSys_NFS (void)
|
||||
{
|
||||
return (HRFS_entry->flags & NETSNMP_FS_FLAG_REMOTE) ? 1 : 0;
|
||||
}
|
||||
+
|
||||
+int
|
||||
+Check_HR_FileSys_AutoFs (void)
|
||||
+{
|
||||
+ return (HRFS_entry->type == (NETSNMP_FS_TYPE_AUTOFS)) ? 1 : 0;
|
||||
+}
|
||||
diff -urNp b/agent/mibgroup/host/hrh_filesys.h net-snmp-5.8/agent/mibgroup/host/hrh_filesys.h
|
||||
--- b/agent/mibgroup/host/hrh_filesys.h 2018-07-18 16:12:20.669499648 +0200
|
||||
+++ net-snmp-5.8/agent/mibgroup/host/hrh_filesys.h 2018-07-18 16:15:46.785859402 +0200
|
||||
@@ -10,6 +10,7 @@ extern void Init_HR_FileSys(void);
|
||||
extern FindVarMethod var_hrhfilesys;
|
||||
extern int Get_Next_HR_FileSys(void);
|
||||
extern int Check_HR_FileSys_NFS(void);
|
||||
+extern int Check_HR_FileSys_AutoFs(void);
|
||||
|
||||
extern int Get_FSIndex(char *);
|
||||
extern long Get_FSSize(char *); /* Temporary */
|
||||
diff -urNp b/agent/mibgroup/host/hrh_storage.c net-snmp-5.8/agent/mibgroup/host/hrh_storage.c
|
||||
--- b/agent/mibgroup/host/hrh_storage.c 2018-07-18 16:12:20.668499652 +0200
|
||||
+++ net-snmp-5.8/agent/mibgroup/host/hrh_storage.c 2018-07-18 16:15:46.786859402 +0200
|
||||
@@ -367,9 +367,10 @@ really_try_next:
|
||||
store_idx = name[ HRSTORE_ENTRY_NAME_LENGTH ];
|
||||
if (HRFS_entry &&
|
||||
store_idx > NETSNMP_MEM_TYPE_MAX &&
|
||||
- netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
|
||||
+ ((netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
|
||||
NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES) &&
|
||||
- Check_HR_FileSys_NFS())
|
||||
+ Check_HR_FileSys_NFS()) ||
|
||||
+ Check_HR_FileSys_AutoFs()))
|
||||
return NULL;
|
||||
if (store_idx <= NETSNMP_MEM_TYPE_MAX ) {
|
||||
mem = (netsnmp_memory_info*)ptr;
|
||||
@@ -508,7 +509,8 @@ Get_Next_HR_Store(void)
|
||||
if (HRS_index >= 0) {
|
||||
if (!(netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
|
||||
NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES) &&
|
||||
- Check_HR_FileSys_NFS())) {
|
||||
+ Check_HR_FileSys_NFS()) &&
|
||||
+ !Check_HR_FileSys_AutoFs()) {
|
||||
return HRS_index + NETSNMP_MEM_TYPE_MAX;
|
||||
}
|
||||
} else {
|
||||
diff -urNp b/agent/mibgroup/host/hr_storage.c net-snmp-5.8/agent/mibgroup/host/hr_storage.c
|
||||
--- b/agent/mibgroup/host/hr_storage.c 2018-07-18 16:12:20.670499644 +0200
|
||||
+++ net-snmp-5.8/agent/mibgroup/host/hr_storage.c 2018-07-18 16:15:46.786859402 +0200
|
||||
@@ -540,9 +540,10 @@ really_try_next:
|
||||
|
||||
store_idx = name[ HRSTORE_ENTRY_NAME_LENGTH ];
|
||||
if (store_idx > NETSNMP_MEM_TYPE_MAX ) {
|
||||
- if ( netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
|
||||
+ if ( (netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
|
||||
NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES) &&
|
||||
- Check_HR_FileSys_NFS())
|
||||
+ Check_HR_FileSys_NFS()) ||
|
||||
+ Check_HR_FileSys_AutoFs())
|
||||
return NULL; /* or goto try_next; */
|
||||
if (HRFS_statfs(HRFS_entry->HRFS_mount, &stat_buf) < 0) {
|
||||
snmp_log_perror(HRFS_entry->HRFS_mount);
|
||||
@@ -683,7 +684,8 @@ Get_Next_HR_Store(void)
|
||||
if (HRS_index >= 0) {
|
||||
if (!(netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
|
||||
NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES) &&
|
||||
- Check_HR_FileSys_NFS())) {
|
||||
+ Check_HR_FileSys_NFS()) &&
|
||||
+ !Check_HR_FileSys_AutoFs()) {
|
||||
return HRS_index + NETSNMP_MEM_TYPE_MAX;
|
||||
}
|
||||
} else {
|
||||
diff -urNp b/include/net-snmp/agent/hardware/fsys.h net-snmp-5.8/include/net-snmp/agent/hardware/fsys.h
|
||||
--- b/include/net-snmp/agent/hardware/fsys.h 2018-07-18 16:12:20.649499726 +0200
|
||||
+++ net-snmp-5.8/include/net-snmp/agent/hardware/fsys.h 2018-07-18 16:19:33.994918912 +0200
|
||||
@@ -41,6 +41,7 @@ typedef struct netsnmp_fsys_info_s netsn
|
||||
#define NETSNMP_FS_TYPE_SYSFS (4 | _NETSNMP_FS_TYPE_LOCAL | _NETSNMP_FS_TYPE_SKIP_BIT)
|
||||
#define NETSNMP_FS_TYPE_TMPFS (5 | _NETSNMP_FS_TYPE_LOCAL)
|
||||
#define NETSNMP_FS_TYPE_USBFS (6 | _NETSNMP_FS_TYPE_LOCAL)
|
||||
+#define NETSNMP_FS_TYPE_AUTOFS (7 | _NETSNMP_FS_TYPE_LOCAL | _NETSNMP_FS_TYPE_SKIP_BIT)
|
||||
|
||||
#define NETSNMP_FS_FLAG_ACTIVE 0x01
|
||||
#define NETSNMP_FS_FLAG_REMOTE 0x02
|
112
source/n/net-snmp/net-snmp-5.8-cflags.patch
Normal file
112
source/n/net-snmp/net-snmp-5.8-cflags.patch
Normal file
|
@ -0,0 +1,112 @@
|
|||
diff -urNp a/net-snmp-config.in b/net-snmp-config.in
|
||||
--- a/net-snmp-config.in 2018-07-18 13:43:12.264426052 +0200
|
||||
+++ b/net-snmp-config.in 2018-07-18 13:52:06.917089518 +0200
|
||||
@@ -140,10 +140,10 @@ else
|
||||
;;
|
||||
#################################################### compile
|
||||
--base-cflags)
|
||||
- echo @CFLAGS@ @CPPFLAGS@ -I${NSC_INCLUDEDIR}
|
||||
+ echo -I${NSC_INCLUDEDIR}
|
||||
;;
|
||||
--cflags|--cf*)
|
||||
- echo @CFLAGS@ @DEVFLAGS@ @CPPFLAGS@ -I. -I${NSC_INCLUDEDIR}
|
||||
+ echo @DEVFLAGS@ -I. -I${NSC_INCLUDEDIR}
|
||||
;;
|
||||
--srcdir)
|
||||
echo $NSC_SRCDIR
|
||||
diff -urNp a/perl/agent/default_store/Makefile.PL b/perl/agent/default_store/Makefile.PL
|
||||
--- a/perl/agent/default_store/Makefile.PL 2018-07-18 13:43:12.170426290 +0200
|
||||
+++ b/perl/agent/default_store/Makefile.PL 2018-07-18 13:51:31.812176486 +0200
|
||||
@@ -83,7 +83,7 @@ sub AgentDefaultStoreInitMakeParams {
|
||||
" " . $Params{'LIBS'};
|
||||
$Params{'CCFLAGS'} = "-I../../../include " . $Params{'CCFLAGS'};
|
||||
}
|
||||
- $Params{'CCFLAGS'} =~ s/ -W(all|inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings
|
||||
+ $Params{'CCFLAGS'} =~ s/ -W(inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings
|
||||
$Params{'CCFLAGS'} .= ' -Wformat';
|
||||
if ($Params{'LIBS'} eq "" || $Params{'CCFLAGS'} eq "") {
|
||||
die "You need to install net-snmp first (I can't find net-snmp-config)";
|
||||
diff -urNp a/perl/agent/Makefile.PL b/perl/agent/Makefile.PL
|
||||
--- a/perl/agent/Makefile.PL 2018-07-18 13:43:12.169426292 +0200
|
||||
+++ b/perl/agent/Makefile.PL 2018-07-18 13:52:53.884973275 +0200
|
||||
@@ -98,7 +98,7 @@ sub AgentInitMakeParams {
|
||||
$Params{'LIBS'} = `$opts->{'nsconfig'} --libdir` . $Params{'LIBS'};
|
||||
# $Params{'PREREQ_PM'} = {'NetSNMP::OID' => '0.1'};
|
||||
}
|
||||
- $Params{'CCFLAGS'} =~ s/ -W(all|inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings
|
||||
+ $Params{'CCFLAGS'} =~ s/ -W(inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings
|
||||
$Params{'CCFLAGS'} .= ' -Wformat';
|
||||
if ($Params{'LIBS'} eq "" || $Params{'CCFLAGS'} eq "") {
|
||||
die "You need to install net-snmp first (I can't find net-snmp-config)";
|
||||
diff -urNp a/perl/agent/Support/Makefile.PL b/perl/agent/Support/Makefile.PL
|
||||
--- a/perl/agent/Support/Makefile.PL 2018-07-18 13:43:12.169426292 +0200
|
||||
+++ b/perl/agent/Support/Makefile.PL 2018-07-18 13:53:11.414929921 +0200
|
||||
@@ -90,7 +90,7 @@ sub SupportInitMakeParams {
|
||||
" " . $Params{'LIBS'};
|
||||
$Params{'CCFLAGS'} = "-I../../include " . $Params{'CCFLAGS'};
|
||||
}
|
||||
- $Params{'CCFLAGS'} =~ s/ -W(all|inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings
|
||||
+ $Params{'CCFLAGS'} =~ s/ -W(inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings
|
||||
$Params{'CCFLAGS'} .= ' -Wformat';
|
||||
if ($Params{'LIBS'} eq "" || $Params{'CCFLAGS'} eq "") {
|
||||
die "You need to install net-snmp first (I can't find net-snmp-config)";
|
||||
diff -urNp a/perl/ASN/Makefile.PL b/perl/ASN/Makefile.PL
|
||||
--- a/perl/ASN/Makefile.PL 2018-07-18 13:43:12.171426287 +0200
|
||||
+++ b/perl/ASN/Makefile.PL 2018-07-18 13:53:46.652842822 +0200
|
||||
@@ -93,7 +93,7 @@ sub AsnInitMakeParams {
|
||||
" " . $Params{'LIBS'};
|
||||
$Params{'CCFLAGS'} = "-I../../include " . $Params{'CCFLAGS'};
|
||||
}
|
||||
- $Params{'CCFLAGS'} =~ s/ -W(all|inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings
|
||||
+ $Params{'CCFLAGS'} =~ s/ -W(inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings
|
||||
$Params{'CCFLAGS'} .= ' -Wformat';
|
||||
if ($Params{'LIBS'} eq "" || $Params{'CCFLAGS'} eq "") {
|
||||
die "You need to install net-snmp first (I can't find net-snmp-config)";
|
||||
diff -urNp a/perl/default_store/Makefile.PL b/perl/default_store/Makefile.PL
|
||||
--- a/perl/default_store/Makefile.PL 2018-07-18 13:43:12.175426277 +0200
|
||||
+++ b/perl/default_store/Makefile.PL 2018-07-18 13:54:20.814758441 +0200
|
||||
@@ -83,7 +83,7 @@ sub DefaultStoreInitMakeParams {
|
||||
" " . $Params{'LIBS'};
|
||||
$Params{'CCFLAGS'} = "-I../../include " . $Params{'CCFLAGS'};
|
||||
}
|
||||
- $Params{'CCFLAGS'} =~ s/ -W(all|inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings
|
||||
+ $Params{'CCFLAGS'} =~ s/ -W(inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings
|
||||
$Params{'CCFLAGS'} .= ' -Wformat';
|
||||
if ($Params{'LIBS'} eq "" || $Params{'CCFLAGS'} eq "") {
|
||||
die "You need to install net-snmp first (I can't find net-snmp-config)";
|
||||
diff -urNp a/perl/OID/Makefile.PL b/perl/OID/Makefile.PL
|
||||
--- a/perl/OID/Makefile.PL 2018-07-18 13:43:12.175426277 +0200
|
||||
+++ b/perl/OID/Makefile.PL 2018-07-18 13:54:43.348702811 +0200
|
||||
@@ -90,7 +90,7 @@ sub OidInitMakeParams {
|
||||
# } else {
|
||||
# $Params{'PREREQ_PM'} = {'SNMP' => '5.0'};
|
||||
}
|
||||
- $Params{'CCFLAGS'} =~ s/ -W(all|inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings
|
||||
+ $Params{'CCFLAGS'} =~ s/ -W(inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings
|
||||
$Params{'CCFLAGS'} .= ' -Wformat';
|
||||
if ($Params{'LIBS'} eq "" || $Params{'CCFLAGS'} eq "") {
|
||||
die "You need to install net-snmp first (I can't find net-snmp-config)";
|
||||
diff -urNp a/perl/SNMP/Makefile.PL b/perl/SNMP/Makefile.PL
|
||||
--- a/perl/SNMP/Makefile.PL 2018-07-18 13:43:12.173426282 +0200
|
||||
+++ b/perl/SNMP/Makefile.PL 2018-07-18 13:55:07.220643903 +0200
|
||||
@@ -103,7 +103,7 @@ sub SnmpInitMakeParams {
|
||||
# } else {
|
||||
# $Params{'PREREQ_PM'} = { 'NetSNMP::default_store' => 0.01 };
|
||||
}
|
||||
- $Params{'CCFLAGS'} =~ s/ -W(all|inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings
|
||||
+ $Params{'CCFLAGS'} =~ s/ -W(inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings
|
||||
$Params{'CCFLAGS'} .= ' -Wformat';
|
||||
if (!$ENV{'NETSNMP_PREFIX'}) {
|
||||
$prefix = `$opts->{'nsconfig'} --prefix`;
|
||||
diff -urNp a/perl/TrapReceiver/Makefile.PL b/perl/TrapReceiver/Makefile.PL
|
||||
--- a/perl/TrapReceiver/Makefile.PL 2018-07-18 13:43:12.172426285 +0200
|
||||
+++ b/perl/TrapReceiver/Makefile.PL 2018-07-18 13:55:43.100647233 +0200
|
||||
@@ -132,7 +132,7 @@ sub TrapReceiverInitMakeParams {
|
||||
$Params{'LIBS'} = `$opts->{'nsconfig'} --libdir` . " $Params{'LIBS'}";
|
||||
}
|
||||
|
||||
- $Params{'CCFLAGS'} =~ s/ -W(all|inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings
|
||||
+ $Params{'CCFLAGS'} =~ s/ -W(inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings
|
||||
$Params{'CCFLAGS'} .= ' -Wformat';
|
||||
if ($Params{'CCFLAGS'} eq "") {
|
||||
die "You need to install net-snmp first (I can't find net-snmp-config)";
|
12
source/n/net-snmp/net-snmp-5.8-dir-fix.patch
Normal file
12
source/n/net-snmp/net-snmp-5.8-dir-fix.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -urNp a/net-snmp-create-v3-user.in b/net-snmp-create-v3-user.in
|
||||
--- a/net-snmp-create-v3-user.in 2018-07-18 11:11:53.227015237 +0200
|
||||
+++ b/net-snmp-create-v3-user.in 2018-07-18 11:12:13.375010176 +0200
|
||||
@@ -137,7 +137,7 @@ fi
|
||||
echo $line >> $outfile
|
||||
prefix="@prefix@"
|
||||
datarootdir="@datarootdir@"
|
||||
-outfile="@datadir@/snmp/snmpd.conf"
|
||||
+outfile="/etc/snmp/snmpd.conf"
|
||||
line="$token $user"
|
||||
echo "adding the following line to $outfile:"
|
||||
echo " " $line
|
|
@ -0,0 +1,12 @@
|
|||
diff -urNp a/apps/Makefile.in b/apps/Makefile.in
|
||||
--- a/apps/Makefile.in 2018-07-18 15:39:28.069251000 +0200
|
||||
+++ b/apps/Makefile.in 2018-07-18 15:54:52.261943123 +0200
|
||||
@@ -230,7 +230,7 @@ snmppcap$(EXEEXT): snmppcap.$(OSUFFIX
|
||||
$(LINK) ${CFLAGS} -o $@ snmppcap.$(OSUFFIX) ${LDFLAGS} ${LIBS} -lpcap
|
||||
|
||||
libnetsnmptrapd.$(LIB_EXTENSION)$(LIB_VERSION): $(LLIBTRAPD_OBJS)
|
||||
- $(LIB_LD_CMD) $@ ${LLIBTRAPD_OBJS} $(MIBLIB) $(USELIBS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS)
|
||||
+ $(LIB_LD_CMD) $@ ${LLIBTRAPD_OBJS} $(MIBLIB) $(USELIBS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) $(MYSQL_LIB)
|
||||
$(RANLIB) $@
|
||||
|
||||
snmpinforminstall:
|
83
source/n/net-snmp/net-snmp-5.8-modern-rpm-api.patch
Normal file
83
source/n/net-snmp/net-snmp-5.8-modern-rpm-api.patch
Normal file
|
@ -0,0 +1,83 @@
|
|||
diff -urNp a/agent/mibgroup/host/data_access/swinst_rpm.c b/agent/mibgroup/host/data_access/swinst_rpm.c
|
||||
--- a/agent/mibgroup/host/data_access/swinst_rpm.c 2018-07-18 16:12:19.583503903 +0200
|
||||
+++ b/agent/mibgroup/host/data_access/swinst_rpm.c 2018-07-18 16:50:38.599703588 +0200
|
||||
@@ -102,7 +102,6 @@ netsnmp_swinst_arch_load( netsnmp_contai
|
||||
rpmtd td_name, td_version, td_release, td_group, td_time;
|
||||
#else
|
||||
char *n, *v, *r, *g;
|
||||
- int32_t *t;
|
||||
#endif
|
||||
time_t install_time;
|
||||
size_t date_len;
|
||||
@@ -146,14 +145,13 @@ netsnmp_swinst_arch_load( netsnmp_contai
|
||||
install_time = rpmtdGetNumber(td_time);
|
||||
g = rpmtdGetString(td_group);
|
||||
#else
|
||||
- headerGetEntry( h, RPMTAG_NAME, NULL, (void**)&n, NULL);
|
||||
- headerGetEntry( h, RPMTAG_VERSION, NULL, (void**)&v, NULL);
|
||||
- headerGetEntry( h, RPMTAG_RELEASE, NULL, (void**)&r, NULL);
|
||||
- headerGetEntry( h, RPMTAG_GROUP, NULL, (void**)&g, NULL);
|
||||
- headerGetEntry( h, RPMTAG_INSTALLTIME, NULL, (void**)&t, NULL);
|
||||
+ n = headerGetString( h, RPMTAG_NAME);
|
||||
+ v = headerGetString( h, RPMTAG_VERSION);
|
||||
+ r = headerGetString( h, RPMTAG_RELEASE);
|
||||
+ g = headerGetString( h, RPMTAG_GROUP);
|
||||
+ install_time = headerGetNumber( h, RPMTAG_INSTALLTIME);
|
||||
entry->swName_len = snprintf( entry->swName, sizeof(entry->swName),
|
||||
"%s-%s-%s", n, v, r);
|
||||
- install_time = *t;
|
||||
#endif
|
||||
entry->swType = (g && NULL != strstr( g, "System Environment"))
|
||||
? 2 /* operatingSystem */
|
||||
diff -urNp a/agent/mibgroup/host/hr_swinst.c b/agent/mibgroup/host/hr_swinst.c
|
||||
--- a/agent/mibgroup/host/hr_swinst.c 2018-07-18 16:12:19.582503907 +0200
|
||||
+++ b/agent/mibgroup/host/hr_swinst.c 2018-07-18 17:09:29.716564197 +0200
|
||||
@@ -479,9 +479,9 @@ var_hrswinst(struct variable * vp,
|
||||
}
|
||||
#else
|
||||
# ifdef HAVE_LIBRPM
|
||||
- char *rpm_groups;
|
||||
- if ( headerGetEntry(swi->swi_h, RPMTAG_GROUP, NULL, (void **) &rpm_groups, NULL) ) {
|
||||
- if ( strstr(rpm_groups, "System Environment") != NULL )
|
||||
+ const char *rpm_group = headerGetString(swi->swi_h, RPMTAG_GROUP);
|
||||
+ if ( NULL != rpm_group ) {
|
||||
+ if ( strstr(rpm_group, "System Environment") != NULL )
|
||||
long_return = 2; /* operatingSystem */
|
||||
else
|
||||
long_return = 4; /* applcation */
|
||||
@@ -498,9 +498,8 @@ var_hrswinst(struct variable * vp,
|
||||
case HRSWINST_DATE:
|
||||
{
|
||||
#ifdef HAVE_LIBRPM
|
||||
- int32_t *rpm_data;
|
||||
- if ( headerGetEntry(swi->swi_h, RPMTAG_INSTALLTIME, NULL, (void **) &rpm_data, NULL) ) {
|
||||
- time_t installTime = *rpm_data;
|
||||
+ time_t installTime = headerGetNumber(swi->swi_h, RPMTAG_INSTALLTIME);
|
||||
+ if ( 0 != installTime ) {
|
||||
ret = date_n_time(&installTime, var_len);
|
||||
} else {
|
||||
ret = date_n_time(NULL, var_len);
|
||||
@@ -660,7 +659,7 @@ Save_HR_SW_info(int ix)
|
||||
if (1 <= ix && ix <= swi->swi_nrec && ix != swi->swi_prevx) {
|
||||
int offset;
|
||||
Header h;
|
||||
- char *n, *v, *r;
|
||||
+ const char *n, *v, *r;
|
||||
|
||||
offset = swi->swi_recs[ix - 1];
|
||||
|
||||
@@ -685,11 +684,9 @@ Save_HR_SW_info(int ix)
|
||||
swi->swi_h = h;
|
||||
swi->swi_prevx = ix;
|
||||
|
||||
- headerGetEntry(swi->swi_h, RPMTAG_NAME, NULL, (void **) &n, NULL);
|
||||
- headerGetEntry(swi->swi_h, RPMTAG_VERSION, NULL, (void **) &v,
|
||||
- NULL);
|
||||
- headerGetEntry(swi->swi_h, RPMTAG_RELEASE, NULL, (void **) &r,
|
||||
- NULL);
|
||||
+ n = headerGetString(swi->swi_h, RPMTAG_NAME);
|
||||
+ v = headerGetString(swi->swi_h, RPMTAG_VERSION);
|
||||
+ r = headerGetString(swi->swi_h, RPMTAG_RELEASE);
|
||||
snprintf(swi->swi_name, sizeof(swi->swi_name), "%s-%s-%s", n, v, r);
|
||||
swi->swi_name[ sizeof(swi->swi_name)-1 ] = 0;
|
||||
}
|
45
source/n/net-snmp/net-snmp-5.8-multilib.patch
Normal file
45
source/n/net-snmp/net-snmp-5.8-multilib.patch
Normal file
|
@ -0,0 +1,45 @@
|
|||
diff -urNp a/man/netsnmp_config_api.3.def b/man/netsnmp_config_api.3.def
|
||||
--- a/man/netsnmp_config_api.3.def 2018-07-18 11:18:06.196792766 +0200
|
||||
+++ b/man/netsnmp_config_api.3.def 2018-07-18 11:20:04.631679886 +0200
|
||||
@@ -295,7 +295,7 @@ for one particular machine.
|
||||
.PP
|
||||
The default list of directories to search is \fC SYSCONFDIR/snmp\fP,
|
||||
followed by \fC DATADIR/snmp\fP,
|
||||
-followed by \fC LIBDIR/snmp\fP,
|
||||
+followed by \fC /usr/lib(64)/snmp\fP,
|
||||
followed by \fC $HOME/.snmp\fP.
|
||||
This list can be changed by setting the environmental variable
|
||||
.I SNMPCONFPATH
|
||||
@@ -367,7 +367,7 @@ A colon separated list of directories to
|
||||
files in.
|
||||
Default:
|
||||
.br
|
||||
-SYSCONFDIR/snmp:\:DATADIR/snmp:\:LIBDIR/snmp:\:$HOME/.snmp
|
||||
+SYSCONFDIR/snmp:\:DATADIR/snmp:\:/usr/lib(64)/snmp:\:$HOME/.snmp
|
||||
.SH "SEE ALSO"
|
||||
netsnmp_mib_api(3), snmp_api(3)
|
||||
.\" Local Variables:
|
||||
diff -urNp a/man/snmp_config.5.def b/man/snmp_config.5.def
|
||||
--- a/man/snmp_config.5.def 2018-07-18 11:18:06.194792767 +0200
|
||||
+++ b/man/snmp_config.5.def 2018-07-18 11:20:56.423626117 +0200
|
||||
@@ -10,7 +10,7 @@ First off, there are numerous places tha
|
||||
found and read from. By default, the applications look for
|
||||
configuration files in the following 4 directories, in order:
|
||||
SYSCONFDIR/snmp,
|
||||
-DATADIR/snmp, LIBDIR/snmp, and $HOME/.snmp. In each of these
|
||||
+DATADIR/snmp, /usr/lib(64)/snmp, and $HOME/.snmp. In each of these
|
||||
directories, it looks for files snmp.conf, snmpd.conf and/or
|
||||
snmptrapd.conf, as well as snmp.local.conf, snmpd.local.conf
|
||||
and/or snmptrapd.local.conf. *.local.conf are always
|
||||
diff -urNp a/man/snmpd.conf.5.def b/man/snmpd.conf.5.def
|
||||
--- a/man/snmpd.conf.5.def 2018-07-18 11:18:06.196792766 +0200
|
||||
+++ b/man/snmpd.conf.5.def 2018-07-18 11:21:44.263574388 +0200
|
||||
@@ -1559,7 +1559,7 @@ filename), and call the initialisation r
|
||||
.RS
|
||||
.IP "Note:"
|
||||
If the specified PATH is not a fully qualified filename, it will
|
||||
-be interpreted relative to LIBDIR/snmp/dlmod, and \fC.so\fR
|
||||
+be interpreted relative to /usr/lib(64)/snmp/dlmod, and \fC.so\fR
|
||||
will be appended to the filename.
|
||||
.RE
|
||||
.PP
|
720
source/n/net-snmp/net-snmp-5.8-python3.patch
Normal file
720
source/n/net-snmp/net-snmp-5.8-python3.patch
Normal file
|
@ -0,0 +1,720 @@
|
|||
diff -urNp a/configure b/configure
|
||||
--- a/configure 2018-07-18 17:11:53.178147565 +0200
|
||||
+++ b/configure 2018-07-18 17:14:01.254774416 +0200
|
||||
@@ -7742,8 +7742,8 @@ $as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
-# Extract the first word of "python", so it can be a program name with args.
|
||||
-set dummy python; ac_word=$2
|
||||
+# Extract the first word of "python3", so it can be a program name with args.
|
||||
+set dummy python3; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_path_PYTHONPROG+:} false; then :
|
||||
diff -urNp a/configure.d/config_os_progs b/configure.d/config_os_progs
|
||||
--- a/configure.d/config_os_progs 2018-07-18 17:11:53.197147510 +0200
|
||||
+++ b/configure.d/config_os_progs 2018-07-18 17:14:29.963690646 +0200
|
||||
@@ -57,7 +57,7 @@ AC_PATH_PROG(AUTOCONF, autoconf, [:
|
||||
AC_PATH_PROG(AUTOHEADER, autoheader, [:])
|
||||
AC_PATH_PROG([PERLPROG], perl)
|
||||
AC_PATH_PROG([PSPROG], ps)
|
||||
-AC_PATH_PROG([PYTHONPROG],python)
|
||||
+AC_PATH_PROG([PYTHONPROG],python3)
|
||||
|
||||
AC_PATH_PROG([UNAMEPROG], uname)
|
||||
AC_DEFINE_UNQUOTED(UNAMEPROG,"$UNAMEPROG", [Where is the uname command])
|
||||
diff -urNp a/Makefile.in b/Makefile.in
|
||||
--- a/Makefile.in 2018-07-18 17:11:53.175147574 +0200
|
||||
+++ b/Makefile.in 2018-07-18 17:16:21.331365317 +0200
|
||||
@@ -226,7 +226,7 @@ perlcleanfeatures:
|
||||
|
||||
# python specific build rules
|
||||
#
|
||||
-PYMAKE=$(PYTHON) setup.py $(PYTHONARGS)
|
||||
+PYMAKE=/usr/bin/python3 setup.py $(PYTHONARGS)
|
||||
pythonmodules: subdirs
|
||||
@(dir=`pwd`; cd python; $(PYMAKE) build --basedir=$$dir) ; \
|
||||
if test $$? != 0 ; then \
|
||||
diff -urNp a/python/netsnmp/client_intf.c b/python/netsnmp/client_intf.c
|
||||
--- a/python/netsnmp/client_intf.c 2018-07-18 17:11:53.262147321 +0200
|
||||
+++ b/python/netsnmp/client_intf.c 2018-07-18 17:33:16.495712833 +0200
|
||||
@@ -1,11 +1,5 @@
|
||||
#include <Python.h>
|
||||
|
||||
-#if PY_VERSION_HEX < 0x02050000
|
||||
-typedef int Py_ssize_t;
|
||||
-#define PY_SSIZE_T_MAX INT_MAX
|
||||
-#define PY_SSIZE_T_MIN INT_MIN
|
||||
-#endif
|
||||
-
|
||||
#include <net-snmp/net-snmp-config.h>
|
||||
#include <net-snmp/net-snmp-includes.h>
|
||||
#include <sys/types.h>
|
||||
@@ -852,8 +846,40 @@ py_netsnmp_attr_string(PyObject *obj, ch
|
||||
if (obj && attr_name && PyObject_HasAttrString(obj, attr_name)) {
|
||||
PyObject *attr = PyObject_GetAttrString(obj, attr_name);
|
||||
if (attr) {
|
||||
+ *val = PyUnicode_AsUTF8AndSize(attr, len);
|
||||
+ Py_DECREF(attr);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+py_netsnmp_attr_set_bytes(PyObject *obj, char *attr_name,
|
||||
+ char *val, size_t len)
|
||||
+{
|
||||
+ int ret = -1;
|
||||
+ if (obj && attr_name) {
|
||||
+ PyObject* val_obj = (val ?
|
||||
+ PyBytes_FromStringAndSize(val, len) :
|
||||
+ Py_BuildValue(""));
|
||||
+ ret = PyObject_SetAttrString(obj, attr_name, val_obj);
|
||||
+ Py_DECREF(val_obj);
|
||||
+ }
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+py_netsnmp_attr_bytes(PyObject *obj, char * attr_name, char **val,
|
||||
+ Py_ssize_t *len)
|
||||
+{
|
||||
+ *val = NULL;
|
||||
+ if (obj && attr_name && PyObject_HasAttrString(obj, attr_name)) {
|
||||
+ PyObject *attr = PyObject_GetAttrString(obj, attr_name);
|
||||
+ if (attr) {
|
||||
int retval;
|
||||
- retval = PyString_AsStringAndSize(attr, val, len);
|
||||
+ retval = PyBytes_AsStringAndSize(attr, val, len);
|
||||
Py_DECREF(attr);
|
||||
return retval;
|
||||
}
|
||||
@@ -870,7 +896,7 @@ py_netsnmp_attr_long(PyObject *obj, char
|
||||
if (obj && attr_name && PyObject_HasAttrString(obj, attr_name)) {
|
||||
PyObject *attr = PyObject_GetAttrString(obj, attr_name);
|
||||
if (attr) {
|
||||
- val = PyInt_AsLong(attr);
|
||||
+ val = PyLong_AsLong(attr);
|
||||
Py_DECREF(attr);
|
||||
}
|
||||
}
|
||||
@@ -955,13 +981,13 @@ __py_netsnmp_update_session_errors(PyObj
|
||||
|
||||
py_netsnmp_attr_set_string(session, "ErrorStr", err_str, STRLEN(err_str));
|
||||
|
||||
- tmp_for_conversion = PyInt_FromLong(err_num);
|
||||
+ tmp_for_conversion = PyLong_FromLong(err_num);
|
||||
if (!tmp_for_conversion)
|
||||
return; /* nothing better to do? */
|
||||
PyObject_SetAttrString(session, "ErrorNum", tmp_for_conversion);
|
||||
Py_DECREF(tmp_for_conversion);
|
||||
|
||||
- tmp_for_conversion = PyInt_FromLong(err_ind);
|
||||
+ tmp_for_conversion = PyLong_FromLong(err_ind);
|
||||
if (!tmp_for_conversion)
|
||||
return; /* nothing better to do? */
|
||||
PyObject_SetAttrString(session, "ErrorInd", tmp_for_conversion);
|
||||
@@ -1323,7 +1349,7 @@ netsnmp_get(PyObject *self, PyObject *ar
|
||||
|
||||
ss = (SnmpSession *)py_netsnmp_attr_void_ptr(session, "sess_ptr");
|
||||
|
||||
- if (py_netsnmp_attr_string(session, "ErrorStr", &tmpstr, &tmplen) < 0) {
|
||||
+ if (py_netsnmp_attr_bytes(session, "ErrorStr", &tmpstr, &tmplen) < 0) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
@@ -2015,7 +2041,7 @@ netsnmp_walk(PyObject *self, PyObject *a
|
||||
vars, tp, type, sprintval_flag);
|
||||
str_buf[len] = '\0';
|
||||
|
||||
- py_netsnmp_attr_set_string(varbind, "val", (char *) str_buf,
|
||||
+ py_netsnmp_attr_set_bytes(varbind, "val", (char *) str_buf,
|
||||
len);
|
||||
|
||||
/* push the varbind onto the return varbinds */
|
||||
@@ -2266,7 +2292,7 @@ netsnmp_getbulk(PyObject *self, PyObject
|
||||
|
||||
__get_type_str(type, type_str);
|
||||
|
||||
- py_netsnmp_attr_set_string(varbind, "type", type_str,
|
||||
+ py_netsnmp_attr_set_bytes(varbind, "type", type_str,
|
||||
strlen(type_str));
|
||||
|
||||
len = __snprint_value((char **)&str_buf, &str_buf_len,
|
||||
@@ -2409,7 +2435,7 @@ netsnmp_set(PyObject *self, PyObject *ar
|
||||
}
|
||||
}
|
||||
|
||||
- if (py_netsnmp_attr_string(varbind, "val", &val, &tmplen) < 0) {
|
||||
+ if (py_netsnmp_attr_bytes(varbind, "val", &val, &tmplen) < 0) {
|
||||
snmp_free_pdu(pdu);
|
||||
goto done;
|
||||
}
|
||||
@@ -2467,7 +2493,6 @@ netsnmp_set(PyObject *self, PyObject *ar
|
||||
return (ret ? ret : Py_BuildValue(""));
|
||||
}
|
||||
|
||||
-
|
||||
static PyMethodDef ClientMethods[] = {
|
||||
{"session", netsnmp_create_session, METH_VARARGS,
|
||||
"create a netsnmp session."},
|
||||
@@ -2490,10 +2515,23 @@ static PyMethodDef ClientMethods[] = {
|
||||
{NULL, NULL, 0, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
+static struct PyModuleDef ModuleDefinition = {
|
||||
+ PyModuleDef_HEAD_INIT,
|
||||
+ "client_intf",
|
||||
+ NULL,
|
||||
+ -1,
|
||||
+ ClientMethods,
|
||||
+ NULL,
|
||||
+ NULL,
|
||||
+ NULL,
|
||||
+ NULL
|
||||
+};
|
||||
+
|
||||
PyMODINIT_FUNC
|
||||
-initclient_intf(void)
|
||||
+PyInit_client_intf(void)
|
||||
{
|
||||
- (void) Py_InitModule("client_intf", ClientMethods);
|
||||
+ PyObject *module = PyModule_Create(&ModuleDefinition);
|
||||
+ return module;
|
||||
}
|
||||
|
||||
|
||||
diff -urNp a/python/netsnmp/client.py b/python/netsnmp/client.py
|
||||
--- a/python/netsnmp/client.py 2018-07-18 17:11:53.262147321 +0200
|
||||
+++ b/python/netsnmp/client.py 2018-07-18 17:37:10.489221397 +0200
|
||||
@@ -34,12 +34,12 @@ def _parse_session_args(kargs):
|
||||
'TheirHostname':'',
|
||||
'TrustCert':''
|
||||
}
|
||||
- keys = kargs.keys()
|
||||
+ keys = list(kargs.keys())
|
||||
for key in keys:
|
||||
- if sessArgs.has_key(key):
|
||||
+ if key in sessArgs:
|
||||
sessArgs[key] = kargs[key]
|
||||
else:
|
||||
- print >>stderr, "ERROR: unknown key", key
|
||||
+ print("ERROR: unknown key", key, file=stderr)
|
||||
return sessArgs
|
||||
|
||||
def STR(obj):
|
||||
@@ -55,7 +55,7 @@ class Varbind(object):
|
||||
def __init__(self, tag=None, iid=None, val=None, type_arg=None):
|
||||
self.tag = STR(tag)
|
||||
self.iid = STR(iid)
|
||||
- self.val = STR(val)
|
||||
+ self.val = val
|
||||
self.type = STR(type_arg)
|
||||
# parse iid out of tag if needed
|
||||
if iid is None and tag is not None:
|
||||
@@ -65,7 +65,10 @@ class Varbind(object):
|
||||
(self.tag, self.iid) = match.group(1, 2)
|
||||
|
||||
def __setattr__(self, name, val):
|
||||
- self.__dict__[name] = STR(val)
|
||||
+ if name == 'val':
|
||||
+ self.__dict__[name] = val
|
||||
+ else:
|
||||
+ self.__dict__[name] = STR(val)
|
||||
|
||||
def __str__(self):
|
||||
return obj_to_str(self)
|
||||
@@ -132,7 +135,7 @@ class Session(object):
|
||||
|
||||
sess_args = _parse_session_args(args)
|
||||
|
||||
- for k, v in sess_args.items():
|
||||
+ for k, v in list(sess_args.items()):
|
||||
self.__dict__[k] = v
|
||||
|
||||
|
||||
diff -urNp a/python/netsnmp/__init__.py b/python/netsnmp/__init__.py
|
||||
--- a/python/netsnmp/__init__.py 2018-07-18 17:11:53.262147321 +0200
|
||||
+++ b/python/netsnmp/__init__.py 2018-07-18 17:37:32.553172525 +0200
|
||||
@@ -1 +1 @@
|
||||
-from client import *
|
||||
+from .client import *
|
||||
diff -urNp a/python/netsnmp/tests/test.py b/python/netsnmp/tests/test.py
|
||||
--- a/python/netsnmp/tests/test.py 2018-07-18 17:11:53.263147318 +0200
|
||||
+++ b/python/netsnmp/tests/test.py 2018-07-18 17:38:21.272063355 +0200
|
||||
@@ -12,7 +12,7 @@ def snmp_dest(**kwargs):
|
||||
'DestHost': 'localhost:' + os.environ.get("SNMP_SNMPD_PORT", 161),
|
||||
'Community': 'public',
|
||||
}
|
||||
- for key, value in kwargs.iteritems():
|
||||
+ for key, value in kwargs.items():
|
||||
dest[key] = value
|
||||
return dest
|
||||
|
||||
@@ -62,107 +62,107 @@ class BasicTests(unittest.TestCase):
|
||||
self.assertEqual(var.iid, '')
|
||||
|
||||
def test_v1_get(self):
|
||||
- print "\n"
|
||||
- print "---v1 GET tests -------------------------------------\n"
|
||||
+ print("\n")
|
||||
+ print("---v1 GET tests -------------------------------------\n")
|
||||
var = netsnmp.Varbind('.1.3.6.1.2.1.1.1', '0')
|
||||
res = netsnmp.snmpget(var, **snmp_dest())
|
||||
|
||||
- print "v1 snmpget result: ", res, "\n"
|
||||
+ print("v1 snmpget result: ", res, "\n")
|
||||
self.assertEqual(len(res), 1)
|
||||
|
||||
- print "v1 get var: ", var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
+ print("v1 get var: ", var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
self.assertEqual(var.tag, 'sysDescr')
|
||||
self.assertEqual(var.iid, '0')
|
||||
self.assertEqual(var.val, res[0])
|
||||
self.assertEqual(var.type, 'OCTETSTR')
|
||||
|
||||
def test_v1_getnext(self):
|
||||
- print "\n"
|
||||
- print "---v1 GETNEXT tests-------------------------------------\n"
|
||||
+ print("\n")
|
||||
+ print("---v1 GETNEXT tests-------------------------------------\n")
|
||||
var = netsnmp.Varbind('.1.3.6.1.2.1.1.1', '0')
|
||||
res = netsnmp.snmpgetnext(var, **snmp_dest())
|
||||
|
||||
- print "v1 snmpgetnext result: ", res, "\n"
|
||||
+ print("v1 snmpgetnext result: ", res, "\n")
|
||||
self.assertEqual(len(res), 1)
|
||||
|
||||
- print "v1 getnext var: ", var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
+ print("v1 getnext var: ", var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
self.assertTrue(var.tag is not None)
|
||||
self.assertTrue(var.iid is not None)
|
||||
self.assertTrue(var.val is not None)
|
||||
self.assertTrue(var.type is not None)
|
||||
|
||||
def test_v1_set(self):
|
||||
- print "\n"
|
||||
- print "---v1 SET tests-------------------------------------\n"
|
||||
+ print("\n")
|
||||
+ print("---v1 SET tests-------------------------------------\n")
|
||||
var = netsnmp.Varbind('sysLocation', '0', 'my new location')
|
||||
res = netsnmp.snmpset(var, **snmp_dest())
|
||||
|
||||
- print "v1 snmpset result: ", res, "\n"
|
||||
+ print("v1 snmpset result: ", res, "\n")
|
||||
self.assertEqual(res, 1)
|
||||
|
||||
- print "v1 set var: ", var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
+ print("v1 set var: ", var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
self.assertEqual(var.tag, 'sysLocation')
|
||||
self.assertEqual(var.iid, '0')
|
||||
self.assertEqual(var.val, 'my new location')
|
||||
self.assertTrue(var.type is None)
|
||||
|
||||
def test_v1_walk(self):
|
||||
- print "\n"
|
||||
- print "---v1 walk tests-------------------------------------\n"
|
||||
+ print("\n")
|
||||
+ print("---v1 walk tests-------------------------------------\n")
|
||||
varlist = netsnmp.VarList(netsnmp.Varbind('system'))
|
||||
|
||||
- print "v1 varlist walk in: "
|
||||
+ print("v1 varlist walk in: ")
|
||||
for var in varlist:
|
||||
- print " ", var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
+ print(" ", var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
|
||||
res = netsnmp.snmpwalk(varlist, **snmp_dest())
|
||||
- print "v1 snmpwalk result: ", res, "\n"
|
||||
+ print("v1 snmpwalk result: ", res, "\n")
|
||||
self.assertTrue(len(res) > 0)
|
||||
|
||||
for var in varlist:
|
||||
- print var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
+ print(var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
|
||||
def test_v1_walk_2(self):
|
||||
- print "\n"
|
||||
- print "---v1 walk 2-------------------------------------\n"
|
||||
+ print("\n")
|
||||
+ print("---v1 walk 2-------------------------------------\n")
|
||||
|
||||
- print "v1 varbind walk in: "
|
||||
+ print("v1 varbind walk in: ")
|
||||
var = netsnmp.Varbind('system')
|
||||
self.assertEqual(var.tag, 'system')
|
||||
self.assertEqual(var.iid, '')
|
||||
self.assertEqual(var.val, None)
|
||||
self.assertEqual(var.type, None)
|
||||
res = netsnmp.snmpwalk(var, **snmp_dest())
|
||||
- print "v1 snmpwalk result (should be = orig): ", res, "\n"
|
||||
+ print("v1 snmpwalk result (should be = orig): ", res, "\n")
|
||||
self.assertTrue(len(res) > 0)
|
||||
|
||||
- print var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
+ print(var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
self.assertEqual(var.tag, 'system')
|
||||
self.assertEqual(var.iid, '')
|
||||
self.assertEqual(var.val, None)
|
||||
self.assertEqual(var.type, None)
|
||||
|
||||
def test_v1_mv_get(self):
|
||||
- print "\n"
|
||||
- print "---v1 multi-varbind test-------------------------------------\n"
|
||||
+ print("\n")
|
||||
+ print("---v1 multi-varbind test-------------------------------------\n")
|
||||
sess = setup_v1()
|
||||
|
||||
varlist = netsnmp.VarList(netsnmp.Varbind('sysUpTime', 0),
|
||||
netsnmp.Varbind('sysContact', 0),
|
||||
netsnmp.Varbind('sysLocation', 0))
|
||||
vals = sess.get(varlist)
|
||||
- print "v1 sess.get result: ", vals, "\n"
|
||||
+ print("v1 sess.get result: ", vals, "\n")
|
||||
self.assertTrue(len(vals) > 0)
|
||||
|
||||
for var in varlist:
|
||||
- print var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
+ print(var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
|
||||
vals = sess.getnext(varlist)
|
||||
- print "v1 sess.getnext result: ", vals, "\n"
|
||||
+ print("v1 sess.getnext result: ", vals, "\n")
|
||||
self.assertTrue(len(vals) > 0)
|
||||
|
||||
for var in varlist:
|
||||
- print var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
+ print(var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
|
||||
varlist = netsnmp.VarList(netsnmp.Varbind('sysUpTime'),
|
||||
netsnmp.Varbind('sysORLastChange'),
|
||||
@@ -171,71 +171,71 @@ class BasicTests(unittest.TestCase):
|
||||
netsnmp.Varbind('sysORUpTime'))
|
||||
|
||||
vals = sess.getbulk(2, 8, varlist)
|
||||
- print "v1 sess.getbulk result: ", vals, "\n"
|
||||
+ print("v1 sess.getbulk result: ", vals, "\n")
|
||||
self.assertEqual(vals, None) # GetBulk is not supported for v1
|
||||
|
||||
for var in varlist:
|
||||
- print var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
+ print(var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
|
||||
def test_v1_set_2(self):
|
||||
- print "\n"
|
||||
- print "---v1 set2-------------------------------------\n"
|
||||
+ print("\n")
|
||||
+ print("---v1 set2-------------------------------------\n")
|
||||
|
||||
sess = setup_v1()
|
||||
varlist = netsnmp.VarList(
|
||||
netsnmp.Varbind('sysLocation', '0', 'my newer location'))
|
||||
res = sess.set(varlist)
|
||||
- print "v1 sess.set result: ", res, "\n"
|
||||
+ print("v1 sess.set result: ", res, "\n")
|
||||
|
||||
def test_v1_walk_3(self):
|
||||
- print "\n"
|
||||
- print "---v1 walk3-------------------------------------\n"
|
||||
+ print("\n")
|
||||
+ print("---v1 walk3-------------------------------------\n")
|
||||
|
||||
sess = setup_v1()
|
||||
varlist = netsnmp.VarList(netsnmp.Varbind('system'))
|
||||
|
||||
vals = sess.walk(varlist)
|
||||
- print "v1 sess.walk result: ", vals, "\n"
|
||||
+ print("v1 sess.walk result: ", vals, "\n")
|
||||
self.assertTrue(len(vals) > 0)
|
||||
|
||||
for var in varlist:
|
||||
- print " ", var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
+ print(" ", var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
|
||||
def test_v2c_get(self):
|
||||
- print "\n"
|
||||
- print "---v2c get-------------------------------------\n"
|
||||
+ print("\n")
|
||||
+ print("---v2c get-------------------------------------\n")
|
||||
|
||||
sess = setup_v2()
|
||||
varlist = netsnmp.VarList(netsnmp.Varbind('sysUpTime', 0),
|
||||
netsnmp.Varbind('sysContact', 0),
|
||||
netsnmp.Varbind('sysLocation', 0))
|
||||
vals = sess.get(varlist)
|
||||
- print "v2 sess.get result: ", vals, "\n"
|
||||
+ print("v2 sess.get result: ", vals, "\n")
|
||||
self.assertEqual(len(vals), 3)
|
||||
|
||||
def test_v2c_getnext(self):
|
||||
- print "\n"
|
||||
- print "---v2c getnext-------------------------------------\n"
|
||||
+ print("\n")
|
||||
+ print("---v2c getnext-------------------------------------\n")
|
||||
|
||||
sess = setup_v2()
|
||||
varlist = netsnmp.VarList(netsnmp.Varbind('sysUpTime', 0),
|
||||
netsnmp.Varbind('sysContact', 0),
|
||||
netsnmp.Varbind('sysLocation', 0))
|
||||
for var in varlist:
|
||||
- print var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
- print "\n"
|
||||
+ print(var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
+ print("\n")
|
||||
|
||||
vals = sess.getnext(varlist)
|
||||
- print "v2 sess.getnext result: ", vals, "\n"
|
||||
+ print("v2 sess.getnext result: ", vals, "\n")
|
||||
self.assertTrue(len(vals) > 0)
|
||||
|
||||
for var in varlist:
|
||||
- print var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
- print "\n"
|
||||
+ print(var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
+ print("\n")
|
||||
|
||||
def test_v2c_getbulk(self):
|
||||
- print "\n"
|
||||
- print "---v2c getbulk-------------------------------------\n"
|
||||
+ print("\n")
|
||||
+ print("---v2c getbulk-------------------------------------\n")
|
||||
|
||||
sess = setup_v2()
|
||||
varlist = netsnmp.VarList(netsnmp.Varbind('sysUpTime'),
|
||||
@@ -245,16 +245,16 @@ class BasicTests(unittest.TestCase):
|
||||
netsnmp.Varbind('sysORUpTime'))
|
||||
|
||||
vals = sess.getbulk(2, 8, varlist)
|
||||
- print "v2 sess.getbulk result: ", vals, "\n"
|
||||
+ print("v2 sess.getbulk result: ", vals, "\n")
|
||||
self.assertTrue(len(vals) > 0)
|
||||
|
||||
for var in varlist:
|
||||
- print var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
- print "\n"
|
||||
+ print(var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
+ print("\n")
|
||||
|
||||
def test_v2c_set(self):
|
||||
- print "\n"
|
||||
- print "---v2c set-------------------------------------\n"
|
||||
+ print("\n")
|
||||
+ print("---v2c set-------------------------------------\n")
|
||||
|
||||
sess = setup_v2()
|
||||
|
||||
@@ -262,54 +262,54 @@ class BasicTests(unittest.TestCase):
|
||||
netsnmp.Varbind('sysLocation', '0', 'my even newer location'))
|
||||
|
||||
res = sess.set(varlist)
|
||||
- print "v2 sess.set result: ", res, "\n"
|
||||
+ print("v2 sess.set result: ", res, "\n")
|
||||
self.assertEqual(res, 1)
|
||||
|
||||
def test_v2c_walk(self):
|
||||
- print "\n"
|
||||
- print "---v2c walk-------------------------------------\n"
|
||||
+ print("\n")
|
||||
+ print("---v2c walk-------------------------------------\n")
|
||||
|
||||
sess = setup_v2()
|
||||
|
||||
varlist = netsnmp.VarList(netsnmp.Varbind('system'))
|
||||
|
||||
vals = sess.walk(varlist)
|
||||
- print "v2 sess.walk result: ", vals, "\n"
|
||||
+ print("v2 sess.walk result: ", vals, "\n")
|
||||
self.assertTrue(len(vals) > 0)
|
||||
|
||||
for var in varlist:
|
||||
- print " ", var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
+ print(" ", var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
|
||||
def test_v3_get(self):
|
||||
- print "\n"
|
||||
+ print("\n")
|
||||
sess = setup_v3();
|
||||
varlist = netsnmp.VarList(netsnmp.Varbind('sysUpTime', 0),
|
||||
netsnmp.Varbind('sysContact', 0),
|
||||
netsnmp.Varbind('sysLocation', 0))
|
||||
- print "---v3 get-------------------------------------\n"
|
||||
+ print("---v3 get-------------------------------------\n")
|
||||
vals = sess.get(varlist)
|
||||
- print "v3 sess.get result: ", vals, "\n"
|
||||
+ print("v3 sess.get result: ", vals, "\n")
|
||||
self.assertTrue(len(vals) > 0)
|
||||
|
||||
for var in varlist:
|
||||
- print var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
- print "\n"
|
||||
+ print(var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
+ print("\n")
|
||||
|
||||
def test_v3_getnext(self):
|
||||
- print "\n"
|
||||
- print "---v3 getnext-------------------------------------\n"
|
||||
+ print("\n")
|
||||
+ print("---v3 getnext-------------------------------------\n")
|
||||
|
||||
sess = setup_v3();
|
||||
varlist = netsnmp.VarList(netsnmp.Varbind('sysUpTime', 0),
|
||||
netsnmp.Varbind('sysContact', 0),
|
||||
netsnmp.Varbind('sysLocation', 0))
|
||||
vals = sess.getnext(varlist)
|
||||
- print "v3 sess.getnext result: ", vals, "\n"
|
||||
+ print("v3 sess.getnext result: ", vals, "\n")
|
||||
self.assertTrue(len(vals) > 0)
|
||||
|
||||
for var in varlist:
|
||||
- print var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
- print "\n"
|
||||
+ print(var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
+ print("\n")
|
||||
|
||||
def test_v3_getbulk(self):
|
||||
sess = setup_v3();
|
||||
@@ -320,47 +320,47 @@ class BasicTests(unittest.TestCase):
|
||||
netsnmp.Varbind('sysORUpTime'))
|
||||
|
||||
vals = sess.getbulk(2, 8, varlist)
|
||||
- print "v3 sess.getbulk result: ", vals, "\n"
|
||||
+ print("v3 sess.getbulk result: ", vals, "\n")
|
||||
self.assertTrue(len(vals) > 0)
|
||||
|
||||
for var in varlist:
|
||||
- print var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
- print "\n"
|
||||
+ print(var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
+ print("\n")
|
||||
|
||||
def test_v3_set(self):
|
||||
- print "\n"
|
||||
- print "---v3 set-------------------------------------\n"
|
||||
+ print("\n")
|
||||
+ print("---v3 set-------------------------------------\n")
|
||||
|
||||
sess = setup_v3();
|
||||
varlist = netsnmp.VarList(
|
||||
netsnmp.Varbind('sysLocation', '0', 'my final destination'))
|
||||
res = sess.set(varlist)
|
||||
- print "v3 sess.set result: ", res, "\n"
|
||||
+ print("v3 sess.set result: ", res, "\n")
|
||||
self.assertEqual(res, 1)
|
||||
|
||||
def test_v3_walk(self):
|
||||
- print "\n"
|
||||
- print "---v3 walk-------------------------------------\n"
|
||||
+ print("\n")
|
||||
+ print("---v3 walk-------------------------------------\n")
|
||||
sess = setup_v3();
|
||||
varlist = netsnmp.VarList(netsnmp.Varbind('system'))
|
||||
|
||||
vals = sess.walk(varlist)
|
||||
- print "v3 sess.walk result: ", vals, "\n"
|
||||
+ print("v3 sess.walk result: ", vals, "\n")
|
||||
self.assertTrue(len(vals) > 0)
|
||||
|
||||
for var in varlist:
|
||||
- print " ", var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
+ print(" ", var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
|
||||
|
||||
class SetTests(unittest.TestCase):
|
||||
"""SNMP set tests for the Net-SNMP Python interface"""
|
||||
def testFuncs(self):
|
||||
"""Test code"""
|
||||
- print "\n-------------- SET Test Start ----------------------------\n"
|
||||
+ print("\n-------------- SET Test Start ----------------------------\n")
|
||||
|
||||
var = netsnmp.Varbind('sysUpTime', '0')
|
||||
res = netsnmp.snmpget(var, **snmp_dest())
|
||||
- print "uptime = ", res[0]
|
||||
+ print("uptime = ", res[0])
|
||||
self.assertEqual(len(res), 1)
|
||||
|
||||
|
||||
@@ -370,19 +370,19 @@ class SetTests(unittest.TestCase):
|
||||
|
||||
var = netsnmp.Varbind('sysUpTime', '0')
|
||||
res = netsnmp.snmpget(var, **snmp_dest())
|
||||
- print "uptime = ", res[0]
|
||||
+ print("uptime = ", res[0])
|
||||
self.assertEqual(len(res), 1)
|
||||
|
||||
var = netsnmp.Varbind('nsCacheEntry')
|
||||
res = netsnmp.snmpgetnext(var, **snmp_dest())
|
||||
- print "var = ", var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
+ print("var = ", var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
self.assertEqual(len(res), 1)
|
||||
|
||||
var.val = 65
|
||||
res = netsnmp.snmpset(var, **snmp_dest())
|
||||
self.assertEqual(res, 1)
|
||||
res = netsnmp.snmpget(var, **snmp_dest())
|
||||
- print "var = ", var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
+ print("var = ", var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
self.assertEqual(len(res), 1)
|
||||
self.assertEqual(res[0], '65');
|
||||
|
||||
@@ -394,7 +394,7 @@ class SetTests(unittest.TestCase):
|
||||
netsnmp.Varbind('.1.3.6.1.6.3.12.1.2.1.9.116.101.115.116', '', 4))
|
||||
res = sess.set(varlist)
|
||||
|
||||
- print "res = ", res
|
||||
+ print("res = ", res)
|
||||
self.assertEqual(res, 1)
|
||||
|
||||
varlist = netsnmp.VarList(netsnmp.Varbind('snmpTargetAddrTDomain'),
|
||||
@@ -414,15 +414,15 @@ class SetTests(unittest.TestCase):
|
||||
self.assertEqual(varlist[2].val, '3')
|
||||
|
||||
for var in varlist:
|
||||
- print var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
- print "\n"
|
||||
+ print(var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
+ print("\n")
|
||||
|
||||
varlist = netsnmp.VarList(
|
||||
netsnmp.Varbind('.1.3.6.1.6.3.12.1.2.1.9.116.101.115.116', '', 6))
|
||||
|
||||
res = sess.set(varlist)
|
||||
|
||||
- print "res = ", res
|
||||
+ print("res = ", res)
|
||||
self.assertEqual(res, 1)
|
||||
|
||||
varlist = netsnmp.VarList(netsnmp.Varbind('snmpTargetAddrTDomain'),
|
||||
@@ -436,10 +436,10 @@ class SetTests(unittest.TestCase):
|
||||
self.assertNotEqual(varlist[2].tag, 'snmpTargetAddrRowStatus')
|
||||
|
||||
for var in varlist:
|
||||
- print var.tag, var.iid, "=", var.val, '(', var.type, ')'
|
||||
- print "\n"
|
||||
+ print(var.tag, var.iid, "=", var.val, '(', var.type, ')')
|
||||
+ print("\n")
|
||||
|
||||
- print "\n-------------- SET Test End ----------------------------\n"
|
||||
+ print("\n-------------- SET Test End ----------------------------\n")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
diff -urNp a/python/setup.py b/python/setup.py
|
||||
--- a/python/setup.py 2018-07-18 17:11:53.262147321 +0200
|
||||
+++ b/python/setup.py 2018-07-18 17:40:36.922751382 +0200
|
||||
@@ -9,9 +9,9 @@ intree=0
|
||||
|
||||
args = sys.argv[:]
|
||||
for arg in args:
|
||||
- if string.find(arg,'--basedir=') == 0:
|
||||
- basedir = string.split(arg,'=')[1]
|
||||
- sys.argv.remove(arg)
|
||||
+ if arg.find('--basedir=') == 0:
|
||||
+ basedir = arg.split('=')[1]
|
||||
+ sys.argv.remove(arg) #tabs
|
||||
intree=1
|
||||
|
||||
if intree:
|
30
source/n/net-snmp/net-snmp-5.8-test-debug.patch
Normal file
30
source/n/net-snmp/net-snmp-5.8-test-debug.patch
Normal file
|
@ -0,0 +1,30 @@
|
|||
Don't check tests which depend on DNS - it's disabled in Koji
|
||||
|
||||
diff -urNp a/testing/fulltests/default/T070com2sec_simple b/testing/fulltests/default/T070com2sec_simple
|
||||
--- a/testing/fulltests/default/T070com2sec_simple 2018-07-18 11:52:56.081185545 +0200
|
||||
+++ b/testing/fulltests/default/T070com2sec_simple 2018-07-18 11:54:18.843968880 +0200
|
||||
@@ -134,6 +134,10 @@ SAVECHECKAGENT '<"c406a", 255.255.255.25
|
||||
SAVECHECKAGENT 'line 30: Error:' # msg from h_strerror so it varies
|
||||
SAVECHECKAGENT 'line 31: Error:' # msg from h_strerror so it varies
|
||||
|
||||
+FINISHED
|
||||
+
|
||||
+# don't test the rest, it depends on DNS, which is not available in Koji
|
||||
+
|
||||
CHECKAGENT '<"c408a"'
|
||||
if [ "$snmp_last_test_result" -eq 0 ] ; then
|
||||
CHECKAGENT 'line 32: Error:'
|
||||
diff -urNp a/testing/fulltests/default/T071com2sec6_simple b/testing/fulltests/default/T071com2sec6_simple
|
||||
--- a/testing/fulltests/default/T071com2sec6_simple 2018-07-18 11:52:56.080185548 +0200
|
||||
+++ b/testing/fulltests/default/T071com2sec6_simple 2018-07-18 11:55:17.779818732 +0200
|
||||
@@ -132,6 +132,10 @@ SAVECHECKAGENT '<"c606a", ffff:ffff:ffff
|
||||
SAVECHECKAGENT 'line 27: Error:'
|
||||
SAVECHECKAGENT 'line 28: Error:'
|
||||
|
||||
+FINISHED
|
||||
+
|
||||
+# don't test the rest, it depends on DNS, which is not available in Koji
|
||||
+
|
||||
# 608
|
||||
CHECKAGENT '<"c608a"'
|
||||
if [ "$snmp_last_test_result" -eq 0 ] ; then
|
|
@ -23,8 +23,8 @@
|
|||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PKGNAM=net-snmp
|
||||
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
|
||||
BUILD=${BUILD:-9}
|
||||
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
|
||||
BUILD=${BUILD:-1}
|
||||
|
||||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
|
@ -65,21 +65,9 @@ fi
|
|||
|
||||
cd $TMP
|
||||
rm -rf ${PKGNAM}-${VERSION}
|
||||
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
|
||||
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z || exit 1
|
||||
cd ${PKGNAM}-$VERSION || exit 1
|
||||
|
||||
zcat $CWD/net-snmp.net-snmp-create-v3-user.etc.snmpd.conf.diff.gz | patch -p1 --verbose || exit 1
|
||||
zcat $CWD/net-snmp-5.7.3-Fix-Makefile-PL.patch.gz | patch -p1 --verbose || exit 1
|
||||
|
||||
# Replace a typedef that conflicts with perl:
|
||||
zcat $CWD/net-snmp-5.7.3-Remove-U64-typedef.patch.gz | patch -p1 --verbose || exit 1
|
||||
|
||||
# Add support for mariadb:
|
||||
zcat $CWD/net-snmp-5.7.3-mariadb-10.2.8.diff.gz | patch -p1 --verbose || exit 1
|
||||
|
||||
# Support OpenSSL-1.1.x:
|
||||
zcat $CWD/net-snmp-5.7.3-openssl.patch.gz | patch -p1 --verbose || exit 1
|
||||
|
||||
# Make sure ownerships and permissions are sane:
|
||||
chown -R root:root .
|
||||
find . \
|
||||
|
@ -88,9 +76,26 @@ find . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
zcat $CWD/net-snmp-5.7.2-pie.patch.gz | patch -p1 --verbose || exit 1
|
||||
zcat $CWD/net-snmp-5.8-dir-fix.patch.gz | patch -p1 --verbose || exit 1
|
||||
zcat $CWD/net-snmp-5.8-multilib.patch.gz | patch -p1 --verbose || exit 1
|
||||
zcat $CWD/net-snmp-5.8-test-debug.patch.gz | patch -p1 --verbose || exit 1
|
||||
zcat $CWD/net-snmp-5.7.2-autoreconf.patch.gz | patch -p1 --verbose || exit 1
|
||||
zcat $CWD/net-snmp-5.8-agentx-disconnect-crash.patch.gz | patch -p1 --verbose || exit 1
|
||||
zcat $CWD/net-snmp-5.7.2-cert-path.patch.gz | patch -p1 --verbose || exit 1
|
||||
zcat $CWD/net-snmp-5.8-cflags.patch.gz | patch -p1 --verbose || exit 1
|
||||
zcat $CWD/net-snmp-5.8-Remove-U64-typedef.patch.gz | patch -p1 --verbose || exit 1
|
||||
zcat $CWD/net-snmp-5.8-libnetsnmptrapd-against-MYSQL_LIBS.patch.gz | patch -p1 --verbose || exit 1
|
||||
zcat $CWD/net-snmp-5.7.3-iterator-fix.patch.gz | patch -p1 --verbose || exit 1
|
||||
zcat $CWD/net-snmp-5.8-autofs-skip.patch.gz | patch -p1 --verbose || exit 1
|
||||
zcat $CWD/net-snmp-5.8-modern-rpm-api.patch.gz | patch -p1 --verbose || exit 1
|
||||
|
||||
# Not sure about this one?
|
||||
#zcat $CWD/net-snmp-5.8-python3.patch.gz | patch -p1 --verbose || exit 1
|
||||
|
||||
# Fix destdir for python modules
|
||||
sed -i "s|\$(PYMAKE) install|\$(PYMAKE) install --root=$PKG|" \
|
||||
Makefile.in
|
||||
#sed -i "s|\$(PYMAKE) install|\$(PYMAKE) install --root=$PKG|" \
|
||||
# Makefile.in
|
||||
|
||||
# Configure:
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
Let net-snmp-create-v3-user save settings into /etc/ instead of /usr/
|
||||
|
||||
diff -up net-snmp-5.5/net-snmp-create-v3-user.in.orig net-snmp-5.5/net-snmp-create-v3-user.in
|
||||
--- net-snmp-5.5/net-snmp-create-v3-user.in.orig 2008-07-22 16:33:25.000000000 +0200
|
||||
+++ net-snmp-5.5/net-snmp-create-v3-user.in 2009-09-29 16:30:36.000000000 +0200
|
||||
@@ -158,7 +158,7 @@ if test ! -d $outfile ; then
|
||||
touch $outfile
|
||||
fi
|
||||
echo $line >> $outfile
|
||||
-outfile="@datadir@/snmp/snmpd.conf"
|
||||
+outfile="/etc/snmp/snmpd.conf"
|
||||
line="$token $user"
|
||||
echo "adding the following line to $outfile:"
|
||||
echo " " $line
|
1
source/n/net-snmp/net-snmp.url
Normal file
1
source/n/net-snmp/net-snmp.url
Normal file
|
@ -0,0 +1 @@
|
|||
https://sourceforge.net/projects/net-snmp/
|
|
@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
|
|||
|
||||
PKGNAM=ntp
|
||||
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
|
||||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
|
|
|
@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd)
|
|||
PKGNAM=php
|
||||
VERSION=${VERSION:-$(echo php-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
|
||||
ALPINE=2.21
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
|
||||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
|
|
|
@ -29,7 +29,7 @@ PKGNAM=blackbox
|
|||
SRCNAM=blackbox
|
||||
VERSION=${VERSION:-0.74}
|
||||
BBKEYSVER=${BBKEYSVER:-0.9.1}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
|
||||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
|
@ -110,9 +110,6 @@ CFLAGS="$SLKCFLAGS" \
|
|||
# Build:
|
||||
make $NUMJOBS || make || exit 1
|
||||
|
||||
# Install onto filesystem - needed for bbkeys to find libbt:
|
||||
make install || exit 1
|
||||
|
||||
# Install into package:
|
||||
make install DESTDIR=$PKG || exit 1
|
||||
mkdir -p $PKG/etc/X11/xinit
|
||||
|
@ -154,6 +151,14 @@ find . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
# The blackbox's libbt won't be met. We could make the LIBBT_CFLAGS and
|
||||
# LIBBT_LIBS environment to point in the temporary root, but we will
|
||||
# rather try to keep going with pkg-config, in case the requirements are
|
||||
# updated in the future.
|
||||
export PKG_CONFIG_PATH="$(pwd)/pkgconfig.$$"
|
||||
mkdir "$PKG_CONFIG_PATH"
|
||||
sed "s,=/usr,=$PKG/usr," "$PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/libbt.pc" >"$PKG_CONFIG_PATH/libbt.pc"
|
||||
|
||||
# Configure:
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
|
|
|
@ -26,7 +26,7 @@ PKGNAM=sane
|
|||
VERSION=1.0.27
|
||||
BACKVER=1.0.27
|
||||
FRONTVER=1.0.14
|
||||
BUILD=${BUILD:-3}
|
||||
BUILD=${BUILD:-4}
|
||||
|
||||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
|
|
Loading…
Reference in a new issue