Remembering tweaks for ports?
Matthew Seaman
m.seaman at infracaninophile.co.uk
Sat Nov 6 13:02:54 PST 2004
On Sat, Nov 06, 2004 at 03:15:40PM -0500, Dan Swartzendruber wrote:
>
> Forgive me if this has been asked before. Is there any way to not have to
> re-customize ports whenever you do an upgrade? One that is particularly
> annoying to me is the interaction between amavisd-new and clamav. When
> clamav is installed (even via portupgrade), it sets ownership (uid and gid)
> of various directories to clamav:clamav. Unfortunately, amavisd-new wants
> vscan:vscan. I found this out the hard way when I did the initial install,
> but every time clamav port is upgraded, I have to go tweak the same
> directories. Am I missing something here?
Yes. If you look at the security/clamav port Makefile you'll see
within it:
CLAMAVUSER?= clamav
CLAMAVGROUP?= clamav
where the '?=' assignment operator allows you to override that
assignment, usually from the command line. So you can do:
# cd /usr/ports/security/clamav
# make CLAMAVUSER=vscan CLAMAVGROUP=vscan
"But" I hear you say "that's almost as onerous as having to run
chown(1) on the various files anyway." However, you are using
portupgrade(1). Look at the configuration file
/usr/local/etc/pkgtools.cfg -- specifically, look at the 'MAKE_ARGS'
array. If you edit the config file to add:
'security/clamav' => [ 'CLAMAVUSER=vscan', 'CLAMAVGROUP=vscan', ],
to that array and then use portupgrade religiously for doing all of
your port maintenance, then it will be installed with vscan:vscan
ownership automatically.
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614 Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20041106/b946958b/attachment.bin
More information about the freebsd-questions
mailing list