summaryrefslogtreecommitdiffstats
path: root/libraries/libvirt
diff options
context:
space:
mode:
author Matteo Bernardini <ponce@slackbuilds.org>2013-11-23 16:05:41 +0100
committer Robby Workman <rworkman@slackbuilds.org>2013-11-23 19:27:58 -0600
commit4c4f241f0c71646e8b44d538233826d32303cfc7 (patch)
treece6f29c99e4b90a6c4b1596bd1bc477a4df3bcea /libraries/libvirt
parent6fa72e40e12d86abfa677b7965bfdd743ae3590f (diff)
downloadslackbuilds-4c4f241f0c71646e8b44d538233826d32303cfc7.tar.gz
slackbuilds-4c4f241f0c71646e8b44d538233826d32303cfc7.tar.xz
libraries/libvirt: Cleanups, added a note about netcat-openbsd.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'libraries/libvirt')
-rw-r--r--libraries/libvirt/README20
-rw-r--r--libraries/libvirt/libvirt.SlackBuild16
2 files changed, 28 insertions, 8 deletions
diff --git a/libraries/libvirt/README b/libraries/libvirt/README
index ae63f423ca..0e977953e8 100644
--- a/libraries/libvirt/README
+++ b/libraries/libvirt/README
@@ -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).
diff --git a/libraries/libvirt/libvirt.SlackBuild b/libraries/libvirt/libvirt.SlackBuild
index fb44d6d769..1f0695d974 100644
--- a/libraries/libvirt/libvirt.SlackBuild
+++ b/libraries/libvirt/libvirt.SlackBuild
@@ -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