diff --git a/opensips-0030-Fix-use-UNIVERSAL-is-a-fatal-error-since-perl-5.22-f.patch b/opensips-0030-Fix-use-UNIVERSAL-is-a-fatal-error-since-perl-5.22-f.patch new file mode 100644 index 0000000..4047e2f --- /dev/null +++ b/opensips-0030-Fix-use-UNIVERSAL-is-a-fatal-error-since-perl-5.22-f.patch @@ -0,0 +1,56 @@ +From: =?UTF-8?q?Juli=C3=A1n=20Moreno=20Pati=C3=B1o?= +Date: Sat, 27 Feb 2016 01:15:12 +0300 +Subject: [PATCH] Fix "use UNIVERSAL" is a fatal error since perl 5.22 + following http://search.cpan.org/~shay/perl-5.22.1/lib/UNIVERSAL.pm + documentation Bug: https://github.com/OpenSIPS/opensips/issues/804 + + +diff --git a/modules/perl/lib/perl/OpenSIPS/LDAPUtils/LDAPConnection.pm b/modules/perl/lib/perl/OpenSIPS/LDAPUtils/LDAPConnection.pm +index 9275341..d0d1bb2 100644 +--- a/modules/perl/lib/perl/OpenSIPS/LDAPUtils/LDAPConnection.pm ++++ b/modules/perl/lib/perl/OpenSIPS/LDAPUtils/LDAPConnection.pm +@@ -52,7 +52,6 @@ package OpenSIPS::LDAPUtils::LDAPConnection; + use OpenSIPS::LDAPUtils::LDAPConf; + use Net::LDAP; + use Authen::SASL; +-use UNIVERSAL qw( isa ); + + my $ldap_singleton = undef; + +@@ -185,7 +184,7 @@ sub search { + + my $ldap = undef; + +- if( isa($conf ,"OpenSIPS::LDAPUtils::LDAPConnection") ) { ++ if( $conf->isa("OpenSIPS::LDAPUtils::LDAPConnection") ) { + $ldap = $conf; + } else { + if( ! $ldap_singleton ) { +diff --git a/modules/perl/lib/perl/OpenSIPS/VDB.pm b/modules/perl/lib/perl/OpenSIPS/VDB.pm +index 7b7d4dd..0668552 100644 +--- a/modules/perl/lib/perl/OpenSIPS/VDB.pm ++++ b/modules/perl/lib/perl/OpenSIPS/VDB.pm +@@ -45,7 +45,6 @@ use OpenSIPS::VDB::Result; + use OpenSIPS::VDB::Value; + use OpenSIPS::VDB::VTab; + +-use UNIVERSAL qw ( can ); + + our @ISA = qw ( OpenSIPS::Utils::Debug ); + +@@ -87,12 +86,12 @@ sub use_table { + + OpenSIPS::log(L_DBG, "perlvdb:VDB: Setting VTab: v is $v (pkg is $pkg, func/method is $3)\n"); + +- if (can($pkg, $3)) { ++ if ($pkg->can($3)) { + $self->{vtabs}->{$v} = new OpenSIPS::VDB::VTab( func => $pkg . "::" . $3); +- } elsif (can($v, "init")) { ++ } elsif ($v->can("init")) { + $v->init(); + $self->{vtabs}->{$v} = new OpenSIPS::VDB::VTab( obj => $v ); +- } elsif (can($v, "new")) { ++ } elsif ($v->can("new")) { + my $obj = $v->new(); + $self->{vtabs}->{$v} = new OpenSIPS::VDB::VTab( obj => $obj ); + } else { diff --git a/opensips.spec b/opensips.spec index a94d46c..a2eb943 100644 --- a/opensips.spec +++ b/opensips.spec @@ -5,7 +5,7 @@ Summary: Open Source SIP Server Name: opensips Version: 1.11.6 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Daemons Source0: https://github.com/%{name}/%{name}/archive/%{version}/%{name}-%{version}.tar.gz @@ -42,6 +42,9 @@ Patch26: opensips-0026-Fix-IPv6-insertion-in-fix_nated_contact.patch Patch27: opensips-0027-Don-t-push-throug-RTPProxy-streams-with-port-0-in-SD.patch Patch28: opensips-0028-Improve-qvalue-parsing.patch Patch29: opensips-0029-Fix-contact-DB-delete-in-CONTACT_ONLY-macthing.patch + +# Not merged yet +Patch30: opensips-0030-Fix-use-UNIVERSAL-is-a-fatal-error-since-perl-5.22-f.patch URL: https://opensips.org BuildRequires: expat-devel @@ -83,11 +86,9 @@ BuildRequires: libxslt BuildRequires: lynx BuildRequires: ncurses-devel BuildRequireS: json-c-devel - -#Initscripts -%if 0%{?el7}%{?fedora} # Users and groups Requires(pre): shadow-utils +%if 0%{?el7}%{?fedora} Requires(post): systemd Requires(preun): systemd Requires(postun): systemd @@ -739,6 +740,8 @@ rm -f modules/db_oracle/asynch.h %patch28 -p1 %patch29 -p1 +%patch30 -p1 + %build LOCALBASE=/usr NICER=0 CFLAGS="%{optflags} -fgnu89-inline" LDFLAGS="%{?__global_ldflags}" %{?_with_oracle:ORAHOME="$ORACLE_HOME"} %{__make} all %{?_smp_mflags} TLS=1 \ exclude_modules="%EXCLUDE_MODULES" \ @@ -1317,6 +1320,9 @@ fi %doc docdir/README.xmpp %changelog +* Sat Feb 27 2016 Peter Lemenkov - 1.11.6-2 +- Fixed incompatibility with latest Perl + * Sun Feb 21 2016 Peter Lemenkov - 1.11.6-1 - Ver. 1.11.6 - Removed compatibility with EPEL5