SHA256
1
0
forked from pool/munin

Accepting request 1138830 from home:pmonrealgonzalez:branches:server:monitoring

- Use IO::Socket::IP instead of IO::Socket::INET[6]
  * Remove the dependency on perl(IO::Socket::INET6) as it has been
    deprecated by upstream, is no longer suitable for use and its not
    being maintained. A compatible replacement for this package is
    perl(IO::Socket::IP) which is shipped by the perl-base package.
  * Upstream commit back-ported:
    https://github.com/munin-monitoring/munin/commit/012b33a7
  * Add upstream munin-remove-deprecated-INET6.patch

OBS-URL: https://build.opensuse.org/request/show/1138830
OBS-URL: https://build.opensuse.org/package/show/server:monitoring/munin?expand=0&rev=83
This commit is contained in:
Carsten Ziepke 2024-01-16 06:14:56 +00:00 committed by Git OBS Bridge
parent b3b0085105
commit 5a158eeb90
3 changed files with 167 additions and 2 deletions

View File

@ -0,0 +1,150 @@
From 012b33a702155ba7c96fd62028a3559364693c7e Mon Sep 17 00:00:00 2001
From: Steve Schnepp <steve.schnepp@pwkf.org>
Date: Wed, 26 Feb 2020 21:50:47 +0100
Subject: [PATCH] Use IO::Socket::IP instead of IO::Socket::INET[6]
---
Build.PL | 2 +-
Dockerfile | 2 +-
cpanfile | 2 +-
lib/Munin/Master/Node.pm | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
Index: munin-2.0.72/cpanfile
===================================================================
--- munin-2.0.72.orig/cpanfile
+++ munin-2.0.72/cpanfile
@@ -11,7 +11,7 @@ requires 'Getopt::Long';
requires 'HTML::Template::Pro';
requires 'HTTP::Server::Simple::CGI';
requires 'IO::Scalar';
-requires 'IO::Socket::INET6';
+requires 'IO::Socket::IP';
requires 'JSON';
requires 'LWP::Simple';
requires 'LWP::UserAgent';
Index: munin-2.0.72/Announce-2.0
===================================================================
--- munin-2.0.72.orig/Announce-2.0
+++ munin-2.0.72/Announce-2.0
@@ -14,7 +14,7 @@ The most important features:
- Large performance improvements on almost all munin's components
* Complete IPv6 integration.
- - The master only require a new perl module (IO::Socket::INET6)
+ - The master only require a new perl module (IO::Socket::IP)
- The node needs a IPv6-patched Net::Server
* Native SSH transport
Index: munin-2.0.72/doc/installation/prerequisites.rst
===================================================================
--- munin-2.0.72.orig/doc/installation/prerequisites.rst
+++ munin-2.0.72/doc/installation/prerequisites.rst
@@ -56,7 +56,7 @@ The munin master needs
* File\::Copy::Recursive
* Getopt::Long
* HTML::Template
- * IO::Socket::INET6
+ * IO::Socket::IP
* Log::Log4perl 1.18 or later
* Net::SSLeay (Optional, if you want to use SSL/TLS)
* Params::Validate
Index: munin-2.0.72/master/lib/Munin/Master/Node.pm
===================================================================
--- munin-2.0.72.orig/master/lib/Munin/Master/Node.pm
+++ munin-2.0.72/master/lib/Munin/Master/Node.pm
@@ -13,7 +13,7 @@ use Munin::Common::TLSClient;
use Data::Dumper;
use Log::Log4perl qw( :easy );
use Time::HiRes qw( gettimeofday tv_interval );
-use IO::Socket::INET6;
+use IO::Socket::IP;
# Used as a timestamp value, this declares none was found
use constant NO_TIMESTAMP => -1;
@@ -82,7 +82,7 @@ sub _do_connect {
LOGCROAK("[FATAL] '$url' is not a valid address!") unless $uri->scheme;
if ($uri->scheme eq "munin") {
- $self->{reader} = $self->{writer} = IO::Socket::INET6->new(
+ $self->{reader} = $self->{writer} = IO::Socket::IP->new(
PeerAddr => $uri->host,
PeerPort => $self->{port} || 4949,
LocalAddr => $self->_get_node_or_global_setting("local_address"),
Index: munin-2.0.72/master/t/munin_master_node.t
===================================================================
--- munin-2.0.72.orig/master/t/munin_master_node.t
+++ munin-2.0.72/master/t/munin_master_node.t
@@ -45,7 +45,7 @@ sub setup {
});
my $connected_socket = Test::MockObject->new();
$connected_socket->set_true('connected');
- my $inet = Test::MockModule->new('IO::Socket::INET6');
+ my $inet = Test::MockModule->new('IO::Socket::IP');
$inet->mock(new => sub { return $connected_socket });
$node->_do_connect();
Index: munin-2.0.72/INSTALL
===================================================================
--- munin-2.0.72.orig/INSTALL
+++ munin-2.0.72/INSTALL
@@ -40,7 +40,7 @@ Server:
- Getopt::Long
- File::Copy::Recursive
- CGI::Fast
- - IO::Socket::INET6
+ - IO::Socket::IP
- Log::Log4perl 1.18 or later (which depends on
- IPC::Shareable
- Log::Dispatch
Index: munin-2.0.72/contrib/Net-Server.patch
===================================================================
--- munin-2.0.72.orig/contrib/Net-Server.patch
+++ munin-2.0.72/contrib/Net-Server.patch
@@ -9,7 +9,7 @@ diff -ur lib.orig/Net/Server/Proto/SSLEA
use strict;
use vars qw($VERSION $AUTOLOAD @ISA);
-use IO::Socket::INET;
-+use IO::Socket::INET6;
++use IO::Socket::IP;
use Fcntl ();
use Errno ();
use Socket ();
@@ -18,7 +18,7 @@ diff -ur lib.orig/Net/Server/Proto/SSLEA
$VERSION = $Net::Server::VERSION; # done until separated
-@ISA = qw(IO::Socket::INET);
-+@ISA = qw(IO::Socket::INET6);
++@ISA = qw(IO::Socket::IP);
sub object {
my $type = shift;
@@ -63,11 +63,11 @@ diff -ur lib.orig/Net/Server/Proto/TCP.p
use strict;
use vars qw($VERSION $AUTOLOAD @ISA);
-use IO::Socket ();
-+use IO::Socket::INET6 ();
++use IO::Socket::IP ();
$VERSION = $Net::Server::VERSION; # done until separated
-@ISA = qw(IO::Socket::INET);
-+@ISA = qw(IO::Socket::INET6);
++@ISA = qw(IO::Socket::IP);
sub object {
my $type = shift;
@@ -156,12 +156,12 @@ diff -ur lib.orig/Net/Server.pm lib/Net/
### perform basic allow/deny service
sub allow_deny {
my $self = shift;
-@@ -1145,7 +1147,7 @@
+@@ -1145,6 +1147,6 @@
or $self->fatal("Can't dup socket [$!]");
### hold on to the socket copy until exec
- $prop->{_HUP}->[$i] = IO::Socket::INET->new;
-+ $prop->{_HUP}->[$i] = IO::Socket::INET6->new();
++ $prop->{_HUP}->[$i] = IO::Socket::IP->new();
$prop->{_HUP}->[$i]->fdopen($fd, 'w')
or $self->fatal("Can't open to file descriptor [$!]");

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Mon Jan 15 11:41:47 UTC 2024 - Pedro Monreal <pmonreal@suse.com>
- Use IO::Socket::IP instead of IO::Socket::INET[6]
* Remove the dependency on perl(IO::Socket::INET6) as it has been
deprecated by upstream, is no longer suitable for use and its not
being maintained. A compatible replacement for this package is
perl(IO::Socket::IP) which is shipped by the perl-base package.
* Upstream commit back-ported:
https://github.com/munin-monitoring/munin/commit/012b33a7
* Add upstream munin-remove-deprecated-INET6.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 2 07:52:08 UTC 2023 - Bernhard Wiedemann <bwiedemann@suse.com> Tue May 2 07:52:08 UTC 2023 - Bernhard Wiedemann <bwiedemann@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package munin # spec file for package munin
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -51,6 +51,8 @@ Source15: munin-cron.service
# 0x910846ADEE4C5D67C19B3E6F0A24C05998BA4133 # 0x910846ADEE4C5D67C19B3E6F0A24C05998BA4133
Source17: munin.keyring Source17: munin.keyring
Patch1: perl526.patch Patch1: perl526.patch
# PATCH-FIX-UPSTREAM Use IO::Socket::IP instead of IO::Socket::INET[6]
Patch2: munin-remove-deprecated-INET6.patch
BuildRequires: firewall-macros BuildRequires: firewall-macros
BuildRequires: html2text BuildRequires: html2text
BuildRequires: htmldoc BuildRequires: htmldoc
@ -68,7 +70,7 @@ Requires: perl-Date-Manip
Requires: perl-FastCGI Requires: perl-FastCGI
Requires: perl-File-Copy-Recursive Requires: perl-File-Copy-Recursive
Requires: perl-HTML-Template Requires: perl-HTML-Template
Requires: perl-IO-Socket-INET6 Requires: perl-IO-Socket-IP
Requires: perl-Log-Log4perl Requires: perl-Log-Log4perl
Requires: perl-Net-SNMP Requires: perl-Net-SNMP
Requires: perl-Net-SSLeay Requires: perl-Net-SSLeay
@ -153,6 +155,7 @@ cp %{SOURCE1} .
unzip %{SOURCE12} unzip %{SOURCE12}
unzip %{SOURCE13} unzip %{SOURCE13}
%patch1 -p1 %patch1 -p1
%patch2 -p1
%build %build
%__make HOSTNAME=yourhostname %__make HOSTNAME=yourhostname