Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Apr 2009 13:44:17 +0300
From:      Peter Pentchev <roam@ringlet.net>
To:        Guido Falsi <mad@madpilot.net>
Cc:        ports@freebsd.org
Subject:   Re: squidguard and default blacklists in plist
Message-ID:  <20090409104417.GA945@straylight.m.ringlet.net>
In-Reply-To: <20090409094545.GB43377@megatron.madpilot.net>
References:  <20090409094545.GB43377@megatron.madpilot.net>

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

--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--



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