ports/145448: [PATCH] security/clamav: tweak pkg-plist to unbreak @dirrmtry

Sahil Tandon sahil at tandon.net
Wed Apr 7 04:20:04 UTC 2010


>Number:         145448
>Category:       ports
>Synopsis:       [PATCH] security/clamav: tweak pkg-plist to unbreak @dirrmtry
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 07 04:20:03 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Sahil Tandon
>Release:        FreeBSD 9.0-RELEASE i386
>Organization:
>Environment:

	
>Description:
Because the @dirrmtry macro prepends PREFIX (via %D) to its arguments, it does nothing in this pkg-plist since %%DBDIR%%, %%LOGDIR%% and %%RUNDIR%% are not relative to PREFIX.  To correct this, one can reset the PREFIX to "/" before using @dirrmtry.  The fact that empty dirs are left behind is not caught by the mtree checks on a tinderbox since the dirs are in /var, and not relative to PREFIX.  This is not such a big deal, but I thought it would be nice if the port cleaned up its empty dirs at deinstall.
>How-To-Repeat:
Install security/clamav and then deinstall; notice that the three /var/foo directories, despite being empty, are left behind.  The pkg-message references these three directories, but it's probably good form to delete them automatically if they're empty.
>Fix:

	



--- clamav.diff begins here ---
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/security/clamav/pkg-plist,v
retrieving revision 1.39
diff -u -r1.39 pkg-plist
--- pkg-plist	6 Apr 2010 12:01:13 -0000	1.39
+++ pkg-plist	7 Apr 2010 04:01:38 -0000
@@ -31,6 +31,7 @@
 @exec [ -f %B/freshclam.conf ] || cp %B/%f %B/freshclam.conf
 @unexec [ -s %%DBDIR%%/daily.cvd ] || rm -f %%DBDIR%%/daily.cvd || true
 @unexec [ -s %%DBDIR%%/main.cvd ] || rm -f %%DBDIR%%/main.cvd || true
+ at cwd /
 @dirrmtry %%DBDIR%%
 @dirrmtry %%LOGDIR%%
 @dirrmtry %%RUNDIR%%
--- clamav.diff ends here ---

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



More information about the freebsd-ports-bugs mailing list