Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jan 2010 15:23:21 GMT
From:      Alexander Kriventsov <avk@vl.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/143022: [PATCH] sysutils/puppet: fix crontab problem
Message-ID:  <201001201523.o0KFNLVh070266@www.freebsd.org>
Resent-Message-ID: <201001201530.o0KFU5FV091463@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         143022
>Category:       ports
>Synopsis:       [PATCH] sysutils/puppet: fix crontab problem
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 20 15:30:04 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Kriventsov
>Release:        FreeBSD RELENG_8
>Organization:
McHost
>Environment:
FreeBSD RELENG_8
>Description:
Fix issue with crontab
Original http://projects.reductivelabs.com/issues/3010
This problem was fixed in 0.25.4
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -urN puppet.orig/Makefile puppet/Makefile
--- puppet.orig/Makefile	2010-01-18 11:25:44.000000000 +0000
+++ puppet/Makefile	2010-01-20 15:07:16.000000000 +0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	puppet
 PORTVERSION=	0.25.3
+PORTREVISION=	1
 CATEGORIES=	sysutils
 MASTER_SITES=	http://www.reductivelabs.com/downloads/puppet/
 
diff -urN puppet.orig/files/patch-lib-puppet-provider-cron-crontab.rb puppet/files/patch-lib-puppet-provider-cron-crontab.rb
--- puppet.orig/files/patch-lib-puppet-provider-cron-crontab.rb	1970-01-01 00:00:00.000000000 +0000
+++ puppet/files/patch-lib-puppet-provider-cron-crontab.rb	2010-01-20 14:51:59.000000000 +0000
@@ -0,0 +1,25 @@
+--- lib/puppet/provider/cron/crontab.rb.orig	2010-01-11 23:55:13.000000000 +0000
++++ lib/puppet/provider/cron/crontab.rb	2010-01-19 02:49:58.000000000 +0000
+@@ -27,13 +27,18 @@
+ 
+     text_line :environment, :match => %r{^\w+=}
+ 
+-    crontab = record_line :crontab, :fields => %w{special minute hour monthday month weekday command},
+-        :match => %r{^\s*(?:@(\w+)|(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+))\s+(.+)$},
+-        :optional => %w{special minute hour weekday month monthday}, :absent => "*"
++    record_line :freebsd_special, :fields => %w{special command},
++        :match => %r{^@(\w+)\s+(.+)$}, :pre_gen => proc { |record|
++            record[:special] = "@" + record[:special]
++        }
++
++    crontab = record_line :crontab, :fields => %w{minute hour monthday month weekday command},
++        :match => %r{^\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.+)$},
++        :optional => %w{minute hour weekday month monthday}, :absent => "*"
+ 
+     class << crontab
+         def numeric_fields
+-            fields - [:command, :special]
++            fields - [:command]
+         end
+         # Do some post-processing of the parsed record.  Basically just
+         # split the numeric fields on ','.


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001201523.o0KFNLVh070266>