[lxc-devel] [PATCH 1/6] add init.lxc.static binary

Serge Hallyn serge.hallyn at ubuntu.com
Tue Jun 3 03:01:26 UTC 2014


To avoid having to copy all the library dependencies into the container.

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>
---
 src/lxc/Makefile.am | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am
index ab8a46e..588a3ab 100644
--- a/src/lxc/Makefile.am
+++ b/src/lxc/Makefile.am
@@ -199,7 +199,7 @@ bin_PROGRAMS = \
 	lxc-usernsexec \
 	lxc-wait
 
-sbin_PROGRAMS = init.lxc
+sbin_PROGRAMS = init.lxc init.lxc.static
 pkglibexec_PROGRAMS = \
 	lxc-monitord \
 	lxc-user-nic
@@ -233,6 +233,10 @@ lxc_snapshot_SOURCES = lxc_snapshot.c
 lxc_usernsexec_SOURCES = lxc_usernsexec.c
 lxc_user_nic_SOURCES = lxc_user_nic.c network.c network.h
 
+init_lxc_static_SOURCES = lxc_init.c error.c log.c utils.c caps.c
+init_lxc_static_LDFLAGS = -static
+init_lxc_static_LDADD = @CAP_LIBS@
+
 install-exec-local: install-soPROGRAMS
 	mkdir -p $(DESTDIR)$(datadir)/lxc
 	install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc
-- 
2.0.0



More information about the lxc-devel mailing list