Resolves: RHEL-44478 - remove requirement of perl(Mail::Sender)
Need to state, this is quite ugly way how to solve this issue, but we have no faster option right now, that would unblock the component. Signed-off-by: Josef Řídký <jridky@redhat.com>
This commit is contained in:
parent
44dba0be08
commit
4a199d0e37
43
net-snmp-5.9.4-remove-mail-sender.patch
Normal file
43
net-snmp-5.9.4-remove-mail-sender.patch
Normal file
@ -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");
|
||||
}
|
||||
}
|
||||
|
@ -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 <jridky@redhat.com> - 1:5.9.4-7
|
||||
- remove dependency issue for Mail::Sender perl module (RHEL-44478)
|
||||
|
||||
* Fri Jun 21 2024 Josef Ridky <jridky@redhat.com> - 1:5.9.4-6
|
||||
- add missing patch application
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user