]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
nss: only link to yajl library and nothing else
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 31 Jul 2019 13:48:50 +0000 (14:48 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Wed, 7 Aug 2019 15:54:02 +0000 (16:54 +0100)
Now that the code does not refer to any libvirt headers,
except internal.h macros, it does not need to link to
any libvirt code, nor gnulib either. The only thing it
needs is yajl.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
config-post.h
src/Makefile.am
src/util/virfile.c
tools/Makefile.am

index 3d22c4396a1ca82470c16f962b2572a80a7882a1..7c07e05340ff7f9674453380f59a317c2850cac9 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-/*
- * The NSS module can be loaded into any binary and thus we want
- * to minimize what code is liable to be run. Especiall we need
- * to minimize use of any 3rd party libraries which have
- * __attribute__((constructor)) functions.
- *
- * The only way to avoid such deps is to re-compile the
- * functions with the code in question disabled, and for that we
- * must override the main config.h rules. Hence this file :-(
- */
-#ifdef LIBVIRT_NSS
-# undef HAVE_LIBNL
-# undef HAVE_LIBNL3
-# undef HAVE_LIBSASL2
-# undef HAVE_SYS_ACL_H
-# undef WITH_CAPNG
-# undef WITH_CURL
-# undef WITH_DEVMAPPER
-# undef WITH_DTRACE_PROBES
-# undef WITH_GNUTLS
-# undef WITH_LIBSSH
-# undef WITH_MACVTAP
-# undef WITH_NUMACTL
-# undef WITH_SASL
-# undef WITH_SSH2
-# undef WITH_VIRTUALPORT
-# undef WITH_SECDRIVER_SELINUX
-# undef WITH_SECDRIVER_APPARMOR
-#endif /* LIBVIRT_NSS */
-
 #ifndef __GNUC__
 # error "Libvirt requires GCC >= 4.8, or CLang"
 #endif
index 8ca714dd3468293048f657ded5410a14256b26f4..f111b2a1b412ca254ea5147aaf15ef77cda9ede0 100644 (file)
@@ -767,79 +767,6 @@ libvirt_iohelper_CFLAGS = \
 endif WITH_LIBVIRTD
 
 
-
-if WITH_NSS
-noinst_LTLIBRARIES += libvirt-nss.la
-
-libvirt_nss_la_SOURCES = \
-               util/viralloc.c \
-               util/viralloc.h \
-               util/viratomic.c \
-               util/viratomic.h \
-               util/virautoclean.h \
-               util/virbitmap.c \
-               util/virbitmap.h \
-               util/virbuffer.c \
-               util/virbuffer.h \
-               util/vircommand.c \
-               util/vircommand.h \
-               util/virenum.c \
-               util/virenum.h \
-               util/virerror.c \
-               util/virerror.h \
-               util/virfile.c \
-               util/virfile.h \
-               util/virhash.c \
-               util/virhash.h \
-               util/virhashcode.c \
-               util/virhashcode.h \
-               util/virjson.c \
-               util/virjson.h \
-               util/virkmod.c \
-               util/virkmod.h \
-               util/virlease.c \
-               util/virlease.h \
-               util/virlog.c \
-               util/virlog.h \
-               util/virmacmap.c \
-               util/virmacmap.h \
-               util/virobject.c \
-               util/virobject.h \
-               util/virpidfile.c \
-               util/virpidfile.h \
-               util/virprocess.c \
-               util/virprocess.h \
-               util/virrandom.c \
-               util/virrandom.h \
-               util/virsocketaddr.c \
-               util/virsocketaddr.h \
-               util/virstring.c \
-               util/virstring.h \
-               util/virthread.c \
-               util/virthread.h \
-               util/virthreadjob.c \
-               util/virthreadjob.h \
-               util/virtime.c \
-               util/virtime.h \
-               util/virutil.c \
-               util/virutil.h \
-               $(NULL)
-
-libvirt_nss_la_CFLAGS = \
-               -DLIBVIRT_NSS \
-               $(AM_CFLAGS) \
-               $(YAJL_CFLAGS) \
-               $(NULL)
-libvirt_nss_la_LDFLAGS = \
-               $(AM_LDFLAGS) \
-               $(NULL)
-
-libvirt_nss_la_LIBADD = \
-               $(YAJL_LIBS) \
-               $(NULL)
-endif WITH_NSS
-
-
 install-data-local: $(INSTALL_DATA_LOCAL) \
                $(INSTALL_DATA_DIRS:%=install-data-%)
        $(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt"
index 7667c16d2737af8feadbd47d78851c749138675a..81a3c096ebbf0df8cd455f961fd76a167a47194f 100644 (file)
@@ -631,8 +631,7 @@ int virFileUpdatePerm(const char *path,
 }
 
 
-#if defined(__linux__) && HAVE_DECL_LO_FLAGS_AUTOCLEAR && \
-    !defined(LIBVIRT_NSS)
+#if defined(__linux__) && HAVE_DECL_LO_FLAGS_AUTOCLEAR
 
 # if HAVE_DECL_LOOP_CTL_GET_FREE
 
index 61812a2cb1ed95f861667a4105b81ab42419d60e..09cada949b96d973b077e81a78aa1819689c572d 100644 (file)
@@ -493,8 +493,8 @@ nss_libnss_libvirt_impl_la_CFLAGS = \
        $(NULL)
 
 nss_libnss_libvirt_impl_la_LIBADD = \
-       ../gnulib/lib/libgnu.la \
-       ../src/libvirt-nss.la
+       $(YAJL_LIBS) \
+       $(NULL)
 
 nss_libnss_libvirt_la_SOURCES =
 nss_libnss_libvirt_la_LDFLAGS = \
@@ -524,8 +524,8 @@ nss_libnss_libvirt_guest_impl_la_CFLAGS = \
        $(NULL)
 
 nss_libnss_libvirt_guest_impl_la_LIBADD = \
-       ../gnulib/lib/libgnu.la \
-       ../src/libvirt-nss.la
+       $(YAJL_LIBS) \
+       $(NULL)
 
 nss_libnss_libvirt_guest_la_SOURCES =
 nss_libnss_libvirt_guest_la_LDFLAGS = \