[arch-commits] Commit in qemu/trunk (PKGBUILD qemu.install)
Sébastien Luttringer
seblu at archlinux.org
Mon Aug 3 11:06:51 UTC 2015
Date: Monday, August 3, 2015 @ 13:06:51
Author: seblu
Revision: 242952
upgpkg: qemu 2.3.0-6
- fix FS#45830
- fix FS#45819
- fix FS#45821
- fix FS#45846
- fix path quoting
- cleanup libcacard dependencies
- clean qemu deps
- move to systemd-sysusers
Modified:
qemu/trunk/PKGBUILD
qemu/trunk/qemu.install
--------------+
PKGBUILD | 136 ++++++++++++++++++++++++++++++++++++---------------------
qemu.install | 17 ++++---
2 files changed, 98 insertions(+), 55 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2015-08-03 07:13:46 UTC (rev 242951)
+++ PKGBUILD 2015-08-03 11:06:51 UTC (rev 242952)
@@ -1,17 +1,23 @@
# $Id$
# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
-pkgname=('qemu' 'libcacard')
+# Contributor: Sébastien "Seblu" Luttringer <seblu at seblu.net>
+
+pkgbase=qemu
+pkgname=('qemu'
+ 'qemu-block-iscsi'
+ 'qemu-block-rbd'
+ 'qemu-block-gluster'
+ 'libcacard')
pkgver=2.3.0
-pkgrel=5
+pkgrel=6
arch=('i686' 'x86_64')
license=('GPL2' 'LGPL2.1')
-url="http://wiki.qemu.org/Index.html"
+url='http://wiki.qemu.org/'
makedepends=('pixman' 'libjpeg' 'libpng' 'sdl' 'alsa-lib' 'nss' 'glib2'
'gnutls' 'bluez-libs' 'vde2' 'util-linux' 'curl' 'libsasl'
'libgl' 'libpulse' 'seabios' 'libcap-ng' 'libaio' 'libseccomp'
'libiscsi' 'libcacard' 'spice' 'spice-protocol' 'python2'
- 'usbredir' 'ceph' 'glusterfs' 'libssh2' 'lzo')
-options=(!strip)
+ 'usbredir' 'ceph' 'glusterfs' 'libssh2' 'lzo' 'snappy')
source=(http://wiki.qemu.org/download/${pkgname}-${pkgver}.tar.bz2
CVE-2015-3456.patch
CVE-2015-5154.patch
@@ -28,7 +34,7 @@
prepare() {
for _p in *.patch; do
[[ -e "$_p" ]] || continue
- msg2 "Patching $_p"
+ msg2 "Patching $_p"
patch -p1 -d ${pkgname}-${pkgver} < "$_p"
done
}
@@ -35,7 +41,7 @@
build ()
{
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd ${pkgname}-${pkgver}
# qemu vs. make 4 == bad
export ARFLAGS="rv"
# http://permalink.gmane.org/gmane.comp.emulators.qemu/238740
@@ -52,66 +58,98 @@
}
package_qemu() {
- pkgdesc="A generic and open source processor emulator which achieves a good emulation speed by using dynamic translation."
- depends=('pixman' 'libjpeg' 'libpng' 'sdl' 'alsa-lib' 'nss' 'glib2'
- 'gnutls' 'bluez-libs' 'vde2' 'util-linux' 'curl' 'libsasl'
- 'libgl' 'libpulse' 'seabios' 'libcap-ng' 'libaio' 'libseccomp'
- 'libcacard' 'spice' 'usbredir' 'lzo')
+ pkgdesc='A generic and open source processor emulator which achieves a good emulation speed by using dynamic translation'
+ depends=('glibc' 'pixman' 'libjpeg' 'libpng' 'sdl' 'alsa-lib' 'nss' 'glib2'
+ 'gnutls' 'bluez-libs' 'vde2' 'util-linux' 'libsasl' 'mesa-libgl'
+ 'seabios' 'libcap' 'libcap-ng' 'libaio' 'libseccomp' 'libcacard'
+ 'spice' 'usbredir' 'lzo' 'snappy' 'gcc-libs' 'zlib' 'bzip2' 'nspr'
+ 'ncurses' 'libx11' 'libusb' 'libpulse')
backup=('etc/qemu/target-x86_64.conf')
replaces=('qemu-kvm')
- optdepends=('samba: for SMB server support'
- 'libssh2: for remote disks over ssh support'
- 'curl: for remote disks over http/ftp support'
- 'libiscsi: for iSCSI support'
- 'ceph: for RDB support'
- 'glusterfs: for glusterfs support')
+ optdepends=('samba: SMB/CIFS server support'
+ 'qemu-block-iscsi: iSCSI block support'
+ 'qemu-block-rbd: RDB block support'
+ 'qemu-block-gluster: glusterfs block support')
+ options=(!strip)
install=qemu.install
- cd "${srcdir}/${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}" libexecdir="/usr/lib/qemu" install
+
+ make -C ${pkgname}-${pkgver} DESTDIR="${pkgdir}" libexecdir="/usr/lib/qemu" install
+
+ cd "${pkgdir}"
+
# provided by seabios package
- rm "${pkgdir}/usr/share/qemu/bios.bin"
- rm "${pkgdir}/usr/share/qemu/acpi-dsdt.aml"
- rm "${pkgdir}/usr/share/qemu/q35-acpi-dsdt.aml"
- rm "${pkgdir}/usr/share/qemu/bios-256k.bin"
- rm "${pkgdir}/usr/share/qemu/vgabios-cirrus.bin"
- rm "${pkgdir}/usr/share/qemu/vgabios-qxl.bin"
- rm "${pkgdir}/usr/share/qemu/vgabios-stdvga.bin"
- rm "${pkgdir}/usr/share/qemu/vgabios-vmware.bin"
+ rm usr/share/qemu/bios.bin
+ rm usr/share/qemu/acpi-dsdt.aml
+ rm usr/share/qemu/q35-acpi-dsdt.aml
+ rm usr/share/qemu/bios-256k.bin
+ rm usr/share/qemu/vgabios-cirrus.bin
+ rm usr/share/qemu/vgabios-qxl.bin
+ rm usr/share/qemu/vgabios-stdvga.bin
+ rm usr/share/qemu/vgabios-vmware.bin
# 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
- echo "allow br0" > ${pkgdir}/etc/qemu/bridge.conf.sample
- # strip scripts directory
- find "${pkgdir}/usr/src/linux-${_kernver}/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do
+ 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 -rf ${pkgdir}/usr/include/cacard
- rm -rf ${pkgdir}/usr/lib/libcacard*
- rm -rf ${pkgdir}/usr/lib/pkgconfig/libcacard.pc
- rm -rf ${pkgdir}/usr/bin/vscclient
+ rm -r usr/include/cacard
+ rm usr/lib/libcacard*
+ rm usr/lib/pkgconfig/libcacard.pc
+ rm usr/bin/vscclient
+
+ # remove splited block modules
+ rm usr/lib/qemu/block-{iscsi,rbd,gluster}.so
}
package_libcacard() {
- pkgdesc="Common Access Card (CAC) Emulation"
- options=('strip')
- depends=('nss' 'libaio' 'libcap-ng' 'libiscsi' 'curl' 'vde2' 'glib2')
- mkdir -p ${pkgdir}/usr/bin
- mkdir -p ${pkgdir}/usr/lib/pkgconfig
- mkdir -p ${pkgdir}/usr/include/cacard
- cp -a ${srcdir}/qemu-${pkgver}/libcacard/*.h ${pkgdir}/usr/include/cacard/
- cp -a ${srcdir}/qemu-${pkgver}/.libs/libcacard.so* ${pkgdir}/usr/lib/
- cp -a ${srcdir}/qemu-${pkgver}/libcacard.pc ${pkgdir}/usr/lib/pkgconfig/
- cp -a ${srcdir}/qemu-${pkgver}/.libs/vscclient ${pkgdir}/usr/bin/
+ pkgdesc='Common Access Card (CAC) Emulation'
+ depends=('glibc' 'nss' 'nspr' 'glib2')
+
+ cd "${pkgdir}"
+ install -d usr/{bin,lib/pkgconfig,include/cacard}
+ install "${srcdir}"/qemu-${pkgver}/libcacard/*.h usr/include/cacard/
+ install "${srcdir}"/qemu-${pkgver}/.libs/libcacard.so* usr/lib/
+ install "${srcdir}"/qemu-${pkgver}/libcacard.pc usr/lib/pkgconfig/
+ install "${srcdir}"/qemu-${pkgver}/.libs/vscclient usr/bin/
}
+package_qemu-block-iscsi() {
+ pkgdesc='Qemu iSCSI block module'
+ depends=('glibc' 'glib2' 'libiscsi')
+
+ install -D qemu-${pkgver}/block-iscsi.so "${pkgdir}"/usr/lib/qemu/block-iscsi.so
+}
+
+package_qemu-block-rbd() {
+ pkgdesc='Qemu RBD block module'
+ depends=('glibc' 'glib2' 'ceph')
+
+ install -D qemu-${pkgver}/block-rbd.so "${pkgdir}"/usr/lib/qemu/block-rbd.so
+}
+
+package_qemu-block-gluster() {
+ pkgdesc='Qemu GlusterFS block module'
+ depends=('glibc' 'glib2' 'glusterfs')
+
+ install -D qemu-${pkgver}/block-gluster.so "${pkgdir}"/usr/lib/qemu/block-gluster.so
+}
+
# vim:set ts=2 sw=2 et:
Modified: qemu.install
===================================================================
--- qemu.install 2015-08-03 07:13:46 UTC (rev 242951)
+++ qemu.install 2015-08-03 11:06:51 UTC (rev 242952)
@@ -1,19 +1,24 @@
-# kvm: the new package version
+# Arg 1: the new package version
post_install() {
- #
- groupadd kvm -f -g 78
+ # 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
}
-
More information about the arch-commits
mailing list