Bug 90309 - [fix] www/apache22: envvars.d doesn't work
Summary: [fix] www/apache22: envvars.d doesn't work
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: Clement Laforet
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-12 21:50 UTC by Simun Mikecin
Modified: 2005-12-13 22:27 UTC (History)
0 users

See Also:


Attachments
file.diff (460 bytes, patch)
2005-12-12 21:50 UTC, Simun Mikecin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simun Mikecin 2005-12-12 21:50:02 UTC
Scripts in ${LOCALBASE}/etc/apache22/envvars.d do not get loaded because
${LOCALBASE}/sbin/envvars tries to find them in
${LOCALBASE}/etc/apache21/envvars.d

How-To-Repeat: create a file /usr/local/etc/apache22/envvars.d/test.env which contains:

TESTVAR=testvalue
export TESTVAR

start apache and try to find TESTVAR in the apache environment.
If using php I suggest using phpinfo().
Comment 1 Edwin Groothuis freebsd_committer 2005-12-12 21:54:25 UTC
Responsible Changed
From-To: freebsd-ports-bugs->clement

Over to maintainer
Comment 2 Simun Mikecin 2005-12-12 21:58:49 UTC
In the above patch I missed %%PREFIX%% reinplace, so here it is:
diff -urN apache22.old/Makefile apache22/Makefile
--- apache22.old/Makefile	Mon Dec 12 22:54:11 2005
+++ apache22/Makefile	Mon Dec 12 22:54:11 2005
@@ -215,6 +215,8 @@
 	${REINPLACE_CMD} -e "s,%%WWWOWN%%,${WWWOWN}, ; \
 			s,%%WWWGRP%%,${WWWGRP}, " \
 			${WRKSRC}/docs/conf/httpd.conf
+	@${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX}," \
+			${WRKSRC}/support/envvars-std
 
 pre-install:
 	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
diff -urN apache22.old/files/patch-support:envvars-std.in apache22/files/patch-support:envvars-std.in
--- apache22.old/files/patch-support:envvars-std.in	Sat Feb  5 19:26:21 2005
+++ apache22/files/patch-support:envvars-std.in	Mon Dec 12 22:54:47 2005
@@ -5,7 +5,7 @@
  #
  @OS_SPECIFIC_VARS@
 +
-+ENVVARS_DIR=%%PREFIX%%/etc/apache21/envvars.d
++ENVVARS_DIR=%%PREFIX%%/etc/apache22/envvars.d
 +
 +for envvars_file in $(ls ${ENVVARS_DIR}/*.env 2>/dev/null)
 +do
Comment 3 Clement Laforet freebsd_committer 2005-12-13 22:27:19 UTC
State Changed
From-To: open->closed

Committed, thanks!