[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, master, updated. debian/0.8.7-3-4-gd5ae8aa
Laurent Léonard
laurent at open-minds.org
Mon Feb 21 00:42:02 UTC 2011
The following commit has been merged in the master branch:
commit d5ae8aaf611385167259326339b22f67e4ae8860
Author: Laurent Léonard <laurent at open-minds.org>
Date: Mon Feb 21 01:10:43 2011 +0100
Drop patches
build-let-xgettext-see-strings-in-libvirt-guests.patch - fixed upstream http://libvirt.org/git/?p=libvirt.git;a=commit;h=7f193757efe572e0a8427e400fc8108bad50c8a9
libvirt-guests-remove-bashisms.patch - fixed upstream http://libvirt.org/git/?p=libvirt.git;a=commit;h=a9e31a476948bfcf27a2cca1ffa78d6a1b4b939c
diff --git a/debian/patches/Autodetect-if-the-remote-nc-command-supports-the-q-o.patch b/debian/patches/Autodetect-if-the-remote-nc-command-supports-the-q-o.patch
index 9ae67f7..eb00494 100644
--- a/debian/patches/Autodetect-if-the-remote-nc-command-supports-the-q-o.patch
+++ b/debian/patches/Autodetect-if-the-remote-nc-command-supports-the-q-o.patch
@@ -16,10 +16,10 @@ Bug: https://bugzilla.redhat.com/show_bug.cgi?id=614420
1 files changed, 40 insertions(+), 7 deletions(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
-index ee2de4a..9788874 100644
+index 4ca0d3b..27757ce 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
-@@ -732,7 +732,8 @@ doRemoteOpen (virConnectPtr conn,
+@@ -738,7 +738,8 @@ doRemoteOpen (virConnectPtr conn,
}
case trans_ssh: {
@@ -29,7 +29,7 @@ index ee2de4a..9788874 100644
if (username) nr_args += 2; /* For -l username */
if (no_tty) nr_args += 5; /* For -T -o BatchMode=yes -e none */
-@@ -765,12 +766,44 @@ doRemoteOpen (virConnectPtr conn,
+@@ -771,12 +772,44 @@ doRemoteOpen (virConnectPtr conn,
cmd_argv[j++] = strdup ("none");
}
cmd_argv[j++] = strdup (priv->hostname);
diff --git a/debian/patches/Disable-CHECKSUM-rule.patch b/debian/patches/Disable-CHECKSUM-rule.patch
index 7513e4a..be200ac 100644
--- a/debian/patches/Disable-CHECKSUM-rule.patch
+++ b/debian/patches/Disable-CHECKSUM-rule.patch
@@ -10,10 +10,10 @@ Closes: #598330
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/util/iptables.c b/src/util/iptables.c
-index 6770fe0..1fce1ec 100644
+index 59f5cc7..8c1f727 100644
--- a/src/util/iptables.c
+++ b/src/util/iptables.c
-@@ -861,6 +861,7 @@ iptablesOutputFixUdpChecksum(iptablesContext *ctx,
+@@ -870,6 +870,7 @@ iptablesOutputFixUdpChecksum(iptablesContext *ctx,
int port,
int action)
{
@@ -21,7 +21,7 @@ index 6770fe0..1fce1ec 100644
char portstr[32];
snprintf(portstr, sizeof(portstr), "%d", port);
-@@ -874,6 +875,9 @@ iptablesOutputFixUdpChecksum(iptablesContext *ctx,
+@@ -883,6 +884,9 @@ iptablesOutputFixUdpChecksum(iptablesContext *ctx,
"--destination-port", portstr,
"--jump", "CHECKSUM", "--checksum-fill",
NULL);
diff --git a/debian/patches/Don-t-pass-empty-arguments-to-dnsmasq.patch b/debian/patches/Don-t-pass-empty-arguments-to-dnsmasq.patch
index ea0dd45..f6b2f3c 100644
--- a/debian/patches/Don-t-pass-empty-arguments-to-dnsmasq.patch
+++ b/debian/patches/Don-t-pass-empty-arguments-to-dnsmasq.patch
@@ -8,16 +8,16 @@ unbreaks dnsmasq >= 2.56
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
-index 7d43ef5..8499ae4 100644
+index c4ee1e8..c8b1e12 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
-@@ -466,7 +466,7 @@ networkBuildDnsmasqArgv(virNetworkObjPtr network,
+@@ -468,7 +468,7 @@ networkBuildDnsmasqArgv(virNetworkObjPtr network,
virCommandAddArgPair(cmd, "--pid-file", pidfile);
/* *no* conf file */
- virCommandAddArgList(cmd, "--conf-file=", "", NULL);
+ virCommandAddArgList(cmd, "--conf-file=", NULL);
- /*
- * XXX does not actually work, due to some kind of
+ virCommandAddArgList(cmd,
+ "--except-interface", "lo",
--
diff --git a/debian/patches/build-let-xgettext-see-strings-in-libvirt-guests.patch b/debian/patches/build-let-xgettext-see-strings-in-libvirt-guests.patch
deleted file mode 100644
index 67c2ec2..0000000
--- a/debian/patches/build-let-xgettext-see-strings-in-libvirt-guests.patch
+++ /dev/null
@@ -1,776 +0,0 @@
-From: Eric Blake <eblake at redhat.com>
-Date: Thu, 6 Jan 2011 12:00:30 -0700
-Subject: build: let xgettext see strings in libvirt-guests
-
-* tools/libvirt-guests.init.in: Rename...
-* tools/libvirt-guests.init.sh: ...so that xgettext's language
-detection via suffix will work.
-* po/POTFILES.in: Update all references.
-* tools/Makefile.am (EXTRA_DIST, libvirt-guests.init): Likewise.
-
-Origin: upstream, http://libvirt.org/git/?p=libvirt.git;a=commit;h=7f193757efe572e0a8427e400fc8108bad50c8a9
----
- po/POTFILES.in | 2 +-
- tools/Makefile.am | 4 +-
- tools/libvirt-guests.init.in | 355 ------------------------------------------
- tools/libvirt-guests.init.sh | 355 ++++++++++++++++++++++++++++++++++++++++++
- 4 files changed, 358 insertions(+), 358 deletions(-)
- delete mode 100644 tools/libvirt-guests.init.in
- create mode 100644 tools/libvirt-guests.init.sh
-
-diff --git a/po/POTFILES.in b/po/POTFILES.in
-index 9d9a86f..cb7c772 100644
---- a/po/POTFILES.in
-+++ b/po/POTFILES.in
-@@ -118,5 +118,5 @@ src/xen/xs_internal.c
- src/xenapi/xenapi_driver.c
- src/xenapi/xenapi_utils.c
- tools/console.c
--tools/libvirt-guests.init.in
-+tools/libvirt-guests.init.sh
- tools/virsh.c
-diff --git a/tools/Makefile.am b/tools/Makefile.am
-index 87cf9bd..f008078 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -13,7 +13,7 @@ EXTRA_DIST = \
- virt-xml-validate.in \
- virt-pki-validate.in \
- virsh.pod \
-- libvirt-guests.init.in \
-+ libvirt-guests.init.sh \
- libvirt-guests.sysconf
-
- bin_SCRIPTS = virt-xml-validate virt-pki-validate
-@@ -144,7 +144,7 @@ uninstall-init:
-
- BUILT_SOURCES += libvirt-guests.init
-
--libvirt-guests.init: libvirt-guests.init.in $(top_builddir)/config.status
-+libvirt-guests.init: libvirt-guests.init.sh $(top_builddir)/config.status
- $(AM_V_GEN)sed \
- -e 's!\@PACKAGE\@!$(PACKAGE)!g' \
- -e 's!\@bindir\@!$(bindir)!g' \
-diff --git a/tools/libvirt-guests.init.in b/tools/libvirt-guests.init.in
-deleted file mode 100644
-index 8823d06..0000000
---- a/tools/libvirt-guests.init.in
-+++ /dev/null
-@@ -1,355 +0,0 @@
--#!/bin/sh
--
--# the following is the LSB init header
--#
--### BEGIN INIT INFO
--# Provides: libvirt-guests
--# Required-Start: libvirtd
--# Required-Stop: libvirtd
--# Default-Start: 2 3 4 5
--# Default-Stop: 0 1 6
--# Short-Description: suspend/resume libvirt guests on shutdown/boot
--# Description: This is a script for suspending active libvirt guests
--# on shutdown and resuming them on next boot
--# See http://libvirt.org
--### END INIT INFO
--
--# the following is chkconfig init header
--#
--# libvirt-guests: suspend/resume libvirt guests on shutdown/boot
--#
--# chkconfig: 345 99 01
--# description: This is a script for suspending active libvirt guests \
--# on shutdown and resuming them on next boot \
--# See http://libvirt.org
--#
--
--sysconfdir="@sysconfdir@"
--localstatedir="@localstatedir@"
--libvirtd="@sbindir@"/libvirtd
--
--# Source function library.
--test ! -r "$sysconfdir"/rc.d/init.d/functions ||
-- . "$sysconfdir"/rc.d/init.d/functions
--
--# Source gettext library.
--# Make sure this file is recognized as having translations: _("dummy")
--. "@bindir@"/gettext.sh
--
--export TEXTDOMAIN="@PACKAGE@" TEXTDOMAINDIR="@localedir@"
--
--URIS=default
--ON_BOOT=start
--ON_SHUTDOWN=suspend
--SHUTDOWN_TIMEOUT=0
--
--test -f "$sysconfdir"/sysconfig/libvirt-guests &&
-- . "$sysconfdir"/sysconfig/libvirt-guests
--
--LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests
--VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests
--
--RETVAL=0
--
--retval() {
-- "$@"
-- if [ $? -ne 0 ]; then
-- RETVAL=1
-- return 1
-- else
-- return 0
-- fi
--}
--
--run_virsh() {
-- uri=$1
-- shift
--
-- if [ "x$uri" = xdefault ]; then
-- conn=
-- else
-- conn="-c $uri"
-- fi
--
-- virsh $conn "$@" </dev/null
--}
--
--run_virsh_c() {
-- ( export LC_ALL=C; run_virsh "$@" )
--}
--
--list_guests() {
-- uri=$1
--
-- list=$(run_virsh_c $uri list)
-- if [ $? -ne 0 ]; then
-- RETVAL=1
-- return 1
-- fi
--
-- uuids=
-- for id in $(echo "$list" | awk 'NR > 2 {print $1}'); do
-- uuid=$(run_virsh_c $uri dominfo $id | awk '/^UUID:/{print $2}')
-- if [ -z "$uuid" ]; then
-- RETVAL=1
-- return 1
-- fi
-- uuids="$uuids $uuid"
-- done
--
-- echo $uuids
--}
--
--guest_name() {
-- uri=$1
-- uuid=$2
--
-- name=$(run_virsh_c $uri dominfo $uuid 2>/dev/null | \
-- awk '/^Name:/{print $2}')
-- [ -n "$name" ] || name=$uuid
--
-- echo "$name"
--}
--
--guest_is_on() {
-- uri=$1
-- uuid=$2
--
-- guest_running=false
-- info=$(run_virsh_c $uri dominfo $uuid)
-- if [ $? -ne 0 ]; then
-- RETVAL=1
-- return 1
-- fi
--
-- id=$(echo "$info" | awk '/^Id:/{print $2}')
--
-- [ -n "$id" ] && [ "x$id" != x- ] && guest_running=true
-- return 0
--}
--
--started() {
-- touch "$VAR_SUBSYS_LIBVIRT_GUESTS"
--}
--
--start() {
-- [ -f "$LISTFILE" ] || { started; return 0; }
--
-- if [ "x$ON_BOOT" != xstart ]; then
-- gettext "libvirt-guests is configured not to start any guests on boot"
-- echo
-- rm -f "$LISTFILE"
-- started
-- return 0
-- fi
--
-- while read uri list; do
-- configured=false
-- for confuri in $URIS; do
-- if [ $confuri = $uri ]; then
-- configured=true
-- break
-- fi
-- done
-- if ! $configured; then
-- eval_gettext "Ignoring guests on \$uri URI"; echo
-- continue
-- fi
--
-- eval_gettext "Resuming guests on \$uri URI..."; echo
-- for guest in $list; do
-- name=$(guest_name $uri $guest)
-- eval_gettext "Resuming guest \$name: "
-- if guest_is_on $uri $guest; then
-- if $guest_running; then
-- gettext "already active"; echo
-- else
-- retval run_virsh $uri start "$name" >/dev/null && \
-- gettext "done"; echo
-- fi
-- fi
-- done
-- done <"$LISTFILE"
--
-- rm -f "$LISTFILE"
-- started
--}
--
--suspend_guest()
--{
-- uri=$1
-- guest=$2
--
-- name=$(guest_name $uri $guest)
-- label=$(eval_gettext "Suspending \$name: ")
-- printf %s "$label"
-- run_virsh $uri managedsave $guest >/dev/null &
-- virsh_pid=$!
-- while true; do
-- sleep 1
-- kill -0 $virsh_pid >/dev/null 2>&1 || break
-- progress=$(run_virsh_c $uri domjobinfo $guest 2>/dev/null | \
-- awk '/^Data processed:/{print $3, $4}')
-- if [ -n "$progress" ]; then
-- printf '\r%s%12s ' "$label" "$progress"
-- else
-- printf '\r%s%-12s ' "$label" "..."
-- fi
-- done
-- retval wait $virsh_pid && printf '\r%s%-12s\n' "$label" "$(gettext "done")"
--}
--
--shutdown_guest()
--{
-- uri=$1
-- guest=$2
--
-- name=$(guest_name $uri $guest)
-- label=$(eval_gettext "Shutting down \$name: ")
-- printf %s "$label"
-- retval run_virsh $uri shutdown $guest >/dev/null || return
-- timeout=$SHUTDOWN_TIMEOUT
-- while [ $timeout -gt 0 ]; do
-- sleep 1
-- timeout=$((timeout - 1))
-- guest_is_on $uri $guest || return
-- $guest_running || break
-- printf '\r%s%-12d ' "$label" $timeout
-- done
--
-- if guest_is_on $uri $guest; then
-- if $guest_running; then
-- printf '\r%s%-12s\n' "$label" \
-- "$(gettext "failed to shutdown in time")"
-- else
-- printf '\r%s%-12s\n' "$label" "$(gettext "done")"
-- fi
-- fi
--}
--
--stop() {
-- # last stop was not followed by start
-- [ -f "$LISTFILE" ] && return 0
--
-- suspending=true
-- if [ "x$ON_SHUTDOWN" = xshutdown ]; then
-- suspending=false
-- if [ $SHUTDOWN_TIMEOUT -le 0 ]; then
-- gettext "Shutdown action requested but SHUTDOWN_TIMEOUT was not set"
-- echo
-- RETVAL=6
-- return
-- fi
-- fi
--
-- : >"$LISTFILE"
-- for uri in $URIS; do
-- eval_gettext "Running guests on \$uri URI: "
--
-- if [ "x$uri" = xdefault ] && [ ! -x "$libvirtd" ]; then
-- gettext "libvirtd not installed; skipping this URI."; echo
-- continue
-- fi
--
-- list=$(list_guests $uri)
-- if [ $? -eq 0 ]; then
-- empty=true
-- for uuid in $list; do
-- $empty || printf ", "
-- printf %s "$(guest_name $uri $uuid)"
-- empty=false
-- done
-- if $empty; then
-- gettext "no running guests."; echo
-- else
-- echo
-- echo $uri $list >>"$LISTFILE"
-- fi
-- fi
-- done
--
-- while read uri list; do
-- if $suspending; then
-- eval_gettext "Suspending guests on \$uri URI..."; echo
-- else
-- eval_gettext "Shutting down guests on \$uri URI..."; echo
-- fi
--
-- for guest in $list; do
-- if $suspending; then
-- suspend_guest $uri $guest
-- else
-- shutdown_guest $uri $guest
-- fi
-- done
-- done <"$LISTFILE"
--
-- rm -f "$VAR_SUBSYS_LIBVIRT_GUESTS"
--}
--
--gueststatus() {
-- for uri in $URIS; do
-- echo "* $uri URI:"
-- retval run_virsh $uri list || echo
-- done
--}
--
--# rh_status
--# Display current status: whether saved state exists, and whether start
--# has been executed. We cannot use status() from the functions library,
--# since there is no external daemon process matching this init script.
--rh_status() {
-- if [ -f "$LISTFILE" ]; then
-- gettext "stopped, with saved guests"; echo
-- RETVAL=3
-- else
-- if [ -f "$VAR_SUBSYS_LIBVIRT_GUESTS" ]; then
-- gettext "started"; echo
-- else
-- gettext "stopped, with no saved guests"; echo
-- fi
-- RETVAL=0
-- fi
--}
--
--# usage [val]
--# Display usage string, then exit with VAL (defaults to 2).
--usage() {
-- program_name=$0
-- eval_gettext "Usage: \$program_name {start|stop|status|restart|"\
--"condrestart|try-restart|reload|force-reload|gueststatus|shutdown}"; echo
-- exit ${1-2}
--}
--
--# See how we were called.
--if test $# != 1; then
-- usage
--fi
--case "$1" in
-- --help)
-- usage 0
-- ;;
-- start|stop|gueststatus)
-- $1
-- ;;
-- restart)
-- stop && start
-- ;;
-- condrestart|try-restart)
-- [ -f "$VAR_SUBSYS_LIBVIRT_GUESTS" ] && stop && start
-- ;;
-- reload|force-reload)
-- # Nothing to do; we reread configuration on each invocation
-- ;;
-- status)
-- rh_status
-- ;;
-- shutdown)
-- ON_SHUTDOWN=shutdown
-- stop
-- ;;
-- *)
-- usage
-- ;;
--esac
--exit $RETVAL
-diff --git a/tools/libvirt-guests.init.sh b/tools/libvirt-guests.init.sh
-new file mode 100644
-index 0000000..8823d06
---- /dev/null
-+++ b/tools/libvirt-guests.init.sh
-@@ -0,0 +1,355 @@
-+#!/bin/sh
-+
-+# the following is the LSB init header
-+#
-+### BEGIN INIT INFO
-+# Provides: libvirt-guests
-+# Required-Start: libvirtd
-+# Required-Stop: libvirtd
-+# Default-Start: 2 3 4 5
-+# Default-Stop: 0 1 6
-+# Short-Description: suspend/resume libvirt guests on shutdown/boot
-+# Description: This is a script for suspending active libvirt guests
-+# on shutdown and resuming them on next boot
-+# See http://libvirt.org
-+### END INIT INFO
-+
-+# the following is chkconfig init header
-+#
-+# libvirt-guests: suspend/resume libvirt guests on shutdown/boot
-+#
-+# chkconfig: 345 99 01
-+# description: This is a script for suspending active libvirt guests \
-+# on shutdown and resuming them on next boot \
-+# See http://libvirt.org
-+#
-+
-+sysconfdir="@sysconfdir@"
-+localstatedir="@localstatedir@"
-+libvirtd="@sbindir@"/libvirtd
-+
-+# Source function library.
-+test ! -r "$sysconfdir"/rc.d/init.d/functions ||
-+ . "$sysconfdir"/rc.d/init.d/functions
-+
-+# Source gettext library.
-+# Make sure this file is recognized as having translations: _("dummy")
-+. "@bindir@"/gettext.sh
-+
-+export TEXTDOMAIN="@PACKAGE@" TEXTDOMAINDIR="@localedir@"
-+
-+URIS=default
-+ON_BOOT=start
-+ON_SHUTDOWN=suspend
-+SHUTDOWN_TIMEOUT=0
-+
-+test -f "$sysconfdir"/sysconfig/libvirt-guests &&
-+ . "$sysconfdir"/sysconfig/libvirt-guests
-+
-+LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests
-+VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests
-+
-+RETVAL=0
-+
-+retval() {
-+ "$@"
-+ if [ $? -ne 0 ]; then
-+ RETVAL=1
-+ return 1
-+ else
-+ return 0
-+ fi
-+}
-+
-+run_virsh() {
-+ uri=$1
-+ shift
-+
-+ if [ "x$uri" = xdefault ]; then
-+ conn=
-+ else
-+ conn="-c $uri"
-+ fi
-+
-+ virsh $conn "$@" </dev/null
-+}
-+
-+run_virsh_c() {
-+ ( export LC_ALL=C; run_virsh "$@" )
-+}
-+
-+list_guests() {
-+ uri=$1
-+
-+ list=$(run_virsh_c $uri list)
-+ if [ $? -ne 0 ]; then
-+ RETVAL=1
-+ return 1
-+ fi
-+
-+ uuids=
-+ for id in $(echo "$list" | awk 'NR > 2 {print $1}'); do
-+ uuid=$(run_virsh_c $uri dominfo $id | awk '/^UUID:/{print $2}')
-+ if [ -z "$uuid" ]; then
-+ RETVAL=1
-+ return 1
-+ fi
-+ uuids="$uuids $uuid"
-+ done
-+
-+ echo $uuids
-+}
-+
-+guest_name() {
-+ uri=$1
-+ uuid=$2
-+
-+ name=$(run_virsh_c $uri dominfo $uuid 2>/dev/null | \
-+ awk '/^Name:/{print $2}')
-+ [ -n "$name" ] || name=$uuid
-+
-+ echo "$name"
-+}
-+
-+guest_is_on() {
-+ uri=$1
-+ uuid=$2
-+
-+ guest_running=false
-+ info=$(run_virsh_c $uri dominfo $uuid)
-+ if [ $? -ne 0 ]; then
-+ RETVAL=1
-+ return 1
-+ fi
-+
-+ id=$(echo "$info" | awk '/^Id:/{print $2}')
-+
-+ [ -n "$id" ] && [ "x$id" != x- ] && guest_running=true
-+ return 0
-+}
-+
-+started() {
-+ touch "$VAR_SUBSYS_LIBVIRT_GUESTS"
-+}
-+
-+start() {
-+ [ -f "$LISTFILE" ] || { started; return 0; }
-+
-+ if [ "x$ON_BOOT" != xstart ]; then
-+ gettext "libvirt-guests is configured not to start any guests on boot"
-+ echo
-+ rm -f "$LISTFILE"
-+ started
-+ return 0
-+ fi
-+
-+ while read uri list; do
-+ configured=false
-+ for confuri in $URIS; do
-+ if [ $confuri = $uri ]; then
-+ configured=true
-+ break
-+ fi
-+ done
-+ if ! $configured; then
-+ eval_gettext "Ignoring guests on \$uri URI"; echo
-+ continue
-+ fi
-+
-+ eval_gettext "Resuming guests on \$uri URI..."; echo
-+ for guest in $list; do
-+ name=$(guest_name $uri $guest)
-+ eval_gettext "Resuming guest \$name: "
-+ if guest_is_on $uri $guest; then
-+ if $guest_running; then
-+ gettext "already active"; echo
-+ else
-+ retval run_virsh $uri start "$name" >/dev/null && \
-+ gettext "done"; echo
-+ fi
-+ fi
-+ done
-+ done <"$LISTFILE"
-+
-+ rm -f "$LISTFILE"
-+ started
-+}
-+
-+suspend_guest()
-+{
-+ uri=$1
-+ guest=$2
-+
-+ name=$(guest_name $uri $guest)
-+ label=$(eval_gettext "Suspending \$name: ")
-+ printf %s "$label"
-+ run_virsh $uri managedsave $guest >/dev/null &
-+ virsh_pid=$!
-+ while true; do
-+ sleep 1
-+ kill -0 $virsh_pid >/dev/null 2>&1 || break
-+ progress=$(run_virsh_c $uri domjobinfo $guest 2>/dev/null | \
-+ awk '/^Data processed:/{print $3, $4}')
-+ if [ -n "$progress" ]; then
-+ printf '\r%s%12s ' "$label" "$progress"
-+ else
-+ printf '\r%s%-12s ' "$label" "..."
-+ fi
-+ done
-+ retval wait $virsh_pid && printf '\r%s%-12s\n' "$label" "$(gettext "done")"
-+}
-+
-+shutdown_guest()
-+{
-+ uri=$1
-+ guest=$2
-+
-+ name=$(guest_name $uri $guest)
-+ label=$(eval_gettext "Shutting down \$name: ")
-+ printf %s "$label"
-+ retval run_virsh $uri shutdown $guest >/dev/null || return
-+ timeout=$SHUTDOWN_TIMEOUT
-+ while [ $timeout -gt 0 ]; do
-+ sleep 1
-+ timeout=$((timeout - 1))
-+ guest_is_on $uri $guest || return
-+ $guest_running || break
-+ printf '\r%s%-12d ' "$label" $timeout
-+ done
-+
-+ if guest_is_on $uri $guest; then
-+ if $guest_running; then
-+ printf '\r%s%-12s\n' "$label" \
-+ "$(gettext "failed to shutdown in time")"
-+ else
-+ printf '\r%s%-12s\n' "$label" "$(gettext "done")"
-+ fi
-+ fi
-+}
-+
-+stop() {
-+ # last stop was not followed by start
-+ [ -f "$LISTFILE" ] && return 0
-+
-+ suspending=true
-+ if [ "x$ON_SHUTDOWN" = xshutdown ]; then
-+ suspending=false
-+ if [ $SHUTDOWN_TIMEOUT -le 0 ]; then
-+ gettext "Shutdown action requested but SHUTDOWN_TIMEOUT was not set"
-+ echo
-+ RETVAL=6
-+ return
-+ fi
-+ fi
-+
-+ : >"$LISTFILE"
-+ for uri in $URIS; do
-+ eval_gettext "Running guests on \$uri URI: "
-+
-+ if [ "x$uri" = xdefault ] && [ ! -x "$libvirtd" ]; then
-+ gettext "libvirtd not installed; skipping this URI."; echo
-+ continue
-+ fi
-+
-+ list=$(list_guests $uri)
-+ if [ $? -eq 0 ]; then
-+ empty=true
-+ for uuid in $list; do
-+ $empty || printf ", "
-+ printf %s "$(guest_name $uri $uuid)"
-+ empty=false
-+ done
-+ if $empty; then
-+ gettext "no running guests."; echo
-+ else
-+ echo
-+ echo $uri $list >>"$LISTFILE"
-+ fi
-+ fi
-+ done
-+
-+ while read uri list; do
-+ if $suspending; then
-+ eval_gettext "Suspending guests on \$uri URI..."; echo
-+ else
-+ eval_gettext "Shutting down guests on \$uri URI..."; echo
-+ fi
-+
-+ for guest in $list; do
-+ if $suspending; then
-+ suspend_guest $uri $guest
-+ else
-+ shutdown_guest $uri $guest
-+ fi
-+ done
-+ done <"$LISTFILE"
-+
-+ rm -f "$VAR_SUBSYS_LIBVIRT_GUESTS"
-+}
-+
-+gueststatus() {
-+ for uri in $URIS; do
-+ echo "* $uri URI:"
-+ retval run_virsh $uri list || echo
-+ done
-+}
-+
-+# rh_status
-+# Display current status: whether saved state exists, and whether start
-+# has been executed. We cannot use status() from the functions library,
-+# since there is no external daemon process matching this init script.
-+rh_status() {
-+ if [ -f "$LISTFILE" ]; then
-+ gettext "stopped, with saved guests"; echo
-+ RETVAL=3
-+ else
-+ if [ -f "$VAR_SUBSYS_LIBVIRT_GUESTS" ]; then
-+ gettext "started"; echo
-+ else
-+ gettext "stopped, with no saved guests"; echo
-+ fi
-+ RETVAL=0
-+ fi
-+}
-+
-+# usage [val]
-+# Display usage string, then exit with VAL (defaults to 2).
-+usage() {
-+ program_name=$0
-+ eval_gettext "Usage: \$program_name {start|stop|status|restart|"\
-+"condrestart|try-restart|reload|force-reload|gueststatus|shutdown}"; echo
-+ exit ${1-2}
-+}
-+
-+# See how we were called.
-+if test $# != 1; then
-+ usage
-+fi
-+case "$1" in
-+ --help)
-+ usage 0
-+ ;;
-+ start|stop|gueststatus)
-+ $1
-+ ;;
-+ restart)
-+ stop && start
-+ ;;
-+ condrestart|try-restart)
-+ [ -f "$VAR_SUBSYS_LIBVIRT_GUESTS" ] && stop && start
-+ ;;
-+ reload|force-reload)
-+ # Nothing to do; we reread configuration on each invocation
-+ ;;
-+ status)
-+ rh_status
-+ ;;
-+ shutdown)
-+ ON_SHUTDOWN=shutdown
-+ stop
-+ ;;
-+ *)
-+ usage
-+ ;;
-+esac
-+exit $RETVAL
---
diff --git a/debian/patches/fix-Debian-specific-path-to-hvm-loader.patch b/debian/patches/fix-Debian-specific-path-to-hvm-loader.patch
index 6ef1600..7ab6cb0 100644
--- a/debian/patches/fix-Debian-specific-path-to-hvm-loader.patch
+++ b/debian/patches/fix-Debian-specific-path-to-hvm-loader.patch
@@ -12,7 +12,7 @@ Closes: #517059
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c
-index ead8ee9..33f280a 100644
+index 4a0924f..4d27d92 100644
--- a/src/xen/xen_hypervisor.c
+++ b/src/xen/xen_hypervisor.c
@@ -2269,7 +2269,7 @@ xenHypervisorBuildCapabilities(virConnectPtr conn,
diff --git a/debian/patches/libvirt-guests-remove-bashisms.patch b/debian/patches/libvirt-guests-remove-bashisms.patch
deleted file mode 100644
index b31fa9b..0000000
--- a/debian/patches/libvirt-guests-remove-bashisms.patch
+++ /dev/null
@@ -1,249 +0,0 @@
-From: =?UTF-8?q?Laurent=20L=C3=A9onard?= <laurent at open-minds.org>
-Date: Tue, 4 Jan 2011 19:13:56 +0100
-Subject: libvirt-guests: remove bashisms
-
-* tools/libvirt-guests.init.sh: Use only POSIX shell features, which
-includes using gettext.sh for translation rather than $"".
-* tools/Makefile.am (libvirt-guests.init): Supply a few more substitutions.
-* po/POTFILES.in: Mark that libvirt-guests.init needs translation.
-
-Signed-off-by: Eric Blake <eblake at redhat.com>
-
-Origin: upstream, http://libvirt.org/git/?p=libvirt.git;a=commit;h=a9e31a476948bfcf27a2cca1ffa78d6a1b4b939c
----
- po/POTFILES.in | 1 +
- tools/Makefile.am | 9 +++--
- tools/libvirt-guests.init.in | 72 ++++++++++++++++++++++++-----------------
- 3 files changed, 49 insertions(+), 33 deletions(-)
-
-diff --git a/po/POTFILES.in b/po/POTFILES.in
-index 3d7bc8b..9d9a86f 100644
---- a/po/POTFILES.in
-+++ b/po/POTFILES.in
-@@ -118,4 +118,5 @@ src/xen/xs_internal.c
- src/xenapi/xenapi_driver.c
- src/xenapi/xenapi_utils.c
- tools/console.c
-+tools/libvirt-guests.init.in
- tools/virsh.c
-diff --git a/tools/Makefile.am b/tools/Makefile.am
-index 271c11b..87cf9bd 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -146,9 +146,12 @@ BUILT_SOURCES += libvirt-guests.init
-
- libvirt-guests.init: libvirt-guests.init.in $(top_builddir)/config.status
- $(AM_V_GEN)sed \
-- -e s!\@localstatedir\@!@localstatedir@!g \
-- -e s!\@sbindir\@!@sbindir@!g \
-- -e s!\@sysconfdir\@!@sysconfdir@!g \
-+ -e 's!\@PACKAGE\@!$(PACKAGE)!g' \
-+ -e 's!\@bindir\@!$(bindir)!g' \
-+ -e 's!\@localedir\@!$(localedir)!g' \
-+ -e 's!\@localstatedir\@!$(localstatedir)!g' \
-+ -e 's!\@sbindir\@!$(sbindir)!g' \
-+ -e 's!\@sysconfdir\@!$(sysconfdir)!g' \
- < $< > $@-t && \
- chmod a+x $@-t && \
- mv $@-t $@
-diff --git a/tools/libvirt-guests.init.in b/tools/libvirt-guests.init.in
-index e28938d..8823d06 100644
---- a/tools/libvirt-guests.init.in
-+++ b/tools/libvirt-guests.init.in
-@@ -24,20 +24,27 @@
- # See http://libvirt.org
- #
-
--sysconfdir=@sysconfdir@
--localstatedir=@localstatedir@
--libvirtd=@sbindir@/libvirtd
-+sysconfdir="@sysconfdir@"
-+localstatedir="@localstatedir@"
-+libvirtd="@sbindir@"/libvirtd
-
- # Source function library.
- test ! -r "$sysconfdir"/rc.d/init.d/functions ||
-- . "$sysconfdir"/rc.d/init.d/functions
-+ . "$sysconfdir"/rc.d/init.d/functions
-+
-+# Source gettext library.
-+# Make sure this file is recognized as having translations: _("dummy")
-+. "@bindir@"/gettext.sh
-+
-+export TEXTDOMAIN="@PACKAGE@" TEXTDOMAINDIR="@localedir@"
-
- URIS=default
- ON_BOOT=start
- ON_SHUTDOWN=suspend
- SHUTDOWN_TIMEOUT=0
-
--test -f "$sysconfdir"/sysconfig/libvirt-guests && . "$sysconfdir"/sysconfig/libvirt-guests
-+test -f "$sysconfdir"/sysconfig/libvirt-guests &&
-+ . "$sysconfdir"/sysconfig/libvirt-guests
-
- LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests
- VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests
-@@ -129,7 +136,8 @@ start() {
- [ -f "$LISTFILE" ] || { started; return 0; }
-
- if [ "x$ON_BOOT" != xstart ]; then
-- echo $"libvirt-guests is configured not to start any guests on boot"
-+ gettext "libvirt-guests is configured not to start any guests on boot"
-+ echo
- rm -f "$LISTFILE"
- started
- return 0
-@@ -144,20 +152,20 @@ start() {
- fi
- done
- if ! $configured; then
-- echo $"Ignoring guests on $uri URI"
-+ eval_gettext "Ignoring guests on \$uri URI"; echo
- continue
- fi
-
-- echo $"Resuming guests on $uri URI..."
-+ eval_gettext "Resuming guests on \$uri URI..."; echo
- for guest in $list; do
- name=$(guest_name $uri $guest)
-- echo -n $"Resuming guest $name: "
-+ eval_gettext "Resuming guest \$name: "
- if guest_is_on $uri $guest; then
- if $guest_running; then
-- echo $"already active"
-+ gettext "already active"; echo
- else
- retval run_virsh $uri start "$name" >/dev/null && \
-- echo $"done"
-+ gettext "done"; echo
- fi
- fi
- done
-@@ -173,8 +181,8 @@ suspend_guest()
- guest=$2
-
- name=$(guest_name $uri $guest)
-- label=$"Suspending $name: "
-- echo -n "$label"
-+ label=$(eval_gettext "Suspending \$name: ")
-+ printf %s "$label"
- run_virsh $uri managedsave $guest >/dev/null &
- virsh_pid=$!
- while true; do
-@@ -188,7 +196,7 @@ suspend_guest()
- printf '\r%s%-12s ' "$label" "..."
- fi
- done
-- retval wait $virsh_pid && printf '\r%s%-12s\n' "$label" $"done"
-+ retval wait $virsh_pid && printf '\r%s%-12s\n' "$label" "$(gettext "done")"
- }
-
- shutdown_guest()
-@@ -197,13 +205,13 @@ shutdown_guest()
- guest=$2
-
- name=$(guest_name $uri $guest)
-- label=$"Shutting down $name: "
-- echo -n "$label"
-+ label=$(eval_gettext "Shutting down \$name: ")
-+ printf %s "$label"
- retval run_virsh $uri shutdown $guest >/dev/null || return
- timeout=$SHUTDOWN_TIMEOUT
- while [ $timeout -gt 0 ]; do
- sleep 1
-- timeout=$[timeout - 1]
-+ timeout=$((timeout - 1))
- guest_is_on $uri $guest || return
- $guest_running || break
- printf '\r%s%-12d ' "$label" $timeout
-@@ -211,9 +219,10 @@ shutdown_guest()
-
- if guest_is_on $uri $guest; then
- if $guest_running; then
-- printf '\r%s%-12s\n' "$label" $"failed to shutdown in time"
-+ printf '\r%s%-12s\n' "$label" \
-+ "$(gettext "failed to shutdown in time")"
- else
-- printf '\r%s%-12s\n' "$label" $"done"
-+ printf '\r%s%-12s\n' "$label" "$(gettext "done")"
- fi
- fi
- }
-@@ -226,7 +235,8 @@ stop() {
- if [ "x$ON_SHUTDOWN" = xshutdown ]; then
- suspending=false
- if [ $SHUTDOWN_TIMEOUT -le 0 ]; then
-- echo $"Shutdown action requested but SHUTDOWN_TIMEOUT was not set"
-+ gettext "Shutdown action requested but SHUTDOWN_TIMEOUT was not set"
-+ echo
- RETVAL=6
- return
- fi
-@@ -234,10 +244,10 @@ stop() {
-
- : >"$LISTFILE"
- for uri in $URIS; do
-- echo -n $"Running guests on $uri URI: "
-+ eval_gettext "Running guests on \$uri URI: "
-
- if [ "x$uri" = xdefault ] && [ ! -x "$libvirtd" ]; then
-- echo $"libvirtd not installed; skipping this URI."
-+ gettext "libvirtd not installed; skipping this URI."; echo
- continue
- fi
-
-@@ -246,11 +256,11 @@ stop() {
- empty=true
- for uuid in $list; do
- $empty || printf ", "
-- echo -n $(guest_name $uri $uuid)
-+ printf %s "$(guest_name $uri $uuid)"
- empty=false
- done
- if $empty; then
-- echo $"no running guests."
-+ gettext "no running guests."; echo
- else
- echo
- echo $uri $list >>"$LISTFILE"
-@@ -260,9 +270,9 @@ stop() {
-
- while read uri list; do
- if $suspending; then
-- echo $"Suspending guests on $uri URI..."
-+ eval_gettext "Suspending guests on \$uri URI..."; echo
- else
-- echo $"Shutting down guests on $uri URI..."
-+ eval_gettext "Shutting down guests on \$uri URI..."; echo
- fi
-
- for guest in $list; do
-@@ -290,13 +300,13 @@ gueststatus() {
- # since there is no external daemon process matching this init script.
- rh_status() {
- if [ -f "$LISTFILE" ]; then
-- echo $"stopped, with saved guests"
-+ gettext "stopped, with saved guests"; echo
- RETVAL=3
- else
- if [ -f "$VAR_SUBSYS_LIBVIRT_GUESTS" ]; then
-- echo $"started"
-+ gettext "started"; echo
- else
-- echo $"stopped, with no saved guests"
-+ gettext "stopped, with no saved guests"; echo
- fi
- RETVAL=0
- fi
-@@ -305,7 +315,9 @@ rh_status() {
- # usage [val]
- # Display usage string, then exit with VAL (defaults to 2).
- usage() {
-- echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|gueststatus|shutdown}"
-+ program_name=$0
-+ eval_gettext "Usage: \$program_name {start|stop|status|restart|"\
-+"condrestart|try-restart|reload|force-reload|gueststatus|shutdown}"; echo
- exit ${1-2}
- }
-
---
diff --git a/debian/patches/patch-qemuMonitorTextGetMigrationStatus-to-intercept.patch b/debian/patches/patch-qemuMonitorTextGetMigrationStatus-to-intercept.patch
index c713ffc..f167620 100644
--- a/debian/patches/patch-qemuMonitorTextGetMigrationStatus-to-intercept.patch
+++ b/debian/patches/patch-qemuMonitorTextGetMigrationStatus-to-intercept.patch
@@ -41,10 +41,10 @@ to savely detect that the command 'info migrate' is not implemented.
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
-index 11a9391..5feb029 100644
+index 6d0ba4c..72455ac 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
-@@ -1125,7 +1125,15 @@ int qemuMonitorTextGetMigrationStatus(qemuMonitorPtr mon,
+@@ -1194,7 +1194,15 @@ int qemuMonitorTextGetMigrationStatus(qemuMonitorPtr mon,
*total *= 1024;
}
diff --git a/debian/patches/qemu-disable-network.diff.patch b/debian/patches/qemu-disable-network.diff.patch
index 4160500..eaaae3e 100644
--- a/debian/patches/qemu-disable-network.diff.patch
+++ b/debian/patches/qemu-disable-network.diff.patch
@@ -8,7 +8,7 @@ Subject: qemu-disable-network.diff
2 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
-index c13724a..12b492b 100644
+index 2f94efd..8f85aab 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1244,9 +1244,6 @@ if WITH_NETWORK
@@ -22,10 +22,10 @@ index c13724a..12b492b 100644
uninstall-local::
diff --git a/src/Makefile.in b/src/Makefile.in
-index ea9c404..9d8df32 100644
+index bff8403..f146183 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
-@@ -5426,9 +5426,6 @@ install-data-local:
+@@ -5548,9 +5548,6 @@ install-data-local:
@WITH_NETWORK_TRUE@ cp $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml.t \
@WITH_NETWORK_TRUE@ $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml && \
@WITH_NETWORK_TRUE@ rm $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml.t; }
diff --git a/debian/patches/remove-RHism.diff.patch b/debian/patches/remove-RHism.diff.patch
index ce6e06d..2aa230b 100644
--- a/debian/patches/remove-RHism.diff.patch
+++ b/debian/patches/remove-RHism.diff.patch
@@ -7,7 +7,7 @@ Subject: remove-RHism.diff
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod
-index 9c45a61..e3e9915 100644
+index a2ca384..2086adb 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -97,7 +97,7 @@ Output elapsed time information for each command.
diff --git a/debian/patches/series b/debian/patches/series
index 81b128d..d00825c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,7 +5,5 @@ fix-Debian-specific-path-to-hvm-loader.patch
Autodetect-if-the-remote-nc-command-supports-the-q-o.patch
patch-qemuMonitorTextGetMigrationStatus-to-intercept.patch
Disable-CHECKSUM-rule.patch
-libvirt-guests-remove-bashisms.patch
-build-let-xgettext-see-strings-in-libvirt-guests.patch
Debianize-libvirt-guests.patch
Don-t-pass-empty-arguments-to-dnsmasq.patch
--
Libvirt Debian packaging
More information about the Pkg-libvirt-commits
mailing list