[perl-Test-LeakTrace] Update to 0.14 and clean up package

Paul Howarth pghmcfc at fedoraproject.org
Mon Mar 12 10:59:02 UTC 2012


commit 9597a0be45222d9efacb8fbc83d4c5c3a2886e17
Author: Paul Howarth <paul at city-fan.org>
Date:   Mon Mar 12 10:57:39 2012 +0000

    Update to 0.14 and clean up package
    
    - New upstream release 0.14
      - Fix Test::Valgrind failures
    - Drop tests subpackage; move tests to main package documentation as long as
      we have %{perl_default_filter} to avoid the resulting doc-file dependencies
    - Run the release tests too, except for xt/05_valgrind.t since we don't have
      Test::Valgrind yet
    - BR: perl(Test::Pod), perl(Test::Pod::Coverage), perl(Test::Spelling),
      aspell-en/hunspell-en and perl(Test::Synopsis) for the release tests
    - Drop version requirement of perl(ExtUtils::MakeMaker) to 6.30, which works
      fine in EPEL-5
    - Tidy %description
    - Make %files list more explicit
    - Package benchmark/ and example/ as documentation
    - Drop explicit versioned requires of perl(Exporter) ≥ 5.57, satisfied by all
      supported distributions
    - Don't need to remove empty directories from buildroot
    - Don't use macros for commands
    - Drop %defattr, redundant since rpm 4.4
    - Use tabs

 .gitignore               |    2 +-
 perl-Test-LeakTrace.spec |  138 +++++++++++++++++++++++++++++++---------------
 sources                  |    2 +-
 3 files changed, 95 insertions(+), 47 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index db02c11..96b0c7c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/Test-LeakTrace-0.13.tar.gz
+/Test-LeakTrace-[0-9.]*.tar.gz
diff --git a/perl-Test-LeakTrace.spec b/perl-Test-LeakTrace.spec
index 0267bf7..263d000 100644
--- a/perl-Test-LeakTrace.spec
+++ b/perl-Test-LeakTrace.spec
@@ -1,67 +1,115 @@
-Name:           perl-Test-LeakTrace
-Summary:        Traces memory leaks
-Version:        0.13
-Release:        4%{?dist}
-License:        GPL+ or Artistic
-Group:          Development/Libraries
-Source0:        http://search.cpan.org/CPAN/authors/id/G/GF/GFUJI/Test-LeakTrace-%{version}.tar.gz 
-URL:            http://search.cpan.org/dist/Test-LeakTrace
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
-
-BuildRequires:  perl(Exporter) >= 5.57
-BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.42
-BuildRequires:  perl(Test::More) >= 0.62
-
-Requires:       perl(Exporter) >= 5.57
-
+# Pick up the right dictionary for the spell check
+%if %(perl -e 'print $] >= 5.010000 ? 1 : 0;')
+%global speller hunspell
+%else
+%global speller aspell
+%endif
+
+#TODO: BR: perl(Test::Valgrind) when available
+
+Name:		perl-Test-LeakTrace
+Summary:	Trace memory leaks
+Version:	0.14
+Release:	1%{?dist}
+License:	GPL+ or Artistic
+Group:		Development/Libraries
+URL:		http://search.cpan.org/dist/Test-LeakTrace/
+Source0:	http://search.cpan.org/CPAN/authors/id/G/GF/GFUJI/Test-LeakTrace-%{version}.tar.gz
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
+BuildRequires:	perl(Exporter) >= 5.57
+BuildRequires:	perl(ExtUtils::MakeMaker) >= 6.30
+BuildRequires:	perl(Test::More) >= 0.62
+BuildRequires:	perl(Test::Pod) >= 1.14
+BuildRequires:	perl(Test::Pod::Coverage) >= 1.04
+BuildRequires:	perl(Test::Spelling), %{speller}-en
+BuildRequires:	perl(Test::Synopsis)
+Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+
+# Obsolete/Provide old tests subpackage
+# Can be removed during F19 development cycle
+%if 0%{?perl_default_filter:1}
+Obsoletes:	%{name}-tests < 0.14
+Provides:	%{name}-tests = %{version}-%{release}
+%endif
+
+# Don't provide private perl libs
 %{?perl_default_filter}
-%{?perl_default_subpackage_tests}
 
 %description
-'Test::LeakTrace' provides several functions that trace memory leaks.
-This module scans arenas, the memory allocation system, so it can detect
-any leaked SVs in given blocks.  *Leaked SVs* are SVs which are not
-released after the end of the scope they have been created. These SVs
-include global variables and internal caches. For example, if you call a
-method in a tracing block, perl might prepare a cache for the method.
-Thus, to trace true leaks, 'no_leaks_ok()' and 'leaks_cmp_ok()' executes
-a block more than once.
+Test::LeakTrace provides several functions that trace memory leaks. This module
+scans arenas, the memory allocation system, so it can detect any leaked SVs in
+given blocks.
+
+Leaked SVs are SVs that are not released after the end of the scope they have
+been created. These SVs include global variables and internal caches. For
+example, if you call a method in a tracing block, perl might prepare a cache
+for the method. Thus, to trace true leaks, no_leaks_ok() and leaks_cmp_ok()
+executes a block more than once.
 
 %prep
 %setup -q -n Test-LeakTrace-%{version}
 
-find . -type f -exec chmod -c -x {} +
+# Remove redundant exec bits
+chmod -c -x lib/Test/LeakTrace/Script.pm t/lib/foo.pl
+
+# Fix up shellbangs in doc scripts
+sed -i -e 's|^#!perl|#!/usr/bin/perl|' benchmark/*.pl example/*.{pl,t} {t,xt}/*.t
 
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
+perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
 make %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
-
 make pure_install DESTDIR=%{buildroot}
 find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
 find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
-find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
-
-%{_fixperms} %{buildroot}/*
+%{_fixperms} %{buildroot}
 
 %check
 make test
 
+# Run the release tests, except for xt/05_valgrind.t because we don't have Test::Valgrind yet
+# Don't spell-check JA.pod as it can generate false positives
+mv lib/Test/LeakTrace/JA.pod ./
+touch lib/Test/LeakTrace/JA.pod
+DICTIONARY=en_US make test TEST_FILES="$(echo xt/*.t | sed 's|xt/05_valgrind.t||')"
+rm lib/Test/LeakTrace/JA.pod
+mv ./JA.pod lib/Test/LeakTrace/
 
 %clean
 rm -rf %{buildroot}
 
 %files
-%defattr(-,root,root,-)
-%doc Changes README
-%{perl_vendorarch}/*
-%exclude %dir %{perl_vendorarch}/auto
-%{_mandir}/man3/*.3*
+%doc Changes README benchmark/ example/ %{?perl_default_filter:t/ xt/}
+%{perl_vendorarch}/auto/Test/
+%{perl_vendorarch}/Test/
+%{_mandir}/man3/Test::LeakTrace.3pm*
+%{_mandir}/man3/Test::LeakTrace::JA.3pm*
+%{_mandir}/man3/Test::LeakTrace::Script.3pm*
 
 %changelog
+* Mon Mar 12 2012 Paul Howarth <paul at city-fan.org> - 0.14-1
+- Update to 0.14
+  - Fix Test::Valgrind failures
+- Drop tests subpackage; move tests to main package documentation as long as
+  we have %%{perl_default_filter} to avoid the resulting doc-file dependencies
+- Run the release tests too, except for xt/05_valgrind.t since we don't have
+  Test::Valgrind yet
+- BR: perl(Test::Pod), perl(Test::Pod::Coverage), perl(Test::Spelling),
+  aspell-en/hunspell-en and perl(Test::Synopsis) for the release tests
+- Drop version requirement of perl(ExtUtils::MakeMaker) to 6.30, which works
+  fine in EPEL-5
+- Tidy %%description
+- Make %%files list more explicit
+- Package benchmark/ and example/ as documentation
+- Drop explicit versioned requires of perl(Exporter) ≥ 5.57, satisfied by all
+  supported distributions
+- Don't need to remove empty directories from buildroot
+- Don't use macros for commands
+- Drop %%defattr, redundant since rpm 4.4
+- Use tabs
+
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.13-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 
@@ -72,18 +120,18 @@ rm -rf %{buildroot}
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 
 * Wed Nov 17 2010 Paul Howarth <paul at city-fan.org> - 0.13-1
-- update to 0.13
-  - use ">= 0", instead of "== 0" for no_leaks_ok()
-  - add count_sv() to count all the SVs in a perl interpreter
-  - fix tests broken for some perls in 0.12
+- Update to 0.13
+  - Use ">= 0", instead of "== 0" for no_leaks_ok()
+  - Add count_sv() to count all the SVs in a perl interpreter
+  - Fix tests broken for some perls in 0.12
 
 * Wed Nov 17 2010 Paul Howarth <paul at city-fan.org> - 0.11-1
-- update to 0.11 (#654301)
-  - fix false-positive related to XS code (CPAN RT #58133)
+- Update to 0.11 (#654301)
+  - Fix false-positive related to XS code (CPAN RT #58133)
 
 * Thu May 06 2010 Marcela Maslanova <mmaslano at redhat.com> - 0.10-2
 - Mass rebuild with perl-5.12.0
 
-* Sun Apr 04 2010 Chris Weyl <cweyl at alumni.drew.edu> 0.10-1
-- specfile by Fedora::App::MaintainerTools 0.006
+* Sun Apr 04 2010 Chris Weyl <cweyl at alumni.drew.edu> - 0.10-1
+- Specfile by Fedora::App::MaintainerTools 0.006
 
diff --git a/sources b/sources
index cb987ca..c7bd3a8 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-4cb35b4542d19af3a537fd776a290207  Test-LeakTrace-0.13.tar.gz
+d53953f442cf782c30f843df677db210  Test-LeakTrace-0.14.tar.gz



More information about the perl-devel mailing list