[arch-general] Myths and reality about cronie
I've compiled a short document describing exactly what cronie is and is not; and if it were to be the default what would and would not happen to base, [core], and the rest of Arch. It is my hope that this will clear up some of the misunderstanding surrounding the current discussion on arch-general. First of all the cronie in [community-testing] is compiled with --enable-anacron. It installs not only an /etc/crontab but also an /etc/anacrontab. Scripts in '/etc/cron.hourly' are run directly by `/usr/sbin/crond` while scripts in '/etc/cron.daily', '/etc/cron.weekly', and '/etc/cron.monthly' are run by indirectly by `/usr/sbin/crond` through `/usr/sbin/anacron`. Therefore it will accommodate both machines that are run continuously and machines that are not. Second cronie will in no way `replaces=('dcron')` but will most likely `conflicts=('dcron')`. Therefore while it will be impossible to install both on the same system having cronie in [core] will in no way force existing users to switch. Third if cronie is picked up as the default it will enter the 'base' group while 'dcron' will leave the 'base' group. In the foreseeable future there will never be a situation in which a package that is not in [core] is in 'base'. Next it is absolutely not the case that every package in 'base' is critical to the operation of a machine. For example 'reiserfsprogs' is in 'base' but unless you have a ReiserFS filesystem then you don't need it. Every package in 'base' is however installed by default. Please note that the following point is my opinion and does not in any way necessarily represent anyone else's point of view: At no point in time in the near future will 'systemd' become the default on Arch. It may certainly enter [extra] or [core], but sorry Thomas and falconindy, I just don't see it becoming the default for a while. Therefore waiting for 'systemd' to become the new default to replace 'dcron' is a serious mistake as we would be waiting a very very long time. --Kaiting. -- Kiwis and Limes: http://kaitocracy.blogspot.com/
Am Thu, 21 Apr 2011 21:07:35 -0400 schrieb Kaiting Chen <kaitocracy@gmail.com>:
First of all the cronie in [community-testing] is compiled with --enable-anacron. It installs not only an /etc/crontab but also an /etc/anacrontab. Scripts in '/etc/cron.hourly' are run directly by `/usr/sbin/crond` while scripts in '/etc/cron.daily', '/etc/cron.weekly', and '/etc/cron.monthly' are run by indirectly by `/usr/sbin/crond` through `/usr/sbin/anacron`.
And this is one of the main problems with cronie. It needs a separate /etc/anacrontab for anacron jobs. And this makes it more complicated as necessary. Fcron only needs one fcrontab for every job. To use the anacron feature it just needs to be added a "&bootrun" in front of the line. This way tasks are run as usual cron jobs if the system is up and as anacron jobs if the system is down. This fits all needs in one, the needs of 24/7 servers and the needs of desktop systems. Cronie is nothing else than two different daemons, cron and anacron, put into one binary but with exactly the same complicated functionality and configuration. And the scripts in /etc/cron.{hourly,daily,weekly,monthly} are run directly by fcron, too. And by default there is a "&bootrun" in front of the fcrontab lines which tell fcron when to run those scripts. Another point: fcron is very well documented while there's no documentation about cronie, not even a feature list and comparison. Heiko
On 04/22/2011 07:23 AM, Heiko Baums wrote:
Am Thu, 21 Apr 2011 21:07:35 -0400 schrieb Kaiting Chen<kaitocracy@gmail.com>:
First of all the cronie in [community-testing] is compiled with --enable-anacron. It installs not only an /etc/crontab but also an /etc/anacrontab. Scripts in '/etc/cron.hourly' are run directly by `/usr/sbin/crond` while scripts in '/etc/cron.daily', '/etc/cron.weekly', and '/etc/cron.monthly' are run by indirectly by `/usr/sbin/crond` through `/usr/sbin/anacron`.
And this is one of the main problems with cronie. It needs a separate /etc/anacrontab for anacron jobs. And this makes it more complicated as necessary. Fcron only needs one fcrontab for every job. To use the anacron feature it just needs to be added a "&bootrun" in front of the line. This way tasks are run as usual cron jobs if the system is up and as anacron jobs if the system is down. This fits all needs in one, the needs of 24/7 servers and the needs of desktop systems.
Cronie is nothing else than two different daemons, cron and anacron, put into one binary but with exactly the same complicated functionality and configuration.
And the scripts in /etc/cron.{hourly,daily,weekly,monthly} are run directly by fcron, too. And by default there is a "&bootrun" in front of the fcrontab lines which tell fcron when to run those scripts.
Another point: fcron is very well documented while there's no documentation about cronie, not even a feature list and comparison.
Heiko
what about crons that are added by users? How they will be migrated to fcron or cronie? dcron stores the files in /var/spool/cron fcron stores them in /var/spool/fcron Now you see why i do not like a replaces approach? I do not want to mess with crons installed by users and broke them with some hacky migration script -- IonuČ›
On Fri, 22 Apr 2011 10:53:31 +0300 Ionut Biru <ibiru@archlinux.org> wrote:
On 04/22/2011 07:23 AM, Heiko Baums wrote:
Am Thu, 21 Apr 2011 21:07:35 -0400 schrieb Kaiting Chen<kaitocracy@gmail.com>:
First of all the cronie in [community-testing] is compiled with --enable-anacron. It installs not only an /etc/crontab but also an /etc/anacrontab. Scripts in '/etc/cron.hourly' are run directly by `/usr/sbin/crond` while scripts in '/etc/cron.daily', '/etc/cron.weekly', and '/etc/cron.monthly' are run by indirectly by `/usr/sbin/crond` through `/usr/sbin/anacron`.
And this is one of the main problems with cronie. It needs a separate /etc/anacrontab for anacron jobs. And this makes it more complicated as necessary. Fcron only needs one fcrontab for every job. To use the anacron feature it just needs to be added a "&bootrun" in front of the line. This way tasks are run as usual cron jobs if the system is up and as anacron jobs if the system is down. This fits all needs in one, the needs of 24/7 servers and the needs of desktop systems.
Cronie is nothing else than two different daemons, cron and anacron, put into one binary but with exactly the same complicated functionality and configuration.
And the scripts in /etc/cron.{hourly,daily,weekly,monthly} are run directly by fcron, too. And by default there is a "&bootrun" in front of the fcrontab lines which tell fcron when to run those scripts.
Another point: fcron is very well documented while there's no documentation about cronie, not even a feature list and comparison.
Heiko
what about crons that are added by users? How they will be migrated to fcron or cronie?
dcron stores the files in /var/spool/cron fcron stores them in /var/spool/fcron
Now you see why i do not like a replaces approach? I do not want to mess with crons installed by users and broke them with some hacky migration script
you know what would be reeaally cool? A cron daemon that can read user crontabs from $HOME/.config/crontab or something. I think all user-specific stuff should be in $HOME, although it would probably require a posix acl to allow the cron daemon reading from there (or making the permissions less strict) Dieter
On Fri, Apr 22, 2011 at 4:01 AM, Dieter Plaetinck <dieter@plaetinck.be>wrote:
you know what would be reeaally cool? A cron daemon that can read user crontabs from $HOME/.config/crontab or something. I think all user-specific stuff should be in $HOME, although it would probably require a posix acl to allow the cron daemon reading from there (or making the permissions less strict)
Cron has root privileges. --Kaiting. -- Kiwis and Limes: http://kaitocracy.blogspot.com/
Kaiting Chen wrote:
[...] Second cronie will in no way `replaces=('dcron')` but will most likely `conflicts=('dcron')`. Therefore while it will be impossible to install both on the same system having cronie in [core] will in no way force existing users to switch.
[...] Next it is absolutely not the case that every package in 'base' is critical to the operation of a machine. For example 'reiserfsprogs' is in 'base' but unless you have a ReiserFS filesystem then you don't need it. Every package in 'base' is however installed by default.
Why do you say "cronie will in no way replaces=('dcron')" ? If you say that cause it isn't a drop-in replacement and users will have to adjust their crontab entries, that's wrong and this is why. Here's a better example than reiserfsprogs. Bootloaders. There are three of them in core (grub,lilo and syslinux) and grub2 in extra but only one of them in base (grub). Almost everyone needs a bootloader, like almost everyone needs a cron handler. There is the default (grub) and there are three additional ones available to accomodate users different needs. No matter what happens to lilo syslinux and grub2, if grub for whatever reason were to be removed, it would always have to be replaced by something as the default bootloader. What would replace grub? Nothing that could replace it would be a drop-in replacement and users would have to fiddle with its configuration to fit their needs and get the same result they had before. It would also in any case be different than grub. Arch is a DIY rolling release distribution and you may occasionally find yourself in such situation. It's inevitable. What's most important is a clean upgrade path for existing users and striving to avoid finding yourself into such an uncomfortable position repeatedly by making the wiser choices you can along the run. Even Debian which uses more automagic stuff in order to provide the users with choices in package selection and automatic package substitution as well as configuration, provides some default from which you can later switch to something else. Something *should* be the default and since the current default doesn't work, something else should replace it. Even if both cron implementions that are on the table went into core, one of them will have to go to base to replace dcron. Even if changing the crontab configuration again annoys everyone. ---- Greg
participants (5)
-
Dieter Plaetinck
-
Grigorios Bouzakis
-
Heiko Baums
-
Ionut Biru
-
Kaiting Chen