ports/106429: www/apache* ports install rc.d scripts which don't follow rc(8)
Dmitry Pryanishnikov
dmitry at atlantis.dp.ua
Wed Dec 6 23:30:18 UTC 2006
>Number: 106429
>Category: ports
>Synopsis: www/apache* ports install rc.d scripts which don't follow rc(8)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Dec 06 23:30:10 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Dmitry Pryanishnikov
>Release: FreeBSD 6.2-PRERELEASE i386
>Organization:
Atlantis ISP
>Environment:
System: FreeBSD homelynx.homenet 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0: Sat Dec 2 18:20:56 EET 2006 root at homelynx.homenet:/usr/obj/usr/RELENG_6/src/sys/lynx i386
>Description:
Apache server ports, namely, www/apache13, apache13+ipv6,
apache13-modperl install rc.d command scripts with the following
rcorder special lines:
# REQUIRE: DAEMON
# BEFORE: LOGIN
www/apache13-ssl and apache22 install scripts with:
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
www/apache20 and apache21 install scripts with:
# REQUIRE: NETWORKING SERVERS
# BEFORE: LOGIN
However, rc(8) contains the following guideline:
LOGIN Check-point before user login services
(inetd and sshd), as well as services
which might run commands as users (cron
and sendmail).
Since Apache httpd forks worker processes which run as non-privileged
user (usually www), it should require LOGIN. This non-conformance
of Apache's scripts to rc(8) causes problems when developer wants
to execute rc.d script after e.g. MySQL (which installs script with
"REQUIRE: LOGIN" per rc(8)) but before Apache (so database can be
repaired before use by the web-server). Such database checking
script would contain
# BEFORE: apache
# REQUIRE: mysql
but this creates circular dependency since apache.sh
contains "BEFORE: LOGIN" and mysql-server contains "REQUIRE: LOGIN".
>How-To-Repeat:
Install e.g. www/apache13 and databases/mysql41-server, then create
a database checking script with the following lines:
# BEFORE: apache
# REQUIRE: mysql
Observe the following problem:
root at test# rcorder /etc/rc.d/* /usr/local/etc/rc.d/* >/dev/null
rcorder: Circular dependency on provision `LOGIN' in file
`/usr/local/etc/rc.d/mysql-server'.
>Fix:
Replace 'BEFORE' and 'REQUIRE' lines in Apache rc.d script with
the single
# REQUIRE: LOGIN
E.g., for apache13:
--- apache.sh.orig Thu Dec 7 00:52:02 2006
+++ apache.sh Thu Dec 7 01:10:35 2006
@@ -2,8 +2,7 @@
# $FreeBSD: ports/www/apache13/files/apache.sh,v 1.11 2006/08/10 11:51:42 ache Exp $
# PROVIDE: apache
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
+# REQUIRE: LOGIN
# KEYWORD: shutdown
# Define these apache_* variables in one of these files:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list