[libvirt] [PATCH 1/2] Only keep one polkit rules file

Eric Blake eblake at redhat.com
Sat Oct 13 20:41:57 UTC 2012


On 10/13/2012 08:28 AM, Cole Robinson wrote:
> Just tweak it at build time depending on what polkit version we are
> building for.
> ---

>  
> +libvirtd.policy: libvirtd.policy.in $(top_builddir)/config.status
> +	$(AM_V_GEN) sed \
> +	    -e 's![@]authaction[@]!$(policyauth)!g' \
> +	    < $< > $@-t && \
> +	mv $@-t $@
> +BUILT_SOURCES += libvirtd.policy

This builds into $(builddir) (which is correct, since the file is not
independent of configure results, and therefore must not be shipped in a
tarball)...

> +
>  install-data-local: install-init-redhat install-init-systemd install-init-upstart \
>  		install-data-sasl install-data-polkit \
>  		install-logrotate install-sysctl
> @@ -197,7 +203,7 @@ uninstall-local:: uninstall-init-redhat uninstall-init-systemd uninstall-init-up
>  if HAVE_POLKIT
>  install-data-polkit::
>  	$(MKDIR_P) $(DESTDIR)$(policydir)
> -	$(INSTALL_DATA) $(srcdir)/$(policyfile) $(DESTDIR)$(policydir)/org.libvirt.unix.policy
> +	$(INSTALL_DATA) $(srcdir)/libvirtd.policy $(DESTDIR)$(policydir)/org.libvirt.unix.policy

...but here, you are trying to install it from $(srcdir), which doesn't
quite work with VPATH builds.  I think that just dropping $(srcdir)/
will work, but it would take an actual VPATH build to prove that, and I
didn't have time for that today.

I like the idea; ACK if my tweak works when tested in a VPATH build.

> +++ b/daemon/libvirtd.policy.in
> @@ -0,0 +1,42 @@
> +<!DOCTYPE policyconfig PUBLIC
> + "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
> + "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
> +
> +<!--
> +Policy definitions for libvirt daemon
> +
> +Copyright (c) 2007 Daniel P. Berrange <berrange redhat com>
> +
> +libvirt is licensed to you under the GNU Lesser General Public License
> +version 2. See COPYING for details.

Eww - why aren't we using LGPLv2+ here?  That's an independent bug, but
one that we need to fix, if Dan is willing as initial copyright holder.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121013/d3277b9d/attachment-0001.sig>


More information about the libvir-list mailing list