]> git.pld-linux.org Git - packages/xen.git/commitdiff
- sync with DEVEL
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 10 Apr 2016 14:19:08 +0000 (23:19 +0900)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 10 Apr 2016 14:19:08 +0000 (23:19 +0900)
xen.spec
xendomains.sh [deleted file]
xenstored.sysconfig

index bcf3ab3b0d0ce831532371032c3f7a09d41c24c6..810922641662fe902869788bae7bb253ed5d1e0f 100644 (file)
--- a/xen.spec
+++ b/xen.spec
@@ -67,7 +67,6 @@ Source19:     ftp://ftp.gmplib.org/pub/gmp-%{gmp_version}/gmp-%{gmp_version}.tar.bz2
 Source35:      xenconsoled.sysconfig
 Source37:      xenstored.sysconfig
 Source38:      xenstored.tmpfiles
-Source43:      xendomains.sh
 # sysvinit scripts
 Source46:      xen-qemu-dom0-disk-backend.init
 Source51:      xenconsoled.init
@@ -483,7 +482,7 @@ install -d $RPM_BUILD_ROOT/etc/efi-boot/update.d
 
 install %{SOURCE35} $RPM_BUILD_ROOT/etc/sysconfig/xenconsoled
 install %{SOURCE37} $RPM_BUILD_ROOT/etc/sysconfig/xenstored
-install %{SOURCE43} $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/xendomains.sh
+
 # sysvinit scripts
 %{__rm} $RPM_BUILD_ROOT/etc/rc.d/init.d/*
 %{__rm} $RPM_BUILD_ROOT/etc/sysconfig/xencommons
@@ -506,7 +505,7 @@ sed -e's;@libdir@;%{_libdir};g' -e's;@target_cpu@;%{_target_cpu};g' \
                        %{SOURCE58} > $RPM_BUILD_ROOT/etc/efi-boot/update.d/xen.conf
 %endif
 
-mv $RPM_BUILD_ROOT/etc/xen/{xlexample*,examples}
+%{__mv} $RPM_BUILD_ROOT/etc/xen/{xlexample*,examples}
 
 install %{SOURCE59} $RPM_BUILD_ROOT%{_sysconfdir}/xen/scripts/vif-openvswitch
 
@@ -672,9 +671,6 @@ fi
 %{_libdir}/%{name}/boot/xenstore-stubdom.gz
 %endif
 %attr(744,root,root) %{_libdir}/%{name}/boot/hvmloader
-%{_mandir}/man1/xenstore-chmod.1*
-%{_mandir}/man1/xenstore-ls.1*
-%{_mandir}/man1/xenstore.1*
 %{_mandir}/man1/xentop.1*
 %{_mandir}/man1/xentrace_format.1*
 %{_mandir}/man1/xl.1*
@@ -696,7 +692,19 @@ fi
 %files guest
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/xen-detect
-%attr(755,root,root) %{_bindir}/xenstore*
+%attr(755,root,root) %{_bindir}/xenstore
+%attr(755,root,root) %{_bindir}/xenstore-chmod
+%attr(755,root,root) %{_bindir}/xenstore-control
+%attr(755,root,root) %{_bindir}/xenstore-exists
+%attr(755,root,root) %{_bindir}/xenstore-list
+%attr(755,root,root) %{_bindir}/xenstore-ls
+%attr(755,root,root) %{_bindir}/xenstore-read
+%attr(755,root,root) %{_bindir}/xenstore-rm
+%attr(755,root,root) %{_bindir}/xenstore-watch
+%attr(755,root,root) %{_bindir}/xenstore-write
+%{_mandir}/man1/xenstore.1*
+%{_mandir}/man1/xenstore-chmod.1*
+%{_mandir}/man1/xenstore-ls.1*
 
 %files libs
 %defattr(644,root,root,755)
@@ -824,6 +832,7 @@ fi
 %files -n python-xen
 %defattr(644,root,root,755)
 %attr(755,root,root) %{py_sitedir}/fsimage.so
+%dir %{py_sitedir}/xen
 %dir %{py_sitedir}/xen/lowlevel
 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/xc.so
 %{py_sitedir}/xen/migration
diff --git a/xendomains.sh b/xendomains.sh
deleted file mode 100755 (executable)
index 7f451f4..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
-#!/bin/bash
-
-if ! [ -e /proc/xen/privcmd ]; then
-       exit 0
-fi
-
-TOOLSTACK=$(/usr/lib/xen/bin/xen-toolstack toolstack 2>/dev/null)
-if [ $? -ne 0 ]; then
-       echo "No usable Xen toolstack selected"
-       exit 0
-fi
-if [ "$(basename "$TOOLSTACK")" != xl ] && [ "$(basename "$TOOLSTACK")" != xm ]; then
-       exit 0
-fi
-
-if ! /usr/lib/xen/bin/xen-toolstack list >/dev/null 2>&1 ; then
-       exit 0;
-fi
-
-[ -r /etc/sysconfig/xendomains ] && . /etc/sysconfig/xendomains
-
-shopt -s nullglob
-
-check_config_name()
-{
-       /usr/lib/xen/bin/xen-toolstack create --quiet --dryrun --defconfig "$1" | sed -n 's/^.*\("name":"\([^"]*\)",.*\)\|(name \(.*\))$/\2\3/p'
-}
-
-check_running()
-{
-       /usr/lib/xen/bin/xen-toolstack domid "$1" >/dev/null 2>&1
-       return $?
-}
-
-timeout_coproc()
-{
-       local TIMEOUT=$1
-       shift
-
-       coproc "$@" >/dev/null 2>&1
-
-       local COPROC_OUT
-       exec {COPROC_OUT}<&"${COPROC[0]}"
-       local PID="$COPROC_PID"
-
-       for no in $(seq 0 $TIMEOUT); do
-               if [ -z "$COPROC_PID" ]; then break; fi
-               sleep 1
-       done
-
-       kill -INT "$COPROC_PID" >/dev/null 2>&1
-       wait $PID
-       local rc=$?
-       if [ $rc -eq 0 ]; then
-               echo "ok"
-       else
-               echo "fail ($rc)"
-       fi
-
-       [ $rc -gt 0 ] && cat <&$COPROC_OUT
-       exec <&$COPROC_OUT-
-}
-
-timeout_domain()
-{
-       name="$1"
-       TIMEOUT="$2"
-       for no in $(seq 0 $TIMEOUT); do
-               if ! check_running "$name"; then return 0; fi
-               sleep 1
-       done
-       return 1
-}
-
-do_start_restore()
-{
-       [ -n "$XENDOMAINS_SAVE" ] || return
-       [ -d "$XENDOMAINS_SAVE" ] || return
-       [ -n "$XENDOMAINS_RESTORE" ] || return
-
-       for file in $XENDOMAINS_SAVE/*; do
-               if [ -f $file ] ; then
-                       name="${file##*/}"
-                       echo -n "Restoring Xen domain $name (from $file): "
-
-                       out=$(/usr/lib/xen/bin/xen-toolstack restore "$file" >/dev/null 2>&1)
-                       case "$?" in
-                               0)
-                                       rm "$file"
-                                       domains[$name]='started'
-                                       echo "ok"
-                                       ;;
-                               *)
-                                       domains[$name]='failed'
-                                       echo "fail"
-                                       echo "$out"
-                                       ;;
-                       esac
-               fi
-       done
-}
-
-do_start_auto()
-{
-       [ -n "$XENDOMAINS_AUTO" ] || return
-       [ -d "$XENDOMAINS_AUTO" ] || return
-
-       for file in $XENDOMAINS_AUTO/*; do
-               name="$(check_config_name $file)"
-
-               if [ "${domains[$name]}" = started ]; then
-                       :
-               elif check_running "$name"; then
-                       echo "Xen domain $name already running"
-               else
-                       echo -n "Starting Xen domain $name (from $file): "
-
-                       if [ "${domains[$name]}" = failed ]; then
-                               echo "fail"
-                       else
-                               out=$(/usr/lib/xen/bin/xen-toolstack create --quiet --defconfig "$file" >/dev/null 2>&1)
-                               case "$?" in
-                                       0)
-                                               echo "ok"
-                                               ;;
-                                       *)
-                                               echo "fail"
-                                               echo "$out"
-                                               ;;
-                               esac
-                       fi
-               fi
-       done
-}
-
-do_start() 
-{
-       declare -A domains
-
-       do_start_restore
-       do_start_auto
-}
-
-do_stop_migrate()
-{
-       [ -n "$XENDOMAINS_MIGRATE" ] || return
-
-       while read id name rest; do
-               echo -n "Migrating Xen domain $name ($id): "
-               (timeout_coproc "$XENDOMAINS_STOP_MAXWAIT" /usr/lib/xen/bin/xen-toolstack migrate $id $XENDOMAINS_MIGRATE)
-       done < <(/usr/lib/xen/bin/xen-init-list)
-}
-
-do_stop_save()
-{
-       [ -n "$XENDOMAINS_SAVE" ] || return
-       [ -d "$XENDOMAINS_SAVE" ] || mkdir -m 0700 -p "$XENDOMAINS_SAVE"
-
-       while read id name rest; do
-               echo -n "Saving Xen domain $name ($id): "
-               (timeout_coproc "$XENDOMAINS_STOP_MAXWAIT" /usr/lib/xen/bin/xen-toolstack save $id $XENDOMAINS_SAVE/$name)
-       done < <(/usr/lib/xen/bin/xen-init-list)
-}
-
-do_stop_shutdown()
-{
-       while read id name rest; do
-               echo -n "Shutting down Xen domain $name ($id): "
-               /usr/lib/xen/bin/xen-toolstack shutdown $id >/dev/null 2>&1
-               rc=$?
-               if [ $rc -eq 0 ]; then
-                       echo "ok"
-               else
-                       echo "fail ($rc)"
-               fi
-       done < <(/usr/lib/xen/bin/xen-init-list)
-       while read id name rest; do
-               echo -n "Waiting for Xen domain $name ($id) to shut down: "
-               timeout_domain "$name" "$XENDOMAINS_STOP_MAXWAIT"
-               rc=$?
-               if [ $rc -eq 0 ]; then
-                       echo "ok"
-               else
-                       echo "fail ($rc)"
-               fi
-       done < <(/usr/lib/xen/bin/xen-init-list)
-}
-
-do_stop()
-{
-       do_stop_migrate
-       do_stop_save
-       do_stop_shutdown
-}
-
-case "$1" in
-       start)
-               do_start
-               ;;
-       stop)
-               do_stop
-               ;;
-       restart)
-               do_stop
-               do_start
-               ;;
-       reload|force-reload)
-               do_stop
-               do_start
-               ;;
-       status)
-               /usr/lib/xen/bin/xen-toolstack list -v
-               ;;
-       *)
-               echo "Usage: $0 {start|stop|status|restart|reload|force-reload}"
-               exit 3
-               ;;
-esac
-
-exit 0
index 46e860970ff18eebc35248c98ba553523dd9044a..4edf7d662287a429394b9e3909fdc200df855717 100644 (file)
@@ -3,3 +3,15 @@
 
 # Log xenstored messages
 #XENSTORED_ARGS="-T /var/log/xen/xenstored-trace.log"
+
+# Select xenstore implementation, this can be either
+# of these below. If using systemd it's preferred that you
+# just edit the xenstored.service unit file and change
+# the XENSTORED variable there.
+#
+# This can be either of:
+#  * /usr/sbin/oxenstored
+#  * /usr/sbin/xenstored
+#
+# Changing this requires a reboot to take effect.
+#XENSTORED=/usr/sbin/oxenstored
This page took 0.052275 seconds and 4 git commands to generate.