From e2d05d6248fd27960842bbd737c5c12c758fa5d4 Mon Sep 17 00:00:00 2001 From: Petr Písař Date: Feb 02 2015 14:13:25 +0000 Subject: 0.054 bump --- diff --git a/.gitignore b/.gitignore index 7c7d3ff..a47cedc 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /HTTP-Tiny-0.050.tar.gz /HTTP-Tiny-0.051.tar.gz /HTTP-Tiny-0.053.tar.gz +/HTTP-Tiny-0.054.tar.gz diff --git a/HTTP-Tiny-0.051-Croak-on-failed-write-into-a-file.patch b/HTTP-Tiny-0.051-Croak-on-failed-write-into-a-file.patch deleted file mode 100644 index ede79d1..0000000 --- a/HTTP-Tiny-0.051-Croak-on-failed-write-into-a-file.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 727079f1ba023d5d923fa95802cd4806d2f98e39 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Wed, 27 Nov 2013 10:45:39 +0100 -Subject: [PATCH] Croak on failed write into a file -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The mirror() method saves a document into a file. Any error while -writing to the file, e.g. no disk space, was ignored. This patch fixes -it by croaking on such I/O error. - -Signed-off-by: Petr Písař ---- - lib/HTTP/Tiny.pm | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/lib/HTTP/Tiny.pm b/lib/HTTP/Tiny.pm -index d8bd719..2c02421 100644 ---- a/lib/HTTP/Tiny.pm -+++ b/lib/HTTP/Tiny.pm -@@ -281,7 +281,10 @@ sub mirror { - sysopen my $fh, $tempfile, Fcntl::O_CREAT()|Fcntl::O_EXCL()|Fcntl::O_WRONLY() - or Carp::croak(qq/Error: Could not create temporary file $tempfile for downloading: $!\n/); - binmode $fh; -- $args->{data_callback} = sub { print {$fh} $_[0] }; -+ $args->{data_callback} = sub { -+ print {$fh} $_[0] -+ or Carp::croak(qq/Error: Could not write into temporary file $tempfile: $!\n/); -+ }; - my $response = $self->request('GET', $url, $args); - close $fh - or Carp::croak(qq/Error: Caught error closing temporary file $tempfile: $!\n/); --- -1.9.3 - diff --git a/HTTP-Tiny-0.053-Croak-on-failed-write-into-a-file.patch b/HTTP-Tiny-0.053-Croak-on-failed-write-into-a-file.patch new file mode 100644 index 0000000..ede79d1 --- /dev/null +++ b/HTTP-Tiny-0.053-Croak-on-failed-write-into-a-file.patch @@ -0,0 +1,36 @@ +From 727079f1ba023d5d923fa95802cd4806d2f98e39 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Wed, 27 Nov 2013 10:45:39 +0100 +Subject: [PATCH] Croak on failed write into a file +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The mirror() method saves a document into a file. Any error while +writing to the file, e.g. no disk space, was ignored. This patch fixes +it by croaking on such I/O error. + +Signed-off-by: Petr Písař +--- + lib/HTTP/Tiny.pm | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/lib/HTTP/Tiny.pm b/lib/HTTP/Tiny.pm +index d8bd719..2c02421 100644 +--- a/lib/HTTP/Tiny.pm ++++ b/lib/HTTP/Tiny.pm +@@ -281,7 +281,10 @@ sub mirror { + sysopen my $fh, $tempfile, Fcntl::O_CREAT()|Fcntl::O_EXCL()|Fcntl::O_WRONLY() + or Carp::croak(qq/Error: Could not create temporary file $tempfile for downloading: $!\n/); + binmode $fh; +- $args->{data_callback} = sub { print {$fh} $_[0] }; ++ $args->{data_callback} = sub { ++ print {$fh} $_[0] ++ or Carp::croak(qq/Error: Could not write into temporary file $tempfile: $!\n/); ++ }; + my $response = $self->request('GET', $url, $args); + close $fh + or Carp::croak(qq/Error: Caught error closing temporary file $tempfile: $!\n/); +-- +1.9.3 + diff --git a/perl-HTTP-Tiny.spec b/perl-HTTP-Tiny.spec index db86790..ce1879c 100644 --- a/perl-HTTP-Tiny.spec +++ b/perl-HTTP-Tiny.spec @@ -1,5 +1,5 @@ Name: perl-HTTP-Tiny -Version: 0.053 +Version: 0.054 Release: 1%{?dist} Summary: Small, simple, correct HTTP/1.1 client License: GPL+ or Artistic @@ -8,7 +8,7 @@ URL: http://search.cpan.org/dist/HTTP-Tiny/ Source0: http://www.cpan.org/authors/id/D/DA/DAGOLDEN/HTTP-Tiny-%{version}.tar.gz # Check for write failure, bug #1031096, refused by upstream, # -Patch0: HTTP-Tiny-0.051-Croak-on-failed-write-into-a-file.patch +Patch0: HTTP-Tiny-0.053-Croak-on-failed-write-into-a-file.patch BuildArch: noarch BuildRequires: perl BuildRequires: perl(ExtUtils::MakeMaker) >= 6.17 @@ -72,11 +72,15 @@ find '%{buildroot}' -type f -name .packlist -exec rm -f {} \; make test %files -%doc Changes CONTRIBUTING.mkdn eg LICENSE README +%license LICENSE +%doc Changes CONTRIBUTING.mkdn eg README %{perl_vendorlib}/* %{_mandir}/man3/* %changelog +* Mon Feb 02 2015 Petr Pisar - 0.054-1 +- 0.054 bump + * Mon Dec 15 2014 Jitka Plesnikova - 0.053-1 - 0.053 bump diff --git a/sources b/sources index c6219dc..563bdba 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -613b11b9d1cd0fe031f0e846d39b6011 HTTP-Tiny-0.053.tar.gz +dd60201b1711519075618475c3f5fbe7 HTTP-Tiny-0.054.tar.gz