On Thu, Apr 09, 2009 at 11:45:45AM +0200, Guido Falsi wrote: > Hi, > > I'm the maintainer of the www/squidguard port. > > Some time ago I have been asked to try not make the port remove the > blacklists when, after installing the default ones, they were modified > by the user. [snip] > I have few options at this point:
The usual approach is to install them as .dist or .sample or something like that, copy them with their real names, and only remove the "real" ones if they are the same as the sample ones. This involes several steps: - modify the upstream source to install them with a .dist or .sample extension, or install them in a different subdirectory if the program will process them even with a different extension; - modify pkg-plist to refer to the sample files, not the real ones; - when installing, use either pkg-plist's @exec directive or a pkg-install script to check if the "real" files exist and, if they don't, copy the .dist file to one with the real filename; - when deinstalling, use either pkg-plist's @unexec directive or a pkg-install script to check if the "real" files are the same as the sample ones and, if they are, remove them. For an example of doing this with a .dist extension, take a look at the mail/vpopmail port's handling of the etc/vpopmail.mysql and etc/vlimits.default files: - files/patch-Makefile.in installs them as .dist files; - pkg-plist contains the .dist files; - pkg-plist contains an @exec if [ ! -f ... ]; then cp... - pkg-plist contains an @unexec if cmp -s ...; then rm... G'luck, Peter -- Peter Pentchev [email protected] [email protected] [email protected] PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 I had to translate this sentence into English because I could not read the original Sanskrit.
pgphb2JflP2qc.pgp
Description: PGP signature
