cron ignores /etc/default/cron

Bug #794082 reported by Matthias Andree
64
This bug affects 16 people
Affects Status Importance Assigned to Milestone
cron (Ubuntu)
Fix Released
Undecided
Unassigned
Lucid
Fix Released
Undecided
Unassigned
Precise
Fix Released
Undecided
Unassigned

Bug Description

[Test Case]
1. apt-get install cron
2. look at content of /etc/default/cron. If it is not a 3 line message about being deprecated, modify it and save it.
3. Install updated cron package. Should be prompted showing the diff that adds the 3 line deprecation message.

[Regression Potential]
There is no regression potential. The file is not being used at all, so changing it is really just to help document the changed behavior for upgrades.

====== original bug ========

Binary package hint: cron

cron ignores /etc/default/cron (which is part of the cron package). The cause is that the new /etc/init/cron.conf doesn't read it.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: cron 3.0pl1-106ubuntu5
ProcVersionSignature: Ubuntu 2.6.32-32.62-generic 2.6.32.38+drm33.16
Uname: Linux 2.6.32-32-generic x86_64
Architecture: amd64
Date: Tue Jun 7 16:42:21 2011
ProcEnviron:
 PATH=(custom, no user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: cron

Revision history for this message
Matthias Andree (matthias-andree) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cron (Ubuntu):
status: New → Confirmed
Revision history for this message
Serge van Ginderachter (svg) wrote :

https://launchpadlibrarian.net/64651044/cron.conf (duplicate #700409) mentions a simple fix.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

The unfortunate reality is that /etc/default/* has been deprecated due to concerns over boot speed. Basically, randomly pausing to read and parse these files has a large net-effect of slowing the boot, whereas parsing /etc/init/*.conf once at the boot's startup is extremely fast.

If you are using these files, you should just edit /etc/init/cron.conf yourself, or /etc/init/cron.override if you do not want package upgrades to show diffs if we change the file.

so if your /etc/default/cron has

EXTRA_OPTS='-L 4'

That becomes

exec cron -L 4

In /etc/init/cron.override

I will remove the file from the package, however, so its clear that this file does nothing.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cron - 3.0pl1-121ubuntu1

---------------
cron (3.0pl1-121ubuntu1) quantal; urgency=low

  * Merge from Debian unstable. Remaining changes:
    - debian/rules: add support for cross-compiling.
    - Drop build-dependency on libaudit, not in main and the security
      team doesn't want it there.
    - debian/control:
      + Requires debhelper >= 7.3.15ubuntu2 (for Upstart).
      + Move MTA to Suggests field.
    - debian/cron.upstart: Add Upstart script.
    - debian/rules: Call dh_installinit to install Upstart job properly.
  * d/cron.default: change to a deprecated message to make it clear
    that the file is no longer in use. (LP: #794082)

cron (3.0pl1-121) unstable; urgency=low

  * debian/control:
    - Put the maintainer address in UTF-8 encoding
  * debian/postinst:
     - Only go ahead when configuring the package (Closes: #653304)
  * debian/source/lintian-overrides:
    - Removed, no longer required
  * crontab.5:
    - Escape the '%' in the examples so that they can work when copied over to
      crontab (Closes: #642309)
    - Remove tabs from manpage since they are not formatted properly in the
      nonfill area
  * cron.8, crontab.1, crontab.5:
    - Fix formatting errors in manual pages with patch provided by David
      Prévot (Closes: #643603)
  * debian/cron.default:
    - Fix typo (Closes: #643897)
  * debian/compat:
    - Set to compatibility version 9 to enable hardened build flags
      (Closes: #653720)
 -- Clint Byrum <email address hidden> Thu, 14 Jun 2012 11:05:24 -0700

Changed in cron (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

I think its worth changing the default /etc/default/cron in precise/lucid so that LTS upgraders who have modified that file will be presented with the diff.

Changed in cron (Ubuntu Lucid):
status: New → Triaged
Changed in cron (Ubuntu Precise):
status: New → Triaged
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Matthias, or anyone else affected,

Accepted cron into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/cron/3.0pl1-120ubuntu4 in a few hours and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case details of your testing will help us make a better decision. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cron (Ubuntu Precise):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
julio castellanos (jbitcm) wrote :

I successfully tested the -proposed update in a precise system

tags: added: verification-done
removed: verification-needed
Revision history for this message
Scott Kitterman (kitterman) wrote :

Hello Matthias, or anyone else affected,

Accepted into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/None/3.0pl1-120ubuntu4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: removed: verification-done
tags: added: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cron - 3.0pl1-120ubuntu4

---------------
cron (3.0pl1-120ubuntu4) precise-proposed; urgency=low

  * d/cron.default: change to a deprecated message to make it clear
    that the file is no longer in use. (LP: #794082)
 -- Clint Byrum <email address hidden> Thu, 14 Jun 2012 11:04:03 -0700

Changed in cron (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote :

Hello Matthias, or anyone else affected,

Accepted cron into lucid-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/cron/3.0pl1-106ubuntu7 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cron (Ubuntu Lucid):
status: Triaged → Fix Committed
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Verified on lucid

Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  exim4 postfix mail-transport-agent anacron logrotate checksecurity
The following packages will be upgraded:
  cron
1 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
Need to get 89.6kB of archives.
After this operation, 0B of additional disk space will be used.
Get:1 http://127.0.0.1/ubuntu/ lucid-proposed/main cron 3.0pl1-106ubuntu7 [89.6kB]
Fetched 89.6kB in 1s (73.4kB/s)
(Reading database ... 13687 files and directories currently installed.)
Preparing to replace cron 3.0pl1-106ubuntu6 (using .../cron_3.0pl1-106ubuntu7_amd64.deb) ...
stop: Unknown instance:
Unpacking replacement cron ...
Setting up cron (3.0pl1-106ubuntu7) ...

Configuration file `/etc/default/cron'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ? Your options are:
    Y or I : install the package maintainer's version
    N or O : keep your currently-installed version
      D : show the differences between the versions
      Z : background this process to examine the situation
 The default action is to keep your current version.
*** cron (Y/I/N/O/D/Z) [default=N] ? D
--- /etc/default/cron 2012-08-01 10:15:38.129819727 -0700
+++ /etc/default/cron.dpkg-new 2012-07-16 19:39:35.000000000 -0700
@@ -1,14 +1,3 @@
-# Cron configuration options
-
-# Uncomment this option for LSB name support in /etc/cron.d/
-LSBNAMES='-l'
-
-# Whether to read the system's default environment files (if present)
-# This will make cron set a proper charset for the mails it sends
-# Comment this or set it to something other than 'yes' to prevent
-# cron from reading it.
-READ_ENV="yes"
-
-# Extra options for cron, see cron(8)
-# For example, set a higher log level to audit cron's work
-# EXTRA_OPTS="-L 2"
+# This file has been deprecated. Please add custom options for cron
+# to /etc/init/cron.conf directly. See the init(5) man page for more
+# information.

Configuration file `/etc/default/cron'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ? Your options are:
    Y or I : install the package maintainer's version
    N or O : keep your currently-installed version
      D : show the differences between the versions
      Z : background this process to examine the situation
 The default action is to keep your current version.
*** cron (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/default/cron ...
cron start/running, process 11649

tags: added: verification-done
removed: verification-needed
Revision history for this message
Clint Byrum (clint-fewbar) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cron - 3.0pl1-106ubuntu7

---------------
cron (3.0pl1-106ubuntu7) lucid-proposed; urgency=low

  * d/cron.default: change to a deprecated message to make it clear
    that the file is no longer in use. (LP: #794082)
 -- Clint Byrum <email address hidden> Thu, 14 Jun 2012 17:03:40 -0700

Changed in cron (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.