Bug 106429 - www/apache* ports install rc.d scripts which don't follow rc(8)
Summary: www/apache* ports install rc.d scripts which don't follow rc(8)
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: Gavin Atkinson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-06 23:30 UTC by Dmitry Pryanishnikov
Modified: 2008-02-28 12:18 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Pryanishnikov 2006-12-06 23:30:10 UTC
    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".

Fix: Replace 'BEFORE' and 'REQUIRE' lines in Apache rc.d script with
    the single
    
    # REQUIRE: LOGIN
    
    E.g., for apache13:
    


# PROVIDE: apache
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
+# REQUIRE: LOGIN
 # KEYWORD: shutdown

 # Define these apache_* variables in one of these files:--nUcD28oKFAs6TbwBuFlC086oqJub0fJpXqsBQVlYWI8OeQ90
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- 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 $
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@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'.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-12-06 23:40:12 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ache

Over to maintainer
Comment 2 dfilter service freebsd_committer freebsd_triage 2006-12-09 17:34:39 UTC
ache        2006-12-09 17:34:33 UTC

  FreeBSD ports repository

  Modified files:
    www/apache13         Makefile 
    www/apache13/files   apache.sh 
  Log:
  Replace
  # REQUIRE: DAEMON
  # BEFORE: LOGIN
  with
  # REQUIRE: LOGIN cleanvar
  (mysql-first problem)
  
  PR:             106429
  
  Revision  Changes    Path
  1.174     +1 -1      ports/www/apache13/Makefile
  1.12      +2 -3      ports/www/apache13/files/apache.sh
_______________________________________________
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 3 Andrey A. Chernov freebsd_committer freebsd_triage 2006-12-09 17:36:47 UTC
Responsible Changed
From-To: ache->freebsd-ports

Fixed for apache13
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2006-12-10 15:55:05 UTC
Responsible Changed
From-To: freebsd-ports->apache

Over to maintainer(s).
Comment 5 dfilter service freebsd_committer freebsd_triage 2007-01-13 12:13:18 UTC
clement     2007-01-13 12:13:12 UTC

  FreeBSD ports repository

  Modified files:
    www/apache22         Makefile Makefile.modules distinfo 
                         pkg-plist 
    www/apache22/files   apache22.sh.in 
  Log:
  - Update to 2.2.4
  - Add dumpio module
  - Fix rcorder [1]
  
  PR:             ports/106429 [1]
  Submitted by:   Dmitry Pryanishnikov <dmitry@atlantis.dp.ua> [1]
  
  Revision  Changes    Path
  1.201     +1 -1      ports/www/apache22/Makefile
  1.20      +2 -2      ports/www/apache22/Makefile.modules
  1.72      +3 -3      ports/www/apache22/distinfo
  1.2       +2 -3      ports/www/apache22/files/apache22.sh.in
  1.79      +2 -1      ports/www/apache22/pkg-plist
_______________________________________________
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 6 Gavin Atkinson freebsd_committer freebsd_triage 2008-01-29 14:19:34 UTC
State Changed
From-To: open->feedback

To submitter: It looks like this is now fixed, can you verify that 
this PR can now be closed? 


Comment 7 Gavin Atkinson freebsd_committer freebsd_triage 2008-01-29 14:19:34 UTC
Responsible Changed
From-To: apache->gavin

Track
Comment 8 Dmitry Pryanishnikov 2008-02-04 22:04:19 UTC
Hello!

2008/1/29, gavin@freebsd.org <gavin@freebsd.org>:
> To submitter: It looks like this is now fixed, can you verify that
> this PR can now be closed?
>

  The problem has been fixed in the following ports:

apache13
apache13+ipv6
apache20
apache22

The rest of apache13* ports still contain it. However I don't use
those left ports,
and I'm not sure whether they're still actively used/maintained. So I
think my PR can be closed. I thank committers which have fixed the
problem described herein.


-- 
Sincerely, Dmitry
nic-hdl: LYNX-RIPE
Comment 9 Gavin Atkinson freebsd_committer freebsd_triage 2008-02-28 12:18:01 UTC
State Changed
From-To: feedback->closed

Submitter confirms that this is fixed for the main apache ports, 
and is happy for it to be closed