summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2012-09-30 05:07:07 +0000
committerDoug Goldstein <cardoe@gentoo.org>2012-09-30 05:07:07 +0000
commit7eb7351f6d8483639c8d2e0f4dced937e9f2efc3 (patch)
treecbc8caa08c41eb56241e8246d4d25967cb450e68 /app-emulation/libvirt
parentUpdate the live ebuild to the latest tweak in 0.10.2. (diff)
downloadhistorical-7eb7351f6d8483639c8d2e0f4dced937e9f2efc3.tar.gz
historical-7eb7351f6d8483639c8d2e0f4dced937e9f2efc3.tar.bz2
historical-7eb7351f6d8483639c8d2e0f4dced937e9f2efc3.zip
Bump the init script to fix an issue where the halt command could not be used during the correct phase with OpenRC.
Package-Manager: portage-2.1.11.9/cvs/Linux x86_64
Diffstat (limited to 'app-emulation/libvirt')
-rw-r--r--app-emulation/libvirt/ChangeLog7
-rw-r--r--app-emulation/libvirt/Manifest7
-rwxr-xr-xapp-emulation/libvirt/files/libvirtd.init-r9128
-rw-r--r--app-emulation/libvirt/libvirt-0.10.2.ebuild4
-rw-r--r--app-emulation/libvirt/libvirt-9999.ebuild4
5 files changed, 142 insertions, 8 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog
index f334af941906..b229741a84de 100644
--- a/app-emulation/libvirt/ChangeLog
+++ b/app-emulation/libvirt/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for app-emulation/libvirt
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.213 2012/09/30 03:34:54 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.214 2012/09/30 05:07:07 cardoe Exp $
+
+ 30 Sep 2012; Doug Goldstein <cardoe@gentoo.org> libvirt-0.10.2.ebuild,
+ libvirt-9999.ebuild, +files/libvirtd.init-r9:
+ Bump the init script to fix an issue where the halt command could not be used
+ during the correct phase with OpenRC.
30 Sep 2012; Doug Goldstein <cardoe@gentoo.org> libvirt-9999.ebuild:
Update the live ebuild to the latest tweak in 0.10.2.
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
index b7e242586af0..1ffd23253ac5 100644
--- a/app-emulation/libvirt/Manifest
+++ b/app-emulation/libvirt/Manifest
@@ -2,6 +2,7 @@ AUX libvirtd.confd-r2 1749 SHA256 93040599a7cb878b54b8b963ef4963e9450bc25e982e39
AUX libvirtd.confd-r3 1757 SHA256 60f341dcf33ca8d55b6394ba6cf8e22f5133393e47f827b88cef1243c255f15c SHA512 f65484ab52a5c4d0f7f1e6e7be9c379617d773b18e81ac875d628a0d9a2b5ae68d256dc1e29ca756d5216d52728bdc80da1afdd89977e6670da3a6dbd3aecc78 WHIRLPOOL 34e98b2cd72466a1152e41ea7b34533337e4aec3cf347cd75e766143b576462110bdb2ee691268ceaea0cfe6aba2a5b6bcdedc662ae6a66cc14e0099523c8e20
AUX libvirtd.init-r5 3572 SHA256 6c04449123ebb5d5736e53a81325f66a0db52cc19c7a6c80ba5f599a3687569f SHA512 bd11dfbd4ccf884b3b6f501bb3b2799f0d001b60eb9ec16167ac757066cf34ef5f22409fc97354596fb7d2a6701e023faf4a43f767df34a1070365731780b2b2 WHIRLPOOL 670e0918536745a6dd6de00bd9bef7b4d540be386d855fdd064ceb471a4f1e17d3dbac963f63f3c8f51985df7e60562775d01a14c86ebd3a8f96cc943cea7fd0
AUX libvirtd.init-r8 3630 SHA256 2156b91662bfc9a6c668130c5f562ff79101f0ba579a86b7048d1851e8ef7968 SHA512 1f4e500bed8fad3c5fa0999f8710e1d788910d44548c0a494ffb27047e1d0b328017bd895fa5474c27364a8dcf98181159f962568d896a5bb296da93f4240dc5 WHIRLPOOL 2580754a2edd461c38aeacbc5e60c34df3d84611fe5c04b08fbfe6d9cfd4956697c4edc2df3ce86016716ab74ce574ec24498a55ff3e851d637893e2d512e17b
+AUX libvirtd.init-r9 3605 SHA256 53383c6da34a9e5348c02df09d6671ce37a1661dc446ac6c5875a77824e7bbb3 SHA512 357e4a1d2e13adea3e7aaea46560d4fa460790024d8ff324107a8574b088451eb24ab29284bca91d75a3a51dd4205d04fdf35be27cde50129bff6d5a4414c206 WHIRLPOOL 78e14db80fd08f632ec3a5594827e7fe7e3fe56b1078c66f87cf2bbac0baa102a376f9540f329e787ad9b94344dcffe5e2bf8c952925dd28ef12cfd7fdef39e2
DIST libvirt-0.10.1.tar.gz 21293245 SHA256 7b179219b92bff35986e2103b2767423d1e9c284052aa81228eae765f01a074d SHA512 3ed28b6254d947080f126d8948b9ae9c5fe123b04c36004f98898b201b30a46f07f87b036333586714d1dc915ebcc5857985547823daba6e2b6ee0be92215551 WHIRLPOOL 13ce2497b6e53af6c11e446a36d1c5fe15a0a6f6030bede6b419491a95fa0e770877e378473a4a1d9e82ab5bb277bf734f0e8146c5ed2d3486cb0c0f9c0c6757
DIST libvirt-0.10.2-69190009.tar.xz 10180 SHA256 e2f56f3efc23aac9dd8623f9e708d17d4ab31e175f8f0d75ee026bbc8db7d0cb SHA512 90884081aad8af0cf9245e3264bbaf40cf9c5fc11011b85798da033f59cf4749195247c4dce91e8efc8663b6fd2e0c36a33fa2e1d9ed019af98e5644b83c7d99 WHIRLPOOL b1cbea2e801cdff4b02ad32e238eaf70197ffd4d9c4954a744739f3aa0be141bd79cfa787e34111616b7cebabf797a6850a7b199e29b3e42728269db46b8a9a1
DIST libvirt-0.10.2.tar.gz 21916817 SHA256 1fe69ae1268a097cc0cf83563883b51780d528c6493efe3e7d94c4160cc46977 SHA512 b0e784ebedf1c6694792ae9d7672101669441e08ad0352be3d57eaae03d6cd99527c2826ea41e3edcf069eab6f2168200b198bca9504d8d63375d20ecbead120 WHIRLPOOL 4a1651be688aabc3b175da762cc88dfe8b61268bf42bb731d7e74ab8b51cf2c1793c77eff6b5d7696b2a4d5bb1103f40d5fbe544d8784dc80e6899c28e2d3f50
@@ -11,12 +12,12 @@ DIST libvirt-0.9.12.tar.gz 20054618 SHA256 298ffc7f2a6d6e78aae46f11a0980f4bc17fa
DIST libvirt-0.9.13-bp-1.tar.xz 6160 SHA256 dfb91f17d999f1aaf17e9cb59b64227631851ccfabaa24f0ba217dd5f4ae8f51 SHA512 9d7b7d9106fa217d1d6a218196b4692c6f560ffa2824de2b0e04ca35e8eb9ee6abeb02fece3720aa649128596c0990613d7914ab7dadfc7c8e830208882a2e1b WHIRLPOOL 54d96823526d569f081805569fa94947a0843c45cbefa83492e0da19741474fe6d07e212c5dadf93fa2d9123e05c21ab30cec9d8fff3f1ccff6dba8b41f23c8d
DIST libvirt-0.9.13.tar.gz 20276757 SHA256 d124e9915c88c195da9c008a6d855e53e555dca5816052e163dda61388359d5b SHA512 d275cf6dd6c5700eeee701ff4d28a1483137f8c7525496069438b9e81727761066f1d4b1504bf170f6a3f457ecc203f6b5e7b367fe931803cb7592cccceb7f71 WHIRLPOOL 26a5c660c07516c3736f7bd818b6b4b06c98d78181ba991139818f321ace43a33dcc7d095ce6f02b94f7b3aea7c556bb5388cea34ef801576e4d86f9c08712f7
EBUILD libvirt-0.10.1.ebuild 10817 SHA256 fc677e0ca0ef2b9f3afa97131d1dbbe9474bc2ef4bfb458428c25941c5c0b779 SHA512 ca94d0f71009f29e29c245143fc8655cbc93817b770dc6c83a8ebeecc54e0426b35ee59e61ff9bdafa777fa41331e0df69553f76d3ff3a49158e31616cb9508f WHIRLPOOL be67e80d13dcadfc9eac027912138b729a04eca22bde9a4ac0d9c1146872191b39de713e94ab4c04860f901591f4b93c233f2d65042dd036cca8f437278bbb33
-EBUILD libvirt-0.10.2.ebuild 10860 SHA256 9467b8762aeb180d70a6590137d33fb9656c4c2546b61c4f434a5b2f117a913a SHA512 87bf7032b64730a86992d5d344e0d9d1cb89d79501249a4c1e8ee1a7783f1d58df76d5fac40264d7644728c7de864a638cc0169da5c8ea3be7e6bddeafec4690 WHIRLPOOL 4342f3a6c425219885a1de20e1ffd20ad7a42221c92aaae4ec823dfc25c879fb7e3a33343765225298757a44e43976a15497ab33744ee9a7296e4c208b053952
+EBUILD libvirt-0.10.2.ebuild 10860 SHA256 e66431d78f960091aecf5a9eebee0e88ea871c6f0f86cb0823cf7cb028c61c60 SHA512 17a0315c66ee89ee56cc541e41ff06f782d86ed70532941c062e69a30bb6c1828d424b2e2a0fb30534de44348a455ebdd081bde2a6f8b7dabddced6880ba0f0a WHIRLPOOL dd7671064171a2ad21dcbed50178ec04c3634f045572e21c014da5edc1d57391e7f185ec2f65b2f39ee2338b4eba2691ebb319ce54d566e4198503f94afd00b4
EBUILD libvirt-0.9.11.4.ebuild 8717 SHA256 1aa05ff800faac006cc7ac8a1da3978364d302c465452bf2c302b22ffebc9108 SHA512 fdcac516d0ed64aea658fb24c124179bb9c1f597a03ced889c803211baf7c22914eec4e5e9f5940c027d6e36ac8eeecb47eb730daef1372d51df3330e1f965e0 WHIRLPOOL 26a9b6bc50f0547d4bad7bc62008ab7e9284c2c50402e63f24c19bbc6aac8b5a1dce82d03cba595106c48c3de0768f3e3c6ed071bb4b2f2a9dcecdf3786cde53
EBUILD libvirt-0.9.11.5.ebuild 8719 SHA256 e11eec0ccb727e548d324348b0c4d1feb46e5ea2d7765a7232e7970507ada641 SHA512 f0e438beb2da85992066336fa07c6bc0a4d41662d35c8c630066560ac2f59a20303862f8123f896e1faed2605762df12057d7383eafeeafbecece312d36d9cad WHIRLPOOL 718f60e8ae7eb71c69fee079bed1f4eedf1e97d7716591782e48cc836376b243367aed0bd65ce2e01c232570ae58e6a149ff5e0b90f23c1c12c138a4a77f047a
EBUILD libvirt-0.9.12-r1.ebuild 10353 SHA256 2083781e89483e8dca012ddc71f526380f704cac3acf19dafa2f17d22d35c544 SHA512 45c6de7858d5ec022515f35efd6532fa79db6da1085557457a6c649cec71ed499bf1b692b1af6fd65cb04d12b80ba5e3255331544b49152e82bec8761d80b736 WHIRLPOOL 8f6ceed8eb27dcb905d298caf44a0f78398c36e21576ef6db69a6c499f90330928d4b21e1d065b2a11b9ef782dc694c4995d403f5624fa4e85984481721a9372
EBUILD libvirt-0.9.12.ebuild 10223 SHA256 3559384bb4892a0fdda39a3704a4c8c5ed8e3ad03427924132c89c3350759a9a SHA512 8c6d366cf27a0e65340d1249e6c5b6f7faadbd5402370305a1b8a3097c9e97f1d6df0766fff1a2d96ff5c38db4eaf3ca5de77d4f7325c25dabe94c8417aca160 WHIRLPOOL dbf14226a71296813f91e63d7bb34e223a488e5a3e7d55abc100d2479d2ed444a25e46f646ab56e5c16aabc1f25d5503fc54d299133455cba3b88d4f09e416d6
EBUILD libvirt-0.9.13-r1.ebuild 10802 SHA256 b77f2a46e08979208c7763c98fe18655e9e4799a0884d1568384d8b3b2a7a8c9 SHA512 8f4b6a2c3225fb2f2ab7c7666fba93becfdabc8046bc667faff94c03c64c505ca4c9e7f9506db98f9bf8d5a0874e0390cf022b711bd7d280d1f1051894e6bfd8 WHIRLPOOL c67a59280e3dfb15b79dd34859bba17e20a38c725a459e347c412662d7ee4be94a2829822b8dcdf64bcd927410e71475bd6e0f8e3653d52161de81a7da441fd8
-EBUILD libvirt-9999.ebuild 10363 SHA256 0d9a504254877ea67834b65d65cf8135279e7d1078049aceb6e2f34ab3c6505d SHA512 77e36873267d10071509c4b85f76dd2ab3e2a6880b60dc742d4c21744b06653d9f40f281ae68b891b4af23a4f8d8050a519acffb98277331a2c7958e0fd82323 WHIRLPOOL 43f0992f1ca482178c610230584755d962432ca9ceedb1c64f42767f9a3121bd681b85fa4c2941dc4e373da97bd4e13c9c59003d5bdb7fe00e4f0b2bd35465d4
-MISC ChangeLog 41743 SHA256 29c0bfc19a9c2c5337cadafceb43769f0e316f831ca16b3d6dc33c539ab6320f SHA512 809e7afb8ac195ab9e8b37bb33116f34664b894b9003e9daab5dafe59b09c4bf6ac090d6a9402e05b1212acb10d54eab2a7eeeb05e0e24cc95a405cdc5e391fd WHIRLPOOL 2ec562c8cb9b5141ee2ec50449d7ef69a0b413dd99709653a444f56a8c38a4781805ebb4993cd6582bfac5c71dff062cc45700d3bad6784559e2c12919683040
+EBUILD libvirt-9999.ebuild 10363 SHA256 5c773374b91bce2e2af7e12e3262d5ea08f39c89862ebd00aa39d3f7dc91c530 SHA512 ef724b3ee42a0a9c46d2c03ee62e901701bdb000ba4ce477ecfcf367eadd82363da741b14eae23dc26076818257b34838cbfaa2e2d6ba2e419b28d412307d911 WHIRLPOOL 34c7a2d1c5e807b874f5a4238991664f684a6d550e95dadedfeabe61aff09c19d52ac8828f4c19b4f94e7e10fa3f3daaa5d6d340d1be4da05c65a435643fe9a2
+MISC ChangeLog 41985 SHA256 7d1c7bc951fbb95011ef748e3c284df53b9cc017fec69ae63628b5899c222ada SHA512 72b903325bc7badf2b81fb5382a19dc2716ae21a45118f03f22335541d07d0fa15ecb11c17ed9fa6397ab73e9606f83f937cc550834a37f45b0ba8024ffe445b WHIRLPOOL 76aada1cf586fcb92c52e7f0b9a57f6b285354cd7f79bda2018767154fb1fd10acdba06368a9372d289aad401919992957c4cea76861f37804c9c7f7b6fee967
MISC metadata.xml 3420 SHA256 0916b94209d91c7a809069e61f788a9f6115ce9081758a90330f29a3249c9be5 SHA512 8acd907b424ef3500112d5834fba026146636948675381a3a07c1837968f2ebb146b0afa2a9d56225d9af008ade51d46022ba1c03d5e02de0e6e7f3678be4091 WHIRLPOOL c0e4dea1775586184c261a406556eed83f3f26782bfb770e055df8531b0643c62e0f8a6ac3f1243c8cdd1e931f17020d72704178a33e8b5eb4f23f24cf4f7354
diff --git a/app-emulation/libvirt/files/libvirtd.init-r9 b/app-emulation/libvirt/files/libvirtd.init-r9
new file mode 100755
index 000000000000..05852877b07c
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirtd.init-r9
@@ -0,0 +1,128 @@
+#!/sbin/runscript
+
+description="Virtual Machine Management daemon (libvirt)"
+extra_started_commands="reload halt"
+description_halt="Stops the libvirt daemon without stopping your VMs"
+description_reload="Restarts the libvirt daemon without stopping your VMs"
+
+depend() {
+ need net
+ after ntp-client ntpd nfs iscsid nfsmount portmap rpc.statd iptables ip6tables ebtables ceph corosync sanlock cgconfig
+}
+
+libvirtd_virsh() {
+ local mode=$1
+ shift
+
+ # Silence errors because virsh always throws an error about
+ # not finding the hypervisor version when connecting to libvirtd
+ LC_ALL=C virsh -c ${mode}:///system "$@" 2>/dev/null
+}
+
+libvirtd_dom_list() {
+ # Make sure that it wouldn't be confused if the domain name
+ # contains the word running.
+ libvirtd_virsh $1 list | awk '$3 == "running" { print $1 }'
+}
+
+libvirtd_dom_count() {
+ # Make sure that it wouldn't be confused if the domain name
+ # contains the word running.
+ libvirtd_virsh $1 list | awk 'BEGIN { count = 0 } \
+ $3 == "running" { count++ } \
+ END { print count }'
+}
+
+libvirtd_net_list() {
+ # The purpose of the awk is to avoid networks with 'active' in the name
+ libvirtd_virsh $1 net-list | awk '$2 == "active" { print $1 }'
+}
+
+libvirtd_net_count() {
+ # The purpose of the awk is to avoid networks with 'active' in the name
+ libvirtd_virsh $1 net-list | awk 'BEGIN { count = 0 } \
+ $2 == "active" { count++ } \
+ END { print count }'
+}
+
+
+start() {
+ ebegin "Starting libvirtd"
+ start-stop-daemon --start \
+ --env KRB5_KTNAME=/etc/libvirt/krb5.tab \
+ --exec /usr/sbin/libvirtd -- -d ${LIBVIRTD_OPTS}
+ eend $?
+}
+
+stop() {
+ local counter=
+ local vm_name=
+ local net_name=
+ local dom_id=
+
+ ebegin "Stopping libvirtd"
+ # try to shutdown all (KVM/Qemu) domains
+ if [ "${LIBVIRTD_KVM_SHUTDOWN}" != "none" ] \
+ && [ "$(libvirtd_dom_count qemu)" != "0" ] ; then
+
+ einfo " Shutting down domain(s):"
+ for dom_id in $(libvirtd_dom_list qemu) ; do
+ vm_name="$(libvirtd_virsh qemu domname ${dom_id} | head -n 1)"
+ einfo " ${vm_name}"
+ libvirtd_virsh qemu ${LIBVIRTD_KVM_SHUTDOWN} ${dom_id} > /dev/null
+ done
+
+ if [ -n "${LIBVIRTD_KVM_SHUTDOWN_MAXWAIT}" ] ; then
+ counter="${LIBVIRTD_KVM_SHUTDOWN_MAXWAIT}"
+ else
+ counter=500
+ fi
+
+ if [ "${LIBVIRTD_KVM_SHUTDOWN}" = "shutdown" ]; then
+ einfo " Waiting ${counter} seconds while domains shutdown ..."
+ DOM_COUNT="$(libvirtd_dom_count qemu)"
+ while [ ${DOM_COUNT} -gt 0 ] && [ ${counter} -gt 0 ] ; do
+ DOM_COUNT="$(libvirtd_dom_count qemu)"
+ sleep 1
+ counter=$((${counter} - 1))
+ echo -n "."
+ done
+ fi
+
+ if [ "$(libvirtd_dom_count qemu)" != "0" ] ; then
+ eerror " !!! Some guests are still running, stopping anyway"
+ fi
+
+ fi
+
+ if [ "${LIBVIRTD_KVM_NET_SHUTDOWN}" != "no" ] \
+ && [ "$(libvirtd_net_count qemu)" != "0" ]; then
+
+ einfo " Shutting down network(s):"
+ for net_name in $(libvirtd_net_list qemu); do
+ einfo " ${net_name}"
+ libvirtd_virsh qemu net-destroy ${net_name} > /dev/null
+ done
+
+ if [ "$(libvirtd_net_count qemu)" != "0" ]; then
+ eerror " !!! Some networks are still active, stopping anyway"
+ fi
+ fi
+
+ # Now actually stop the daemon
+ start-stop-daemon --stop --quiet --exec \
+ /usr/sbin/libvirtd --pidfile=/var/run/libvirtd.pid
+ eend $?
+}
+
+halt() {
+ ebegin "Stopping libvirtd without shutting down your VMs"
+ start-stop-daemon --stop --quiet --exec \
+ /usr/sbin/libvirtd --pidfile=/var/run/libvirtd.pid
+ eend $?
+}
+
+reload() {
+ halt
+ start
+}
diff --git a/app-emulation/libvirt/libvirt-0.10.2.ebuild b/app-emulation/libvirt/libvirt-0.10.2.ebuild
index 34c16b9b5719..4a7e904ea592 100644
--- a/app-emulation/libvirt/libvirt-0.10.2.ebuild
+++ b/app-emulation/libvirt/libvirt-0.10.2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/libvirt-0.10.2.ebuild,v 1.1 2012/09/30 02:45:55 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/libvirt-0.10.2.ebuild,v 1.2 2012/09/30 05:07:07 cardoe Exp $
EAPI=4
@@ -316,7 +316,7 @@ src_install() {
use libvirtd || return 0
# From here, only libvirtd-related instructions, be warned!
- newinitd "${FILESDIR}/libvirtd.init-r8" libvirtd || die
+ newinitd "${FILESDIR}/libvirtd.init-r9" libvirtd || die
newconfd "${FILESDIR}/libvirtd.confd-r3" libvirtd || die
keepdir /var/lib/libvirt/images
diff --git a/app-emulation/libvirt/libvirt-9999.ebuild b/app-emulation/libvirt/libvirt-9999.ebuild
index 825cf65aabb0..e4ba27e81b82 100644
--- a/app-emulation/libvirt/libvirt-9999.ebuild
+++ b/app-emulation/libvirt/libvirt-9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/libvirt-9999.ebuild,v 1.39 2012/09/30 03:34:54 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/libvirt-9999.ebuild,v 1.40 2012/09/30 05:07:07 cardoe Exp $
EAPI=4
@@ -304,7 +304,7 @@ src_install() {
use libvirtd || return 0
# From here, only libvirtd-related instructions, be warned!
- newinitd "${FILESDIR}/libvirtd.init-r8" libvirtd || die
+ newinitd "${FILESDIR}/libvirtd.init-r9" libvirtd || die
newconfd "${FILESDIR}/libvirtd.confd-r3" libvirtd || die
keepdir /var/lib/libvirt/images