diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ad845cd --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/Schedule-Cron-1.01.tar.gz diff --git a/perl-Schedule-Cron-Licensing.html b/perl-Schedule-Cron-Licensing.html new file mode 100644 index 0000000..6cd56ae --- /dev/null +++ b/perl-Schedule-Cron-Licensing.html @@ -0,0 +1,193 @@ + + + + + + + + + + + + Perl Licensing - dev.perl.org + + + + + + + + + + + + + + + + + + + + + +
+
+

Perl Licensing

+

+
+
+ + +
+ + +
+

+Perl5 is Copyright (C) 1993-2005, by Larry Wall and others. +

+ +

+It is free software; you can redistribute it and/or modify it under +the terms of either: +

+ +

+ a) the GNU General Public License as + published by the Free Software + Foundation; either version 1, or (at your + option) any later + version, or +

+ +

+ b) the "Artistic License". +

+ +

+
+

+ For those of you that choose to use the GNU General Public + License, my interpretation of the GNU General Public License is + that no Perl script falls under the terms of the GPL unless you + explicitly put said script under the terms of the GPL yourself. +

+

+ Furthermore, any object code linked with perl does not + automatically fall under the terms of the GPL, provided such + object code only adds definitions of subroutines and variables, + and does not otherwise impair the resulting interpreter from + executing any standard Perl script. I consider linking in C + subroutines in this manner to be the moral equivalent of defining + subroutines in the Perl language itself. You may sell such an + object file as proprietary provided that you provide or offer to + provide the Perl source, as specified by the GNU General Public + License. (This is merely an alternate way of specifying input to + the program.) You may also sell a binary produced by the dumping + of a running Perl script that belongs to you, provided that you + provide or offer to provide the Perl source as specified by the + GPL. (The fact that a Perl interpreter and your code are in the + same binary file is, in this case, a form of mere aggregation.) +

+

+ This is my interpretation of the GPL. If you still have concerns + or difficulties understanding my intent, feel free to contact me. + Of course, the Artistic License spells all this out for your + protection, so you may prefer to use that. +

+
+ + -- Larry Wall + +
+ +
+ +
+ +
+ + + +
+ +
+ + + + + + + + + + + + diff --git a/perl-Schedule-Cron.spec b/perl-Schedule-Cron.spec new file mode 100644 index 0000000..464c8b8 --- /dev/null +++ b/perl-Schedule-Cron.spec @@ -0,0 +1,97 @@ +%global __requires_exclude perl\\(Time::ParseDate\\) + +Name: perl-Schedule-Cron +Summary: Provides a simple but complete cron like scheduler +Version: 1.01 +Release: 1%{?dist} +License: GPL+ or Artistic +URL: https://metacpan.org/release/Schedule-Cron +BuildArch: noarch + +Source0: https://cpan.metacpan.org/authors/id/R/RO/ROLAND/Schedule-Cron-%{version}.tar.gz +# The following license text is included due to the "perl" license assignment +# shown in Makefile.PL +Source1: http://dev.perl.org/licenses/#/%{name}-Licensing.html + +# https://github.com/rhuss/schedule-cron/pull/8 +Patch0: perl-schedule-cron-fix-unescaped-left-brace.patch +# Patch obtained from Debian libschedule-cron-perl source package +Patch1: perl-schedule-cron-fix-spelling.patch + +BuildRequires: perl-interpreter +BuildRequires: perl-generators +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Basename) +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(subs) +BuildRequires: perl(vars) +BuildRequires: findutils +BuildRequires: coreutils +BuildRequires: perl(POSIX) + +# Needed during build for the perl test +BuildRequires: perl(Time::ParseDate) >= 2011.0505 +BuildRequires: perl(Test::More) +BuildRequires: perl(Test::Pod::Coverage) + +Requires: perl(Config) +Requires: perl(Time::ParseDate) >= 2011.0505 +Requires: perl(POSIX) +Requires: perl(Term::ReadLine) + +%description +This module provides a simple but complete cron like scheduler. I.e +this modules can be used for periodically executing Perl subroutines. +The dates and parameters for the subroutines to be called are +specified with a format known as crontab entry (see man page crontab(5) +or documentation of Schedule::Cron). + +The philosophy behind Schedule::Cron is to call subroutines +periodically from within one single Perl program instead of letting +cron trigger several (possibly different) Perl scripts. Everything +under one roof. Furthermore Schedule::Cron provides mechanism to +create crontab entries dynamically, which isn't that easy with cron. + +Schedule::Cron knows about all extensions (well, at least all +extensions I'm aware of, i.e those of the so called "Vixie" cron) for +crontab entries like ranges including 'steps', specification of month +and days of the week by name or coexistence of lists and ranges in the +same field. And even a bit more (like lists and ranges with symbolic +names). + +This module is rather effective concerning system load. It calculates +the execution dates in advance and will sleep until those dates are +reached (and wont wake up every minute to check for execution like +cron). However, it relies on the accuracy of your sleep() system +call. + +%prep +%autosetup -p 1 -n Schedule-Cron-%{version} +cp -a %{SOURCE1} Licensing.html + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 +%make_build + +%install +%make_build pure_install DESTDIR=%{buildroot} + +find %{buildroot} -type f -name .packlist -delete + +%{_fixperms} %{buildroot}/* + +%check +%make_build test + +%files +%license Licensing.html +%doc CHANGES ChangeLog README examples/ +%{perl_vendorlib}/Schedule/ +%{_mandir}/man3/* + +%changelog +* Wed Dec 12 2018 Andrew Bauer - 1.01-1 +- Initial specfile + diff --git a/perl-schedule-cron-fix-spelling.patch b/perl-schedule-cron-fix-spelling.patch new file mode 100644 index 0000000..8b888ca --- /dev/null +++ b/perl-schedule-cron-fix-spelling.patch @@ -0,0 +1,51 @@ +Description: spelling fixes +Origin: vendor +Author: gregor herrmann +Last-Update: 2017-06-30 +Forwarded: https://rt.cpan.org/Ticket/Display.html?id=122278 +Bug: https://rt.cpan.org/Ticket/Display.html?id=122278 + +--- a/lib/Schedule/Cron.pm ++++ b/lib/Schedule/Cron.pm +@@ -543,7 +543,7 @@ + In addition, ranges or lists of names are allowed. + + An optional sixth column can be used to specify the seconds within the +-minute. If not present, it is implicitely set to "0". ++minute. If not present, it is implicitly set to "0". + + B + +@@ -683,7 +683,7 @@ + Note that these entries are returned by value and were opbtained from the + internal list by a deep copy. I.e. you are free to modify it, but this won't + influence the original entries. Instead use C if you need to +-modify an exisiting crontab entry. ++modify an existing crontab entry. + + =cut + +@@ -761,7 +761,7 @@ + + =item $cron->update_entry($idx,$entry) + +-Updates the entry with index C<$idx>. C<$entry> is a hash ref as descibed in ++Updates the entry with index C<$idx>. C<$entry> is a hash ref as described in + C and must contain at least a value C<$entry-E{time}>. If no + C<$entry-E{dispatcher}> is given, then the default dispatcher is used. This + method returns the old entry on success, C otherwise. +@@ -1811,11 +1811,11 @@ + calculates epoch times for dates given like C<02:50:00 2009/10/25>. Should it + return the seconds since 1970 for this time happening 'first', or for this time + in the extra hour ? As it turns out, L returns the epoch time +-of the first occurence for C and for C it returns the second +-occurence. Unfortunately, there is no way to specify I entry ++of the first occurrence for C and for C it returns the second ++occurrence. Unfortunately, there is no way to specify I entry + L should pick (until now). Of course, after all, this is + obviously not L's fault, since a simple date specification +-within the DST backswitch period B ambigious. However, it would be nice if ++within the DST backswitch period B ambiguous. However, it would be nice if + the parsing behaviour of L would be consistent across time + zones (a ticket has be raised for fixing this). Then L's + behaviour within a DST backward switch would be consistent as well. diff --git a/perl-schedule-cron-fix-unescaped-left-brace.patch b/perl-schedule-cron-fix-unescaped-left-brace.patch new file mode 100644 index 0000000..9665ebd --- /dev/null +++ b/perl-schedule-cron-fix-unescaped-left-brace.patch @@ -0,0 +1,26 @@ +From fabead181f55e8b8ee5729e25d1b3c9327e95b67 Mon Sep 17 00:00:00 2001 +From: Alexandr Ciornii +Date: Wed, 4 Jan 2017 15:06:37 +0200 +Subject: [PATCH] Fixes "Unescaped left brace in regex is illegal", RT#117437 + + +Bug: https://rt.cpan.org/Public/Bug/Display.html?id=117437 +Bug-Debian: https://bugs.debian.org/826491 + +--- + t/pretty_print_args.t | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/t/pretty_print_args.t b/t/pretty_print_args.t +index 7a1322e..e50e76b 100644 +--- a/t/pretty_print_args.t ++++ b/t/pretty_print_args.t +@@ -11,4 +11,4 @@ my @args = ( + ); + + my $out = join(",",Schedule::Cron->_format_args(@args)); +-like($out,qr/\['bla','blub',{.*?'and'\s*=>\s*'HASH\(.*?\)'.*?}\],3,{.*?'blub'\s*=>\s*'bla'.*?}/); ++like($out,qr/\['bla','blub',\{.*?'and'\s*=>\s*'HASH\(.*?\)'.*?}\],3,\{.*?'blub'\s*=>\s*'bla'.*?}/); +-- +2.13.2 + diff --git a/sources b/sources new file mode 100644 index 0000000..6eb52a5 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (Schedule-Cron-1.01.tar.gz) = d0066e650603c2798cf2cf5add88e75afa0f5565f60a633fd3f935bb47aa5e03c8c2df4b201f162598d42c84f537bc6221d71e45bcd5009bbee05edc95f91da7