Accepting request 43331 from devel:languages:perl

Copy from devel:languages:perl/perl-libwww-perl based on submit request 43331 from user computersalat

OBS-URL: https://build.opensuse.org/request/show/43331
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-libwww-perl?expand=0&rev=21
This commit is contained in:
OBS User autobuild 2010-07-19 19:06:38 +00:00 committed by Git OBS Bridge
commit 67a892bb9d
5 changed files with 98 additions and 115 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7daaa8e92f574ffa9797502bd7d77110547e38707e46a0157b1c6be877a851f3
size 212349

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a2a672d33a3407751b2249c353ca2dcb3b9d4280b4d71c879e75d21ffd2836f2
size 214462

View File

@ -1,73 +0,0 @@
Index: libwww-perl-5.834/bin/lwp-download
===================================================================
--- libwww-perl-5.834.orig/bin/lwp-download
+++ libwww-perl-5.834/bin/lwp-download
@@ -6,7 +6,7 @@ lwp-download - Fetch large files from th
=head1 SYNOPSIS
-B<lwp-download> [B<-a>] <I<url>> [<I<local path>>]
+B<lwp-download> [B<-a>] [B<-s>] <I<url>> [<I<local path>>]
=head1 DESCRIPTION
@@ -16,15 +16,19 @@ file.
If I<local path> is not specified, then the current directory is
assumed.
-If I<local path> is a directory, then the basename of the file to save
-is picked up from the Content-Disposition header or the URL of the
-response. If the file already exists, then B<lwp-download> will
-prompt before it overwrites and will fail if its standard input is not
-a terminal. This form of invocation will also fail is no acceptable
-filename can be derived from the sources mentioned above.
+If I<local path> is a directory, then the last segment of the path of the
+I<url> is appended to form a local filename. If the I<url> path ends with
+slash the name "index" is used. With the B<-s> option pick up the last segment
+of the filename from server provided sources like the Content-Disposition
+header or any redirect URLs. A file extension to match the server reported
+Content-Type might also be appended. If a file with the produced filename
+already exists, then B<lwp-download> will prompt before it overwrites and will
+fail if its standard input is not a terminal. This form of invocation will
+also fail is no acceptable filename can be derived from the sources mentioned
+above.
If I<local path> is not a directory, then it is simply used as the
-path to save into.
+path to save into. If the file already exists it's overwritten.
The I<lwp-download> program is implemented using the I<libwww-perl>
library. It is better suited to down load big files than the
@@ -66,7 +70,7 @@ $progname =~ s/\.\w*$//; # strip extensi
#parse option
use Getopt::Std;
my %opt;
-unless (getopts('a', \%opt)) {
+unless (getopts('as', \%opt)) {
usage();
}
@@ -106,20 +110,17 @@ my $res = $ua->request(HTTP::Request->ne
unless (defined $argfile) {
# find a suitable name to use
- $file = $res->filename;
+ $file = $opt{s} && $res->filename;
# if this fails we try to make something from the URL
unless ($file) {
- my $req = $res->request; # not always there
- my $rurl = $req ? $req->uri : $url;
-
- $file = ($rurl->path_segments)[-1];
+ $file = ($url->path_segments)[-1];
if (!defined($file) || !length($file)) {
$file = "index";
my $suffix = media_suffix($res->content_type);
$file .= ".$suffix" if $suffix;
}
- elsif ($rurl->scheme eq 'ftp' ||
+ elsif ($url->scheme eq 'ftp' ||
$file =~ /\.t[bg]z$/ ||
$file =~ /\.tar(\.(Z|gz|bz2?))?$/
) {

View File

@ -1,3 +1,50 @@
-------------------------------------------------------------------
Thu Jul 8 17:58:17 UTC 2010 - chris@computersalat.de
- fix deps
o added missing IO::{Unc,C}ompress::* stuff
-------------------------------------------------------------------
Wed Jul 7 12:47:35 UTC 2010 - chris@computersalat.de
- update to 5.836
Gisle Aas (1):
* Fix problem where $resp->base would downcase its return value
- 2010-05-05 Release 5.835
* simple string can be simplified
* Make $mess->decoded_content remove XML encoding declarations [RT#52572]
* Don't allow saving to filenames starting with '.' suggested by server
* Avoid race between testing for existence of output file and opening the file
* Minor doc fixup -- wrongly ucfirsted word
* Use decoded_content in HTTP:Response synopsis [RT#54139]
* sun.com is no more. rip!
* Trivial layout tweak to reduce variable scope.
* Add 'make test_hudson' target
* Implement alt_charset parameter for decoded_content()
* Test decoding with different charset parameters
* lwp-download now needs the -s option to honor the Content-Disposition header
* Make LWP::MediaTypes::media_suffix case insensitive.
* Skip XML decoding tests if XML::Simple is not available.
* Documentation fixes.
* Fix m_media_type => "xhtml" matching.
* Make parse_head() apply to data: requests.
* Documentation spelling fixes.
* Documentation grammar fixes.
* Use $uri->secure in m_secure if available.
* Fix handling of multiple (same) base headers, and parameters in them.
* Strip out empty lines separated by CRLF
* Best Practice: avoid indirect object notation
* Speed up as_string by 4% by having _sorted_field_names return a reference
* Speed up scan() a bit. as_string() from this branch is now 6% faster
* Port over as_string() optimizations from HTTP::Headers::Fast
* Link to referenced documentation.
* Update repository location.
* Remove needless (and actually harmful) local $_
* "Perl & LWP" is available online
- recreated by cpanspec 1.78
- noarch
- removed obsolete patch (Content-Disposition)
-------------------------------------------------------------------
Thu May 20 16:02:44 CEST 2010 - anicka@suse.cz

View File

@ -1,5 +1,5 @@
#
# spec file for package perl-libwww-perl (Version 5.834)
# spec file for package perl-libwww-perl (Version 5.836)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -19,59 +19,65 @@
Name: perl-libwww-perl
%define cpan_name %( echo %{name} | %{__sed} -e 's,perl-,,' )
%define cpan_name libwww-perl
Summary: The World-Wide Web library for Perl
Version: 5.834
Release: 2
AutoReqProv: on
License: Artistic License ..
Version: 5.836
Release: 1
License: GPL+, Artistic License
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/LWP/
Url: http://search.cpan.org/dist/libwww-perl/
#Source: http://www.cpan.org/modules/by-module/libwww/libwww-perl-%{version}.tar.gz
Source: %{cpan_name}-%{version}.tar.bz2
Patch: %{name}-%{version}-Content-Disposition.diff
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
%if 0%{?suse_version} < 1120
BuildRequires: perl-macros
BuildRequires: perl(Net::FTP) >= 2.58
%endif
BuildRequires: perl(Crypt::SSLeay)
BuildRequires: perl(Compress::Raw::Zlib)
BuildRequires: perl(Digest::MD5)
# other not perl || perl-base
BuildRequires: perl(URI) >= 1.10
BuildRequires: perl(MIME::Base64) >= 2.1
BuildRequires: perl(HTML::Tagset)
BuildRequires: perl(HTML::Parser) >= 3.33
BuildRequires: perl(Compress::Zlib) >= 1.10
BuildRequires: perl(HTML::Tagset)
BuildRequires: perl(IO::Compress::Gzip)
BuildRequires: perl(IO::Compress::Deflate)
BuildRequires: perl(IO::Uncompress::Gunzip)
BuildRequires: perl(IO::Uncompress::Inflate)
BuildRequires: perl(IO::Uncompress::RawInflate)
BuildRequires: perl(URI) >= 1.10
Requires: perl = %{perl_version}
Requires: perl(Net::FTP) >= 2.58
Requires: perl(Compress::Raw::Zlib)
Requires: perl(Crypt::SSLeay)
Requires: perl(Digest::MD5)
# other not perl || perl-base
Requires: perl(URI) >= 1.10
Requires: perl(HTML::Tagset)
Requires: perl(HTML::Parser) >= 3.33
Requires: perl(Compress::Zlib) >= 1.10
#Requires: perl(Compress::Bzip2)
Recommends: perl(Crypt::SSLeay)
Provides: libwww-perl
Provides: perl_lw3
Obsoletes: perl_lw3
Requires: perl(HTML::Tagset)
Requires: perl(IO::Compress::Gzip)
Requires: perl(IO::Compress::Deflate)
Requires: perl(IO::Uncompress::Gunzip)
Requires: perl(IO::Uncompress::Inflate)
Requires: perl(IO::Uncompress::RawInflate)
Requires: perl(URI) >= 1.10
%description
The libwww-perl collection is a set of Perl modules which provides a
simple and consistent application programming interface to the
World-Wide Web. The main focus of the library is to provide classes
and functions that allow you to write WWW clients. The library also
contain modules that are of more general use and even classes that
help you implement simple HTTP servers.
simple and consistent application programming interface to the World-Wide
Web. The main focus of the library is to provide classes and functions
that allow you to write WWW clients. The library also contain modules that
are of more general use and even classes that help you implement simple
HTTP servers.
Authors:
--------
Gisle Aas <gisle@aas.no>
Martijn Koster
Authors:
Gisle Aas <gisle@aas.no>
Martijn Koster
%prep
%setup -q -n %{cpan_name}-%{version}
%patch -p1
%build
CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL
%{__make}
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%check
#disable test that require network connection
@ -82,14 +88,17 @@ mv t/live/jigsaw-md5-get.t t/live/jigsaw-md5-get.tt
%install
%perl_make_install
%perl_process_packlist
# remove .packlist file
%{__rm} -rf $RPM_BUILD_ROOT%perl_vendorarch
# remove perllocal.pod file
%{__rm} -rf $RPM_BUILD_ROOT%perl_archlib
%perl_gen_filelist
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%files -f %{name}.files
%defattr(-,root,root)
%doc Changes README README.SSL
%files -f %{name}.files
%defattr(-,root,root,-)
%doc AUTHORS Changes README README.SSL talk-to-ourself
%changelog