From bf6b18becc8567daab0250aac43a383759cb01cf Mon Sep 17 00:00:00 2001 From: Peter Volkov Date: Sun, 5 Apr 2009 19:34:37 +0000 Subject: Upstream accepted patches merged back, some other bits rewritten as they asked us. (Portage version: 2.2_rc28/cvs/Linux i686) --- sys-cluster/vzctl/ChangeLog | 15 +++- .../files/vzctl-3.0.23-cronjobs-dstdir-check.patch | 61 ++++++++++++++ .../vzctl-3.0.23-cronjobs-issue-warning.patch | 27 ++++--- .../vzctl-3.0.23-cronjobs-multiple-cron-jobs.patch | 44 ++++++++++ .../files/vzctl-3.0.23-cronjobs-typo-fix.patch | 38 --------- .../files/vzctl-3.0.23-cronjobs-wightspace.patch | 55 +++++++++++++ .../files/vzctl-3.0.23-multiple-cron-jobs.patch | 42 ++++++++++ sys-cluster/vzctl/vzctl-3.0.23-r1.ebuild | 89 --------------------- sys-cluster/vzctl/vzctl-3.0.23-r2.ebuild | 93 ++++++++++++++++++++++ 9 files changed, 325 insertions(+), 139 deletions(-) create mode 100644 sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-dstdir-check.patch create mode 100644 sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-multiple-cron-jobs.patch delete mode 100644 sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-typo-fix.patch create mode 100644 sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-wightspace.patch create mode 100644 sys-cluster/vzctl/files/vzctl-3.0.23-multiple-cron-jobs.patch delete mode 100644 sys-cluster/vzctl/vzctl-3.0.23-r1.ebuild create mode 100644 sys-cluster/vzctl/vzctl-3.0.23-r2.ebuild (limited to 'sys-cluster/vzctl') diff --git a/sys-cluster/vzctl/ChangeLog b/sys-cluster/vzctl/ChangeLog index ff88b5e05f97..39b9d25973e7 100644 --- a/sys-cluster/vzctl/ChangeLog +++ b/sys-cluster/vzctl/ChangeLog @@ -1,6 +1,19 @@ # ChangeLog for sys-cluster/vzctl # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/ChangeLog,v 1.62 2009/03/31 09:47:14 pva Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/ChangeLog,v 1.63 2009/04/05 19:34:37 pva Exp $ + +*vzctl-3.0.23-r2 (05 Apr 2009) + + 05 Apr 2009; Peter Volkov + +files/vzctl-3.0.23-cronjobs-dstdir-check.patch, + files/vzctl-3.0.23-cronjobs-issue-warning.patch, + +files/vzctl-3.0.23-cronjobs-multiple-cron-jobs.patch, + -files/vzctl-3.0.23-cronjobs-typo-fix.patch, + +files/vzctl-3.0.23-cronjobs-wightspace.patch, + +files/vzctl-3.0.23-multiple-cron-jobs.patch, -vzctl-3.0.23-r1.ebuild, + +vzctl-3.0.23-r2.ebuild: + Upstream accepted patches merged back, some other bits rewritten as they + asked us. 31 Mar 2009; Peter Volkov vzctl-3.0.23-r1.ebuild: Nuke logrotate USE flag, bug #258174. diff --git a/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-dstdir-check.patch b/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-dstdir-check.patch new file mode 100644 index 000000000000..48ea502411bc --- /dev/null +++ b/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-dstdir-check.patch @@ -0,0 +1,61 @@ +From: Kir Kolyshkin +Date: Tue, 31 Mar 2009 12:05:53 +0000 (+0400) +Subject: etc/init.d/vz*: check for DST_CRONSCRIPT_DIR +X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff_plain;h=d4d3bca4052daaf265946159a71fc9ed16c33cb8 + +etc/init.d/vz*: check for DST_CRONSCRIPT_DIR + +Before commits df09d4ed and 00a5a95c we used 'install' to put the cronscript +into DST_CRONSCRIPT_DIR (/etc/cron.d), and it was making sure that DST +dir existed. + +Since we're now using 'cat' not 'install' we have to check for DST directory +explicitly. More to say, if there's no /etc/cron.d/ than there's probably +no sense to create it (crond is missing or smth). So just silently exit. + +Should fix http://bugzilla.openvz.org/1078 + +Reported-by: Peter Volkov +Signed-off-by: Kir Kolyshkin +--- + +diff --git a/etc/init.d/vz-gentoo.in b/etc/init.d/vz-gentoo.in +index b1a1a59..8836768 100755 +--- a/etc/init.d/vz-gentoo.in ++++ b/etc/init.d/vz-gentoo.in +@@ -58,6 +58,7 @@ setup_cron() + { + [ -z "$SRC_CRONSCRIPT_DIR" ] && return + [ -d "$SRC_CRONSCRIPT_DIR" ] || return ++ [ -d "$DST_CRONSCRIPT_DIR" ] || return + cat $SRC_CRONSCRIPT_DIR/vz* > $DST_CRONSCRIPT_DIR/vz && + chmod 644 $DST_CRONSCRIPT_DIR/vz + } +@@ -66,6 +67,7 @@ remove_cron() + { + [ -z "$SRC_CRONSCRIPT_DIR" ] && return + [ -d "$SRC_CRONSCRIPT_DIR" ] || return ++ [ -d "$DST_CRONSCRIPT_DIR" ] || return + cat > $DST_CRONSCRIPT_DIR/vz < $DST_CRONSCRIPT_DIR/vz && + chmod 644 $DST_CRONSCRIPT_DIR/vz + } +@@ -138,6 +139,7 @@ remove_cron() + check_old_cron_files + [ -z "$SRC_CRONSCRIPT_DIR" ] && return + [ -d "$SRC_CRONSCRIPT_DIR" ] || return ++ [ -d "$DST_CRONSCRIPT_DIR" ] || return + cat > $DST_CRONSCRIPT_DIR/vz < -Date: Tue Mar 31 12:31:01 2009 +0400 +Date: Sun Apr 5 21:51:01 2009 +0400 Issue warning if cronjobs aren't automatically set Init script is supposed to set cronjobs automatically on start and remove them on stop. This works only with cron daemons that may hook at runtime scripts at ${DST_CRONSCRIPT_DIR} (e.g. sys-process/vixie-cron can). For - other cron daemons it's safer to warn users to set cronjobs manually. + other cron daemons it's safer to warn users and ask them to set cronjobs + manually. diff --git a/etc/init.d/vz-gentoo.in b/etc/init.d/vz-gentoo.in -index 97ea313..dc87d41 100755 +index 8836768..465fab2 100755 --- a/etc/init.d/vz-gentoo.in +++ b/etc/init.d/vz-gentoo.in -@@ -57,7 +57,19 @@ check_config() { - setup_cron() +@@ -58,7 +58,23 @@ setup_cron() { [ -z "$SRC_CRONSCRIPT_DIR" ] && return + [ -d "$SRC_CRONSCRIPT_DIR" ] || return - [ -d "$DST_CRONSCRIPT_DIR" ] || return + if [ ! -d "${DST_CRONSCRIPT_DIR}" ]; then + if [ "x${SKIP_CRON_WARNINGS}" != "xyes" ]; then @@ -24,13 +25,17 @@ index 97ea313..dc87d41 100755 + ewarn "\${DST_CRONSCRIPT_DIR} (${DST_CRONSCRIPT_DIR}) as a spool directory" + ewarn "(e.g. sys-process/vixie-cron can). On your system ${DST_CRONSCRIPT_DIR}" + ewarn "is not a directory even, thus you need manually set the following cron jobs:" -+ ewarn "*/5 * * * * root @PKGDATADIR@/scripts/vpsnetclean" -+ ewarn "*/5 * * * * root @PKGDATADIR@/scripts/vpsreboot" -+ ewarn "If you already did that and wish to avoid this warning put" ++ echo ++ grep -E -v '(^#|^$)' ${SRC_CRONSCRIPT_DIR}/vz* ++ echo ++ ewarn "Alternatevely, please, set cron execution of scripts inside ${SRC_CRONSCRIPT_DIR}" ++ ewarn "so that modifications in those scripts be handled automatically." ++ ewarn ++ ewarn "If you already did that and wish to avoid this warning message put" + ewarn "SKIP_CRON_WARNINGS=yes into /etc/conf.d/vz." + fi + return + fi - install -m644 -o root -g root $SRC_CRONSCRIPT_DIR/vz \ - $DST_CRONSCRIPT_DIR + cat $SRC_CRONSCRIPT_DIR/vz* > $DST_CRONSCRIPT_DIR/vz && + chmod 644 $DST_CRONSCRIPT_DIR/vz } diff --git a/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-multiple-cron-jobs.patch b/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-multiple-cron-jobs.patch new file mode 100644 index 000000000000..95f90e793ecc --- /dev/null +++ b/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-multiple-cron-jobs.patch @@ -0,0 +1,44 @@ +From: Kir Kolyshkin +Date: Tue, 31 Mar 2009 12:02:45 +0000 (+0400) +Subject: etc/init.d/vz-gentoo: add processing of multiple cron files +X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff_plain;h=df09d4ede93d20ed755f0d97778be359182fbcc7 + +etc/init.d/vz-gentoo: add processing of multiple cron files + +This is an addition to commit 00a5a95c02c05e0070a1dd10b47c90b3715c9ff5 +for gentoo initscript. The idea is to be able to have multiple cronjob +files managed by initscript. + +The only problem is there's no update_cron task for Gentoo initscript. + +http://bugzilla.openvz.org/599 + +Signed-off-by: Kir Kolyshkin +--- + +diff --git a/etc/init.d/vz-gentoo.in b/etc/init.d/vz-gentoo.in +index 5050005..b1a1a59 100755 +--- a/etc/init.d/vz-gentoo.in ++++ b/etc/init.d/vz-gentoo.in +@@ -58,8 +58,8 @@ setup_cron() + { + [ -z "$SRC_CRONSCRIPT_DIR" ] && return + [ -d "$SRC_CRONSCRIPT_DIR" ] || return +- install -m644 -o root -g root $SRC_CRONSCRIPT_DIR/vz \ +- $DST_CRONSCRIPT_DIR ++ cat $SRC_CRONSCRIPT_DIR/vz* > $DST_CRONSCRIPT_DIR/vz && ++ chmod 644 $DST_CRONSCRIPT_DIR/vz + } + + remove_cron() +@@ -70,8 +70,8 @@ remove_cron() + # DO NOT EDIT THIS FILE! + # + # Contents of this file managed by /etc/init.d/vz script +-# Master copy is $SRC_CRONSCRIPT_DIR/vz. +-# Consult that file for documentation. ++# Master copy is in $SRC_CRONSCRIPT_DIR/vz* file(s). ++# Consult $SRC_CRONSCRIPT_DIR/vz* for documentation. + EOF + } + diff --git a/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-typo-fix.patch b/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-typo-fix.patch deleted file mode 100644 index 038b7a21cde8..000000000000 --- a/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-typo-fix.patch +++ /dev/null @@ -1,38 +0,0 @@ -commit b57ce68fae2ce2642a36746b8e7b7216a02bfc8c -Author: Peter Volkov -Date: Sun Feb 22 19:40:34 2009 +0300 - - vz-gentoo.in typo: check for DST_CRONSCRIPT_DIR - - Fixed indentation and typo to make script really check for - $DST_CRONSCRIPT_DIR directory existence. - -diff --git a/etc/init.d/vz-gentoo.in b/etc/init.d/vz-gentoo.in -index 005813f..97ea313 100755 ---- a/etc/init.d/vz-gentoo.in -+++ b/etc/init.d/vz-gentoo.in -@@ -56,17 +56,17 @@ check_config() { - # being enabled or not. - setup_cron() - { -- [ -z "$SRC_CRONSCRIPT_DIR" ] && return -- [ -d "$SRC_CRONSCRIPT_DIR" ] || return -- install -m644 -o root -g root $SRC_CRONSCRIPT_DIR/vz \ -- $DST_CRONSCRIPT_DIR -+ [ -z "$SRC_CRONSCRIPT_DIR" ] && return -+ [ -d "$DST_CRONSCRIPT_DIR" ] || return -+ install -m644 -o root -g root $SRC_CRONSCRIPT_DIR/vz \ -+ $DST_CRONSCRIPT_DIR - } - - remove_cron() - { -- [ -z "$SRC_CRONSCRIPT_DIR" ] && return -- [ -d "$SRC_CRONSCRIPT_DIR" ] || return -- cat > $DST_CRONSCRIPT_DIR/vz < $DST_CRONSCRIPT_DIR/vz < +Date: Tue, 31 Mar 2009 11:39:17 +0000 (+0400) +Subject: etc/init.d/*: whitespace fixes +X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff_plain;h=b9be63ff5a33955ce80384523b4712b0b032d4b4 + +etc/init.d/*: whitespace fixes + +As per http://bugzilla.openvz.org/1078 + +Reported-by: Peter Volkov +Signed-off-by: Kir Kolyshkin +--- + +diff --git a/etc/init.d/vz-gentoo.in b/etc/init.d/vz-gentoo.in +index 005813f..5050005 100755 +--- a/etc/init.d/vz-gentoo.in ++++ b/etc/init.d/vz-gentoo.in +@@ -56,17 +56,17 @@ check_config() { + # being enabled or not. + setup_cron() + { +- [ -z "$SRC_CRONSCRIPT_DIR" ] && return +- [ -d "$SRC_CRONSCRIPT_DIR" ] || return +- install -m644 -o root -g root $SRC_CRONSCRIPT_DIR/vz \ +- $DST_CRONSCRIPT_DIR ++ [ -z "$SRC_CRONSCRIPT_DIR" ] && return ++ [ -d "$SRC_CRONSCRIPT_DIR" ] || return ++ install -m644 -o root -g root $SRC_CRONSCRIPT_DIR/vz \ ++ $DST_CRONSCRIPT_DIR + } + + remove_cron() + { +- [ -z "$SRC_CRONSCRIPT_DIR" ] && return +- [ -d "$SRC_CRONSCRIPT_DIR" ] || return +- cat > $DST_CRONSCRIPT_DIR/vz < $DST_CRONSCRIPT_DIR/vz < +Date: Tue Mar 31 16:02:45 2009 +0400 + + etc/init.d/vz-gentoo: add processing of multiple cron files + + This is an addition to commit 00a5a95c02c05e0070a1dd10b47c90b3715c9ff5 + for gentoo initscript. The idea is to be able to have multiple cronjob + files managed by initscript. + + The only problem is there's no update_cron task for Gentoo initscript. + + http://bugzilla.openvz.org/599 + + Signed-off-by: Kir Kolyshkin + +diff --git a/etc/init.d/vz-gentoo.in b/etc/init.d/vz-gentoo.in +index 5050005..b1a1a59 100755 +--- a/etc/init.d/vz-gentoo.in ++++ b/etc/init.d/vz-gentoo.in +@@ -58,8 +58,8 @@ setup_cron() + { + [ -z "$SRC_CRONSCRIPT_DIR" ] && return + [ -d "$SRC_CRONSCRIPT_DIR" ] || return +- install -m644 -o root -g root $SRC_CRONSCRIPT_DIR/vz \ +- $DST_CRONSCRIPT_DIR ++ cat $SRC_CRONSCRIPT_DIR/vz* > $DST_CRONSCRIPT_DIR/vz && ++ chmod 644 $DST_CRONSCRIPT_DIR/vz + } + + remove_cron() +@@ -70,8 +70,8 @@ remove_cron() + # DO NOT EDIT THIS FILE! + # + # Contents of this file managed by /etc/init.d/vz script +-# Master copy is $SRC_CRONSCRIPT_DIR/vz. +-# Consult that file for documentation. ++# Master copy is in $SRC_CRONSCRIPT_DIR/vz* file(s). ++# Consult $SRC_CRONSCRIPT_DIR/vz* for documentation. + EOF + } + diff --git a/sys-cluster/vzctl/vzctl-3.0.23-r1.ebuild b/sys-cluster/vzctl/vzctl-3.0.23-r1.ebuild deleted file mode 100644 index 46558f748b72..000000000000 --- a/sys-cluster/vzctl/vzctl-3.0.23-r1.ebuild +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/vzctl-3.0.23-r1.ebuild,v 1.2 2009/03/31 09:47:14 pva Exp $ - -inherit bash-completion eutils autotools - -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" - -RDEPEND=" - net-firewall/iptables - sys-apps/ed - sys-apps/iproute2 - sys-fs/vzquota - virtual/cron" - -DEPEND="${RDEPEND}" - -pkg_setup() { - has_version "