On 10/22/2013 11:23 AM, Michal Privoznik wrote:
> The libvirt_setuid_rpc_client_la depends on vircommand.c, in which we
> are conditionally calling aa_change_profile() - an AppArmor helper
> function. However, in linking the libvirt-setuid-rpc-client.la we have
> forgot to link AppArmor libraries leaving us with following error:
> 
> make[3]: Entering directory `/home/zippy/work/libvirt/libvirt.git/tools'
>   CCLD     virsh
>   CCLD     virt-host-validate
>   CCLD     virt-login-shell
> ../src/.libs/libvirt-setuid-rpc-client.a(libvirt_setuid_rpc_client_la-vircommand.o):
>  In function `virExec':
> /home/zippy/work/libvirt/libvirt.git/src/util/vircommand.c:653: undefined 
> reference to `aa_change_profile'
> collect2: error: ld returned 1 exit status
> make[3]: *** [virt-login-shell] Error 1
> make[3]: *** Waiting for unfinished jobs....
> 
> Signed-off-by: Michal Privoznik <[email protected]>
> ---
>  src/Makefile.am | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 9dab4df..688c34c 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -2027,15 +2027,19 @@ libvirt_setuid_rpc_client_la_SOURCES =                
> \
>  libvirt_setuid_rpc_client_la_LDFLAGS =               \
>               $(AM_LDFLAGS)                   \
>               $(LIBXML_LIBS)                  \
> -             $(SELINUX_LIBS)                 \
> -             $(NULL)
> +             $(SELINUX_LIBS)

This hunk is spurious - we LIKE the trailing $(NULL).

> +
> +if WITH_SECDRIVER_APPARMOR
> +libvirt_setuid_rpc_client_la_LDFLAGS += $(APPARMOR_LIBS)
> +libvirt_setuid_rpc_client_la_CFLAGS += $(APPARMOR_CFLAGS)
> +endif WITH_SECDRIVER_APPARMOR

NACK; I think Jim's patch (version 2 at
https://www.redhat.com/archives/libvir-list/2013-October/msg00953.html)
addresses the same problem in a nicer manner.

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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to