aboutsummaryrefslogtreecommitdiff
path: root/sysutils/fcron
diff options
context:
space:
mode:
authorJean-Yves Lefort <jylefort@FreeBSD.org>2005-10-04 17:54:23 +0000
committerJean-Yves Lefort <jylefort@FreeBSD.org>2005-10-04 17:54:23 +0000
commite6ee415d32a0ca52a3522a462e9bd7a7749251db (patch)
tree04f59169b99031512094406cd1b3bad700e950ab /sysutils/fcron
parent07fc24d77c4a82a82ec602d2e2c148356eb26984 (diff)
downloadports-e6ee415d32a0ca52a3522a462e9bd7a7749251db.tar.gz
ports-e6ee415d32a0ca52a3522a462e9bd7a7749251db.zip
- Update to 3.0.0
- Pass maintainership to submitter PR: ports/85817 Submitted by: Brad Huntting <huntting@hunkular.glarp.com> (new maintainer)
Notes
Notes: svn path=/head/; revision=144194
Diffstat (limited to 'sysutils/fcron')
-rw-r--r--sysutils/fcron/Makefile66
-rw-r--r--sysutils/fcron/distinfo4
-rw-r--r--sysutils/fcron/files/fcron.in19
-rw-r--r--sysutils/fcron/files/fcrontab-operator9
-rw-r--r--sysutils/fcron/files/fcrontab-root20
-rw-r--r--sysutils/fcron/files/patch-Makefile.in29
-rw-r--r--sysutils/fcron/files/patch-conf.c9
-rw-r--r--sysutils/fcron/files/patch-configure20
-rw-r--r--sysutils/fcron/files/patch-configure.in22
-rw-r--r--sysutils/fcron/files/patch-script::boot-install11
-rw-r--r--sysutils/fcron/files/pkg-message.in14
-rw-r--r--sysutils/fcron/pkg-deinstall21
-rw-r--r--sysutils/fcron/pkg-descr2
-rw-r--r--sysutils/fcron/pkg-install37
-rw-r--r--sysutils/fcron/pkg-message5
-rw-r--r--sysutils/fcron/pkg-plist21
16 files changed, 191 insertions, 118 deletions
diff --git a/sysutils/fcron/Makefile b/sysutils/fcron/Makefile
index b3b3ea9741f4..54cc3204f3b7 100644
--- a/sysutils/fcron/Makefile
+++ b/sysutils/fcron/Makefile
@@ -7,48 +7,60 @@
#
PORTNAME= fcron
-PORTVERSION= 2.1.0
+PORTVERSION= 3.0.0
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SUNSITE} \
http://fcron.free.fr/
MASTER_SITE_SUBDIR= system/daemons/cron
DISTNAME= ${PORTNAME}-${PORTVERSION}.src
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Fcron is a periodical command scheduler
+MAINTAINER= huntting@glarp.com
+COMMENT= A periodic command scheduler
-NO_PACKAGE= "Runaway package build"
-
-USE_AUTOCONF_VER= 213
-USE_PERL5= yes
+GNU_CONFIGURE= yes
+USE_GMAKE= yes
+USE_PERL5_BUILD= yes
CONFIGURE_ARGS= --with-etcdir=${PREFIX}/etc --with-cflags="${CFLAGS}" \
--with-rootname=root --with-rootgroup=wheel \
- --with-answer-all=yes
+ --with-docdir=${DOCSDIR}
-.if !defined(NOPORTDOCS)
-CONFIGURE_ARGS+= --with-docdir=${DOCSDIR}
-PLIST_SUB= PORTVERSION=${PORTVERSION}
-.endif
+WRKSRC= ${WRKDIR}/fcron-${PORTVERSION}
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+USE_RC_SUBR= fcron
+SUB_FILES= pkg-message
-MAN1= fcrontab.1
-MAN3= bitstring.3
-MAN5= fcrontab.5 fcron.conf.5
-MAN8= fcron.8
+MAN1= fcrondyn.1 fcrontab.1
+MAN3= bitstring.3
+MAN5= fcron.conf.5 fcrontab.5
+MAN8= fcron.8
-post-install:
+PORTDOCS= *
+
+pre-su-install:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/fcron ${PREFIX}/sbin
+ ${INSTALL_PROGRAM} -g fcron -o fcron -m 6111 ${WRKSRC}/fcrontab ${PREFIX}/bin
+ ${INSTALL_PROGRAM} -g fcron -m 4110 ${WRKSRC}/fcronsighup ${PREFIX}/bin
+ ${INSTALL_PROGRAM} -g fcron -o fcron -m 6111 ${WRKSRC}/fcrondyn ${PREFIX}/bin
+.for f in fcron.allow fcron.conf fcron.deny
+ ${INSTALL_DATA} -g fcron -m 640 ${WRKSRC}/files/${f} ${PREFIX}/etc/${f}.dist
+.endfor
+ ${MKDIR} ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${FILESDIR}/fcrontab-* ${WRKSRC}/files/*.pam ${EXAMPLESDIR}
+.for n in 1 3 5 8
+ ${INSTALL_MAN} ${MAN${n}:S|^|${WRKSRC}/doc/man/|} ${PREFIX}/man/man${n}
+.endfor
.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/doc/FAQ ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/files/fcron.pam ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/files/fcrontab.pam ${DOCSDIR}
-.endif
-.for i in allow deny conf
-.if !exists(${PREFIX}/etc/fcron.$i)
- @${CP} -p ${PREFIX}/etc/fcron.$i.dist ${PREFIX}/etc/fcron.$i
+. for d in txt HTML
+ ${MKDIR} ${DOCSDIR}/${d}
+ ${INSTALL_DATA} ${WRKSRC}/doc/${d}/* ${DOCSDIR}/${d}
+. endfor
.endif
-.endfor
+
+post-install:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/sysutils/fcron/distinfo b/sysutils/fcron/distinfo
index f89e9d93a702..6a1a86fca7ce 100644
--- a/sysutils/fcron/distinfo
+++ b/sysutils/fcron/distinfo
@@ -1,2 +1,2 @@
-MD5 (fcron-2.1.0.src.tar.gz) = 054a21772e06ea9b37243c34d38fd9fb
-SIZE (fcron-2.1.0.src.tar.gz) = 147802
+MD5 (fcron-3.0.0.src.tar.gz) = 55e92f8536c8b52c9b73b96a6a3e0fe3
+SIZE (fcron-3.0.0.src.tar.gz) = 409015
diff --git a/sysutils/fcron/files/fcron.in b/sysutils/fcron/files/fcron.in
new file mode 100644
index 000000000000..4f5dcc660492
--- /dev/null
+++ b/sysutils/fcron/files/fcron.in
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: fcron
+# REQUIRE: LOGIN
+# BEFORE: securelevel
+# KEYWORD: shutdown
+
+. %%RC_SUBR%%
+
+name="fcron"
+rcvar="`set_rcvar`"
+command="%%PREFIX%%/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/sysutils/fcron/files/fcrontab-operator b/sysutils/fcron/files/fcrontab-operator
new file mode 100644
index 000000000000..2eb01377e355
--- /dev/null
+++ b/sysutils/fcron/files/fcrontab-operator
@@ -0,0 +1,9 @@
+# Derived from the default /etc/crontab for FreeBSD
+# See fcrontab(5) for syntax and semantics
+#
+SHELL=/bin/sh
+PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
+HOME=/var/log
+#
+# Save some entropy so that /dev/random can re-seed on boot.
+@ 11 /usr/libexec/save-entropy
diff --git a/sysutils/fcron/files/fcrontab-root b/sysutils/fcron/files/fcrontab-root
new file mode 100644
index 000000000000..e5d366664a56
--- /dev/null
+++ b/sysutils/fcron/files/fcrontab-root
@@ -0,0 +1,20 @@
+# Derived from the default /etc/crontab for FreeBSD
+# See fcrontab(5) for syntax and semantics
+#
+SHELL=/bin/sh
+PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
+HOME=/var/log
+#
+@serial,lavg5(1.5) 5 /usr/libexec/atrun
+#
+# Rotate log files every hour, if necessary.
+%hourly * newsyslog
+#
+# Perform daily/weekly/monthly maintenance.
+%daily,serial * * periodic daily
+%weekly,serial * * periodic weekly
+%monthly,serial * * * periodic monthly
+#
+# Adjust the time zone if the CMOS clock keeps local time, as opposed to
+# UTC time. See adjkerntz(8) for details.
+1,31 0-5 * * * root adjkerntz -a
diff --git a/sysutils/fcron/files/patch-Makefile.in b/sysutils/fcron/files/patch-Makefile.in
deleted file mode 100644
index 0c31473ce67a..000000000000
--- a/sysutils/fcron/files/patch-Makefile.in
+++ /dev/null
@@ -1,29 +0,0 @@
---- Makefile.in.org Wed Jan 23 21:49:55 2002
-+++ Makefile.in Wed Jan 23 21:50:52 2002
-@@ -102,23 +102,20 @@
- if test ! -d $(DESTMAN)/man3; then $(INSTALL) -g $(ROOTGROUP) -o $(ROOTNAME) -m 755 -d $(DESTMAN)/man3 ; fi
- if test ! -d $(DESTMAN)/man5; then $(INSTALL) -g $(ROOTGROUP) -o $(ROOTNAME) -m 755 -d $(DESTMAN)/man5 ; fi
- if test ! -d $(DESTMAN)/man8; then $(INSTALL) -g $(ROOTGROUP) -o $(ROOTNAME) -m 755 -d $(DESTMAN)/man8 ; fi
-- if test ! -d $(DESTDOC)/fcron-$(VERSION); then $(INSTALL) -g $(ROOTGROUP) -o $(ROOTNAME) -m 755 -d $(DESTDOC)/fcron-$(VERSION) ; fi
- # create the spool dir (and change its mode if it already exists)
- $(INSTALL) -g $(GROUPNAME) -o $(USERNAME) -m 770 -d $(FCRONTABS)
-
- $(INSTALL) -g $(ROOTGROUP) -o $(ROOTNAME) -m 110 -s fcron $(DESTSBIN)
- $(INSTALL) -g $(GROUPNAME) -o $(USERNAME) -m 6111 -s fcrontab $(DESTBIN)
- $(INSTALL) -g $(ROOTGROUP) -o $(ROOTNAME) -m 6111 -s fcronsighup $(DESTBIN)
-- test -f $(ETC)/fcron.allow || test -f $(ETC)/fcron.deny || $(INSTALL) -m 640 -o $(ROOTNAME) -g $(GROUPNAME) $(SRCDIR)/files/fcron.allow $(SRCDIR)/files/fcron.deny $(ETC)
-- test -f $(ETC)/fcron.conf || $(INSTALL) -m 640 -o $(ROOTNAME) -g $(GROUPNAME) $(SRCDIR)/files/fcron.conf $(ETC)
-- test "${USEPAM}" = "0" || $(SRCDIR)/script/install-pam-conf $(SRCDIR) $(ETC) $(ROOTNAME) $(ROOTGROUP) "$(INSTALL)"
-+ $(INSTALL) -m 640 -o $(ROOTNAME) -g $(GROUPNAME) $(SRCDIR)/files/fcron.allow $(ETC)/fcron.allow.dist
-+ $(INSTALL) -m 640 -o $(ROOTNAME) -g $(GROUPNAME) $(SRCDIR)/files/fcron.deny $(ETC)/fcron.deny.dist
-+ $(INSTALL) -m 640 -o $(ROOTNAME) -g $(GROUPNAME) $(SRCDIR)/files/fcron.conf $(ETC)/fcron.conf.dist
- $(INSTALL) -m 644 -o $(ROOTNAME) $(SRCDIR)/doc/fcron.8 $(DESTMAN)/man8
- $(INSTALL) -m 644 -o $(ROOTNAME) $(SRCDIR)/doc/fcrontab.1 $(DESTMAN)/man1
- $(INSTALL) -m 644 -o $(ROOTNAME) $(SRCDIR)/doc/fcrontab.5 $(DESTMAN)/man5
- $(INSTALL) -m 644 -o $(ROOTNAME) $(SRCDIR)/doc/fcron.conf.5 $(DESTMAN)/man5
- $(INSTALL) -m 644 -o $(ROOTNAME) $(SRCDIR)/doc/bitstring.3 $(DESTMAN)/man3
-- $(INSTALL) -m 644 -o $(ROOTNAME) doc/README doc/LICENSE doc/CHANGES doc/*.html \
-- $(DESTDOC)/fcron-$(VERSION)/
-
- # in order to get correct rights when upgrading :
- find $(FCRONTABS) -type f \( -name "*.orig" -a ! -name "root.orig" \) -exec chown $(USERNAME):$(GROUPNAME) {} \; -exec chmod 640 {} \;
diff --git a/sysutils/fcron/files/patch-conf.c b/sysutils/fcron/files/patch-conf.c
deleted file mode 100644
index 081565cff8d3..000000000000
--- a/sysutils/fcron/files/patch-conf.c
+++ /dev/null
@@ -1,9 +0,0 @@
---- conf.c.orig Tue Dec 7 11:44:09 2004
-+++ conf.c Tue Dec 7 11:44:32 2004
-@@ -1086,5 +1086,6 @@
- break ;
-
- next_file:
-+ ;
- }
- }
diff --git a/sysutils/fcron/files/patch-configure b/sysutils/fcron/files/patch-configure
new file mode 100644
index 000000000000..aeb8d51e9702
--- /dev/null
+++ b/sysutils/fcron/files/patch-configure
@@ -0,0 +1,20 @@
+--- configure.orig Tue Oct 4 18:39:16 2005
++++ configure Tue Oct 4 18:42:04 2005
+@@ -11767,17 +11767,9 @@
+ fi
+ ;;
+ *)
+- if test -d "$withval"; then
+ etcdir="$withval"
+ echo "$as_me:$LINENO: result: $withval" >&5
+ echo "${ECHO_T}$withval" >&6
+- else
+- { { echo "$as_me:$LINENO: error:
+-Directory $withval does not exist" >&5
+-echo "$as_me: error:
+-Directory $withval does not exist" >&2;}
+- { (exit 1); exit 1; }; }
+- fi
+ ;;
+ esac
+ else
diff --git a/sysutils/fcron/files/patch-configure.in b/sysutils/fcron/files/patch-configure.in
deleted file mode 100644
index aa6c0362f6e1..000000000000
--- a/sysutils/fcron/files/patch-configure.in
+++ /dev/null
@@ -1,22 +0,0 @@
---- configure.in.orig Sun Jul 8 07:32:17 2001
-+++ configure.in Sat Aug 25 14:36:05 2001
-@@ -201,13 +201,13 @@
- fi
- ;;
- *)
-- if test -d "$withval"; then
-+# if test -d "$withval"; then
- etcdir="$withval"
-- AC_MSG_RESULT($withval)
-- else
-- AC_MSG_ERROR([
--Directory $withval does not exist])
-- fi
-+# AC_MSG_RESULT($withval)
-+# else
-+# AC_MSG_ERROR([
-+#Directory $withval does not exist])
-+# fi
- ;;
- esac ],
- if test -d "/etc"; then
diff --git a/sysutils/fcron/files/patch-script::boot-install b/sysutils/fcron/files/patch-script::boot-install
deleted file mode 100644
index 5cd5ceab6f6e..000000000000
--- a/sysutils/fcron/files/patch-script::boot-install
+++ /dev/null
@@ -1,11 +0,0 @@
---- script/boot-install.orig Fri Jul 20 14:44:40 2001
-+++ script/boot-install Fri Jul 20 14:44:48 2001
-@@ -11,7 +11,7 @@
- # the automatic answer
- # the src dir
-
--PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin"
-+PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin"
- if test -d /usr/ucb; then
- PATH=/usr/ucb:$PATH
- fi
diff --git a/sysutils/fcron/files/pkg-message.in b/sysutils/fcron/files/pkg-message.in
new file mode 100644
index 000000000000..04257be00f2b
--- /dev/null
+++ b/sysutils/fcron/files/pkg-message.in
@@ -0,0 +1,14 @@
+===============================================================================
+To enable fcron, and disable the default system cron, add the following lines
+to your /etc/rc.conf:
+
+ fcron_enable="YES"
+ cron_enable="NO"
+
+and move any jobs in /etc/crontab to the root fcrontab(5) file. See:
+
+%%EXAMPLESDIR%%
+
+for a translation of the default FreeBSD /etc/crontab, and for sample PAM
+configuration files.
+===============================================================================
diff --git a/sysutils/fcron/pkg-deinstall b/sysutils/fcron/pkg-deinstall
new file mode 100644
index 000000000000..c57341fd829f
--- /dev/null
+++ b/sysutils/fcron/pkg-deinstall
@@ -0,0 +1,21 @@
+#!/bin/sh
+if [ "$2" = DEINSTALL ]; then
+ echo "==============================================================================="
+ echo "If you are permanently removing this port:"
+ echo ""
+ echo "- You should manually remove the fcron user and group."
+
+ /bin/rmdir /var/spool/fcron 2>/dev/null
+ if [ -d /var/spool/fcron ]; then
+ echo "- You should manually remove the /var/spool/fcron directory."
+ fi
+
+ for f in fcron.allow fcron.conf fcron.deny; do
+ if /usr/bin/cmp -s $PKG_PREFIX/etc/$f $PKG_PREFIX/etc/$f.dist; then
+ /bin/rm -f $PKG_PREFIX/etc/$f
+ else
+ echo "- You should manually remove the $PKG_PREFIX/etc/$f file."
+ fi
+ done
+ echo "==============================================================================="
+fi
diff --git a/sysutils/fcron/pkg-descr b/sysutils/fcron/pkg-descr
index 62236f3761a7..d9084e75498e 100644
--- a/sysutils/fcron/pkg-descr
+++ b/sysutils/fcron/pkg-descr
@@ -8,4 +8,6 @@ one command at a given date and hour and to make it run a command
according to its time of execution, which is normally the same as
system up time.
+This is the stable release.
+
WWW: http://fcron.free.fr/
diff --git a/sysutils/fcron/pkg-install b/sysutils/fcron/pkg-install
new file mode 100644
index 000000000000..3a6569b54282
--- /dev/null
+++ b/sysutils/fcron/pkg-install
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+if [ "$2" = PRE-INSTALL ]; then
+ user=fcron
+ group=fcron
+
+ if /usr/sbin/pw groupshow $group 2>/dev/null; then
+ echo "Using already existing group \"$group\"."
+ else
+ if /usr/sbin/pw groupadd $group; then
+ echo "Added group \"$group\"."
+ else
+ echo "Unable to add group \"$group\"."
+ echo "Please create it manually and try again."
+ exit 1
+ fi
+ fi
+
+ if /usr/sbin/pw usershow $user 2>/dev/null; then
+ echo "Using already existing user \"$user\"."
+ else
+ if /usr/sbin/pw useradd $user -g $group -c "fcron pseudo-user"; then
+ echo "Added user \"$user\"."
+ else
+ echo "Unable to add user \"$user\"."
+ echo "Please create it manually and try again."
+ exit 1
+ fi
+ fi
+elif [ "$2" = POST-INSTALL ]; then
+ /usr/bin/install -o fcron -g fcron -m 770 -d /var/spool/fcron
+
+ for f in fcron.allow fcron.conf fcron.deny; do
+ /usr/bin/install -o root -g fcron -m 640 \
+ $PKG_PREFIX/etc/$f.dist $PKG_PREFIX/etc/$f
+ done
+fi
diff --git a/sysutils/fcron/pkg-message b/sysutils/fcron/pkg-message
deleted file mode 100644
index 27df0b2f9ab2..000000000000
--- a/sysutils/fcron/pkg-message
+++ /dev/null
@@ -1,5 +0,0 @@
-
-This new version of fcron uses PAM support for authentication.
-Please refer to the fcron.pam and fcrontab.pam files in the
-documentation directory for configuring PAM.
-
diff --git a/sysutils/fcron/pkg-plist b/sysutils/fcron/pkg-plist
index 890e3eaa4892..4a545241d7ae 100644
--- a/sysutils/fcron/pkg-plist
+++ b/sysutils/fcron/pkg-plist
@@ -1,17 +1,12 @@
+bin/fcrondyn
bin/fcronsighup
bin/fcrontab
-sbin/fcron
-@unexec if cmp -s %D/etc/fcron.allow %D/etc/fcron.allow.dist; then rm -f %D/etc/fcron.allow; fi
etc/fcron.allow.dist
-@exec [ -f %B/fcron.allow ] || cp %B/%f %B/fcron.allow
-@unexec if cmp -s %D/etc/fcron.deny %D/etc/fcron.deny.dist; then rm -f %D/etc/fcron.deny; fi
-etc/fcron.deny.dist
-@exec [ -f %B/fcron.deny ] || cp %B/%f %B/fcron.deny
-@unexec if cmp -s %D/etc/fcron.conf %D/etc/fcron.conf.dist; then rm -f %D/etc/fcron.conf; fi
etc/fcron.conf.dist
-@exec [ -f %B/fcron.conf ] || cp %B/%f %B/fcron.conf
-etc/rc.d/fcron.sh
-%%PORTDOCS%%share/doc/fcron/FAQ
-%%PORTDOCS%%share/doc/fcron/fcron.pam
-%%PORTDOCS%%share/doc/fcron/fcrontab.pam
-%%PORTDOCS%%@unexec rmdir %D/share/doc/fcron 2>/dev/null || true
+etc/fcron.deny.dist
+sbin/fcron
+%%EXAMPLESDIR%%/fcron.pam
+%%EXAMPLESDIR%%/fcrontab-operator
+%%EXAMPLESDIR%%/fcrontab-root
+%%EXAMPLESDIR%%/fcrontab.pam
+@dirrm %%EXAMPLESDIR%%