2006-02-09 17:45:11 +00:00
|
|
|
# Makefile for libvirt python library
|
2005-12-19 16:34:11 +00:00
|
|
|
|
2012-02-02 20:20:09 +00:00
|
|
|
## Copyright (C) 2005-2012 Red Hat, Inc.
|
2011-07-28 18:56:24 +00:00
|
|
|
## See COPYING.LIB for the License of this software
|
|
|
|
|
2006-02-15 13:21:17 +00:00
|
|
|
SUBDIRS= . tests
|
2006-02-14 14:30:42 +00:00
|
|
|
|
2005-12-19 16:34:11 +00:00
|
|
|
INCLUDES = \
|
build: consistently use CFLAGS
According to the automake manual, CPPFLAGS (aka INCLUDES, as spelled
in automake 1.9.6) should only include -I, -D, and -U directives; more
generic directives like -Wall belong in CFLAGS since they affect more
phases of the build process. Therefore, we should be sticking CFLAGS
additions into a CFLAGS container, not a CPPFLAGS container.
* src/Makefile.am (libvirt_driver_vmware_la_CFLAGS): Use AM_CFLAGS.
(INCLUDES): Move CFLAGS items...
(AM_CFLAGS): ...to their proper location.
* python/Makefile.am (INCLUDES, AM_CFLAGS): Likewise.
* tests/Makefile.am (INCLUDES, AM_CFLAGS): Likewise.
(commandtest_CFLAGS, commandhelper_CFLAGS)
(virnetmessagetest_CFLAGS, virnetsockettest_CFLAGS): Use AM_CFLAGS.
2011-05-31 22:15:28 +00:00
|
|
|
$(PYTHON_INCLUDES) \
|
2012-02-02 22:45:54 +00:00
|
|
|
-I$(top_builddir)/gnulib/lib \
|
|
|
|
-I$(top_srcdir)/gnulib/lib \
|
|
|
|
-I$(top_builddir)/src \
|
|
|
|
-I$(top_srcdir)/src \
|
|
|
|
-I$(top_srcdir)/src/util \
|
2005-12-19 16:34:11 +00:00
|
|
|
-I$(top_builddir)/include \
|
2012-02-02 20:20:09 +00:00
|
|
|
-I$(top_srcdir)/include \
|
2011-07-28 12:55:21 +00:00
|
|
|
$(GETTEXT_CPPFLAGS)
|
2005-12-19 16:34:11 +00:00
|
|
|
|
build: consistently use CFLAGS
According to the automake manual, CPPFLAGS (aka INCLUDES, as spelled
in automake 1.9.6) should only include -I, -D, and -U directives; more
generic directives like -Wall belong in CFLAGS since they affect more
phases of the build process. Therefore, we should be sticking CFLAGS
additions into a CFLAGS container, not a CPPFLAGS container.
* src/Makefile.am (libvirt_driver_vmware_la_CFLAGS): Use AM_CFLAGS.
(INCLUDES): Move CFLAGS items...
(AM_CFLAGS): ...to their proper location.
* python/Makefile.am (INCLUDES, AM_CFLAGS): Likewise.
* tests/Makefile.am (INCLUDES, AM_CFLAGS): Likewise.
(commandtest_CFLAGS, commandhelper_CFLAGS)
(virnetmessagetest_CFLAGS, virnetsockettest_CFLAGS): Use AM_CFLAGS.
2011-05-31 22:15:28 +00:00
|
|
|
AM_CFLAGS = $(WARN_CFLAGS)
|
|
|
|
|
2012-04-27 16:06:34 +00:00
|
|
|
DOCS_DIR = $(datadir)/doc/libvirt-python-$(VERSION)
|
2005-12-19 16:34:11 +00:00
|
|
|
|
|
|
|
DOCS = ${srcdir}/TODO
|
|
|
|
|
2009-07-10 11:18:12 +00:00
|
|
|
CLASSES_EXTRA = \
|
|
|
|
libvirt-override-virConnect.py \
|
2012-06-09 15:55:36 +00:00
|
|
|
libvirt-override-virDomain.py \
|
|
|
|
libvirt-override-virDomainSnapshot.py \
|
2009-07-10 11:18:12 +00:00
|
|
|
libvirt-override-virStream.py
|
2009-09-16 13:03:53 +00:00
|
|
|
|
|
|
|
EXTRA_DIST = \
|
|
|
|
generator.py \
|
|
|
|
typewrappers.c \
|
|
|
|
typewrappers.h \
|
|
|
|
libvirt-override.c \
|
|
|
|
libvirt-override.py \
|
|
|
|
libvirt-override-api.xml \
|
Introduce an LXC specific public API & library
This patch introduces support for LXC specific public APIs. In
common with what was done for QEMU, this creates a libvirt_lxc.so
library and libvirt/libvirt-lxc.h header file.
The actual APIs are
int virDomainLxcOpenNamespace(virDomainPtr domain,
int **fdlist,
unsigned int flags);
int virDomainLxcEnterNamespace(virDomainPtr domain,
unsigned int nfdlist,
int *fdlist,
unsigned int *noldfdlist,
int **oldfdlist,
unsigned int flags);
which provide a way to use the setns() system call to move the
calling process into the container's namespace. It is not
practical to write in a generically applicable manner. The
nearest that we could get to such an API would be an API which
allows to pass a command + argv to be executed inside a
container. Even if we had such a generic API, this LXC specific
API is still useful, because it allows the caller to maintain
the current process context, in particular any I/O streams they
have open.
NB the virDomainLxcEnterNamespace() API is special in that it
runs client side, so does not involve the internal driver API.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-12-21 13:15:19 +00:00
|
|
|
libvirt-lxc-override.c \
|
|
|
|
libvirt-lxc-override-api.xml \
|
2011-09-09 11:10:43 +00:00
|
|
|
libvirt-qemu-override.c \
|
|
|
|
libvirt-qemu-override-api.xml \
|
2008-10-31 10:13:45 +00:00
|
|
|
$(CLASSES_EXTRA) \
|
2005-12-19 16:34:11 +00:00
|
|
|
$(DOCS)
|
|
|
|
|
|
|
|
if WITH_PYTHON
|
2012-02-02 22:45:54 +00:00
|
|
|
mylibs = \
|
|
|
|
$(top_builddir)/src/libvirt.la \
|
|
|
|
$(top_builddir)/gnulib/lib/libgnu.la
|
|
|
|
myqemulibs = \
|
|
|
|
$(top_builddir)/src/libvirt-qemu.la \
|
|
|
|
$(top_builddir)/gnulib/lib/libgnu.la
|
Introduce an LXC specific public API & library
This patch introduces support for LXC specific public APIs. In
common with what was done for QEMU, this creates a libvirt_lxc.so
library and libvirt/libvirt-lxc.h header file.
The actual APIs are
int virDomainLxcOpenNamespace(virDomainPtr domain,
int **fdlist,
unsigned int flags);
int virDomainLxcEnterNamespace(virDomainPtr domain,
unsigned int nfdlist,
int *fdlist,
unsigned int *noldfdlist,
int **oldfdlist,
unsigned int flags);
which provide a way to use the setns() system call to move the
calling process into the container's namespace. It is not
practical to write in a generically applicable manner. The
nearest that we could get to such an API would be an API which
allows to pass a command + argv to be executed inside a
container. Even if we had such a generic API, this LXC specific
API is still useful, because it allows the caller to maintain
the current process context, in particular any I/O streams they
have open.
NB the virDomainLxcEnterNamespace() API is special in that it
runs client side, so does not involve the internal driver API.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-12-21 13:15:19 +00:00
|
|
|
mylxclibs = \
|
|
|
|
$(top_builddir)/src/libvirt-lxc.la \
|
|
|
|
$(top_builddir)/gnulib/lib/libgnu.la
|
2005-12-19 16:34:11 +00:00
|
|
|
|
Introduce an LXC specific public API & library
This patch introduces support for LXC specific public APIs. In
common with what was done for QEMU, this creates a libvirt_lxc.so
library and libvirt/libvirt-lxc.h header file.
The actual APIs are
int virDomainLxcOpenNamespace(virDomainPtr domain,
int **fdlist,
unsigned int flags);
int virDomainLxcEnterNamespace(virDomainPtr domain,
unsigned int nfdlist,
int *fdlist,
unsigned int *noldfdlist,
int **oldfdlist,
unsigned int flags);
which provide a way to use the setns() system call to move the
calling process into the container's namespace. It is not
practical to write in a generically applicable manner. The
nearest that we could get to such an API would be an API which
allows to pass a command + argv to be executed inside a
container. Even if we had such a generic API, this LXC specific
API is still useful, because it allows the caller to maintain
the current process context, in particular any I/O streams they
have open.
NB the virDomainLxcEnterNamespace() API is special in that it
runs client side, so does not involve the internal driver API.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-12-21 13:15:19 +00:00
|
|
|
all-local: libvirt.py libvirt_qemu.py libvirt_lxc.py
|
2005-12-19 16:34:11 +00:00
|
|
|
|
Introduce an LXC specific public API & library
This patch introduces support for LXC specific public APIs. In
common with what was done for QEMU, this creates a libvirt_lxc.so
library and libvirt/libvirt-lxc.h header file.
The actual APIs are
int virDomainLxcOpenNamespace(virDomainPtr domain,
int **fdlist,
unsigned int flags);
int virDomainLxcEnterNamespace(virDomainPtr domain,
unsigned int nfdlist,
int *fdlist,
unsigned int *noldfdlist,
int **oldfdlist,
unsigned int flags);
which provide a way to use the setns() system call to move the
calling process into the container's namespace. It is not
practical to write in a generically applicable manner. The
nearest that we could get to such an API would be an API which
allows to pass a command + argv to be executed inside a
container. Even if we had such a generic API, this LXC specific
API is still useful, because it allows the caller to maintain
the current process context, in particular any I/O streams they
have open.
NB the virDomainLxcEnterNamespace() API is special in that it
runs client side, so does not involve the internal driver API.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-12-21 13:15:19 +00:00
|
|
|
pyexec_LTLIBRARIES = libvirtmod.la libvirtmod_qemu.la libvirtmod_lxc.la
|
2005-12-19 16:34:11 +00:00
|
|
|
|
2010-04-15 10:49:33 +00:00
|
|
|
libvirtmod_la_SOURCES = libvirt-override.c typewrappers.c
|
|
|
|
nodist_libvirtmod_la_SOURCES = libvirt.c libvirt.h
|
2008-12-18 12:20:00 +00:00
|
|
|
# Python <= 2.4 header files contain a redundant decl, hence we
|
|
|
|
# need extra flags here
|
2012-02-02 22:45:54 +00:00
|
|
|
libvirtmod_la_CFLAGS = $(WARN_CFLAGS) $(WARN_PYTHON_CFLAGS)
|
2005-12-19 16:34:11 +00:00
|
|
|
|
2010-01-06 16:33:41 +00:00
|
|
|
libvirtmod_la_LDFLAGS = -module -avoid-version -shared -L$(top_builddir)/src/.libs \
|
2010-01-15 10:09:01 +00:00
|
|
|
$(CYGWIN_EXTRA_LDFLAGS)
|
2007-11-29 17:44:01 +00:00
|
|
|
libvirtmod_la_LIBADD = $(mylibs) \
|
2010-01-15 10:09:01 +00:00
|
|
|
$(CYGWIN_EXTRA_LIBADD) $(CYGWIN_EXTRA_PYTHON_LIBADD)
|
2007-11-29 17:44:01 +00:00
|
|
|
|
2011-09-09 11:10:43 +00:00
|
|
|
libvirtmod_qemu_la_SOURCES = libvirt-qemu-override.c typewrappers.c
|
|
|
|
nodist_libvirtmod_qemu_la_SOURCES = libvirt-qemu.c libvirt-qemu.h
|
|
|
|
# Python <= 2.4 header files contain a redundant decl, hence we
|
|
|
|
# need extra flags here
|
|
|
|
libvirtmod_qemu_la_CFLAGS = $(WARN_PYTHON_CFLAGS)
|
|
|
|
|
|
|
|
libvirtmod_qemu_la_LDFLAGS = -module -avoid-version -shared -L$(top_builddir)/src/.libs \
|
|
|
|
$(CYGWIN_EXTRA_LDFLAGS)
|
|
|
|
libvirtmod_qemu_la_LIBADD = $(myqemulibs) \
|
|
|
|
$(CYGWIN_EXTRA_LIBADD) $(CYGWIN_EXTRA_PYTHON_LIBADD)
|
|
|
|
|
Introduce an LXC specific public API & library
This patch introduces support for LXC specific public APIs. In
common with what was done for QEMU, this creates a libvirt_lxc.so
library and libvirt/libvirt-lxc.h header file.
The actual APIs are
int virDomainLxcOpenNamespace(virDomainPtr domain,
int **fdlist,
unsigned int flags);
int virDomainLxcEnterNamespace(virDomainPtr domain,
unsigned int nfdlist,
int *fdlist,
unsigned int *noldfdlist,
int **oldfdlist,
unsigned int flags);
which provide a way to use the setns() system call to move the
calling process into the container's namespace. It is not
practical to write in a generically applicable manner. The
nearest that we could get to such an API would be an API which
allows to pass a command + argv to be executed inside a
container. Even if we had such a generic API, this LXC specific
API is still useful, because it allows the caller to maintain
the current process context, in particular any I/O streams they
have open.
NB the virDomainLxcEnterNamespace() API is special in that it
runs client side, so does not involve the internal driver API.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-12-21 13:15:19 +00:00
|
|
|
libvirtmod_lxc_la_SOURCES = libvirt-lxc-override.c typewrappers.c
|
|
|
|
nodist_libvirtmod_lxc_la_SOURCES = libvirt-lxc.c libvirt-lxc.h
|
|
|
|
# Python <= 2.4 header files contain a redundant decl, hence we
|
|
|
|
# need extra flags here
|
|
|
|
libvirtmod_lxc_la_CFLAGS = $(WARN_PYTHON_CFLAGS)
|
|
|
|
|
|
|
|
libvirtmod_lxc_la_LDFLAGS = -module -avoid-version -shared -L$(top_builddir)/src/.libs \
|
|
|
|
$(CYGWIN_EXTRA_LDFLAGS)
|
|
|
|
libvirtmod_lxc_la_LIBADD = $(mylxclibs) \
|
|
|
|
$(CYGWIN_EXTRA_LIBADD) $(CYGWIN_EXTRA_PYTHON_LIBADD)
|
|
|
|
|
2005-12-19 16:34:11 +00:00
|
|
|
GENERATE = generator.py
|
2009-09-16 13:03:53 +00:00
|
|
|
API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-override-api.xml
|
2007-06-26 13:47:04 +00:00
|
|
|
GENERATED= libvirt-export.c \
|
2009-09-16 13:03:53 +00:00
|
|
|
libvirt.c \
|
|
|
|
libvirt.h \
|
|
|
|
libvirt.py
|
2005-12-19 16:34:11 +00:00
|
|
|
|
2011-09-09 11:10:43 +00:00
|
|
|
QEMU_API_DESC = $(top_srcdir)/docs/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-override-api.xml
|
|
|
|
QEMU_GENERATED= libvirt-qemu-export.c \
|
|
|
|
libvirt-qemu.c \
|
|
|
|
libvirt-qemu.h \
|
|
|
|
libvirt_qemu.py
|
|
|
|
|
Introduce an LXC specific public API & library
This patch introduces support for LXC specific public APIs. In
common with what was done for QEMU, this creates a libvirt_lxc.so
library and libvirt/libvirt-lxc.h header file.
The actual APIs are
int virDomainLxcOpenNamespace(virDomainPtr domain,
int **fdlist,
unsigned int flags);
int virDomainLxcEnterNamespace(virDomainPtr domain,
unsigned int nfdlist,
int *fdlist,
unsigned int *noldfdlist,
int **oldfdlist,
unsigned int flags);
which provide a way to use the setns() system call to move the
calling process into the container's namespace. It is not
practical to write in a generically applicable manner. The
nearest that we could get to such an API would be an API which
allows to pass a command + argv to be executed inside a
container. Even if we had such a generic API, this LXC specific
API is still useful, because it allows the caller to maintain
the current process context, in particular any I/O streams they
have open.
NB the virDomainLxcEnterNamespace() API is special in that it
runs client side, so does not involve the internal driver API.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-12-21 13:15:19 +00:00
|
|
|
LXC_API_DESC = $(top_srcdir)/docs/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-override-api.xml
|
|
|
|
LXC_GENERATED= libvirt-lxc-export.c \
|
|
|
|
libvirt-lxc.c \
|
|
|
|
libvirt-lxc.h \
|
|
|
|
libvirt_lxc.py
|
|
|
|
|
|
|
|
$(GENERATE).stamp: $(srcdir)/$(GENERATE) $(API_DESC) $(QEMU_API_DESC) $(LXC_API_DESC)
|
2011-05-12 10:19:42 +00:00
|
|
|
$(AM_V_GEN)$(PYTHON) $(srcdir)/$(GENERATE) $(PYTHON) && \
|
2009-02-26 13:58:35 +00:00
|
|
|
touch $@
|
|
|
|
|
Introduce an LXC specific public API & library
This patch introduces support for LXC specific public APIs. In
common with what was done for QEMU, this creates a libvirt_lxc.so
library and libvirt/libvirt-lxc.h header file.
The actual APIs are
int virDomainLxcOpenNamespace(virDomainPtr domain,
int **fdlist,
unsigned int flags);
int virDomainLxcEnterNamespace(virDomainPtr domain,
unsigned int nfdlist,
int *fdlist,
unsigned int *noldfdlist,
int **oldfdlist,
unsigned int flags);
which provide a way to use the setns() system call to move the
calling process into the container's namespace. It is not
practical to write in a generically applicable manner. The
nearest that we could get to such an API would be an API which
allows to pass a command + argv to be executed inside a
container. Even if we had such a generic API, this LXC specific
API is still useful, because it allows the caller to maintain
the current process context, in particular any I/O streams they
have open.
NB the virDomainLxcEnterNamespace() API is special in that it
runs client side, so does not involve the internal driver API.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-12-21 13:15:19 +00:00
|
|
|
$(GENERATED) $(QEMU_GENERATED) $(LXC_GENERATED): $(GENERATE).stamp
|
2007-06-26 13:47:04 +00:00
|
|
|
|
2006-02-09 17:45:11 +00:00
|
|
|
$(libvirtmod_la_OBJECTS): $(GENERATED)
|
2011-09-09 11:10:43 +00:00
|
|
|
$(libvirtmod_qemu_la_OBJECTS): $(QEMU_GENERATED)
|
Introduce an LXC specific public API & library
This patch introduces support for LXC specific public APIs. In
common with what was done for QEMU, this creates a libvirt_lxc.so
library and libvirt/libvirt-lxc.h header file.
The actual APIs are
int virDomainLxcOpenNamespace(virDomainPtr domain,
int **fdlist,
unsigned int flags);
int virDomainLxcEnterNamespace(virDomainPtr domain,
unsigned int nfdlist,
int *fdlist,
unsigned int *noldfdlist,
int **oldfdlist,
unsigned int flags);
which provide a way to use the setns() system call to move the
calling process into the container's namespace. It is not
practical to write in a generically applicable manner. The
nearest that we could get to such an API would be an API which
allows to pass a command + argv to be executed inside a
container. Even if we had such a generic API, this LXC specific
API is still useful, because it allows the caller to maintain
the current process context, in particular any I/O streams they
have open.
NB the virDomainLxcEnterNamespace() API is special in that it
runs client side, so does not involve the internal driver API.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-12-21 13:15:19 +00:00
|
|
|
$(libvirtmod_lxc_la_OBJECTS): $(LXC_GENERATED)
|
2005-12-19 16:34:11 +00:00
|
|
|
|
2013-02-05 12:55:09 +00:00
|
|
|
EXTRA_DIST += sanitytest.py
|
|
|
|
|
|
|
|
check-local:
|
2013-02-05 19:29:57 +00:00
|
|
|
$(AM_V_GEN)../run $(PYTHON) $(srcdir)/sanitytest.py
|
2013-02-05 12:55:09 +00:00
|
|
|
|
2007-06-26 13:47:04 +00:00
|
|
|
install-data-local:
|
2009-12-11 23:11:31 +00:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pyexecdir)
|
2010-01-15 10:09:01 +00:00
|
|
|
$(INSTALL) -m 0644 libvirt.py $(DESTDIR)$(pyexecdir)
|
Introduce an LXC specific public API & library
This patch introduces support for LXC specific public APIs. In
common with what was done for QEMU, this creates a libvirt_lxc.so
library and libvirt/libvirt-lxc.h header file.
The actual APIs are
int virDomainLxcOpenNamespace(virDomainPtr domain,
int **fdlist,
unsigned int flags);
int virDomainLxcEnterNamespace(virDomainPtr domain,
unsigned int nfdlist,
int *fdlist,
unsigned int *noldfdlist,
int **oldfdlist,
unsigned int flags);
which provide a way to use the setns() system call to move the
calling process into the container's namespace. It is not
practical to write in a generically applicable manner. The
nearest that we could get to such an API would be an API which
allows to pass a command + argv to be executed inside a
container. Even if we had such a generic API, this LXC specific
API is still useful, because it allows the caller to maintain
the current process context, in particular any I/O streams they
have open.
NB the virDomainLxcEnterNamespace() API is special in that it
runs client side, so does not involve the internal driver API.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-12-21 13:15:19 +00:00
|
|
|
$(INSTALL) -m 0644 libvirt_lxc.py $(DESTDIR)$(pyexecdir)
|
2011-09-09 11:10:43 +00:00
|
|
|
$(INSTALL) -m 0644 libvirt_qemu.py $(DESTDIR)$(pyexecdir)
|
2007-06-26 13:47:04 +00:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
|
|
|
|
@(for doc in $(DOCS) ; \
|
2010-01-15 10:09:01 +00:00
|
|
|
do $(INSTALL) -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
|
2007-06-26 13:47:04 +00:00
|
|
|
|
2007-11-15 13:04:28 +00:00
|
|
|
uninstall-local:
|
2009-12-11 23:11:31 +00:00
|
|
|
rm -f $(DESTDIR)$(pyexecdir)/libvirt.py
|
Introduce an LXC specific public API & library
This patch introduces support for LXC specific public APIs. In
common with what was done for QEMU, this creates a libvirt_lxc.so
library and libvirt/libvirt-lxc.h header file.
The actual APIs are
int virDomainLxcOpenNamespace(virDomainPtr domain,
int **fdlist,
unsigned int flags);
int virDomainLxcEnterNamespace(virDomainPtr domain,
unsigned int nfdlist,
int *fdlist,
unsigned int *noldfdlist,
int **oldfdlist,
unsigned int flags);
which provide a way to use the setns() system call to move the
calling process into the container's namespace. It is not
practical to write in a generically applicable manner. The
nearest that we could get to such an API would be an API which
allows to pass a command + argv to be executed inside a
container. Even if we had such a generic API, this LXC specific
API is still useful, because it allows the caller to maintain
the current process context, in particular any I/O streams they
have open.
NB the virDomainLxcEnterNamespace() API is special in that it
runs client side, so does not involve the internal driver API.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-12-21 13:15:19 +00:00
|
|
|
rm -f $(DESTDIR)$(pyexecdir)/libvirt_lxc.py
|
2011-09-09 11:10:43 +00:00
|
|
|
rm -f $(DESTDIR)$(pyexecdir)/libvirt_qemu.py
|
2007-11-15 13:04:28 +00:00
|
|
|
|
Introduce an LXC specific public API & library
This patch introduces support for LXC specific public APIs. In
common with what was done for QEMU, this creates a libvirt_lxc.so
library and libvirt/libvirt-lxc.h header file.
The actual APIs are
int virDomainLxcOpenNamespace(virDomainPtr domain,
int **fdlist,
unsigned int flags);
int virDomainLxcEnterNamespace(virDomainPtr domain,
unsigned int nfdlist,
int *fdlist,
unsigned int *noldfdlist,
int **oldfdlist,
unsigned int flags);
which provide a way to use the setns() system call to move the
calling process into the container's namespace. It is not
practical to write in a generically applicable manner. The
nearest that we could get to such an API would be an API which
allows to pass a command + argv to be executed inside a
container. Even if we had such a generic API, this LXC specific
API is still useful, because it allows the caller to maintain
the current process context, in particular any I/O streams they
have open.
NB the virDomainLxcEnterNamespace() API is special in that it
runs client side, so does not involve the internal driver API.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-12-21 13:15:19 +00:00
|
|
|
CLEANFILES= $(GENERATED) $(QEMU_GENERATED) $(LXC_GENERATED) $(GENERATE).stamp
|
2007-06-26 13:47:04 +00:00
|
|
|
|
2005-12-19 16:34:11 +00:00
|
|
|
else
|
2008-02-05 19:27:37 +00:00
|
|
|
all:
|
2005-12-19 16:34:11 +00:00
|
|
|
endif
|
2006-02-14 14:30:42 +00:00
|
|
|
|
|
|
|
dummy:
|
|
|
|
|
|
|
|
tests test: all dummy
|
|
|
|
-@(cd tests && $(MAKE) MAKEFLAGS+=--silent tests)
|