Commit 1788e5fb authored by Cédric Bosdonnat's avatar Cédric Bosdonnat Committed by Daniel P. Berrange

Remove init-common dependency on libvirt-sandbox.so

Removing this dependency avoids getting all libvirt.so dependencies
loaded in our container.
parent eaeca994
......@@ -50,10 +50,7 @@ SANDBOX_RPC_FILES = \
libvirt-sandbox-rpcpacket.h \
$(NULL)
SANDBOX_HEADER_FILES = \
libvirt-sandbox.h \
libvirt-sandbox-main.h \
libvirt-sandbox-util.h \
SANDBOX_CONFIG_HEADER_FILES = \
libvirt-sandbox-config.h \
libvirt-sandbox-config-disk.h \
libvirt-sandbox-config-network.h \
......@@ -72,6 +69,12 @@ SANDBOX_HEADER_FILES = \
libvirt-sandbox-config-service.h \
libvirt-sandbox-config-service-systemd.h \
libvirt-sandbox-config-service-generic.h \
$(NULL)
SANDBOX_HEADER_FILES = \
libvirt-sandbox.h \
libvirt-sandbox-main.h \
libvirt-sandbox-util.h \
libvirt-sandbox-builder.h \
libvirt-sandbox-builder-initrd.h \
libvirt-sandbox-builder-machine.h \
......@@ -82,9 +85,10 @@ SANDBOX_HEADER_FILES = \
libvirt-sandbox-context.h \
libvirt-sandbox-context-interactive.h \
libvirt-sandbox-context-service.h \
$(SANDBOX_CONFIG_HEADER_FILES) \
$(NULL)
SANDBOX_SOURCE_FILES = \
libvirt-sandbox-main.c \
SANDBOX_CONFIG_SOURCE_FILES = \
libvirt-sandbox-util.c \
libvirt-sandbox-config.c \
libvirt-sandbox-config-disk.c \
......@@ -104,6 +108,10 @@ SANDBOX_SOURCE_FILES = \
libvirt-sandbox-config-service.c \
libvirt-sandbox-config-service-systemd.c \
libvirt-sandbox-config-service-generic.c \
$(NULL)
SANDBOX_SOURCE_FILES = \
libvirt-sandbox-main.c \
libvirt-sandbox-builder.c \
libvirt-sandbox-builder-initrd.c \
libvirt-sandbox-builder-machine.c \
......@@ -115,6 +123,8 @@ SANDBOX_SOURCE_FILES = \
libvirt-sandbox-context.c \
libvirt-sandbox-context-interactive.c \
libvirt-sandbox-context-service.c \
libvirt-sandbox-config-all.h \
$(SANDBOX_CONFIG_SOURCE_FILES) \
$(NULL)
libvirt_sandbox_1_0_ladir = $(includedir)/libvirt-sandbox-1.0/libvirt-sandbox
......@@ -169,31 +179,33 @@ libvirt_sandbox_1_0_la_LDFLAGS = \
libvirt_sandbox_init_common_SOURCES = libvirt-sandbox-init-common.c \
$(SANDBOX_GENERATED_RPC_FILES) \
$(SANDBOX_RPC_FILES) \
$(SANDBOX_CONFIG_HEADER_FILES) \
$(SANDBOX_CONFIG_SOURCE_FILES) \
$(NULL)
libvirt_sandbox_init_common_CFLAGS = \
-DLIBEXECDIR="\"$(libexecdir)\"" \
-DSANDBOXCONFIGDIR="\"$(sandboxconfigdir)\"" \
-DLOCALEDIR="\"$(datadir)/locale"\" \
-DLIBVIRT_SANDBOX_BUILD \
$(COVERAGE_CFLAGS) \
-I$(top_srcdir) \
-I$(top_builddir) \
$(LIBVIRT_GCONFIG_CFLAGS) \
$(GIO_UNIX_CFLAGS) \
$(LIBVIRT_GLIB_CFLAGS) \
$(LIBVIRT_GOBJECT_CFLAGS) \
$(CAPNG_CFLAGS) \
$(SELINUX_CFLAGS) \
$(WARN_CFLAGS) \
$(NULL)
libvirt_sandbox_init_common_LDFLAGS = \
-lutil \
$(COVERAGE_CFLAGS:-f%=-Wc,f%) \
$(GIO_UNIX_LIBS) \
$(LIBVIRT_GLIB_LIBS) \
$(LIBVIRT_GOBJECT_LIBS) \
$(LIBVIRT_GCONFIG_LIBS) \
$(CAPNG_LIBS) \
$(SELINUX_LIBS) \
$(WARN_CFLAGS) \
$(NULL)
libvirt_sandbox_init_common_LDADD = \
libvirt-sandbox-1.0.la \
$(NULL)
libvirt_sandbox_init_lxc_SOURCES = libvirt-sandbox-init-lxc.c
......
/*
* libvirt-sandbox.h: libvirt sandbox integration
[ *
* Copyright (C) 2010 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author: Daniel P. Berrange <berrange@redhat.com>
*/
#ifndef __LIBVIRT_SANDBOX_CONFIG_ALL_H__
#define __LIBVIRT_SANDBOX_CONFIG_ALL_H__
/* External include */
#include <libvirt-gconfig/libvirt-gconfig.h>
#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
/* Local includes */
#include <libvirt-sandbox/libvirt-sandbox-util.h>
#include <libvirt-sandbox/libvirt-sandbox-config-disk.h>
#include <libvirt-sandbox/libvirt-sandbox-config-mount.h>
#include <libvirt-sandbox/libvirt-sandbox-config-mount-file.h>
#include <libvirt-sandbox/libvirt-sandbox-config-mount-host-bind.h>
#include <libvirt-sandbox/libvirt-sandbox-config-mount-host-image.h>
#include <libvirt-sandbox/libvirt-sandbox-config-mount-guest-bind.h>
#include <libvirt-sandbox/libvirt-sandbox-config-mount-ram.h>
#include <libvirt-sandbox/libvirt-sandbox-config-network-address.h>
#include <libvirt-sandbox/libvirt-sandbox-config-network-filterref-parameter.h>
#include <libvirt-sandbox/libvirt-sandbox-config-network-filterref.h>
#include <libvirt-sandbox/libvirt-sandbox-config-network-route.h>
#include <libvirt-sandbox/libvirt-sandbox-config-network.h>
#include <libvirt-sandbox/libvirt-sandbox-config.h>
#include <libvirt-sandbox/libvirt-sandbox-config-initrd.h>
#include <libvirt-sandbox/libvirt-sandbox-config-interactive.h>
#include <libvirt-sandbox/libvirt-sandbox-config-service.h>
#include <libvirt-sandbox/libvirt-sandbox-config-service-systemd.h>
#include <libvirt-sandbox/libvirt-sandbox-config-service-generic.h>
#endif /* __LIBVIRT_SANDBOX_CONFIG_ALL_H__ */
/*
* Local variables:
* c-indent-level: 4
* c-basic-offset: 4
* indent-tabs-mode: nil
* tab-width: 8
* End:
*/
......@@ -23,7 +23,7 @@
#include <config.h>
#include <string.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
#include "libvirt-sandbox/libvirt-sandbox-config-all.h"
/**
* SECTION: libvirt-sandbox-config-disk
......
......@@ -23,7 +23,7 @@
#include <config.h>
#include <string.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
#include "libvirt-sandbox/libvirt-sandbox-config-all.h"
/**
* SECTION: libvirt-sandbox-config-initrd
......
......@@ -23,7 +23,7 @@
#include <config.h>
#include <string.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
#include "libvirt-sandbox/libvirt-sandbox-config-all.h"
/**
* SECTION: libvirt-sandbox-config-interactive
......
......@@ -23,7 +23,7 @@
#include <config.h>
#include <string.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
#include "libvirt-sandbox/libvirt-sandbox-config-all.h"
/**
* SECTION: libvirt-sandbox-config-mount-file
......
......@@ -23,7 +23,7 @@
#include <config.h>
#include <string.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
#include "libvirt-sandbox/libvirt-sandbox-config-all.h"
/**
* SECTION: libvirt-sandbox-config-mount-guest-bind
......
......@@ -23,7 +23,7 @@
#include <config.h>
#include <string.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
#include "libvirt-sandbox/libvirt-sandbox-config-all.h"
/**
* SECTION: libvirt-sandbox-config-mount-host-bind
......
......@@ -23,7 +23,7 @@
#include <config.h>
#include <string.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
#include "libvirt-sandbox/libvirt-sandbox-config-all.h"
/**
* SECTION: libvirt-sandbox-config-mount-image
......
......@@ -23,7 +23,7 @@
#include <config.h>
#include <string.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
#include "libvirt-sandbox/libvirt-sandbox-config-all.h"
/**
* SECTION: libvirt-sandbox-config-mount-ram
......
......@@ -23,7 +23,7 @@
#include <config.h>
#include <string.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
#include "libvirt-sandbox/libvirt-sandbox-config-all.h"
/**
* SECTION: libvirt-sandbox-config-mount
......
......@@ -23,7 +23,7 @@
#include <config.h>
#include <string.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
#include "libvirt-sandbox/libvirt-sandbox-config-all.h"
/**
* SECTION: libvirt-sandbox-config-network_address
......
......@@ -23,7 +23,7 @@
#include <config.h>
#include <string.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
#include "libvirt-sandbox/libvirt-sandbox-config-all.h"
/**
* SECTION: libvirt-sandbox-config-network-filterref-parameter
......
......@@ -24,7 +24,7 @@
#include <config.h>
#include <string.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
#include "libvirt-sandbox/libvirt-sandbox-config-all.h"
/**
* SECTION: libvirt-sandbox-config-network-filterref
......
......@@ -23,7 +23,7 @@
#include <config.h>
#include <string.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
#include "libvirt-sandbox/libvirt-sandbox-config-all.h"
/**
* SECTION: libvirt-sandbox-config-network_route
......
......@@ -23,7 +23,7 @@
#include <config.h>
#include <string.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
#include "libvirt-sandbox/libvirt-sandbox-config-all.h"
/**
* SECTION: libvirt-sandbox-config-network
......
......@@ -23,7 +23,7 @@
#include <config.h>
#include <string.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
#include "libvirt-sandbox/libvirt-sandbox-config-all.h"
/**
* SECTION: libvirt-sandbox-config-service-generic
......
......@@ -23,7 +23,7 @@
#include <config.h>
#include <string.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
#include "libvirt-sandbox/libvirt-sandbox-config-all.h"
/**
* SECTION: libvirt-sandbox-config-service-systemd
......
......@@ -23,7 +23,7 @@
#include <config.h>
#include <string.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
#include "libvirt-sandbox/libvirt-sandbox-config-all.h"
/**
* SECTION: libvirt-sandbox-config-service
......
......@@ -26,7 +26,7 @@
#include <glib/gi18n.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
#include "libvirt-sandbox/libvirt-sandbox-config-all.h"
#include "libvirt-sandbox/libvirt-sandbox-util.h"
#include <errno.h>
#include <selinux/selinux.h>
......
......@@ -22,7 +22,7 @@
#include <config.h>
#include <libvirt-sandbox/libvirt-sandbox.h>
#include <libvirt-sandbox/libvirt-sandbox-config-all.h>
#include <glib/gi18n.h>
#include <stdio.h>
......@@ -1225,9 +1225,6 @@ int main(int argc, char **argv) {
exit(EXIT_FAILURE);
}
if (!gvir_sandbox_init_check(&argc, &argv, &error))
exit(EXIT_FAILURE);
g_set_application_name(_("Libvirt Sandbox Init Common"));
context = g_option_context_new (_("- Libvirt Sandbox"));
......
......@@ -25,7 +25,7 @@
#include <errno.h>
#include <glib/gi18n.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
#include "libvirt-sandbox/libvirt-sandbox-config-all.h"
#define GVIR_SANDBOX_UTIL_ERROR gvir_sandbox_util_error_quark()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment