Bug 39575

Summary: Apache 1.3.26 deletes existing data and cgi-bin directories on install/upgrade
Product: Ports & Packages Reporter: Nicholas Paufler <echofox>
Component: Individual Port(s)Assignee: freebsd-ports (Nobody) <ports>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Nicholas Paufler 2002-06-20 16:00:10 UTC
I've never seen this behavior before but when I used portupgrade to upgrade apache 1.3.23+mod-ssl to 1.3.26+mod-ssl part of the installation blew away the /usr/local/www/data and /usr/local/www/cgi-bin directories and created new ones.

I did a little digging and the problem actually exists in the Makefile for apache itself and part of it's install is to remove those directories. Since I'm sure many people will be using portupgrade to install Apache there should either be a patch to make sure that these directories aren't removed if they already exist or a warning/confirmation prompt is put in so that the user knows that this is going to happen. Just by looking at the Makefile for the port this isn't obvious.

The lines in question (from /usr/ports/www/apache13-modssl/work/apache_1.3.26)

(line 332) $(RM) -rf $(root)$(htdocsdir).default
(line 336) $(RM) -rf $(root)$(cgidir).default

Fix: 

Either have a patch that removes those two lines from the Makefile or gracefully handle this in such a way that the user is not likely to lose their data directories without realizing it.
How-To-Repeat:       On a FreeBSD machine where Apache (or Apache+mod-ssl) has previously been installed from ports, use the portupgrade tool (or remove the old port with pkg_delete [leaving your data directories] or installing the new version overtop with FORCE_PKG_REGISTER=YES) to install the latest version of Apache, 1.3.26.
Comment 1 dwcjr 2002-06-20 17:42:12 UTC
Wasn't this fixed in portrevision 1?

-- 
David W. Chapman Jr.
dwcjr@inethouston.net	Raintree Network Services, Inc. <www.inethouston.net>
dwcjr@freebsd.org	FreeBSD Committer <www.FreeBSD.org>
Comment 2 Patrick Li freebsd_committer freebsd_triage 2002-06-22 19:15:26 UTC
State Changed
From-To: open->closed

Fixed, Thanks! Sorry i missed this one :(