
On 04.09.2013 04:52, Eric Blake wrote:
'make rpm' with client_local set to 1 (by manual modification, or with RHEL 5 on s390) warns:
RPM build errors: Installed (but unpackaged) file(s) found: /etc/libvirt/nwfilter/allow-arp.xml /etc/libvirt/nwfilter/allow-dhcp-server.xml /etc/libvirt/nwfilter/allow-dhcp.xml /etc/libvirt/nwfilter/allow-incoming-ipv4.xml /etc/libvirt/nwfilter/allow-ipv4.xml /etc/libvirt/nwfilter/clean-traffic.xml /etc/libvirt/nwfilter/no-arp-ip-spoofing.xml /etc/libvirt/nwfilter/no-arp-mac-spoofing.xml /etc/libvirt/nwfilter/no-arp-spoofing.xml /etc/libvirt/nwfilter/no-ip-multicast.xml /etc/libvirt/nwfilter/no-ip-spoofing.xml /etc/libvirt/nwfilter/no-mac-broadcast.xml /etc/libvirt/nwfilter/no-mac-spoofing.xml /etc/libvirt/nwfilter/no-other-l2-traffic.xml /etc/libvirt/nwfilter/no-other-rarp-traffic.xml /etc/libvirt/nwfilter/qemu-announce-self-rarp.xml /etc/libvirt/nwfilter/qemu-announce-self.xml /usr/share/polkit-1/actions/org.libvirt.api.policy
The bulk of these are fixed with this patch.
* examples/xml/nwfilter/Makefile.am (install-data-local) (uninstall-local): Make conditional.
Signed-off-by: Eric Blake <eblake@redhat.com> ---
This is one alternative; see 3b/n for the other alternative (that is, I'm not sure whether it's better to have the Makefiles match the spec file layout, or to have the spec file paper over unconditional Makefiles). Preferences?
examples/xml/nwfilter/Makefile.am | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/examples/xml/nwfilter/Makefile.am b/examples/xml/nwfilter/Makefile.am index 6264428..ec1e7ee 100644 --- a/examples/xml/nwfilter/Makefile.am +++ b/examples/xml/nwfilter/Makefile.am @@ -39,6 +39,7 @@ confdir = $(sysconfdir)/libvirt
NWFILTER_DIR = "$(DESTDIR)$(sysconfdir)/libvirt/nwfilter"
+if WITH_NWFILTER install-data-local: $(MKDIR_P) "$(NWFILTER_DIR)" for f in $(FILTERS); do \ @@ -50,3 +51,4 @@ uninstall-local:: rm -f "$(NWFILTER_DIR)/$$f"; \ done -test -z $(shell ls $(NWFILTER_DIR)) || rmdir $(NWFILTER_DIR) +endif WITH_NWFILTER
I like this approach more, since it fixes Makefile too. We shouldn't be installing files we weren't requested. ACK to this version. Michal