[Pkg-cron-devel] [SCM] Git repository for pkg-cron branch, sf3, updated. debian/3.0pl1-109-20-gde88d23

Christian Kastner debian at kvr.at
Sat Sep 24 22:26:50 UTC 2011


The following commit has been merged in the sf3 branch:
commit fa9dbd2640dc31725b8eb1bc184b998c6798c6af
Author: Christian Kastner <debian at kvr.at>
Date:   Sun Sep 25 00:12:13 2011 +0200

    Re-sync manpage updates

diff --git a/debian/patches/other/changes-to-cron-8 b/debian/patches/other/changes-to-cron-8
index 13cb98a..b886b96 100644
--- a/debian/patches/other/changes-to-cron-8
+++ b/debian/patches/other/changes-to-cron-8
@@ -1,8 +1,8 @@
-Index: patched/cron.8
+Index: sf3/cron.8
 ===================================================================
---- patched.orig/cron.8	2010-05-06 18:17:51.496436204 +0200
-+++ patched/cron.8	2010-05-06 18:19:04.696435830 +0200
-@@ -17,28 +17,87 @@
+--- sf3.orig/cron.8	2010-06-23 02:43:54.517391000 +0200
++++ sf3/cron.8	2011-09-22 20:34:34.848012395 +0200
+@@ -17,45 +17,289 @@
  .\" 
  .\" $Id: cron.8,v 2.2 1993/12/28 08:34:43 vixie Exp $
  .\" 
@@ -42,14 +42,28 @@ Index: patched/cron.8
 +Stay in foreground mode, don't daemonize.
 +.TP
 +.B -l
-+Enable LSB compliant names for /etc/cron.d files
++Enable LSB compliant names for /etc/cron.d files. This setting, however, does
++not affect the parsing of files under /etc/cron.hourly, /etc/cron.daily,
++/etc/cron.weekly or /etc/cron.monthly.
 +.TP
-+.B -L loglevel
-+Sets the loglevel for cron. The standard logging level (1) will log 
-+the start of all the cron jobs. A higher loglevel (2) will cause
-+cron to log also the end of all cronjobs, which can be useful to
-+audit the behaviour of tasks run by cron. Logging will be disabled
-+if the \fIloglevel\fR is set to zero (0).
++.B -L loglevel 
++Tell cron what to log about \fBjobs\fR (errors are logged regardless of this
++value) as the sum of the following values:
++.br
++.RS 12
++.IP \fB1\fR
++will log the start of all cron jobs
++.IP \fB2\fR
++will log the end of all cron jobs
++.IP \fB4\fR
++will log all failed jobs (exit status != 0)
++.IP \fB8\fR
++will log the process number of all cron jobs
++.RE
++.IP
++The default is to log the start of all jobs (1). Logging will be disabled
++if \fIlevels\fR is set to zero (0). A value of fifteen (15) will select all
++options.
 +.SH NOTES
 +.PP
 +.I cron
@@ -63,37 +77,44 @@ Index: patched/cron.8
 +
 +.I cron
 +also reads /etc/crontab, which is in a slightly different format (see
-+.IR crontab(5) ). 
-+Additionally,
++.IR crontab(5) ).
++In Debian, the content of /etc/crontab is predefined
++to run programs under /etc/cron.hourly, /etc/cron.daily,
++/etc/cron.weekly and /etc/cron.monthly. This configuration is specific to
++Debian, see the note under 
++.B DEBIAN SPECIFIC
++below.
++in order 
++
++Additionally, in Debian,
++.I cron
++reads the files in the /etc/cron.d directory.
 +.I cron
-+reads the files in /etc/cron.d: it
 +treats the files in /etc/cron.d as in the same way as the /etc/crontab file (they
 +follow the special format of that file, i.e. they include the 
 +.I user
 +field). However, they are independent of /etc/crontab: they do not, for 
-+example, inherit environment variable settings from it. The intended purpose
-+of this feature is to allow packages that require
-+finer control of their scheduling than the /etc/cron.{daily,weekly,monthly} 
-+directories to add a crontab file to /etc/cron.d. Such files
-+should be named after the package that supplies them. Files must
-+conform to the same naming convention as used by 
-+.IR run-parts(8) :
-+they
-+must consist solely of upper- and lower-case letters, digits, underscores,
-+and hyphens. If the 
-+.B -l
-+option is specified, then they must conform to the LSB namespace specification,
-+exactly as in the
-+.B --lsbsysinit
-+option in 
-+.IR run-parts .
++example, inherit environment variable settings from it. This change is
++specific to Debian see the note under 
++.B DEBIAN SPECIFIC
++below.
 +
 +Like /etc/crontab, the files in the /etc/cron.d directory are
-+monitored for changes. In general, the admin should not use /etc/cron.d/,
++monitored for changes. In general, the system administrator should not use /etc/cron.d/,
 +but use the standard system crontab /etc/crontab.
 +
-+In contrast to the spool area, files in /etc/cron.d may be symlinks, provided
-+that both the symlink and the file it points to are owned by root.
++/etc/crontab and the files in /etc/cron.d must be owned by root, and must not
++be group- or other-writable. In contrast to the spool area, the files
++under /etc/cron.d or the files under /etc/cron.hourly, /etc/cron.daily,
++/etc/cron.weekly and /etc/cron.monthly may also be symlinks,
++provided that both the symlink and the file it points to are owned by root. 
++The files under /etc/cron.d do not need to be executable, while the files
++under /etc/cron.hourly, /etc/cron.daily,
++/etc/cron.weekly and /etc/cron.monthly do, as they are run by 
++.I run-parts
++(see
++.IR run-parts(8) 
++for more information).
 +
 +.I cron
 +then wakes up every minute, examining all stored crontabs, checking
@@ -106,7 +127,16 @@ Index: patched/cron.8
  .PP
  Additionally,
  .I cron
-@@ -51,9 +110,48 @@
+ checks each minute to see if its spool directory's modtime (or the modtime
+-on
+-.IR /etc/crontab)
++on the 
++.IR /etc/crontab
++file)
+ has changed, and if it has,
+ .I cron
+-will then examine the modtime on all crontabs and reload those which have
++will then examine the modtime on all crontabs files and reload those which have
  changed.  Thus
  .I cron
  need not be restarted whenever a crontab file is modified.  Note that the
@@ -132,7 +162,9 @@ Index: patched/cron.8
 +.PP
 +.I cron
 +logs its action to the syslog facility 'cron', and logging may be
-+controlled using the standard syslogd(8) facility.
++controlled using the standard 
++.IR syslogd(8) 
++facility.
 +.SH ENVIRONMENT
 +If configured in
 +.I /etc/default/cron
@@ -142,9 +174,17 @@ Index: patched/cron.8
 +.I /etc/environment
 +or through the use of
 +.I /etc/default/locale
-+whichever is available (with the latter one taking precedence). These
-+files are read and they will use to setup the LANG, LC_ALL, and
-+LC_CTYPE environment variables.
++with values from the latter overriding values from the former. These
++files are read and they will be used to setup the LANG, LC_ALL, and
++LC_CTYPE environment variables. These variables are then used to set the
++charset of mails, which defaults to 'C'.
++.PP
++This does
++.B NOT
++affect the environment of tasks running under cron. For more information
++on how to modify the environment of tasks, consult 
++.IR crontab(5)
++\.
 +.PP
 +The daemon will use, if present, the definition from
 +.I /etc/timezone
@@ -153,6 +193,124 @@ Index: patched/cron.8
 +The environment can be redefined in user's crontab definitions but
 +.I cron
 +will only handle tasks in a single timezone.
++
++.SH DEBIAN SPECIFIC
++.PP
++Debian introduces some changes to 
++.I cron
++that were not originally available upstream. The most significant
++changes introduced are:
++
++.IP \(em
++Support for /etc/cron.{hourly,daily,weekly,monthly} via /etc/crontab,
++.IP \(em
++Support for /etc/cron.d (drop-in dir for package crontabs),
++.IP \(em
++PAM support,
++.IP \(em
++SELinux support,
++.IP \(em
++auditlog support,
++.IP \(em
++DST and other time-related changes/fixes,
++.IP \(em
++SGID crontab(1) instead of SUID root,
++.IP \(em
++Debian-specific file locations and commands,
++.IP \(em
++Debian-specific configuration (/etc/default/cron),
++.IP \(em
++numerous other smaller features and fixes.
++
++.PP
++Support for /etc/cron.hourly, /etc/cron.daily, /etc/cron.weekly and
++/etc/cron.monthly is provided in Debian through the default setting
++of the /etc/crontab file (see the system-wide example in 
++.IR crontab(5) ).
++The default sytem-wide crontab contains four tasks: run every hour, every
++day, every week and every month. Each of these tasks will execute 
++.B run-parts
++providing each one of the directories as an argument. These tasks are disabled if
++.B anacron 
++is installed (except for the hourly task) to prevent conflicts between
++both daemons.
++
++As described above, the files under these directories have to be pass
++some sanity checks including the following: be executable, be owned by root,
++not be writable by group or other and, if symlinks, point to files owned by
++root. Additionally, the file names must conform to the filename requirements
++of 
++.BR run-parts :
++they must be entirely made up of letters, digits and can only contain the
++special signs underscores ('_') and hyphens ('-'). Any file that does
++not conform to these requirements will not be executed by 
++.BR run-parts . 
++For example, any file containing dots will be ignored.
++This is done to prevent cron from running any of the files
++that are left by the Debian package management system when handling files in
++/etc/cron.d/ as configuration files (i.e. files ending in .dpkg-dist, .dpkg-orig, 
++and .dpkg-new).
++
++This feature can be used by system administrators and packages to include
++tasks that will be run at defined intervals. Files created by packages in these
++directories should be named after the package that supplies them.
++
++.PP
++Support for /etc/cron.d is included in the
++.I cron 
++daemon itself, which handles this location as the system-wide crontab spool.
++This directory can contain any file defining tasks following the format
++used in /etc/crontab, i.e. unlike the user cron spool, these files must
++provide the username to run the task as in the task definition.
++
++Files in this directory have to be owned by root, do not need to be executable
++(they are configuration files, just like /etc/crontab) and 
++must conform to the same naming convention as used by 
++.IR run-parts(8) :
++they
++must consist solely of upper- and lower-case letters, digits, underscores,
++and hyphens. This means that they 
++.B cannot
++contain any dots. 
++If the 
++.B -l
++option is specified to 
++.I cron
++(this option can be setup through /etc/default/cron, see below), then they must
++conform to the LSB namespace specification, exactly as in the
++.B --lsbsysinit
++option in 
++.IR run-parts .
++
++The intended purpose
++of this feature is to allow packages that require
++finer control of their scheduling than the /etc/cron.{hourly,daily,weekly,monthly} 
++directories to add a crontab file to /etc/cron.d. Such files
++should be named after the package that supplies them.
++
++
++Also, the default configuration of 
++.I cron
++is controlled by
++.I /etc/default/cron
++which is read by the init.d script that launches the
++.I cron
++daemon. This file determines whether 
++.I cron
++will read the system's environment variables and makes it possible to add 
++additional options to the 
++.I cron
++program before it is executed, either to configure its logging or to define how
++it will treat the files under /etc/cron.d.
++
  .SH "SEE ALSO"
- crontab(1), crontab(5)
+-crontab(1), crontab(5)
++crontab(1), crontab(5), run-parts(8)
  .SH AUTHOR
+ .nf
+-Paul Vixie <paul at vix.com>
++Paul Vixie <paul at vix.com> is the author of 
++.I cron
++and original creator of this manual page. This page has also been modified for
++Debian by Steve Greenland, Javier Fernandez-Sanguino and Christian Kastner.
++
diff --git a/debian/patches/other/changes-to-crontab-1 b/debian/patches/other/changes-to-crontab-1
index 33747de..c0ead7c 100644
--- a/debian/patches/other/changes-to-crontab-1
+++ b/debian/patches/other/changes-to-crontab-1
@@ -1,7 +1,7 @@
-Index: patched/crontab.1
+Index: sf3/crontab.1
 ===================================================================
---- patched.orig/crontab.1	2010-05-06 18:17:51.441435609 +0200
-+++ patched/crontab.1	2010-05-06 18:19:05.363435648 +0200
+--- sf3.orig/crontab.1	2011-09-22 20:34:16.260004763 +0200
++++ sf3/crontab.1	2011-09-22 20:35:59.748000054 +0200
 @@ -17,40 +17,54 @@
  .\"
  .\" $Id: crontab.1,v 2.4 1993/12/31 10:47:33 vixie Exp $
@@ -13,10 +13,11 @@ Index: patched/crontab.1
 -crontab \- maintain crontab files for individual users (V3)
 +crontab \- maintain crontab files for individual users (Vixie Cron)
  .SH SYNOPSIS
- crontab [ -u user ] file
+-crontab [ -u user ] file
++crontab [ \-u user ] file
  .br
 -crontab [ -u user ] { -l | -r | -e }
-+crontab [ -u user ] [ -i ] { -e | -l | -r }
++crontab [ \-u user ] [ \-i ] { \-e | \-l | \-r }
  .SH DESCRIPTION
 -.I Crontab
 +.I crontab
@@ -55,7 +56,7 @@ Index: patched/crontab.1
 +.PP
 +If both files exist then 
 +.I /etc/cron.allow
-+takes precendence. Which means that 
++takes precedence. Which means that 
 +.I /etc/cron.deny
 +is not considered and your user must be listed in 
 +.I /etc/cron.allow
@@ -94,7 +95,7 @@ Index: patched/crontab.1
  .PP
  The
  .I -r
-@@ -77,24 +94,69 @@
+@@ -77,24 +94,72 @@
  The
  .I -e
  option is used to edit the current crontab using the editor specified by
@@ -108,7 +109,7 @@ Index: patched/crontab.1
 +.PP
 +The
 +.I -i
-+option modifies the -r option to prompt the user for a 'y/Y' response
++option modifies the \-r option to prompt the user for a 'y/Y' response
 +before actually removing the crontab.
 +.SH DEBIAN SPECIFIC
 +The "out-of-the-box" behaviour for
@@ -118,7 +119,7 @@ Index: patched/crontab.1
 +beginning of the crontab when it is installed. The problem is that
 +it makes the sequence
 +.PP
-+crontab -l | crontab -
++crontab \-l | crontab \-
 +.PP
 +non-idempotent -- you keep adding copies of the header. This causes
 +pain to scripts that use sed to edit a crontab. Therefore, the default
@@ -167,4 +168,8 @@ Index: patched/crontab.1
 +
  .SH AUTHOR
  .nf
- Paul Vixie <paul at vix.com>
+-Paul Vixie <paul at vix.com>
++Paul Vixie <paul at vix.com>  is the author of 
++.I cron
++and original creator of this manual page. This page has also been modified for
++Debian by Steve Greenland, Javier Fernandez-Sanguino and Christian Kastner.
diff --git a/debian/patches/other/changes-to-crontab-5 b/debian/patches/other/changes-to-crontab-5
index e9b1ad0..6da84a1 100644
--- a/debian/patches/other/changes-to-crontab-5
+++ b/debian/patches/other/changes-to-crontab-5
@@ -1,7 +1,7 @@
-Index: patched/crontab.5
+Index: sf3/crontab.5
 ===================================================================
---- patched.orig/crontab.5	2010-05-06 18:17:51.399560787 +0200
-+++ patched/crontab.5	2010-05-06 18:19:06.107981321 +0200
+--- sf3.orig/crontab.5	2011-09-22 20:34:11.808004768 +0200
++++ sf3/crontab.5	2011-09-22 20:36:07.124004898 +0200
 @@ -17,7 +17,7 @@
  .\"
  .\" $Id: crontab.5,v 2.4 1994/01/15 20:43:43 vixie Exp $
@@ -11,7 +11,7 @@ Index: patched/crontab.5
  .UC 4
  .SH NAME
  crontab \- tables for driving cron
-@@ -34,7 +34,7 @@
+@@ -34,13 +34,15 @@
  as part of a cron command.
  .PP
  Blank lines and leading spaces and tabs are ignored.  Lines whose first
@@ -20,7 +20,16 @@ Index: patched/crontab.5
  Note that comments are not allowed on the same line as cron commands, since
  they will be taken to be part of the command.  Similarly, comments are not
  allowed on the same line as environment variable settings.
-@@ -52,15 +52,41 @@
+ .PP
+ An active line in a crontab will be either an environment setting or a cron
+-command.  An environment setting is of the form,
++command.  The crontab file is parsed from top to bottom, so any environment
++settings will affect only the cron commands below them in the file.
++An environment setting is of the form,
+ .PP
+     name = value
+ .PP
+@@ -52,15 +54,41 @@
  The
  .I value
  string may be placed in quotes (single or double, but matching) to preserve
@@ -44,9 +53,7 @@ Index: patched/crontab.5
 +.PP
 +There will not be any subsitution for the defined variables in the
 +last value.
- .PP
--Several environment variables are set up
--automatically by the
++.PP
 +An alternative for setting up the commands path is using the fact that
 +many shells will treat the tilde(~) as substitution of $HOME, so if you use 
 +.I bash
@@ -54,7 +61,9 @@ Index: patched/crontab.5
 +.PP
 +     SHELL=/bin/bash
 +     PATH=~/bin:/usr/bin/:/bin
-+.PP
+ .PP
+-Several environment variables are set up
+-automatically by the
 +Several environment variables are set up automatically by the
  .IR cron (8)
  daemon.
@@ -67,7 +76,7 @@ Index: patched/crontab.5
  .PP
  (Another note: the LOGNAME variable is sometimes called USER on BSD systems...
  on these systems, USER will be set also.)
-@@ -69,16 +95,45 @@
+@@ -69,16 +97,47 @@
  .IR cron (8)
  will look at MAILTO if it has any reason to send mail as a result of running
  commands in ``this'' crontab.  If MAILTO is defined (and non-empty), mail is
@@ -87,7 +96,9 @@ Index: patched/crontab.5
 +.IR /etc/environment
 +and
 +.IR /etc/security/pam_env.conf .
-+However, the PAM setting do
++It also reads locale information from
++.IR /etc/default/locale .
++However, the PAM settings do
 +.B NOT
 +override the settings described above nor any settings in the 
 +.I crontab
@@ -120,7 +131,7 @@ Index: patched/crontab.5
  .IR cron (8)
  when the minute, hour, and month of year fields match the current time,
  .I and
-@@ -97,9 +152,9 @@
+@@ -97,9 +156,9 @@
  .br
  hour	0-23
  .br
@@ -132,7 +143,7 @@ Index: patched/crontab.5
  .br
  day of week	0-7 (0 or 7 is Sun, or use names)
  .br
-@@ -131,26 +186,51 @@
+@@ -131,26 +190,64 @@
  run.
  The entire command portion of the line, up to a newline or %
  character, will be executed by /bin/sh or by the shell
@@ -154,7 +165,10 @@ Index: patched/crontab.5
  .br
  ``30 4 1,15 * 5''
  would cause a command to be run at 4:30 am on the 1st and 15th of each
- month, plus every Friday.
+-month, plus every Friday.
++month, plus every Friday. One can, however, achieve the desired result
++by adding a test to the command (see the last example in EXAMPLE CRON FILE
++below).
 +.PP
 +Instead of the first five fields, one of eight special strings may appear:
 +.IP
@@ -179,7 +193,18 @@ Index: patched/crontab.5
 +.br
 + at hourly	Run once an hour, "0 * * * *".
 +.br
++.PP
++Please note that startup, as far as @reboot is concerned, is the time when
++the
++.IR cron (8)
++daemon startup.  In particular, it may be before some system daemons,
++or other facilities, were startup.  This is due to the boot order
++sequence of the machine.
++
  .SH EXAMPLE CRON FILE
++
++The following lists an example of a user crontab file.
++
  .nf
  
 -# use /bin/sh to run commands, no matter what /etc/passwd says
@@ -189,35 +214,39 @@ Index: patched/crontab.5
  # mail any output to `paul', no matter whose crontab this is
  MAILTO=paul
  #
-@@ -159,30 +239,71 @@
+@@ -159,30 +256,102 @@
  # run at 2:15pm on the first of every month -- output mailed to paul
  15 14 1 * *     $HOME/bin/monthly
  # run at 10 pm on weekdays, annoy Joe
 -0 22 * * 1-5	mail -s "It's 10pm" joe%Joe,%%Where are your kids?%
-+0 22 * * 1-5    mail -s "It's 10pm" joe%Joe,%%Where are your kids?%
++0 22 * * 1-5    mail \-s "It's 10pm" joe%Joe,%%Where are your kids?%
  23 0-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday"
  5 4 * * sun     echo "run at 5 after 4 every sunday"
- .fi
++# Run on every second Saturday of the month
++0 4 8-14 * *    test $(date +%u) \-eq 6 && echo "2nd Saturday"
++.fi
 +.SH EXAMPLE SYSTEM CRON FILE
-+This has the username field, as used by /etc/crontab.
++
++The following lists the content of a regular system-wide crontab file. Unlinke a
++user's crontab, this file has the username field, as used by /etc/crontab.
++
 +.nf
 +# /etc/crontab: system-wide crontab
 +# Unlike any other crontab you don't have to run the `crontab'
 +# command to install the new version when you edit this file
 +# and files in /etc/cron.d. These files also have username fields,
-+# that none of other the crontabs do.
++# that none of the other crontabs do.
 +
 +SHELL=/bin/sh
 +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 +
-+# m h dom mon dow user    command
-+42 6 * * *        root    run-parts --report /etc/cron.daily
-+47 6 * * 7        root    run-parts --report /etc/cron.weekly
-+52 6 1 * *        root    run-parts --report /etc/cron.monthly
++# m h dom mon dow user	command
++17 *	* * *	root    cd / && run-parts --report /etc/cron.hourly
++25 6	* * *	root	test \-x /usr/sbin/anacron || ( cd / && run-parts \-\-report /etc/cron.daily )
++47 6	* * 7	root	test \-x /usr/sbin/anacron || ( cd / && run-parts \-\-report /etc/cron.weekly )
++52 6	1 * *	root	test \-x /usr/sbin/anacron || ( cd / && run-parts \-\-report /etc/cron.monthly )
 +#
-+# Removed invocation of anacron, as this is now handled by a 
-+# /etc/cron.d file
-+.fi
+ .fi
  .SH SEE ALSO
  cron(8), crontab(1)
  .SH EXTENSIONS
@@ -257,6 +286,30 @@ Index: patched/crontab.5
 +this will affect only the commands executed in the crontab, not the execution
 +of the crontab tasks themselves.
 +
++The 
++.I crontab
++syntax does not make it possible to define all possible periods one could 
++image off. For example, it is not straightforward to define the last
++weekday of a month. If a task needs to be run in a specific period of time
++that cannot be defined in the 
++.I crontab
++syntaxs the best approach would be to have the program itself check the
++date and time information and continue execution only if the period
++matches the desired one.
++
++If the program itself cannot do the checks then a wrapper script would be
++required. Useful tools that could be used for date analysis are 
++.I ncal
++or
++.I calendar 
++For example, to run a program the last Saturday of every month you could use
++the following wrapper code:
++
++.nf
++0 4 * * Sat   [ "$(date +%e)" = "`ncal | grep $(date +%a | sed  -e 's/.$//') | sed -e 's/^.*\\s\\([0-9]\\+\\)\\s*$/\\1/'`" ] && echo "Last Saturday" && program_to_run
++.fi
++
++
 +.SH DIAGNOSTICS
 +cron requires that each entry in a crontab end in a newline character. If the
 +last entry in a crontab is missing a newline (ie, terminated by EOF), cron will
@@ -265,4 +318,8 @@ Index: patched/crontab.5
 +
  .SH AUTHOR
  .nf
- Paul Vixie <paul at vix.com>
+-Paul Vixie <paul at vix.com>
++Paul Vixie <paul at vix.com> is the author of 
++.I cron
++and original creator of this manual page. This page has also been modified for
++Debian by Steve Greenland, Javier Fernandez-Sanguino and Christian Kastner.

-- 
Git repository for pkg-cron



More information about the Pkg-cron-devel mailing list