Bug 114294 - fetchmail: BEFORE LOGIN in rc script creates circular dependency
Summary: fetchmail: BEFORE LOGIN in rc script creates circular dependency
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-04 17:00 UTC by Alson van der Meulen
Modified: 2007-07-06 08:20 UTC (History)
0 users

See Also:


Attachments
file.diff (257 bytes, patch)
2007-07-04 17:00 UTC, Alson van der Meulen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alson van der Meulen 2007-07-04 17:00:08 UTC
The fetchmail rc script contains the following dependency information:
# PROVIDE: fetchmail
# REQUIRE: mail
# BEFORE: LOGIN
# KEYWORD: shutdown

Most (all?) MTA's require LOGIN, so the BEFORE LOGIN in combination with
REQUIRE mail creates a circular dependency:
rcorder: Circular dependency on provision `LOGIN' in file `/usr/local/etc/rc.d/amavisd'.
rcorder: Circular dependency on provision `LOGIN' in file `/usr/local/etc/rc.d/clamav-clamd'.
rcorder: Circular dependency on provision `LOGIN' in file `/usr/local/etc/rc.d/clamav-freshclam'.
rcorder: Circular dependency on provision `LOGIN' in file `/usr/local/etc/rc.d/mysql-server'.
rcorder: Circular dependency on provision `LOGIN' in file `/usr/local/etc/rc.d/dcc-start'.
rcorder: Circular dependency on provision `LOGIN' in file `/usr/local/etc/rc.d/sa-spamd'.
rcorder: Circular dependency on provision `LOGIN' in file `/usr/local/etc/rc.d/postfix'.
rcorder: Circular dependency on provision `LOGIN' in file `/etc/rc.d/sendmail'.
rcorder: Circular dependency on provision `LOGIN' in file `/etc/rc.d/othermta'.

This results in all mail-related scripts running before LOGIN (and
slapd/lookupd in my case).

Fix: I don't see any reason why fetchmail should be started before LOGIN: it runs
as $fetchmail_user or $fetchmail_users, so it should require LOGIN. Changing
the dependencies to REQUIRE: mail LOGIN fixes the circular dependency. The
LOGIN dependency might be considered redundant, since mail depends on LOGIN.

Patch:
How-To-Repeat: rcorder /etc/rc.d/* /usr/local/etc/rc.d/*
with the fetchmail port installed
Comment 1 dfilter service freebsd_committer freebsd_triage 2007-07-06 08:10:50 UTC
barner      2007-07-06 07:10:44 UTC

  FreeBSD ports repository

  Modified files:
    mail/fetchmail       Makefile 
    mail/fetchmail/files fetchmail.in 
  Log:
  - Remove circular dependency in rcorder by removing the (unnessary) constraint
    that fetchmail is started "BEFORE LOGIN". "REQUIRE mail" (which in turn
    requires LOGIN) is enough.
  - Bump PORTREVISION
  
  PR:             ports/114294
  Submitted by:   Alson van der Meulen <alson@flutnet.org>
  
  Revision  Changes    Path
  1.186     +1 -1      ports/mail/fetchmail/Makefile
  1.7       +1 -2      ports/mail/fetchmail/files/fetchmail.in
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 2 Simon Barner freebsd_committer freebsd_triage 2007-07-06 08:12:36 UTC
State Changed
From-To: open->closed

Committed. Thanks! I actually dropped the explicit dependency on LOGIN 
since it is implied by mail anyway (as you stated in the PR).