Skip site navigation (1)Skip section navigation (2)
Date:      Wed,  7 Apr 2010 00:12:14 -0400 (EDT)
From:      Sahil Tandon <sahil@tandon.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        itetcu@FreeBSD.org, garga@FreeBSD.org
Subject:   ports/145448: [PATCH] security/clamav: tweak pkg-plist to unbreak @dirrmtry
Message-ID:  <20100407041214.81E23170FC@spartan.hamla.org>
Resent-Message-ID: <201004070420.o374K4dk009480@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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
+@cwd /
 @dirrmtry %%DBDIR%%
 @dirrmtry %%LOGDIR%%
 @dirrmtry %%RUNDIR%%
--- clamav.diff ends here ---

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100407041214.81E23170FC>