[packages] lxc: update to latest git version

Signed-off-by: Luka Perkov <luka@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@39386 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
luka 2014-01-24 14:39:04 +00:00
parent e7a29f15dc
commit a3acaff4f0
4 changed files with 63 additions and 68 deletions

View File

@ -1,5 +1,5 @@
# #
# Copyright (C) 2013 OpenWrt.org # Copyright (C) 2013-2014 OpenWrt.org
# #
# This is free software, licensed under the GNU General Public License v2. # This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information. # See /LICENSE for more information.
@ -8,31 +8,34 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=lxc PKG_NAME:=lxc
PKG_VERSION:=2013-11-13 PKG_VERSION:=2014-01-23
PKG_RELEASE=$(PKG_SOURCE_VERSION) PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://github.com/lxc/lxc.git PKG_SOURCE_URL:=git://github.com/lxc/lxc.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=a9a0ed90dd1cdadd412576a45af16419efc0e939 PKG_SOURCE_VERSION:=0b3a6504e51795e738de8e017c22d209a93bc169
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_DEPENDS:=lua
PKG_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1 PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
LXC_APPLETS += \ LXC_APPLETS_BIN += \
attach cgroup checkpoint clone config console create destroy execute \ attach autostart cgroup clone config console create destroy execute \
freeze info kill monitor monitord restart snapshot start stop unfreeze \ freeze info monitor snapshot start stop unfreeze unshare usernsexec wait
unshare user-nic wait
LXC_APPLETS_LIB += \
init monitord user-nic
LXC_SCRIPTS += \ LXC_SCRIPTS += \
checkconfig ls netstat ps top version checkconfig ls top
DEPENDS_APPLETS = +libpthread +libcap +liblxc DEPENDS_APPLETS = +libpthread +libcap +liblxc
DEPENDS_top = @BROKEN DEPENDS_top = +lxc-lua +luafilesystem @BROKEN
define Package/lxc/Default define Package/lxc/Default
@ -45,9 +48,7 @@ endef
define Package/lxc define Package/lxc
$(call Package/lxc/Default) $(call Package/lxc/Default)
DEPENDS:= \ MENU:=1
+lxc-common +lxc-hooks +lxc-init +lxc-templates +liblxc \
$(foreach u,$(LXC_APPLETS),+lxc-$(u)) $(foreach u,$(LXC_SCRIPTS),+lxc-$(u))
endef endef
define Package/lxc/description define Package/lxc/description
@ -58,23 +59,19 @@ endef
define Package/lxc-common define Package/lxc-common
$(call Package/lxc/Default) $(call Package/lxc/Default)
TITLE:=LXC common files TITLE:=LXC common files
DEPENDS:= lxc
endef endef
define Package/lxc-hooks define Package/lxc-hooks
$(call Package/lxc/Default) $(call Package/lxc/Default)
TITLE:=LXC virtual machine hooks TITLE:=LXC virtual machine hooks
endef DEPENDS:= lxc
define Package/lxc-init
$(call Package/lxc/Default)
TITLE:=Utility lxc-init from the LXC userspace tools
DEPENDS:= $(DEPENDS_APPLETS)
endef endef
define Package/lxc-templates define Package/lxc-templates
$(call Package/lxc/Default) $(call Package/lxc/Default)
TITLE:=LXC virtual machine templates TITLE:=LXC virtual machine templates
DEPENDS:= @BROKEN DEPENDS:= lxc @BROKEN
endef endef
define Package/liblxc define Package/liblxc
@ -82,15 +79,26 @@ define Package/liblxc
SECTION:=libs SECTION:=libs
CATEGORY:=Libraries CATEGORY:=Libraries
TITLE:=LXC userspace library TITLE:=LXC userspace library
DEPENDS:= +libpthread +libcap DEPENDS:= lxc +libcap +libpthread
endef endef
define Package/lxc-lua
$(call Package/lxc/Default)
TITLE:=LXC Lua bindings
DEPENDS:= lxc +liblua +liblxc
endef
CONFIGURE_ARGS+= \ CONFIGURE_ARGS += \
--disable-apparmor \ --disable-apparmor \
--disable-doc \ --disable-doc \
--disable-examples \ --disable-examples \
--disable-seccomp --disable-seccomp
--enable-lua=yes \
--with-lua-pc="$(STAGING_DIR)/usr/lib/pkgconfig/lua.pc" \
MAKE_FLAGS += \
LUA_INSTALL_CMOD="/usr/lib/lua" \
LUA_INSTALL_LMOD="/usr/lib/lua"
define Build/Configure define Build/Configure
( cd $(PKG_BUILD_DIR); ./autogen.sh ); ( cd $(PKG_BUILD_DIR); ./autogen.sh );
@ -142,13 +150,6 @@ define Package/lxc-common/install
$(1)/etc/lxc/ $(1)/etc/lxc/
endef endef
define Package/lxc-init/install
$(INSTALL_DIR) $(1)/usr/lib/lxc
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/lxc/lxc-init \
$(1)/usr/lib/lxc/
endef
define Package/lxc-hooks/install define Package/lxc-hooks/install
$(INSTALL_DIR) $(1)/usr/share/lxc/hooks $(INSTALL_DIR) $(1)/usr/share/lxc/hooks
$(CP) \ $(CP) \
@ -173,19 +174,29 @@ define Package/liblxc/install
$(1)/usr/lib/ $(1)/usr/lib/
endef endef
define Package/lxc-lua/install
$(INSTALL_DIR) $(1)/usr/lib/lua
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/lua/lxc.lua \
$(1)/usr/lib/lua/
$(INSTALL_DIR) $(1)/usr/lib/lua/lxc
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/lua/lxc/core.so \
$(1)/usr/lib/lua/lxc/
endef
define GenPlugin define GenPlugin
define Package/lxc-$(1) define Package/lxc-$(1)
$(call Package/lxc/Default) $(call Package/lxc/Default)
TITLE:=Utility lxc-$(1) from the LXC userspace tools TITLE:=Utility lxc-$(1) from the LXC userspace tools
DEPENDS:= +lxc-common $(2) $(DEPENDS_$(1)) DEPENDS:= lxc +lxc-common $(2) $(DEPENDS_$(1))
endef endef
define Package/lxc-$(1)/install define Package/lxc-$(1)/install
$(INSTALL_DIR) $$(1)/usr/bin $(INSTALL_DIR) $$(1)$(3)
$(INSTALL_BIN) \ $(INSTALL_BIN) \
$(PKG_INSTALL_DIR)/usr/bin/lxc-$(1) \ $(PKG_INSTALL_DIR)$(3)/lxc-$(1) \
$$(1)/usr/bin/ $$(1)$(3)/
endef endef
$$(eval $$(call BuildPackage,lxc-$(1))) $$(eval $$(call BuildPackage,lxc-$(1)))
@ -195,8 +206,9 @@ endef
$(eval $(call BuildPackage,lxc)) $(eval $(call BuildPackage,lxc))
$(eval $(call BuildPackage,lxc-common)) $(eval $(call BuildPackage,lxc-common))
$(eval $(call BuildPackage,lxc-hooks)) $(eval $(call BuildPackage,lxc-hooks))
$(eval $(call BuildPackage,lxc-init))
$(eval $(call BuildPackage,lxc-templates)) $(eval $(call BuildPackage,lxc-templates))
$(eval $(call BuildPackage,liblxc)) $(eval $(call BuildPackage,liblxc))
$(foreach u,$(LXC_APPLETS),$(eval $(call GenPlugin,$(u),$(DEPENDS_APPLETS)))) $(eval $(call BuildPackage,lxc-lua))
$(foreach u,$(LXC_SCRIPTS),$(eval $(call GenPlugin,$(u)))) $(foreach u,$(LXC_APPLETS_BIN),$(eval $(call GenPlugin,$(u),$(DEPENDS_APPLETS),"/usr/bin")))
$(foreach u,$(LXC_APPLETS_LIB),$(eval $(call GenPlugin,$(u),$(DEPENDS_APPLETS),"/usr/lib/lxc")))
$(foreach u,$(LXC_SCRIPTS),$(eval $(call GenPlugin,$(u),,"/usr/bin")))

View File

@ -1,19 +1,20 @@
--- a/configure.ac --- a/configure.ac
+++ b/configure.ac +++ b/configure.ac
@@ -22,29 +22,6 @@ AC_CANONICAL_HOST @@ -31,30 +31,6 @@ AC_CANONICAL_HOST
AM_PROG_CC_C_O AM_PROG_CC_C_O
AC_GNU_SOURCE AC_GNU_SOURCE
-# Detect the distribution. This is used for the default configuration and -# Detect the distribution. This is used for the default configuration and
-# for some distro-specific build options. -# for some distro-specific build options.
-AC_MSG_CHECKING([host distribution]) -AC_MSG_CHECKING([host distribution])
-AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, oracle, fedora, suse, gentoo, debian, arch, slackware, paldo, openmandriva or pardus.])) -AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, oracle, centos, fedora, suse, gentoo, debian, arch, slackware, paldo, openmandriva or pardus.]))
-if test "z$with_distro" = "z"; then -if test "z$with_distro" = "z"; then
- with_distro=`lsb_release -is` - with_distro=`lsb_release -is`
-fi -fi
-if test "z$with_distro" = "z"; then -if test "z$with_distro" = "z"; then
- AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat") - AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat")
- AC_CHECK_FILE(/etc/oracle-release,with_distro="oracle") - AC_CHECK_FILE(/etc/oracle-release,with_distro="oracle")
- AC_CHECK_FILE(/etc/centos-release,with_distro="centos")
- AC_CHECK_FILE(/etc/fedora-release,with_distro="fedora") - AC_CHECK_FILE(/etc/fedora-release,with_distro="fedora")
- AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse") - AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
- AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo") - AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")

View File

@ -1,22 +1,15 @@
--- a/src/lxc/lxc_snapshot.c --- a/src/lxc/utils.h
+++ b/src/lxc/lxc_snapshot.c +++ b/src/lxc/utils.h
@@ -32,6 +32,8 @@ @@ -44,11 +44,7 @@ extern const char *get_rundir(void);
#include "arguments.h" extern const char *lxc_global_config_value(const char *option_name);
#include "utils.h"
+#include <../include/getline.h> /* Define getline() if missing from the C library */
+ -#ifndef HAVE_GETLINE
lxc_log_define(lxc_snapshot, lxc); -#ifdef HAVE_FGETLN
-#include <../include/getline.h>
-#endif
-#endif
+#include "../include/getline.h"
char *newname; /* Define setns() if missing from the C library */
--- a/src/lxc/lxc_user_nic.c #ifndef HAVE_SETNS
+++ b/src/lxc/lxc_user_nic.c
@@ -49,6 +49,8 @@
#include "config.h"
#include "utils.h"
+#include <../include/getline.h>
+
#if ISTEST
#define CONF_FILE "/tmp/lxc-usernet"
#define DB_FILE "/tmp/nics"

View File

@ -1,11 +0,0 @@
--- a/src/lxc/lxc-ps.in
+++ b/src/lxc/lxc-ps.in
@@ -93,7 +93,7 @@ while true; do
done
if [ "$list_container_processes" -eq "1" ]; then
- set -- -e $@
+ set -- $@
fi
get_parent_cgroup