]> git.ipfire.org Git - thirdparty/libvirt.git/commit
build: move file deleting action from %files list to %install
authorYufang Zhang <yufang521247@gmail.com>
Wed, 9 Jan 2013 12:18:35 +0000 (20:18 +0800)
committerEric Blake <eblake@redhat.com>
Thu, 10 Jan 2013 00:18:36 +0000 (17:18 -0700)
commita054aa94e8497323e367ed132f519ebdba0fbade
treedf25bb017ae892b5864450b778f682700c104508
parent5c31525082d039c449912a88978aabdc2d05ac73
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 commit a1fd56c.
(cherry picked from commit daef7c9e9c5abef65e77116a1cabad37c0c0a897)
libvirt.spec.in