Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 15906 invoked by uid 6000); 21 Apr 1998 07:10:53 -0000 Received: (qmail 15897 invoked from network); 21 Apr 1998 07:10:49 -0000 Received: from slarti.muc.de (193.174.4.10) by taz.hyperreal.org with SMTP; 21 Apr 1998 07:10:49 -0000 Received: (qmail 26939 invoked by uid 66); 21 Apr 1998 07:08:02 -0000 Received: by en1.engelschall.com (Sendmail 8.8.8) id IAA01481; Tue, 21 Apr 1998 08:43:47 +0200 (MET DST) Message-ID: <19980421084347.A26297@engelschall.com> Date: Tue, 21 Apr 1998 08:43:47 +0200 From: "Ralf S. Engelschall" To: new-httpd@apache.org Subject: Re: PR2084 and 'make install' Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91i Organization: Engelschall, Germany. X-Home: http://www.engelschall.com/ Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org In article <199804210218.WAA18313@devsys.jaguNET.com> you wrote: > PR2084 reports that 'make install' will overwrite index.html > (and others)... I agree that this might not make sense... > Comments on the below?: Yeah, good suggestion. But I would like to see the patch a little bit different. Because the user should be notified what we are preserving/skipping. This way the user either sees | :> make install-docroot | ===> [docroot: Installing initial DocumentRoot files] | Copying tree ./htdocs/ -> /tmp/apache/share/htdocs/ | Copying tree ./icons/ -> /tmp/apache/share/icons/ | Copying tree ./cgi-bin/ -> /tmp/apache/share/cgi-bin/ | <=== [docroot] or | :> make install-docroot | ===> [docroot: Installing initial DocumentRoot files] | [PRESERVING EXISTING DocumentRoot: /tmp/apache/share/htdocs/] | Copying tree ./icons/ -> /tmp/apache/share/icons/ | Copying tree ./cgi-bin/ -> /tmp/apache/share/cgi-bin/ | <=== [docroot] The difference to your patch is: 1. We only skip htdocs, because icons and cgi-bin can be updated safely. 2. The user sees in which Make target the preserving occurs 3. The user sees a similar message to the one occuring when we preserve the *.conf files. Alternative patch appended. Ralf S. Engelschall rse@engelschall.com www.engelschall.com Index: Makefile.tmpl =================================================================== RCS file: /e/apache/REPOS/apache-1.3/Makefile.tmpl,v retrieving revision 1.20 diff -u -r1.20 Makefile.tmpl --- Makefile.tmpl 1998/04/20 06:40:00 1.20 +++ Makefile.tmpl 1998/04/21 06:38:44 @@ -310,18 +310,22 @@ # icons and distributed CGI scripts. install-docroot: @echo "===> [docroot: Installing initial DocumentRoot files]" - -(cd $(ROOT)/htdocs/ && $(TAR) cf - *) |\ - (cd $(datadir)/htdocs/ && $(TAR) xf -) - -find $(datadir)/htdocs/ -type d -exec chmod a+rx {} \; - -find $(datadir)/htdocs/ -type f -exec chmod a+r {} \; - -(cd $(ROOT)/icons/ && $(TAR) cf - *) |\ - (cd $(datadir)/icons/ && $(TAR) xf -) - -find $(datadir)/icons/ -type d -exec chmod a+rx {} \; - -find $(datadir)/icons/ -type f -exec chmod a+r {} \; - -(cd $(ROOT)/cgi-bin/ && $(TAR) cf - *) |\ - (cd $(datadir)/cgi-bin/ && $(TAR) xf -) - -find $(datadir)/cgi-bin/ -type d -exec chmod a+rx {} \; - -find $(datadir)/cgi-bin/ -type f -exec chmod a+r {} \; + -@if [ -f $(datadir)/htdocs/index.html ]; then \ + echo "[PRESERVING EXISTING DocumentRoot: $(datadir)/htdocs/]"; \ + else \ + echo "Copying tree $(ROOT)/htdocs/ -> $(datadir)/htdocs/"; \ + (cd $(ROOT)/htdocs/ && $(TAR) cf - *) |\ + (cd $(datadir)/htdocs/ && $(TAR) xf -); \ + find $(datadir)/htdocs/ -type d -exec chmod a+rx {} \; ; \ + find $(datadir)/htdocs/ -type f -exec chmod a+r {} \; ; \ + fi + @for subdir in icons cgi-bin; do \ + echo "Copying tree $(ROOT)/$$subdir/ -> $(datadir)/$$subdir/"; \ + (cd $(ROOT)/$$subdir/ && $(TAR) cf - *) |\ + (cd $(datadir)/$$subdir/ && $(TAR) xf -); \ + find $(datadir)/$$subdir/ -type d -exec chmod a+rx {} \; ; \ + find $(datadir)/$$subdir/ -type f -exec chmod a+r {} \; ; \ + done @echo "<=== [docroot]" # create the initial configuration by providing default files