OBS User unknown 2007-08-21 00:37:22 +00:00 committed by Git OBS Bridge
parent f7767ee62c
commit 05e99c9dff
3 changed files with 101 additions and 5 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Aug 20 17:45:13 MDT 2007 - jfehlig@novell.com
- Added init script for libvirtd. libvirtd is needed to support
management of qemu/kvm guests. Some Xen networking is handled
through libvirt as well - bug #298021.
-------------------------------------------------------------------
Mon Jul 23 17:08:09 MDT 2007 - jfehlig@novell.com

View File

@ -19,9 +19,10 @@ License: LGPL v2 or later
Group: Development/Libraries/C and C++
Autoreqprov: yes
Version: 0.3.0
Release: 1
Release: 15
Summary: A C toolkit to interract with the virtualization capabilities of Linux
Source: %{name}-%{version}.tar.bz2
Source0: %{name}-%{version}.tar.bz2
Source1: libvirtd.init
Patch: libvirt-cflags.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64
@ -126,6 +127,9 @@ cp -a AUTHORS ChangeLog COPYING NEWS README TODO $RPM_BUILD_ROOT%{_docdir}/%{nam
cp -a docs/{*.html,*.gif,*.rng,libvirt*.xml} $RPM_BUILD_ROOT%{_docdir}/%{name}
mkdir $RPM_BUILD_ROOT%{_docdir}/%{name}/examples
install -m 0644 docs/examples/{*.c,*.html} $RPM_BUILD_ROOT%{_docdir}/%{name}/examples
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
mkdir -p $RPM_BUILD_ROOT/var/run/libvirtd
rm $RPM_BUILD_ROOT%{_docdir}/%{name}/{*.c,examples.x*}
install -m 0644 docs/examples/python/{*.py,*.xml,README} $RPM_BUILD_ROOT%{_docdir}/%{name}-python/examples
rm $RPM_BUILD_ROOT%{_libdir}/*.*a $RPM_BUILD_ROOT%{py_sitedir}/*.*a
@ -150,14 +154,26 @@ ln_dupes()
#%{_libdir}/libvirt_proxy root.root 4755
#EOF
rm $RPM_BUILD_ROOT%{_libexecdir}/libvirt_proxy
# init script
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install %SOURCE1 $RPM_BUILD_ROOT/etc/init.d/libvirtd
ln -s /etc/init.d/libvirtd $RPM_BUILD_ROOT/usr/sbin/rclibvirtd
%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%post
/sbin/ldconfig
%{fillup_and_insserv -f -y libvirtd}
%postun -p /sbin/ldconfig
%preun
%stop_on_removal libvirtd
%postun
/sbin/ldconfig
%restart_on_update libvirtd
%insserv_cleanup
%files -f %{name}.lang
%defattr(-, root, root)
@ -169,7 +185,13 @@ rm -rf $RPM_BUILD_ROOT
%doc %{_docdir}/%{name}/examples
%doc %{_mandir}/man1/virsh.1*
%{_libdir}/*.so.*
%config /etc/libvirt/
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart
%dir /var/run/libvirt/
%config /etc/init.d/libvirtd
%{_sbindir}/rclibvirtd
%files devel
%defattr(-, root, root)
@ -193,6 +215,10 @@ rm -rf $RPM_BUILD_ROOT
%{py_sitedir}/libvirtmod*
%changelog
* Mon Aug 20 2007 - jfehlig@novell.com
- Added init script for libvirtd. libvirtd is needed to support
management of qemu/kvm guests. Some Xen networking is handled
through libvirt as well - bug #298021.
* Mon Jul 23 2007 - jfehlig@novell.com
- Update to libvirt-0.3.0
- Secure Remote support

63
libvirtd.init Normal file
View File

@ -0,0 +1,63 @@
#!/bin/sh
# the following is the LSB init header see
# http://www.linux-foundation.org/spec//booksets/LSB-Core-generic/LSB-Core-generic.html#INITSCRCOMCONV
#
### BEGIN INIT INFO
# Provides: libvirtd
# Should-Start: xend
# Default-Start: 3 5
# Default-Stop: 0 1 2 4 6
# Short-Description: daemon for libvirt virtualization API
# Description: This is a daemon for managing QEMU guest instances
# and libvirt virtual networks
# See http://libvirt.org
### END INIT INFO
LIBVIRTD_BIN=/usr/sbin/libvirtd
test -x $LIBVIRTD_BIN || { echo "$LIBVIRD_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }
. /etc/rc.status
rc_reset
case "$1" in
start)
echo -n "Starting libvirtd "
startproc $LIBVIRTD_BIN
rc_status -v
;;
stop)
echo -n "Shutting down libvirtd "
killproc -TERM $LIBVIRTD_BIN > /dev/null 2>&1
rc_status -v
;;
try-restart)
$0 status >/dev/null && $0 restart
rc_status
;;
restart)
$0 stop
$0 start
rc_status
;;
reload)
killproc -HUP $LIBVIRTD_BIN
rc_status -v
;;
status)
echo -n "Checking status of libvirtd "
checkproc $LIBVIRTD_BIN
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|restart|try-restart|reload|status}"
rc_failed 2
rc_exit
;;
esac
rc_exit