summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2008-07-14 06:12:16 +0000
committerPeter Volkov <pva@gentoo.org>2008-07-14 06:12:16 +0000
commit5f2e91e5da424c1667f6be44b0432fa672857cc4 (patch)
tree9f91eba1ba0963bd6f3aafac31cc0a5d7538c107 /sys-cluster/vzctl/files
parent(#229647) Fix compilation by looking for sys/io.h instead of asm/io.h. (diff)
downloadhistorical-5f2e91e5da424c1667f6be44b0432fa672857cc4.tar.gz
historical-5f2e91e5da424c1667f6be44b0432fa672857cc4.tar.bz2
historical-5f2e91e5da424c1667f6be44b0432fa672857cc4.zip
Fix inability to start container when built against >=linux-headers-2.6.25, bug #221971, thank Romain Riviere for report; Fix build glibc-2.8 problem, bug #228189, thank Evil Compile Person for report and Bandan for patch; Added notice in configuration file on how to disable modules loading, bug #213798, thank Victor Roman Archidona for report.
Package-Manager: portage-2.2_rc1/cvs/Linux 2.6.22-ovz005 i686
Diffstat (limited to 'sys-cluster/vzctl/files')
-rw-r--r--sys-cluster/vzctl/files/vzctl-3.0.22-capability-fix.patch31
-rw-r--r--sys-cluster/vzctl/files/vzctl-3.0.22-document-disable-modules.patch27
-rw-r--r--sys-cluster/vzctl/files/vzctl-3.0.22-glibc28.patch23
-rw-r--r--sys-cluster/vzctl/files/vzctl-3.0.22-workaround-gentoo-add_ip.patch31
4 files changed, 112 insertions, 0 deletions
diff --git a/sys-cluster/vzctl/files/vzctl-3.0.22-capability-fix.patch b/sys-cluster/vzctl/files/vzctl-3.0.22-capability-fix.patch
new file mode 100644
index 000000000000..b653387a9416
--- /dev/null
+++ b/sys-cluster/vzctl/files/vzctl-3.0.22-capability-fix.patch
@@ -0,0 +1,31 @@
+From: Kir Kolyshkin <kir@openvz.org>
+Date: Sat, 7 Jun 2008 14:16:46 +0000 (+0400)
+Subject: Fix inability to start a container
+X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff_plain;h=0d6bfad92c7cb6a193801ce8dac3a0dc64396ca8;hp=3223b438683eba695ecaff2be65d08cb231bb471
+
+Fix inability to start a container
+
+Container start could fail with the following message:
+
+ Unable to set capability: Invalid argument
+
+It is caused by changed value of LINUX_CAPABILITY_VERSION
+(defined in /usr/include/linux/capability.h).
+
+The fix is to get this version from kernel (as libcap-2.0.0 does).
+
+Signed-off-by: Kir Kolyshkin <kir@openvz.org>
+---
+
+diff --git a/src/lib/cap.c b/src/lib/cap.c
+index 428bd43..67d95e3 100644
+--- a/src/lib/cap.c
++++ b/src/lib/cap.c
+@@ -165,6 +165,7 @@ static int set_cap(envid_t veid, cap_t mask, int pid)
+
+ memset(&header, 0, sizeof(header));
+ header.version = _LINUX_CAPABILITY_VERSION;
++ capget(&header, NULL); /* Get linux capability version from kernel */
+ header.pid = pid;
+
+ memset(&data, 0, sizeof(data));
diff --git a/sys-cluster/vzctl/files/vzctl-3.0.22-document-disable-modules.patch b/sys-cluster/vzctl/files/vzctl-3.0.22-document-disable-modules.patch
new file mode 100644
index 000000000000..2a766753b895
--- /dev/null
+++ b/sys-cluster/vzctl/files/vzctl-3.0.22-document-disable-modules.patch
@@ -0,0 +1,27 @@
+From: Kir Kolyshkin <kir@openvz.org>
+Date: Mon, 9 Jun 2008 10:38:13 +0000 (+0400)
+Subject: etc/vz/vz.conf: document MODULES_DISABLED
+X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff_plain;h=626325d26903279dbe64a966eed5199be4316aa0;hp=d5fba5eee206a84557c0654a7998edf133039e36
+
+etc/vz/vz.conf: document MODULES_DISABLED
+
+Original report and patch by Peter <pva@gentoo.org>
+
+Fixes http://bugzilla.openvz.org/888
+Signed-off-by: Kir Kolyshkin <kir@openvz.org>
+
+---
+
+--- etc/vz.conf 2008-07-14 06:02:01 +0000
++++ etc/vz.conf 2008-07-14 06:02:14 +0000
+@@ -14,6 +14,9 @@
+ DISK_QUOTA=yes
+ VZFASTBOOT=no
+
++# Disable module loading. If set, vz initscript do not load any modules.
++#MODULES_DISABLED=yes
++
+ # The name of the device whose ip address will be used as source ip for VE.
+ # By default automatically assigned.
+ #VE_ROUTE_SRC_DEV="eth0"
+
diff --git a/sys-cluster/vzctl/files/vzctl-3.0.22-glibc28.patch b/sys-cluster/vzctl/files/vzctl-3.0.22-glibc28.patch
new file mode 100644
index 000000000000..ca66ce43000a
--- /dev/null
+++ b/sys-cluster/vzctl/files/vzctl-3.0.22-glibc28.patch
@@ -0,0 +1,23 @@
+diff -Nru vzctl-3.0.22.orig/src/lib/config.c vzctl-3.0.22/src/lib/config.c
+--- vzctl-3.0.22.orig/src/lib/config.c 2008-06-18 20:12:15.000000000 -0400
++++ vzctl-3.0.22/src/lib/config.c 2008-06-18 20:12:58.000000000 -0400
+@@ -29,6 +29,7 @@
+ #include <linux/vzcalluser.h>
+ #include <unistd.h>
+ #include <fcntl.h>
++#include <limits.h>
+
+ #include "logger.h"
+ #include "list.h"
+diff -Nru vzctl-3.0.22.orig/src/lib/util.c vzctl-3.0.22/src/lib/util.c
+--- vzctl-3.0.22.orig/src/lib/util.c 2008-06-18 20:12:15.000000000 -0400
++++ vzctl-3.0.22/src/lib/util.c 2008-06-18 20:14:08.000000000 -0400
+@@ -28,7 +28,7 @@
+ #include <fcntl.h>
+ #include <arpa/inet.h>
+ #include <stdarg.h>
+-#include <linux/limits.h>
++#include <limits.h>
+ #include <dirent.h>
+
+ #include "util.h"
diff --git a/sys-cluster/vzctl/files/vzctl-3.0.22-workaround-gentoo-add_ip.patch b/sys-cluster/vzctl/files/vzctl-3.0.22-workaround-gentoo-add_ip.patch
new file mode 100644
index 000000000000..7184feefbd0b
--- /dev/null
+++ b/sys-cluster/vzctl/files/vzctl-3.0.22-workaround-gentoo-add_ip.patch
@@ -0,0 +1,31 @@
+From: Daniel Robbins <drobbins@funtoo.org>
+Date: Thu, 13 Mar 2008 07:17:31 +0000 (+0300)
+Subject: gentoo-add_ip.sh: fix the case then config_venet0 is commented out
+X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff_plain;h=fa72a4fdc14db95b24cfb757f6506e89ad2268df
+
+gentoo-add_ip.sh: fix the case then config_venet0 is commented out
+
+I had some config entries commented out in /etc/conf.d/net which
+caused the add ip script (/etc/vz/dists/scripts/gentoo-add_ip.sh) to
+fail. I fixed this by adding a "^" to the beginning of the grep -qw
+command, as below....
+
+There are still other potential problems with parsing the scripts in
+the way you do, but this at least will deal with the situation where
+someone has commented-out config_venet0 lines in their
+/etc/conf.d/net.
+---
+
+diff --git a/etc/dists/scripts/gentoo-add_ip.sh b/etc/dists/scripts/gentoo-add_ip.sh
+index f660da3..b5dfd27 100755
+--- a/etc/dists/scripts/gentoo-add_ip.sh
++++ b/etc/dists/scripts/gentoo-add_ip.sh
+@@ -71,7 +71,7 @@ function add_ip()
+ fi
+
+ for ip in ${IP_ADDR}; do
+- grep -qw "config_${VENET_DEV}=\(.*\"${ip}[\"\/].*\)" ${IFCFG} ||
++ grep -qw "^config_${VENET_DEV}=\(.*\"${ip}[\"\/].*\)" ${IFCFG} ||
+ add_param3 "${IFCFG}" "config_${VENET_DEV}" "${ip}/32"
+ done
+