[arch-commits] Commit in qemu/repos (12 files)

Tobias Powalowski tpowa at archlinux.org
Sat Sep 3 09:06:39 UTC 2016


    Date: Saturday, September 3, 2016 @ 09:06:39
  Author: tpowa
Revision: 275709

archrelease: copy trunk to testing-i686, testing-x86_64

Added:
  qemu/repos/testing-i686/
  qemu/repos/testing-i686/65-kvm.rules
    (from rev 275708, qemu/trunk/65-kvm.rules)
  qemu/repos/testing-i686/PKGBUILD
    (from rev 275708, qemu/trunk/PKGBUILD)
  qemu/repos/testing-i686/qemu-ga.service
    (from rev 275708, qemu/trunk/qemu-ga.service)
  qemu/repos/testing-i686/qemu.install
    (from rev 275708, qemu/trunk/qemu.install)
  qemu/repos/testing-i686/qemu.sysusers
    (from rev 275708, qemu/trunk/qemu.sysusers)
  qemu/repos/testing-x86_64/
  qemu/repos/testing-x86_64/65-kvm.rules
    (from rev 275708, qemu/trunk/65-kvm.rules)
  qemu/repos/testing-x86_64/PKGBUILD
    (from rev 275708, qemu/trunk/PKGBUILD)
  qemu/repos/testing-x86_64/qemu-ga.service
    (from rev 275708, qemu/trunk/qemu-ga.service)
  qemu/repos/testing-x86_64/qemu.install
    (from rev 275708, qemu/trunk/qemu.install)
  qemu/repos/testing-x86_64/qemu.sysusers
    (from rev 275708, qemu/trunk/qemu.sysusers)

--------------------------------+
 testing-i686/65-kvm.rules      |    2 
 testing-i686/PKGBUILD          |  209 +++++++++++++++++++++++++++++++++++++++
 testing-i686/qemu-ga.service   |    8 +
 testing-i686/qemu.install      |   11 ++
 testing-i686/qemu.sysusers     |    1 
 testing-x86_64/65-kvm.rules    |    2 
 testing-x86_64/PKGBUILD        |  209 +++++++++++++++++++++++++++++++++++++++
 testing-x86_64/qemu-ga.service |    8 +
 testing-x86_64/qemu.install    |   11 ++
 testing-x86_64/qemu.sysusers   |    1 
 10 files changed, 462 insertions(+)

Copied: qemu/repos/testing-i686/65-kvm.rules (from rev 275708, qemu/trunk/65-kvm.rules)
===================================================================
--- testing-i686/65-kvm.rules	                        (rev 0)
+++ testing-i686/65-kvm.rules	2016-09-03 09:06:39 UTC (rev 275709)
@@ -0,0 +1,2 @@
+KERNEL=="kvm", GROUP="kvm", MODE="0660"
+KERNEL=="vhost-net", GROUP="kvm", MODE="0660", TAG+="uaccess", OPTIONS+="static_node=vhost-net"

Copied: qemu/repos/testing-i686/PKGBUILD (from rev 275708, qemu/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2016-09-03 09:06:39 UTC (rev 275709)
@@ -0,0 +1,209 @@
+# $Id$
+# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
+# Contributor: Sébastien "Seblu" Luttringer <seblu at seblu.net>
+
+pkgbase=qemu
+pkgname=(qemu qemu-headless qemu-arch-extra
+         qemu-block-{iscsi,rbd,gluster} qemu-guest-agent)
+pkgdesc="A generic and open source machine emulator and virtualizer"
+pkgver=2.7.0
+pkgrel=1
+arch=(i686 x86_64)
+license=(GPL2 LGPL2.1)
+url="http://wiki.qemu.org/"
+_headlessdeps=(seabios gnutls libpng libaio numactl jemalloc xfsprogs libnfs
+               lzo snappy curl vde2 libcap-ng spice usbredir)
+depends=(virglrenderer sdl2 vte3 brltty "${_headlessdeps[@]}")
+makedepends=(spice-protocol python2 ceph libiscsi glusterfs)
+source=("$url/download/${pkgname}-${pkgver}.tar.bz2"
+        qemu.sysusers
+        qemu-ga.service
+        65-kvm.rules)
+sha256sums=('326e739506ba690daf69fc17bd3913a6c313d9928d743bd8eddb82f403f81e53'
+            'dd43e2ef062b071a0b9d0d5ea54737f41600ca8a84a8aefbebb1ff09f978acfb'
+            '0b4f3283973bb3bc876735f051d8eaab68f0065502a3a5012141fad193538ea1'
+            '60dcde5002c7c0b983952746e6fb2cf06d6c5b425d64f340f819356e561e7fc7')
+
+case $CARCH in
+  i?86) _corearch=i386 ;;
+  x86_64) _corearch=x86_64 ;;
+esac
+
+prepare() {
+  mkdir build-{full,headless}
+  mkdir -p extra-arch-{full,headless}/usr/{bin,share/qemu}
+
+  cd ${pkgname}-${pkgver}
+  sed -i 's/vte-2\.90/vte-2.91/g' configure
+}
+
+build() {
+  _build full \
+    --audio-drv-list="pa alsa sdl"
+
+  _build headless \
+    --target-list=${_corearch}-softmmu \
+    --audio-drv-list= \
+    --disable-bluez \
+    --disable-sdl \
+    --disable-gtk \
+    --disable-vte \
+    --disable-opengl \
+    --disable-virglrenderer \
+    --disable-brlapi
+}
+
+_build() (
+  cd build-$1
+
+  # qemu vs. make 4 == bad
+  export ARFLAGS=rv
+
+  # http://permalink.gmane.org/gmane.comp.emulators.qemu/238740
+  export CFLAGS+=" -fPIC"
+
+  ../${pkgname}-${pkgver}/configure \
+    --prefix=/usr \
+    --sysconfdir=/etc \
+    --localstatedir=/var \
+    --libexecdir=/usr/lib/qemu \
+    --python=/usr/bin/python2 \
+    --smbd=/usr/bin/smbd \
+    --with-gtkabi=3.0 \
+    --with-sdlabi=2.0 \
+    --enable-modules \
+    --enable-jemalloc \
+    "${@:2}"
+
+  make
+)
+
+package_qemu() {
+  provides=(qemu-headless)
+  conflicts=(qemu-headless)
+  replaces=(qemu-kvm)
+
+  _package full
+}
+
+package_qemu-headless() {
+  pkgdesc="QEMU without graphical user interface"
+  depends=("${_headlessdeps[@]}")
+
+  _package headless
+}
+
+_package() {
+  optdepends=('samba: SMB/CIFS server support'
+              'qemu-arch-extra: extra architectures support'
+              'qemu-block-iscsi: iSCSI block support'
+              'qemu-block-rbd: RBD block support'
+              'qemu-block-gluster: glusterfs block support')
+  install=qemu.install
+  options=(!strip)
+
+  make -C build-$1 DESTDIR="$pkgdir" install "${@:2}"
+
+  # systemd stuff
+  install -Dm644 65-kvm.rules "$pkgdir/usr/lib/udev/rules.d/65-kvm.rules"
+  install -Dm644 qemu.sysusers "$pkgdir/usr/lib/sysusers.d/qemu.conf"
+
+  # remove conflicting /var/run directory
+  cd "$pkgdir"
+  rm -r var
+
+  cd usr/lib
+  tidy_strip
+
+  # bridge_helper needs suid
+  # https://bugs.archlinux.org/task/32565
+  chmod u+s qemu/qemu-bridge-helper
+
+  # remove split block modules
+  rm qemu/block-{iscsi,rbd,gluster}.so
+
+  cd ../bin
+  tidy_strip
+
+  # remove extra arch
+  for _bin in qemu-*; do
+    [[ -f $_bin ]] || continue
+
+    case ${_bin#qemu-} in
+      # guest agent
+      ga) rm "$_bin"; continue ;;
+
+      # tools
+      img|io|nbd) continue ;;
+
+      # core emu
+      system-${_corearch}) continue ;;
+    esac
+
+    mv "$_bin" "$srcdir/extra-arch-$1/usr/bin"
+  done
+
+  cd ../share/qemu
+  for _blob in *; do
+    [[ -f $_blob ]] || continue
+
+    case $_blob in
+      # provided by seabios package
+      bios.bin|acpi-dsdt.aml|bios-256k.bin|vgabios-cirrus.bin|vgabios-qxl.bin|\
+      vgabios-stdvga.bin|vgabios-vmware.bin) rm "$_blob"; continue ;;
+
+      # iPXE ROMs
+      efi-*|pxe-*) continue ;;
+
+      # core blobs
+      kvmvapic.bin|linuxboot.bin|multiboot.bin|sgabios.bin|vgabios*) continue ;;
+
+      # Trace events definitions
+      trace-events) continue ;;
+
+      # Logos
+      *.bmp|*.svg) continue ;;
+    esac
+
+    mv "$_blob" "$srcdir/extra-arch-$1/usr/share/qemu"
+  done
+}
+
+package_qemu-arch-extra() {
+  pkgdesc="QEMU for foreign architectures"
+  depends=(qemu)
+  options=(!strip)
+
+  mv extra-arch-full/usr "$pkgdir"
+}
+
+package_qemu-block-iscsi() {
+  pkgdesc="QEMU iSCSI block module"
+  depends=(glib2 libiscsi jemalloc)
+
+  install -D build-full/block-iscsi.so "$pkgdir/usr/lib/qemu/block-iscsi.so"
+}
+
+package_qemu-block-rbd() {
+  pkgdesc="QEMU RBD block module"
+  depends=(glib2 ceph)
+
+  install -D build-full/block-rbd.so "$pkgdir/usr/lib/qemu/block-rbd.so"
+}
+
+package_qemu-block-gluster() {
+  pkgdesc="QEMU GlusterFS block module"
+  depends=(glib2 glusterfs)
+
+  install -D build-full/block-gluster.so "$pkgdir/usr/lib/qemu/block-gluster.so"
+}
+
+package_qemu-guest-agent() {
+  pkgdesc="QEMU Guest Agent"
+  depends=(gcc-libs glib2)
+
+  install -D build-full/qemu-ga "$pkgdir/usr/bin/qemu-ga"
+  install -Dm644 qemu-ga.service "$pkgdir/usr/lib/systemd/system/qemu-ga.service"
+}
+
+# vim:set ts=2 sw=2 et:

Copied: qemu/repos/testing-i686/qemu-ga.service (from rev 275708, qemu/trunk/qemu-ga.service)
===================================================================
--- testing-i686/qemu-ga.service	                        (rev 0)
+++ testing-i686/qemu-ga.service	2016-09-03 09:06:39 UTC (rev 275709)
@@ -0,0 +1,8 @@
+[Unit]
+Description=QEMU Guest Agent
+
+[Service]
+ExecStart=/usr/bin/qemu-ga
+
+[Install]
+WantedBy=multi-user.target

Copied: qemu/repos/testing-i686/qemu.install (from rev 275708, qemu/trunk/qemu.install)
===================================================================
--- testing-i686/qemu.install	                        (rev 0)
+++ testing-i686/qemu.install	2016-09-03 09:06:39 UTC (rev 275709)
@@ -0,0 +1,11 @@
+# Arg 1:  the new package version
+post_install() {
+  # create kvm group
+  systemd-sysusers qemu.conf
+
+  # trigger events on modules files when already loaded
+  for _f in /sys/devices/virtual/misc/{kvm,vhost-net}; do
+    [[ -e "$_f" ]] &&  udevadm trigger "$_f"
+  done
+  :
+}

Copied: qemu/repos/testing-i686/qemu.sysusers (from rev 275708, qemu/trunk/qemu.sysusers)
===================================================================
--- testing-i686/qemu.sysusers	                        (rev 0)
+++ testing-i686/qemu.sysusers	2016-09-03 09:06:39 UTC (rev 275709)
@@ -0,0 +1 @@
+g kvm 78 -

Copied: qemu/repos/testing-x86_64/65-kvm.rules (from rev 275708, qemu/trunk/65-kvm.rules)
===================================================================
--- testing-x86_64/65-kvm.rules	                        (rev 0)
+++ testing-x86_64/65-kvm.rules	2016-09-03 09:06:39 UTC (rev 275709)
@@ -0,0 +1,2 @@
+KERNEL=="kvm", GROUP="kvm", MODE="0660"
+KERNEL=="vhost-net", GROUP="kvm", MODE="0660", TAG+="uaccess", OPTIONS+="static_node=vhost-net"

Copied: qemu/repos/testing-x86_64/PKGBUILD (from rev 275708, qemu/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2016-09-03 09:06:39 UTC (rev 275709)
@@ -0,0 +1,209 @@
+# $Id$
+# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
+# Contributor: Sébastien "Seblu" Luttringer <seblu at seblu.net>
+
+pkgbase=qemu
+pkgname=(qemu qemu-headless qemu-arch-extra
+         qemu-block-{iscsi,rbd,gluster} qemu-guest-agent)
+pkgdesc="A generic and open source machine emulator and virtualizer"
+pkgver=2.7.0
+pkgrel=1
+arch=(i686 x86_64)
+license=(GPL2 LGPL2.1)
+url="http://wiki.qemu.org/"
+_headlessdeps=(seabios gnutls libpng libaio numactl jemalloc xfsprogs libnfs
+               lzo snappy curl vde2 libcap-ng spice usbredir)
+depends=(virglrenderer sdl2 vte3 brltty "${_headlessdeps[@]}")
+makedepends=(spice-protocol python2 ceph libiscsi glusterfs)
+source=("$url/download/${pkgname}-${pkgver}.tar.bz2"
+        qemu.sysusers
+        qemu-ga.service
+        65-kvm.rules)
+sha256sums=('326e739506ba690daf69fc17bd3913a6c313d9928d743bd8eddb82f403f81e53'
+            'dd43e2ef062b071a0b9d0d5ea54737f41600ca8a84a8aefbebb1ff09f978acfb'
+            '0b4f3283973bb3bc876735f051d8eaab68f0065502a3a5012141fad193538ea1'
+            '60dcde5002c7c0b983952746e6fb2cf06d6c5b425d64f340f819356e561e7fc7')
+
+case $CARCH in
+  i?86) _corearch=i386 ;;
+  x86_64) _corearch=x86_64 ;;
+esac
+
+prepare() {
+  mkdir build-{full,headless}
+  mkdir -p extra-arch-{full,headless}/usr/{bin,share/qemu}
+
+  cd ${pkgname}-${pkgver}
+  sed -i 's/vte-2\.90/vte-2.91/g' configure
+}
+
+build() {
+  _build full \
+    --audio-drv-list="pa alsa sdl"
+
+  _build headless \
+    --target-list=${_corearch}-softmmu \
+    --audio-drv-list= \
+    --disable-bluez \
+    --disable-sdl \
+    --disable-gtk \
+    --disable-vte \
+    --disable-opengl \
+    --disable-virglrenderer \
+    --disable-brlapi
+}
+
+_build() (
+  cd build-$1
+
+  # qemu vs. make 4 == bad
+  export ARFLAGS=rv
+
+  # http://permalink.gmane.org/gmane.comp.emulators.qemu/238740
+  export CFLAGS+=" -fPIC"
+
+  ../${pkgname}-${pkgver}/configure \
+    --prefix=/usr \
+    --sysconfdir=/etc \
+    --localstatedir=/var \
+    --libexecdir=/usr/lib/qemu \
+    --python=/usr/bin/python2 \
+    --smbd=/usr/bin/smbd \
+    --with-gtkabi=3.0 \
+    --with-sdlabi=2.0 \
+    --enable-modules \
+    --enable-jemalloc \
+    "${@:2}"
+
+  make
+)
+
+package_qemu() {
+  provides=(qemu-headless)
+  conflicts=(qemu-headless)
+  replaces=(qemu-kvm)
+
+  _package full
+}
+
+package_qemu-headless() {
+  pkgdesc="QEMU without graphical user interface"
+  depends=("${_headlessdeps[@]}")
+
+  _package headless
+}
+
+_package() {
+  optdepends=('samba: SMB/CIFS server support'
+              'qemu-arch-extra: extra architectures support'
+              'qemu-block-iscsi: iSCSI block support'
+              'qemu-block-rbd: RBD block support'
+              'qemu-block-gluster: glusterfs block support')
+  install=qemu.install
+  options=(!strip)
+
+  make -C build-$1 DESTDIR="$pkgdir" install "${@:2}"
+
+  # systemd stuff
+  install -Dm644 65-kvm.rules "$pkgdir/usr/lib/udev/rules.d/65-kvm.rules"
+  install -Dm644 qemu.sysusers "$pkgdir/usr/lib/sysusers.d/qemu.conf"
+
+  # remove conflicting /var/run directory
+  cd "$pkgdir"
+  rm -r var
+
+  cd usr/lib
+  tidy_strip
+
+  # bridge_helper needs suid
+  # https://bugs.archlinux.org/task/32565
+  chmod u+s qemu/qemu-bridge-helper
+
+  # remove split block modules
+  rm qemu/block-{iscsi,rbd,gluster}.so
+
+  cd ../bin
+  tidy_strip
+
+  # remove extra arch
+  for _bin in qemu-*; do
+    [[ -f $_bin ]] || continue
+
+    case ${_bin#qemu-} in
+      # guest agent
+      ga) rm "$_bin"; continue ;;
+
+      # tools
+      img|io|nbd) continue ;;
+
+      # core emu
+      system-${_corearch}) continue ;;
+    esac
+
+    mv "$_bin" "$srcdir/extra-arch-$1/usr/bin"
+  done
+
+  cd ../share/qemu
+  for _blob in *; do
+    [[ -f $_blob ]] || continue
+
+    case $_blob in
+      # provided by seabios package
+      bios.bin|acpi-dsdt.aml|bios-256k.bin|vgabios-cirrus.bin|vgabios-qxl.bin|\
+      vgabios-stdvga.bin|vgabios-vmware.bin) rm "$_blob"; continue ;;
+
+      # iPXE ROMs
+      efi-*|pxe-*) continue ;;
+
+      # core blobs
+      kvmvapic.bin|linuxboot.bin|multiboot.bin|sgabios.bin|vgabios*) continue ;;
+
+      # Trace events definitions
+      trace-events) continue ;;
+
+      # Logos
+      *.bmp|*.svg) continue ;;
+    esac
+
+    mv "$_blob" "$srcdir/extra-arch-$1/usr/share/qemu"
+  done
+}
+
+package_qemu-arch-extra() {
+  pkgdesc="QEMU for foreign architectures"
+  depends=(qemu)
+  options=(!strip)
+
+  mv extra-arch-full/usr "$pkgdir"
+}
+
+package_qemu-block-iscsi() {
+  pkgdesc="QEMU iSCSI block module"
+  depends=(glib2 libiscsi jemalloc)
+
+  install -D build-full/block-iscsi.so "$pkgdir/usr/lib/qemu/block-iscsi.so"
+}
+
+package_qemu-block-rbd() {
+  pkgdesc="QEMU RBD block module"
+  depends=(glib2 ceph)
+
+  install -D build-full/block-rbd.so "$pkgdir/usr/lib/qemu/block-rbd.so"
+}
+
+package_qemu-block-gluster() {
+  pkgdesc="QEMU GlusterFS block module"
+  depends=(glib2 glusterfs)
+
+  install -D build-full/block-gluster.so "$pkgdir/usr/lib/qemu/block-gluster.so"
+}
+
+package_qemu-guest-agent() {
+  pkgdesc="QEMU Guest Agent"
+  depends=(gcc-libs glib2)
+
+  install -D build-full/qemu-ga "$pkgdir/usr/bin/qemu-ga"
+  install -Dm644 qemu-ga.service "$pkgdir/usr/lib/systemd/system/qemu-ga.service"
+}
+
+# vim:set ts=2 sw=2 et:

Copied: qemu/repos/testing-x86_64/qemu-ga.service (from rev 275708, qemu/trunk/qemu-ga.service)
===================================================================
--- testing-x86_64/qemu-ga.service	                        (rev 0)
+++ testing-x86_64/qemu-ga.service	2016-09-03 09:06:39 UTC (rev 275709)
@@ -0,0 +1,8 @@
+[Unit]
+Description=QEMU Guest Agent
+
+[Service]
+ExecStart=/usr/bin/qemu-ga
+
+[Install]
+WantedBy=multi-user.target

Copied: qemu/repos/testing-x86_64/qemu.install (from rev 275708, qemu/trunk/qemu.install)
===================================================================
--- testing-x86_64/qemu.install	                        (rev 0)
+++ testing-x86_64/qemu.install	2016-09-03 09:06:39 UTC (rev 275709)
@@ -0,0 +1,11 @@
+# Arg 1:  the new package version
+post_install() {
+  # create kvm group
+  systemd-sysusers qemu.conf
+
+  # trigger events on modules files when already loaded
+  for _f in /sys/devices/virtual/misc/{kvm,vhost-net}; do
+    [[ -e "$_f" ]] &&  udevadm trigger "$_f"
+  done
+  :
+}

Copied: qemu/repos/testing-x86_64/qemu.sysusers (from rev 275708, qemu/trunk/qemu.sysusers)
===================================================================
--- testing-x86_64/qemu.sysusers	                        (rev 0)
+++ testing-x86_64/qemu.sysusers	2016-09-03 09:06:39 UTC (rev 275709)
@@ -0,0 +1 @@
+g kvm 78 -



More information about the arch-commits mailing list