From c163e7ca491d017a6a36d4755028160e6fd70b1c Mon Sep 17 00:00:00 2001 From: Xuchun Shang Date: Tue, 11 Apr 2023 18:30:40 +0800 Subject: [PATCH] Update some description Signed-off-by: Xuchun Shang --- perl-File-Fetch.spec | 133 +++++++++++++++++++++++++++++-------------- 1 file changed, 91 insertions(+), 42 deletions(-) diff --git a/perl-File-Fetch.spec b/perl-File-Fetch.spec index f555eba..284384e 100644 --- a/perl-File-Fetch.spec +++ b/perl-File-Fetch.spec @@ -1,4 +1,5 @@ -%define anolis_release 3 +%define anolis_release 4 +%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\((File::Spec|IPC::Cmd|Module::Load::Conditional|Params::Check)\\)$ Name: perl-File-Fetch Version: 1.04 Release: %{anolis_release}%{?dist} @@ -6,74 +7,121 @@ Summary: Generic file fetching mechanism License: GPL+ or Artistic URL: https://metacpan.org/release/File-Fetch Source0: https://cpan.metacpan.org/authors/id/B/BI/BINGOS/File-Fetch-%{version}.tar.gz -BuildArch: noarch BuildRequires: coreutils -BuildRequires: make +BuildRequires: perl(strict) BuildRequires: perl-generators BuildRequires: perl-interpreter +BuildRequires: gcc gcc-c++ automake autoconf BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 -BuildRequires: perl(strict) # Run-time: +BuildRequires: perl(Cwd) +BuildRequires: perl(vars) BuildRequires: perl(Carp) BuildRequires: perl(constant) -BuildRequires: perl(Cwd) -BuildRequires: perl(File::Basename) BuildRequires: perl(File::Copy) BuildRequires: perl(File::Path) -BuildRequires: perl(File::Spec) >= 0.82 -BuildRequires: perl(File::Spec::Unix) BuildRequires: perl(File::Temp) BuildRequires: perl(FileHandle) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Spec::Unix) BuildRequires: perl(IPC::Cmd) >= 0.42 +BuildRequires: perl(File::Spec) >= 0.82 +BuildRequires: perl(Params::Check) >= 0.07 BuildRequires: perl(Locale::Maketext::Simple) BuildRequires: perl(Module::Load::Conditional) >= 0.66 -BuildRequires: perl(Params::Check) >= 0.07 -BuildRequires: perl(vars) # Keep all downaloaders optional (LWP, curl, rsync etc.). # Tests: -BuildRequires: perl(Data::Dumper) -BuildRequires: perl(IO::Socket::INET) BuildRequires: perl(lib) -BuildRequires: perl(Test::More) BuildRequires: perl(warnings) -Requires: perl(File::Spec) >= 0.82 +BuildRequires: perl(Test::More) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(IO::Socket::INET) Requires: perl(IPC::Cmd) >= 0.42 +Requires: perl(File::Spec) >= 0.82 +Requires: perl(Params::Check) >= 0.07 Requires: perl(Locale::Maketext::Simple) Requires: perl(Module::Load::Conditional) >= 0.66 -Requires: perl(Params::Check) >= 0.07 +BuildArch: noarch # Keep all downaloaders optional (LWP, curl, rsync etc.). +Suggests: rsync Suggests: git-core Suggests: perl(LWP) Suggests: perl(LWP::Protocol::https) -Suggests: rsync -# Remove under-specified dependencies -%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\((File::Spec|IPC::Cmd|Module::Load::Conditional|Params::Check)\\)$ %description -File::Fetch allows you to fetch any file pointed to by a "ftp", "http", -"file", "git", or "rsync" URI by a number of different means. - +Perl-File-Fetch is a Perl module that provides a simple interface for +downloading files from the internet. It makes it easy to download files +over various protocols, handle authentication and proxies, follow +redirects, retry failed downloads, cache downloaded files, and handle +errors. + +Some of the key features of Perl-File-Fetch are: + +Protocol support: Perl-File-Fetch supports several protocols, including +HTTP, HTTPS, FTP, FTPS, and file://. This makes it easy to download +files from a variety of sources. + +Authentication support: Some protocols require authentication, and +Perl-File-Fetch supports several authentication methods, including HTTP +Basic Authentication and Digest Authentication. + +Proxy support: If you're behind a proxy server, Perl-File-Fetch can handle +that too. It supports both HTTP and FTP proxies. + +Redirect handling: If the file you're trying to download has been moved +to a different location, Perl-File-Fetch can follow the redirect and +download it from the new location. + +Retry handling: If there's a network error or a server error while downloading +a file, Perl-File-Fetch can automatically retry the download a certain number +of times before giving up. + +Timeout handling: You can set a timeout for the download, and if the download +takes longer than that, Perl-File-Fetch will give up and report an error. + +Caching: If you're downloading the same file multiple times, Perl-File-Fetch +can cache it locally so that subsequent downloads are faster and don't use +as much bandwidth. + +SSL support: If you're downloading a file over HTTPS, Perl-File-Fetch can +handle SSL encryption. + +Error handling: If there's an error while downloading a file, Perl-File-Fetch +will report it and give you a detailed error message. + +To use Perl-File-Fetch, you simply need to create a new instance of the +File::Fetch class, passing in the URL of the file you want to download. +Then you can call the fetch method, which will download the file and +return the local filename where it was saved. You can also set various +options, such as the authentication method, proxy server, timeout, and +cache directory, using the options method. + +Overall, Perl-File-Fetch is a useful and versatile module that simplifies +the process of downloading files from the internet, and provides many +features to handle various scenarios and errors that may arise during the +process. + + %package tests -Summary: Tests for %{name} -Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +Summary: Tests for perl-File-Fetch +Requires: perl-File-Fetch = %{?epoch:%{epoch}:}%{version}-%{release} Requires: perl-Test-Harness Requires: perl(IO::Socket::INET) %description tests -Tests from %{name}. Execute them -with "%{_libexecdir}/%{name}/test". - +Tests from perl-File-Fetch. Execute them with "%{_libexecdir}/perl-File-Fetch/test". + %package doc -Summary: Documentation files for %{name} -Requires: %{name} = %{EVR} +Summary: Documentation files for perl-File-Fetch +Requires: perl-File-Fetch = %{EVR} BuildArch: noarch %description doc -The %{name}-doc package contains documentation files for %{name}. +The perl-File-Fetch-doc package contains documentation files for perl-File-Fetch. %prep -%setup -q -n File-Fetch-%{version} +%autosetup -n File-Fetch-%{version} # Help generators to recognize Perl scripts for F in t/*.t; do @@ -89,38 +137,39 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 %{make_install} %{_fixperms} %{buildroot}/* -# Install tests -mkdir -p %{buildroot}/%{_libexecdir}/%{name} -cp -a t %{buildroot}/%{_libexecdir}/%{name} -cat > %{buildroot}/%{_libexecdir}/%{name}/test << 'EOF' +mkdir -p %{buildroot}/%{_libexecdir}/perl-File-Fetch +cp -a t %{buildroot}/%{_libexecdir}/perl-File-Fetch +cat > %{buildroot}/%{_libexecdir}/perl-File-Fetch/test << 'EOF' #!/bin/bash set -e -# Some tests write into temporary files/directories. The easiest solution -# is to copy the tests into a writable directory and execute them from there. DIR=$(mktemp -d) pushd "$DIR" -cp -a %{_libexecdir}/%{name}/* ./ +cp -a %{_libexecdir}/perl-File-Fetch/* ./ prove -I . -j "$(getconf _NPROCESSORS_ONLN)" popd rm -rf "$DIR" EOF -chmod +x %{buildroot}/%{_libexecdir}/%{name}/test +chmod +x %{buildroot}/%{_libexecdir}/perl-File-Fetch/test %check export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}') make test %files -%{perl_vendorlib}/* %{_mandir}/man3/* - +%{perl_vendorlib}/* + %files tests -%{_libexecdir}/%{name} +%{_libexecdir}/perl-File-Fetch %files doc -%doc CHANGES README +%doc CHANGES +%doc README %changelog +* Tue Apr 11 2023 Xuchun Shang - 1.04-4 +- Update some description + * Tue Feb 07 2023 mgb01105731 - 1.04-3 - remove versioned MODULE_COMPAT_ requires -- Gitee