libraries/libvirt: Cleanups, added a note about netcat-openbsd.

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
Matteo Bernardini 2013-11-23 16:05:41 +01:00 committed by Robby Workman
parent 6fa72e40e1
commit 4c4f241f0c
2 changed files with 28 additions and 8 deletions

View file

@ -3,7 +3,7 @@ libvirt - The virtualization API
libvirt is a toolkit to interact with the virtualization
capabilities of recent versions of Linux (and other OSes).
Most dependencies are autodetected and having the required
Most optional dependencies are autodetected and having the required
libs in place will build the respective features automatically.
The group can be specified at build time like this:
@ -12,9 +12,19 @@ VIRTGROUP=somegroup ./libvirt.SlackBuild (default: users)
If you want to start the libvirt daemon at boot, add this
to /etc/rc.d/rc.local
# Start libvirt:
if [ -x /etc/rc.d/rc.libvirt ]; then
/etc/rc.d/rc.libvirt start
fi
# Start libvirt:
if [ -x /etc/rc.d/rc.libvirt ]; then
/etc/rc.d/rc.libvirt start
fi
and if you want it to stop at shutdown add this to
/etc/rc.d/rc.local_shutdown
# Stop libvirt:
if [ -x /etc/rc.d/rc.libvirt ]; then
/etc/rc.d/rc.libvirt stop
fi
Have a look at the commented part of rc.libvirt for some gotchas.
netcat-openbsd is an optional dependency (needed if you want
to connect from a remote host using virt-manager).

View file

@ -49,7 +49,14 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# we have sysctld files in /etc/sysctl.d
sed -i "s|(prefix)/lib/sysctl|(sysconfdir)/sysctl|" daemon/Makefile.in
CFLAGS="$SLKCFLAGS" \
./configure \
@ -76,6 +83,9 @@ make \
EXAMPLE_DIR=/usr/doc/$PRGNAM-$VERSION/examples \
install-strip DESTDIR=$PKG
# we don't have augeas
rm -fr $PKG/usr/share/augeas
# add an rc.libvirt to start/stop/restart the daemon
install -D -m 0755 $CWD/rc.libvirt $PKG/etc/rc.d/rc.libvirt.new
@ -108,10 +118,10 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
# Don't clobber existing configuration files
for i in etc/libvirt{,/nwfilter,/qemu/networks} etc/{logrotate.d,sasl2,sysctl.d}; do
for i in etc/libvirt etc/libvirt/nwfilter etc/libvirt/qemu/networks etc/logrotate.d etc/sasl2 etc/sysctl.d; do
for j in $(ls -1 $PKG/$i); do
if [ ! -d $PKG/$i/$j ]; then
mv $PKG/$i/$j{,.new}
mv $PKG/$i/$j $PKG/$i/$j.new
echo "config $i/$j.new" >> $PKG/install/doinst.sh
fi
done