Gentoo Archives: gentoo-commits

From: "Maxim Koltsov (maksbotan)" <maksbotan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-cluster/vzctl: vzctl-4.3.ebuild vzctl-9999.ebuild metadata.xml ChangeLog
Date: Fri, 31 May 2013 15:20:59
Message-Id: 20130531152053.0199A2171D@flycatcher.gentoo.org
maksbotan    13/05/31 15:20:52

  Modified:             vzctl-9999.ebuild metadata.xml ChangeLog
  Added:                vzctl-4.3.ebuild
  Log:
  Bump to 4.3 and update 9999, adding vanilla kernel support. Thanks to slepnoga.
  
  (Portage version: 2.1.12.2/cvs/Linux x86_64, signed Manifest commit with key F8DBDADE)

Revision  Changes    Path
1.15                 sys-cluster/vzctl/vzctl-9999.ebuild

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/vzctl/vzctl-9999.ebuild?rev=1.15&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/vzctl/vzctl-9999.ebuild?rev=1.15&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/vzctl/vzctl-9999.ebuild?r1=1.14&r2=1.15

Index: vzctl-9999.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/vzctl-9999.ebuild,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- vzctl-9999.ebuild	22 Feb 2013 14:24:39 -0000	1.14
+++ vzctl-9999.ebuild	31 May 2013 15:20:52 -0000	1.15
@@ -1,10 +1,13 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/vzctl-9999.ebuild,v 1.14 2013/02/22 14:24:39 pinkbyte Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/vzctl-9999.ebuild,v 1.15 2013/05/31 15:20:52 maksbotan Exp $
 
 EAPI="5"
 
-inherit bash-completion-r1 autotools git-2 toolchain-funcs udev
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+inherit bash-completion-r1 autotools-utils git-2 toolchain-funcs udev
 
 DESCRIPTION="OpenVZ ConTainers control utility"
 HOMEPAGE="http://openvz.org/"
@@ -14,39 +17,49 @@
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS=""
-IUSE="cgroup +ploop"
+IUSE="ploop vanilla-kernel vz-kernel"
 
-RDEPEND="
-	net-firewall/iptables
-	sys-apps/ed
-	>=sys-apps/iproute2-3.3.0
-	sys-fs/vzquota
-	ploop? ( >=sys-cluster/ploop-1.5 )
-	cgroup? ( >=dev-libs/libcgroup-0.37 )
-"
+RDEPEND="net-firewall/iptables
+		sys-apps/ed
+		>=sys-apps/iproute2-3.3.0
+		vz-kernel? ( sys-fs/vzquota )
+		ploop? ( >=sys-cluster/ploop-1.6 )
+		vanilla-kernel? ( >=dev-libs/libcgroup-0.37 )
+		"
 
 DEPEND="${RDEPEND}
 	virtual/pkgconfig"
 
+REQUIRED_USE="^^ ( vz-kernel vanilla-kernel )"
+
 src_prepare() {
+
 	# Set default OSTEMPLATE on gentoo
 	sed -i -e 's:=redhat-:=gentoo-:' etc/dists/default || die 'sed on etc/dists/default failed'
 	# Set proper udev directory
 	sed -i -e "s:/lib/udev:$(udev_get_udevdir):" src/lib/dev.c || die 'sed on src/lib/dev.c failed'
-	eautoreconf
+
+	#provide user_epatch
+	autotools-utils_src_prepare
 }
 
 src_configure() {
-	econf \
-		--localstatedir=/var \
-		--enable-udev \
-		--enable-bashcomp \
-		--enable-logrotate \
-		$(use_with ploop) \
-		$(use_with cgroup)
+
+	local myeconfargs=(
+		--localstatedir=/var
+		--enable-udev
+		--enable-bashcomp
+		--enable-logrotate
+		--with-vz
+		$(use_with ploop)
+		$(use_with vanilla-kernel cgroup)
+		)
+
+	autotools-utils_src_configure
 }
 
 src_install() {
+
 	emake DESTDIR="${D}" udevdir="$(udev_get_udevdir)"/rules.d install install-gentoo
 
 	# install the bash-completion script into the right location
@@ -59,6 +72,7 @@
 }
 
 pkg_postinst() {
+
 	ewarn "To avoid loosing network to CTs on iface down/up, please, add the"
 	ewarn "following code to /etc/conf.d/net:"
 	ewarn " postup() {"
@@ -70,9 +84,10 @@
 	ewarn "/usr/share/vzctl/scripts/vpsreboot from crontab and use"
 	ewarn "/etc/init.d/vzeventd."
 
-	if use cgroup; then
-		ewarn "You have chose to use experimental CGROUP feature"
-		ewarn "please do NOT file bugs to Gentoo bugzilla,"
-		ewarn "use upstream bug tracker instead"
+	if use vanilla-kernel; then
+		einfo "You have selected vanilla' kernel support."
+		einfo "If you need checkpoint suspend/restore feature"
+		einfo "please install 'sys-process/criu' "
+		einfo "This is experimental and not stable (in gentoo) now"
 	fi
 }



1.11                 sys-cluster/vzctl/metadata.xml

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/vzctl/metadata.xml?rev=1.11&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/vzctl/metadata.xml?rev=1.11&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/vzctl/metadata.xml?r1=1.10&r2=1.11

Index: metadata.xml
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/metadata.xml,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- metadata.xml	16 Feb 2013 13:02:11 -0000	1.10
+++ metadata.xml	31 May 2013 15:20:52 -0000	1.11
@@ -11,6 +11,8 @@
 	<use>
 		<flag name='ploop'>Add support for ploop devices via <pkg>sys-cluster/ploop</pkg></flag>
 		<flag name='cgroup'>Add support to Linux kernel cgroup subsytem</flag>
+		<flag name='vz-kernel'>Support OpenVZ patched kernel (<pkg>sys-kernel/openvz-sources</pkg>)</flag>
+		<flag name='vanilla-kernel'>Support unpatched upstream Linux kernel</flag>
 	</use>
 	<upstream>
 		<maintainer status="active">



1.112                sys-cluster/vzctl/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/vzctl/ChangeLog?rev=1.112&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/vzctl/ChangeLog?rev=1.112&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/vzctl/ChangeLog?r1=1.111&r2=1.112

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/ChangeLog,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -r1.111 -r1.112
--- ChangeLog	25 May 2013 08:51:28 -0000	1.111
+++ ChangeLog	31 May 2013 15:20:52 -0000	1.112
@@ -1,6 +1,13 @@
 # ChangeLog for sys-cluster/vzctl
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/ChangeLog,v 1.111 2013/05/25 08:51:28 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/ChangeLog,v 1.112 2013/05/31 15:20:52 maksbotan Exp $
+
+*vzctl-4.3 (31 May 2013)
+
+  31 May 2013; Maxim Koltsov <maksbotan@g.o> +vzctl-4.3.ebuild,
+  metadata.xml, vzctl-9999.ebuild:
+  Bump to 4.3 and update 9999, adding vanilla kernel support. Thanks to
+  slepnoga.
 
   25 May 2013; Agostino Sarubbo <ago@g.o> vzctl-4.2.ebuild:
   Add ~ppc64, wrt bug #414531



1.1                  sys-cluster/vzctl/vzctl-4.3.ebuild

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/vzctl/vzctl-4.3.ebuild?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/vzctl/vzctl-4.3.ebuild?rev=1.1&content-type=text/plain

Index: vzctl-4.3.ebuild
===================================================================
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/vzctl-4.3.ebuild,v 1.1 2013/05/31 15:20:52 maksbotan Exp $

EAPI="5"

inherit base bash-completion-r1 eutils toolchain-funcs udev

DESCRIPTION="OpenVZ ConTainers 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 ~x86 ~ppc64"
IUSE="ploop vanilla-kernel vz-kernel"

RDEPEND="net-firewall/iptables
		sys-apps/ed
		>=sys-apps/iproute2-3.3.0
		vz-kernel? ( sys-fs/vzquota )
		ploop? ( >=sys-cluster/ploop-1.5 )
		vanilla-kernel? ( >=dev-libs/libcgroup-0.37 )
		"

DEPEND="${RDEPEND}
	virtual/pkgconfig
	"

REQUIRED_USE="^^ ( vz-kernel vanilla-kernel )"

src_prepare() {

	# Set default OSTEMPLATE on gentoo
	sed -i -e 's:=redhat-:=gentoo-:' etc/dists/default || die 'sed on etc/dists/default failed'
	# Set proper udev directory
	sed -i -e "s:/lib/udev:$(udev_get_udevdir):" src/lib/dev.c || die 'sed on src/lib/dev.c failed'
}

src_configure() {

	econf \
		--localstatedir=/var \
		--enable-udev \
		--enable-bashcomp \
		--enable-logrotate \
		--with-vz \
		$(use_with ploop) \
		$(use_with vanilla-kernel cgroup)
}

src_install() {

	emake DESTDIR="${D}" udevdir="$(udev_get_udevdir)"/rules.d install install-gentoo

	# install the bash-completion script into the right location
	rm -rf "${ED}"/etc/bash_completion.d
	newbashcomp etc/bash_completion.d/vzctl.sh ${PN}

	# We need to keep some dirs
	keepdir /vz/{dump,lock,root,private,template/cache}
	keepdir /etc/vz/names /var/lib/vzctl/veip
}

pkg_postinst() {
	ewarn "To avoid loosing network to CTs on iface down/up, please, add the"
	ewarn "following code to /etc/conf.d/net:"
	ewarn " postup() {"
	ewarn "     /usr/sbin/vzifup-post \${IFACE}"
	ewarn " }"

	ewarn "Starting with 3.0.25 there is new vzeventd service to reboot CTs."
	ewarn "Please, drop /usr/share/vzctl/scripts/vpsnetclean and"
	ewarn "/usr/share/vzctl/scripts/vpsreboot from crontab and use"
	ewarn "/etc/init.d/vzeventd."

	if use vanilla-kernel; then
		einfo "You have selected vanilla' kernel support."
		einfo "If you need checkpoint suspend/restore feature"
		einfo "please install 'sys-process/criu' "
		einfo "This is experimental and not stable (in gentoo) now"
	fi
}