mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-06 22:51:41 +00:00
936af4387d
patch-au corrects a problem when either ResourceConfig/AccessConfig is set to the apache configuration file (${PREFIX}/etc/apache/httpd.conf). Without this patch, if you set the apache server to listen to alterate ports the server would fail to start and the error log would contain: [crit] (48)Address already in use: make_sock: could not bind to port 8000 ResourceConfig/AccessConfig can't be set to /dev/null. The fpsrvadm.exe will not be able to obtain the DocumnetRoot from the ResourceConfig file (/dev/null). PR: 13673 Submitted by: maintainer
139 lines
6.4 KiB
Plaintext
139 lines
6.4 KiB
Plaintext
--- Makefile.tmpl.orig Fri Aug 13 01:58:18 1999
|
|
+++ Makefile.tmpl Mon Sep 6 12:58:17 1999
|
|
@@ -120,6 +120,7 @@
|
|
runtimedir = @runtimedir@
|
|
logfiledir = @logfiledir@
|
|
proxycachedir = @proxycachedir@
|
|
+doc_prefix = $(prefix)/share/doc/apache
|
|
|
|
libexecdir_relative = @libexecdir_relative@
|
|
|
|
@@ -255,9 +256,9 @@
|
|
$(MKDIR) $(root)$(mandir)/man1
|
|
$(MKDIR) $(root)$(mandir)/man8
|
|
$(MKDIR) $(root)$(sysconfdir)
|
|
- $(MKDIR) $(root)$(htdocsdir)
|
|
+ $(MKDIR) $(root)$(doc_prefix)
|
|
$(MKDIR) $(root)$(iconsdir)
|
|
- $(MKDIR) $(root)$(cgidir)
|
|
+ $(MKDIR) $(root)$(cgidir).default
|
|
$(MKDIR) $(root)$(includedir)
|
|
$(MKDIR) $(root)$(includedir)/xml
|
|
$(MKDIR) $(root)$(runtimedir)
|
|
@@ -313,19 +314,34 @@
|
|
echo "$(INSTALL_DSO) $(TOP)/$(SRC)/$${mod} $(root)$(libexecdir)/$${file}"; \
|
|
$(INSTALL_DSO) $(TOP)/$(SRC)/$${mod} $(root)$(libexecdir)/$${file}; \
|
|
name=`$(TOP)/$(AUX)/fmn.sh $(TOP)/$(SRC)/$${mod}`; \
|
|
+ if [ ".$$name" = .frontpage_module ]; then \
|
|
+ echo "<IfDefine FRONTPAGE>" >>$(SRC)/.apaci.install.conf; \
|
|
+ fi; \
|
|
echo dummy | awk '{ printf("LoadModule %-18s %s\n", modname, modpath); }' \
|
|
modname="$${name}" modpath="$(libexecdir_relative)$${file}" >>$(SRC)/.apaci.install.conf; \
|
|
+ if [ ".$$name" = .frontpage_module ]; then \
|
|
+ echo "</IfDefine>" >>$(SRC)/.apaci.install.conf; \
|
|
+ fi; \
|
|
done; \
|
|
echo "" >>$(SRC)/.apaci.install.conf; \
|
|
echo "# Reconstruction of the complete module list from all available modules" >>$(SRC)/.apaci.install.conf; \
|
|
echo "# (static and shared ones) to achieve correct module execution order." >>$(SRC)/.apaci.install.conf; \
|
|
echo "# [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]" >>$(SRC)/.apaci.install.conf; \
|
|
echo "ClearModuleList" >>$(SRC)/.apaci.install.conf; \
|
|
- egrep "^[ ]*(Add|Shared)Module" $(SRC)/Configuration.apaci |\
|
|
- sed -e 's:SharedModule:AddModule:' \
|
|
- -e 's:modules/[^/]*/::' \
|
|
- -e 's:[ ]lib: mod_:' \
|
|
- -e 's:\.[soam].*$$:.c:' >>$(SRC)/.apaci.install.conf; \
|
|
+ for mod in `egrep "^[ ]*(Add|Shared)Module" $(SRC)/Configuration.apaci |\
|
|
+ sed -e 's:[ ]*SharedModule::' \
|
|
+ -e 's:[ ]*AddModule::' \
|
|
+ -e 's:modules/[^/]*/::' \
|
|
+ -e 's:[ ]lib: mod_:' \
|
|
+ -e 's:\.[soam].*$$:.c:'`; do \
|
|
+ if [ ".$$mod" = .mod_frontpage.c ]; then \
|
|
+ echo "<IfDefine FRONTPAGE>" >>$(SRC)/.apaci.install.conf; \
|
|
+ fi; \
|
|
+ echo "AddModule $$mod" >>$(SRC)/.apaci.install.conf; \
|
|
+ if [ ".$$mod" = .mod_frontpage.c ]; then \
|
|
+ echo "</IfDefine>" >>$(SRC)/.apaci.install.conf; \
|
|
+ fi; \
|
|
+ done; \
|
|
fi
|
|
@echo "<=== [programs]"
|
|
|
|
@@ -394,6 +410,7 @@
|
|
echo "$(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/apachectl[*] $(root)$(sbindir)/$${apachectl}"; \
|
|
sed -e 's;PIDFILE=.*;PIDFILE=$(runtimedir)/$(TARGET).pid;' \
|
|
-e 's;HTTPD=.*;HTTPD=$(sbindir)/$(TARGET);' \
|
|
+ -e 's;LD_LIBRARY_PATH=.*;LD_LIBRARY_PATH=/usr/lib\:$(prefix)/lib;' \
|
|
< $(TOP)/$(SRC)/support/apachectl > $(TOP)/$(SRC)/.apaci.install.tmp && \
|
|
$(INSTALL_SCRIPT) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sbindir)/$${apachectl}; \
|
|
echo "$(INSTALL_DATA) $(TOP)/$(SRC)/support/apachectl.8 $(root)$(mandir)/man8/$${apachectl}.8"; \
|
|
@@ -441,25 +458,33 @@
|
|
# icons and distributed CGI scripts.
|
|
install-data:
|
|
@echo "===> [data: Installing initial data files]"
|
|
- -@if [ -f $(root)$(htdocsdir)/index.html ]; then \
|
|
- echo "[PRESERVING EXISTING DATA SUBDIR: $(root)$(htdocsdir)/]"; \
|
|
- else \
|
|
- echo "Copying tree $(TOP)/htdocs/ -> $(root)$(htdocsdir)/"; \
|
|
+# -@if [ -f $(root)$(htdocsdir)/index.html ]; then \
|
|
+# echo "[PRESERVING EXISTING DATA SUBDIR: $(root)$(htdocsdir)/]"; \
|
|
+# else \
|
|
+ echo "Copying tree $(TOP)/htdocs/ -> $(root)$(doc_prefix)/"; \
|
|
(cd $(TOP)/htdocs/ && $(TAR) $(TAROPT) - *) |\
|
|
- (cd $(root)$(htdocsdir)/ && $(TAR) -xf -); \
|
|
- find $(root)$(htdocsdir)/ -type d -exec chmod a+rx {} \; ; \
|
|
- find $(root)$(htdocsdir)/ -type f -exec chmod a+r {} \; ; \
|
|
+ (cd $(root)$(doc_prefix)/ && $(TAR) -xf -); \
|
|
+ find $(root)$(doc_prefix)/ -type d -exec chmod a+rx {} \; ; \
|
|
+ find $(root)$(doc_prefix)/ -type f -exec chmod a+r {} \; ; \
|
|
+# fi
|
|
+ if [ ! -d $(root)$(htdocsdir) ]; then \
|
|
+ $(CP) -rp $(root)$(doc_prefix) $(root)$(htdocsdir); \
|
|
fi
|
|
- -@if [ -f $(root)$(cgidir)/printenv ]; then \
|
|
- echo "[PRESERVING EXISTING DATA SUBDIR: $(root)$(cgidir)/]"; \
|
|
- else \
|
|
+ $(RM) $(root)$(htdocsdir).default
|
|
+ $(LN) -s $(root)$(doc_prefix) $(root)$(htdocsdir).default
|
|
+# -@if [ -f $(root)$(cgidir)/printenv ]; then \
|
|
+# echo "[PRESERVING EXISTING DATA SUBDIR: $(root)$(cgidir)/]"; \
|
|
+# else \
|
|
for script in printenv test-cgi; do \
|
|
cat $(TOP)/cgi-bin/$${script} |\
|
|
sed -e 's;^#!/.*perl;#!$(PERL);' \
|
|
> $(TOP)/$(SRC)/.apaci.install.tmp; \
|
|
- echo "$(INSTALL_DATA) $(TOP)/conf/$${script}[*] $(root)$(cgidir)/$${script}"; \
|
|
- $(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(cgidir)/$${script}; \
|
|
+ echo "$(INSTALL_DATA) $(TOP)/conf/$${script}[*] $(root)$(cgidir).default/$${script}"; \
|
|
+ $(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(cgidir).default/$${script}; \
|
|
done; \
|
|
+# fi
|
|
+ if [ ! -d $(root)$(cgidir) ]; then \
|
|
+ $(CP) -rp $(root)$(cgidir).default $(root)$(cgidir); \
|
|
fi
|
|
@echo "Copying tree $(TOP)/icons/ -> $(root)$(iconsdir)/"; \
|
|
(cd $(TOP)/icons/ && $(TAR) $(TAROPT) - *) |\
|
|
@@ -493,15 +517,17 @@
|
|
-e 's;@@ServerRoot@@/icons;$(iconsdir);' \
|
|
-e 's;@@ServerRoot@@/cgi-bin;$(cgidir);' \
|
|
-e 's;@@ServerRoot@@/proxy;$(proxycachedir);' \
|
|
+ -e 's;@@ServerRoot@@/srm.conf;$(sysconfdir)/$(TARGET).conf;' \
|
|
+ -e 's;@@ServerRoot@@/access.conf;$(sysconfdir)/$(TARGET).conf;' \
|
|
-e 's;@@ServerRoot@@;$(prefix);g' \
|
|
-e 's;httpd\.conf;$(TARGET).conf;' \
|
|
-e 's;logs/accept\.lock;$(runtimedir)/$(TARGET).lock;' \
|
|
-e 's;logs/apache_runtime_status;$(runtimedir)/$(TARGET).scoreboard;' \
|
|
-e 's;logs/httpd\.pid;$(runtimedir)/$(TARGET).pid;' \
|
|
- -e "s;logs/access_log;$(logfiledir)/$${target_prefix}access_log;" \
|
|
- -e "s;logs/error_log;$(logfiledir)/$${target_prefix}error_log;" \
|
|
- -e "s;logs/referer_log;$(logfiledir)/$${target_prefix}referer_log;" \
|
|
- -e "s;logs/agent_log;$(logfiledir)/$${target_prefix}agent_log;" \
|
|
+ -e "s;logs/access_log;$(logfiledir)/httpd-access.log;" \
|
|
+ -e "s;logs/error_log;$(logfiledir)/httpd-error.log;" \
|
|
+ -e "s;logs/referer_log;$(logfiledir)/httpd-referer.log;" \
|
|
+ -e "s;logs/agent_log;$(logfiledir)/httpd-agent.log;" \
|
|
-e 's;conf/magic;$(sysconfdir)/magic;' \
|
|
-e 's;conf/mime\.types;$(sysconfdir)/mime.types;' \
|
|
-e 's;User nobody;User $(conf_user);' \
|