[arch-commits] Commit in qemu/repos (6 files)
Anatol Pomozov
anatolik at archlinux.org
Fri Aug 3 21:57:13 UTC 2018
Date: Friday, August 3, 2018 @ 21:57:12
Author: anatolik
Revision: 330508
archrelease: copy trunk to testing-x86_64
Added:
qemu/repos/testing-x86_64/
qemu/repos/testing-x86_64/65-kvm.rules
(from rev 330507, qemu/trunk/65-kvm.rules)
qemu/repos/testing-x86_64/PKGBUILD
(from rev 330507, qemu/trunk/PKGBUILD)
qemu/repos/testing-x86_64/allow_elf64.patch
(from rev 330507, qemu/trunk/allow_elf64.patch)
qemu/repos/testing-x86_64/qemu-ga.service
(from rev 330507, qemu/trunk/qemu-ga.service)
qemu/repos/testing-x86_64/qemu.install
(from rev 330507, qemu/trunk/qemu.install)
-------------------+
65-kvm.rules | 1
PKGBUILD | 222 ++++++++++++++++++++++++++++++++++++++++++++++++++++
allow_elf64.patch | 25 +++++
qemu-ga.service | 9 ++
qemu.install | 8 +
5 files changed, 265 insertions(+)
Copied: qemu/repos/testing-x86_64/65-kvm.rules (from rev 330507, qemu/trunk/65-kvm.rules)
===================================================================
--- testing-x86_64/65-kvm.rules (rev 0)
+++ testing-x86_64/65-kvm.rules 2018-08-03 21:57:12 UTC (rev 330508)
@@ -0,0 +1 @@
+KERNEL=="vhost-net", GROUP="kvm", MODE="0660", TAG+="uaccess", OPTIONS+="static_node=vhost-net"
Copied: qemu/repos/testing-x86_64/PKGBUILD (from rev 330507, qemu/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2018-08-03 21:57:12 UTC (rev 330508)
@@ -0,0 +1,222 @@
+# $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-headless-arch-extra
+ qemu-block-{iscsi,rbd,gluster} qemu-guest-agent)
+pkgdesc="A generic and open source machine emulator and virtualizer"
+pkgver=2.12.1
+pkgrel=1
+arch=(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 libcacard usbredir)
+depends=(virglrenderer sdl2 vte3 libpulse "${_headlessdeps[@]}")
+makedepends=(spice-protocol python2 ceph libiscsi glusterfs)
+source=(https://download.qemu.org/qemu-$pkgver.tar.xz{,.sig}
+ qemu-ga.service
+ 65-kvm.rules
+ allow_elf64.patch)
+sha256sums=('33583800e0006cd00b78226b85be5a27c8e3b156bed2e60e83ecbeb7b9b8364f'
+ 'SKIP'
+ 'c39bcde4a09165e64419fd2033b3532378bba84d509d39e2d51694d44c1f8d88'
+ 'a66f0e791b16b03b91049aac61a25950d93e962e1b2ba64a38c6ad7f609b532c'
+ '59751f1ed26ea61b2a37ebee4be6979e584a450b611282138a0893aa9173e2e4')
+validpgpkeys=('CEACC9E15534EBABB82D3FA03353C9CEF108B584')
+
+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
+
+ patch -p1 < ../allow_elf64.patch
+}
+
+build() {
+ _build full \
+ --audio-drv-list="pa alsa sdl"
+
+ _build headless \
+ --audio-drv-list= \
+ --disable-bluez \
+ --disable-sdl \
+ --disable-gtk \
+ --disable-vte \
+ --disable-opengl \
+ --disable-virglrenderer
+}
+
+_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() {
+ optdepends=('qemu-arch-extra: extra architectures support')
+ provides=(qemu-headless)
+ conflicts=(qemu-headless)
+ replaces=(qemu-kvm)
+
+ _package full
+}
+
+package_qemu-headless() {
+ pkgdesc="QEMU without GUI"
+ depends=("${_headlessdeps[@]}")
+ optdepends=('qemu-headless-arch-extra: extra architectures support')
+
+ _package headless
+}
+
+_package() {
+ optdepends+=('samba: SMB/CIFS server 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"
+
+ # 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*|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)
+ provides=(qemu-headless-arch-extra)
+ conflicts=(qemu-headless-arch-extra)
+ options=(!strip)
+
+ mv extra-arch-full/usr "$pkgdir"
+}
+
+package_qemu-headless-arch-extra() {
+ pkgdesc="QEMU without GUI, for foreign architectures"
+ depends=(qemu-headless)
+ options=(!strip)
+
+ mv extra-arch-headless/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"
+ install -Dm755 "$srcdir/qemu-$pkgver/scripts/qemu-guest-agent/fsfreeze-hook" "$pkgdir/etc/qemu/fsfreeze-hook"
+}
+
+# vim:set ts=2 sw=2 et:
Copied: qemu/repos/testing-x86_64/allow_elf64.patch (from rev 330507, qemu/trunk/allow_elf64.patch)
===================================================================
--- testing-x86_64/allow_elf64.patch (rev 0)
+++ testing-x86_64/allow_elf64.patch 2018-08-03 21:57:12 UTC (rev 330508)
@@ -0,0 +1,25 @@
+commit cb61bc8a42da1a971079767e63df4503b6ab2efb
+Author: Anatol Pomozov <anatol.pomozov at gmail.com>
+Date: Mon Jan 29 10:08:53 2018 -0800
+
+ multiboot: Make elf64 loading functionality compatible with GRUB
+
+ GRUB is a reference multiboot implementation and supports loading elf64
+ binaries. Make QEMU to work similar was as GRUB.
+
+diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c
+index 5bc0a2cddb..0907e42a39 100644
+--- a/hw/i386/multiboot.c
++++ b/hw/i386/multiboot.c
+@@ -193,11 +193,6 @@ int load_multiboot(FWCfgState *fw_cfg,
+ int kernel_size;
+ fclose(f);
+
+- if (((struct elf64_hdr*)header)->e_machine == EM_X86_64) {
+- error_report("Cannot load x86-64 image, give a 32bit one.");
+- exit(1);
+- }
+-
+ kernel_size = load_elf(kernel_filename, NULL, NULL, &elf_entry,
+ &elf_low, &elf_high, 0, I386_ELF_MACHINE,
+ 0, 0);
Copied: qemu/repos/testing-x86_64/qemu-ga.service (from rev 330507, qemu/trunk/qemu-ga.service)
===================================================================
--- testing-x86_64/qemu-ga.service (rev 0)
+++ testing-x86_64/qemu-ga.service 2018-08-03 21:57:12 UTC (rev 330508)
@@ -0,0 +1,9 @@
+[Unit]
+Description=QEMU Guest Agent
+ConditionPathExists=/dev/virtio-ports/org.qemu.guest_agent.0
+
+[Service]
+ExecStart=/usr/bin/qemu-ga
+
+[Install]
+WantedBy=multi-user.target
Copied: qemu/repos/testing-x86_64/qemu.install (from rev 330507, qemu/trunk/qemu.install)
===================================================================
--- testing-x86_64/qemu.install (rev 0)
+++ testing-x86_64/qemu.install 2018-08-03 21:57:12 UTC (rev 330508)
@@ -0,0 +1,8 @@
+# Arg 1: the new package version
+post_install() {
+ # trigger events on modules files when already loaded
+ for _f in /sys/devices/virtual/misc/vhost-net; do
+ [[ -e "$_f" ]] && udevadm trigger "$_f"
+ done
+ :
+}
More information about the arch-commits
mailing list