aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2018-06-23 14:57:34 -0400
committerAnthony G. Basile <blueness@gentoo.org>2018-06-23 14:57:34 -0400
commit1e32d2f6293bbb06bdd23f8bc4ac5d84f56c2b01 (patch)
tree3a8cf700ef7e3cdd9e6b2bd8d836a6c423fd94eb /sys-process
parentnet-libs/libasr: musl support requires alternate random function (diff)
downloadmusl-1e32d2f6293bbb06bdd23f8bc4ac5d84f56c2b01.tar.gz
musl-1e32d2f6293bbb06bdd23f8bc4ac5d84f56c2b01.tar.bz2
musl-1e32d2f6293bbb06bdd23f8bc4ac5d84f56c2b01.zip
sys-process/cronie: USE=anacron needs obstack
Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'sys-process')
-rw-r--r--sys-process/cronie/Manifest1
-rw-r--r--sys-process/cronie/cronie-1.5.2.ebuild107
-rw-r--r--sys-process/cronie/files/cronie-1.2-cron.deny4
-rw-r--r--sys-process/cronie/files/cronie-1.3-initd13
-rw-r--r--sys-process/cronie/files/cronie-1.4.3-pamd9
-rw-r--r--sys-process/cronie/files/cronie-crontab17
-rw-r--r--sys-process/cronie/files/cronie-systemd.patch30
-rw-r--r--sys-process/cronie/metadata.xml26
8 files changed, 207 insertions, 0 deletions
diff --git a/sys-process/cronie/Manifest b/sys-process/cronie/Manifest
new file mode 100644
index 0000000..5b198ab
--- /dev/null
+++ b/sys-process/cronie/Manifest
@@ -0,0 +1 @@
+DIST cronie-1.5.2.tar.gz 121604 BLAKE2B 4225439fd13a32bba3bd24f25d7dd405cdb123e666ebbf14574143af9d161867f82ea3fc479d81a884590faaa9c42e19c971285e01a19d6ac793b7deb7fc4775 SHA512 6455e234becc44e6568fa25fd72abfaa293cb0bc2d2f1d124e551c068ba01083192b21e82e941158c8c1f41cb6dad3851d665b9f3baa82fd49080f3f8619740b
diff --git a/sys-process/cronie/cronie-1.5.2.ebuild b/sys-process/cronie/cronie-1.5.2.ebuild
new file mode 100644
index 0000000..236870d
--- /dev/null
+++ b/sys-process/cronie/cronie-1.5.2.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools cron flag-o-matic pam systemd user
+
+DESCRIPTION="Cronie is a standard UNIX daemon cron based on the original vixie-cron"
+HOMEPAGE="https://github.com/cronie-crond/cronie"
+SRC_URI="https://github.com/cronie-crond/cronie/archive/${P}.tar.gz"
+
+LICENSE="ISC BSD BSD-2 GPL-2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="+anacron +inotify pam selinux"
+
+DEPEND="pam? ( virtual/pam )
+ anacron? ( !sys-process/anacron
+ elibc_musl? ( sys-libs/obstack-standalone )
+ )"
+RDEPEND="${DEPEND}
+ sys-apps/debianutils"
+
+#cronie supports /etc/crontab
+CRON_SYSTEM_CRONTAB="yes"
+
+S="${WORKDIR}/${PN}-${P}"
+
+PATCHES=(
+ "${FILESDIR}/cronie-systemd.patch"
+)
+
+pkg_setup() {
+ enewgroup crontab
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with inotify)
+ $(use_with pam)
+ $(use_with selinux)
+ $(use_enable anacron)
+ --enable-syscrontab
+ --with-daemon_username=cron
+ --with-daemon_groupname=cron
+ )
+
+ use elibc_musl && append-ldflags "-lobstack"
+ SPOOL_DIR="/var/spool/cron/crontabs" \
+ ANACRON_SPOOL_DIR="/var/spool/anacron" \
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ emake install DESTDIR="${D}"
+
+ docrondir -m 1730 -o root -g crontab
+ fowners root:crontab /usr/bin/crontab
+ fperms 2751 /usr/bin/crontab
+
+ newconfd "${S}"/crond.sysconfig ${PN}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}-crontab" crontab
+ newins "${FILESDIR}/${PN}-1.2-cron.deny" cron.deny
+
+ insinto /etc/cron.d
+ doins contrib/0hourly
+
+ newinitd "${FILESDIR}/${PN}-1.3-initd" ${PN}
+ newpamd "${FILESDIR}/${PN}-1.4.3-pamd" crond
+
+ systemd_newunit contrib/cronie.systemd cronie.service
+
+ if use anacron ; then
+ local anacrondir="/var/spool/anacron"
+ keepdir ${anacrondir}
+ fowners root:cron ${anacrondir}
+ fperms 0750 ${anacrondir}
+
+ insinto /etc
+ doins contrib/anacrontab
+
+ insinto /etc/cron.hourly
+ doins contrib/0anacron
+ fperms 0750 /etc/cron.hourly/0anacron
+ else
+ insinto /etc/cron.d
+ doins contrib/dailyjobs
+ fi
+
+ einstalldocs
+}
+
+pkg_postinst() {
+ cron_pkg_postinst
+
+ if [[ -n "${REPLACING_VERSIONS}" ]] ; then
+ ewarn "You should restart ${PN} daemon or else you might experience segfaults"
+ ewarn "or ${PN} not working reliably anymore."
+ einfo "(see https://bugs.gentoo.org/557406 for details.)"
+ fi
+}
diff --git a/sys-process/cronie/files/cronie-1.2-cron.deny b/sys-process/cronie/files/cronie-1.2-cron.deny
new file mode 100644
index 0000000..f703d58
--- /dev/null
+++ b/sys-process/cronie/files/cronie-1.2-cron.deny
@@ -0,0 +1,4 @@
+# If for any reason you have users in the 'cron' group who should not
+# be allowed to run crontab, add them to this file (one username per
+# line)
+
diff --git a/sys-process/cronie/files/cronie-1.3-initd b/sys-process/cronie/files/cronie-1.3-initd
new file mode 100644
index 0000000..bf9e38d
--- /dev/null
+++ b/sys-process/cronie/files/cronie-1.3-initd
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/sbin/crond"
+command_args="${CRONDARGS}"
+pidfile="/var/run/crond.pid"
+
+depend() {
+ use clock logger
+ need localmount
+ provide cron
+}
diff --git a/sys-process/cronie/files/cronie-1.4.3-pamd b/sys-process/cronie/files/cronie-1.4.3-pamd
new file mode 100644
index 0000000..e82be8d
--- /dev/null
+++ b/sys-process/cronie/files/cronie-1.4.3-pamd
@@ -0,0 +1,9 @@
+#
+# The PAM configuration file for the cron daemon
+#
+#
+auth include system-auth
+account required pam_access.so
+account include system-auth
+session required pam_loginuid.so
+session include system-auth
diff --git a/sys-process/cronie/files/cronie-crontab b/sys-process/cronie/files/cronie-crontab
new file mode 100644
index 0000000..275f06c
--- /dev/null
+++ b/sys-process/cronie/files/cronie-crontab
@@ -0,0 +1,17 @@
+# Global variables
+SHELL=/bin/bash
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+MAILTO=root
+HOME=/
+
+# For details see man 4 crontabs
+
+# Example of job definition:
+# .---------------- minute (0 - 59)
+# | .------------- hour (0 - 23)
+# | | .---------- day of month (1 - 31)
+# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
+# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
+# | | | | |
+# * * * * * user-name command to be executed
+
diff --git a/sys-process/cronie/files/cronie-systemd.patch b/sys-process/cronie/files/cronie-systemd.patch
new file mode 100644
index 0000000..81c1917
--- /dev/null
+++ b/sys-process/cronie/files/cronie-systemd.patch
@@ -0,0 +1,30 @@
+From 11d255eb05ae9814c16cd443a7710d99492e16c1 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Mon, 13 Jul 2015 10:59:57 -0400
+Subject: [PATCH] Adjust systemd service unit for Gentoo
+
+---
+ contrib/cronie.systemd | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/contrib/cronie.systemd b/contrib/cronie.systemd
+index ad46899..7a6c1a9 100644
+--- a/contrib/cronie.systemd
++++ b/contrib/cronie.systemd
+@@ -3,10 +3,11 @@ Description=Command Scheduler
+ After=auditd.service nss-user-lookup.target systemd-user-sessions.service time-sync.target ypbind.service
+
+ [Service]
+-EnvironmentFile=/etc/sysconfig/crond
+-ExecStart=/usr/sbin/crond -n $CRONDARGS
++ExecStart=/usr/sbin/crond
+ ExecReload=/bin/kill -HUP $MAINPID
+ KillMode=process
++Type=forking
++PIDFile=/var/run/crond.pid
+
+ [Install]
+ WantedBy=multi-user.target
+--
+2.4.5
+
diff --git a/sys-process/cronie/metadata.xml b/sys-process/cronie/metadata.xml
new file mode 100644
index 0000000..b25dd02
--- /dev/null
+++ b/sys-process/cronie/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>cron-bugs@gentoo.org</email>
+ <name>Gentoo Cron Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Cronie contains the standard UNIX daemon crond that runs specified programs at
+ scheduled times and related tools. It is based on the original cron and
+ has security and configuration enhancements like the ability to use pam and
+ SELinux.
+ And why cronie? See http://www.urbandictionary.com/define.php?term=cronie
+ </longdescription>
+ <use>
+ <flag name="anacron">Install the periodic anacron command scheduler.</flag>
+ <flag name="inotify">Enable inotify filesystem monitoring support.</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">cronie-crond/cronie</remote-id>
+ </upstream>
+</pkgmetadata>