Date: Thu, 2 Mar 2000 23:48:13 -0600 (CST) From: hetzels@westbend.net To: FreeBSD-gnats-submit@freebsd.org Subject: ports/17139: PLIST correction for Apache13-fp Message-ID: <200003030548.XAA26520@wbiW09.westbend.net>
next in thread | raw e-mail | index | archive | help
>Number: 17139 >Category: ports >Synopsis: PLIST correction for Apache13-fp >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Mar 2 21:50:00 PST 2000 >Closed-Date: >Last-Modified: >Originator: Scot W. Hetzel >Release: FreeBSD 3.4-STABLE i386 >Organization: West Bend Interent >Environment: >Description: The PLIST was incorrectly updated in the recent port upgrade. /usr/local/www/data* entries were added to the end of the ports PLIST, and the @unexec line to remove the frontpage suidkey filess was taken out. >How-To-Repeat: >Fix: The attached patch fixes these problems and also makes it so that the port doesn't install the index.html.*, *.gif, httpd.conf, srm.conf, access.conf magic, and mime.types files during a BATCH build. Allows a clean uninstall when in BATCH mode. Also, index.html.* and *.gif do not get installed if the directory ${PREFIX}/www/data exists. As we do not want to change the current DocumentRoot. diff -ruN apache13-fp.orig/Makefile apache13-fp/Makefile --- apache13-fp.orig/Makefile Wed Mar 1 00:25:04 2000 +++ apache13-fp/Makefile Thu Mar 2 22:18:54 2000 @@ -54,7 +54,6 @@ MOD_FPDOCDIR= ${AP_SHARE}/manual/mod/mod_frontpage MOD_FP= ${FILESDIR}/mod_frontpage.c IMAGES_DIR= ${AP_SHARE}/manual/images -IMAGES_VTI= ${PREFIX}/www/data/images/_vti_cnf INSTALL_FILE= ${INSTALL} -c -m 555 -o bin -g bin @@ -166,13 +165,7 @@ @${INSTALL} -c -m 644 ${DISTDIR}/powerlogo.gif ${IMAGES_DIR} @${INSTALL} -c -m 644 ${DISTDIR}/fplogo.gif ${IMAGES_DIR} @${INSTALL} -c -m 644 ${AP_SHARE}/apache_pb.gif ${IMAGES_DIR} - @mkdir -p ${PREFIX}/www/data/images @( cd ${PREFIX}/share/doc/apache ; if [ -h images ] ; then ${RM} -f images ; fi ; ln -fs manual/images images) -.for file in ${IMAGES} - @if [ ! -f ${PREFIX}/www/data/images/${file} ]; then \ - ${CP} -rp ${IMAGES_DIR}/${file} ${PREFIX}/www/data/images ; \ - fi -.endfor # Untar frontpage extentions @(cd ${PREFIX} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${FRONTPAGE} ${EXTRACT_AFTER_ARGS}) @${RM} ${FPHTTPD}/httpd ${FPHTTPD}/httpd.Compat diff -ruN apache13-fp.orig/patches/patch-ab apache13-fp/patches/patch-ab --- apache13-fp.orig/patches/patch-ab Wed Mar 1 00:25:07 2000 +++ apache13-fp/patches/patch-ab Thu Mar 2 23:00:41 2000 @@ -1,5 +1,5 @@ --- Makefile.tmpl.orig Tue Jan 11 13:47:41 2000 -+++ Makefile.tmpl Thu Feb 24 20:58:51 2000 ++++ Makefile.tmpl Thu Mar 2 23:00:19 2000 @@ -123,6 +123,7 @@ runtimedir = @runtimedir@ logfiledir = @logfiledir@ @@ -68,7 +68,7 @@ < $(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"; \ -@@ -452,25 +469,31 @@ +@@ -452,26 +469,30 @@ # icons and distributed CGI scripts. install-data: @echo "===> [data: Installing initial data files]" @@ -108,12 +108,12 @@ + echo "$(INSTALL_DATA) $(TOP)/conf/$${script}[*] $(root)$(cgidir).default/$${script}"; \ + $(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(cgidir).default/$${script}; \ done; \ -+ if [ ! -d $(root)$(cgidir) ]; then \ -+ $(CP) -rp $(root)$(cgidir).default $(root)$(cgidir); \ - fi +- fi ++# fi @echo "Copying tree $(TOP)/icons/ -> $(root)$(iconsdir)/"; \ (cd $(TOP)/icons/ && $(TAR) $(TAROPT) - *) |\ -@@ -504,28 +527,33 @@ + (cd $(root)$(iconsdir)/ && $(TAR) -xf -); \ +@@ -504,42 +525,47 @@ -e 's;@@ServerRoot@@/icons;$(iconsdir);' \ -e 's;@@ServerRoot@@/cgi-bin;$(cgidir);' \ -e 's;@@ServerRoot@@/proxy;$(proxycachedir);' \ @@ -143,11 +143,37 @@ > $(TOP)/$(SRC)/.apaci.install.tmp && \ echo "$(INSTALL_DATA) $(TOP)/conf/$${conf}-dist[*] $(root)$(sysconfdir)/$${target_conf}.default"; \ $(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sysconfdir)/$${target_conf}.default; \ - if [ ! -f "$(root)$(sysconfdir)/$${target_conf}" ]; then \ -+ if [ .$${target_conf} != .httpd.conf ] ; then \ - echo "$(INSTALL_DATA) $(TOP)/conf/$${conf}-dist[*] $(root)$(sysconfdir)/$${target_conf}"; \ - $(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sysconfdir)/$${target_conf}; \ -+ fi; \ - else \ - echo "[PRESERVING EXISTING CONFIG FILE: $(root)$(sysconfdir)/$${target_conf}]"; \ - fi; \ +- if [ ! -f "$(root)$(sysconfdir)/$${target_conf}" ]; then \ +- echo "$(INSTALL_DATA) $(TOP)/conf/$${conf}-dist[*] $(root)$(sysconfdir)/$${target_conf}"; \ +- $(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sysconfdir)/$${target_conf}; \ +- else \ +- echo "[PRESERVING EXISTING CONFIG FILE: $(root)$(sysconfdir)/$${target_conf}]"; \ +- fi; \ + done ++# if [ ! -f "$(root)$(sysconfdir)/$${target_conf}" ]; then \ ++# echo "$(INSTALL_DATA) $(TOP)/conf/$${conf}-dist[*] $(root)$(sysconfdir)/$${target_conf}"; \ ++# $(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sysconfdir)/$${target_conf}; \ ++# else \ ++# echo "[PRESERVING EXISTING CONFIG FILE: $(root)$(sysconfdir)/$${target_conf}]"; \ ++# fi; \ ++# done + -@for conf in mime.types magic; do \ + echo "$(INSTALL_DATA) $(TOP)/conf/$${conf} $(root)$(sysconfdir)/$${conf}.default"; \ + $(INSTALL_DATA) $(TOP)/conf/$${conf} $(root)$(sysconfdir)/$${conf}.default; \ +- if [ ! -f "$(root)$(sysconfdir)/$${conf}" ]; then \ +- echo "$(INSTALL_DATA) $(TOP)/conf/$${conf} $(root)$(sysconfdir)/$${conf}"; \ +- $(INSTALL_DATA) $(TOP)/conf/$${conf} $(root)$(sysconfdir)/$${conf}; \ +- else \ +- echo "[PRESERVING EXISTING CONFIG FILE: $(root)$(sysconfdir)/$${conf}]"; \ +- fi; \ + done ++# if [ ! -f "$(root)$(sysconfdir)/$${conf}" ]; then \ ++# echo "$(INSTALL_DATA) $(TOP)/conf/$${conf} $(root)$(sysconfdir)/$${conf}"; \ ++# $(INSTALL_DATA) $(TOP)/conf/$${conf} $(root)$(sysconfdir)/$${conf}; \ ++# else \ ++# echo "[PRESERVING EXISTING CONFIG FILE: $(root)$(sysconfdir)/$${conf}]"; \ ++# fi; \ ++# done + @echo "<=== [config]" + + diff -ruN apache13-fp.orig/pkg/INSTALL apache13-fp/pkg/INSTALL --- apache13-fp.orig/pkg/INSTALL Wed Mar 1 00:25:15 2000 +++ apache13-fp/pkg/INSTALL Thu Mar 2 23:19:50 2000 @@ -7,35 +7,50 @@ PKG_BATCH=${BATCH:=NO} PKG_PREFIX=${PKG_PREFIX} -AP_SHARE=${PKG_PREFIX}/share/doc/apache HOST_NAME=`/bin/hostname` + +AP_CGI=${PKG_PREFIX}/www/cgi-bin +AP_CONF=${PKG_PREFIX}/etc/apache AP_DATA=${PKG_PREFIX}/www/data +AP_SHARE=${PKG_PREFIX}/share/doc/apache + FPINSTALL=${PKG_PREFIX}/frontpage/version4.0/fp_install.sh CHANGESERVER=${PKG_PREFIX}/frontpage/version4.0/change_server.sh FPDOCDIR=${AP_SHARE}/manual/mod/mod_frontpage +IMAGES_DIR=${AP_SHARE}/manual/images IMAGES_VTI=${PKG_PREFIX}/www/data/images/_vti_cnf -HTTPD_CONF=${PKG_PREFIX}/etc/apache/httpd.conf create_apache_lang_doc () { - if [ ! -d ${AP_DATA} ]; then - /bin/mkdir -p ${AP_DATA} - fi - for lang in ca cz de dk ee en es fr it ja.jis lu nl po.iso-pl pt pt-br se { /bin/cat ${AP_SHARE}/index.html.${lang}-dist | \ - /usr/bin/sed -e 's;@@HOSTNAME@@;'${HOST_NAME}';' \ - > ${AP_SHARE}/index.html.${lang} - if [ ! -f ${AP_DATA}/index.html ] ; then - if [ ! -f ${AP_DATA}/index.html.${lang} ]; then - /bin/cp -rp ${AP_SHARE}/index.html.${lang} \ - ${AP_DATA}/index.html.${lang} - fi - fi + /usr/bin/sed -e 's;@@HOSTNAME@@;'${HOST_NAME}';' \ + > ${AP_SHARE}/index.html.${lang} } } +create_apache_doc_root () +{ + if [ ! -d ${AP_CGI} ]; then + /bin/cp -rp ${AP_CGI}.default ${AP_CGI} + fi + + if [ ! -d ${AP_DATA} ]; then + /bin/mkdir -p ${AP_DATA}/images + for file in apache_pb.gif fplogo.gif powerlogo.gif + { + /bin/cp -rp ${IMAGES_DIR}/${file} ${AP_DATA}/images + } + + for lang in ca cz de dk ee en es fr it ja.jis lu nl po.iso-pl pt pt-br se + { + /bin/cp -rp ${AP_SHARE}/index.html.${lang} \ + ${AP_DATA}/index.html.${lang} + } + fi +} + fix_frontpage_scripts () { /bin/cat ${FPINSTALL}-dist | \ @@ -51,24 +66,35 @@ fix_httpd_conf () { - if [ ! -f ${HTTPD_CONF} ] ; then - /bin/cat ${HTTPD_CONF}.default | \ + if [ ! -f ${AP_CONF}/httpd.conf} ] ; then + /bin/cat ${AP_CONF}/httpd.conf.default | \ /usr/bin/sed -e 's;@@HOSTNAME@@;'${HOST_NAME}';' \ - > ${HTTPD_CONF} + > ${AP_CONF}/httpd.conf fi + + for file in mime.types magic srm.conf access.conf + { + if [ ! -f ${AP_CONF}/${file} ]; then + cp -rp ${AP_CONF}/${file}.default ${AP_CONF}/${file} + fi + } } + #Add the appropriate comment to the images/_vti_cnf file. comment_files () { - if [ -d ${IMAGES_VTI} ]; then \ - if [ ! "`grep description ${IMAGES_VTI}/apache_pb.gif`" ] ; then \ - /bin/echo "vti_description:SW|Apache Webserver" >> ${IMAGES_VTI}/apache_pb.gif ;\ + if [ -d ${IMAGES_VTI} ]; then + if [ -f ${IMAGES_VTI}/apache_pb.gif ] && \ + [ ! "`grep description ${IMAGES_VTI}/apache_pb.gif`" ] ; then + /bin/echo "vti_description:SW|Apache Webserver" >> ${IMAGES_VTI}/apache_pb.gif fi - if [ ! "`grep description ${IMAGES_VTI}/fplogo.gif`" ] ; then \ - /bin/echo "vti_description:SW|Created with Microsoft FrontPage 2000" >> ${IMAGES_VTI}/fplogo.gif ; \ + if [ -f ${IMAGES_VTI}/fplogo.gif ] && \ + [ ! "`grep description ${IMAGES_VTI}/fplogo.gif`" ] ; then + /bin/echo "vti_description:SW|Created with Microsoft FrontPage 2000" >> ${IMAGES_VTI}/fplogo.gif fi - if [ ! "`grep description ${IMAGES_VTI}/powerlogo.gif`" ] ; then \ - /bin/echo "vti_description:SW|Powered by FreeBSD" >> ${IMAGES_VTI}/powerlogo.gif ; \ + if [ -f ${IMAGES_VTI}/powerlogo.gif ] && \ + [ ! "`grep description ${IMAGES_VTI}/powerlogo.gif`" ] ; then + /bin/echo "vti_description:SW|Powered by FreeBSD" >> ${IMAGES_VTI}/powerlogo.gif fi fi } @@ -80,6 +106,7 @@ # If we are not in batch mode then run the FP install script. if [ "${PKG_BATCH}" = "NO" ]; then create_apache_lang_doc + create_apache_doc_root fix_frontpage_scripts fix_httpd_conf ${FPINSTALL} diff -ruN apache13-fp.orig/pkg/PLIST apache13-fp/pkg/PLIST --- apache13-fp.orig/pkg/PLIST Wed Mar 1 00:25:15 2000 +++ apache13-fp/pkg/PLIST Thu Mar 2 23:38:15 2000 @@ -2,14 +2,10 @@ bin/htdigest bin/htpasswd etc/apache/access.conf.default -@exec if [ ! -f %B/access.conf ]; then cp %B/%f %B/access.conf ; fi etc/apache/httpd.conf.default etc/apache/magic.default -@exec if [ ! -f %B/magic ]; then cp %B/%f %B/magic ; fi etc/apache/mime.types.default -@exec if [ ! -f %B/mime.types ]; then cp %B/%f %B/mime.types ; fi etc/apache/srm.conf.default -@exec if [ ! -f %B/srm.conf ]; then cp %B/%f %B/srm.conf ; fi etc/rc.d/apache.sh include/apache/alloc.h include/apache/ap.h @@ -96,7 +92,6 @@ sbin/rotatelogs sbin/suexec share/doc/apache/apache_pb.gif -@exec if [ ! -d %D/www/data/images ] ; then mkdir -p %D/www/data/images ; fi @exec if [ ! -h %B/images ]; then (cd %B ; ln -s manual/images images); fi @unexec if [ -h %B/images ]; then rm -f %B/images; fi share/doc/apache/index.html.ca-dist @@ -109,16 +104,16 @@ share/doc/apache/index.html.fr-dist share/doc/apache/index.html.it-dist share/doc/apache/index.html.ja.jis-dist -share/doc/apache/index.html.ja.jis share/doc/apache/index.html.lu-dist share/doc/apache/index.html.nl-dist -share/doc/apache/index.html.po.iso-pl share/doc/apache/index.html.po.iso-pl-dist -share/doc/apache/index.html.pt-br share/doc/apache/index.html.pt-dist share/doc/apache/index.html.pt-br-dist share/doc/apache/index.html.se-dist @unexec rm -rf %B/index.html.?? +@unexec rm -rf %B/index.html.ja.jis +@unexec rm -rf %B/index.html.po.iso-pl +@unexec rm -rf %B/index.html.pt-br share/doc/apache/manual/LICENSE share/doc/apache/manual/bind.html share/doc/apache/manual/cgi_path.html @@ -132,10 +127,8 @@ share/doc/apache/manual/handler.html share/doc/apache/manual/header.html share/doc/apache/manual/images/apache_pb.gif -@exec if [ ! -f %D/www/data/images/%f ]; then cp %D/%F %D/www/data/images/%f; fi share/doc/apache/manual/images/custom_errordocs.gif share/doc/apache/manual/images/fplogo.gif -@exec if [ ! -f %D/www/data/images/%f ]; then cp %D/%F %D/www/data/images/%f; fi share/doc/apache/manual/images/home.gif share/doc/apache/manual/images/index.gif share/doc/apache/manual/images/mod_rewrite_fig1.fig @@ -143,7 +136,6 @@ share/doc/apache/manual/images/mod_rewrite_fig2.fig share/doc/apache/manual/images/mod_rewrite_fig2.gif share/doc/apache/manual/images/powerlogo.gif -@exec if [ ! -f %D/www/data/images/%f ]; then cp %D/%F %D/www/data/images/%f; fi share/doc/apache/manual/images/sub.gif share/doc/apache/manual/index.html share/doc/apache/manual/install-tpf.html @@ -258,11 +250,8 @@ share/doc/apache/manual/vhosts/vhosts-in-depth.html share/doc/apache/manual/vhosts/virtual-host.html share/doc/apache/manual/windows.html -@exec if [ ! -d %D/www/cgi-bin ]; then mkdir -p %D/www/cgi-bin; fi www/cgi-bin.default/printenv -@exec if [ ! -f %D/www/cgi-bin/%f ]; then cp %D/%F %D/www/cgi-bin/%f; fi www/cgi-bin.default/test-cgi -@exec if [ ! -f %D/www/cgi-bin/%f ]; then cp %D/%F %D/www/cgi-bin/%f; fi www/icons/README www/icons/a.gif www/icons/alert.black.gif @@ -429,6 +418,7 @@ frontpage/%%FP_REV%%/apache-fp/_vti_bin/fpexe frontpage/%%FP_REV%%/apache-fp/fp-patch-apache_1.3.3 frontpage/%%FP_REV%%/apache-fp/fpexe.c +@unexec if [ -f %B/suidkey ] ; then rm -f %B/suidkey* ; fi frontpage/%%FP_REV%%/bin/_vti_inf.htm frontpage/%%FP_REV%%/bin/fpsrvadm.exe frontpage/%%FP_REV%%/bin/postinfo.htm @@ -579,24 +569,3 @@ @dirrm frontpage/%%FP_REV%%/srcs @dirrm frontpage/%%FP_REV%% @dirrm frontpage -/usr/local/www/data -/usr/local/www/data/images -/usr/local/www/data/images/apache_pb.gif -/usr/local/www/data/images/fplogo.gif -/usr/local/www/data/images/powerlogo.gif -/usr/local/www/data/index.html.ca -/usr/local/www/data/index.html.cz -/usr/local/www/data/index.html.de -/usr/local/www/data/index.html.dk -/usr/local/www/data/index.html.ee -/usr/local/www/data/index.html.en -/usr/local/www/data/index.html.es -/usr/local/www/data/index.html.fr -/usr/local/www/data/index.html.it -/usr/local/www/data/index.html.ja.jis -/usr/local/www/data/index.html.lu -/usr/local/www/data/index.html.nl -/usr/local/www/data/index.html.po.iso-pl -/usr/local/www/data/index.html.pt -/usr/local/www/data/index.html.pt-br -/usr/local/www/data/index.html.se >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003030548.XAA26520>