8
0

Accepting request 443742 from devel:languages:perl:autoupdate

- updated to 1.22
   see /usr/share/doc/packages/perl-Log-Dispatch-FileRotate/Changes

- updated to 1.20
   see /usr/share/doc/packages/perl-Log-Dispatch-FileRotate/Changes
  
  1.20 Sat Oct 01 2016
  	- Fix Date::Manip warnings about deprecated TZ config variable. If
  	  Date::Manip 6.x or later is installed we now use SetDate instead.

OBS-URL: https://build.opensuse.org/request/show/443742
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Log-Dispatch-FileRotate?expand=0&rev=18
This commit is contained in:
Stephan Kulow
2016-12-05 06:21:40 +00:00
committed by Git OBS Bridge
parent a2b6136831
commit e5089b6eb0
5 changed files with 107 additions and 42 deletions

View File

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

View File

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

28
cpanspec.yml Normal file
View File

@@ -0,0 +1,28 @@
---
#description_paragraphs: 3
#description: |-
# override description from CPAN
#summary: override summary from CPAN
#no_testing: broken upstream
#sources:
# - source1
# - source2
#patches:
# foo.patch: -p1
# bar.patch:
#preamble: |-
# BuildRequires: gcc-c++
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
#post_build: |-
# rm unused.files
#post_install: |-
# sed on %{name}.files
#license: SUSE-NonFree
#skip_noarch: 1
#custom_build: |-
#./Build build flags=%{?_smp_mflags} --myflag
#custom_test: |-
#startserver && make test
#ignore_requires: Bizarre::Module

View File

@@ -1,3 +1,20 @@
-------------------------------------------------------------------
Fri Oct 7 05:57:27 UTC 2016 - coolo@suse.com
- updated to 1.22
see /usr/share/doc/packages/perl-Log-Dispatch-FileRotate/Changes
-------------------------------------------------------------------
Sun Oct 2 05:37:18 UTC 2016 - coolo@suse.com
- updated to 1.20
see /usr/share/doc/packages/perl-Log-Dispatch-FileRotate/Changes
1.20 Sat Oct 01 2016
- Fix Date::Manip warnings about deprecated TZ config variable. If
Date::Manip 6.x or later is installed we now use SetDate instead.
-------------------------------------------------------------------
Fri Nov 18 09:11:32 UTC 2011 - coolo@suse.com

View File

@@ -1,7 +1,7 @@
#
# spec file for package perl-Log-Dispatch-FileRotate
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,68 +15,91 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: perl-Log-Dispatch-FileRotate
Version: 1.22
Release: 0
%define cpan_name Log-Dispatch-FileRotate
Summary: Log to files that archive/rotate themselves
Version: 1.19
Release: 12
License: Artistic
Summary: Log to Files that Archive/Rotate Themselves
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Log-Dispatch-FileRotate
Source0: %{cpan_name}-%{version}.tar.gz
Url: http://search.cpan.org/dist/Log-Dispatch-FileRotate/
Source0: http://www.cpan.org/authors/id/M/MS/MSCHOUT/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(File::Spec)
BuildRequires: perl(Fcntl)
#BuildRequires: perl(Module::Build)
# other not perl || perl-base
BuildRequires: perl(Date::Manip)
BuildRequires: perl(Log::Log4perl) >= 1.0
BuildRequires: perl(Log::Dispatch::File)
BuildRequires: perl(Log::Dispatch::Output)
BuildRequires: perl(Params::Validate)
Requires: perl(File::Spec)
# other not perl || perl-base
BuildRequires: perl(Path::Tiny) >= 0.018
BuildRequires: perl(Test::More) >= 0.88
BuildRequires: perl(version)
Requires: perl(Date::Manip)
Requires: perl(Log::Dispatch)
Requires: perl(Log::Log4perl) >= 1.0
Requires: perl(Log::Dispatch::File)
Requires: perl(Log::Dispatch::Output)
Requires: perl(Params::Validate)
Provides: %{cpan_name}
Requires: perl(version)
%{perl_requires}
%description
This module provides a simple object for logging to files under the
Log::Dispatch::* system, and automatically rotating them according to
different constraints. This is basically a Log::Dispatch::File wrapper
with additions. To that end the arguments
different constraints. This is basically a Log::Dispatch::File wrapper with
additions. To that end the arguments
name, min_level, filename and mode
name, min_level, filename and mode
behave the same as Log::Dispatch::File. So see its man page (perldoc
Log::Dispatch::File)
Authors:
--------
Mark Pfeiffer, <markpf@mlp-consulting.com.au>
inspired by Dave Rolsky's, <autarchi@urth.org>, code :-)
The arguments size and max specify the maximum size and maximum number of
log files created. The size defaults to 10M and the max number of files
defaults to 1. If DatePattern is not defined then we default to working in
size mode. That is, use size values for deciding when to rotate.
Kevin Goess <cpan@goess.org> suggested multiple writers should be supported.
He also conned me into doing the time based stuff. Thanks Kevin! :-)
Once DatePattern is defined FileRotate will move into time mode. Once this
happens file rotation ignores size constraints and uses the defined date
pattern constraints.
Thanks also to Dan Waldheim for helping with some of the locking
issues in a forked environment.
If you setup a config file using Log::Log4perl::init_and_watch() or the
like, you can switch between modes just by commenting out the DatePattern
line.
And thanks to Stephen Gordon for his more portable code on lockfile naming.
When using DatePattern make sure TZ is defined correctly and that the TZ
you use is understood by Date::Manip. We use Date::Manip to generate our
recurrences. Bad TZ equals bad recurrences equals surprises! Read the
Date::Manip man page for more details on TZ.
DatePattern will default to a daily rotate if your entered pattern is
incorrect. You will also get a warning message.
If you have multiple writers that were started at different times you will
find each writer will try to rotate the log file at a recurrence calculated
from its start time. To sync all the writers just use a config file and
update it after starting your last writer. This will cause
Log::Dispatch::FileRotate->new() to be called by each of the writers close
to the same time, and if your recurrences aren't too close together all
should sync up just nicely.
I initially aasumed a long runinng process but it seems people are using
this module as part of short running CGI programs. So, now we look at the
last modified time stamp of the log file and compare it to a previous
occurance of a DatePattern, on startup only. If the file stat shows the
mtime to be earlier than the previous recurrance then I rotate the log
file.
We handle multiple writers using flock().
%prep
%setup -q -n %{cpan_name}-%{version}
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
%build
perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS"
%{__make}
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%check
%{__make} test
@@ -86,11 +109,8 @@ perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS"
%perl_process_packlist
%perl_gen_filelist
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%files -f %{name}.files
%defattr(-,root,root)
%doc Changes README
%defattr(-,root,root,755)
%doc Changes LICENSE README
%changelog