diff options
author | Peter Volkov <pva@gentoo.org> | 2008-07-14 06:12:16 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2008-07-14 06:12:16 +0000 |
commit | 5f2e91e5da424c1667f6be44b0432fa672857cc4 (patch) | |
tree | 9f91eba1ba0963bd6f3aafac31cc0a5d7538c107 /sys-cluster/vzctl | |
parent | (#229647) Fix compilation by looking for sys/io.h instead of asm/io.h. (diff) | |
download | historical-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')
-rw-r--r-- | sys-cluster/vzctl/ChangeLog | 16 | ||||
-rw-r--r-- | sys-cluster/vzctl/Manifest | 17 | ||||
-rw-r--r-- | sys-cluster/vzctl/files/vzctl-3.0.22-capability-fix.patch | 31 | ||||
-rw-r--r-- | sys-cluster/vzctl/files/vzctl-3.0.22-document-disable-modules.patch | 27 | ||||
-rw-r--r-- | sys-cluster/vzctl/files/vzctl-3.0.22-glibc28.patch | 23 | ||||
-rw-r--r-- | sys-cluster/vzctl/files/vzctl-3.0.22-workaround-gentoo-add_ip.patch | 31 | ||||
-rw-r--r-- | sys-cluster/vzctl/vzctl-3.0.22-r1.ebuild | 80 |
7 files changed, 213 insertions, 12 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/Manifest b/sys-cluster/vzctl/Manifest index a958620438c7..817d1968d42e 100644 --- a/sys-cluster/vzctl/Manifest +++ b/sys-cluster/vzctl/Manifest @@ -1,18 +1,13 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX vz.initd 5465 RMD160 303e4877e95db9f90d512b37d67cdaa94e823d52 SHA1 967cc1a9d71109db574f565d2f733332cfafcf50 SHA256 63c17d2783cfd01fcfb66aa8b0c572ea6bf366d59a72c10f1728091c7eaa5fc0 AUX vzctl-3.0.16-prevent-stripping.patch 1407 RMD160 beac951027ab76136ce2dc7f15690e7c1fe829f9 SHA1 4d25c369ab3a27201ae2c1954daf6f322874b801 SHA256 bc1299d1fe12fe720309f06df5360ab49ce3f6ab282398f6ff155fab43020c1f +AUX vzctl-3.0.22-capability-fix.patch 1037 RMD160 d244af55f1eaf249d1db04e53ab452aeec5e32f5 SHA1 bb6699627ddedaa524e4858e3c46e3bce50fb1f1 SHA256 977eea8154c3276fbab5a091cd30cf5072e26e7a9957b3aaa4428eacd3be0e56 +AUX vzctl-3.0.22-document-disable-modules.patch 843 RMD160 635e9417e3bbdef88d447f65e7d8007b89ba52ad SHA1 b6c1bc340ed29efe9ebf99d50b214b4c03e23379 SHA256 e2f4d5b3d3447eb6a4086ec3ff1ab5e8cc10797afe4febc3f06847a94430e6d5 +AUX vzctl-3.0.22-glibc28.patch 758 RMD160 633a9feb1a7101a166aa8e090fac4b5720546d0c SHA1 d19fb01c59366eb97da8178864ddda88010b7110 SHA256 36021ca9dabe548075ca016db047131f3536f916b2fa620ed61b00c41545e19e +AUX vzctl-3.0.22-workaround-gentoo-add_ip.patch 1250 RMD160 d77d99b74ed55894a947d6651f3a8471f3f582ff SHA1 a3da293f85076cc8c86f68c128733e57ddba8b56 SHA256 b5d52398a85d947ceebcd7db17fbd6ec602bb03c338ec4af5b202a814e226730 DIST vzctl-3.0.18.tar.bz2 359655 RMD160 9c7169e151c6384fd489df3dd6392d442706f46f SHA1 35bc546f9af7254b1739bca9cead71b8dad04ca1 SHA256 8610efa9a8327a1b6457eaa28b772ad753db5f23c2c18b25bb3ce0cf6a929e2f DIST vzctl-3.0.22.tar.bz2 360012 RMD160 53353981fefea94d997b3555600583f4c5818833 SHA1 58e5c55855aebf9e4ca032b325d8960a3836d648 SHA256 20f75e8342b85909d6bf01d0db47acaa088125da7f203b5e6e6169aa4c139166 EBUILD vzctl-3.0.18-r1.ebuild 1771 RMD160 96bca16be9a37a8e630856d7128322090bbc6eda SHA1 494d3c9626c0fa2c252186b663eb3284744f2e8e SHA256 1734e54adde38e4649214f56c13ff5575216a34ac5b263f08f4a8d1069dddc65 +EBUILD vzctl-3.0.22-r1.ebuild 2587 RMD160 7dc6eb0555fc978b6a234e4fb6988a6394829b50 SHA1 00a65bb152621a0834c78607cc4d1aaf39037867 SHA256 a15b08beb6303d9244677eea27ab67ef3e577fa513beae5909ed05760d60df3f EBUILD vzctl-3.0.22.ebuild 2316 RMD160 16e83e4cfe8e1ea49f062ec79d50e8749bb57d2d SHA1 e8588f3c09d88914548a8b152eeaacb1b84b3527 SHA256 240a995f88cd827e173bece0ff416995dcab3ae9321b63c80029e60e7be8ef4e -MISC ChangeLog 9934 RMD160 24847d3c0cc5b0b04affb1d3c1bd46ec9a76d96d SHA1 9b0701bd8388e67fba1a53aea3eb0a2f84947f9d SHA256 2096b380bced727449fcda6c6f12c623f63a27a2b5ed1ee33b6f5a778bb06b95 +MISC ChangeLog 10582 RMD160 440450967607054165badf5a4e2fd72790d0ee86 SHA1 c0db68fd40387d2224f1649921b9426398ecf0e9 SHA256 482dedc1a2d54fc1264ce185135b1617247b80701a8129bec6f0aebda72b9bd4 MISC metadata.xml 250 RMD160 859a9aa257ba731f151779434edc614d186d86cf SHA1 0e65923b7b0996ac7e063048e2fe5814453407b7 SHA256 70752023c9e02de0ce3540c4c09bc3256c72568be427bb5c7e9886745b5d2215 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.7 (GNU/Linux) - -iD8DBQFH2txmmPFBzbX68WERArymAKCDsdR8aRJExp6X2ZEsH3dAoI582wCeIImu -6O5D5zAqgxr7Qr8ASt2AYxk= -=oE+k ------END PGP SIGNATURE----- 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.' +} |