diff --git a/net-snmp-5.9.4-remove-mail-sender.patch b/net-snmp-5.9.4-remove-mail-sender.patch new file mode 100644 index 0000000..152bea4 --- /dev/null +++ b/net-snmp-5.9.4-remove-mail-sender.patch @@ -0,0 +1,43 @@ +diff -urNp a/local/checkbandwidth b/local/checkbandwidth +--- a/local/checkbandwidth 2024-06-21 21:17:01.675417287 +0200 ++++ b/local/checkbandwidth 2024-06-21 21:19:40.107746544 +0200 +@@ -326,7 +326,6 @@ See the Net-SNMP COPYING file for licens + + use JSON; + use Data::Dumper; +-use Mail::Sender; + use SNMP; + use Fcntl ':flock'; + +@@ -744,19 +743,19 @@ sub send_rate_message($$$$$$) { + sub send_message($$$) { + my ($to, $subject, $text) = @_; + +- my $sender = new Mail::Sender { smtp => $opts{'S'} , +- port => $opts{'P'}, +- from => $opts{'F'}, +- }; +- +- my $status = +- $sender->MailMsg({ +- to => $to, +- subject => $subject, +- msg => $text +- }); ++# my $sender = new Mail::Sender { smtp => $opts{'S'} , ++# port => $opts{'P'}, ++# from => $opts{'F'}, ++# }; ++ ++ my $status = -1; ++# $sender->MailMsg({ ++# to => $to, ++# subject => $subject, ++# msg => $text ++# }); + if ($status < 0) { +- Log("Failed to send mail with error code $status: $Mail::Sender::Error"); ++ Log("Failed to send mail with error code $status: Mail::Sender is not available"); + } + } + diff --git a/net-snmp.spec b/net-snmp.spec index 3b2660f..2df2631 100644 --- a/net-snmp.spec +++ b/net-snmp.spec @@ -10,7 +10,7 @@ Summary: A collection of SNMP protocol tools and libraries Name: net-snmp Version: 5.9.4 -Release: 6%{?dist} +Release: 7%{?dist} Epoch: 1 License: Net-SNMP and OpenSSL @@ -52,6 +52,7 @@ Patch22: net-snmp-5.9-ipv6-disable-leak.patch Patch23: net-snmp-5.9-rpmdb.patch Patch24: net-snmp-5.9.4-test-fix.patch Patch25: net-snmp-5.9.4-kernel-6.7.patch +Patch26: net-snmp-5.9.4-remove-mail-sender.patch # Modern RPM API means at least EL6 Patch101: net-snmp-5.8-modern-rpm-api.patch @@ -243,6 +244,7 @@ cp %{SOURCE10} . %patch 23 -p1 -b .rpmdbpatch %patch 24 -p1 -b .test-fix %patch 25 -p1 -b .kernel-fix +%patch 26 -p1 -b .remove-mail-sender %patch 101 -p1 -b .modern-rpm-api %patch 102 -p1 @@ -513,6 +515,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} make test %{_libdir}/libnetsnmptrapd*.so.%{soname}* %changelog +* Fri Jun 21 2024 Josef Ridky - 1:5.9.4-7 +- remove dependency issue for Mail::Sender perl module (RHEL-44478) + * Fri Jun 21 2024 Josef Ridky - 1:5.9.4-6 - add missing patch application