ports/93214: [UNBREAK]www/emp: add @dirrmtry to pkg-plist

Allan Bowhill allanb at u.washington.edu
Sun Feb 12 00:30:19 UTC 2006


>Number:         93214
>Category:       ports
>Synopsis:       [UNBREAK]www/emp: add @dirrmtry to pkg-plist
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 12 00:30:18 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Allan Bowhill
>Release:        
>Organization:
>Environment:
FreeBSD sputnik.attbi.com 6.0-STABLE FreeBSD 6.0-STABLE #0: Mon Jan 30 00:23:05 PST 2006     root at sputnik.attbi.com:/usr/obj/usr/src/sys/GENERIC  i386
       
>Description:
This port installs itself into the ${CGI-BIN} directory on installation.

However, the ports build system has flagged my port in error becuase it doesn't erase an empty ${CGI-BIN} directory on deinstallation. 

The ports build manager has informed me to change this by using @dirrmtry so this port silently erases the cgi-bin directory on deinstallation if the directory happens to be empty.

I think this change will cause problems for several reasons:

1. Webserver or other configuration files may depend on the ${CGI-BIN} directory being there, empty or not. 

2. This port isn't necessarily responsible for creating the directory in the first place, so should not assume the directory should be erased on de-installation. Even if it is empty at the time.

3. Using @dirrmtry, according to the porter's handbook, silently deletes directories. Doing this to cgi-bin might make for clean builds, but webserver sysadmins who are probably going to think they've been hacked when their cgi directory disappears without a trace in the logfiles.

This is your call. You will have to decide which usage (@dirrmtry or no @dirrmtry) introduces a bug.
>How-To-Repeat:
without @dirrmtry:

install apache, and configure a cgi-bin directory
install www/emp
pkg_delete www/emp
The cgi-bin directory is left intact, even if empty. This is a passive approach to de-installation.

with @dirrmtry ${CGI-BIN} to pkg_plist:

install apache, configure a cgi-bin directory, and install www/emp
pkg_delete www/emp
The cgi-bin directory is gone without a trace in the logfile.

The behavior is the same with or without @dirrmtry in if another file exists in the ${CGI-BIN} directory.


>Fix:
If you think it would result in fewer problems for the user, please add @dirrmtry /usr/local/www/cgi-bin. I don't know what the exact syntax would be to match the makefile variable ${CGI-BIN}, perhaps: @dirrmtry %%CGI-BIN%%? I don't even know if this is supported yet.

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list