Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jun 2005 19:20:39 +0200 (CEST)
From:      Derik van Zuetphen <dz@426.ch>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/82168: Update port sysutils/anacron: Warnings removed
Message-ID:  <20050612172039.CA0CB678E6@trevize.a.426.ch>
Resent-Message-ID: <200506121730.j5CHUC9Z056550@freefall.freebsd.org>

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

>Number:         82168
>Category:       ports
>Synopsis:       Update port sysutils/anacron: Warnings removed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 12 17:30:12 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Derik van Zuetphen
>Release:        FreeBSD 5.4-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD trevize.a.426.ch 5.4-RELEASE-p1 FreeBSD 5.4-RELEASE-p1 #15: Mon May 30 14:32:58 CEST 2005 root@trevize.a.426.ch:/usr/obj/usr/src/sys/TREVIZE i386


>Description:

2005-06-03 Nikolai Nespor <nikolai.nespor (at) utanet.at>

main.c, log.c:
        #include <stdlib.h> added

matchrx.c:
        #include <string.h> added


2005-06-05 Derik van Zuetphen <dz (at) 426.ch>

runjob.c, Makefile:
        replaced tempnam with mkstemp

main.c:
        string literal shortened to less than 509 chars (ISO C89)

Makefile, README, anacron.8.in, anacrontab.5.in:
        env variable PREFIX can be set prior to make
        PREFIX gets adjusted in manpages


>How-To-Repeat:
>Fix:


diff -urN ../anacron-2.3-3/Makefile ./Makefile
--- ../anacron-2.3-3/Makefile	Fri Nov 26 10:45:56 2004
+++ ./Makefile	Sun Jun  5 19:27:54 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	anacron
 PORTVERSION=	2.3
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	sysutils
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	anacron
@@ -21,8 +21,9 @@
 PKGMESSAGE=	${WRKDIR}/pkg-message
 
 post-install:
-	${CAT} ${PKGMESSAGE}
 	${STRIP_CMD} ${PREFIX}/sbin/anacron
+	$(INSTALL_SCRIPT) ${FILESDIR}/anacron.sh $(PREFIX)/etc/rc.d/anacron.sh
+	${CAT} ${PKGMESSAGE}
 
 post-patch:
 	@${SED} -e 's|%%PREFIX%%|${PREFIX}|g' ${PKGDIR}/pkg-message >${PKGMESSAGE}
diff -urN ../anacron-2.3-3/files/anacron.sh ./files/anacron.sh
--- ../anacron-2.3-3/files/anacron.sh	Thu Jan  1 01:00:00 1970
+++ ./files/anacron.sh	Sun Jun  5 14:21:18 2005
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+#    initialization/shutdown script for anacron
+
+# PROVIDE: anacron
+# REQUIRE: LOGIN
+# KEYWORD: FreeBSD
+
+#
+# Add the following lines to /etc/rc.conf to enable anacron:
+#
+# anacron_enable="YES"
+
+. /etc/rc.subr
+
+prefix=/usr/local
+
+name="anacron"
+rcvar=`set_rcvar`
+command="$prefix/sbin/anacron"
+
+load_rc_config $name
+run_rc_command "$1"
diff -urN ../anacron-2.3-3/files/patch-aa ./files/patch-aa
--- ../anacron-2.3-3/files/patch-aa	Sun Jun 12 17:34:39 2005
+++ ./files/patch-aa	Sun Jun 12 17:41:08 2005
@@ -1,20 +1,23 @@
 diff -uN ../anacron-2.3/Makefile ./Makefile
 --- ../anacron-2.3/Makefile	Fri Jun 23 00:26:11 2000
-+++ ./Makefile	Sun Nov 21 14:29:24 2004
-@@ -19,16 +19,16 @@
++++ ./Makefile	Sun Jun 12 17:40:59 2005
+@@ -19,16 +19,17 @@
  #   `COPYING' that comes with the Anacron source distribution.
  
  
 -PREFIX = 
 -BINDIR = $(PREFIX)/usr/sbin
 -MANDIR = $(PREFIX)/usr/man
+-CFLAGS = -Wall -pedantic -O2
 +PREFIX ?= /usr/local
 +BINDIR = $(PREFIX)/sbin
 +MANDIR = $(PREFIX)/man
- CFLAGS = -Wall -pedantic -O2
++
++# remove "-DHAS_MKSTEMP" if your OS doesn't support it
++CFLAGS = -Wall -pedantic -O2 -DHAS_MKSTEMP
  #CFLAGS = -Wall -O2 -g -DDEBUG
  
- # If you change these, please update the man-pages too
+-# If you change these, please update the man-pages too
  # Only absolute paths here, please
  SPOOLDIR = /var/spool/anacron
 -ANACRONTAB = /etc/anacrontab
@@ -22,94 +25,469 @@
  
  RELEASE = 2.3
  package_name = anacron-$(RELEASE)
-@@ -64,7 +64,7 @@
+@@ -47,7 +48,7 @@
+ objects = $(csources:.c=.o)
+ 
+ .PHONY: all
+-all: anacron
++all: anacron anacron.8 anacrontab.5
+ 
+ # This makefile generates header file dependencies auto-magically
+ %.d: %.c
+@@ -62,20 +63,27 @@
+ %.o : %.c
+ 	$(CC) -c $(ALL_CPPFLAGS) $(CFLAGS) $< -o $@
  
++anacron.8: anacron.8.in
++	sed -e 's|%%PREFIX%%|$(PREFIX)|g' $< > $@
++
++anacrontab.5: anacrontab.5.in
++	sed -e 's|%%PREFIX%%|$(PREFIX)|g' $< > $@
++
  .PHONY: installdirs
  installdirs:
 -	$(INSTALL_DIR) $(BINDIR) $(PREFIX)$(SPOOLDIR) \
+-		$(MANDIR)/man5 $(MANDIR)/man8
 +	$(INSTALL_DIR) $(BINDIR) $(SPOOLDIR) \
- 		$(MANDIR)/man5 $(MANDIR)/man8
++		$(MANDIR)/man5 $(MANDIR)/man8 $(PREFIX)/etc
  
  .PHONY: install
-@@ -72,6 +72,8 @@
+ install: installdirs
  	$(INSTALL_PROGRAM) anacron $(BINDIR)/anacron
  	$(INSTALL_DATA) anacrontab.5 $(MANDIR)/man5/anacrontab.5
  	$(INSTALL_DATA) anacron.8 $(MANDIR)/man8/anacron.8
 +	$(INSTALL_DATA) anacrontab.sample $(PREFIX)/etc/anacrontab.sample
-+	$(INSTALL_DATA) anacron.sh $(PREFIX)/etc/rc.d/anacron.sh
  
  .PHONY: clean
  clean:
+-	rm -f *.o *.d anacron
++	rm -f *.o *.d anacron.8 anacrontab.5 anacron
+ 
+ distclean: clean
+ 	rm -f *~
+diff -uN ../anacron-2.3/README ./README
+--- ../anacron-2.3/README	Fri Jun 23 00:32:43 2000
++++ ./README	Sun Jun  5 20:10:32 2005
+@@ -86,6 +86,10 @@
+ 
+  - Become root.  Type "make install".
+ 
++ - If you want to install anacron into a different directory than
++   /usr/local (say /opt), use "env PREFIX=/opt make" and
++   "env PREFIX=/opt make install" instead of simply make and make install.
++
+ 
+      Setup
+      -----
 diff -uN ../anacron-2.3/anacron.8 ./anacron.8
 --- ../anacron-2.3/anacron.8	Fri Jun 23 00:42:05 2000
-+++ ./anacron.8	Thu Aug 26 11:52:13 2004
-@@ -18,7 +18,7 @@
- usually controlled by \fBcron\fR.
- .PP
- When executed, Anacron reads a list of jobs from a configuration file, normally
++++ ./anacron.8	Thu Jan  1 01:00:00 1970
+@@ -1,147 +0,0 @@
+-.TH ANACRON 8 2000-06-22 "Sean 'Shaleh' Perry" "Anacron Users' Manual"
+-.SH NAME
+-anacron \- runs commands periodically
+-.SH SYNOPSIS
+-.B anacron \fR[\fB-s\fR] [\fB-f\fR] [\fB-n\fR] [\fB-d\fR] [\fB-q\fR]
+-[\fB-t anacrontab\fR] [\fIjob\fR] ...
+-.br
+-.B anacron -u [\fB-t anacrontab\fR] \fR[\fIjob\fR] ...
+-.br
+-.B anacron \fR[\fB-V\fR|\fB-h\fR]
+-.SH DESCRIPTION
+-Anacron
+-can be used to execute commands periodically, with a
+-frequency specified in days.  Unlike \fBcron(8)\fR,
+-it does not assume that the machine is running continuously.  Hence,
+-it can be used on machines that aren't running 24 hours a day,
+-to control daily, weekly, and monthly jobs that are
+-usually controlled by \fBcron\fR.
+-.PP
+-When executed, Anacron reads a list of jobs from a configuration file, normally
 -.I /etc/anacrontab
-+.I /usr/local/etc/anacrontab
- (see \fBanacrontab(5)\fR).  This file
- contains the list of jobs that Anacron controls.  Each
- job entry specifies a period in days, 
-@@ -84,7 +84,7 @@
- .TP
- .B -n
- Run jobs now.  Ignore the delay specifications in the
+-(see \fBanacrontab(5)\fR).  This file
+-contains the list of jobs that Anacron controls.  Each
+-job entry specifies a period in days, 
+-a delay in minutes, a unique
+-job identifier, and a shell command.
+-.PP
+-For each job, Anacron checks whether
+-this job has been executed in the last n days, where n is the period specified
+-for that job.  If not, Anacron runs the job's shell command, after waiting
+-for the number of minutes specified as the delay parameter.
+-.PP
+-After the command exits, Anacron records the date in a special
+-timestamp file for that job, so it can know when to execute it again.  Only
+-the date is used for the time
+-calculations.  The hour is not used.
+-.PP
+-When there are no more jobs to be run, Anacron exits.
+-.PP
+-Anacron only considers jobs whose identifier, as
+-specified in the \fIanacrontab\fR matches any of
+-the
+-.I job
+-command-line arguments.  The
+-.I job
+-arguments can be shell wildcard patterns (be sure to protect them from
+-your shell with adequate quoting).  Specifying no
+-.I job
+-arguments, is equivalent to specifying "*"  (That is, all jobs will be
+-considered).
+-.PP
+-Unless the \fB-d\fR option is given (see below), Anacron forks to the
+-background when it starts, and the parent process exits
+-immediately.
+-.PP
+-Unless the \fB-s\fR or \fB-n\fR options are given, Anacron starts jobs
+-immediately when their delay is over.  The execution of different jobs is
+-completely independent.
+-.PP
+-If a job generates any output on its standard output or standard error,
+-the output is mailed to the user running Anacron (usually root).
+-.PP
+-Informative messages about what Anacron is doing are sent to \fBsyslogd(8)\fR
+-under facility \fBcron\fR, priority \fBnotice\fR.  Error messages are sent at
+-priority \fBerror\fR.
+-.PP
+-"Active" jobs (i.e. jobs that Anacron already decided
+-to run and now wait for their delay to pass, and jobs that are currently
+-being executed by
+-Anacron), are "locked", so that other copies of Anacron won't run them
+-at the same time.
+-.SH OPTIONS
+-.TP
+-.B -f
+-Force execution of the jobs, ignoring the timestamps.
+-.TP
+-.B -u
+-Only update the timestamps of the jobs, to the current date, but
+-don't run anything.
+-.TP
+-.B -s
+-Serialize execution of jobs.  Anacron will not start a new job before the
+-previous one finished.
+-.TP
+-.B -n
+-Run jobs now.  Ignore the delay specifications in the
 -.I /etc/anacrontab
-+.I /usr/local/etc/anacrontab
- file.  This options implies \fB-s\fR.
- .TP
- .B -d
-@@ -117,7 +117,7 @@
- for more information.
- .SH FILES
- .TP
+-file.  This options implies \fB-s\fR.
+-.TP
+-.B -d
+-Don't fork to the background.  In this mode, Anacron will output informational
+-messages to standard error, as well as to syslog.  The output of jobs
+-is mailed as usual.
+-.TP
+-.B -q
+-Suppress messages to standard error.  Only applicable with \fB-d\fR.
+-.TP
+-.B -t anacrontab
+-Use specified anacrontab, rather than the default
+-.TP
+-.B -V
+-Print version information, and exit.
+-.TP
+-.B -h
+-Print short usage message, and exit.
+-.SH SIGNALS
+-After receiving a \fBSIGUSR1\fR signal, Anacron waits for running
+-jobs, if any, to finish and then exits.  This can be used to stop
+-Anacron cleanly.
+-.SH NOTES
+-Make sure that the time-zone is set correctly before Anacron is
+-started.  (The time-zone affects the date).  This is usually accomplished
+-by setting the TZ environment variable, or by installing a
+-.I /usr/lib/zoneinfo/localtime
+-file.  See
+-.B tzset(3)
+-for more information.
+-.SH FILES
+-.TP
 -.I /etc/anacrontab
-+.I /usr/local/etc/anacrontab
- Contains specifications of jobs.  See \fBanacrontab(5)\fR for a complete
- description.
- .TP
-diff -uN ../anacron-2.3/anacron.sh ./anacron.sh
---- ../anacron-2.3/anacron.sh	Thu Jan  1 01:00:00 1970
-+++ ./anacron.sh	Sun Nov 21 11:34:51 2004
-@@ -0,0 +1,18 @@
-+#!/bin/sh
-+#
-+#    initialization/shutdown script for anacron
-+
-+# PROVIDE: anacron
-+# REQUIRE: LOGIN
-+# KEYWORD: FreeBSD
-+
-+. /etc/rc.subr
-+
-+prefix=/usr/local
-+
-+name="anacron"
-+rcvar=`set_rcvar`
-+command="$prefix/sbin/anacron"
-+
-+load_rc_config $name
-+run_rc_command "$1"
+-Contains specifications of jobs.  See \fBanacrontab(5)\fR for a complete
+-description.
+-.TP
+-.I /var/spool/anacron
+-This directory is used by Anacron for storing timestamp files.
+-.SH "SEE ALSO"
+-.B anacrontab(5), cron(8), tzset(3)
+-.PP
+-The Anacron
+-.I README
+-file.
+-.SH BUGS
+-Anacron never removes timestamp files.  Remove unused files manually.
+-.PP
+-Anacron
+-uses up to two file descriptors for each active job.  It may run out of
+-descriptors if there are more than about 125 active jobs (on normal kernels).
+-.PP
+-Mail comments, suggestions and bug reports to Sean 'Shaleh' Perry <shaleh@(debian.org|valinux.com)>.
+-.SH AUTHOR
+-Anacron was originally conceived and implemented by Christian Schwarz
+-<schwarz@monet.m.isar.de>.
+-.PP
+-The current implementation is a complete rewrite by Itai Tzur
+-<itzur@actcom.co.il>.
+-.PP
+-The code base is currently maintained by Sean 'Shaleh' Perry <shaleh@(debian.org|valinux.com)>.
+diff -uN ../anacron-2.3/anacron.8.in ./anacron.8.in
+--- ../anacron-2.3/anacron.8.in	Thu Jan  1 01:00:00 1970
++++ ./anacron.8.in	Sun Jun  5 13:54:59 2005
+@@ -0,0 +1,147 @@
++.TH ANACRON 8 2000-06-22 "Sean 'Shaleh' Perry" "Anacron Users' Manual"
++.SH NAME
++anacron \- runs commands periodically
++.SH SYNOPSIS
++.B anacron \fR[\fB-s\fR] [\fB-f\fR] [\fB-n\fR] [\fB-d\fR] [\fB-q\fR]
++[\fB-t anacrontab\fR] [\fIjob\fR] ...
++.br
++.B anacron -u [\fB-t anacrontab\fR] \fR[\fIjob\fR] ...
++.br
++.B anacron \fR[\fB-V\fR|\fB-h\fR]
++.SH DESCRIPTION
++Anacron
++can be used to execute commands periodically, with a
++frequency specified in days.  Unlike \fBcron(8)\fR,
++it does not assume that the machine is running continuously.  Hence,
++it can be used on machines that aren't running 24 hours a day,
++to control daily, weekly, and monthly jobs that are
++usually controlled by \fBcron\fR.
++.PP
++When executed, Anacron reads a list of jobs from a configuration file, normally
++.I %%PREFIX%%/etc/anacrontab
++(see \fBanacrontab(5)\fR).  This file
++contains the list of jobs that Anacron controls.  Each
++job entry specifies a period in days, 
++a delay in minutes, a unique
++job identifier, and a shell command.
++.PP
++For each job, Anacron checks whether
++this job has been executed in the last n days, where n is the period specified
++for that job.  If not, Anacron runs the job's shell command, after waiting
++for the number of minutes specified as the delay parameter.
++.PP
++After the command exits, Anacron records the date in a special
++timestamp file for that job, so it can know when to execute it again.  Only
++the date is used for the time
++calculations.  The hour is not used.
++.PP
++When there are no more jobs to be run, Anacron exits.
++.PP
++Anacron only considers jobs whose identifier, as
++specified in the \fIanacrontab\fR matches any of
++the
++.I job
++command-line arguments.  The
++.I job
++arguments can be shell wildcard patterns (be sure to protect them from
++your shell with adequate quoting).  Specifying no
++.I job
++arguments, is equivalent to specifying "*"  (That is, all jobs will be
++considered).
++.PP
++Unless the \fB-d\fR option is given (see below), Anacron forks to the
++background when it starts, and the parent process exits
++immediately.
++.PP
++Unless the \fB-s\fR or \fB-n\fR options are given, Anacron starts jobs
++immediately when their delay is over.  The execution of different jobs is
++completely independent.
++.PP
++If a job generates any output on its standard output or standard error,
++the output is mailed to the user running Anacron (usually root).
++.PP
++Informative messages about what Anacron is doing are sent to \fBsyslogd(8)\fR
++under facility \fBcron\fR, priority \fBnotice\fR.  Error messages are sent at
++priority \fBerror\fR.
++.PP
++"Active" jobs (i.e. jobs that Anacron already decided
++to run and now wait for their delay to pass, and jobs that are currently
++being executed by
++Anacron), are "locked", so that other copies of Anacron won't run them
++at the same time.
++.SH OPTIONS
++.TP
++.B -f
++Force execution of the jobs, ignoring the timestamps.
++.TP
++.B -u
++Only update the timestamps of the jobs, to the current date, but
++don't run anything.
++.TP
++.B -s
++Serialize execution of jobs.  Anacron will not start a new job before the
++previous one finished.
++.TP
++.B -n
++Run jobs now.  Ignore the delay specifications in the
++.I %%PREFIX%%/etc/anacrontab
++file.  This options implies \fB-s\fR.
++.TP
++.B -d
++Don't fork to the background.  In this mode, Anacron will output informational
++messages to standard error, as well as to syslog.  The output of jobs
++is mailed as usual.
++.TP
++.B -q
++Suppress messages to standard error.  Only applicable with \fB-d\fR.
++.TP
++.B -t anacrontab
++Use specified anacrontab, rather than the default
++.TP
++.B -V
++Print version information, and exit.
++.TP
++.B -h
++Print short usage message, and exit.
++.SH SIGNALS
++After receiving a \fBSIGUSR1\fR signal, Anacron waits for running
++jobs, if any, to finish and then exits.  This can be used to stop
++Anacron cleanly.
++.SH NOTES
++Make sure that the time-zone is set correctly before Anacron is
++started.  (The time-zone affects the date).  This is usually accomplished
++by setting the TZ environment variable, or by installing a
++.I /usr/lib/zoneinfo/localtime
++file.  See
++.B tzset(3)
++for more information.
++.SH FILES
++.TP
++.I %%PREFIX%%/etc/anacrontab
++Contains specifications of jobs.  See \fBanacrontab(5)\fR for a complete
++description.
++.TP
++.I /var/spool/anacron
++This directory is used by Anacron for storing timestamp files.
++.SH "SEE ALSO"
++.B anacrontab(5), cron(8), tzset(3)
++.PP
++The Anacron
++.I README
++file.
++.SH BUGS
++Anacron never removes timestamp files.  Remove unused files manually.
++.PP
++Anacron
++uses up to two file descriptors for each active job.  It may run out of
++descriptors if there are more than about 125 active jobs (on normal kernels).
++.PP
++Mail comments, suggestions and bug reports to Sean 'Shaleh' Perry <shaleh@(debian.org|valinux.com)>.
++.SH AUTHOR
++Anacron was originally conceived and implemented by Christian Schwarz
++<schwarz@monet.m.isar.de>.
++.PP
++The current implementation is a complete rewrite by Itai Tzur
++<itzur@actcom.co.il>.
++.PP
++The code base is currently maintained by Sean 'Shaleh' Perry <shaleh@(debian.org|valinux.com)>.
 diff -uN ../anacron-2.3/anacrontab.5 ./anacrontab.5
 --- ../anacron-2.3/anacrontab.5	Wed Jun 21 01:12:18 2000
-+++ ./anacrontab.5	Thu Aug 26 11:52:13 2004
-@@ -1,9 +1,9 @@
- .TH ANACRONTAB 5 1998-02-02 "Itai Tzur" "Anacron Users' Manual"
- .SH NAME
++++ ./anacrontab.5	Thu Jan  1 01:00:00 1970
+@@ -1,48 +0,0 @@
+-.TH ANACRONTAB 5 1998-02-02 "Itai Tzur" "Anacron Users' Manual"
+-.SH NAME
 -/etc/anacrontab \- configuration file for anacron
-+/usr/local/etc/anacrontab \- configuration file for anacron
- .SH DESCRIPTION
- The file
+-.SH DESCRIPTION
+-The file
 -.I /etc/anacrontab
-+.I /usr/local/etc/anacrontab
- describes the jobs controlled by \fBanacron(8)\fR.  Its lines can be of
- three kinds:  job-description lines, environment
- assignments, or empty lines.
+-describes the jobs controlled by \fBanacron(8)\fR.  Its lines can be of
+-three kinds:  job-description lines, environment
+-assignments, or empty lines.
+-.PP
+-Job-description lines are of the form:
+-.PP
+-   period  delay  job-identifier  command
+-.PP
+-The
+-.I period
+-is specified in days, the
+-.I delay
+-in minutes.  The
+-.I job-identifier
+-can contain any non-blank character, except slashes.  It is used to identify
+-the job in Anacron messages,
+-and as the name for the job's timestamp file.  The
+-.I command
+-can be any shell command.
+-.PP
+-Environment assignment lines are of the form:
+-.PP
+-   VAR = VALUE
+-.PP
+-Spaces around
+-.I VAR
+-are removed.  No spaces around
+-.I VALUE
+-are allowed (unless you want them to be part of the value).  The assignment
+-takes effect from the next line to the end of the file, or to the next
+-assignment of the same variable.
+-.PP
+-Empty lines are either blank lines, line containing white-space only, or
+-lines with white-space followed by a '#' followed by an arbitrary comment.
+-.SH "SEE ALSO"
+-.B anacron(8)
+-.PP
+-The Anacron
+-.I README
+-file.
+-.SH AUTHOR
+-Itai Tzur <itzur@actcom.co.il>
+diff -uN ../anacron-2.3/anacrontab.5.in ./anacrontab.5.in
+--- ../anacron-2.3/anacrontab.5.in	Thu Jan  1 01:00:00 1970
++++ ./anacrontab.5.in	Sun Jun  5 13:55:25 2005
+@@ -0,0 +1,48 @@
++.TH ANACRONTAB 5 1998-02-02 "Itai Tzur" "Anacron Users' Manual"
++.SH NAME
++%%PREFIX%%/etc/anacrontab \- configuration file for anacron
++.SH DESCRIPTION
++The file
++.I %%PREFIX%%/etc/anacrontab
++describes the jobs controlled by \fBanacron(8)\fR.  Its lines can be of
++three kinds:  job-description lines, environment
++assignments, or empty lines.
++.PP
++Job-description lines are of the form:
++.PP
++   period  delay  job-identifier  command
++.PP
++The
++.I period
++is specified in days, the
++.I delay
++in minutes.  The
++.I job-identifier
++can contain any non-blank character, except slashes.  It is used to identify
++the job in Anacron messages,
++and as the name for the job's timestamp file.  The
++.I command
++can be any shell command.
++.PP
++Environment assignment lines are of the form:
++.PP
++   VAR = VALUE
++.PP
++Spaces around
++.I VAR
++are removed.  No spaces around
++.I VALUE
++are allowed (unless you want them to be part of the value).  The assignment
++takes effect from the next line to the end of the file, or to the next
++assignment of the same variable.
++.PP
++Empty lines are either blank lines, line containing white-space only, or
++lines with white-space followed by a '#' followed by an arbitrary comment.
++.SH "SEE ALSO"
++.B anacron(8)
++.PP
++The Anacron
++.I README
++file.
++.SH AUTHOR
++Itai Tzur <itzur@actcom.co.il>
 diff -uN ../anacron-2.3/anacrontab.sample ./anacrontab.sample
 --- ../anacron-2.3/anacrontab.sample	Thu Jan  1 01:00:00 1970
-+++ ./anacrontab.sample	Thu Aug 26 11:52:13 2004
++++ ./anacrontab.sample	Sat May  3 20:14:43 2003
 @@ -0,0 +1,12 @@
 +
 +PATH=/bin:/sbin:/usr/bin:/usr/sbin
@@ -125,7 +503,7 @@
 +
 diff -uN ../anacron-2.3/gregor.c ./gregor.c
 --- ../anacron-2.3/gregor.c	Fri Jun 23 00:50:40 2000
-+++ ./gregor.c	Thu Aug 26 12:00:36 2004
++++ ./gregor.c	Fri Aug 13 10:02:09 2004
 @@ -65,7 +65,7 @@
  {
      int dn;
@@ -135,10 +513,43 @@
  
      /* Some validity checks */
  
+diff -uN ../anacron-2.3/log.c ./log.c
+--- ../anacron-2.3/log.c	Fri Jun 23 00:55:13 2000
++++ ./log.c	Fri Aug 13 10:09:17 2004
+@@ -37,6 +37,7 @@
+ #include <unistd.h>
+ #include <syslog.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <stdarg.h>
+ #include <errno.h>
+ #include <signal.h>
+diff -uN ../anacron-2.3/main.c ./main.c
+--- ../anacron-2.3/main.c	Fri Jun 23 00:58:07 2000
++++ ./main.c	Fri Aug 13 10:18:12 2004
+@@ -24,6 +24,7 @@
+ 
+ #include <time.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <unistd.h>
+ #include <signal.h>
+ #include <fcntl.h>
+@@ -82,8 +83,8 @@
+ 	   " -t  Use this anacrontab\n"
+ 	   " -V  Print version information\n"
+ 	   " -h  Print this message\n"
+-	   "\n"
+-	   "See the manpage for more details.\n"
++	   "\n");
++    printf("See the manpage for more details.\n"
+ 	   "\n");
+ }
+ 
 diff -uN ../anacron-2.3/matchrx.c ./matchrx.c
 --- ../anacron-2.3/matchrx.c	Wed Jun 21 01:12:18 2000
-+++ ./matchrx.c	Thu Aug 26 11:52:13 2004
-@@ -23,6 +23,7 @@
++++ ./matchrx.c	Fri Aug 13 10:17:30 2004
+@@ -23,9 +23,11 @@
  
  
  #include <stdio.h>
@@ -146,9 +557,13 @@
  #include <regex.h>
  #include <stdarg.h>
  #include <stdlib.h>
++#include <string.h>
+ #include "matchrx.h"
+ 
+ int
 diff -uN ../anacron-2.3/readtab.c ./readtab.c
 --- ../anacron-2.3/readtab.c	Fri Jun 23 00:13:12 2000
-+++ ./readtab.c	Thu Aug 26 11:52:13 2004
++++ ./readtab.c	Mon Aug 25 16:46:18 2003
 @@ -19,6 +19,11 @@
   
      The GNU General Public License can also be found in the file
@@ -308,3 +723,28 @@
  
      /* sort the jobs */
      qsort(job_array, njobs, sizeof(*job_array),
+diff -uN ../anacron-2.3/runjob.c ./runjob.c
+--- ../anacron-2.3/runjob.c	Wed Jun 21 01:12:18 2000
++++ ./runjob.c	Sun Jun  5 20:38:13 2005
+@@ -39,6 +39,13 @@
+ temp_file()
+ /* Open a temporary file and return its file descriptor */
+ {
++#if HAS_MKSTEMP
++    int fd;
++    char template[20] = "/tmp/anacronXXXXXX";
++    fd = mkstemp(template);
++    if (fd == -1) die_e("Can't open temporary file");
++    unlink(template);
++#else
+     const int max_retries = 50;
+     char *name;
+     int fd, i;
+@@ -59,6 +66,7 @@
+     if (fd == -1) die_e("Can't open temporary file");
+     if (unlink(name)) die_e("Can't unlink temporary file");
+     free(name);
++#endif
+     fcntl(fd, F_SETFD, 1);    /* set close-on-exec flag */
+     return fd;
+ }

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



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