[-]
[+]
|
Changed |
libvirt.changes
|
|
[-]
[+]
|
Changed |
libvirt.spec
^
|
|
[-]
[+]
|
Added |
clone-0.9.4.patch
^
|
@@ -0,0 +1,56 @@
+--- src/lxc/lxc_container.c.orig 2011-07-25 07:43:18.000000000 +0200
++++ src/lxc/lxc_container.c 2011-08-08 21:00:36.682640642 +0200
+@@ -991,6 +991,9 @@
+ handshakefd};
+
+ /* allocate a stack for the container */
++#ifdef __ia64__
++ stacksize *= 2;
++#endif
+ if (VIR_ALLOC_N(stack, stacksize) < 0) {
+ virReportOOMError();
+ return -1;
+@@ -1009,7 +1012,11 @@
+ cflags |= CLONE_NEWNET;
+ }
+
++#ifdef __ia64__
++ pid = __clone2(lxcContainerChild, stack, stacksize, flags, &args);
++#else
+ pid = clone(lxcContainerChild, stacktop, cflags, &args);
++#endif
+ VIR_FREE(stack);
+ VIR_DEBUG("clone() completed, new container PID is %d", pid);
+
+@@ -1036,6 +1043,7 @@
+ char *childStack;
+ char *stack;
+ int childStatus;
++ int stacksize = getpagesize() * 4;
+
+ if (features & LXC_CONTAINER_FEATURE_USER)
+ flags |= CLONE_NEWUSER;
+@@ -1043,14 +1051,21 @@
+ if (features & LXC_CONTAINER_FEATURE_NET)
+ flags |= CLONE_NEWNET;
+
+- if (VIR_ALLOC_N(stack, getpagesize() * 4) < 0) {
++#ifdef __ia64__
++ stacksize *= 2;
++#endif
++ if (VIR_ALLOC_N(stack, stacksize) < 0) {
+ VIR_DEBUG("Unable to allocate stack");
+ return -1;
+ }
+
+- childStack = stack + (getpagesize() * 4);
++ childStack = stack + stacksize;
+
++#ifdef __ia64__
++ cpid = __clone2(lxcContainerDummyChild, stack, stacksize, flags, NULL);
++#else
+ cpid = clone(lxcContainerDummyChild, childStack, flags, NULL);
++#endif
+ VIR_FREE(stack);
+ if (cpid < 0) {
+ char ebuf[1024];
|
|
Renamed |
libvirtd-defaults-0.9.4.patch
^
|
[-]
[+]
|
Added |
use-init-script-redhat-0.9.4.patch
^
|
@@ -0,0 +1,247 @@
+Index: libvirt-0.9.2/tools/Makefile.am
+===================================================================
+--- libvirt-0.9.2.orig/tools/Makefile.am
++++ libvirt-0.9.2/tools/Makefile.am
+@@ -131,16 +131,17 @@ uninstall-local: uninstall-init
+
+ if LIBVIRT_INIT_SCRIPT_RED_HAT
+ install-init: libvirt-guests.init
+- mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d
++ mkdir -p $(DESTDIR)$(sysconfdir)/init.d
+ $(INSTALL_SCRIPT) libvirt-guests.init \
+- $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests
+- mkdir -p $(DESTDIR)$(sysconfdir)/sysconfig
++ $(DESTDIR)$(sysconfdir)/init.d/libvirt-guests
++ mkdir -p $(DESTDIR)$(localstatedir)/adm/fillup-templates
+ $(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
+- $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
++ $(DESTDIR)$(localstatedir)/adm/fillup-templates/sysconfig.libvirt-guests
+
+ uninstall-init:
+- rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests \
+- $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
++ rm -f $(DESTDIR)$(sysconfdir)/init.d/libvirt-guests \
++ $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests \
++ $(DESTDIR)$(localstatedir)/adm/fillup-templates/sysconfig.libvirt-guests
+
+ BUILT_SOURCES += libvirt-guests.init
+
+Index: libvirt-0.9.2/tools/libvirt-guests.init.sh
+===================================================================
+--- libvirt-0.9.2.orig/tools/libvirt-guests.init.sh
++++ libvirt-0.9.2/tools/libvirt-guests.init.sh
+@@ -4,10 +4,10 @@
+ #
+ ### BEGIN INIT INFO
+ # Provides: libvirt-guests
+-# Required-Start: libvirtd
+-# Required-Stop: libvirtd
+-# Default-Start: 2 3 4 5
+-# Default-Stop: 0 1 6
++# Required-Start: $network $remote_fs libvirtd
++# Required-Stop: $network $remote_fs libvirtd
++# Default-Start: 3 5
++# Default-Stop: 0 1 2 4 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
+@@ -24,14 +24,13 @@
+ # See http://libvirt.org
+ #
+
++. /etc/rc.status
++rc_reset
++
+ 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
+@@ -50,12 +49,10 @@ test -f "$sysconfdir"/sysconfig/libvirt-
+ LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests
+ VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests
+
+-RETVAL=0
+-
+ retval() {
+ "$@"
+ if [ $? -ne 0 ]; then
+- RETVAL=1
++ rc_failed 1
+ return 1
+ else
+ return 0
+@@ -77,12 +74,31 @@ run_virsh_c() {
+ ( export LC_ALL=C; run_virsh "$@" )
+ }
+
++await_daemon_up()
++{
++ uri=$1
++ i=1
++ rets=10
++ run_virsh $uri list > /dev/null 2>&1
++ while [ $? -ne 0 -a $i -lt $rets ]; do
++ sleep 1
++ echo -n .
++ i=$(($i + 1))
++ run_virsh $uri list > /dev/null 2>&1
++ done
++ if [ $i -eq $rets ]; then
++ echo $"libvirt-guests unable to connect to URI: $uri"
++ return 1
++ fi
++ return 0
++}
++
+ list_guests() {
+ uri=$1
+
+ list=$(run_virsh_c "$uri" list)
+ if [ $? -ne 0 ]; then
+- RETVAL=1
++ rc_failed 1
+ return 1
+ fi
+
+@@ -90,7 +106,7 @@ list_guests() {
+ 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
++ rc_failed 1
+ return 1
+ fi
+ uuids="$uuids $uuid"
+@@ -117,7 +133,7 @@ guest_is_on() {
+ guest_running=false
+ info=$(run_virsh_c "$uri" dominfo "$uuid")
+ if [ $? -ne 0 ]; then
+- RETVAL=1
++ rc_failed 1
+ return 1
+ fi
+
+@@ -159,6 +175,12 @@ start() {
+ continue
+ fi
+
++ await_daemon_up $uri
++ if [ $? -ne 0 ]; then
++ echo $"Ignoring guests on $uri URI, can't connect"
++ continue
++ fi
++
+ eval_gettext "Resuming guests on \$uri URI..."; echo
+ for guest in $list; do
+ name=$(guest_name "$uri" "$guest")
+@@ -245,7 +267,7 @@ stop() {
+ if [ $SHUTDOWN_TIMEOUT -le 0 ]; then
+ gettext "Shutdown action requested but SHUTDOWN_TIMEOUT was not set"
+ echo
+- RETVAL=6
++ rc_failed 6
+ return
+ fi
+ fi
+@@ -315,14 +337,13 @@ gueststatus() {
+ rh_status() {
+ if [ -f "$LISTFILE" ]; then
+ gettext "stopped, with saved guests"; echo
+- RETVAL=3
++ rc_failed 3
+ else
+ if [ -f "$VAR_SUBSYS_LIBVIRT_GUESTS" ]; then
+ gettext "started"; echo
+ else
+ gettext "stopped, with no saved guests"; echo
+ fi
+- RETVAL=0
+ fi
+ }
+
+@@ -366,4 +387,4 @@ case "$1" in
+ usage
+ ;;
+ esac
+-exit $RETVAL
++rc_exit
+Index: libvirt-0.9.2/daemon/Makefile.am
+===================================================================
+--- libvirt-0.9.2.orig/daemon/Makefile.am
++++ libvirt-0.9.2/daemon/Makefile.am
+@@ -302,16 +302,12 @@ install-logrotate: $(LOGROTATE_CONFS)
+
+ if LIBVIRT_INIT_SCRIPT_RED_HAT
+ install-init: libvirtd.init
+- mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d
+- $(INSTALL_SCRIPT) libvirtd.init \
+- $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd
+- mkdir -p $(DESTDIR)$(sysconfdir)/sysconfig
++ mkdir -p $(DESTDIR)$(localstatedir)/adm/fillup-templates
+ $(INSTALL_DATA) $(srcdir)/libvirtd.sysconf \
+- $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
++ $(DESTDIR)$(localstatedir)/adm/fillup-templates/sysconfig.libvirtd
+
+ uninstall-init:
+- rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd \
+- $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
++ rm -f $(DESTDIR)$(localstatedir)/adm/fillup-templates/sysconfig.libvirtd
+
+ BUILT_SOURCES += libvirtd.init
+
+--- libvirt-0.9.4/tools/libvirt-guests.sysconf.orig 2011-07-22 06:10:04.000000000 +0200
|
|
Changed |
libvirt-0.9.4.tar.bz2
^
|