]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
spec: Fix permissions of nwfilter XMLs
authorJiri Denemark <jdenemar@redhat.com>
Thu, 23 May 2019 12:31:37 +0000 (14:31 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Mon, 27 May 2019 13:00:11 +0000 (15:00 +0200)
The nwfilter XML files stored in /etc/libvirt/nwfilter are copied in a
%post scriptlet from /usr/share/libvirt/nwfilter/*.xml. While the files
in /usr/share are created with mode 0644, libvirt creates the files in
/etc/libvirt/nwfilter with mode 0600. Since 0600 is also stored in the
RPM database, we need to chmod the files copied from /usr/share to make
sure RPM verification does not complain about changed permissions.

https://bugzilla.redhat.com/show_bug.cgi?id=1628475

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
libvirt.spec.in

index 5bd3e30509d3d5b634ac4b54c0541fe09ccd680c..970d2742ac9fcf9265fe9c81863a1fbd4c3243dd 100644 (file)
@@ -1441,6 +1441,8 @@ rm -rf %{_localstatedir}/lib/rpm-state/libvirt || :
 
 %post daemon-config-nwfilter
 cp %{_datadir}/libvirt/nwfilter/*.xml %{_sysconfdir}/libvirt/nwfilter/
+# libvirt saves these files with mode 600
+chmod 600 %{_sysconfdir}/libvirt/nwfilter/*.xml
 # Make sure libvirt picks up the new nwfilter defininitons
 mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || :
 touch %{_localstatedir}/lib/rpm-state/libvirt/restart || :