Re: Bug: failing makefile target: uninstall

Paul Wouters <[email protected]> Tue, 25 Feb 2003 01:21:57 +0100 (MET)
Newsgroups gmane.network.freeswan.devel
Message-ID <[email protected]>
On Mon, 24 Feb 2003, Michael Richardson wrote:

>   okay, will this suffice?
> 
> uninstall:
> 	$(MAKE) $(MAKEFLAGS) install_file_list | egrep -v '(ipsec.conf|ipsec.d)' | xargs rm

Leaving the ipsec.secrets, but removing the ipsec.conf seems a bit odd to me. Those files should
only be uninstalled if they had been installed by this version of the software. If they were 
already there, and not overwritten, they should also not be purged now.

Why not use the scheme that rpm uses? The install target moves or adds (depending on
compatibility/security of the differences in configuration) the configuration file. When adding
using the .new extension, when overwriting, keeping a copy with an .old extension.
A subsequent uninstall can remove the configuration if it has not been changed from the original
distribution, or when a .old file appears. In the later case, it can also move that back to
the regular name.

I guess all of these schemes at some point break. But I think the best we can do is to try
and either keep or remove the entire set of "ipsec.conf/ipsec.d" and "ipsec.secrets".

Paul