[perl-Crypt-RSA] Spec clean-up
Paul Howarth
pghmcfc at fedoraproject.org
Tue Jan 10 22:26:42 UTC 2012
commit 16677125c8322ab716a547b3f8c0f93a03e6c923
Author: Paul Howarth <paul at city-fan.org>
Date: Tue Jan 10 22:26:03 2012 +0000
Spec clean-up
- Nobody else likes macros for commands
- Use a patch rather than scripted iconv to fix character encodings
- Use %{_fixperms} macro rather than our own chmod incantation
- BR: perl(Carp)
Crypt-RSA-1.99-utf8.patch | 22 ++++++++++++++
perl-Crypt-RSA.spec | 71 ++++++++++++++++++++++++---------------------
2 files changed, 60 insertions(+), 33 deletions(-)
---
diff --git a/Crypt-RSA-1.99-utf8.patch b/Crypt-RSA-1.99-utf8.patch
new file mode 100644
index 0000000..2e0eafc
--- /dev/null
+++ b/Crypt-RSA-1.99-utf8.patch
@@ -0,0 +1,22 @@
+--- Crypt-RSA/Changes
++++ Crypt-RSA/Changes
+@@ -163,7 +163,7 @@
+
+ * Fixed a bug in ::ES::PKCS1v15 caused by inclusion of null characters
+ in the padding string. Null chars are used as delimiters in PKCS #1
+- v1.5 encoding. Thanks to Ganèche <gramanoudjame at promonetic.com>
++ v1.5 encoding. Thanks to Ganèche <gramanoudjame at promonetic.com>
+ for reporting this bug.
+
+
+--- Crypt-RSA/lib/Crypt/RSA.pm
++++ Crypt-RSA/lib/Crypt/RSA.pm
+@@ -530,7 +530,7 @@ Vipul Ved Prakash, E<lt>mail at vipul.netE<
+ =head1 ACKNOWLEDGEMENTS
+
+ Thanks to Ilya Zakharevich for help with Math::Pari, Benjamin Trott for
+-several patches including SSH key support, Genèche Ramanoudjame for
++several patches including SSH key support, Genèche Ramanoudjame for
+ extensive testing and numerous bug reports, Shizukesa on #perl for
+ suggesting the error handling method used in this module, and Dave Paris
+ for good advice.
diff --git a/perl-Crypt-RSA.spec b/perl-Crypt-RSA.spec
index 2b56daf..fde6bc8 100644
--- a/perl-Crypt-RSA.spec
+++ b/perl-Crypt-RSA.spec
@@ -1,14 +1,15 @@
Summary: RSA public-key cryptosystem
Name: perl-Crypt-RSA
Version: 1.99
-Release: 7%{?dist}
+Release: 8%{?dist}
License: GPL+ or Artistic
Group: Development/Libraries
Url: http://search.cpan.org/dist/Crypt-RSA/
Source0: http://search.cpan.org/CPAN/authors/id/V/VI/VIPUL/Crypt-RSA-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Patch0: Crypt-RSA-1.99-utf8.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch: noarch
+BuildRequires: perl(Carp)
BuildRequires: perl(Class::Loader) >= 2.00
BuildRequires: perl(Convert::ASCII::Armour)
BuildRequires: perl(Crypt::Random) >= 0.34
@@ -23,6 +24,7 @@ BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Math::Pari) >= 2.001804
BuildRequires: perl(Sort::Versions)
BuildRequires: perl(Tie::EncryptedHash)
+Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl(Class::Loader) >= 2.00
%description
@@ -39,33 +41,30 @@ standard, it also provides PKCS #1 v1.5 encryption and signatures.
%setup -q -n Crypt-RSA-%{version}
# Convert documentation to UTF-8
-for f in Changes lib/Crypt/RSA.pm; do
- /usr/bin/iconv -f iso-8859-1 -t utf-8 -o ${f}.utf-8 ${f}
- %{__mv} -f ${f}.utf-8 ${f}
-done
+%patch0 -p1
%build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
-%{__make} %{?_smp_mflags}
-
-%check
-%{__make} test
+perl Makefile.PL INSTALLDIRS=vendor
+make %{?_smp_mflags}
%install
-%{__rm} -rf %{buildroot}
-%{__make} pure_install PERL_INSTALL_ROOT=%{buildroot}
-/usr/bin/find %{buildroot} -type f -name .packlist -exec %{__rm} -f {} ';'
-/usr/bin/find %{buildroot} -depth -type d -exec /bin/rmdir {} 2>/dev/null ';'
-%{__chmod} -R u+w %{buildroot}/*
+rm -rf %{buildroot}
+make pure_install DESTDIR=%{buildroot}
+find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
+find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
+%{_fixperms} %{buildroot}
# Additional manpages
-/usr/bin/pod2man --section=3 extradocs/crypt-rsa-interoperablity.pod \
+pod2man --section=3 extradocs/crypt-rsa-interoperablity.pod \
%{buildroot}%{_mandir}/man3/crypt-rsa-interoperablity.3
-/usr/bin/pod2man --section=3 extradocs/crypt-rsa-interoperablity-template.pod \
+pod2man --section=3 extradocs/crypt-rsa-interoperablity-template.pod \
%{buildroot}%{_mandir}/man3/crypt-rsa-interoperablity-template.3
+%check
+make test
+
%clean
-%{__rm} -rf %{buildroot}
+rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
@@ -89,34 +88,40 @@ done
%{_mandir}/man3/crypt-rsa-interoperablity-template.3*
%changelog
-* Tue Jun 21 2011 Marcela Mašláňová <mmaslano at redhat.com> - 1.99-7
+* Tue Jan 10 2012 Paul Howarth <paul at city-fan.org> 1.99-8
+- Nobody else likes macros for commands
+- Use a patch rather than scripted iconv to fix character encodings
+- Use %%{_fixperms} macro rather than our own chmod incantation
+- BR: perl(Carp)
+
+* Tue Jun 21 2011 Marcela Mašláňová <mmaslano at redhat.com> 1.99-7
- Perl mass rebuild
-* Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.99-6
+* Tue Feb 8 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> 1.99-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
-* Thu Dec 16 2010 Marcela Maslanova <mmaslano at redhat.com> - 1.99-5
-- 661697 rebuild for fixing problems with vendorach/lib
+* Thu Dec 16 2010 Marcela Maslanova <mmaslano at redhat.com> 1.99-5
+- Rebuild to fix problems with vendorarch/lib (#661697)
-* Fri Apr 30 2010 Marcela Maslanova <mmaslano at redhat.com> - 1.99-4
+* Fri Apr 30 2010 Marcela Maslanova <mmaslano at redhat.com> 1.99-4
- Mass rebuild with perl-5.12.0
-* Fri Dec 4 2009 Stepan Kasal <skasal at redhat.com> - 1.99-3
-- rebuild against perl 5.10.1
+* Fri Dec 4 2009 Stepan Kasal <skasal at redhat.com> 1.99-3
+- Rebuild against perl 5.10.1
-* Sat Jul 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.99-2
+* Sat Jul 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> 1.99-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon Jun 8 2009 Paul Howarth <paul at city-fan.org> 1.99-1
- Update to 1.99
-- * fix CPAN RT#37489 (precedence error in C::R::Key::{Private,Public}::write)
-- * fix CPAN RT#37862 (Crypt::RSA doesn't work under setuid Perl)
-- * fix CPAN RT#46577 (invalid signature calling verify())
+ - Fix CPAN RT#37489 (precedence error in C::R::Key::{Private,Public}::write)
+ - Fix CPAN RT#37862 (Crypt::RSA doesn't work under setuid Perl)
+ - Fix CPAN RT#46577 (invalid signature calling verify())
* Wed May 13 2009 Paul Howarth <paul at city-fan.org> 1.98-3
- Recode Crypt::RSA manpage as UTF-8
-* Thu Feb 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.98-2
+* Thu Feb 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> 1.98-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Tue Jul 8 2008 Paul Howarth <paul at city-fan.org> 1.98-1
@@ -134,7 +139,7 @@ done
as rpm auto-dep-finder doesn't spot it
* Thu Mar 6 2008 Tom "spot" Callaway <tcallawa at redhat.com> 1.58-4
-- rebuild for new perl
+- Rebuild for new perl
* Sun Aug 12 2007 Paul Howarth <paul at city-fan.org> 1.58-3
- Clarify license as GPL v1 or later, or Artistic (same as perl)
More information about the perl-devel
mailing list