[libvirt] [PATCH 7/9] build: link setuid_rpc_client against JSON_LIBS

Ján Tomko posted 9 patches 7 years, 1 month ago
[libvirt] [PATCH 7/9] build: link setuid_rpc_client against JSON_LIBS
Posted by Ján Tomko 7 years, 1 month ago
I have no idea how it builds without and switching to Jansson
exposes this.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
 src/Makefile.am | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/Makefile.am b/src/Makefile.am
index fd09bfd17..2d2805818 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -743,6 +743,7 @@ libvirt_setuid_rpc_client_la_LDFLAGS = \
 		$(AM_LDFLAGS) \
 		$(LIBXML_LIBS) \
 		$(SECDRIVER_LIBS) \
+		$(JSON_LIBS) \
 		$(NULL)
 libvirt_setuid_rpc_client_la_CFLAGS = \
 		-DLIBVIRT_SETUID_RPC_CLIENT \
-- 
2.16.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 7/9] build: link setuid_rpc_client against JSON_LIBS
Posted by Peter Krempa 7 years, 1 month ago
On Thu, Mar 29, 2018 at 01:09:56 +0200, Ján Tomko wrote:
> I have no idea how it builds without and switching to Jansson
> exposes this.
> 
> Signed-off-by: Ján Tomko <jtomko@redhat.com>
> ---
>  src/Makefile.am | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/Makefile.am b/src/Makefile.am
> index fd09bfd17..2d2805818 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -743,6 +743,7 @@ libvirt_setuid_rpc_client_la_LDFLAGS = \
>  		$(AM_LDFLAGS) \
>  		$(LIBXML_LIBS) \
>  		$(SECDRIVER_LIBS) \
> +		$(JSON_LIBS) \

Hmmm, isn't the setuid client supposed to be very minimal, and thus
should not have dependencies on most libraries?

Danpb (cc'd) might add some insight.
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 7/9] build: link setuid_rpc_client against JSON_LIBS
Posted by Ján Tomko 7 years, 1 month ago
On Sat, Mar 31, 2018 at 11:05:38AM +0200, Peter Krempa wrote:
>On Thu, Mar 29, 2018 at 01:09:56 +0200, Ján Tomko wrote:
>> I have no idea how it builds without and switching to Jansson
>> exposes this.
>>
>> Signed-off-by: Ján Tomko <jtomko@redhat.com>
>> ---
>>  src/Makefile.am | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/src/Makefile.am b/src/Makefile.am
>> index fd09bfd17..2d2805818 100644
>> --- a/src/Makefile.am
>> +++ b/src/Makefile.am
>> @@ -743,6 +743,7 @@ libvirt_setuid_rpc_client_la_LDFLAGS = \
>>  		$(AM_LDFLAGS) \
>>  		$(LIBXML_LIBS) \
>>  		$(SECDRIVER_LIBS) \
>> +		$(JSON_LIBS) \
>
>Hmmm, isn't the setuid client supposed to be very minimal, and thus
>should not have dependencies on most libraries?
>
>Danpb (cc'd) might add some insight.

I see it now, I overlooked the use of WITH_YAJL in config-post.h:
config-post.h:# undef WITH_YAJL
config-post.h:# undef WITH_YAJL2

So even though the sources include virjson.c, it does not actually use
it.

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 7/9] build: link setuid_rpc_client against JSON_LIBS
Posted by Daniel P. Berrangé 7 years, 1 month ago
On Sat, Mar 31, 2018 at 03:16:55PM +0200, Ján Tomko wrote:
> On Sat, Mar 31, 2018 at 11:05:38AM +0200, Peter Krempa wrote:
> > On Thu, Mar 29, 2018 at 01:09:56 +0200, Ján Tomko wrote:
> > > I have no idea how it builds without and switching to Jansson
> > > exposes this.
> > > 
> > > Signed-off-by: Ján Tomko <jtomko@redhat.com>
> > > ---
> > >  src/Makefile.am | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/src/Makefile.am b/src/Makefile.am
> > > index fd09bfd17..2d2805818 100644
> > > --- a/src/Makefile.am
> > > +++ b/src/Makefile.am
> > > @@ -743,6 +743,7 @@ libvirt_setuid_rpc_client_la_LDFLAGS = \
> > >  		$(AM_LDFLAGS) \
> > >  		$(LIBXML_LIBS) \
> > >  		$(SECDRIVER_LIBS) \
> > > +		$(JSON_LIBS) \
> > 
> > Hmmm, isn't the setuid client supposed to be very minimal, and thus
> > should not have dependencies on most libraries?
> > 
> > Danpb (cc'd) might add some insight.
> 
> I see it now, I overlooked the use of WITH_YAJL in config-post.h:
> config-post.h:# undef WITH_YAJL
> config-post.h:# undef WITH_YAJL2
> 
> So even though the sources include virjson.c, it does not actually use
> it.

Yep, exactly this was a bit of a nasty hack I had todo to cut down the
deps.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list