Daniel P. Berrange wrote:
On Tue, Mar 13, 2007 at 07:48:11PM -0700, David Lutterkort wrote:On Tue, 2007-03-13 at 23:22 +0000, Daniel P. Berrange wrote:When we build an RPM we also include the default.xml file in the /etc/libvirt/qemu/networks directory, as well as the autostart symlink.So anyone installing the libvirt RPM gets the default network, whether they're doing an upgrade or fresh install. This is reasonable for the new install, or the first time you upgrade to a new neworking-enabled libvirt. If you subsequently delete the default network, or turn off autostarting, then along comes the next libvirt RPM update and autostart gets turned back on, and/or the default network recreated.Have you tried how rpm reacts to a %config(noreplace) for those files ? I am not sure how it deals with file deletions, but for files changed by the user, it properly creates the new file as .rpmnew (and some people actually have scripts to help them reconcile the rpmnew files with their changes, interactively, of course)The deletion of files is unfortunately the most important bit - and asfar as my testing has seen, no matter what you annotate with, if you delete a file it will always get re-created upon upgrade :-(
I can't find an example of default.xml in CVS, so I may be talking through my hat, but some suggestions:
(1) Allow the default network to be disabled by editing the default.xml file, eg:
<networks disabled='true'> ... (2) Put a big comment at the top of the file saying:<!-- to disable default network, rename this file to default.xml.disabled -->
and then explicitly check for this in %post before trying to reinstall the default.xml file.
Rich. -- Emerging Technologies, Red Hat http://et.redhat.com/~rjones/ 64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421 "[Negative numbers] darken the very whole doctrines of the equations and make dark of the things which are in their nature excessively obvious and simple" (Francis Maseres FRS, mathematician, 1759)
smime.p7s
Description: S/MIME Cryptographic Signature
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list