mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
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 <jdenemar@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
e67b0a4576
commit
f87d5a964f
@ -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 || :
|
||||
|
Loading…
Reference in New Issue
Block a user