lxc: update to 1.1.0
authorMarko Ratkaj <marko.ratkaj@sartura.hr>
Fri, 6 Feb 2015 16:02:34 +0000 (17:02 +0100)
committerLuka Perkov <luka@openwrt.org>
Sun, 8 Feb 2015 01:35:09 +0000 (02:35 +0100)
Signed-off-by: Marko Ratkaj <marko.ratkaj@sartura.hr>
Signed-off-by: Luka Perkov <luka@openwrt.org>
utils/lxc/Makefile
utils/lxc/patches/025-remove-unsupported-option.patch
utils/lxc/patches/300-fix-lxc-destroy.patch
utils/lxc/patches/301-add-openwrt-common-config.patch [deleted file]

index 3adfd5de952e6aea6caaf4a460fadfb31b202e4e..77f98a68639cf66432553f9d0ea20ced2570b2c4 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2013-2014 OpenWrt.org
+# Copyright (C) 2013-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,14 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lxc
-PKG_VERSION:=1.0.6
+PKG_VERSION:=1.1.0
 PKG_RELEASE:=1
 
 PKG_LICENSE:=LGPL-2.1+ BSD-2-Clause GPL-2.0
+PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://linuxcontainers.org/downloads/
-PKG_MD5SUM:=4aad3aee84b42faa194e44091d723a3b
+PKG_SOURCE_URL:=http://linuxcontainers.org/downloads/lxc/
+PKG_MD5SUM:=ab1cbabf859abc15165050c854979c5c
 
 PKG_BUILD_DEPENDS:=lua
 PKG_BUILD_PARALLEL:=1
@@ -45,7 +46,6 @@ define Package/lxc/Default
   CATEGORY:=Utilities
   TITLE:=LXC userspace tools
   URL:=http://lxc.sourceforge.net/
-  MAINTAINER:=Luka Perkov <luka@openwrt.org>
 endef
 
 define Package/lxc
index f70d49d951d8c909cc1ea4b845050a7e4fa6ca90..cb0a9f0d2a3084e72f2fc04b83079315e5555cd3 100644 (file)
@@ -1,6 +1,6 @@
 --- a/templates/lxc-download.in
 +++ b/templates/lxc-download.in
-@@ -479,15 +479,7 @@ fi
+@@ -494,15 +494,7 @@ fi
  # Unpack the rootfs
  echo "Unpacking the rootfs"
  
index 2192c5f59049583aa91cb74c9fd1338c60a8e6af..241f387130c714cea7b829c5e02df173d3db2c7b 100644 (file)
@@ -16,33 +16,33 @@ Signed-off-by: Luka Perkov <luka@openwrt.org>
 
 --- a/src/lxc/utils.c
 +++ b/src/lxc/utils.c
-@@ -46,7 +46,7 @@
+@@ -47,7 +47,7 @@
  
  lxc_log_define(lxc_utils, lxc);
  
--static int _recursive_rmdir_onedev(char *dirname, dev_t pdev)
-+static int _recursive_rmdir_onedev(char *dirname)
+-static int _recursive_rmdir_onedev(char *dirname, dev_t pdev,
++static int _recursive_rmdir_onedev(char *dirname,
+                                  const char *exclude, int level)
  {
        struct dirent dirent, *direntp;
-       DIR *dir;
-@@ -82,10 +82,8 @@ static int _recursive_rmdir_onedev(char
+@@ -108,10 +108,8 @@ static int _recursive_rmdir_onedev(char
                        failed=1;
                        continue;
                }
 -              if (mystat.st_dev != pdev)
 -                      continue;
                if (S_ISDIR(mystat.st_mode)) {
--                      if (_recursive_rmdir_onedev(pathname, pdev) < 0)
-+                      if (_recursive_rmdir_onedev(pathname) < 0)
+-                      if (_recursive_rmdir_onedev(pathname, pdev, exclude, level+1) < 0)
++                      if (_recursive_rmdir_onedev(pathname, exclude, level+1) < 0)
                                failed=1;
                } else {
                        if (unlink(pathname) < 0) {
-@@ -119,7 +117,7 @@ extern int lxc_rmdir_onedev(char *path)
+@@ -147,7 +145,7 @@ extern int lxc_rmdir_onedev(char *path,
                return -1;
        }
  
--      return _recursive_rmdir_onedev(path, mystat.st_dev);
-+      return _recursive_rmdir_onedev(path);
+-      return _recursive_rmdir_onedev(path, mystat.st_dev, exclude, 0);
++      return _recursive_rmdir_onedev(path, exclude, 0);
  }
  
  static int mount_fs(const char *source, const char *target, const char *type)
diff --git a/utils/lxc/patches/301-add-openwrt-common-config.patch b/utils/lxc/patches/301-add-openwrt-common-config.patch
deleted file mode 100644 (file)
index 6736d9b..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
---- /dev/null
-+++ b/config/templates/openwrt.common.conf.in
-@@ -0,0 +1,56 @@
-+# Default mount entries
-+lxc.mount.entry = proc proc proc nodev,noexec,nosuid 0 0
-+lxc.mount.entry = sysfs sys sysfs defaults 0 0
-+
-+# Default console settings
-+lxc.devttydir = lxc
-+lxc.tty = 4
-+lxc.pts = 1024
-+
-+# Default capabilities
-+lxc.cap.drop = mac_admin
-+lxc.cap.drop = mac_override
-+lxc.cap.drop = sys_admin
-+lxc.cap.drop = sys_module
-+lxc.cap.drop = sys_nice
-+lxc.cap.drop = sys_pacct
-+lxc.cap.drop = sys_ptrace
-+lxc.cap.drop = sys_rawio
-+lxc.cap.drop = sys_resource
-+lxc.cap.drop = sys_time
-+lxc.cap.drop = sys_tty_config
-+lxc.cap.drop = syslog
-+lxc.cap.drop = wake_alarm
-+
-+# Default cgroups - all denied except those whitelisted
-+lxc.cgroup.devices.deny = a
-+## /dev/null and zero
-+lxc.cgroup.devices.allow = c 1:3 rwm
-+lxc.cgroup.devices.allow = c 1:5 rwm
-+## consoles
-+lxc.cgroup.devices.allow = c 5:0 rwm
-+lxc.cgroup.devices.allow = c 5:1 rwm
-+## /dev/{,u}random
-+lxc.cgroup.devices.allow = c 1:8 rwm
-+lxc.cgroup.devices.allow = c 1:9 rwm
-+## /dev/pts/*
-+lxc.cgroup.devices.allow = c 5:2 rwm
-+lxc.cgroup.devices.allow = c 136:* rwm
-+## rtc
-+lxc.cgroup.devices.allow = c 254:0 rm
-+## fuse
-+lxc.cgroup.devices.allow = c 10:229 rwm
-+## tun
-+lxc.cgroup.devices.allow = c 10:200 rwm
-+## dev/tty0
-+lxc.cgroup.devices.allow = c 4:0 rwm
-+## dev/tty1
-+lxc.cgroup.devices.allow = c 4:1 rwm
-+
-+## To use loop devices, copy the following line to the container's
-+## configuration file (uncommented).
-+#lxc.cgroup.devices.allow = b 7:* rwm
-+
-+# Blacklist some syscalls which are not safe in privileged
-+# containers
-+lxc.seccomp = /usr/share/lxc/config/common.seccomp
---- a/configure.ac
-+++ b/configure.ac
-@@ -579,6 +579,7 @@ AC_CONFIG_FILES([
-       config/templates/ubuntu.common.conf
-       config/templates/ubuntu.lucid.conf
-       config/templates/ubuntu.userns.conf
-+      config/templates/openwrt.common.conf
-       config/yum/Makefile
-       doc/Makefile
---- a/config/templates/Makefile.am
-+++ b/config/templates/Makefile.am
-@@ -22,4 +22,5 @@ templatesconfig_DATA = \
-       ubuntu-cloud.userns.conf \
-       ubuntu.common.conf \
-       ubuntu.lucid.conf \
--      ubuntu.userns.conf
-+      ubuntu.userns.conf \
-+      openwrt.common.conf