[perl-Sendmail-PMilter] Fix addheader, getsymval bugs (CPAN RT#84941, #957886)
Paul Howarth
pghmcfc at fedoraproject.org
Tue Apr 30 15:56:17 UTC 2013
commit d1e42637d0f64736c836be92cac11237d1be321b
Author: Paul Howarth <paul at city-fan.org>
Date: Tue Apr 30 16:55:47 2013 +0100
Fix addheader, getsymval bugs (CPAN RT#84941, #957886)
- Fix addheader, getsymval bugs (CPAN RT#84941, #957886)
- Don't need to remove empty directories from the buildroot
- Specify all dependencies
Sendmail-PMilter-1.00-macro-head.patch | 29 +++++++++++++++++++++++++++++
perl-Sendmail-PMilter.spec | 20 +++++++++++++++++---
2 files changed, 46 insertions(+), 3 deletions(-)
---
diff --git a/Sendmail-PMilter-1.00-macro-head.patch b/Sendmail-PMilter-1.00-macro-head.patch
new file mode 100644
index 0000000..49902b2
--- /dev/null
+++ b/Sendmail-PMilter-1.00-macro-head.patch
@@ -0,0 +1,29 @@
+diff -urN Sendmail-PMilter-1.00-dist/lib/Sendmail/PMilter/Context.pm Sendmail-PMilter-1.00/lib/Sendmail/PMilter/Context.pm
+--- Sendmail-PMilter-1.00-dist/lib/Sendmail/PMilter/Context.pm 2011-04-16 08:07:43.000000000 -0500
++++ Sendmail-PMilter-1.00/lib/Sendmail/PMilter/Context.pm 2013-04-29 14:18:04.774584648 -0500
+@@ -472,7 +472,10 @@
+ my $this = shift;
+ my $key = shift;
+
+- foreach my $code (SMFIC_RCPT, SMFIC_MAIL, SMFIC_HELO, SMFIC_CONNECT) {
++ foreach my $code (SMFIC_UNKNOWN, SMFIC_DATA, SMFIC_QUIT, SMFIC_RCPT,
++ SMFIC_OPTNEG, SMFIC_EOH, SMFIC_MAIL, SMFIC_HEADER, SMFIC_HELO,
++ SMFIC_BODYEOB, SMFIC_MACRO, SMFIC_CONNECT, SMFIC_BODY,
++ SMFIC_ABORT) {
+ my $val = $this->{symbols}{$code}{$key};
+
+ return $val if defined($val);
+@@ -575,9 +578,11 @@
+
+ sub addheader ($$$) {
+ my $this = shift;
+- my $header = shift || die "addheader: no header name\n";
+- my $value = shift || die "addheader: no header value\n";
++ my $header = shift;
++ my $value = shift;
+
++ die "addheader: no header name\n" if (! defined ($header));
++ die "addheader: no header value\n" if (! defined ($value));
+ die "addheader: called outside of EOM\n" if ($this->{cb} ne 'eom');
+ die "addheader: SMFIF_ADDHDRS not in capability list\n" unless ($this->{callback_flags} & SMFIF_ADDHDRS);
+
diff --git a/perl-Sendmail-PMilter.spec b/perl-Sendmail-PMilter.spec
index 7ddee26..829eb10 100644
--- a/perl-Sendmail-PMilter.spec
+++ b/perl-Sendmail-PMilter.spec
@@ -1,7 +1,7 @@
Summary: Perl binding of Sendmail Milter protocol
Name: perl-Sendmail-PMilter
Version: 1.00
-Release: 6%{?dist}
+Release: 7%{?dist}
License: BSD
Group: Development/Libraries
URL: http://search.cpan.org/dist/Sendmail-PMilter/
@@ -9,9 +9,16 @@ Source0: http://search.cpan.org/CPAN/authors/id/A/AV/AVAR/Sendmail-PMilter-%{ver
Patch0: Sendmail-PMilter-Context.pm_pod.patch
Patch1: Sendmail-PMilter-0.97-setdbg-settimeout.patch
Patch2: Sendmail-PMilter-0.97-data-command.patch
+Patch3: Sendmail-PMilter-1.00-macro-head.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch: noarch
-BuildRequires: perl(ExtUtils::MakeMaker), perl(Test::More)
+BuildRequires: perl(base)
+BuildRequires: perl(Carp)
+BuildRequires: perl(constant)
+BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: perl(IO::Select)
+BuildRequires: perl(Socket)
+BuildRequires: perl(Test::More)
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Obsoletes: perl-Sendmail-Milter <= 0.18
@@ -41,6 +48,9 @@ called Mail::Milter.
# Handle SMFIC_DATA (CPAN RT#51058)
%patch2 -p1
+# Fix addheader, getsymval bugs (CPAN RT#84941, #957886)
+%patch3 -p1
+
# Fix interpreters in examples and turn off exec bits to avoid extra deps
sed -i -e 's@/usr/local/bin/perl@/usr/bin/perl@' examples/*.pl
chmod -x examples/*.pl
@@ -54,7 +64,6 @@ make %{?_smp_mflags}
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}
%check
@@ -72,6 +81,11 @@ rm -rf %{buildroot}
%{_mandir}/man3/Sendmail::PMilter::Context.3pm*
%changelog
+* Tue Apr 30 2013 Paul Howarth <paul at city-fan.org> - 1.00-7
+- Fix addheader, getsymval bugs (CPAN RT#84941, #957886)
+- Don't need to remove empty directories from the buildroot
+- Specify all dependencies
+
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.00-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
More information about the scm-commits
mailing list