summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-process/vixie-cron/vixie-cron-4.1-r14.ebuild
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-process/vixie-cron/vixie-cron-4.1-r14.ebuild')
-rw-r--r--sys-process/vixie-cron/vixie-cron-4.1-r14.ebuild125
1 files changed, 125 insertions, 0 deletions
diff --git a/sys-process/vixie-cron/vixie-cron-4.1-r14.ebuild b/sys-process/vixie-cron/vixie-cron-4.1-r14.ebuild
new file mode 100644
index 000000000000..e551741be553
--- /dev/null
+++ b/sys-process/vixie-cron/vixie-cron-4.1-r14.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit cron toolchain-funcs pam eutils flag-o-matic user systemd
+
+# no useful homepage, bug #65898
+HOMEPAGE="ftp://ftp.isc.org/isc/cron/"
+DESCRIPTION="Paul Vixie's cron daemon, a fully featured crond implementation"
+
+SELINUX_PATCH="${P}-selinux-1.diff"
+GENTOO_PATCH_REV="r4"
+
+SRC_URI="mirror://gentoo/${P}.tar.bz2
+ mirror://gentoo/${P}-gentoo-${GENTOO_PATCH_REV}.patch.bz2"
+
+LICENSE="ISC BSD-2 BSD"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="selinux pam debug"
+
+DEPEND="selinux? ( sys-libs/libselinux )
+ pam? ( virtual/pam )"
+
+RDEPEND="selinux? ( sys-libs/libselinux )
+ pam? ( virtual/pam )"
+
+#vixie-cron supports /etc/crontab
+CRON_SYSTEM_CRONTAB="yes"
+
+pkg_setup() {
+ enewgroup crontab
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${WORKDIR}"/${P}-gentoo-${GENTOO_PATCH_REV}.patch
+ epatch "${FILESDIR}"/crontab.5.diff
+ epatch "${FILESDIR}"/${P}-commandline.patch
+ epatch "${FILESDIR}"/${P}-basename.diff
+ epatch "${FILESDIR}"/${P}-setuid_check.patch
+ epatch "${FILESDIR}"/${P}-hardlink.patch
+ epatch "${FILESDIR}"/${P}-crontabrace.patch
+ use pam && epatch "${FILESDIR}"/${P}-pam.patch
+ use selinux && epatch "${FILESDIR}"/${SELINUX_PATCH}
+}
+
+src_compile() {
+ use debug && append-flags -DDEBUGGING
+
+ sed -i -e "s:gcc \(-Wall.*\):$(tc-getCC) \1 ${CFLAGS}:" \
+ -e "s:^\(LDFLAGS[ \t]\+=\).*:\1 ${LDFLAGS}:" Makefile \
+ || die "sed Makefile failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ docrondir -m 1730 -o root -g crontab
+ docron
+ docrontab -m 2755 -o root -g crontab
+
+ # /etc stuff
+ insinto /etc
+ newins "${FILESDIR}"/crontab-3.0.1-r4 crontab
+ newins "${FILESDIR}"/${P}-cron.deny cron.deny
+
+ keepdir /etc/cron.d
+ newpamd "${FILESDIR}"/pamd.compatible cron
+ newinitd "${FILESDIR}"/vixie-cron.rc7 vixie-cron
+
+ # doc stuff
+ doman crontab.1 crontab.5 cron.8
+ dodoc "${FILESDIR}"/crontab
+ dodoc CHANGES CONVERSION FEATURES MAIL README THANKS
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+}
+
+pkg_preinst() {
+ has_version "<${CATEGORY}/${PN}-4.1-r10"
+ fix_spool_dir_perms=$?
+}
+
+pkg_postinst() {
+ if [[ -f ${ROOT}/etc/init.d/vcron ]]
+ then
+ ewarn "Please run:"
+ ewarn "rc-update del vcron"
+ ewarn "rc-update add vixie-cron default"
+ fi
+
+ # bug 71326
+ if [[ -u ${ROOT}/etc/pam.d/cron ]] ; then
+ echo
+ ewarn "Warning: previous ebuilds didn't reset permissions prior"
+ ewarn "to installing crontab, resulting in /etc/pam.d/cron being"
+ ewarn "installed with the SUID and executable bits set."
+ ewarn
+ ewarn "Run the following as root to set the proper permissions:"
+ ewarn " chmod 0644 /etc/pam.d/cron"
+ echo
+ fi
+
+ # bug 164466
+ if [[ $fix_spool_dir_perms = 0 ]] ; then
+ echo
+ ewarn "Previous ebuilds didn't correctly set permissions on"
+ ewarn "the crontabs spool directory. Proper permissions are"
+ ewarn "now being set on ${ROOT}var/spool/cron/crontabs/"
+ ewarn "Look at this directory if you have a specific configuration"
+ ewarn "that needs special ownerships or permissions."
+ echo
+ chmod 1730 "${ROOT}/var/spool/cron/crontabs" || die "chmod failed"
+ chgrp -R crontab "${ROOT}/var/spool/cron/crontabs" || die "chgrp failed"
+ cd "${ROOT}/var/spool/cron/crontabs/"
+ for cronfile in * ; do
+ [[ ! -f $cronfile ]] || chown "$cronfile:crontab" "$cronfile" \
+ || ewarn "chown failed on $cronfile, you probably have an orphan file."
+ done
+ fi
+
+ cron_pkg_postinst
+}