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
commit3786414d954b35861e46f7e22eff877aa1c7112d (patch)
tree5bdec31deca94449052824f79b2a59df86af10fb /sys-cluster
parent(#229647) Fix compilation by looking for sys/io.h instead of asm/io.h. (diff)
downloadgentoo-2-3786414d954b35861e46f7e22eff877aa1c7112d.tar.gz
gentoo-2-3786414d954b35861e46f7e22eff877aa1c7112d.tar.bz2
gentoo-2-3786414d954b35861e46f7e22eff877aa1c7112d.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.
(Portage version: 2.2_rc1/cvs/Linux 2.6.22-ovz005 i686)
Diffstat (limited to 'sys-cluster')
-rw-r--r--sys-cluster/vzctl/ChangeLog16
-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
-rw-r--r--sys-cluster/vzctl/vzctl-3.0.22-r1.ebuild80
6 files changed, 207 insertions, 1 deletions
diff --git a/sys-cluster/vzctl/ChangeLog b/sys-cluster/vzctl/ChangeLog
index aa62ef61c797..2acac3326498 100644
--- a/sys-cluster/vzctl/ChangeLog
+++ b/sys-cluster/vzctl/ChangeLog
@@ -1,6 +1,20 @@
# ChangeLog for sys-cluster/vzctl
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/ChangeLog,v 1.54 2008/03/14 20:13:21 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/ChangeLog,v 1.55 2008/07/14 06:12:16 pva Exp $
+
+*vzctl-3.0.22-r1 (14 Jul 2008)
+
+ 14 Jul 2008; Peter Volkov <pva@gentoo.org>
+ +files/vzctl-3.0.22-capability-fix.patch,
+ +files/vzctl-3.0.22-document-disable-modules.patch,
+ +files/vzctl-3.0.22-glibc28.patch,
+ +files/vzctl-3.0.22-workaround-gentoo-add_ip.patch,
+ +vzctl-3.0.22-r1.ebuild:
+ 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.
14 Mar 2008; Benedikt Böhm <hollow@gentoo.org> metadata.xml:
fix metadata
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
+
diff --git a/sys-cluster/vzctl/vzctl-3.0.22-r1.ebuild b/sys-cluster/vzctl/vzctl-3.0.22-r1.ebuild
new file mode 100644
index 000000000000..0e07e3fbcc74
--- /dev/null
+++ b/sys-cluster/vzctl/vzctl-3.0.22-r1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/vzctl-3.0.22-r1.ebuild,v 1.1 2008/07/14 06:12:16 pva Exp $
+
+inherit bash-completion eutils
+
+DESCRIPTION="OpenVZ VE control utility"
+HOMEPAGE="http://openvz.org/"
+SRC_URI="http://download.openvz.org/utils/${PN}/${PV}/src/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc64 ~sparc ~x86"
+IUSE="bash-completion logrotate"
+
+RDEPEND="logrotate? ( app-admin/logrotate )
+ net-firewall/iptables
+ sys-apps/ed
+ sys-apps/iproute2
+ sys-fs/vzquota
+ virtual/cron"
+
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-capability-fix.patch
+ epatch "${FILESDIR}"/${P}-glibc28.patch
+ epatch "${FILESDIR}"/${P}-document-disable-modules.patch
+ epatch "${FILESDIR}"/${P}-workaround-gentoo-add_ip.patch
+}
+
+src_compile() {
+ econf --localstatedir=/var \
+ --enable-cron \
+ --enable-udev \
+ $(use_enable bash-completion bashcomp) \
+ $(use_enable logrotate) || die "econf failed!"
+
+ emake || die "emake failed!"
+}
+
+src_install() {
+ make DESTDIR="${D}" install install-gentoo || die "make install failed"
+
+ # install the bash-completion script into the right location
+ rm -rf "${D}"/etc/bash_completion.d
+ dobashcompletion "${S}"/etc/bash_completion.d/vzctl.sh vzctl
+
+ # We need to keep some dirs
+ keepdir /vz/{dump,lock,root,private,template/cache}
+ keepdir /etc/vz/names /var/lib/vzctl/veip
+}
+
+pkg_postinst() {
+ bash-completion_pkg_postinst
+ ewarn
+ if has_version "<sys-cluster/vzctl-3.0.10"; then
+ ewarn "The location of some vzctl files have changed. Most notably,"
+ ewarn "VE configuration files and samples directory has changed from"
+ ewarn "/etc/vz to /etc/vz/conf. In order to be able to work with"
+ ewarn "your VEs, please do the following:"
+ ewarn
+ ewarn "bash# mv /etc/vz/[0-9]*.conf /etc/vz/conf/"
+ ewarn
+ fi
+ ewarn "NOTE: Starting with vzctl-3.0.22 the mechanism for choosing the"
+ ewarn "interfaces to send ARP requests to has been improved (see description"
+ ewarn "of NEIGHBOUR_DEVS in vz.conf(5) man page). In case VE IP addresses"
+ ewarn "are not on the same subnet as HN IPs, it may lead to such VEs being"
+ ewarn "unreachable from the outside world."
+ ewarn
+ ewarn "The solution is to set up a device route(s) for the network your VEs are"
+ ewarn "in. For more details, see http://bugzilla.openvz.org/show_bug.cgi?id=771#c1"
+ ewarn
+ ewarn "The old vzctl behavior can be restored by setting NEIGHBOUR_DEVS to any"
+ ewarn 'value other than "detect" in /etc/vz/vz.conf.'
+}