From owner-freebsd-ports@FreeBSD.ORG Thu Apr 9 10:48:42 2009 Return-Path: Delivered-To: ports@freebsd.org Received: from straylight.ringlet.net (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with SMTP id B1EDE1065674 for ; Thu, 9 Apr 2009 10:48:40 +0000 (UTC) (envelope-from roam@ringlet.net) Received: (qmail 5878 invoked by uid 1000); 9 Apr 2009 10:44:17 -0000 Date: Thu, 9 Apr 2009 13:44:17 +0300 From: Peter Pentchev To: Guido Falsi Message-ID: <20090409104417.GA945@straylight.m.ringlet.net> References: <20090409094545.GB43377@megatron.madpilot.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline In-Reply-To: <20090409094545.GB43377@megatron.madpilot.net> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: ports@freebsd.org Subject: Re: squidguard and default blacklists in plist X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2009 10:48:42 -0000 --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 09, 2009 at 11:45:45AM +0200, Guido Falsi wrote: > Hi, >=20 > I'm the maintainer of the www/squidguard port. >=20 > 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 --=20 Peter Pentchev roam@ringlet.net roam@space.bg roam@FreeBSD.org 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. --LQksG6bCIzRHxTLp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAknd0YEACgkQ7Ri2jRYZRVNhpgCfSR/o5DpkHAQY6uEp9oduZY1z fIIAnRKZ77rifmhY674a5h2vmjv8JEe0 =bBCR -----END PGP SIGNATURE----- --LQksG6bCIzRHxTLp--