rse         98/04/21 07:04:36

  Modified:    .        STATUS Makefile.tmpl
               src      CHANGES
  Log:
  Make sure we don't overwrite an existing DocRoot and CGI scripts
  on "make install".
  
  Submitted by: Ralf S. Engelschall (based on Jim's initial patch)
  Reviewed by: Jim Jagielski, Ralf S. Engelschall
  
  Revision  Changes    Path
  1.317     +1 -0      apache-1.3/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.316
  retrieving revision 1.317
  diff -u -r1.316 -r1.317
  --- STATUS    1998/04/21 13:34:40     1.316
  +++ STATUS    1998/04/21 14:04:29     1.317
  @@ -57,6 +57,7 @@
       * Ralf's fix for the install-config target to get correct MimeMagicFile
       * PRs 2081 and 2082 closed
       * Ralf's adjustments to `configure --compat' to be even more "compatible"
  +    * Ralf/Jim's enhanced "make install" carefulness for DocRoot, PR#2084
   
   Available Patches:
   
  
  
  
  1.22      +27 -16    apache-1.3/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/Makefile.tmpl,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- Makefile.tmpl     1998/04/21 08:04:58     1.21
  +++ Makefile.tmpl     1998/04/21 14:04:29     1.22
  @@ -171,7 +171,7 @@
        fi
        @$(MAKE) -f $(MKF) $(MFLAGS) \
                install-mktree install-programs $(install-support) \
  -             install-include install-docroot install-config
  +             install-include install-data install-config
        [EMAIL PROTECTED] -f .install.tmp
        [EMAIL PROTECTED] -f .install.conf
        [EMAIL PROTECTED] [ ".$(QUIET)" != .1 ]; then \
  @@ -308,21 +308,32 @@
   
   #   create an initial document root containing the Apache manual,
   #   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 {} \;
  -     @echo "<=== [docroot]"
  +install-data:
  +     @echo "===> [data: Installing initial data files]"
  +     [EMAIL PROTECTED] [ -f $(datadir)/htdocs/index.html ]; then \
  +             echo "[PRESERVING EXISTING DATA SUBDIR: $(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
  +     [EMAIL PROTECTED] [ -f $(datadir)/cgi-bin/printenv ]; then \
  +             echo "[PRESERVING EXISTING DATA SUBDIR: $(datadir)/cgi-bin/]"; \
  +     else \
  +             echo "Copying tree $(ROOT)/cgi-bin/ -> $(datadir)/cgi-bin/"; \
  +             (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 {} \; ; \
  +     fi
  +     @echo "Copying tree $(ROOT)/icons/ -> $(datadir)/icons/"; \
  +     (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 {} \;
  +     @echo "<=== [data]"
   
   #   create the initial configuration by providing default files
   #   and initial config files while preserving existing ones.
  
  
  
  1.782     +4 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.781
  retrieving revision 1.782
  diff -u -r1.781 -r1.782
  --- CHANGES   1998/04/21 13:34:43     1.781
  +++ CHANGES   1998/04/21 14:04:32     1.782
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3b7
     
  +  *) Make sure that "make install" doesn't overwrite the DocumentRoot and
  +     CGI scripts from an existing Apache installation. 
  +     [Ralf S. Engelschall, Jim Jagielski, PR#2084]
  +
     *) Make `configure --compat' more "compatible" by first 
        let the libexecdir default to EPREFIX/libexec instead of EPREFIX/bin and
        second by making sure the "avoid-bristling-suffix" /apache is not
  
  
  

Reply via email to