summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorStu Miller <slackbuilds@go4it2day.com>2010-06-19 09:08:45 -0500
committerErik Hanson <erik@slackbuilds.org>2010-06-20 15:19:58 -0500
commitefdaa581571c00b33a51a1a3bca9db5a1a79d74e (patch)
tree8299ee21fe59ef388d0634f554663c3a6ba19664 /system
parentf70aea4742e92140a95a238d8a5a10b4bcac7981 (diff)
downloadslackbuilds-efdaa581571c00b33a51a1a3bca9db5a1a79d74e.tar.gz
system/qemu-kvm: Updated for version 0.12.4.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/qemu-kvm/README11
-rw-r--r--system/qemu-kvm/fixup_udev_rules.patch6
-rw-r--r--system/qemu-kvm/fixup_udev_rules_file.diff6
-rw-r--r--system/qemu-kvm/qemu-kvm.SlackBuild43
-rw-r--r--system/qemu-kvm/qemu-kvm.info8
5 files changed, 38 insertions, 36 deletions
diff --git a/system/qemu-kvm/README b/system/qemu-kvm/README
index 99222171d7..99ecff033c 100644
--- a/system/qemu-kvm/README
+++ b/system/qemu-kvm/README
@@ -11,6 +11,11 @@ core virtualization infrastructure and a processor specific module,
works with 'virtio' modules. Slackware provides pre-built 'kvm' and
'virtio' modules that work with this package.
-After package installation, add a 'kvm' group and add a user to the
-'kvm' group and re-login. Don't forget to load the 'kvm-intel' or
-'kvm-amd' module depending on your processor.
+This requires a system group (which defaults to 'kvm') which decides who
+can use qemu-kvm. If you want to use a different group, e.g. 'users',
+then run the script like this: KVMGROUP=users sh qemu-kvm.SlackBuild
+
+After package installation, make sure you have the KVMGROUP present on
+your system and that all desired users are members of that group.
+Don't forget to load the 'kvm-intel' or 'kvm-amd' module, which depends
+on your processor.
diff --git a/system/qemu-kvm/fixup_udev_rules.patch b/system/qemu-kvm/fixup_udev_rules.patch
new file mode 100644
index 0000000000..0c5e789024
--- /dev/null
+++ b/system/qemu-kvm/fixup_udev_rules.patch
@@ -0,0 +1,6 @@
+diff -Nur qemu-kvm-0.12.4.orig//kvm/scripts/65-kvm.rules qemu-kvm-0.12.4/kvm/scripts/65-kvm.rules
+--- qemu-kvm-0.12.4.orig//kvm/scripts/65-kvm.rules 2010-05-09 06:05:19.000000000 -0500
++++ qemu-kvm-0.12.4/kvm/scripts/65-kvm.rules 2010-06-17 18:05:29.158571682 -0500
+@@ -1 +1 @@
+-KERNEL=="kvm", NAME="%k", GROUP="kvm", MODE="0660"
++KERNEL=="kvm", GROUP="@GROUP@", MODE="0660"
diff --git a/system/qemu-kvm/fixup_udev_rules_file.diff b/system/qemu-kvm/fixup_udev_rules_file.diff
deleted file mode 100644
index 4ce2a7fe9b..0000000000
--- a/system/qemu-kvm/fixup_udev_rules_file.diff
+++ /dev/null
@@ -1,6 +0,0 @@
-diff -Nur qemu-kvm-0.12.3.orig//kvm/scripts/65-kvm.rules qemu-kvm-0.12.3/kvm/scripts/65-kvm.rules
---- qemu-kvm-0.12.3.orig//kvm/scripts/65-kvm.rules 2010-02-25 20:34:00.000000000 -0600
-+++ qemu-kvm-0.12.3/kvm/scripts/65-kvm.rules 2010-06-05 01:06:04.126447475 -0500
-@@ -1 +1 @@
--KERNEL=="kvm", NAME="%k", GROUP="kvm", MODE="0660"
-+KERNEL=="kvm", GROUP="kvm", MODE="0660"
diff --git a/system/qemu-kvm/qemu-kvm.SlackBuild b/system/qemu-kvm/qemu-kvm.SlackBuild
index 463dee3125..46ec409263 100644
--- a/system/qemu-kvm/qemu-kvm.SlackBuild
+++ b/system/qemu-kvm/qemu-kvm.SlackBuild
@@ -22,10 +22,20 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=qemu-kvm
-VERSION=${VERSION:-0.12.3}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-0.12.4}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+KVMGROUP=${KVMGROUP:-kvm}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
# The script is set to build all possible Linux Target CPU emulators by default.
# Available Linux Target CPUs for full system emulation are:
# i386 x86_64 arm cris m68k microblaze mips mipsel mips64 mips64el
@@ -40,16 +50,6 @@ TAG=${TAG:-_SBo}
# providing full system emulation supporting Linux, BSD and Windows guests.
BUILD_ARCH=""
-# Automatically determine the architecture we're building on:
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i486 ;;
- arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) ARCH=$( uname -m ) ;;
- esac
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -64,9 +64,6 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
fi
# Needed to build man pages if build is ran from su
@@ -87,8 +84,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Remove the unneeded (and warning-inducing) NAME= setting from the udev rules
-patch -p1 < $CWD/fixup_udev_rules_file.diff
+# Fixup the udev rules file to remove the NAME="%k" and allow for a different
+# group to be used (no real need to require a kvm group)
+patch -p1 < $CWD/fixup_udev_rules.patch
# This translates the possible targets into the correct format for configure
TARGETS="$(for i in $BUILD_ARCH ; do printf "$i-softmmu " ; done)"
@@ -111,16 +109,15 @@ make install \
cp -a kvm/kvm_stat $PKG/usr/bin/
mkdir -p $PKG/lib/udev/rules.d/
-cat kvm/scripts/65-kvm.rules > $PKG/lib/udev/rules.d/65-kvm.rules
+sed "s/@GROUP@/$KVMGROUP/" kvm/scripts/65-kvm.rules \
+ > $PKG/lib/udev/rules.d/65-kvm.rules
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- find . -type f -exec chmod 0644 {} \;
- for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-)
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+find $PKG/usr/man -type f -exec chmod 0644 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a kvm/scripts $PKG/usr/doc/$PRGNAM-$VERSION/
diff --git a/system/qemu-kvm/qemu-kvm.info b/system/qemu-kvm/qemu-kvm.info
index 8a7e2a882c..f73f7c71d1 100644
--- a/system/qemu-kvm/qemu-kvm.info
+++ b/system/qemu-kvm/qemu-kvm.info
@@ -1,10 +1,10 @@
PRGNAM="qemu-kvm"
-VERSION="0.12.3"
+VERSION="0.12.4"
HOMEPAGE="http://www.linux-kvm.org/page/Main_Page"
-DOWNLOAD="http://downloads.sourceforge.net/project/kvm/qemu-kvm/0.12.3/qemu-kvm-0.12.3.tar.gz"
-MD5SUM="ab484975004f66fb48cb5589bd9b9dcb"
+DOWNLOAD="http://downloads.sourceforge.net/project/kvm/qemu-kvm/0.12.4/qemu-kvm-0.12.4.tar.gz"
+MD5SUM="1c48b94f58403fb24247f9b5fb6abb9f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Stu Miller"
EMAIL="slackbuilds@go4it2day.com"
-APPROVED="dsomero"
+APPROVED="rworkman"