- Update to libvirt 1.0.1
- Introduce virtlockd daemon - parallels: add disk and network device support - Add virDomainSendProcessSignal API - Introduce virDomainFSTrim() public API - add fuse support for libvirt lxc - Add Gluster protocol as supported network disk backend - various snapshot improvements - Add upstream patches to fix bugs in 1.0.1 66ff2ddc-virtlockd-systemd-file-perms.patch, 462a6962-script-fixes1.patch, cb854b8f-script-fixes2.patch, 5ec4b22b-script-fixes3.patch, a1fd56cb-script-fixes4.patch, 68e7bc45-libxl-link-fix.patch - Rework SUSE patches for the various init scripts Dropped use-init-script-redhat.patch and added libvirtd-init-script.patch, libvirt-guests-init-script.patch, and virtlockd-init-script.patch - Drop upstream patches: 371ddc98-xen-sysctl-9.patch, 416eca18-xenstore-header-fix.patch, f644361b-virCommand-env.patch, 2b32735a-virCommand-env.patch, 9785f2b6-fix-xen-sysctl9.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=238
This commit is contained in:
parent
f38c7dff24
commit
a870a15461
401
462a6962-script-fixes1.patch
Normal file
401
462a6962-script-fixes1.patch
Normal file
@ -0,0 +1,401 @@
|
||||
commit 462a69621e232c83990dbe6a711326b671262d47
|
||||
Author: Eric Blake <eblake@redhat.com>
|
||||
Date: Fri Jan 4 13:35:04 2013 -0700
|
||||
|
||||
build: use common .in replacement mechanism
|
||||
|
||||
We had several different styles of .in conversion in our Makefiles:
|
||||
ALLCAPS, @ALLCAPS@, @lower@, ::lower::
|
||||
Canonicalize on one form, to make it easier to copy and paste
|
||||
between .in files.
|
||||
|
||||
Also, we were using some non-portable sed constructs: \@ is an
|
||||
undefined escape sequence (it happens to be @ itself in GNU sed,
|
||||
but POSIX allows it to mean something else), as well as risky
|
||||
behavior (failure to consistently quote things means a space
|
||||
in $(sysconfdir) could throw things off; also, Autoconf recommends
|
||||
using | rather than , or ! in the s||| operator, because | has to
|
||||
be quoted in shell and is therefore less likely to appear in file
|
||||
names than , or !).
|
||||
|
||||
Fix all of these uses to follow the same syntax.
|
||||
|
||||
* daemon/libvirtd.8.in: Switch to @var@.
|
||||
* tools/virt-xml-validate.in: Likewise.
|
||||
* tools/virt-pki-validate.in: Likewise.
|
||||
* src/locking/virtlockd.init.in: Likewise.
|
||||
* daemon/Makefile.am: Prefer | over ! in sed.
|
||||
(libvirtd.8): Prefer consistent substitution.
|
||||
(libvirtd.init, libvirtd.service): Avoid non-portable sed.
|
||||
* tools/Makefile.am (libvirt-guests.sh, libvirt-guests.init)
|
||||
(libvirt-guests.service): Likewise.
|
||||
(virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup):
|
||||
Prefer consistent capitalization.
|
||||
* src/Makefile.am (virtlockd.init, virtlockd.service)
|
||||
(virtlockd.socket): Prefer consistent substitution.
|
||||
|
||||
Index: libvirt-1.0.1/daemon/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/daemon/Makefile.am
|
||||
+++ libvirt-1.0.1/daemon/Makefile.am
|
||||
@@ -1,6 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
-## Copyright (C) 2005-2012 Red Hat, Inc.
|
||||
+## Copyright (C) 2005-2013 Red Hat, Inc.
|
||||
## See COPYING.LIB for the License of this software
|
||||
|
||||
INCLUDES = \
|
||||
@@ -84,8 +84,8 @@ CLEANFILES += test_libvirtd.aug
|
||||
|
||||
libvirtd.8: $(srcdir)/libvirtd.8.in
|
||||
$(AM_V_GEN)sed \
|
||||
- -e 's!SYSCONFDIR!$(sysconfdir)!g' \
|
||||
- -e 's!LOCALSTATEDIR!$(localstatedir)!g' \
|
||||
+ -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
||||
+ -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
@@ -181,7 +181,7 @@ endif
|
||||
|
||||
libvirtd.policy: libvirtd.policy.in $(top_builddir)/config.status
|
||||
$(AM_V_GEN) sed \
|
||||
- -e 's![@]authaction[@]!$(policyauth)!g' \
|
||||
+ -e 's|[@]authaction[@]|$(policyauth)|g' \
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
BUILT_SOURCES += libvirtd.policy
|
||||
@@ -222,25 +222,25 @@ BUILT_SOURCES += $(LOGROTATE_CONFS)
|
||||
|
||||
libvirtd.logrotate: libvirtd.logrotate.in
|
||||
$(AM_V_GEN)sed \
|
||||
- -e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
||||
+ -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
libvirtd.qemu.logrotate: libvirtd.qemu.logrotate.in
|
||||
$(AM_V_GEN)sed \
|
||||
- -e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
||||
+ -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
libvirtd.lxc.logrotate: libvirtd.lxc.logrotate.in
|
||||
$(AM_V_GEN)sed \
|
||||
- -e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
||||
+ -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
libvirtd.uml.logrotate: libvirtd.uml.logrotate.in
|
||||
$(AM_V_GEN)sed \
|
||||
- -e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
||||
+ -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
@@ -340,21 +340,21 @@ uninstall-init-systemd:
|
||||
endif # LIBVIRT_INIT_SCRIPT_SYSTEMD
|
||||
|
||||
libvirtd.init: libvirtd.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 \
|
||||
- < $< > $@-t && \
|
||||
- chmod a+x $@-t && \
|
||||
+ $(AM_V_GEN)sed \
|
||||
+ -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
+ -e 's|[@]sbindir[@]|$(sbindir)|g' \
|
||||
+ -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
||||
+ < $< > $@-t && \
|
||||
+ chmod a+x $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
libvirtd.service: libvirtd.service.in $(top_builddir)/config.status
|
||||
- $(AM_V_GEN)sed \
|
||||
- -e s!\@localstatedir\@!$(localstatedir)!g \
|
||||
- -e s!\@sbindir\@!$(sbindir)!g \
|
||||
- -e s!\@sysconfdir\@!$(sysconfdir)!g \
|
||||
- < $< > $@-t && \
|
||||
- chmod a+x $@-t && \
|
||||
+ $(AM_V_GEN)sed \
|
||||
+ -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
+ -e 's|[@]sbindir[@]|$(sbindir)|g' \
|
||||
+ -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
||||
+ < $< > $@-t && \
|
||||
+ chmod a+x $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
|
||||
Index: libvirt-1.0.1/src/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/src/Makefile.am
|
||||
+++ libvirt-1.0.1/src/Makefile.am
|
||||
@@ -1,6 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
-## Copyright (C) 2005-2012 Red Hat, Inc.
|
||||
+## Copyright (C) 2005-2013 Red Hat, Inc.
|
||||
## See COPYING.LIB for the License of this software
|
||||
|
||||
# No libraries with the exception of LIBXML should be listed
|
||||
@@ -1662,12 +1662,12 @@ uninstall-init::
|
||||
endif
|
||||
|
||||
virtlockd.init: locking/virtlockd.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" \
|
||||
- < $< > $@-t && \
|
||||
- chmod a+x $@-t && \
|
||||
+ $(AM_V_GEN)sed \
|
||||
+ -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
+ -e 's|[@]sbindir[@]|$(sbindir)|g' \
|
||||
+ -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
||||
+ < $< > $@-t && \
|
||||
+ chmod a+x $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
|
||||
@@ -1703,21 +1703,21 @@ uninstall-systemd:
|
||||
endif
|
||||
|
||||
virtlockd.service: locking/virtlockd.service.in $(top_builddir)/config.status
|
||||
- $(AM_V_GEN)sed \
|
||||
- -e "s!::localstatedir::!$(localstatedir)!g" \
|
||||
- -e "s!::sbindir::!$(sbindir)!g" \
|
||||
- -e "s!::sysconfdir::!$(sysconfdir)!g" \
|
||||
- < $< > $@-t && \
|
||||
- chmod a+x $@-t && \
|
||||
+ $(AM_V_GEN)sed \
|
||||
+ -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
+ -e 's|[@]sbindir[@]|$(sbindir)|g' \
|
||||
+ -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
||||
+ < $< > $@-t && \
|
||||
+ chmod a+x $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
virtlockd.socket: locking/virtlockd.socket.in $(top_builddir)/config.status
|
||||
- $(AM_V_GEN)sed \
|
||||
- -e "s!::localstatedir::!$(localstatedir)!g" \
|
||||
- -e "s!::sbindir::!$(sbindir)!g" \
|
||||
- -e "s!::sysconfdir::!$(sysconfdir)!g" \
|
||||
- < $< > $@-t && \
|
||||
- chmod a+x $@-t && \
|
||||
+ $(AM_V_GEN)sed \
|
||||
+ -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
+ -e 's|[@]sbindir[@]|$(sbindir)|g' \
|
||||
+ -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
||||
+ < $< > $@-t && \
|
||||
+ chmod a+x $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
|
||||
Index: libvirt-1.0.1/src/locking/virtlockd.init.in
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/src/locking/virtlockd.init.in
|
||||
+++ libvirt-1.0.1/src/locking/virtlockd.init.in
|
||||
@@ -20,19 +20,19 @@
|
||||
# on virtual machine disk images
|
||||
#
|
||||
# processname: virtlockd
|
||||
-# pidfile: ::localstatedir::/run/libvirt/virtlockd.pid
|
||||
+# pidfile: @localstatedir@/run/libvirt/virtlockd.pid
|
||||
#
|
||||
|
||||
# Source function library.
|
||||
-. ::sysconfdir::/rc.d/init.d/functions
|
||||
+. @sysconfdir@/rc.d/init.d/functions
|
||||
|
||||
SERVICE=virtlockd
|
||||
PROCESS=virtlockd
|
||||
-PIDFILE=::localstatedir::/run/libvirt/lockd/$SERVICE.pid
|
||||
+PIDFILE=@localstatedir@/run/libvirt/lockd/$SERVICE.pid
|
||||
|
||||
VIRTLOCKD_ARGS=
|
||||
|
||||
-test -f ::sysconfdir::/sysconfig/virtlockd && . ::sysconfdir::/sysconfig/virtlockd
|
||||
+test -f @sysconfdir@/sysconfig/virtlockd && . @sysconfdir@/sysconfig/virtlockd
|
||||
|
||||
RETVAL=0
|
||||
|
||||
@@ -41,7 +41,7 @@ start() {
|
||||
daemon --pidfile $PIDFILE --check $SERVICE $PROCESS --daemon $VIRTLOCKD_ARGS
|
||||
RETVAL=$?
|
||||
echo
|
||||
- [ $RETVAL -eq 0 ] && touch ::localstatedir::/lock/subsys/$SERVICE
|
||||
+ [ $RETVAL -eq 0 ] && touch @localstatedir@/lock/subsys/$SERVICE
|
||||
}
|
||||
|
||||
stop() {
|
||||
@@ -51,7 +51,7 @@ stop() {
|
||||
RETVAL=$?
|
||||
echo
|
||||
if [ $RETVAL -eq 0 ]; then
|
||||
- rm -f ::localstatedir::/lock/subsys/$SERVICE
|
||||
+ rm -f @localstatedir@/lock/subsys/$SERVICE
|
||||
rm -f $PIDFILE
|
||||
fi
|
||||
}
|
||||
@@ -83,7 +83,7 @@ case "$1" in
|
||||
reload
|
||||
;;
|
||||
condrestart|try-restart)
|
||||
- [ -f ::localstatedir::/lock/subsys/$SERVICE ] && restart || :
|
||||
+ [ -f @localstatedir@/lock/subsys/$SERVICE ] && restart || :
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload|try-restart}"
|
||||
Index: libvirt-1.0.1/tools/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/tools/Makefile.am
|
||||
+++ libvirt-1.0.1/tools/Makefile.am
|
||||
@@ -1,4 +1,4 @@
|
||||
-## Copyright (C) 2005-2012 Red Hat, Inc.
|
||||
+## Copyright (C) 2005-2013 Red Hat, Inc.
|
||||
## See COPYING.LIB for the License of this software
|
||||
|
||||
INCLUDES = \
|
||||
@@ -58,7 +58,7 @@ dist_man8_MANS = virt-sanlock-cleanup.8
|
||||
endif
|
||||
|
||||
virt-xml-validate: virt-xml-validate.in Makefile
|
||||
- $(AM_V_GEN)sed -e 's,[@]SCHEMADIR@,$(pkgdatadir)/schemas,' < $< > $@ \
|
||||
+ $(AM_V_GEN)sed -e 's|[@]schemadir@|$(pkgdatadir)/schemas|' < $< > $@ \
|
||||
|| (rm $@ && exit 1) && chmod +x $@
|
||||
|
||||
virt-xml-validate.1: virt-xml-validate.in
|
||||
@@ -67,7 +67,7 @@ virt-xml-validate.1: virt-xml-validate.i
|
||||
rm $(srcdir)/$@; exit 1; fi
|
||||
|
||||
virt-pki-validate: virt-pki-validate.in Makefile
|
||||
- $(AM_V_GEN)sed -e 's,[@]SYSCONFDIR@,$(sysconfdir),' < $< > $@ \
|
||||
+ $(AM_V_GEN)sed -e 's|[@]sysconfdir@|$(sysconfdir)|' < $< > $@ \
|
||||
|| (rm $@ && exit 1) && chmod +x $@
|
||||
|
||||
virt-pki-validate.1: virt-pki-validate.in
|
||||
@@ -81,8 +81,8 @@ virt-host-validate.1: virt-host-validate
|
||||
rm $(srcdir)/$@; exit 1; fi
|
||||
|
||||
virt-sanlock-cleanup: virt-sanlock-cleanup.in Makefile
|
||||
- $(AM_V_GEN)sed -e 's,[@]SYSCONFDIR@,$(sysconfdir),' \
|
||||
- -e 's,[@]LOCALSTATEDIR@,$(localstatedir),' < $< > $@ \
|
||||
+ $(AM_V_GEN)sed -e 's|[@]sysconfdir@|$(sysconfdir)|' \
|
||||
+ -e 's|[@]localstatedir@|$(localstatedir)|' < $< > $@ \
|
||||
|| (rm $@ && exit 1) && chmod +x $@
|
||||
|
||||
virt-sanlock-cleanup.8: virt-sanlock-cleanup.in
|
||||
@@ -210,21 +210,21 @@ uninstall-init:
|
||||
endif # LIBVIRT_INIT_SCRIPT_RED_HAT
|
||||
|
||||
libvirt-guests.sh: libvirt-guests.sh.in $(top_builddir)/config.status
|
||||
- $(AM_V_GEN)sed \
|
||||
- -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 && \
|
||||
+ $(AM_V_GEN)sed \
|
||||
+ -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 $@
|
||||
BUILT_SOURCES += libvirt-guests.sh
|
||||
|
||||
libvirt-guests.init: libvirt-guests.init.in libvirt-guests.sh
|
||||
$(AM_V_GEN)sed \
|
||||
- -e 's!\@libexecdir\@!$(libexecdir)!g' \
|
||||
+ -e 's|[@]libexecdir[@]|$(libexecdir)|g' \
|
||||
< $< > $@-t && \
|
||||
chmod a+x $@-t && \
|
||||
mv $@-t $@
|
||||
@@ -251,16 +251,16 @@ uninstall-systemd:
|
||||
endif # LIBVIRT_INIT_SCRIPT_SYSTEMD
|
||||
|
||||
libvirt-guests.service: libvirt-guests.service.in $(top_builddir)/config.status
|
||||
- $(AM_V_GEN)sed \
|
||||
- -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' \
|
||||
- -e 's!\@libexecdir\@!$(libexecdir)!g' \
|
||||
- < $< > $@-t && \
|
||||
- chmod a+x $@-t && \
|
||||
+ $(AM_V_GEN)sed \
|
||||
+ -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' \
|
||||
+ -e 's|[@]libexecdir[@]|$(libexecdir)|g' \
|
||||
+ < $< > $@-t && \
|
||||
+ chmod a+x $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
|
||||
Index: libvirt-1.0.1/tools/virt-pki-validate.in
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/tools/virt-pki-validate.in
|
||||
+++ libvirt-1.0.1/tools/virt-pki-validate.in
|
||||
@@ -25,7 +25,7 @@ echo Found "$CERTOOL"
|
||||
#
|
||||
# Check the directory structure
|
||||
#
|
||||
-SYSCONFDIR="@SYSCONFDIR@"
|
||||
+SYSCONFDIR="@sysconfdir@"
|
||||
PKI="$SYSCONFDIR/pki"
|
||||
if [ ! -d "$PKI" ]
|
||||
then
|
||||
Index: libvirt-1.0.1/tools/virt-sanlock-cleanup.in
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/tools/virt-sanlock-cleanup.in
|
||||
+++ libvirt-1.0.1/tools/virt-sanlock-cleanup.in
|
||||
@@ -10,9 +10,9 @@ fi
|
||||
|
||||
LOCKSPACE="__LIBVIRT__DISKS__"
|
||||
|
||||
-LOCKDIR=`augtool print '/files@SYSCONFDIR@/libvirt/qemu-sanlock.conf/disk_lease_dir'`
|
||||
+LOCKDIR=`augtool print '/files@sysconfdir@/libvirt/qemu-sanlock.conf/disk_lease_dir'`
|
||||
if test $? != 0 || "x$LOCKDIR" = "x" ; then
|
||||
- LOCKDIR="@LOCALSTATEDIR@/lib/libvirt/sanlock"
|
||||
+ LOCKDIR="@localstatedir@/lib/libvirt/sanlock"
|
||||
fi
|
||||
|
||||
notify() {
|
||||
@@ -80,7 +80,7 @@ Alternatively report bugs to your softwa
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
-Copyright (C) 2011 Red Hat, Inc.
|
||||
+Copyright (C) 2011, 2013 Red Hat, Inc.
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
Index: libvirt-1.0.1/tools/virt-xml-validate.in
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/tools/virt-xml-validate.in
|
||||
+++ libvirt-1.0.1/tools/virt-xml-validate.in
|
||||
@@ -57,7 +57,7 @@ if [ -z "$TYPE" ]; then
|
||||
esac
|
||||
fi
|
||||
|
||||
-SCHEMA="@SCHEMADIR@/${TYPE}.rng"
|
||||
+SCHEMA="@schemadir@/${TYPE}.rng"
|
||||
|
||||
if [ ! -f "$SCHEMA" ]; then
|
||||
echo "$0: schema $SCHEMA does not exist"
|
57
5ec4b22b-script-fixes3.patch
Normal file
57
5ec4b22b-script-fixes3.patch
Normal file
@ -0,0 +1,57 @@
|
||||
commit 5ec4b22b777b4505d159c6e8d1631d4d774a7be7
|
||||
Author: Eric Blake <eblake@redhat.com>
|
||||
Date: Fri Jan 4 13:50:39 2013 -0700
|
||||
|
||||
build: .service files don't need to be executable
|
||||
|
||||
See also commit 66ff2dd, where we avoided installing these files
|
||||
as executables.
|
||||
|
||||
* daemon/Makefile.am (libvirtd.service): Drop chmod.
|
||||
* tools/Makefile.am (libvirt-guests.service): Likewise.
|
||||
* src/Makefile.am (virtlockd.service, virtlockd.socket):
|
||||
Likewise.
|
||||
|
||||
Index: libvirt-1.0.1/daemon/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/daemon/Makefile.am
|
||||
+++ libvirt-1.0.1/daemon/Makefile.am
|
||||
@@ -354,7 +354,6 @@ libvirtd.service: libvirtd.service.in $(
|
||||
-e 's|[@]sbindir[@]|$(sbindir)|g' \
|
||||
-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
||||
< $< > $@-t && \
|
||||
- chmod a+x $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
|
||||
Index: libvirt-1.0.1/src/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/src/Makefile.am
|
||||
+++ libvirt-1.0.1/src/Makefile.am
|
||||
@@ -1706,14 +1706,12 @@ virtlockd.service: locking/virtlockd.ser
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's|[@]sbindir[@]|$(sbindir)|g' \
|
||||
< $< > $@-t && \
|
||||
- chmod a+x $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
virtlockd.socket: locking/virtlockd.socket.in $(top_builddir)/config.status
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
< $< > $@-t && \
|
||||
- chmod a+x $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
|
||||
Index: libvirt-1.0.1/tools/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/tools/Makefile.am
|
||||
+++ libvirt-1.0.1/tools/Makefile.am
|
||||
@@ -260,7 +260,6 @@ libvirt-guests.service: libvirt-guests.s
|
||||
-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
||||
-e 's|[@]libexecdir[@]|$(libexecdir)|g' \
|
||||
< $< > $@-t && \
|
||||
- chmod a+x $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
|
24
66ff2ddc-virtlockd-systemd-file-perms.patch
Normal file
24
66ff2ddc-virtlockd-systemd-file-perms.patch
Normal file
@ -0,0 +1,24 @@
|
||||
commit 66ff2ddc29298da43b3be3b7780683418e2ead76
|
||||
Author: Guido Günther <agx@sigxcpu.org>
|
||||
Date: Thu Jan 3 22:39:14 2013 +0100
|
||||
|
||||
Install virtlockd.{socket,service} non executable
|
||||
|
||||
since they're not scripts but systemd service files.
|
||||
|
||||
Index: libvirt-1.0.1/src/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/src/Makefile.am
|
||||
+++ libvirt-1.0.1/src/Makefile.am
|
||||
@@ -1684,9 +1684,9 @@ DISTCLEANFILES += virtlockd.service virt
|
||||
|
||||
install-systemd: virtlockd.service virtlockd.socket install-sysconfig
|
||||
$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
|
||||
- $(INSTALL_SCRIPT) virtlockd.service \
|
||||
+ $(INSTALL_DATA) virtlockd.service \
|
||||
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/
|
||||
- $(INSTALL_SCRIPT) virtlockd.socket \
|
||||
+ $(INSTALL_DATA) virtlockd.socket \
|
||||
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/
|
||||
|
||||
uninstall-systemd: uninstall-sysconfig
|
24
68e7bc45-libxl-link-fix.patch
Normal file
24
68e7bc45-libxl-link-fix.patch
Normal file
@ -0,0 +1,24 @@
|
||||
commit 68e7bc4561783d742d1e266b7f1f0e3516d5117e
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Mon Jan 7 10:15:56 2013 -0700
|
||||
|
||||
build: Add libxenctrl to LIBXL_LIBS
|
||||
|
||||
Commit dfa1e1dd removed libxenctrl from LIBXL_LIBS, but the libxl
|
||||
driver uses a symbol from this library. Explicitly link with
|
||||
libxenctrl instead of relying on the build system to support
|
||||
implicit DSO linking.
|
||||
|
||||
Index: libvirt-1.0.1/configure.ac
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/configure.ac
|
||||
+++ libvirt-1.0.1/configure.ac
|
||||
@@ -727,7 +727,7 @@ if test "$with_libxl" != "no" ; then
|
||||
LIBS="$LIBS $LIBXL_LIBS"
|
||||
AC_CHECK_LIB([xenlight], [libxl_ctx_alloc], [
|
||||
with_libxl=yes
|
||||
- LIBXL_LIBS="$LIBXL_LIBS -lxenlight"
|
||||
+ LIBXL_LIBS="$LIBXL_LIBS -lxenlight -lxenctrl"
|
||||
],[
|
||||
if test "$with_libxl" = "yes"; then
|
||||
fail=1
|
@ -1,7 +1,7 @@
|
||||
Index: libvirt-1.0.0/src/util/virnetdev.c
|
||||
Index: libvirt-1.0.1/src/util/virnetdev.c
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/src/util/virnetdev.c
|
||||
+++ libvirt-1.0.0/src/util/virnetdev.c
|
||||
--- libvirt-1.0.1.orig/src/util/virnetdev.c
|
||||
+++ libvirt-1.0.1/src/util/virnetdev.c
|
||||
@@ -81,7 +81,7 @@ static int virNetDevSetupControlFull(con
|
||||
static int virNetDevSetupControl(const char *ifname,
|
||||
struct ifreq *ifr)
|
||||
@ -11,10 +11,10 @@ Index: libvirt-1.0.0/src/util/virnetdev.c
|
||||
}
|
||||
#endif
|
||||
|
||||
Index: libvirt-1.0.0/src/util/virnetdevbridge.c
|
||||
Index: libvirt-1.0.1/src/util/virnetdevbridge.c
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/src/util/virnetdevbridge.c
|
||||
+++ libvirt-1.0.0/src/util/virnetdevbridge.c
|
||||
--- libvirt-1.0.1.orig/src/util/virnetdevbridge.c
|
||||
+++ libvirt-1.0.1/src/util/virnetdevbridge.c
|
||||
@@ -84,7 +84,7 @@ static int virNetDevSetupControlFull(con
|
||||
static int virNetDevSetupControl(const char *ifname,
|
||||
struct ifreq *ifr)
|
||||
|
58
a1fd56cb-script-fixes4.patch
Normal file
58
a1fd56cb-script-fixes4.patch
Normal file
@ -0,0 +1,58 @@
|
||||
commit a1fd56cb3057c45cffbf5d41eaf70a26d2116b20
|
||||
Author: Eric Blake <eblake@redhat.com>
|
||||
Date: Fri Jan 4 14:21:59 2013 -0700
|
||||
|
||||
build: install libvirt sysctl file correctly
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=887017 reports that
|
||||
even though libvirt attempts to set fs.aio-max-nr via sysctl,
|
||||
the file was installed with the wrong name and gets ignored by
|
||||
sysctl. Furthermore, 'man systcl.d' recommends that packages
|
||||
install into hard-coded /usr/lib/sysctl.d (even when libdir is
|
||||
/usr/lib64), so that sysadmins can use /etc/sysctl.d for overrides.
|
||||
|
||||
* daemon/Makefile.am (install-sysctl, uninstall-sysctl): Use
|
||||
correct location.
|
||||
* libvirt.spec.in (network_files): Reflect this.
|
||||
|
||||
Index: libvirt-1.0.1/daemon/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/daemon/Makefile.am
|
||||
+++ libvirt-1.0.1/daemon/Makefile.am
|
||||
@@ -273,14 +273,16 @@ uninstall-sysconfig:
|
||||
rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
|
||||
|
||||
if WITH_SYSCTL
|
||||
+# Use $(prefix)/lib rather than $(libdir), since man sysctl.d insists on
|
||||
+# /usr/lib/sysctl.d/ even when libdir is /usr/lib64
|
||||
install-sysctl:
|
||||
- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysctl.d
|
||||
+ $(MKDIR_P) $(DESTDIR)$(prefix)/lib/sysctl.d
|
||||
$(INSTALL_DATA) $(srcdir)/libvirtd.sysctl \
|
||||
- $(DESTDIR)$(sysconfdir)/sysctl.d/libvirtd
|
||||
+ $(DESTDIR)$(prefix)/lib/sysctl.d/libvirtd.conf
|
||||
|
||||
uninstall-sysctl:
|
||||
- rm -f $(DESTDIR)$(sysconfdir)/sysctl.d/libvirtd
|
||||
- rmdir $(DESTDIR)$(sysconfdir)/sysctl.d || :
|
||||
+ rm -f $(DESTDIR)$(prefix)/lib/sysctl.d/libvirtd.conf
|
||||
+ rmdir $(DESTDIR)$(prefix)/lib/sysctl.d || :
|
||||
else
|
||||
install-sysctl:
|
||||
uninstall-sysctl:
|
||||
Index: libvirt-1.0.1/libvirt.spec.in
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/libvirt.spec.in
|
||||
+++ libvirt-1.0.1/libvirt.spec.in
|
||||
@@ -1678,9 +1678,9 @@ fi
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/virtlockd
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
|
||||
%if 0%{?fedora} >= 14 || 0%{?rhel} >= 6
|
||||
-%config(noreplace) %{_sysconfdir}/sysctl.d/libvirtd
|
||||
+%config(noreplace) %{_prefix}/lib/sysctl.d/libvirtd.conf
|
||||
%else
|
||||
-rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
|
||||
+rm -f $RPM_BUILD_ROOT%{_prefix}/lib/sysctl.d/libvirtd.conf
|
||||
%endif
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
|
51
cb854b8f-script-fixes2.patch
Normal file
51
cb854b8f-script-fixes2.patch
Normal file
@ -0,0 +1,51 @@
|
||||
commit cb854b8f6128002306c1bc07113cf038a50be8bc
|
||||
Author: Eric Blake <eblake@redhat.com>
|
||||
Date: Fri Jan 4 13:48:30 2013 -0700
|
||||
|
||||
build: properly substitute virtlockd.socket
|
||||
|
||||
virtlockd.service could be installed to a configurable root,
|
||||
but virtlockd.socket was hardcoded to installation into a
|
||||
distro.
|
||||
|
||||
* src/Makefile.am (virtlockd.service, virtlockd.socket): Drop
|
||||
unused substitutions.
|
||||
* src/locking/virtlockd.socket.in (ListenStream): Don't hard-code
|
||||
/var.
|
||||
|
||||
Index: libvirt-1.0.1/src/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/src/Makefile.am
|
||||
+++ libvirt-1.0.1/src/Makefile.am
|
||||
@@ -1704,9 +1704,7 @@ endif
|
||||
|
||||
virtlockd.service: locking/virtlockd.service.in $(top_builddir)/config.status
|
||||
$(AM_V_GEN)sed \
|
||||
- -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
-e 's|[@]sbindir[@]|$(sbindir)|g' \
|
||||
- -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
||||
< $< > $@-t && \
|
||||
chmod a+x $@-t && \
|
||||
mv $@-t $@
|
||||
@@ -1714,8 +1712,6 @@ virtlockd.service: locking/virtlockd.ser
|
||||
virtlockd.socket: locking/virtlockd.socket.in $(top_builddir)/config.status
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
- -e 's|[@]sbindir[@]|$(sbindir)|g' \
|
||||
- -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
||||
< $< > $@-t && \
|
||||
chmod a+x $@-t && \
|
||||
mv $@-t $@
|
||||
Index: libvirt-1.0.1/src/locking/virtlockd.socket.in
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/src/locking/virtlockd.socket.in
|
||||
+++ libvirt-1.0.1/src/locking/virtlockd.socket.in
|
||||
@@ -2,7 +2,7 @@
|
||||
Description=Virtual machine lock manager socket
|
||||
|
||||
[Socket]
|
||||
-ListenStream=/var/run/libvirt/virtlockd/virtlockd.sock
|
||||
+ListenStream=@localstatedir@/run/libvirt/virtlockd/virtlockd.sock
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -2,7 +2,7 @@ Index: src/lxc/lxc_container.c
|
||||
===================================================================
|
||||
--- src/lxc/lxc_container.c.orig
|
||||
+++ src/lxc/lxc_container.c
|
||||
@@ -1937,6 +1937,9 @@ int lxcContainerStart(virDomainDefPtr de
|
||||
@@ -1982,6 +1982,9 @@ int lxcContainerStart(virDomainDefPtr de
|
||||
ttyPaths, nttyPaths, handshakefd};
|
||||
|
||||
/* allocate a stack for the container */
|
||||
@ -12,7 +12,7 @@ Index: src/lxc/lxc_container.c
|
||||
if (VIR_ALLOC_N(stack, stacksize) < 0) {
|
||||
virReportOOMError();
|
||||
return -1;
|
||||
@@ -1956,7 +1959,11 @@ int lxcContainerStart(virDomainDefPtr de
|
||||
@@ -2001,7 +2004,11 @@ int lxcContainerStart(virDomainDefPtr de
|
||||
cflags |= CLONE_NEWNET;
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ Index: src/lxc/lxc_container.c
|
||||
VIR_FREE(stack);
|
||||
VIR_DEBUG("clone() completed, new container PID is %d", pid);
|
||||
|
||||
@@ -1982,6 +1989,7 @@ int lxcContainerAvailable(int features)
|
||||
@@ -2027,6 +2034,7 @@ int lxcContainerAvailable(int features)
|
||||
int cpid;
|
||||
char *childStack;
|
||||
char *stack;
|
||||
@ -32,7 +32,7 @@ Index: src/lxc/lxc_container.c
|
||||
|
||||
if (features & LXC_CONTAINER_FEATURE_USER)
|
||||
flags |= CLONE_NEWUSER;
|
||||
@@ -1989,14 +1997,21 @@ int lxcContainerAvailable(int features)
|
||||
@@ -2034,14 +2042,21 @@ int lxcContainerAvailable(int features)
|
||||
if (features & LXC_CONTAINER_FEATURE_NET)
|
||||
flags |= CLONE_NEWNET;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: libvirt-1.0.0/examples/apparmor/Makefile.am
|
||||
Index: libvirt-1.0.1/examples/apparmor/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/examples/apparmor/Makefile.am
|
||||
+++ libvirt-1.0.0/examples/apparmor/Makefile.am
|
||||
--- libvirt-1.0.1.orig/examples/apparmor/Makefile.am
|
||||
+++ libvirt-1.0.1/examples/apparmor/Makefile.am
|
||||
@@ -1,8 +1,39 @@
|
||||
## Copyright (C) 2005-2011 Red Hat, Inc.
|
||||
## See COPYING.LIB for the License of this software
|
||||
@ -47,10 +47,10 @@ Index: libvirt-1.0.0/examples/apparmor/Makefile.am
|
||||
+ rm -f $(DESTDIR)$(sysconfdir)/apparmor.d/libvirt/TEMPLATE
|
||||
+
|
||||
+endif
|
||||
Index: libvirt-1.0.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
|
||||
Index: libvirt-1.0.1/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libvirt-1.0.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
|
||||
+++ libvirt-1.0.1/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
|
||||
@@ -0,0 +1,40 @@
|
||||
+# Last Modified: Fri Aug 19 11:21:48 2011
|
||||
+#include <tunables/global>
|
||||
@ -92,9 +92,9 @@ Index: libvirt-1.0.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
|
||||
+ /var/lib/kvm/images/ r,
|
||||
+ /var/lib/kvm/images/** r,
|
||||
+}
|
||||
Index: libvirt-1.0.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper
|
||||
Index: libvirt-1.0.1/examples/apparmor/usr.lib.libvirt.virt-aa-helper
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/examples/apparmor/usr.lib.libvirt.virt-aa-helper
|
||||
--- libvirt-1.0.1.orig/examples/apparmor/usr.lib.libvirt.virt-aa-helper
|
||||
+++ /dev/null
|
||||
@@ -1,38 +0,0 @@
|
||||
-# Last Modified: Mon Apr 5 15:10:27 2010
|
||||
@ -135,9 +135,9 @@ Index: libvirt-1.0.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper
|
||||
- /var/lib/libvirt/images/ r,
|
||||
- /var/lib/libvirt/images/** r,
|
||||
-}
|
||||
Index: libvirt-1.0.0/examples/apparmor/usr.sbin.libvirtd
|
||||
Index: libvirt-1.0.1/examples/apparmor/usr.sbin.libvirtd
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/examples/apparmor/usr.sbin.libvirtd
|
||||
--- libvirt-1.0.1.orig/examples/apparmor/usr.sbin.libvirtd
|
||||
+++ /dev/null
|
||||
@@ -1,52 +0,0 @@
|
||||
-# Last Modified: Mon Apr 5 15:03:58 2010
|
||||
@ -192,10 +192,10 @@ Index: libvirt-1.0.0/examples/apparmor/usr.sbin.libvirtd
|
||||
- change_profile -> @{LIBVIRT}-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*,
|
||||
-
|
||||
-}
|
||||
Index: libvirt-1.0.0/examples/apparmor/usr.sbin.libvirtd.in
|
||||
Index: libvirt-1.0.1/examples/apparmor/usr.sbin.libvirtd.in
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libvirt-1.0.0/examples/apparmor/usr.sbin.libvirtd.in
|
||||
+++ libvirt-1.0.1/examples/apparmor/usr.sbin.libvirtd.in
|
||||
@@ -0,0 +1,57 @@
|
||||
+# Last Modified: Fri Aug 19 11:20:36 2011
|
||||
+#include <tunables/global>
|
||||
@ -254,10 +254,10 @@ Index: libvirt-1.0.0/examples/apparmor/usr.sbin.libvirtd.in
|
||||
+ change_profile -> @{LIBVIRT}-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*,
|
||||
+
|
||||
+}
|
||||
Index: libvirt-1.0.0/examples/apparmor/libvirt-qemu
|
||||
Index: libvirt-1.0.1/examples/apparmor/libvirt-qemu
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/examples/apparmor/libvirt-qemu
|
||||
+++ libvirt-1.0.0/examples/apparmor/libvirt-qemu
|
||||
--- libvirt-1.0.1.orig/examples/apparmor/libvirt-qemu
|
||||
+++ libvirt-1.0.1/examples/apparmor/libvirt-qemu
|
||||
@@ -52,6 +52,7 @@
|
||||
# access to firmware's etc
|
||||
/usr/share/kvm/** r,
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8e99395473b2e2639ac2031526a27295c348a1e87788b508674ed9950267650e
|
||||
size 15558831
|
3
libvirt-1.0.1.tar.bz2
Normal file
3
libvirt-1.0.1.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a53542204dbcc252676bc07e24155507924ae67a130aadd3390a04b8a5c27e54
|
||||
size 16039800
|
256
libvirt-guests-init-script.patch
Normal file
256
libvirt-guests-init-script.patch
Normal file
@ -0,0 +1,256 @@
|
||||
Adjust libvirt-guests init files to conform to SUSE standards
|
||||
|
||||
Index: libvirt-1.0.1/tools/libvirt-guests.init.in
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/tools/libvirt-guests.init.in
|
||||
+++ libvirt-1.0.1/tools/libvirt-guests.init.in
|
||||
@@ -3,15 +3,15 @@
|
||||
# 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
|
||||
+# Provides: libvirt-guests
|
||||
+# 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
|
||||
-# See http://libvirt.org
|
||||
+# 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
|
||||
Index: libvirt-1.0.1/tools/libvirt-guests.sh.in
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/tools/libvirt-guests.sh.in
|
||||
+++ libvirt-1.0.1/tools/libvirt-guests.sh.in
|
||||
@@ -1,13 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
+. /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
|
||||
@@ -26,9 +25,11 @@ test -f "$sysconfdir"/sysconfig/libvirt-
|
||||
. "$sysconfdir"/sysconfig/libvirt-guests
|
||||
|
||||
LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests
|
||||
-VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests
|
||||
-
|
||||
-RETVAL=0
|
||||
+if [ -d "$localstatedir"/lock/subsys ]; then
|
||||
+ VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests
|
||||
+else
|
||||
+ VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/libvirt-guests
|
||||
+fi
|
||||
|
||||
# retval COMMAND ARGUMENTS...
|
||||
# run command with arguments and convert non-zero return value to 1 and set
|
||||
@@ -36,7 +37,7 @@ RETVAL=0
|
||||
retval() {
|
||||
"$@"
|
||||
if [ $? -ne 0 ]; then
|
||||
- RETVAL=1
|
||||
+ rc_failed 1
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
@@ -65,6 +66,25 @@ 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
|
||||
+}
|
||||
+
|
||||
# test_connect URI
|
||||
# check if URI is reachable
|
||||
test_connect()
|
||||
@@ -91,7 +111,7 @@ list_guests() {
|
||||
|
||||
list=$(run_virsh_c "$uri" list --uuid $persistent)
|
||||
if [ $? -ne 0 ]; then
|
||||
- RETVAL=1
|
||||
+ rc_failed 1
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -117,7 +137,7 @@ guest_is_on() {
|
||||
guest_running=false
|
||||
id=$(run_virsh "$uri" domid "$uuid")
|
||||
if [ $? -ne 0 ]; then
|
||||
- RETVAL=1
|
||||
+ rc_failed 1
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -165,6 +185,12 @@ start() {
|
||||
|
||||
test_connect "$uri" || continue
|
||||
|
||||
+ 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")
|
||||
@@ -377,7 +403,7 @@ shutdown_guests_parallel()
|
||||
timeout=$(($timeout - 1))
|
||||
if [ $timeout -le 0 ]; then
|
||||
eval_gettext "Timeout expired while shutting down domains"; echo
|
||||
- RETVAL=1
|
||||
+ rc_failed 1
|
||||
return
|
||||
fi
|
||||
else
|
||||
@@ -405,7 +431,7 @@ stop() {
|
||||
if [ $SHUTDOWN_TIMEOUT -lt 0 ]; then
|
||||
gettext "SHUTDOWN_TIMEOUT must be equal or greater than 0"
|
||||
echo
|
||||
- RETVAL=6
|
||||
+ rc_failed 6
|
||||
return
|
||||
fi
|
||||
fi
|
||||
@@ -453,14 +479,14 @@ stop() {
|
||||
if [ $? -ne 0 ]; then
|
||||
eval_gettext "Failed to list persistent guests on \$uri"
|
||||
echo
|
||||
- RETVAL=1
|
||||
+ rc_failed 1
|
||||
set +f
|
||||
return
|
||||
fi
|
||||
else
|
||||
gettext "Failed to list transient guests"
|
||||
echo
|
||||
- RETVAL=1
|
||||
+ rc_failed 1
|
||||
set +f
|
||||
return
|
||||
fi
|
||||
@@ -519,14 +545,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
|
||||
}
|
||||
|
||||
@@ -570,4 +595,4 @@ case "$1" in
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
-exit $RETVAL
|
||||
+rc_exit
|
||||
Index: libvirt-1.0.1/tools/libvirt-guests.sysconf
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/tools/libvirt-guests.sysconf
|
||||
+++ libvirt-1.0.1/tools/libvirt-guests.sysconf
|
||||
@@ -1,19 +1,29 @@
|
||||
+## Path: System/Virtualization/libvirt-guests
|
||||
+
|
||||
+## Type: string
|
||||
+## Default: default
|
||||
# URIs to check for running guests
|
||||
# example: URIS='default xen:/// vbox+tcp://host/system lxc:///'
|
||||
-#URIS=default
|
||||
+URIS=default
|
||||
|
||||
+## Type: string
|
||||
+## Default: start
|
||||
# action taken on host boot
|
||||
# - start all guests which were running on shutdown are started on boot
|
||||
# regardless on their autostart settings
|
||||
# - ignore libvirt-guests init script won't start any guest on boot, however,
|
||||
# guests marked as autostart will still be automatically started by
|
||||
# libvirtd
|
||||
-#ON_BOOT=start
|
||||
+ON_BOOT=start
|
||||
|
||||
+## Type: integer
|
||||
+## Default: 0
|
||||
# Number of seconds to wait between each guest start. Set to 0 to allow
|
||||
# parallel startup.
|
||||
-#START_DELAY=0
|
||||
+START_DELAY=0
|
||||
|
||||
+## Type: string
|
||||
+## Default: suspend
|
||||
# action taken on host shutdown
|
||||
# - suspend all running guests are suspended using virsh managedsave
|
||||
# - shutdown all running guests are asked to shutdown. Please be careful with
|
||||
@@ -22,12 +32,16 @@
|
||||
# which just needs a long time to shutdown. When setting
|
||||
# ON_SHUTDOWN=shutdown, you must also set SHUTDOWN_TIMEOUT to a
|
||||
# value suitable for your guests.
|
||||
-#ON_SHUTDOWN=suspend
|
||||
+ON_SHUTDOWN=suspend
|
||||
|
||||
+## Type: integer
|
||||
+## Default: 0
|
||||
# If set to non-zero, shutdown will suspend guests concurrently. Number of
|
||||
# guests on shutdown at any time will not exceed number set in this variable.
|
||||
-#PARALLEL_SHUTDOWN=0
|
||||
+PARALLEL_SHUTDOWN=0
|
||||
|
||||
+## Type: integer
|
||||
+## Default: 300
|
||||
# Number of seconds we're willing to wait for a guest to shut down. If parallel
|
||||
# shutdown is enabled, this timeout applies as a timeout for shutting down all
|
||||
# guests on a single URI defined in the variable URIS. If this is 0, then there
|
||||
@@ -35,7 +49,9 @@
|
||||
# request). The default value is 300 seconds (5 minutes).
|
||||
#SHUTDOWN_TIMEOUT=300
|
||||
|
||||
+## Type: integer
|
||||
+## Default: 0
|
||||
# If non-zero, try to bypass the file system cache when saving and
|
||||
# restoring guests, even though this may give slower operation for
|
||||
# some file systems.
|
||||
-#BYPASS_CACHE=0
|
||||
+BYPASS_CACHE=0
|
@ -1,7 +1,7 @@
|
||||
Index: libvirt-1.0.0/configure.ac
|
||||
Index: libvirt-1.0.1/configure.ac
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/configure.ac
|
||||
+++ libvirt-1.0.0/configure.ac
|
||||
--- libvirt-1.0.1.orig/configure.ac
|
||||
+++ libvirt-1.0.1/configure.ac
|
||||
@@ -102,6 +102,7 @@ AVAHI_REQUIRED="0.6.0"
|
||||
POLKIT_REQUIRED="0.6"
|
||||
PARTED_REQUIRED="1.8.0"
|
||||
@ -10,7 +10,7 @@ Index: libvirt-1.0.0/configure.ac
|
||||
UDEV_REQUIRED=145
|
||||
PCIACCESS_REQUIRED=0.10.0
|
||||
XMLRPC_REQUIRED=1.14.0
|
||||
@@ -1960,6 +1961,38 @@ AM_CONDITIONAL([WITH_NETCF], [test "$wit
|
||||
@@ -2005,6 +2006,38 @@ AM_CONDITIONAL([WITH_NETCF], [test "$wit
|
||||
AC_SUBST([NETCF_CFLAGS])
|
||||
AC_SUBST([NETCF_LIBS])
|
||||
|
||||
@ -49,7 +49,7 @@ Index: libvirt-1.0.0/configure.ac
|
||||
|
||||
AC_ARG_WITH([secrets],
|
||||
AC_HELP_STRING([--with-secrets], [with local secrets management driver @<:@default=yes@:>@]),[],[with_secrets=yes])
|
||||
@@ -3193,6 +3226,11 @@ AC_MSG_NOTICE([ netcf: $NETCF_CFLAGS $
|
||||
@@ -3253,6 +3286,11 @@ AC_MSG_NOTICE([ netcf: $NETCF_CFLAGS $
|
||||
else
|
||||
AC_MSG_NOTICE([ netcf: no])
|
||||
fi
|
||||
@ -61,11 +61,11 @@ Index: libvirt-1.0.0/configure.ac
|
||||
if test "$with_qemu" = "yes" && test "$LIBPCAP_FOUND" != "no"; then
|
||||
AC_MSG_NOTICE([ pcap: $LIBPCAP_CFLAGS $LIBPCAP_LIBS])
|
||||
else
|
||||
Index: libvirt-1.0.0/src/Makefile.am
|
||||
Index: libvirt-1.0.1/src/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/src/Makefile.am
|
||||
+++ libvirt-1.0.0/src/Makefile.am
|
||||
@@ -1064,6 +1064,24 @@ libvirt_driver_interface_la_LIBADD += ..
|
||||
--- libvirt-1.0.1.orig/src/Makefile.am
|
||||
+++ libvirt-1.0.1/src/Makefile.am
|
||||
@@ -1115,6 +1115,24 @@ libvirt_driver_interface_la_LIBADD += ..
|
||||
libvirt_driver_interface_la_LDFLAGS += -module -avoid-version
|
||||
endif
|
||||
libvirt_driver_interface_la_SOURCES = $(INTERFACE_DRIVER_SOURCES)
|
||||
@ -90,11 +90,11 @@ Index: libvirt-1.0.0/src/Makefile.am
|
||||
endif
|
||||
|
||||
if WITH_SECRETS
|
||||
Index: libvirt-1.0.0/tools/virsh.c
|
||||
Index: libvirt-1.0.1/tools/virsh.c
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/tools/virsh.c
|
||||
+++ libvirt-1.0.0/tools/virsh.c
|
||||
@@ -2710,6 +2710,8 @@ vshShowVersion(vshControl *ctl ATTRIBUTE
|
||||
--- libvirt-1.0.1.orig/tools/virsh.c
|
||||
+++ libvirt-1.0.1/tools/virsh.c
|
||||
@@ -2730,6 +2730,8 @@ vshShowVersion(vshControl *ctl ATTRIBUTE
|
||||
vshPrint(ctl, " netcf");
|
||||
# elif defined(HAVE_UDEV)
|
||||
vshPrint(ctl, " udev");
|
||||
@ -103,10 +103,10 @@ Index: libvirt-1.0.0/tools/virsh.c
|
||||
# endif
|
||||
#endif
|
||||
#ifdef WITH_NWFILTER
|
||||
Index: libvirt-1.0.0/src/interface/interface_backend_netcf.c
|
||||
Index: libvirt-1.0.1/src/interface/interface_backend_netcf.c
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/src/interface/interface_backend_netcf.c
|
||||
+++ libvirt-1.0.0/src/interface/interface_backend_netcf.c
|
||||
--- libvirt-1.0.1.orig/src/interface/interface_backend_netcf.c
|
||||
+++ libvirt-1.0.1/src/interface/interface_backend_netcf.c
|
||||
@@ -23,7 +23,12 @@
|
||||
|
||||
#include <config.h>
|
||||
|
@ -1,3 +1,24 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 5 11:39:02 MST 2013 - jfehlig@suse.com
|
||||
|
||||
- Update to libvirt 1.0.1
|
||||
- Introduce virtlockd daemon
|
||||
- parallels: add disk and network device support
|
||||
- Add virDomainSendProcessSignal API
|
||||
- Introduce virDomainFSTrim() public API
|
||||
- add fuse support for libvirt lxc
|
||||
- Add Gluster protocol as supported network disk backend
|
||||
- various snapshot improvements
|
||||
- Add upstream patches to fix bugs in 1.0.1
|
||||
66ff2ddc-virtlockd-systemd-file-perms.patch,
|
||||
462a6962-script-fixes1.patch, cb854b8f-script-fixes2.patch,
|
||||
5ec4b22b-script-fixes3.patch, a1fd56cb-script-fixes4.patch,
|
||||
68e7bc45-libxl-link-fix.patch
|
||||
- Rework SUSE patches for the various init scripts
|
||||
Dropped use-init-script-redhat.patch and added
|
||||
libvirtd-init-script.patch, libvirt-guests-init-script.patch,
|
||||
and virtlockd-init-script.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 2 11:19:46 MDT 2012 - jfehlig@suse.com
|
||||
|
||||
@ -9,6 +30,10 @@ Fri Nov 2 11:19:46 MDT 2012 - jfehlig@suse.com
|
||||
- various improvement and fixes when using QMP QEmu interface
|
||||
- Support for Xen 4.2 in legacy xen driver
|
||||
- Lot of localization enhancements
|
||||
- Drop upstream patches: 371ddc98-xen-sysctl-9.patch,
|
||||
416eca18-xenstore-header-fix.patch,
|
||||
f644361b-virCommand-env.patch, 2b32735a-virCommand-env.patch,
|
||||
9785f2b6-fix-xen-sysctl9.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 23 14:33:40 MDT 2012 - jfehlig@suse.com
|
||||
|
223
libvirt.spec
223
libvirt.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package libvirt
|
||||
#
|
||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -36,53 +36,59 @@
|
||||
%define with_libvirtd 0%{!?_without_libvirtd:%{server_drivers}}
|
||||
%define with_avahi 0%{!?_without_avahi:%{server_drivers}}
|
||||
|
||||
# Then the hypervisor drivers that run on local host
|
||||
# Then the hypervisor drivers that run in libvirtd
|
||||
%define with_xen 0%{!?_without_xen:%{server_drivers}}
|
||||
%define with_qemu 0%{!?_without_qemu:%{server_drivers}}
|
||||
%define with_openvz 0%{!?_without_openvz:%{server_drivers}}
|
||||
%define with_lxc 0%{!?_without_lxc:%{server_drivers}}
|
||||
%define with_vbox 0%{!?_without_vbox:%{server_drivers}}
|
||||
%define with_uml 0%{!?_without_uml:%{server_drivers}}
|
||||
%define with_libxl 0%{!?_without_libxl:%{server_drivers}}
|
||||
%define with_vmware 0%{!?_without_vmware:%{server_drivers}}
|
||||
|
||||
# Then the hypervisor drivers that talk via a native remote protocol
|
||||
# Then the hypervisor drivers that run outside libvirtd, in libvirt.so
|
||||
%define with_openvz 0%{!?_without_openvz:%{server_drivers}}
|
||||
%define with_vbox 0%{!?_without_vbox:%{server_drivers}}
|
||||
%define with_vmware 0%{!?_without_vmware:%{server_drivers}}
|
||||
%define with_phyp 0%{!?_without_phyp:0}
|
||||
%define with_esx 0%{!?_without_esx:1}
|
||||
%define with_xenapi 0%{!?_without_xenapi:1}
|
||||
%define with_hyperv 0%{!?_without_hyperv:0}
|
||||
%define with_xenapi 0%{!?_without_xenapi:1}
|
||||
%define with_parallels 0%{!?_without_parallels:1}
|
||||
|
||||
# Then the secondary host drivers
|
||||
# Then the secondary host drivers, which run inside libvirtd
|
||||
%define with_interface 0%{!?_without_interface:%{server_drivers}}
|
||||
%define with_network 0%{!?_without_network:%{server_drivers}}
|
||||
%define with_storage_fs 0%{!?_without_storage_fs:%{server_drivers}}
|
||||
%define with_storage_lvm 0%{!?_without_storage_lvm:%{server_drivers}}
|
||||
%define with_storage_iscsi 0%{!?_without_storage_iscsi:%{server_drivers}}
|
||||
%define with_storage_disk 0%{!?_without_storage_disk:%{server_drivers}}
|
||||
%define with_storage_mpath 0%{!?_without_storage_mpath:%{server_drivers}}
|
||||
%define with_storage_rbd 0
|
||||
%define with_storage_sheepdog 0
|
||||
%define with_numactl 0%{!?_without_numactl:%{server_drivers}}
|
||||
%define with_selinux 0%{!?_without_selinux:%{server_drivers}}
|
||||
%define with_apparmor 0%{!?_without_apparmor:%{server_drivers}}
|
||||
|
||||
# Optional bits on by default
|
||||
%define with_polkit 0%{!?_without_polkit:1}
|
||||
%define with_udev 0%{!?_without_udev:1}
|
||||
%define with_audit 0%{!?_without_audit:1}
|
||||
|
||||
# A few optional bits off by default, we enable later
|
||||
%define with_capng 0%{!?_without_capng:0}
|
||||
%define with_netcf 0%{!?_without_netcf:0}
|
||||
%define with_netcontrol 0%{!?_without_netcontrol:0}
|
||||
%define with_udev 0%{!?_without_udev:0}
|
||||
%define with_hal 0%{!?_without_hal:0}
|
||||
%define with_yajl 0%{!?_without_yajl:0}
|
||||
%define with_nwfilter 0%{!?_without_nwfilter:0}
|
||||
%define with_libpcap 0%{!?_without_libpcap:0}
|
||||
%define with_macvtap 0%{!?_without_macvtap:0}
|
||||
%define with_libnl 0%{!?_without_libnl:0}
|
||||
%define with_audit 0%{!?_without_audit:0}
|
||||
%define with_dtrace 0%{!?_without_dtrace:0}
|
||||
%define with_cgconfig 0%{!?_without_cgconfig:0}
|
||||
%define with_sanlock 0%{!?_without_sanlock:0}
|
||||
%define with_systemd 0%{!?_without_systemd:0}
|
||||
%define with_numad 0%{!?_without_numad:0}
|
||||
%define with_firewalld 0%{!?_without_firewalld:0}
|
||||
%define with_libssh2_transport 0%{!?_without_libssh2_transport:0}
|
||||
|
||||
# Non-server/HV driver defaults which are always enabled
|
||||
%define with_python 0%{!?_without_python:1}
|
||||
%define with_sasl 0%{!?_without_sasl:1}
|
||||
@ -95,9 +101,10 @@
|
||||
%define with_libxl 0
|
||||
%endif
|
||||
|
||||
# Temporarily disable building the libxl driver since the current
|
||||
# implementation only works with Xen 4.1
|
||||
%define with_libxl 0
|
||||
# libxl is only compatible with Xen >= 4.2 (i.e. suse_version > 12.2)
|
||||
%if 0%{?suse_version} <= 1220
|
||||
%define with_libxl 0
|
||||
%endif
|
||||
|
||||
# numactl only on x86_64 and ia64
|
||||
%ifnarch x86_64 ia64
|
||||
@ -114,6 +121,7 @@
|
||||
%define with_vmware 0
|
||||
%define with_xenapi 0
|
||||
%define with_hyperv 0
|
||||
%define with_parallels 0
|
||||
%endif
|
||||
|
||||
# Enable phyp driver for IBM Power systems
|
||||
@ -127,13 +135,6 @@
|
||||
%define with_selinux 0
|
||||
%endif
|
||||
|
||||
# udev is used to manage host devices in 11.1 or newer
|
||||
%if 0%{?suse_version} > 1110
|
||||
%define with_udev 0%{!?_without_udev:%{server_drivers}}
|
||||
%else
|
||||
%define with_hal 0%{!?_without_hal:%{server_drivers}}
|
||||
%endif
|
||||
|
||||
# netcontrol is used to manage network interfaces on openSUSE >= 12.1
|
||||
%if 0%{?suse_version} >= 1210
|
||||
%define with_netcontrol 0%{!?_without_netcontrol:%{server_drivers}}
|
||||
@ -148,10 +149,7 @@
|
||||
# Enable yajl library for JSON mode with QEMU
|
||||
%define with_yajl 0%{!?_without_yajl:%{server_drivers}}
|
||||
|
||||
# All supported version of openSUSE/SLE contain audit
|
||||
%define with_audit 0%{!?_without_audit:1}
|
||||
|
||||
%if 0%{?suse_version} > 1140
|
||||
%if 0%{?suse_version} >= 1210
|
||||
%define with_systemd 0%{!?_without_systemd:1}
|
||||
%endif
|
||||
|
||||
@ -163,16 +161,18 @@
|
||||
# Disable some drivers when building without libvirt daemon.
|
||||
# The logic is the same as in configure.ac
|
||||
%if ! %{with_libvirtd}
|
||||
%define with_interface 0
|
||||
%define with_network 0
|
||||
%define with_qemu 0
|
||||
%define with_lxc 0
|
||||
%define with_uml 0
|
||||
%define with_hal 0
|
||||
%define with_udev 0
|
||||
%define with_storage_fs 0
|
||||
%define with_storage_lvm 0
|
||||
%define with_storage_iscsi 0
|
||||
%define with_storage_mpath 0
|
||||
%define with_storage_rbd 0
|
||||
%define with_storage_sheepdog 0
|
||||
%define with_storage_disk 0
|
||||
%endif
|
||||
|
||||
@ -195,6 +195,23 @@
|
||||
%define with_libnl 1
|
||||
%endif
|
||||
|
||||
# Pull in cgroups config system
|
||||
%if %{with_qemu} || %{with_lxc}
|
||||
%define with_cgconfig 0%{!?_without_cgconfig:1}
|
||||
%endif
|
||||
|
||||
%if %{with_udev}
|
||||
%define with_nodedev 1
|
||||
%else
|
||||
%define with_nodedev 0
|
||||
%endif
|
||||
|
||||
%if %{with_storage_fs} || %{with_storage_mpath} || %{with_storage_iscsi} || %{with_storage_lvm} || %{with_storage_disk}
|
||||
%define with_storage 1
|
||||
%else
|
||||
%define with_storage 0
|
||||
%endif
|
||||
|
||||
%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
|
||||
|
||||
BuildRequires: bridge-utils
|
||||
@ -220,9 +237,6 @@ BuildRequires: xen-devel
|
||||
%if %{with_sasl}
|
||||
BuildRequires: cyrus-sasl-devel
|
||||
%endif
|
||||
%if %{with_hal}
|
||||
BuildRequires: hal-devel
|
||||
%endif
|
||||
%if %{with_udev}
|
||||
BuildRequires: libpciaccess0-devel >= 0.10.9
|
||||
BuildRequires: libudev-devel >= 145
|
||||
@ -312,6 +326,9 @@ BuildRequires: parted-devel
|
||||
# For Multipath support
|
||||
BuildRequires: device-mapper-devel
|
||||
%endif
|
||||
%if %{with_storage_rbd}
|
||||
BuildRequires: ceph-devel
|
||||
%endif
|
||||
%if %{with_audit}
|
||||
BuildRequires: audit-devel
|
||||
%endif
|
||||
@ -320,7 +337,7 @@ BuildRequires: audit-devel
|
||||
BuildRequires: systemtap-sdt-devel
|
||||
%endif
|
||||
%if %{with_sanlock}
|
||||
BuildRequires: sanlock-devel >= 1.8
|
||||
BuildRequires: sanlock-devel >= 2.4
|
||||
%endif
|
||||
%if %{with_systemd}
|
||||
BuildRequires: systemd
|
||||
@ -328,7 +345,7 @@ BuildRequires: systemd
|
||||
|
||||
Name: libvirt
|
||||
Url: http://libvirt.org/
|
||||
Version: 1.0.0
|
||||
Version: 1.0.1
|
||||
Release: 0
|
||||
Summary: A C toolkit to interact with the virtualization capabilities of Linux
|
||||
License: LGPL-2.1+
|
||||
@ -359,9 +376,6 @@ Recommends: ebtables
|
||||
%endif
|
||||
Recommends: logrotate
|
||||
Recommends: nfs-client
|
||||
%if %{with_hal}
|
||||
Requires: hal
|
||||
%endif
|
||||
%if %{with_udev}
|
||||
Requires: udev >= 145
|
||||
%endif
|
||||
@ -411,6 +425,12 @@ Source1: libvirtd.init
|
||||
Source2: libvirtd-relocation-server.fw
|
||||
Source99: baselibs.conf
|
||||
# Upstream patches
|
||||
Patch0: 66ff2ddc-virtlockd-systemd-file-perms.patch
|
||||
Patch1: 462a6962-script-fixes1.patch
|
||||
Patch2: cb854b8f-script-fixes2.patch
|
||||
Patch3: 5ec4b22b-script-fixes3.patch
|
||||
Patch4: a1fd56cb-script-fixes4.patch
|
||||
Patch5: 68e7bc45-libxl-link-fix.patch
|
||||
# Need to go upstream
|
||||
Patch100: xen-name-for-devid.patch
|
||||
Patch101: clone.patch
|
||||
@ -418,9 +438,11 @@ Patch102: xen-pv-cdrom.patch
|
||||
Patch103: AF_PACKET.patch
|
||||
# Our patches
|
||||
Patch200: libvirtd-defaults.patch
|
||||
Patch201: use-init-script-redhat.patch
|
||||
Patch202: relax-qemu-usergroup-check.patch
|
||||
Patch203: suse-qemu-conf.patch
|
||||
Patch201: libvirtd-init-script.patch
|
||||
Patch202: libvirt-guests-init-script.patch
|
||||
Patch203: virtlockd-init-script.patch
|
||||
Patch204: relax-qemu-usergroup-check.patch
|
||||
Patch205: suse-qemu-conf.patch
|
||||
%if %{with_apparmor}
|
||||
Patch250: install-apparmor-profiles.patch
|
||||
%endif
|
||||
@ -456,6 +478,8 @@ Recommends: cyrus-sasl-digestmd5
|
||||
# So remote clients can access libvirt over SSH tunnel
|
||||
# (client invokes 'nc' against the UNIX socket on the server)
|
||||
Recommends: netcat-openbsd
|
||||
# Needed for probing the power management features of the host.
|
||||
Recommends: pm-utils
|
||||
|
||||
%description client
|
||||
Libvirt is a C toolkit to interact with the virtualization
|
||||
@ -514,7 +538,7 @@ Authors:
|
||||
%package lock-sanlock
|
||||
Summary: Sanlock lock manager plugin for QEMU driver
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: sanlock >= 1.8
|
||||
Requires: sanlock >= 2.4
|
||||
#for virt-sanlock-cleanup require augeas
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: augeas
|
||||
@ -546,6 +570,12 @@ Authors:
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch100 -p1
|
||||
%patch101
|
||||
%patch102 -p1
|
||||
@ -554,6 +584,8 @@ Authors:
|
||||
%patch201 -p1
|
||||
%patch202 -p1
|
||||
%patch203 -p1
|
||||
%patch204 -p1
|
||||
%patch205 -p1
|
||||
%if %{with_apparmor}
|
||||
%patch250 -p1
|
||||
%endif
|
||||
@ -595,6 +627,9 @@ Authors:
|
||||
%if ! %{with_hyperv}
|
||||
%define _without_hyperv --without-hyperv
|
||||
%endif
|
||||
%if ! %{with_parallels}
|
||||
%define _without_parallels --without-parallels
|
||||
%endif
|
||||
%if ! %{with_libxl}
|
||||
%define _without_libxl --without-libxl
|
||||
%endif
|
||||
@ -616,6 +651,12 @@ Authors:
|
||||
%if ! %{with_storage_mpath}
|
||||
%define _without_storage_mpath --without-storage-mpath
|
||||
%endif
|
||||
%if ! %{with_storage_rbd}
|
||||
%define _without_storage_rbd --without-storage-rbd
|
||||
%endif
|
||||
%if ! %{with_storage_sheepdog}
|
||||
%define _without_storage_sheepdog --without-storage-sheepdog
|
||||
%endif
|
||||
%if ! %{with_numactl}
|
||||
%define _without_numactl --without-numactl
|
||||
%endif
|
||||
@ -637,9 +678,6 @@ Authors:
|
||||
%if ! %{with_netcontrol}
|
||||
%define _without_netcontrol --without-netcontrol
|
||||
%endif
|
||||
%if ! %{with_hal}
|
||||
%define _without_hal --without-hal
|
||||
%endif
|
||||
%if ! %{with_udev}
|
||||
%define _without_udev --without-udev
|
||||
%endif
|
||||
@ -658,6 +696,9 @@ Authors:
|
||||
%if ! %{with_dtrace}
|
||||
%define _without_dtrace --without-dtrace
|
||||
%endif
|
||||
%if ! %{with_interface}
|
||||
%define _without_interface --without-interface
|
||||
%endif
|
||||
%if ! %{with_network}
|
||||
%define _without_network --without-network
|
||||
%endif
|
||||
@ -677,9 +718,6 @@ Authors:
|
||||
%define _without_sanlock --without-sanlock
|
||||
%endif
|
||||
%if %{with_systemd}
|
||||
# Use 'systemd+redhat' (see patch use-init-script-redhat.patch),
|
||||
# so if someone installs upstart or legacy init scripts, they can
|
||||
# still start libvirtd
|
||||
%define init_scripts --with-init_script=systemd+redhat
|
||||
%else
|
||||
%define init_scripts --with-init_script=redhat
|
||||
@ -687,6 +725,9 @@ Authors:
|
||||
%if ! %{with_driver_modules}
|
||||
%define _without_driver_modules --without-driver-modules
|
||||
%endif
|
||||
%if %{with_firewalld}
|
||||
%define _with_firewalld --with-firewalld
|
||||
%endif
|
||||
|
||||
autoreconf -f -i
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
@ -696,40 +737,44 @@ export CFLAGS="$RPM_OPT_FLAGS"
|
||||
%{?_without_openvz} \
|
||||
%{?_without_lxc} \
|
||||
%{?_without_vbox} \
|
||||
%{?_without_libxl} \
|
||||
%{?_without_xenapi} \
|
||||
%{?_without_sasl} \
|
||||
%{?_without_avahi} \
|
||||
%{?_without_polkit} \
|
||||
%{?_without_python} \
|
||||
%{?_without_libvirtd} \
|
||||
%{?_without_uml} \
|
||||
%{?_without_phyp} \
|
||||
%{?_without_esx} \
|
||||
%{?_without_vmware} \
|
||||
%{?_without_hyperv} \
|
||||
%{?_without_libxl} \
|
||||
%{?_without_libvirtd} \
|
||||
%{?_without_vmware} \
|
||||
%{?_without_parallels} \
|
||||
%{?_without_interface} \
|
||||
%{?_without_network} \
|
||||
%{?_without_storage_fs} \
|
||||
%{?_without_storage_lvm} \
|
||||
%{?_without_storage_iscsi} \
|
||||
%{?_without_storage_disk} \
|
||||
%{?_without_storage_mpath} \
|
||||
%{?_without_storage_rbd} \
|
||||
%{?_without_storage_sheepdog} \
|
||||
%{?_without_numactl} \
|
||||
%{?_without_numad} \
|
||||
%{?_without_selinux} \
|
||||
%{?_without_apparmor} \
|
||||
%{?_without_capng} \
|
||||
%{?_without_netcf} \
|
||||
%{?_without_netcontrol} \
|
||||
%{?_without_hal} \
|
||||
%{?_without_selinux} \
|
||||
%{?_without_apparmor} \
|
||||
%{?_without_udev} \
|
||||
%{?_without_yajl} \
|
||||
%{?_without_sanlock} \
|
||||
%{?_without_libpcap} \
|
||||
%{?_without_macvtap} \
|
||||
%{?_without_polkit} \
|
||||
%{?_without_audit} \
|
||||
%{?_without_dtrace} \
|
||||
%{?_without_network} \
|
||||
%{?_without_sasl} \
|
||||
%{?_without_avahi} \
|
||||
%{?_without_python} \
|
||||
%{?_without_libpcap} \
|
||||
%{?_without_sanlock} \
|
||||
%{?_without_driver_modules} \
|
||||
%{?_with_firewalld} \
|
||||
--libexecdir=%{_libdir}/%{name} \
|
||||
--with-qemu-user=%{qemu_user} \
|
||||
--with-qemu-group=%{qemu_group} \
|
||||
@ -790,12 +835,23 @@ rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter
|
||||
%endif
|
||||
|
||||
# init scripts
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates
|
||||
%if %{with_libvirtd}
|
||||
# Currently using our own libvirtd init script
|
||||
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/libvirtd
|
||||
install %SOURCE1 $RPM_BUILD_ROOT%{_sysconfdir}/init.d/libvirtd
|
||||
ln -s /etc/init.d/libvirtd $RPM_BUILD_ROOT%{_sbindir}/rclibvirtd
|
||||
mv $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/libvirtd $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/sysconfig.libvirtd
|
||||
rm -f $RPM_BUILD_ROOT/usr/lib/sysctl.d/libvirtd.conf
|
||||
# For other services, use the in-tree scripts
|
||||
mv $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/virtlockd $RPM_BUILD_ROOT%{_sysconfdir}/init.d/virtlockd
|
||||
ln -s /etc/init.d/virtlockd $RPM_BUILD_ROOT%{_sbindir}/rcvirtlockd
|
||||
mv $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/virtlockd $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/sysconfig.virtlockd
|
||||
%endif
|
||||
mv $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/libvirt-guests $RPM_BUILD_ROOT%{_sysconfdir}/init.d/libvirt-guests
|
||||
ln -s /etc/init.d/libvirt-guests $RPM_BUILD_ROOT%{_sbindir}/rclibvirt-guests
|
||||
mv $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/libvirt-guests $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/sysconfig.libvirt-guests
|
||||
#install firewall definitions format is described here:
|
||||
#/usr/share/SuSEfirewall2/services/TEMPLATE
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_fwdefdir}
|
||||
@ -808,6 +864,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%pre
|
||||
%if %{with_systemd}
|
||||
%service_add_pre libvirtd.service
|
||||
%service_add_pre virtlockd.service virtlockd.socket
|
||||
%endif
|
||||
%{_bindir}/getent group libvirt >/dev/null || \
|
||||
%{_sbindir}/groupadd -r libvirt 2>/dev/null
|
||||
@ -826,43 +883,68 @@ then
|
||||
fi
|
||||
%endif
|
||||
%if %{with_systemd}
|
||||
%service_add_post libvirtd.service libvirt-guests.service
|
||||
%service_add_post libvirtd.service
|
||||
%service_add_post virtlockd.service virtlockd.socket
|
||||
%endif
|
||||
%if 0%{?sles_version}
|
||||
%{fillup_and_insserv -y libvirtd}
|
||||
%{fillup_and_insserv -y -n libvirtd libvirtd}
|
||||
%else # ! sles
|
||||
%{fillup_only -n libvirtd}
|
||||
%endif
|
||||
%{fillup_only -n libvirt-guests}
|
||||
%{fillup_only -n virtlockd}
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%if %{with_libvirtd}
|
||||
%if %{with_systemd}
|
||||
%service_del_preun libvirtd.service libvirt-guests.service
|
||||
%service_del_preun libvirtd.service
|
||||
%service_del_preun virtlockd.service virtlockd.socket
|
||||
%endif
|
||||
%stop_on_removal libvirtd
|
||||
%stop_on_removal virtlockd
|
||||
%endif
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
%if %{with_libvirtd}
|
||||
%if %{with_systemd}
|
||||
%service_del_postun libvirtd.service libvirt-guests.service
|
||||
%service_del_postun libvirtd.service
|
||||
%service_del_postun virtlockd.service virtlockd.socket
|
||||
%endif
|
||||
%restart_on_update libvirtd
|
||||
%restart_on_update virtlockd
|
||||
%endif
|
||||
%insserv_cleanup
|
||||
|
||||
%post client -p /sbin/ldconfig
|
||||
%post client
|
||||
/sbin/ldconfig
|
||||
%if %{with_systemd}
|
||||
%service_add_post libvirt-guests.service
|
||||
%endif
|
||||
%{fillup_only -n libvirt-guests}
|
||||
|
||||
%postun client -p /sbin/ldconfig
|
||||
%preun client
|
||||
%if %{with_systemd}
|
||||
%service_del_preun libvirt-guests.service
|
||||
%endif
|
||||
%stop_on_removal libvirt-guests
|
||||
if [ $1 = 0 ]; then
|
||||
rm -f /var/lib/libvirt/libvirt-guests
|
||||
fi
|
||||
|
||||
%postun client
|
||||
/sbin/ldconfig
|
||||
%if %{with_systemd}
|
||||
%service_del_postun libvirt-guests.service
|
||||
%endif
|
||||
%insserv_cleanup
|
||||
|
||||
%if %{with_libvirtd}
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%{_sbindir}/libvirtd
|
||||
%{_sbindir}/virtlockd
|
||||
%dir %{_libdir}/%{name}
|
||||
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/
|
||||
%if %{with_network}
|
||||
@ -879,8 +961,13 @@ fi
|
||||
%{_localstatedir}/adm/fillup-templates/sysconfig.libvirtd
|
||||
%config /etc/init.d/libvirtd
|
||||
%{_sbindir}/rclibvirtd
|
||||
%{_localstatedir}/adm/fillup-templates/sysconfig.virtlockd
|
||||
%config /etc/init.d/virtlockd
|
||||
%{_sbindir}/rcvirtlockd
|
||||
%if %{with_systemd}
|
||||
%{_unitdir}/libvirtd.service
|
||||
%{_unitdir}/virtlockd.service
|
||||
%{_unitdir}/virtlockd.socket
|
||||
%endif
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
|
||||
@ -889,6 +976,8 @@ fi
|
||||
%dir %{_datadir}/augeas/lenses/tests
|
||||
%{_datadir}/augeas/lenses/libvirtd.aug
|
||||
%{_datadir}/augeas/lenses/tests/test_libvirtd.aug
|
||||
%{_datadir}/augeas/lenses/libvirt_lockd.aug
|
||||
%{_datadir}/augeas/lenses/tests/test_libvirt_lockd.aug
|
||||
%if %{with_dtrace}
|
||||
%{_datadir}/systemtap/tapset/libvirt_probes.stp
|
||||
%{_datadir}/systemtap/tapset/libvirt_functions.stp
|
||||
@ -898,6 +987,8 @@ fi
|
||||
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/
|
||||
%dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/
|
||||
%dir %attr(0755, root, root) %{_libdir}/%{name}/lock-driver
|
||||
%attr(0755, root, root) %{_libdir}/%{name}/lock-driver/lockd.so
|
||||
%if %{with_polkit}
|
||||
%if 0%{?suse_version} > 1110
|
||||
%{_datadir}/polkit-1/actions/org.libvirt.unix.policy
|
||||
@ -907,6 +998,7 @@ fi
|
||||
%endif
|
||||
%if %{with_qemu}
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/qemu.conf
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/qemu-lockd.conf
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
|
||||
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
|
||||
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
|
||||
@ -966,6 +1058,7 @@ fi
|
||||
%{_bindir}/virt-host-validate
|
||||
%dir %{_libdir}/%{name}
|
||||
%{_libdir}/lib*.so.*
|
||||
%attr(0755, root, root) %{_libdir}/%{name}/libvirt-guests.sh
|
||||
%{_localstatedir}/adm/fillup-templates/sysconfig.libvirt-guests
|
||||
%config /etc/init.d/libvirt-guests
|
||||
%{_sbindir}/rclibvirt-guests
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: libvirt-1.0.0/daemon/libvirtd.conf
|
||||
Index: libvirt-1.0.1/daemon/libvirtd.conf
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/daemon/libvirtd.conf
|
||||
+++ libvirt-1.0.0/daemon/libvirtd.conf
|
||||
--- libvirt-1.0.1.orig/daemon/libvirtd.conf
|
||||
+++ libvirt-1.0.1/daemon/libvirtd.conf
|
||||
@@ -18,8 +18,8 @@
|
||||
# It is necessary to setup a CA and issue server certificates before
|
||||
# using this capability.
|
||||
@ -13,10 +13,10 @@ Index: libvirt-1.0.0/daemon/libvirtd.conf
|
||||
|
||||
# Listen for unencrypted TCP connections on the public TCP/IP port.
|
||||
# NB, must pass the --listen flag to the libvirtd process for this to
|
||||
Index: libvirt-1.0.0/daemon/libvirtd-config.c
|
||||
Index: libvirt-1.0.1/daemon/libvirtd-config.c
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/daemon/libvirtd-config.c
|
||||
+++ libvirt-1.0.0/daemon/libvirtd-config.c
|
||||
--- libvirt-1.0.1.orig/daemon/libvirtd-config.c
|
||||
+++ libvirt-1.0.1/daemon/libvirtd-config.c
|
||||
@@ -233,7 +233,7 @@ daemonConfigNew(bool privileged ATTRIBUT
|
||||
return NULL;
|
||||
}
|
||||
|
46
libvirtd-init-script.patch
Normal file
46
libvirtd-init-script.patch
Normal file
@ -0,0 +1,46 @@
|
||||
Adjust libvirtd sysconfig file to conform to SUSE standards
|
||||
|
||||
Index: libvirt-1.0.1/daemon/libvirtd.sysconf
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/daemon/libvirtd.sysconf
|
||||
+++ libvirt-1.0.1/daemon/libvirtd.sysconf
|
||||
@@ -1,16 +1,25 @@
|
||||
+## Path: System/Virtualization/libvirt
|
||||
+
|
||||
+## Type: string
|
||||
+## Default: /etc/libvirt/libvirtd.conf
|
||||
# Override the default config file
|
||||
# NOTE: This setting is no longer honoured if using
|
||||
# systemd. Set '--config /etc/libvirt/libvirtd.conf'
|
||||
# in LIBVIRTD_ARGS instead.
|
||||
-#LIBVIRTD_CONFIG=/etc/libvirt/libvirtd.conf
|
||||
+LIBVIRTD_CONFIG=/etc/libvirt/libvirtd.conf
|
||||
|
||||
-# Listen for TCP/IP connections
|
||||
-# NB. must setup TLS/SSL keys prior to using this
|
||||
-#LIBVIRTD_ARGS="--listen"
|
||||
+## Type: string
|
||||
+## Default: --listen
|
||||
+# Arguments to pass to libvirtd
|
||||
+LIBVIRTD_ARGS="--listen"
|
||||
|
||||
+## Type: string
|
||||
+## Default: none
|
||||
# Override Kerberos service keytab for SASL/GSSAPI
|
||||
#KRB5_KTNAME=/etc/libvirt/krb5.tab
|
||||
|
||||
+## Type: string
|
||||
+## Default: none
|
||||
# Override the QEMU/SDL default audio driver probing when
|
||||
# starting virtual machines using SDL graphics
|
||||
#
|
||||
@@ -20,5 +29,7 @@
|
||||
#
|
||||
#SDL_AUDIODRIVER=pulse
|
||||
|
||||
-# Override the maximum number of opened files
|
||||
-#LIBVIRTD_NOFILES_LIMIT=2048
|
||||
+## Type: integer
|
||||
+## Default: 2048
|
||||
+## Override the maximum number of opened files
|
||||
+LIBVIRTD_NOFILES_LIMIT=2048
|
@ -28,6 +28,13 @@ test -x $LIBVIRTD_BIN || { echo "$LIBVIRD_BIN not installed";
|
||||
. /etc/rc.status
|
||||
rc_reset
|
||||
|
||||
test -f /etc/sysconfig/libvirtd && . /etc/sysconfig/libvirtd
|
||||
|
||||
LIBVIRTD_CONFIG_ARGS=
|
||||
if [ -n "$LIBVIRTD_CONFIG" ]
|
||||
then
|
||||
LIBVIRTD_CONFIG_ARGS="--config $LIBVIRTD_CONFIG"
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
@ -42,11 +49,20 @@ case "$1" in
|
||||
fi
|
||||
fi
|
||||
echo -n "Starting libvirtd "
|
||||
startproc $LIBVIRTD_BIN -d -l
|
||||
mkdir -p /var/cache/libvirt
|
||||
rm -rf /var/cache/libvirt/*
|
||||
# LIBVIRTD_NOFILES_LIMIT from /etc/sysconfig/libvirtd is not handled
|
||||
# automatically
|
||||
if [ -n "$LIBVIRTD_NOFILES_LIMIT" ]; then
|
||||
ulimit -n "$LIBVIRTD_NOFILES_LIMIT"
|
||||
fi
|
||||
startproc $LIBVIRTD_BIN --daemon $LIBVIRTD_CONFIG_ARGS $LIBVIRTD_ARGS
|
||||
rc_status -v
|
||||
;;
|
||||
stop)
|
||||
echo -n "Shutting down libvirtd "
|
||||
rm -f /var/lock/subsys/libvirtd
|
||||
rm -rf /var/cache/libvirt/*
|
||||
killproc -TERM $LIBVIRTD_BIN > /dev/null 2>&1
|
||||
rm -f $LIBVIRTD_PIDFILE
|
||||
rc_status -v
|
||||
|
@ -7,29 +7,25 @@ drivers as loadable modules instead of built-in to the
|
||||
daemon. Then the qemu driver would only be loaded when needed,
|
||||
which would never be the case on a xen-only configuration.
|
||||
|
||||
Index: libvirt-1.0.0/src/qemu/qemu_conf.c
|
||||
Index: libvirt-1.0.1/src/qemu/qemu_conf.c
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/src/qemu/qemu_conf.c
|
||||
+++ libvirt-1.0.0/src/qemu/qemu_conf.c
|
||||
@@ -350,9 +350,7 @@ int qemudLoadDriverConfig(struct qemud_d
|
||||
return -1;
|
||||
}
|
||||
if (virGetUserID(user, &driver->user) < 0) {
|
||||
- VIR_FREE(user);
|
||||
- virConfFree(conf);
|
||||
- return -1;
|
||||
--- libvirt-1.0.1.orig/src/qemu/qemu_conf.c
|
||||
+++ libvirt-1.0.1/src/qemu/qemu_conf.c
|
||||
@@ -252,7 +252,7 @@ int qemuLoadDriverConfig(virQEMUDriverPt
|
||||
goto no_memory;
|
||||
|
||||
if (virGetUserID(user, &driver->user) < 0)
|
||||
- goto cleanup;
|
||||
+ VIR_WARN("User %s does not exist! Continuing...", user);
|
||||
}
|
||||
VIR_FREE(user);
|
||||
|
||||
@@ -365,9 +363,7 @@ int qemudLoadDriverConfig(struct qemud_d
|
||||
return -1;
|
||||
}
|
||||
if (virGetGroupID(group, &driver->group) < 0) {
|
||||
- VIR_FREE(group);
|
||||
- virConfFree(conf);
|
||||
- return -1;
|
||||
p = virConfGetValue(conf, "group");
|
||||
CHECK_TYPE("group", VIR_CONF_STRING);
|
||||
@@ -260,7 +260,7 @@ int qemuLoadDriverConfig(virQEMUDriverPt
|
||||
goto no_memory;
|
||||
|
||||
if (virGetGroupID(group, &driver->group) < 0)
|
||||
- goto cleanup;
|
||||
+ VIR_WARN("Group %s does not exist! Continuing...", group);
|
||||
}
|
||||
VIR_FREE(group);
|
||||
|
||||
GET_VALUE_LONG("dynamic_ownership", driver->dynamicOwnership);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: libvirt-1.0.0/src/qemu/qemu.conf
|
||||
Index: libvirt-1.0.1/src/qemu/qemu.conf
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/src/qemu/qemu.conf
|
||||
+++ libvirt-1.0.0/src/qemu/qemu.conf
|
||||
--- libvirt-1.0.1.orig/src/qemu/qemu.conf
|
||||
+++ libvirt-1.0.1/src/qemu/qemu.conf
|
||||
@@ -169,7 +169,16 @@
|
||||
# a special value; security_driver can be set to that value in
|
||||
# isolation, but it cannot appear in a list of drivers.
|
||||
|
@ -1,336 +0,0 @@
|
||||
Index: libvirt-1.0.0/tools/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/tools/Makefile.am
|
||||
+++ libvirt-1.0.0/tools/Makefile.am
|
||||
@@ -179,24 +179,22 @@ install-data-local: install-init install
|
||||
uninstall-local: uninstall-init uninstall-systemd
|
||||
|
||||
install-sysconfig:
|
||||
- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
|
||||
+ $(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-sysconfig:
|
||||
- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
|
||||
- rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||:
|
||||
+ rm -f $(DESTDIR)$(localstatedir)/adm/fillup-templates/sysconfig.libvirt-guests
|
||||
|
||||
EXTRA_DIST += libvirt-guests.init.sh
|
||||
|
||||
install-initscript: 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
|
||||
+ $(DESTDIR)$(sysconfdir)/init.d/libvirt-guests
|
||||
|
||||
uninstall-initscript:
|
||||
- rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests
|
||||
- rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d ||:
|
||||
+ rm -f $(DESTDIR)$(sysconfdir)/init.d/libvirt-guests
|
||||
|
||||
|
||||
if LIBVIRT_INIT_SCRIPT_RED_HAT
|
||||
Index: libvirt-1.0.0/tools/libvirt-guests.sysconf
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/tools/libvirt-guests.sysconf
|
||||
+++ libvirt-1.0.0/tools/libvirt-guests.sysconf
|
||||
@@ -1,19 +1,29 @@
|
||||
+## Path: System/Virtualization/libvirt
|
||||
+
|
||||
+## Type: string
|
||||
+## Default: default
|
||||
# URIs to check for running guests
|
||||
# example: URIS='default xen:/// vbox+tcp://host/system lxc:///'
|
||||
-#URIS=default
|
||||
+URIS=default
|
||||
|
||||
+## Type: string
|
||||
+## Default: start
|
||||
# action taken on host boot
|
||||
# - start all guests which were running on shutdown are started on boot
|
||||
# regardless on their autostart settings
|
||||
# - ignore libvirt-guests init script won't start any guest on boot, however,
|
||||
# guests marked as autostart will still be automatically started by
|
||||
# libvirtd
|
||||
-#ON_BOOT=start
|
||||
+ON_BOOT=start
|
||||
|
||||
+## Type: integer
|
||||
+## Default: 0
|
||||
# Number of seconds to wait between each guest start. Set to 0 to allow
|
||||
# parallel startup.
|
||||
-#START_DELAY=0
|
||||
+START_DELAY=0
|
||||
|
||||
+## Type: string
|
||||
+## Default: suspend
|
||||
# action taken on host shutdown
|
||||
# - suspend all running guests are suspended using virsh managedsave
|
||||
# - shutdown all running guests are asked to shutdown. Please be careful with
|
||||
@@ -22,20 +32,26 @@
|
||||
# which just needs a long time to shutdown. When setting
|
||||
# ON_SHUTDOWN=shutdown, you must also set SHUTDOWN_TIMEOUT to a
|
||||
# value suitable for your guests.
|
||||
-#ON_SHUTDOWN=suspend
|
||||
+ON_SHUTDOWN=suspend
|
||||
|
||||
+## Type: integer
|
||||
+## Default: 0
|
||||
# If set to non-zero, shutdown will suspend guests concurrently. Number of
|
||||
# guests on shutdown at any time will not exceed number set in this variable.
|
||||
-#PARALLEL_SHUTDOWN=0
|
||||
+PARALLEL_SHUTDOWN=0
|
||||
|
||||
+## Type: integer
|
||||
+## Default: 300
|
||||
# Number of seconds we're willing to wait for a guest to shut down. If parallel
|
||||
# shutdown is enabled, this timeout applies as a timeout for shutting down all
|
||||
# guests on a single URI defined in the variable URIS. If this is 0, then there
|
||||
# is no time out (use with caution, as guests might not respond to a shutdown
|
||||
# request). The default value is 300 seconds (5 minutes).
|
||||
-#SHUTDOWN_TIMEOUT=300
|
||||
+SHUTDOWN_TIMEOUT=300
|
||||
|
||||
+## Type: integer
|
||||
+## Default: 0
|
||||
# If non-zero, try to bypass the file system cache when saving and
|
||||
# restoring guests, even though this may give slower operation for
|
||||
# some file systems.
|
||||
-#BYPASS_CACHE=0
|
||||
+BYPASS_CACHE=0
|
||||
Index: libvirt-1.0.0/tools/libvirt-guests.init.sh
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/tools/libvirt-guests.init.sh
|
||||
+++ libvirt-1.0.0/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
|
||||
@@ -52,15 +51,13 @@ test -f "$sysconfdir"/sysconfig/libvirt-
|
||||
LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests
|
||||
VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests
|
||||
|
||||
-RETVAL=0
|
||||
-
|
||||
# retval COMMAND ARGUMENTS...
|
||||
# run command with arguments and convert non-zero return value to 1 and set
|
||||
# the global return variable
|
||||
retval() {
|
||||
"$@"
|
||||
if [ $? -ne 0 ]; then
|
||||
- RETVAL=1
|
||||
+ rc_failed 1
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
@@ -89,6 +86,25 @@ 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
|
||||
+}
|
||||
+
|
||||
# test_connect URI
|
||||
# check if URI is reachable
|
||||
test_connect()
|
||||
@@ -115,7 +131,7 @@ list_guests() {
|
||||
|
||||
list=$(run_virsh_c "$uri" list --uuid $persistent)
|
||||
if [ $? -ne 0 ]; then
|
||||
- RETVAL=1
|
||||
+ rc_failed 1
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -141,7 +157,7 @@ guest_is_on() {
|
||||
guest_running=false
|
||||
id=$(run_virsh "$uri" domid "$uuid")
|
||||
if [ $? -ne 0 ]; then
|
||||
- RETVAL=1
|
||||
+ rc_failed 1
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -189,6 +205,12 @@ start() {
|
||||
|
||||
test_connect "$uri" || continue
|
||||
|
||||
+ 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")
|
||||
@@ -401,7 +423,7 @@ shutdown_guests_parallel()
|
||||
timeout=$(($timeout - 1))
|
||||
if [ $timeout -le 0 ]; then
|
||||
eval_gettext "Timeout expired while shutting down domains"; echo
|
||||
- RETVAL=1
|
||||
+ rc_failed 1
|
||||
return
|
||||
fi
|
||||
else
|
||||
@@ -429,7 +451,7 @@ stop() {
|
||||
if [ $SHUTDOWN_TIMEOUT -lt 0 ]; then
|
||||
gettext "SHUTDOWN_TIMEOUT must be equal or greater than 0"
|
||||
echo
|
||||
- RETVAL=6
|
||||
+ rc_failed 6
|
||||
return
|
||||
fi
|
||||
fi
|
||||
@@ -543,14 +565,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
|
||||
}
|
||||
|
||||
@@ -594,4 +615,4 @@ case "$1" in
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
-exit $RETVAL
|
||||
+rc_exit
|
||||
Index: libvirt-1.0.0/daemon/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/daemon/Makefile.am
|
||||
+++ libvirt-1.0.0/daemon/Makefile.am
|
||||
@@ -265,39 +265,23 @@ uninstall-logrotate:
|
||||
rmdir $(DESTDIR)$(sysconfdir)/logrotate.d || :
|
||||
|
||||
install-sysconfig:
|
||||
- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
|
||||
+ $(MKDIR_P) $(DESTDIR)$(localstatedir)/adm/fillup-templates
|
||||
$(INSTALL_DATA) $(srcdir)/libvirtd.sysconf \
|
||||
- $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
|
||||
-uninstall-sysconfig:
|
||||
- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
|
||||
- rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
|
||||
+ $(DESTDIR)$(localstatedir)/adm/fillup-templates/sysconfig.libvirtd
|
||||
|
||||
-if WITH_SYSCTL
|
||||
-install-sysctl:
|
||||
- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysctl.d
|
||||
- $(INSTALL_DATA) $(srcdir)/libvirtd.sysctl \
|
||||
- $(DESTDIR)$(sysconfdir)/sysctl.d/libvirtd
|
||||
+uninstall-sysconfig:
|
||||
+ rm -f $(DESTDIR)$(localstatedir)/adm/fillup-templates/sysconfig.libvirtd
|
||||
|
||||
-uninstall-sysctl:
|
||||
- rm -f $(DESTDIR)$(sysconfdir)/sysctl.d/libvirtd
|
||||
- rmdir $(DESTDIR)$(sysconfdir)/sysctl.d || :
|
||||
-else
|
||||
install-sysctl:
|
||||
uninstall-sysctl:
|
||||
-endif
|
||||
|
||||
if LIBVIRT_INIT_SCRIPT_RED_HAT
|
||||
|
||||
BUILT_SOURCES += libvirtd.init
|
||||
|
||||
install-init-redhat: install-sysconfig libvirtd.init
|
||||
- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d
|
||||
- $(INSTALL_SCRIPT) libvirtd.init \
|
||||
- $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd
|
||||
|
||||
uninstall-init-redhat: uninstall-sysconfig
|
||||
- rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd
|
||||
- rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d || :
|
||||
else
|
||||
install-init-redhat:
|
||||
uninstall-init-redhat:
|
||||
Index: libvirt-1.0.0/daemon/libvirtd.sysconf
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/daemon/libvirtd.sysconf
|
||||
+++ libvirt-1.0.0/daemon/libvirtd.sysconf
|
||||
@@ -1,16 +1,25 @@
|
||||
+## Path: System/Virtualization/libvirt
|
||||
+
|
||||
+## Type: string
|
||||
+## Default: /etc/libvirt/libvirtd.conf
|
||||
# Override the default config file
|
||||
# NOTE: This setting is no longer honoured if using
|
||||
# systemd. Set '--config /etc/libvirt/libvirtd.conf'
|
||||
# in LIBVIRTD_ARGS instead.
|
||||
-#LIBVIRTD_CONFIG=/etc/libvirt/libvirtd.conf
|
||||
+LIBVIRTD_CONFIG=/etc/libvirt/libvirtd.conf
|
||||
|
||||
-# Listen for TCP/IP connections
|
||||
-# NB. must setup TLS/SSL keys prior to using this
|
||||
-#LIBVIRTD_ARGS="--listen"
|
||||
+## Type: string
|
||||
+## Default: --listen
|
||||
+# Arguments to pass to libvirtd
|
||||
+LIBVIRTD_ARGS="--listen"
|
||||
|
||||
+## Type: string
|
||||
+## Default: none
|
||||
# Override Kerberos service keytab for SASL/GSSAPI
|
||||
#KRB5_KTNAME=/etc/libvirt/krb5.tab
|
||||
|
||||
+## Type: string
|
||||
+## Default: none
|
||||
# Override the QEMU/SDL default audio driver probing when
|
||||
# starting virtual machines using SDL graphics
|
||||
#
|
125
virtlockd-init-script.patch
Normal file
125
virtlockd-init-script.patch
Normal file
@ -0,0 +1,125 @@
|
||||
Adjust virtlockd init files to conform to SUSE standards
|
||||
|
||||
Index: libvirt-1.0.1/src/locking/virtlockd.sysconf
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/src/locking/virtlockd.sysconf
|
||||
+++ libvirt-1.0.1/src/locking/virtlockd.sysconf
|
||||
@@ -1,3 +1,7 @@
|
||||
+## Path: System/Virtualization/virtlockd
|
||||
+
|
||||
+## Type: string
|
||||
+## Default: ""
|
||||
#
|
||||
# Pass extra arguments to virtlockd
|
||||
#VIRTLOCKD_ARGS=
|
||||
Index: libvirt-1.0.1/src/locking/virtlockd.init.in
|
||||
===================================================================
|
||||
--- libvirt-1.0.1.orig/src/locking/virtlockd.init.in
|
||||
+++ libvirt-1.0.1/src/locking/virtlockd.init.in
|
||||
@@ -4,11 +4,13 @@
|
||||
# http://www.linux-foundation.org/spec//booksets/LSB-Core-generic/LSB-Core-generic.html#INITSCRCOMCONV
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
-# Provides: virtlockd
|
||||
-# Default-Start: 3 4 5
|
||||
+# Provides: virtlockd
|
||||
+# Required-Start: $network $remote_fs
|
||||
+# Default-Start: 3 4 5
|
||||
+# Required-Stop: $network $remote_fs
|
||||
# Short-Description: virtual machine lock manager
|
||||
-# Description: This is a daemon for managing locks
|
||||
-# on virtual machine disk images
|
||||
+# Description: This is a daemon for managing locks
|
||||
+# on virtual machine disk images
|
||||
### END INIT INFO
|
||||
|
||||
# the following is chkconfig init header
|
||||
@@ -23,35 +25,39 @@
|
||||
# pidfile: @localstatedir@/run/libvirt/virtlockd.pid
|
||||
#
|
||||
|
||||
-# Source function library.
|
||||
-. @sysconfdir@/rc.d/init.d/functions
|
||||
+. @sysconfdir@/rc.status
|
||||
+rc_reset
|
||||
|
||||
SERVICE=virtlockd
|
||||
-PROCESS=virtlockd
|
||||
+PROCESS=@sbindir@/virtlockd
|
||||
PIDFILE=@localstatedir@/run/libvirt/lockd/$SERVICE.pid
|
||||
|
||||
VIRTLOCKD_ARGS=
|
||||
|
||||
test -f @sysconfdir@/sysconfig/virtlockd && . @sysconfdir@/sysconfig/virtlockd
|
||||
|
||||
-RETVAL=0
|
||||
+if [ -d @localstatedir@/lock/subsys ]; then
|
||||
+ VAR_SUBSYS_VIRTLOCKD=@localstatedir@/lock/subsys/$SERVICE
|
||||
+else
|
||||
+ VAR_SUBSYS_VIRTLOCKD=@localstatedir@/lock/$SERVICE
|
||||
+fi
|
||||
|
||||
start() {
|
||||
- echo -n $"Starting $SERVICE daemon: "
|
||||
- daemon --pidfile $PIDFILE --check $SERVICE $PROCESS --daemon $VIRTLOCKD_ARGS
|
||||
+ echo -n $"Starting $SERVICE "
|
||||
+ startproc $PROCESS --daemon $VIRTLOCKD_ARGS
|
||||
RETVAL=$?
|
||||
- echo
|
||||
- [ $RETVAL -eq 0 ] && touch @localstatedir@/lock/subsys/$SERVICE
|
||||
+ rc_status -v
|
||||
+ [ $RETVAL -eq 0 ] && touch $VAR_SUBSYS_VIRTLOCKD
|
||||
}
|
||||
|
||||
stop() {
|
||||
- echo -n $"Stopping $SERVICE daemon: "
|
||||
+ echo -n $"Stopping $SERVICE "
|
||||
|
||||
- killproc -p $PIDFILE $PROCESS
|
||||
+ killproc -p $PIDFILE $PROCESS > /dev/null 2>&1
|
||||
RETVAL=$?
|
||||
- echo
|
||||
+ rc_status -v
|
||||
if [ $RETVAL -eq 0 ]; then
|
||||
- rm -f @localstatedir@/lock/subsys/$SERVICE
|
||||
+ rm -f $VAR_SUBSYS_VIRTLOCKD
|
||||
rm -f $PIDFILE
|
||||
fi
|
||||
}
|
||||
@@ -65,9 +71,7 @@ reload() {
|
||||
echo -n $"Reloading $SERVICE configuration: "
|
||||
|
||||
killproc -p $PIDFILE $PROCESS -HUP
|
||||
- RETVAL=$?
|
||||
- echo
|
||||
- return $RETVAL
|
||||
+ rc_status
|
||||
}
|
||||
|
||||
# See how we were called.
|
||||
@@ -76,18 +80,20 @@ case "$1" in
|
||||
$1
|
||||
;;
|
||||
status)
|
||||
- status -p $PIDFILE $PROCESS
|
||||
- RETVAL=$?
|
||||
+ echo -n "Checking status of $SERVICE "
|
||||
+ checkproc $PROCESS
|
||||
+ rc_status -v
|
||||
;;
|
||||
force-reload)
|
||||
reload
|
||||
;;
|
||||
condrestart|try-restart)
|
||||
- [ -f @localstatedir@/lock/subsys/$SERVICE ] && restart || :
|
||||
+ [ -f $VAR_SUBSYS_VIRTLOCKD ] && restart || :
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload|try-restart}"
|
||||
- exit 2
|
||||
+ rc_failed 2
|
||||
+ rc_exit
|
||||
;;
|
||||
esac
|
||||
-exit $RETVAL
|
||||
+rc_exit
|
@ -13,10 +13,10 @@ Date: Wed Jan 27 16:11:41 2010 -0700
|
||||
This approach allows removing a disk when domain is inactive. We
|
||||
obviously can't search xenstore when the domain is inactive.
|
||||
|
||||
Index: libvirt-1.0.0/src/xen/xend_internal.c
|
||||
Index: libvirt-1.0.1/src/xen/xend_internal.c
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/src/xen/xend_internal.c
|
||||
+++ libvirt-1.0.0/src/xen/xend_internal.c
|
||||
--- libvirt-1.0.1.orig/src/xen/xend_internal.c
|
||||
+++ libvirt-1.0.1/src/xen/xend_internal.c
|
||||
@@ -61,6 +61,7 @@
|
||||
|
||||
static int
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: libvirt-1.0.0/src/xenxs/xen_sxpr.c
|
||||
Index: libvirt-1.0.1/src/xenxs/xen_sxpr.c
|
||||
===================================================================
|
||||
--- libvirt-1.0.0.orig/src/xenxs/xen_sxpr.c
|
||||
+++ libvirt-1.0.0/src/xenxs/xen_sxpr.c
|
||||
--- libvirt-1.0.1.orig/src/xenxs/xen_sxpr.c
|
||||
+++ libvirt-1.0.1/src/xenxs/xen_sxpr.c
|
||||
@@ -341,7 +341,7 @@ error:
|
||||
static int
|
||||
xenParseSxprDisks(virDomainDefPtr def,
|
||||
|
Loading…
Reference in New Issue
Block a user