1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools cron flag-o-matic pam systemd user
8 DESCRIPTION="Cronie is a standard UNIX daemon cron based on the original vixie-cron"
9 HOMEPAGE="https://github.com/cronie-crond/cronie"
10 SRC_URI="https://github.com/cronie-crond/cronie/archive/${P}.tar.gz"
12 LICENSE="ISC BSD BSD-2 GPL-2"
13 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
14 IUSE="+anacron +inotify pam selinux"
18 anacron? ( !sys-process/anacron
19 elibc_musl? ( sys-libs/obstack-standalone )
27 #cronie supports /etc/crontab
28 CRON_SYSTEM_CRONTAB="yes"
30 S="${WORKDIR}/${PN}-${P}"
33 "${FILESDIR}/${PN}-1.5.3-systemd.patch"
52 --with-daemon_username=cron
53 --with-daemon_groupname=cron
57 use elibc_musl && append-cflags "-lobstack"
59 SPOOL_DIR="/var/spool/cron/crontabs" \
60 ANACRON_SPOOL_DIR="/var/spool/anacron" \
61 econf "${myeconfargs[@]}"
67 docrondir -m 1730 -o root -g crontab
68 fowners root:crontab /usr/bin/crontab
69 fperms 2751 /usr/bin/crontab
71 newconfd "${S}"/crond.sysconfig ${PN}
74 newins "${FILESDIR}/${PN}-crontab" crontab
75 newins "${FILESDIR}/${PN}-1.2-cron.deny" cron.deny
80 newinitd "${FILESDIR}/${PN}-1.3-initd" ${PN}
81 newpamd "${FILESDIR}/${PN}-1.4.3-pamd" crond
83 systemd_newunit contrib/cronie.systemd cronie.service
86 local anacrondir="/var/spool/anacron"
88 fowners root:cron ${anacrondir}
89 fperms 0750 ${anacrondir}
92 doins contrib/anacrontab
94 insinto /etc/cron.hourly
95 doins contrib/0anacron
96 fperms 0750 /etc/cron.hourly/0anacron
99 doins contrib/dailyjobs
108 if [[ -n "${REPLACING_VERSIONS}" ]] ; then
109 ewarn "You should restart ${PN} daemon or else you might experience segfaults"
110 ewarn "or ${PN} not working reliably anymore."
111 einfo "(see https://bugs.gentoo.org/557406 for details.)"