Browse Source

lxc: update to 1.1.0

Signed-off-by: Marko Ratkaj <marko.ratkaj@sartura.hr>
Signed-off-by: Luka Perkov <luka@openwrt.org>
lilik-openwrt-22.03
Marko Ratkaj 10 years ago
committed by Luka Perkov
parent
commit
64a3a4840e
4 changed files with 16 additions and 94 deletions
  1. +5
    -5
      utils/lxc/Makefile
  2. +1
    -1
      utils/lxc/patches/025-remove-unsupported-option.patch
  3. +10
    -10
      utils/lxc/patches/300-fix-lxc-destroy.patch
  4. +0
    -78
      utils/lxc/patches/301-add-openwrt-common-config.patch

+ 5
- 5
utils/lxc/Makefile View 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


+ 1
- 1
utils/lxc/patches/025-remove-unsupported-option.patch View 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"


+ 10
- 10
utils/lxc/patches/300-fix-lxc-destroy.patch View 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)

+ 0
- 78
utils/lxc/patches/301-add-openwrt-common-config.patch View File

@ -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

Loading…
Cancel
Save