forked from pool/libvirt
a870a15461
- 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
402 lines
14 KiB
Diff
402 lines
14 KiB
Diff
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"
|