Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 89213 - [ebuild] new cron by bruce guenter
Summary: [ebuild] new cron by bruce guenter
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Cron Team
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks: 197248
  Show dependency tree
 
Reported: 2005-04-15 12:43 UTC by Thilo Bangert (RETIRED) (RETIRED)
Modified: 2008-01-27 00:43 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
sys-process/bcron-0.08.ebuild (bcron-0.08.ebuild,1.98 KB, text/plain)
2005-04-15 13:44 UTC, Thilo Bangert (RETIRED) (RETIRED)
Details
sys-process/bcron/files/crontab (crontab,499 bytes, text/plain)
2005-04-15 13:45 UTC, Thilo Bangert (RETIRED) (RETIRED)
Details
sys-process/bcron/metadata.xml (metadata.xml,709 bytes, text/plain)
2005-04-15 13:46 UTC, Thilo Bangert (RETIRED) (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2005-04-15 12:43:00 UTC
bruce guenter has recently released a new implementation of cron dubbed bcron.

http://untroubled.org/bcron
This is bcron, a new cron system designed with secure operations in
mind.  To do this, the system is divided into several seperate programs,
each responsible for a seperate task, with strictly controlled
communications between them.  The user interface is a drop-in
replacement for similar systems (such as vixie-cron), but the internals
differ greatly.

--
http://untroubled.org/bcron/bcron.html
Comment 1 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2005-04-15 13:44:49 UTC
Created attachment 56374 [details]
sys-process/bcron-0.08.ebuild

this is still a little rough...
- bcron needs some pretty hefty permissions on /var/spool/cron (0700 cron:cron)

- the run scripts are not put into place (just copied to /usr/share/doc)

as bcron _does_ handle the system crontabs /etc/crontab and /etc/cron.d the
default comment in the cron eclass needs a patch  :)
Comment 2 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2005-04-15 13:45:26 UTC
Created attachment 56376 [details]
sys-process/bcron/files/crontab

basically a copy from vixie-cron...
Comment 3 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2005-04-15 13:46:17 UTC
Created attachment 56377 [details]
sys-process/bcron/metadata.xml
Comment 4 Ciaran McCreesh 2005-04-16 00:32:32 UTC
Looks promising. I'll have a read through the source and check it for pam / selinux friendliness.
Comment 5 Aaron Walker (RETIRED) gentoo-dev 2005-04-17 07:14:29 UTC
I assume we'll want to let bcron handle /etc/conf.d instead of running run-crons?
Comment 6 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2005-04-17 08:09:24 UTC
well, there are lots of ebuilds which put stuff in cron.{hourly|daily|...} so i think those need to be run...

AFAIK vixie-cron handles both cron.d AND run-crons

(yeah - the ebuild does not install the /etc/crontab)
Comment 7 Aaron Walker (RETIRED) gentoo-dev 2005-04-17 08:44:55 UTC
bah dont worry about me. had a brainfart and mixed up cron.d with cron.hourly, etc
Comment 8 Ciaran McCreesh 2005-04-17 10:21:44 UTC
Meh. Ok, I can't take this one, the djb crapware isn't playing nice with the rest of my system.
Comment 9 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2006-05-20 02:15:32 UTC
i've committed sys-process/bcron-0.09 the other day.

if you have no objections, i'll join the cron herd and maintain bcron.

outstanding issues:
 - write a paragraph for the cron guide
 - as bcron also handles system crontabs, this has to
   be honored in the cron.eclass (cron_pkg_postinst)

i welcome your input.
Comment 10 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2006-06-10 09:09:10 UTC
alrighty - unmasked bcron and joined the cron herd

proposal: the following patch to the cron.eclass

diff -u -b -B -r1.9 cron.eclass
--- cron.eclass 6 Sep 2005 04:20:02 -0000       1.9
+++ cron.eclass 10 Jun 2006 16:03:45 -0000
@@ -134,8 +134,8 @@

 cron_pkg_postinst() {
        echo
-       # vixie is the only daemon that has a true system crontab
-       if [[ "${PN}" != "vixie-cron" ]] ; then
+       # vixie and bcron are the only crons that have a true system crontab
+       if [ "${PN}" != "vixie-cron" -a "${PN}" != "bcron" ] ; then
                einfo "To activate /etc/cron.{hourly|daily|weekly|monthly} please run:"
                einfo " crontab /etc/crontab"
                einfo
Comment 11 SpanKY gentoo-dev 2006-06-10 09:32:56 UTC
rather than hardcoding this crap in the eclass, why not make the ebuild declare whether it supports an /etc/cron.*/ setup

bcron:
CRON_TIME_DIRS="no"

cron.eclass:
if [[ ${CRON_TIME_DIRS} != "no" ]] ; then
   einfo "To activate /etc/cron.{hourly|daily|weekly|monthly} ....
Comment 12 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2006-06-11 14:55:11 UTC
yeah - good idea!

CRON_SYSTEM_CRONTAB  would probably fit the bill better...

(only bcron and vixie-cron support a system crontab (/etc/crontab) while the others install the system crontab as root's crontab - hence they have to run crontab /etc/crontab as root IIRC)

anyone volunteering to make these changes for vixie-cron?

BTW what is the difference between [ and [[ (or why is [[ not the same as test test)?
Comment 13 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2006-10-19 02:19:14 UTC
i have added 

CRON_SYSTEM_CRONTAB="yes"

to the bcron ebuild and propose the following patch for the cron.eclass:
================

Index: cron.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cron.eclass,v
retrieving revision 1.9
diff -u -b -B -r1.9 cron.eclass
--- cron.eclass 6 Sep 2005 04:20:02 -0000       1.9
+++ cron.eclass 19 Oct 2006 09:12:24 -0000
@@ -134,8 +134,8 @@

 cron_pkg_postinst() {
        echo
-       # vixie is the only daemon that has a true system crontab
-       if [[ "${PN}" != "vixie-cron" ]] ; then
+       # vixie and bcron are the only daemons that have a true system crontab
+       if [[ "${CRON_SYSTEM_CRONTAB:-no}" != "yes" ]] ; then
                einfo "To activate /etc/cron.{hourly|daily|weekly|monthly} please run:"
                einfo " crontab /etc/crontab"
                einfo

================

for this to work the line 
CRON_SYSTEM_CRONTAB="yes"
has to be added to all vixie-cron ebuilds. in fact, this has to be done before the above patch is applied to the cron.eclass.

feedback, comments, flames?
thanks
Comment 14 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2006-11-05 03:36:40 UTC
added

CRON_SYSTEM_CRONTAB="yes"

to all vixie-cron ebuilds in cvs.

the abovementioned change to the cron eclass is about to be committed.
Comment 15 nm (RETIRED) gentoo-dev 2007-11-07 20:46:12 UTC
Any plans to mark this stable? I'm only asking because of bug 197248; we don't recommend that users use ~arch packages in our documentation. Not if it can possibly be avoided.
Comment 16 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2008-01-26 23:17:03 UTC
everything done here, whats left is keywording and stable marking... will open a new bug for that, though.