Hello community,
here is the log from the commit of package perl-Config-Crontab for openSUSE:Factory
checked in at Thu Jul 9 10:46:19 CEST 2009.
--------
--- perl-Config-Crontab/perl-Config-Crontab.changes 2007-08-05 17:04:22.000000000 +0200
+++ perl-Config-Crontab/perl-Config-Crontab.changes 2009-07-07 09:19:00.000000000 +0200
@@ -1,0 +2,7 @@
+Tue Jul 7 09:16:58 CEST 2009 - lrupp@suse.de
+
+- update to 1.30:
+ + modernize (no more 'use vars')
+ + support for SuSE-specific 'no syslog' extension
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
Config-Crontab-1.21.tar.bz2
New:
----
Config-Crontab-1.30.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Config-Crontab.spec ++++++
--- /var/tmp/diff_new_pack.f6zzjL/_old 2009-07-09 10:46:00.000000000 +0200
+++ /var/tmp/diff_new_pack.f6zzjL/_new 2009-07-09 10:46:00.000000000 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package perl-Config-Crontab (Version 1.21)
+# spec file for package perl-Config-Crontab (Version 1.30)
#
-# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -21,14 +21,13 @@
Name: perl-Config-Crontab
%define module_name Config-Crontab
Summary: Read/Write Vixie compatible crontab files
-Version: 1.21
-Release: 73
+Version: 1.30
+Release: 1
Requires: perl = %{perl_version}
AutoReqProv: on
-License: Artistic License; GPL v2 or later
+License: Artistic License .. ; GPL v2 or later
Group: Development/Libraries/Perl
-Url: http://search.cpan.org/~scottw/
-# http://search.cpan.org/CPAN/authors/id/S/SC/SCOTTW/Config-Crontab-1.20.tar.g...
+Url: http://search.cpan.org/perldoc?Config::Crontab
Source0: %{module_name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -55,11 +54,10 @@
%prep
%setup -q -n %{module_name}-%{version}
-#%patch
%build
CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL
-make
+make %{?jobs:-j%jobs}
%check
make test
@@ -73,7 +71,7 @@
%files
%defattr(-, root, root)
-%doc README
+%doc Changes README
%doc %{_mandir}/man?/*
%{perl_vendorarch}/auto/Config
%dir %{perl_vendorlib}/Config
@@ -81,18 +79,3 @@
/var/adm/perl-modules/%{name}
%changelog
-* Sun Aug 05 2007 mrueckert@suse.de
-- update to version 1.21:
- minor bugfix mainly for weird behavior of "crontab -l" on debian
-- minor spec file cleanup
-* Fri Oct 20 2006 mrueckert@suse.de
-- update to version 1.20:
- added remove_tab to remove crontab files.
-* Wed Jan 25 2006 mls@suse.de
-- converted neededforbuild to BuildRequires
-* Mon Jan 16 2006 mrueckert@suse.de
-- update to version 1.11
-* Fri Jul 29 2005 cthiel@suse.de
-- update to version 1.10
-* Thu Jan 29 2004 nashif@suse.de
-- Initial version for SuSE (1.03)
++++++ Config-Crontab-1.21.tar.bz2 -> Config-Crontab-1.30.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Config-Crontab-1.21/Changes new/Config-Crontab-1.30/Changes
--- old/Config-Crontab-1.21/Changes 2007-07-18 21:56:43.000000000 +0200
+++ new/Config-Crontab-1.30/Changes 2008-10-27 17:33:10.000000000 +0100
@@ -1,5 +1,13 @@
Revision history for Perl extension Config::Crontab.
+Release 1.30
+----------------------------
+revision 1.4
+date: 2008/10/27 16:31:46; author: scott; state: Exp; lines: +58 -19
+- version 1.30
+- modernize (no more 'use vars')
+- support for SuSE-specific 'no syslog' extension
+
Release 1.21
----------------------------
revision 1.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Config-Crontab-1.21/Crontab.pm new/Config-Crontab-1.30/Crontab.pm
--- old/Config-Crontab-1.21/Crontab.pm 2007-07-18 21:47:44.000000000 +0200
+++ new/Config-Crontab-1.30/Crontab.pm 2008-10-27 17:28:51.000000000 +0100
@@ -26,16 +26,17 @@
## (Config::Crontab) is for working with crontab files as a whole.
package Config::Crontab;
use strict;
+use warnings;
use Carp;
+use 5.006_001;
-use vars qw( $VERSION @ISA );
-@ISA = qw(Config::Crontab::Base Config::Crontab::Container);
+our @ISA = qw(Config::Crontab::Base Config::Crontab::Container);
## these two are for the 'write' method
use Fcntl;
use File::Temp qw(:POSIX);
-$VERSION = '1.21';
+our $VERSION = '1.30';
sub init {
my $self = shift;
@@ -1296,10 +1297,10 @@
package Config::Crontab::Block;
use strict;
+use warnings;
use Carp;
-use vars qw(@ISA);
-@ISA = qw(Config::Crontab::Base Config::Crontab::Container);
+our @ISA = qw(Config::Crontab::Base Config::Crontab::Container);
sub init {
my $self = shift;
@@ -1482,6 +1483,17 @@
return $active;
}
+sub nolog {
+ my $self = shift;
+ return 1 unless @_;
+
+ my $nolog = shift;
+ local $_;
+ $_->nolog($nolog) for $self->select(-type => 'event');
+
+ return $nolog;
+}
+
############################################################
############################################################
@@ -1803,6 +1815,21 @@
$block->active(0); ## deactivate this block
+=head2 nolog(boolean)
+
+This is (currently) a SuSE-specific extension. From B:
+
+ If the uid of the owner is 0 (root), he can put a "-" as first
+ character of a crontab entry. This will prevent cron from writing a
+ syslog message about this command getting executed.
+
+B<nolog> enables adds or removes this hyphen for a given cron event
+line (regardless of whether the user is I<root> or not).
+
+Example:
+
+ $block->nolog(1); ## quiet all entries in this block
+
=head2 flag(string)
Flags a block or an object inside a block with the specified data. The
@@ -1844,10 +1871,10 @@
package Config::Crontab::Event;
use strict;
+use warnings;
use Carp;
-use vars qw(@ISA);
-@ISA = qw(Config::Crontab::Base);
+our @ISA = qw(Config::Crontab::Base);
use constant RE_DT => '(?:\d+|\*)(?:[-,\/]\d+)*';
use constant RE_DM => '\w{3}(?:,\w{3})*';
@@ -1855,6 +1882,7 @@
use constant RE_DTMOY => '(?:\*|' . RE_DT . '|' . RE_DM . ')';
use constant RE_DTDOW => RE_DTMOY;
use constant RE_ACTIVE => '^\s*(\#*)\s*';
+use constant RE_NOLOG => '(-?)'; ## SuSE-specific extension
use constant RE_SPECIAL => '(\@(?:reboot|midnight|(?:year|annual|month|week|dai|hour)ly))';
use constant RE_DATETIME => '(' . RE_DTELEM . ')' .
'\s+(' . RE_DTELEM . ')' .
@@ -1863,10 +1891,10 @@
'\s+(' . RE_DTDOW . ')';
use constant RE_USER => '\s+(\S+)';
use constant RE_COMMAND => '\s+(.+?)\s*$';
-use constant SPECIAL => RE_ACTIVE . RE_SPECIAL . RE_COMMAND;
-use constant DATETIME => RE_ACTIVE . RE_DATETIME . RE_COMMAND;
-use constant SYS_SPECIAL => RE_ACTIVE . RE_SPECIAL . RE_USER . RE_COMMAND;
-use constant SYS_DATETIME => RE_ACTIVE . RE_DATETIME . RE_USER . RE_COMMAND;
+use constant SPECIAL => RE_ACTIVE . RE_NOLOG . RE_SPECIAL . RE_COMMAND;
+use constant DATETIME => RE_ACTIVE . RE_NOLOG . RE_DATETIME . RE_COMMAND;
+use constant SYS_SPECIAL => RE_ACTIVE . RE_NOLOG . RE_SPECIAL . RE_USER . RE_COMMAND;
+use constant SYS_DATETIME => RE_ACTIVE . RE_NOLOG . RE_DATETIME . RE_USER . RE_COMMAND;
sub init {
my $self = shift;
@@ -1875,6 +1903,7 @@
## set defaults
$self->active(1);
+ $self->nolog(0);
$self->system(0);
$self->special(undef);
@@ -1901,6 +1930,7 @@
$self->datetime($args{'-datetime'}) if defined $args{'-datetime'};
$self->command($args{'-command'}) if $args{'-command'};
$self->active($args{'-active'}) if defined $args{'-active'};
+ $self->nolog($args{'-nolog'}) if defined $args{'-nolog'};
}
$rv = $self->data($args{'-data'}) if defined $args{'-data'};
@@ -1923,7 +1953,9 @@
if( @matches = $data =~ SYS_SPECIAL or
@matches = $data =~ SYS_DATETIME ) {
my $active = shift @matches;
+ my $nolog = shift @matches;
$self->active( ($active ? 0 : 1) );
+ $self->nolog( ($nolog ? 1 : 0) );
$self->command( pop @matches );
$self->user( pop @matches );
$self->datetime( \@matches );
@@ -1941,7 +1973,9 @@
if( @matches = $data =~ SPECIAL or
@matches = $data =~ DATETIME ) {
my $active = shift @matches;
+ my $nolog = shift @matches;
$self->active( ($active ? 0 : 1) );
+ $self->nolog( ($nolog ? 1 : 0) );
$self->command( pop @matches );
$self->user('');
$self->datetime( \@matches );
@@ -2058,9 +2092,12 @@
my $self = shift;
my $rv = '';
- $rv = ( $self->active
- ? ''
- : '#' );
+ $rv .= ( $self->active
+ ? ''
+ : '#' );
+ $rv .= ( $self->nolog
+ ? '-'
+ : '' );
$rv .= $self->data;
return $rv;
}
@@ -2538,9 +2575,9 @@
## env objects are a few lines of comments followed by a variable assignment
package Config::Crontab::Env;
use strict;
+use warnings;
-use vars qw (@ISA);
-@ISA = qw(Config::Crontab::Base);
+our @ISA = qw(Config::Crontab::Base);
use constant RE_ACTIVE => '^\s*(\#*)\s*';
use constant RE_VAR => q!(["']?[^=]+?['"]?)\s*=\s*(.*)$!;
@@ -2787,9 +2824,9 @@
## environment pattern
package Config::Crontab::Comment;
use strict;
+use warnings;
-use vars qw (@ISA);
-@ISA = qw(Config::Crontab::Base);
+our @ISA = qw(Config::Crontab::Base);
sub init {
my $self = shift;
@@ -2919,6 +2956,7 @@
## a virtual base class for top-level container classes
package Config::Crontab::Container;
use strict;
+use warnings;
use Carp;
sub up {
@@ -3052,9 +3090,10 @@
## the virtual base class of all Config::Crontab classes
package Config::Crontab::Base;
use strict;
+use warnings;
use Carp;
-use vars qw( $AUTOLOAD );
+our $AUTOLOAD;
sub new {
my $self = { };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Config-Crontab-1.21/META.yml new/Config-Crontab-1.30/META.yml
--- old/Config-Crontab-1.21/META.yml 2007-07-18 21:57:21.000000000 +0200
+++ new/Config-Crontab-1.30/META.yml 2008-10-27 17:33:40.000000000 +0100
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Config-Crontab
-version: 1.21
+version: 1.30
version_from: Crontab.pm
installdirs: site
requires:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Config-Crontab-1.21/Makefile.PL new/Config-Crontab-1.30/Makefile.PL
--- old/Config-Crontab-1.21/Makefile.PL 2003-04-22 21:29:32.000000000 +0200
+++ new/Config-Crontab-1.30/Makefile.PL 2008-10-27 17:30:22.000000000 +0100
@@ -5,7 +5,7 @@
'NAME' => 'Config::Crontab',
'VERSION_FROM' => 'Crontab.pm', # finds $VERSION
'PREREQ_PM' => {}, # e.g., Module::Name => 1.1
- ($] >= 5.005 ? ## Add these new keywords supported since 5.005
+ ($] >= 5.006_001 ?
(ABSTRACT_FROM => 'Crontab.pm', # retrieve abstract from module
- AUTHOR => 'A. U. Thor ') : ()),
+ AUTHOR => 'Scott Wiersdorf ') : ()),
);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Config-Crontab-1.21/README new/Config-Crontab-1.30/README
--- old/Config-Crontab-1.21/README 2006-05-25 18:09:23.000000000 +0200
+++ new/Config-Crontab-1.30/README 2008-10-27 17:20:57.000000000 +0100
@@ -1,4 +1,4 @@
-Config/Crontab version 1.21
+Config/Crontab version 1.30
===========================
Config::Crontab reads and writes (and pretty-prints) your crontab(5)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Config-Crontab-1.21/t/03_event.t new/Config-Crontab-1.30/t/03_event.t
--- old/Config-Crontab-1.21/t/03_event.t 2005-05-04 23:23:22.000000000 +0200
+++ new/Config-Crontab-1.30/t/03_event.t 2008-10-27 16:53:48.000000000 +0100
@@ -1,6 +1,6 @@
use Test;
use blib;
-BEGIN { plan tests => 124 };
+BEGIN { plan tests => 128 };
use Config::Crontab;
ok(1);
@@ -251,3 +251,19 @@
$event->data('1 3 5 * Wed blech winnie');
ok( $event->dump, '1 3 5 * Wed blech winnie' );
ok( $event->user, '' );
+undef $event;
+
+## test nolog option (SuSE-specific syntax)
+$event = new Config::Crontab::Event;
+$event->data('5 10 * * * /bin/echo "quietly now"');
+$event->nolog(1);
+ok( $event->dump, '-5 10 * * * /bin/echo "quietly now"' );
+$event->minute(50);
+ok( $event->dump, '-50 10 * * * /bin/echo "quietly now"' );
+$event->nolog(0);
+ok( $event->dump, '50 10 * * * /bin/echo "quietly now"' );
+
+## make it into a system event
+$event->user('joe');
+$event->nolog(1);
+ok( $event->dump, qq!-50\t10\t*\t*\t*\tjoe\t/bin/echo "quietly now"! );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Config-Crontab-1.21/t/05_crontab.t new/Config-Crontab-1.30/t/05_crontab.t
--- old/Config-Crontab-1.21/t/05_crontab.t 2005-06-11 00:14:50.000000000 +0200
+++ new/Config-Crontab-1.30/t/05_crontab.t 2008-10-27 17:13:43.000000000 +0100
@@ -1,6 +1,6 @@
use Test;
use blib;
-BEGIN { plan tests => 75 };
+BEGIN { plan tests => 77 };
use Config::Crontab;
ok(1);
@@ -448,6 +448,22 @@
eval { $ct->owner("root\0 2>/dev/null; cat /etc/passwd") };
ok( $@ =~ qr(Illegal username)i );
+##
+## test SuSE-specific nolog option
+##
+$crontabd =~ s/^(13\s+9\s+)/\-$1/m;
+
+open FILE, ">$crontabf"
+ or die "Couldn't open $crontabf: $!\n";
+print FILE $crontabd;
+close FILE;
+
+$ct = new Config::Crontab( -file => $crontabf, -system => 1 );
+my($blk) = $ct->select_blocks( -index => 4 );
+ok( $blk->dump, qq!## fetch ufo\n-13\t9\t*\t*\t1-5\tscott\tenv DISPLAY=tub:0 \$HOME/bin/fetch_image\n! );
+($blk->select(-type => 'event'))[0]->nolog(0);
+ok( $blk->dump, qq!## fetch ufo\n13\t9\t*\t*\t1-5\tscott\tenv DISPLAY=tub:0 \$HOME/bin/fetch_image\n! );
+
END {
unlink $crontabf;
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org