Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 57787 - cron /etc/init.d scripts have uneccessary 'need logger' in depend section
Summary: cron /etc/init.d scripts have uneccessary 'need logger' in depend section
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL: http://article.gmane.org/gmane.linux....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-20 15:55 UTC by Paul Varner (RETIRED)
Modified: 2004-08-26 22:04 UTC (History)
1 user (show)

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


Attachments
dcron.rc6.patch (dcron.rc6.patch,327 bytes, patch)
2004-07-26 08:01 UTC, Paul Varner (RETIRED)
Details | Diff
fcron.rc6.patch (fcron.rc6.patch,327 bytes, patch)
2004-07-26 08:04 UTC, Paul Varner (RETIRED)
Details | Diff
vixie-cron.rc6.patch (vixie-cron.rc6.patch,352 bytes, patch)
2004-07-26 08:05 UTC, Paul Varner (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Varner (RETIRED) gentoo-dev 2004-07-20 15:55:35 UTC
This is a little verbose, but see my running commentary marked with *** in my system output.

beldin root # emerge depclean --pretend

Calculating depclean dependencies ... done!

>>> These are the packages that I would unmerge:

 app-admin/syslog-ng
    selected: 1.6.4
   protected: none
     omitted: none

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

*** Since I've been making some changes to my system, I decided to run emerge depclean to see what it thinks is not needed anymore.  In the output, I see that it wants to remove syslog-ng.  This doesn't seem right to me so I decide to investigate.  I don't have it in my world file, but it is listed in /etc/portage/virtuals as providing virtual/logger.

beldin root # /etc/init.d/syslog-ng stop
 * Stopping vixie-cron...                                                 [ ok ]
 * Stopping syslog-ng...                                                  [ ok ]

*** Okay, it looks like vixie-cron relies on it so let's see what happens
 
beldin root # env CONFIG_PROTECT="-*" emerge unmerge vixie-cron syslog-ng

 app-admin/syslog-ng
    selected: 1.6.4
   protected: none
     omitted: none

 sys-apps/vixie-cron
    selected: 3.0.1-r4
   protected: none
     omitted: none

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in: 5 4 3 2 1
>>> Unmerging app-admin/syslog-ng-1.6.4...
>>> Unmerging sys-apps/vixie-cron-3.0.1-r4...
 * Caching service dependencies...

 * GNU info directory index is up-to-date.

beldin root # emerge -uDpv system

These are the packages that I would merge, in order:

Calculating system dependencies ...done!

Total size of downloads: 0 kB

*** Hmm, I thought cron was required by the system, but I'll look at that later.

beldin root # emerge -v vixie-cron
Calculating dependencies ...done!
>>> emerge (1 of 1) sys-apps/vixie-cron-3.0.1-r4 to /
>>> md5 src_uri ;-) vixie-cron-3.0.1.tar.bz2
>>> Unpacking source...
>>> Unpacking vixie-cron-3.0.1.tar.bz2 to /var/tmp/portage/vixie-cron-3.0.1-r4/work
 * Applying vixie-cron-3.0.1-gentoo.patch...                              [ ok ]
 * Applying vixie-cron-3.0.1-close_stdin.diff...                          [ ok ]
 * Applying crontab.5.diff...                                             [ ok ]
>>> Source unpacked.
>>> Test phase [not enabled]: sys-apps/vixie-cron-3.0.1-r4
>>> Install vixie-cron-3.0.1-r4 into /var/tmp/portage/vixie-cron-3.0.1-r4/image/ category sys-apps
>>> Completed installing into /var/tmp/portage/vixie-cron-3.0.1-r4/image/
>>> Merging sys-apps/vixie-cron-3.0.1-r4 to /
 * Caching service dependencies...
 *  Can't find service 'logger' needed by 'vixie-cron';  continuing...
>>> sys-apps/vixie-cron-3.0.1-r4 merged.
>>> Recording sys-apps/vixie-cron in "world" favorites file...
>>> clean: No packages selected for removal.
>>> Auto-cleaning packages ...
>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.
 * IMPORTANT: 1 config files in /etc need updating.
 * Type emerge --help config to learn how to update config files.

beldin root # etc-update

beldin root # /etc/init.d/vixie-cron start
logger
 * ERROR:  Some services needed are missing.  Run
 *         './vixie-cron broken' for a list of those
 *         services.  "vixie-cron" was not started.

beldin root # /etc/init.d/vixie-cron broken
 * Re-caching dependency info (mtimes differ)...
 * Could not get dependency info for "logger"!
 * Please run:

 *   # /sbin/depscan.sh

 * to try and fix this.
logger

*** vixie-cron definitely wants a logger, lets emerge metalog to see what happens.

beldin root # emerge -v metalog
Calculating dependencies ...done!
>>> emerge (1 of 1) app-admin/metalog-0.8_pre20031130 to /
>>> md5 src_uri ;-) metalog-0.8_pre20031130.tar.gz
>>> Unpacking source...
>>> Unpacking metalog-0.8_pre20031130.tar.gz to /var/tmp/portage/metalog-0.8_pre20031130/work
>>> Source unpacked.
>>> Test phase [not enabled]: app-admin/metalog-0.8_pre20031130
>>> Install metalog-0.8_pre20031130 into /var/tmp/portage/metalog-0.8_pre20031130/image/ category app-admin
>>> Completed installing into /var/tmp/portage/metalog-0.8_pre20031130/image/

>>> Merging app-admin/metalog-0.8_pre20031130 to /
 * Buffering is now off by default.  Add -a to METALOG_OPTS
 * in /etc/conf.d/metalog to turn buffering back on.
 * Caching service dependencies...
>>> app-admin/metalog-0.8_pre20031130 merged.
>>> Recording app-admin/metalog in "world" favorites file...
>>> clean: No packages selected for removal.
>>> Auto-cleaning packages ...
>>> No outdated packages were found on your system.
 * GNU info directory index is up-to-date.

beldin root # /etc/init.d/vixie-cron start
 * Starting metalog...                                                    [ ok ]
 * Starting vixie-cron...                                                 [ ok ]

*** What do you know, it started! Let's move back to syslog-ng 
 
beldin root # /etc/init.d/metalog stop
 * Stopping vixie-cron...                                                 [ ok ]
 * Stopping metalog...                                                    [ ok ]

beldin root # env CONFIG_PROTECT="-*" emerge unmerge metalog

 app-admin/metalog
    selected: 0.8_pre20031130
   protected: none
     omitted: none

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in: 5 4 3 2 1
>>> Unmerging app-admin/metalog-0.8_pre20031130...
 * Caching service dependencies...
 *  Can't find service 'logger' needed by 'vixie-cron';  continuing...

 * GNU info directory index is up-to-date.

beldin root # emerge -v syslog-ng
Calculating dependencies ...done!
>>> emerge (1 of 1) app-admin/syslog-ng-1.6.4 to /
>>> md5 src_uri ;-) syslog-ng-1.6.4.tar.gz
>>> Unpacking source...
>>> Unpacking syslog-ng-1.6.4.tar.gz to /var/tmp/portage/syslog-ng-1.6.4/work
>>> Source unpacked.
>>> Test phase [not enabled]: app-admin/syslog-ng-1.6.4
>>> Install syslog-ng-1.6.4 into /var/tmp/portage/syslog-ng-1.6.4/image/ category app-admin
>>> Completed installing into /var/tmp/portage/syslog-ng-1.6.4/image/
>>> Merging app-admin/syslog-ng-1.6.4 to /
 * Caching service dependencies...
>>> app-admin/syslog-ng-1.6.4 merged.
>>> Recording app-admin/syslog-ng in "world" favorites file...
>>> clean: No packages selected for removal.
>>> Auto-cleaning packages ...
>>> No outdated packages were found on your system.
 * GNU info directory index is up-to-date.

beldin root # /etc/init.d/vixie-cron start
 * Starting syslog-ng...                                                  [ ok ]
 * Starting vixie-cron...                                                 [ ok ]

beldin root #


Reproducible: Always
Steps to Reproduce:
1. Do not have a system logger installed (i.e syslog-ng, metalog, sysklogd)
2. emerge vixie-cron
3. run /etc/init.d/vixie-cron start
4. Watch it complain highly about missing dependency

Actual Results:  
Unable to run vixie-cron until a system logger is installed.

Expected Results:  
The emerge of vixie-cron should pull in a system logger based upon virtual/logger

Portage 2.0.51_pre13 (default-x86-2004.2, gcc-3.3.3, glibc-2.3.3.20040420-r0,
2.6.7-gentoo-r11 i686 Pentium III (Coppermine))
=================================================================
System uname: 2.6.7-gentoo-r11 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
Binutils: sys-devel/binutils-2.14.90.0.8-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /var/bind
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache fixpackages sandbox"
GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ http://gentoo.oregonstate.edu
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS=""
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X acpi alsa apm arts artswrappersuid avi berkdb cdr crypt cups encode esd
foomaticdb gdbm gif gtk gtk2 i8x0 imap imlib java jpeg kde libg++ libwww mad
mbox mikmod mmx motif mozilla mpeg ncurses nls oggvorbis opengl oss pam pda
pdflib perl png ppds python qt readline samba sdl slang spell sse ssl svga tcltk
tcpd tiff truetype usb x86 xml2 xmms xv zlib linguas_en"
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2004-07-20 16:08:05 UTC
Add syslog-ng to your world file or just remerge it without --oneshot.  There's
no reason for vixie-cron to rdepend on virtual/logger.
Comment 2 Paul Varner (RETIRED) gentoo-dev 2004-07-20 20:15:05 UTC
You can leave this closed if you wish, but I respectfully disagree.  A system logger is explicity required by the /etc/init.d/vixie-cron startup script.

While I personally can't fathom a reason to run a system without a logger, it isn't required that one be run.  Since it isn't a requirement that a logger be installed on a system, and the fact that vixie-cron explictly requires it in order to run, it seems to me that it should be listed as a runtime dependency. Isn't that what the RDEPEND variable is supposed to be used to indicate?

(As a side note, yes I placed it into my world file)
Comment 3 Paul Varner (RETIRED) gentoo-dev 2004-07-26 07:59:33 UTC
Reopening with the correct issue.  vixie-cron, dcron, and fcron have 'need logger' in their depend section of the startup script.  This means that if for some reason a system logger is not installed, the startup script will not execute due to the missing dependency.  Since a system logger isn't required to actually run cron, the depend section of the startup scripts should be changed to be 'use logger'  I have tested all three crons and they operate correctly when a system logger is not running on the system.
Comment 4 Paul Varner (RETIRED) gentoo-dev 2004-07-26 08:01:46 UTC
Created attachment 36196 [details, diff]
dcron.rc6.patch
Comment 5 Paul Varner (RETIRED) gentoo-dev 2004-07-26 08:04:40 UTC
Created attachment 36197 [details, diff]
fcron.rc6.patch
Comment 6 Paul Varner (RETIRED) gentoo-dev 2004-07-26 08:05:12 UTC
Created attachment 36198 [details, diff]
vixie-cron.rc6.patch
Comment 7 SpanKY gentoo-dev 2004-08-26 22:04:27 UTC
fixed in cvs, thanks