summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorajs1242015-08-07 15:58:34 +0200
committerajs1242015-08-07 15:59:57 +0200
commit98e46f9cbfd0ae48ec46576a56abed21b3c5ab81 (patch)
treec874db7f03023078fca636f62173a7c96f080e16
parentf175096d9f91db6dc96cba58e5786c51f1e99dbe (diff)
downloadaur-98e46f9cbfd0ae48ec46576a56abed21b3c5ab81.tar.gz
Remodel PKGBUILD and surrounding files after [extra] package
- split package - disabled spice for now, since it doesn't compile for some reason
-rw-r--r--.SRCINFO118
-rw-r--r--65-kvm.rules1
-rw-r--r--PKGBUILD161
-rw-r--r--qemu.install24
-rw-r--r--qemu.sysusers1
5 files changed, 231 insertions, 74 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5159cbecb487..f8a90f11a395 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,56 @@
pkgbase = qemu-git
- pkgdesc = A generic and open source processor emulator which achieves a good emulation speed by using dynamic translation. Git version.
- pkgver = 2.4.r39316.gb041114
+ pkgver = 2.4.r40384.g2d69736
pkgrel = 1
- url = http://wiki.qemu.org/Index.html
- install = qemu.install
+ url = http://wiki.qemu.org/
arch = i686
arch = x86_64
license = GPL2
- license = LGPL2
+ license = LGPL2.1
+ makedepends = pixman
+ makedepends = libjpeg
+ makedepends = libpng
+ makedepends = sdl
+ makedepends = alsa-lib
+ makedepends = nss
+ makedepends = glib2
+ makedepends = gnutls
+ makedepends = bluez-libs
+ makedepends = vde2
+ makedepends = util-linux
+ makedepends = curl
+ makedepends = libsasl
+ makedepends = libgl
+ makedepends = libpulse
+ makedepends = libcap-ng
+ makedepends = libaio
+ makedepends = libseccomp
+ makedepends = libiscsi
+ makedepends = python2
+ makedepends = usbredir
+ makedepends = ceph
+ makedepends = glusterfs
+ makedepends = libssh2
+ makedepends = lzo
+ makedepends = snappy
+ makedepends = dtc
+ makedepends = libepoxy
makedepends = git
makedepends = texi2html
makedepends = perl
- makedepends = python2
- makedepends = spice-protocol
+ makedepends = numactl
+ source = git://git.qemu.org/qemu.git
+ source = 65-kvm.rules
+ source = qemu.install
+ source = qemu.sysusers
+ sha256sums = SKIP
+ sha256sums = 60dcde5002c7c0b983952746e6fb2cf06d6c5b425d64f340f819356e561e7fc7
+ sha256sums = 0df69a77645c9a05f98635773666b6212084525d7801ef8382242b06baebe5aa
+ sha256sums = dd43e2ef062b071a0b9d0d5ea54737f41600ca8a84a8aefbebb1ff09f978acfb
+
+pkgname = qemu-git
+ pkgdesc = A generic and open source processor emulator which achieves a good emulation speed by using dynamic translation. Git version.
+ install = qemu.install
+ depends = glibc
depends = pixman
depends = libjpeg
depends = libpng
@@ -20,44 +58,80 @@ pkgbase = qemu-git
depends = alsa-lib
depends = nss
depends = glib2
- depends = gnutls>=2.4.1
+ depends = gnutls
depends = bluez-libs
depends = vde2
depends = util-linux
- depends = curl
depends = libsasl
depends = libgl
- depends = libpulse
+ depends = seabios
+ depends = libcap
depends = libcap-ng
depends = libaio
depends = libseccomp
- depends = libiscsi
- depends = spice
+ depends = libcacard
depends = usbredir
- depends = dtc
+ depends = lzo
depends = snappy
+ depends = gcc-libs
+ depends = zlib
+ depends = bzip2
+ depends = nspr
+ depends = ncurses
+ depends = libx11
+ depends = libusb
+ depends = libpulse
+ depends = libssh2
+ depends = curl
optdepends = ovmf: Tianocore UEFI firmware for qemu
+ optdepends = samba: SMB/CIFS server support
+ optdepends = qemu-block-iscsi: iSCSI block support
+ optdepends = qemu-block-rbd: RBD block support
+ optdepends = qemu-block-gluster: glusterfs block support
provides = qemu
provides = qemu-kvm
provides = qemu-spice
- provides = libcacard
provides = seabios
provides = seabios-git
conflicts = qemu
conflicts = kvm
conflicts = kvm-git
conflicts = qemu-spice
- conflicts = libcacard
conflicts = seabios
conflicts = seabios-git
options = !strip
backup = etc/qemu/target-x86_64.conf
- source = git://git.qemu.org/qemu.git
- source = 65-kvm.rules
- source = qemu.install
- sha256sums = SKIP
- sha256sums = 9c8a15c34461a9481a34ca9e0ab4ae3825eabe8fd863227f2445325413cd755c
- sha256sums = 9970c3050e8dc6153c5955d018d114f9fcbc091843b85f9e7b247eb28f09ba10
-pkgname = qemu-git
+pkgname = qemu-block-iscsi-git
+ pkgdesc = QEMU iSCSI block module. Git version.
+ depends = glibc
+ depends = glib2
+ depends = libiscsi
+ provides = qemu-block-iscsi
+ conflicts = qemu-block-iscsi
+
+pkgname = qemu-block-rbd-git
+ pkgdesc = QEMU RBD block module. Git version.
+ depends = glibc
+ depends = glib2
+ depends = ceph
+ provides = qemu-block-rbd
+ conflicts = qemu-block-rbd
+
+pkgname = qemu-block-gluster-git
+ pkgdesc = QEMU GlusterFS block module. Git version.
+ depends = glibc
+ depends = glib2
+ depends = glusterfs
+ provides = qemu-block-gluster
+ conflicts = qemu-block-gluster
+
+pkgname = libcacard-git
+ pkgdesc = Common Access Card (CAC) Emulation. Git version.
+ depends = glibc
+ depends = nss
+ depends = nspr
+ depends = glib2
+ provides = libcacard
+ conflicts = libcacard
diff --git a/65-kvm.rules b/65-kvm.rules
index 90913c36830b..569ded9f972f 100644
--- a/65-kvm.rules
+++ b/65-kvm.rules
@@ -1,3 +1,2 @@
KERNEL=="kvm", GROUP="kvm", MODE="0660"
KERNEL=="vhost-net", GROUP="kvm", MODE="0660", TAG+="uaccess", OPTIONS+="static_node=vhost-net"
-
diff --git a/PKGBUILD b/PKGBUILD
index 253c657cd51a..b35b0b184f65 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,32 +2,34 @@
# Contributor: Devin Cofer <ranguvar{AT]archlinux[DOT}us>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Frederic Bezies <fredbezies@gmail.com>
+# Contributor: Sébastien "Seblu" Luttringer <seblu@seblu.net>
-pkgname=qemu-git
+pkgbase=qemu-git
_gitname=qemu
-pkgver=2.4.r39316.gb041114
+pkgname=('qemu-git'
+ 'qemu-block-iscsi-git'
+ 'qemu-block-rbd-git'
+ 'qemu-block-gluster-git'
+ 'libcacard-git')
+pkgver=2.4.r40384.g2d69736
pkgrel=1
-pkgdesc="A generic and open source processor emulator which achieves a good emulation speed by using dynamic translation. Git version."
arch=('i686' 'x86_64')
-license=('GPL2' 'LGPL2')
-url="http://wiki.qemu.org/Index.html"
-depends=('pixman' 'libjpeg' 'libpng' 'sdl' 'alsa-lib' 'nss' 'glib2'
- 'gnutls>=2.4.1' 'bluez-libs' 'vde2' 'util-linux' 'curl' 'libsasl'
- 'libgl' 'libpulse' 'libcap-ng' 'libaio' 'libseccomp' 'numactl'
- 'libiscsi' 'spice' 'usbredir' 'dtc' 'snappy' 'ceph' 'lzo' 'libepoxy')
-makedepends=('git' 'texi2html' 'perl' 'python2' 'spice-protocol')
-optdepends=('ovmf: Tianocore UEFI firmware for qemu')
-conflicts=('qemu' 'kvm' 'kvm-git' 'qemu-spice' 'libcacard' 'seabios' 'seabios-git')
-provides=('qemu' 'qemu-kvm' 'qemu-spice' 'libcacard' 'seabios' 'seabios-git')
-backup=('etc/qemu/target-x86_64.conf')
-source=('git://git.qemu.org/qemu.git'
- '65-kvm.rules'
- 'qemu.install')
+license=('GPL2' 'LGPL2.1')
+url='http://wiki.qemu.org/'
+makedepends=('pixman' 'libjpeg' 'libpng' 'sdl' 'alsa-lib' 'nss' 'glib2'
+ 'gnutls' 'bluez-libs' 'vde2' 'util-linux' 'curl' 'libsasl'
+ 'libgl' 'libpulse' 'libcap-ng' 'libaio' 'libseccomp'
+ 'libiscsi' 'python2'
+ 'usbredir' 'ceph' 'glusterfs' 'libssh2' 'lzo' 'snappy'
+ 'dtc' 'libepoxy' 'git' 'texi2html' 'perl' 'numactl')
+source=(git://git.qemu.org/qemu.git
+ 65-kvm.rules
+ qemu.install
+ qemu.sysusers)
sha256sums=('SKIP'
- '9c8a15c34461a9481a34ca9e0ab4ae3825eabe8fd863227f2445325413cd755c'
- '9970c3050e8dc6153c5955d018d114f9fcbc091843b85f9e7b247eb28f09ba10')
-install='qemu.install'
-options=('!strip')
+ '60dcde5002c7c0b983952746e6fb2cf06d6c5b425d64f340f819356e561e7fc7'
+ '0df69a77645c9a05f98635773666b6212084525d7801ef8382242b06baebe5aa'
+ 'dd43e2ef062b071a0b9d0d5ea54737f41600ca8a84a8aefbebb1ff09f978acfb')
pkgver() {
cd "${srcdir}/$_gitname"
@@ -35,31 +37,114 @@ pkgver() {
}
build() {
- cd $_gitname
- # qemu vs. make 4 == bad
- export ARFLAGS="rv"
- # http://permalink.gmane.org/gmane.comp.emulators.qemu/238740
- # gtk gui breaks keymappings at the moment
- ./configure --prefix=/usr --sysconfdir=/etc --audio-drv-list='pa alsa sdl' \
+ cd $_gitname
+ # qemu vs. make 4 == bad
+ export ARFLAGS="rv"
+ # http://permalink.gmane.org/gmane.comp.emulators.qemu/238740
+ export CFLAGS+=' -fPIC'
+ # gtk gui breaks keymappings at the moment
+ ./configure --prefix=/usr --sysconfdir=/etc --audio-drv-list='pa alsa sdl' \
--python=/usr/bin/python2 --smbd=/usr/bin/smbd \
--enable-docs --libexecdir=/usr/lib/qemu \
--disable-gtk --enable-linux-aio --enable-seccomp \
- --enable-spice --localstatedir=/var --disable-werror
- make V=99
+ --localstatedir=/var --enable-tpm \
+ --enable-modules --enable-{rbd,glusterfs,libiscsi,curl}
+ make V=99
}
-package() {
- cd $_gitname
+package_qemu-git() {
+ pkgdesc='A generic and open source processor emulator which achieves a good emulation speed by using dynamic translation. Git version.'
+ depends=('glibc' 'pixman' 'libjpeg' 'libpng' 'sdl' 'alsa-lib' 'nss' 'glib2'
+ 'gnutls' 'bluez-libs' 'vde2' 'util-linux' 'libsasl' 'libgl'
+ 'seabios' 'libcap' 'libcap-ng' 'libaio' 'libseccomp' 'libcacard'
+ 'usbredir' 'lzo' 'snappy' 'gcc-libs' 'zlib' 'bzip2' 'nspr'
+ 'ncurses' 'libx11' 'libusb' 'libpulse' 'libssh2' 'curl')
+ backup=('etc/qemu/target-x86_64.conf')
+ optdepends=('ovmf: Tianocore UEFI firmware for qemu'
+ 'samba: SMB/CIFS server support'
+ 'qemu-block-iscsi: iSCSI block support'
+ 'qemu-block-rbd: RBD block support'
+ 'qemu-block-gluster: glusterfs block support')
+ conflicts=('qemu' 'kvm' 'kvm-git' 'qemu-spice' 'seabios' 'seabios-git')
+provides=('qemu' 'qemu-kvm' 'qemu-spice' 'seabios' 'seabios-git')
+
+ options=(!strip)
+ install=qemu.install
- make DESTDIR="${pkgdir}" libexecdir="/usr/lib/qemu" install
+ make -C $_gitname DESTDIR="${pkgdir}" libexecdir="/usr/lib/qemu" install
+
+ cd "${pkgdir}"
# remove conflicting /var/run directory
- rm -r "${pkgdir}/var"
- install -D -m644 "${srcdir}/65-kvm.rules" \
- "${pkgdir}/usr/lib/udev/rules.d/65-kvm.rules"
+ rm -r var
+
+ # systemd stuff
+ install -D -m644 "${srcdir}/65-kvm.rules" usr/lib/udev/rules.d/65-kvm.rules
+ install -D -m644 "${srcdir}/qemu.sysusers" usr/lib/sysusers.d/qemu.conf
+
# bridge_helper needs suid
# https://bugs.archlinux.org/task/32565
- chmod u+s "${pkgdir}/usr/lib/qemu/qemu-bridge-helper"
+ chmod u+s usr/lib/qemu/qemu-bridge-helper
+
# add sample config
- mkdir -p ${pkgdir}/etc/qemu/
- echo "allow br0" > ${pkgdir}/etc/qemu/bridge.conf.sample
+ echo 'allow br0' > etc/qemu/bridge.conf.sample
+
+ # manual striping in scripts directory
+ find usr/src/linux-${_kernver}/scripts -type f -perm -u+w 2>/dev/null|while read binary ; do
+ case "$(file -bi "$binary")" in
+ *application/x-executable*) # Binaries
+ /usr/bin/strip $STRIP_BINARIES "$binary";;
+ esac
+ done
+
+ # remove libcacard files
+ rm -r usr/include/cacard
+ rm usr/lib/libcacard*
+ rm usr/lib/pkgconfig/libcacard.pc
+ rm usr/bin/vscclient
+
+ # remove splitted block modules
+ rm usr/lib/qemu/block-{iscsi,rbd,gluster}.so
}
+
+package_libcacard-git() {
+ pkgdesc='Common Access Card (CAC) Emulation. Git version.'
+ depends=('glibc' 'nss' 'nspr' 'glib2')
+ conflicts=(libcacard)
+ provides=(libcacard)
+
+ cd "${pkgdir}"
+ install -d usr/{bin,lib/pkgconfig,include/cacard}
+ cp -a "${srcdir}"/qemu-${pkgver}/libcacard/*.h usr/include/cacard/
+ cp -a "${srcdir}"/qemu-${pkgver}/libcacard.pc usr/lib/pkgconfig/
+ cp -a "${srcdir}"/qemu-${pkgver}/.libs/vscclient usr/bin/
+ cp -a "${srcdir}"/qemu-${pkgver}/.libs/libcacard.so* usr/lib/
+}
+
+package_qemu-block-iscsi-git() {
+ pkgdesc='QEMU iSCSI block module. Git version.'
+ depends=('glibc' 'glib2' 'libiscsi')
+ conflicts=(qemu-block-iscsi)
+ provides=(qemu-block-iscsi)
+
+ install -D qemu-${pkgver}/block-iscsi.so "${pkgdir}"/usr/lib/qemu/block-iscsi.so
+}
+
+package_qemu-block-rbd-git() {
+ pkgdesc='QEMU RBD block module. Git version.'
+ depends=('glibc' 'glib2' 'ceph')
+ conflicts=(qemu-block-rbd)
+ provides=(qemu-block-rbd)
+
+ install -D qemu-${pkgver}/block-rbd.so "${pkgdir}"/usr/lib/qemu/block-rbd.so
+}
+
+package_qemu-block-gluster-git() {
+ pkgdesc='QEMU GlusterFS block module. Git version.'
+ depends=('glibc' 'glib2' 'glusterfs')
+ conflicts=(qemu-block-gluster)
+ provides=(qemu-block-gluster)
+
+ install -D qemu-${pkgver}/block-gluster.so "${pkgdir}"/usr/lib/qemu/block-gluster.so
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/qemu.install b/qemu.install
index 7a384814cb3b..be5b0184ad2f 100644
--- a/qemu.install
+++ b/qemu.install
@@ -1,26 +1,24 @@
-# kvm: the new package version
+# Arg 1: the new package version
post_install() {
- #
- groupadd kvm -f -g 78
- echo "As of revision 31714, there is no need to add -bios /usr/share/qemu/bios.bin"
- echo "anymore to your qemu command line"
+ # create kvm group
+ systemd-sysusers qemu.conf
+
+ # retrigger events on modules files when already loaded
+ [[ -e /dev/kvm ]] && udevadm trigger /dev/kvm
+ [[ -e /dev/vhost-net ]] && udevadm trigger /dev/vhost-net
}
+# arg 1: the new package version
+# arg 2: the old package version
post_upgrade() {
- if [ "$(vercmp $2 0.11)" -lt 0 ]; then
+ if (( "$(vercmp $2 0.11)" < 0 )); then
echo "With the release of qemu and qemu-kvm 0.12.X, the kqemu kernel module"
echo "is no longer supported and will be removed from the repositories. You"
echo "can safely uninstall it from your system."
fi
- if [ "$(vercmp $2 1.3.1)" -lt 0 ]; then
+ if (( "$(vercmp $2 1.3.1)" < 0 )); then
echo "With the release of qemu 1.3.0, qemu-kvm binary is removed."
echo "You need to change the emulator path, if you use libvirt by using:"
echo "'virsh edit <vm-name>'"
fi
}
-
-post_remove() {
- #
- groupdel kvm
-}
-
diff --git a/qemu.sysusers b/qemu.sysusers
new file mode 100644
index 000000000000..4c03e8242d92
--- /dev/null
+++ b/qemu.sysusers
@@ -0,0 +1 @@
+g kvm 78 -