mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 15:45:28 +00:00
build: move file deleting action from %files list to %install
When building libvirt rpms on rhel5, I got the following error: File must begin with "/": rm File must begin with "/": -f File must begin with "/": $RPM_BUILD_ROOT/etc/sysctl.d/libvirtd Installed (but unpackaged) file(s) found: /etc/sysctl.d/libvirtd It is triggerd by the %files list of libvirt daemon: %if 0%{?fedora} >= 14 || 0%{?rhel} >= 6 %config(noreplace) %{_prefix}/lib/sysctl.d/libvirtd.conf %else rm -f $RPM_BUILD_ROOT%{_prefix}/lib/sysctl.d/libvirtd.conf %endif After checking document of rpm spec file, I think it would be better to move the file deleting line from %files list to %install script. Bug introduced in commita1fd56c
. (cherry picked from commitdaef7c9e9c
)
This commit is contained in:
parent
5c31525082
commit
a054aa94e8
@ -1391,6 +1391,10 @@ mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} < 14 && 0%{?rhel} < 6
|
||||
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/sysctl.d/libvirtd.conf
|
||||
%endif
|
||||
|
||||
%clean
|
||||
rm -fr %{buildroot}
|
||||
|
||||
@ -1630,8 +1634,6 @@ fi
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
|
||||
%if 0%{?fedora} >= 14 || 0%{?rhel} >= 6
|
||||
%config(noreplace) %{_prefix}/lib/sysctl.d/libvirtd.conf
|
||||
%else
|
||||
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/sysctl.d/libvirtd.conf
|
||||
%endif
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
|
||||
|
Loading…
Reference in New Issue
Block a user