From ec9aa7683dd3f9e380ad1c740d0342018da6e5bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C5=A0afr=C3=A1nek?= Date: Tue, 22 Jul 2008 07:46:49 +0000 Subject: [PATCH] fix perl SNMP::Session::set Resolves: #452131 --- net-snmp-5.4.1-perl-set.patch | 43 +++++++++++++++++++++++++++++++++++ net-snmp.spec | 8 ++++++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 net-snmp-5.4.1-perl-set.patch diff --git a/net-snmp-5.4.1-perl-set.patch b/net-snmp-5.4.1-perl-set.patch new file mode 100644 index 0000000..4a7f8d0 --- /dev/null +++ b/net-snmp-5.4.1-perl-set.patch @@ -0,0 +1,43 @@ +452131: net-snmp-perl is broken for 5.10, cannot set oids + +Source: jbjohnso@us.ibm.com, accepted upstream, SVN rev. 17097 + +diff -urN net-snmp-5.4.1/perl/SNMP/SNMP.xs net-snmp-5.4.1-f9fix/perl/SNMP/SNMP.xs +--- net-snmp-5.4.1/perl/SNMP/SNMP.xs 2008-06-13 15:48:46.000000000 -0500 ++++ net-snmp-5.4.1-f9fix/perl/SNMP/SNMP.xs 2008-06-13 15:48:05.000000000 -0500 +@@ -3072,7 +3072,7 @@ + res = __add_var_val_str(pdu, oid_arr, oid_arr_len, + (varbind_val_f && SvOK(*varbind_val_f) ? + SvPV(*varbind_val_f,na):NULL), +- (varbind_val_f && SvOK(*varbind_val_f) ? ++ (varbind_val_f && SvPOK(*varbind_val_f) ? + SvCUR(*varbind_val_f):0), type); + + if (verbose && res == FAILURE) +@@ -4266,7 +4266,7 @@ + res = __add_var_val_str(pdu, oid_arr, oid_arr_len, + (varbind_val_f && SvOK(*varbind_val_f) ? + SvPV(*varbind_val_f,na):NULL), +- (varbind_val_f && SvOK(*varbind_val_f) ? ++ (varbind_val_f && SvPOK(*varbind_val_f) ? + SvCUR(*varbind_val_f):0), + type); + +@@ -4424,7 +4424,7 @@ + res = __add_var_val_str(pdu, oid_arr, oid_arr_len, + (varbind_val_f && SvOK(*varbind_val_f) ? + SvPV(*varbind_val_f,na):NULL), +- (varbind_val_f && SvOK(*varbind_val_f) ? ++ (varbind_val_f && SvPOK(*varbind_val_f) ? + SvCUR(*varbind_val_f):0), + type); + +@@ -4563,7 +4563,7 @@ + res = __add_var_val_str(pdu, oid_arr, oid_arr_len, + (varbind_val_f && SvOK(*varbind_val_f) ? + SvPV(*varbind_val_f,na):NULL), +- (varbind_val_f && SvOK(*varbind_val_f) ? ++ (varbind_val_f && SvPOK(*varbind_val_f) ? + SvCUR(*varbind_val_f):0), + type); + diff --git a/net-snmp.spec b/net-snmp.spec index 50a5337..a2d5273 100644 --- a/net-snmp.spec +++ b/net-snmp.spec @@ -1,5 +1,6 @@ %{!?tcp_wrappers:%define tcp_wrappers 1} +# TODO: rediff all patches and remove following line: %define _default_patch_fuzz 2 # Arches on which we need to prevent arch conflicts on net-snmp-config.h @@ -9,7 +10,7 @@ Summary: A collection of SNMP protocol tools and libraries Name: net-snmp Version: %{major_ver} -Release: 20%{?dist} +Release: 21%{?dist} Epoch: 1 License: BSD and MIT @@ -43,6 +44,7 @@ Patch15: net-snmp-5.4.1-sensors3.patch Patch16: net-snmp-5.4.1-xen-crash.patch Patch17: net-snmp-5.4.1-hmac-check.patch Patch18: net-snmp-5.4.1-perl-snprintf.patch +Patch19: net-snmp-5.4.1-perl-set.patch Requires(pre): chkconfig Requires(post): chkconfig @@ -175,6 +177,7 @@ and applications. %patch16 -p0 -b .xen-crash %patch17 -p1 -b .hmac-check %patch18 -p3 -b .perl-snprintf +%patch19 -p1 -b .perl-set # Do this patch with a perl hack... perl -pi -e "s|'\\\$install_libdir'|'%{_libdir}'|" ltmain.sh @@ -391,6 +394,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_libdir}/lib*.so.* %changelog +* Tue Jul 22 2008 Jan Safranek 5.4.1-21 +- fix perl SNMP::Session::set (#452131) + * Fri Jul 11 2008 Jan Safranek 5.4.1-20 - prepare for new rpm version