[libvirt] [PATCH] spec: Avoid RPM verification errors on nwfilter XMLs

Daniel P. Berrange berrange at redhat.com
Wed Apr 19 09:31:17 UTC 2017


On Thu, Apr 13, 2017 at 02:41:42PM +0200, Jiri Denemark wrote:
> On Thu, Apr 13, 2017 at 13:28:18 +0100, Daniel P. Berrange wrote:
> > On Thu, Apr 13, 2017 at 02:23:08PM +0200, Jiri Denemark wrote:
> > > /etc/libvirt/nwfilter/*.xml files are installed with no UUID, which
> > > means libvirtd will automatically alter all of them once it starts. Thus
> > > RPM verification will always fail on them. Let's use a trick similar to
> > > the default network XML and store nwfilter XMLs in /usr/share. They will
> > > be copied into /etc in %post. Additionally the /etc files are marked as
> > > %ghost so that they are uninstalled if the RPM package is removed.
> > 
> > This feels wrong to me - we don't remove any other XML files in /etc/libvirt
> > when we uninstall the RPMs.
> 
> Well, it matches what we do now. We do remove nwfilter files from /etc
> since our current spec file considers the nwfilter XMLs as data files.

Ok, I didn't realize that. ACK on the basis that it isn't worse.

> > Should we not instead mark it is %config so that RPM knows the files
> > are liable to be changed by local admin and thus not report
> > verification errors.
> 
> Changing them to %config would be possible too, but this would mean
> *.rpmnew files would be created on every upgrade, wouldn't it? I'd say
> the files should not be in /etc in the first place since we don't even
> expect users to modify them.

Yes, we should never have added them to /etc by default, but I don't see
a viable way to stop that now without breaking  apps like openstack which
assume they exist there.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list