Bug 31422

Summary: Does pkg_delete have to erase /usr/local/www/data when removing and upgraded Apache?
Product: Ports & Packages Reporter: Matt Barton <matt>
Component: Individual Port(s)Assignee: Andrey A. Chernov <ache>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Matt Barton 2001-10-22 01:40:00 UTC
I used pkg_delete to remove my current installation of Apache so that I could upgrade it to 1.3.22.  After installing the new version of Apache from the ports tree, I discovered that everything that was in /usr/local/www/data/ had been deleted and replaced with the standard apache files.  I had no backup, but that was entirely my fault.

Fix: 

How about not having pkg_delete remove the /usr/local/www/data directory, its contents, and sub-diretories?
How-To-Repeat: See above.
Comment 1 dwcjr 2001-10-22 16:39:34 UTC
A simple fix if nobody seems to care to fix this is to have another 
directory like /usr/local/share/apache/htdocs/
and set DocumentRoot to that path
-- 
David W. Chapman Jr.
dwcjr@inethouston.net	Raintree Network Services, Inc. <www.inethouston.net>
dwcjr@freebsd.org	FreeBSD Committer <www.FreeBSD.org>
Comment 2 Scot W. Hetzel 2001-10-22 19:42:56 UTC
From: "David W. Chapman Jr." <dwcjr@inethouston.net>
> The following reply was made to PR ports/31422; it has been noted by
GNATS.
>
> From: "David W. Chapman Jr." <dwcjr@inethouston.net>
> To: Matt Barton <matt@fear.net>
> Cc: freebsd-gnats-submit@FreeBSD.org
> Subject: Re: ports/31422: Does pkg_delete have to erase
/usr/local/www/data when removing and upgraded Apache?
> Date: Mon, 22 Oct 2001 10:39:34 -0500
>
>  A simple fix if nobody seems to care to fix this is to have another
>  directory like /usr/local/share/apache/htdocs/
>  and set DocumentRoot to that path
>
But this will not work for new users installing the apache server, as they
will read the httpd.conf file and place their local content into the
../share/apache/htdocs directory.

The best solution is to install the apache *.html.* files into
../share/doc/apache, and then only copy index.html.en to
../www/data/index.html, only if there is no index.html file in the
../www/data directory.

When the port is uninstalled, it compares ../www/data/index.html to
../share/doc/apache/index.html.en before deciding to deleting index.html.

The apache13-fp port uses this method.

Scot
Comment 3 Pete Fritchman freebsd_committer freebsd_triage 2001-10-25 00:24:17 UTC
Responsible Changed
From-To: freebsd-ports->ache

Over to maintainer
Comment 4 Andrey A. Chernov freebsd_committer freebsd_triage 2001-10-25 01:07:25 UTC
State Changed
From-To: open->feedback

Some error on your side. Apache port not touch /usr/local/www/data 
If you don't think so, send exact installation log and point at the place you  
think Apache tries to remove it.
Comment 5 Andrey A. Chernov freebsd_committer freebsd_triage 2003-02-07 01:04:13 UTC
State Changed
From-To: feedback->closed

No feedback received