[calamaris] Added patch to avoid warnings with perl >= 5.12 (#970990)

Robert Scheck robert at fedoraproject.org
Sat Aug 3 21:11:17 UTC 2013


commit 55a229a7fe412697be0eb25a4ca2ce6c5db9f701
Author: Robert Scheck <robert at fedoraproject.org>
Date:   Sat Aug 3 23:11:05 2013 +0200

    Added patch to avoid warnings with perl >= 5.12 (#970990)

 calamaris-2.59-perl_512.patch |   15 +++++++++++++++
 calamaris.spec                |    9 +++++++--
 2 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/calamaris-2.59-perl_512.patch b/calamaris-2.59-perl_512.patch
new file mode 100644
index 0000000..3a4cc76
--- /dev/null
+++ b/calamaris-2.59-perl_512.patch
@@ -0,0 +1,15 @@
+Patch by Alexey Markov <redrat at mail.ru> for calamaris <= 2.59 which avoids the
+warning about deprecated construction in code. Since Perl 5.12 defined() must not
+be applied to the hashes and arrays. See also Red Hat Bugzilla, ID #970990.
+
+--- calamaris-2.59/calamaris			2004-06-06 18:26:14.000000000 +0200
++++ calamaris-2.59/calamaris.perl_512		2013-08-03 22:57:19.000000000 +0200
+@@ -2606,7 +2606,7 @@
+ 	    100, 100 * $tcp_hit / $tcp );
+   }
+   outstop(10);
+-  if ( defined(%tcp_content) ) {
++  if ( %tcp_content ) {
+     outstart(11);
+     if ( $tcp == 0 ) {
+       outline( 11, 'no matching requests' );
diff --git a/calamaris.spec b/calamaris.spec
index a2606a3..c3da514 100644
--- a/calamaris.spec
+++ b/calamaris.spec
@@ -4,12 +4,13 @@
 Summary:	Squid native log format (NLF) analyzer and report generator
 Name:		calamaris
 Version:	2.59
-Release:	9%{?dist}
+Release:	10%{?dist}
 License:	GPLv2+
 Group:		Applications/Internet
 URL:		http://calamaris.cord.de/
 Source0:	http://calamaris.cord.de/%{name}-%{version}.tar.gz
 Source1:	calamaris-filter-requires.sh
+Patch0:		calamaris-2.59-perl_512.patch
 BuildArch:	noarch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -21,6 +22,7 @@ content-types and performance.
  
 %prep
 %setup -q
+%patch0 -p1 -b .perl_512
 
 %build
 
@@ -40,12 +42,15 @@ touch -r EXAMPLES EXAMPLES.utf8; mv -f EXAMPLES.utf8 EXAMPLES
 rm -rf $RPM_BUILD_ROOT
 
 %files
-%defattr(-,root,root)
+%defattr(-,root,root,-)
 %doc CHANGES COPYRIGHT EXAMPLES README
 %{_bindir}/%{name}
 %{_mandir}/man1/%{name}.1*
 
 %changelog
+* Sat Aug 03 2013 Robert Scheck <robert at fedoraproject.org> 2.59-10
+- Added patch to avoid warnings with perl >= 5.12 (#970990)
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.59-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list