Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Jun 1997 14:17:38 +0200
From:      Andreas Klemm <andreas@klemm.gtn.com>
To:        "Andrey A. Chernov" <ache@FreeBSD.ORG>
Cc:        freebsd-ports@FreeBSD.ORG
Subject:   Re: ports/3804
Message-ID:  <19970607141738.32354@klemm.gtn.com>
In-Reply-To: <199706071139.EAA25869@freefall.freebsd.org>; from Andrey A. Chernov on Sat, Jun 07, 1997 at 04:39:17AM -0700
References:  <199706071139.EAA25869@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jun 07, 1997 at 04:39:17AM -0700, Andrey A. Chernov wrote:
> Synopsis: apache overwrites existing local config files during installation
> 
> State-Changed-From-To: open-closed
> State-Changed-By: ache
> State-Changed-When: ÓÂ 7 ÉÀÎ 1997 04:36:54 PDT
> State-Changed-Why: 
> Misreported PR. Apache install target NOT overwrites config files.
> Check what actually happens in your system and re-roll another
> PR if another reaso will be found.

Andrey, would have been very nice not to close this PR so quickly
indicating, that you take my observation as a "low budget 
production" *sigh*

But after investigating the real cause for this behaviour I
partly understand why you did so ... ;-)

Ok, the ports Makefile recognizes, that the config files will
be installed with the trailing "-dist", if there are config
files in the /usr/local/etc/apache directory.

The evil thing is, that the local config files will be wiped
out by a package delete operation, because the PLIST file
contains
	etc/apache/httpd.conf
	etc/apache/srm.conf
	etc/apache/access.conf
	etc/apache/mime.types

The PLIST file should contain
	etc/apache/httpd.conf-dist
	etc/apache/srm.conf-dist
	etc/apache/access.conf-dist
	etc/apache/mime.types-dist

Then you could cleanly remove an apache version using pkg_install
without loosing your local configuration and reinstall a newer
version.

But if you'd do so, another problem arises ... building 
packages. A first time apache installation wouldn't create
the files
	etc/apache/httpd.conf-dist
	etc/apache/srm.conf-dist
	etc/apache/access.conf-dist
	etc/apache/mime.types-dist
because the "extra intelligence" in the ports Makefile.

And an apache tarball creatiion would probably fail because
of the missing files.

I'd vote for the following:

Make the Makefile simpler and always install the files
	etc/apache/httpd.conf-dist
	etc/apache/srm.conf-dist
	etc/apache/access.conf-dist
	etc/apache/mime.types-dist

Then (if you like) create missing config files by copying
them from the -dist files.

Then change PLIST to contain the files with the trailing -dist.

Then everything would work as expected !

-- 
Andreas Klemm | klemm.gtn.com - powered by
                    Symmetric MultiProcessor FreeBSD
                       http://www.freebsd.org/~fsmp/SMP/SMP.html
                          http://www.freebsd.org/~fsmp/SMP/benches.html



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