From: Jiri Denemark Date: Thu, 23 May 2019 12:31:37 +0000 (+0200) Subject: spec: Fix permissions of nwfilter XMLs X-Git-Tag: v5.4.0-rc1~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f87d5a964f648e78ad95b26a286e2670b0da72e2;p=thirdparty%2Flibvirt.git spec: Fix permissions of nwfilter XMLs 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 Reviewed-by: Andrea Bolognani --- diff --git a/libvirt.spec.in b/libvirt.spec.in index 5bd3e30509..970d2742ac 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -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 || :