diff --git a/File-Pid-1.01-RT-18960-Fixed-using-of-uninitialized-value.patch b/File-Pid-1.01-RT-18960-Fixed-using-of-uninitialized-value.patch new file mode 100644 index 0000000..cc3d869 --- /dev/null +++ b/File-Pid-1.01-RT-18960-Fixed-using-of-uninitialized-value.patch @@ -0,0 +1,11 @@ +--- File-Pid-1.01/lib/File/Pid.pm.orig 2005-01-11 14:09:54.000000000 +0100 ++++ File-Pid-1.01/lib/File/Pid.pm 2011-02-04 18:28:50.000000000 +0100 +@@ -119,7 +119,7 @@ + + sub running { + my $self = shift; +- my $pid = $self->_get_pid_from_file; ++ my $pid = $self->_get_pid_from_file or return undef; + + return kill(0, $pid) + ? $pid diff --git a/File-Pid-1.01.tar.gz b/File-Pid-1.01.tar.gz new file mode 100644 index 0000000..76b9641 Binary files /dev/null and b/File-Pid-1.01.tar.gz differ diff --git a/perl-File-Pid.spec b/perl-File-Pid.spec new file mode 100644 index 0000000..0be295d --- /dev/null +++ b/perl-File-Pid.spec @@ -0,0 +1,43 @@ +Name: perl-File-Pid +Version: 1.01 +Release: 1 +Summary: Pid File Manipulation +License: GPL+ or Artistic +URL: https://metacpan.org/release/File-Pid +Source0: https://cpan.metacpan.org/authors/id/C/CW/CWEST/File-Pid-%{version}.tar.gz +Patch0: File-Pid-1.01-RT-18960-Fixed-using-of-uninitialized-value.patch +BuildArch: noarch +BuildRequires: make perl-interpreter perl-generators perl(ExtUtils::MakeMaker) >= 6.76 +BuildRequires: perl(base) perl(Class::Accessor::Fast) >= 0.19 perl(File::Basename) +BuildRequires: perl(File::Spec::Functions) perl(strict) perl(vars) perl(Test::More) +Requires: perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version)) +Requires: perl(Class::Accessor::Fast) >= 0.19 +%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Class::Accessor::Fast\\)$ +%description +This software manages a pid file for you. It will create a pid file, +query the process within to discover if it's still running, and remove +the pid file. + +%prep +%setup -q -n File-Pid-%{version} +%patch0 -p1 + +%build +perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 +make %{?_smp_mflags} + +%install +make pure_install DESTDIR=%{buildroot} +%{_fixperms} %{buildroot}/* + +%check +make test + +%files +%doc Changes README +%{perl_vendorlib}/* +%{_mandir}/man3/* + +%changelog +* Tue Sep 7 2021 zhengyaohui - 1.01-1 +- package init