[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 5/n RFC] build: avoid stranded file when polkit is not used

Untested for now (it's late for me), but seems right...

daemon/Makefile.am installs a .policy file if WITH_POLKIT is set
(which is supposedly the union between WITH_POLKIT0 and WITH_POLKIT1).
src/Makefile.am, on the other hand, installs a .policy file if
WITH_POLKIT1 is set.  When running 'make rpm' with client_only
manually set, on a Fedora 19 box, it appears that WITH_POLKIT1 is
true (the polkit 1 library exists) but WITH_POLKIT is false (the
spec file requests that configure explicitly use --without-polkit),
which leads to this failure:

RPM build errors:
    Installed (but unpackaged) file(s) found:

Fix it by adding another conditional.

Signed-off-by: Eric Blake <eblake redhat com>

I'll test this before pushing (and amend the commit message
to drop the first paragraph), even if it gets a positive
review in the meantime.

This patch was much easier to finally figure out once I first
wrote this other patch (still pending review):

 src/Makefile.am | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/Makefile.am b/src/Makefile.am
index 9b336fd..37beb6c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1497,7 +1497,9 @@ if WITH_POLKIT1
 libvirt_driver_access_la_SOURCES += $(ACCESS_DRIVER_POLKIT_SOURCES)

 polkitactiondir = $(datadir)/polkit-1/actions

 $(ACCESS_DRIVER_POLKIT_POLICY): $(srcdir)/access/viraccessperm.h \
     $(srcdir)/access/genpolkit.pl Makefile.am

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]