diff options
author | Wolfram Schlich <wschlich@gentoo.org> | 2006-06-20 19:44:58 +0000 |
---|---|---|
committer | Wolfram Schlich <wschlich@gentoo.org> | 2006-06-20 19:44:58 +0000 |
commit | fb895e4f393516deda0c6e257bf1784dd0a49b3c (patch) | |
tree | b086b8db2df3001c7e4d2b1ccfb3df38bf7f3439 /sys-process | |
parent | Fixed bug #135940 - broken --exit-code command-line option (diff) | |
download | gentoo-2-fb895e4f393516deda0c6e257bf1784dd0a49b3c.tar.gz gentoo-2-fb895e4f393516deda0c6e257bf1784dd0a49b3c.tar.bz2 gentoo-2-fb895e4f393516deda0c6e257bf1784dd0a49b3c.zip |
fixing doc file installation, new init script supporting multiple instances (like the openvpn one)
(Portage version: 2.1_rc4-r1)
Diffstat (limited to 'sys-process')
-rw-r--r-- | sys-process/fcron/ChangeLog | 9 | ||||
-rw-r--r-- | sys-process/fcron/fcron-3.0.1-r1.ebuild | 136 | ||||
-rw-r--r-- | sys-process/fcron/files/digest-fcron-3.0.1-r1 | 3 | ||||
-rwxr-xr-x | sys-process/fcron/files/fcron.init | 50 |
4 files changed, 197 insertions, 1 deletions
diff --git a/sys-process/fcron/ChangeLog b/sys-process/fcron/ChangeLog index 89fa550af721..39b071f4b4f5 100644 --- a/sys-process/fcron/ChangeLog +++ b/sys-process/fcron/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-process/fcron # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-process/fcron/ChangeLog,v 1.13 2006/04/27 23:26:04 antarus Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-process/fcron/ChangeLog,v 1.14 2006/06/20 19:44:58 wschlich Exp $ + +*fcron-3.0.1-r1 (20 Jun 2006) + + 20 Jun 2006; Wolfram Schlich <wschlich@gentoo.org> +files/fcron.init, + +fcron-3.0.1-r1.ebuild: + fixing doc file installation, new init script supporting multiple instances + (like the openvpn one) 27 Apr 2006; Alec Warner <antarus@gentoo.org> files/digest-fcron-2.0.2, files/digest-fcron-2.9.5.1, files/digest-fcron-2.9.7, diff --git a/sys-process/fcron/fcron-3.0.1-r1.ebuild b/sys-process/fcron/fcron-3.0.1-r1.ebuild new file mode 100644 index 000000000000..b0d2b5bfcb45 --- /dev/null +++ b/sys-process/fcron/fcron-3.0.1-r1.ebuild @@ -0,0 +1,136 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-process/fcron/fcron-3.0.1-r1.ebuild,v 1.1 2006/06/20 19:44:58 wschlich Exp $ + +inherit cron pam eutils + +DESCRIPTION="A command scheduler with extended capabilities over cron and anacron" +HOMEPAGE="http://fcron.free.fr/" +SRC_URI="http://fcron.free.fr/archives/${P}.src.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="~x86 ~ppc ~sparc ~mips ~hppa ~amd64" +IUSE="debug doc pam selinux" + +DEPEND="virtual/editor + doc? ( >=app-text/docbook-dsssl-stylesheets-1.77 ) + selinux? ( sys-libs/libselinux ) + pam? ( >=sys-libs/pam-0.77 )" + +pkg_setup() { + # sudo unsets EDITOR + if [[ -z "${EDITOR}" ]] ; then + eerror "EDITOR seems to be unset. If you use sudo, it may be the cause." + eerror "Try using 'sudo env EDITOR=\${EDITOR} emerge' instead." + die "Please set the EDITOR env variable to the path of a valid executable." + fi + + # bug #65263 + # fcron's ./configure complains if EDITOR is not set to an absolute path, + # so try to set it to the abs path if it isn't + if [[ "${EDITOR}" != */* ]] ; then + einfo "Attempting to deduce absolute path of ${EDITOR}" + EDITOR=$(which ${EDITOR} 2>/dev/null) + [[ -x "${EDITOR}" ]] || \ + die "Please set the EDITOR env variable to the path of a valid executable." + fi + + ROOTUSER=$(egetent passwd 0 | cut -d':' -f1) + ROOTGROUP=$(egetent group 0 | cut -d':' -f1) +} + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${PN}-2.0.0-configure.diff + # respect LDFLAGS + sed -i "s:\(@LIBS@\):\$(LDFLAGS) \1:" Makefile.in || die "sed failed" +} + +src_compile() { + local myconf + + autoconf || die "autoconf failed" + + use doc && \ + myconf="${myconf} --with-dsssl-dir=/usr/share/sgml/stylesheets/dsssl/docbook" + + [[ -n "${ROOTUSER}" ]] && myconf="${myconf} --with-rootname=${ROOTUSER}" + [[ -n "${ROOTGROUP}" ]] && myconf="${myconf} --with-rootgroup=${ROOTGROUP}" + + # QA security notice fix; see "[gentoo-core] Heads up changes in suid + # handing with portage >=51_pre21" for more details. + append-ldflags $(bindnow-flags) + + econf \ + $(use_with pam) \ + $(use_with selinux) \ + $(use_with debug) \ + --with-username=cron \ + --with-groupname=cron \ + --with-piddir=/var/run \ + --with-etcdir=/etc/fcron \ + --with-spooldir=/var/spool/cron \ + --with-fifodir=/var/run \ + --with-sendmail=/usr/sbin/sendmail \ + --with-fcrondyn=yes \ + --with-editor=${EDITOR} \ + --with-shell=/bin/sh \ + ${myconf} \ + || die "Configure problem" + + emake || die "Compile problem" +} + +src_install() { + docrondir /var/spool/cron/fcrontabs -m0770 -o cron -g cron + docron fcron -m0110 -o ${ROOTUSER:-root} -g ${ROOTGROUP:-root} + docrontab fcrontab -m6110 -o cron -g cron + + insinto /usr/bin + insopts -o ${ROOTUSER:-root} -g cron -m6110 ; doins fcronsighup + insopts -o cron -g cron -m6110 ; doins fcrondyn + + # /etc stuff + insinto /etc/fcron + insopts -m 640 -o ${ROOTUSER:-root} -g cron + doins files/fcron.{allow,deny,conf} + dosed 's:^\(fcrontabs.*=.*\)$:\1/fcrontabs:' /etc/fcron/fcron.conf \ + || die "dosed fcron.conf failed" + + newpamd files/fcron.pam fcron + newpamd files/fcrontab.pam fcrontab + + insinto /etc + doins ${FILESDIR}/crontab + + newinitd ${FILESDIR}/fcron.init fcron || die "newinitd failed" + + # doc stuff + dodoc MANIFEST VERSION script/check_system_crontabs + newdoc files/fcron.conf fcron.conf.sample + dodoc ${FILESDIR}/crontab + dodoc doc/en/txt/{readme,thanks,faq,todo,relnotes,changes}.txt + doman doc/en/man/*.[0-9] + use doc && dohtml doc/en/HTML/*.html + + # localized docs + local LANGUAGES=$(sed -n 's:LANGUAGES =::p' doc/Makefile) + LANGUAGES="${LANGUAGES/en/}" + local lang + for lang in ${LANGUAGES}; do + hasq ${lang} ${LINGUAS} || continue + doman -i18n=${lang} doc/${lang}/man/*.[0-9] + use doc && docinto html/${lang} && dohtml doc/${lang}/HTML/*.html + done +} + +pkg_postinst() { + einfo "Each user who uses fcron should be added to the cron group" + einfo "in /etc/group and also be added in /etc/fcron/fcron.allow" + einfo + einfo "It is possible to emulate vixie-cron's behavior with regards to /etc/crontab" + einfo "and /etc/cron.d. To do so, read the directions provided in the script," + einfo "/usr/share/doc/${PF}/check_system_crontabs.gz." + cron_pkg_postinst +} diff --git a/sys-process/fcron/files/digest-fcron-3.0.1-r1 b/sys-process/fcron/files/digest-fcron-3.0.1-r1 new file mode 100644 index 000000000000..59c004866df2 --- /dev/null +++ b/sys-process/fcron/files/digest-fcron-3.0.1-r1 @@ -0,0 +1,3 @@ +MD5 8e5dcb3a646c11294294895954ef0a48 fcron-3.0.1.src.tar.gz 536972 +RMD160 1b723f563b1340a5091f559e7f0c2eed7f8ee5ff fcron-3.0.1.src.tar.gz 536972 +SHA256 31288b04619bb9c7cd5fe6ff004c1e2c1340685cec2d0fa8725259c491699de9 fcron-3.0.1.src.tar.gz 536972 diff --git a/sys-process/fcron/files/fcron.init b/sys-process/fcron/files/fcron.init new file mode 100755 index 000000000000..61a2ed1666dd --- /dev/null +++ b/sys-process/fcron/files/fcron.init @@ -0,0 +1,50 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-process/fcron/files/fcron.init,v 1.1 2006/06/20 19:44:58 wschlich Exp $ + +depend() { + use logger slapd mysql postgresql + need clock hostname + # provide the cron service if we are the main instance + if [ "${SVCNAME}" == "fcron" ]; then + provide cron + fi +} + +checkconfig() { + FCRON_INSTANCE=${SVCNAME##*.} + if [[ -n "${FCRON_INSTANCE}" && "${SVCNAME}" != "fcron" ]]; then + FCRON_CONF=/etc/fcron/fcron.${FCRON_INSTANCE}.conf + else + FCRON_CONF=/etc/fcron/fcron.conf + fi + if [ ! -e ${FCRON_CONF} ]; then + eerror "You will need an ${FCRON_CONF} first" + eerror "There is a sample in /etc/fcron" + return 1 + fi + FCRON_PIDFILE=$(grep '^pidfile' ${FCRON_CONF} 2>/dev/null | sed -e 's:^pidfile\s*=\s*\(.*\)$:\1:') + FCRON_PIDFILE=${FCRON_PIDFILE:-/var/run/fcron.pid} + FCRON_SPOOLDIR=$(grep '^fcrontabs' ${FCRON_CONF} 2>/dev/null | sed -e 's:^fcrontabs\s*=\s*\(.*\)$:\1:') + FCRON_SPOOLDIR=${FCRON_SPOOLDIR:-/var/spool/cron/fcrontabs} + if [ ! -d ${FCRON_SPOOLDIR} ]; then + ebegin "Creating missing spooldir ${FCRON_SPOOLDIR}" + /usr/sbin/fcron --newspooldir ${FCRON_SPOOLDIR} + eend $? + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --pidfile ${FCRON_PIDFILE} --exec /usr/sbin/fcron -- -c ${FCRON_CONF} + eend $? +} + +stop() { + checkconfig || return 1 + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --pidfile ${FCRON_PIDFILE} + eend $? +} |