Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

qemu: Add qemu-cc #34

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Included components
* `kernel`_: Includes patches to build an optimized linux kernel required to run Clear
Containers
* `qemu-lite`_: Includes an optimized version of the QEMU hypervisor.

* `qemu-cc`_: Includes an optimized version of the QEMU hypervisor + Q35 type support.

Repositories
============
Expand Down Expand Up @@ -73,6 +73,8 @@ Repositories

.. _`qemu-lite`: https://github.com/01org/qemu-lite/tree/qemu-2.7-lite

.. _`qemu-cc`: https://github.com/clearcontainers/qemu/tree/qemu-lite-v2.9.0

.. _`kernel`: https://github.com/clearcontainers/packaging/tree/master/kernel

.. _`clear-containers-image`: https://download.clearlinux.org/current/
Expand Down
15 changes: 15 additions & 0 deletions qemu-cc/_service-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<services>
<service name="tar_scm">
<param name="scm">git</param>
<param name="url">https://github.com/clearcontainers/qemu.git</param>
<param name="submodules">disable</param>
<param name="filename">qemu-cc</param>
<param name="versionformat">@VERSION@+git.%h</param>
<param name="revision">@REVISION@</param>
</service>
<service name="recompress">
<param name="file">*.tar*</param>
<param name="compression">gz</param>
</service>

</services>
12 changes: 12 additions & 0 deletions qemu-cc/configure.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/configure b/configure
index 0c0472a..5cdb77e 100755
--- a/configure
+++ b/configure
@@ -1145,7 +1145,6 @@ for opt do
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
- exit 1
;;
esac
done
11 changes: 11 additions & 0 deletions qemu-cc/debian.changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
qemu-cc (2.9.0) stable; urgency=medium

* Update qemu-cc 2.9.0

-- Erick Cardona <erick.cardona.ruiz@intel.com> Tue, 14 Nov 2017 17:36:57 +0000

qemu-cc (2.9.0) stable; urgency=medium

* Initial version introducing Q35 type and removal of pc-lite.

-- Erick Cardona <erick.cardona.ruiz@intel.com> Fri, 28 Jul 2017 14:52:22 -0600
1 change: 1 addition & 0 deletions qemu-cc/debian.compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
14 changes: 14 additions & 0 deletions qemu-cc/debian.control
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Source: qemu-cc
Section: devel
Priority: optional
Maintainer: clearlinux.org team <dev@lists.clearlinux.org>
Build-Depends: debhelper (>= 9), cpio, libelf-dev, rsync, libdw-dev, pkg-config, flex, bison, libaudit-dev, bc, python-dev, gawk, autoconf, automake, libtool, libltdl-dev, libglib2.0-dev, libglib2.0-0, libcap-dev, libcap-ng-dev, libattr1-dev, m4, libnuma-dev, zlib1g-dev, libpixman-1-0, libpixman-1-dev
Standards-Version: 3.9.6
Homepage: https://clearlinux.org/features/clear-containers

Package: qemu-cc
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends},
Description: linux kernel optimised for container-like workloads.
Linux kernel optimised for container-like workloads

66 changes: 66 additions & 0 deletions qemu-cc/debian.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/usr/bin/make -f
include /usr/share/dpkg/default.mk
export LANG=C
%:
dh $@

override_dh_auto_configure:
dh_auto_configure -- \
--prefix=/usr \
--datadir=/usr/share/qemu-cc \
--libdir=/usr/lib64/qemu-cc \
--libexecdir=/usr/libexec/qemu-cc \
--disable-tools \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--disable-libssh2 \
--disable-tcmalloc \
--disable-glusterfs \
--disable-seccomp \
--disable-{bzip2,snappy,lzo} \
--disable-usb-redir \
--disable-libusb \
--disable-libnfs \
--disable-tcg-interpreter \
--disable-debug-tcg \
--disable-libiscsi \
--disable-rbd \
--disable-spice \
--disable-attr \
--disable-cap-ng \
--disable-linux-aio \
--disable-brlapi \
--disable-vnc-{jpeg,png,sasl} \
--disable-rdma \
--disable-bluez \
--disable-fdt \
--disable-curl \
--disable-curses \
--disable-sdl \
--disable-gtk \
--disable-tpm \
--disable-vte \
--disable-vnc \
--disable-xen \
--disable-opengl \
--disable-slirp \
--enable-trace-backend=nop \
--enable-virtfs --enable-attr \
--enable-cap-ng \
--target-list=x86_64-softmmu \
--enable-vhost-net \
--disable-docs

override_dh_auto_build:
make

override_dh_auto_install:
mkdir -p debian/qemu-cc
make install DESTDIR=`pwd`/debian/qemu-cc PREFIX=/usr
mv `pwd`/debian/qemu-cc/usr/bin/qemu-system-x86_64 `pwd`/debian/qemu-cc/usr/bin/qemu-cc-system-x86_64
mv `pwd`/debian/qemu-cc/usr/bin/qemu-ga `pwd`/debian/qemu-cc/usr/bin/qemu-cc-ga
mv `pwd`/debian/qemu-cc/usr/bin/virtfs-proxy-helper `pwd`/debian/qemu-cc/usr/bin/virtfs-cc-proxy-helper

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe we need this binary, but that can be removed when we switch to using https://github.com/clearcontainers/packaging/blob/master/scripts/configure-hypervisor.sh.


override_dh_auto_test:
echo "Skip dh_auto_test"

override_dh_auto_clean:

1 change: 1 addition & 0 deletions qemu-cc/debian.series
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
configure.patch
1 change: 1 addition & 0 deletions qemu-cc/qemu-cc-rpmlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
setBadness('arch-dependent-file-in-usr-share', 0)
16 changes: 16 additions & 0 deletions qemu-cc/qemu-cc.dsc-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Format: 3.0 (quilt)
Source: qemu-cc
Version: @VERSION@+git.@QEMU_CC_HASH@-@RELEASE@
Section: devel
Priority: optional
Maintainer: clearlinux.org team <dev@lists.clearlinux.org>
Build-Depends: debhelper (>= 9), cpio, libelf-dev, rsync, libdw-dev, pkg-config, flex, bison, libaudit-dev, bc, python-dev, gawk, autoconf, automake, libtool, libltdl-dev, libglib2.0-dev, libglib2.0-0, libcap-dev, libcap-ng-dev, libattr1-dev, m4, libnuma-dev, zlib1g-dev, libpixman-1-0, libpixman-1-dev
Standards-Version: 3.9.6
Homepage: https://clearlinux.org/features/clear-containers
Debtransform-Tar: qemu-cc-@VERSION@+git.@QEMU_CC_HASH@.tar.gz

Package: qemu-cc
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends},
Description: QEMU is a generic and open source machine & userspace emulator and
virtualizer.
229 changes: 229 additions & 0 deletions qemu-cc/qemu-cc.spec-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
%global qemu_cc_hash @QEMU_CC_HASH@

Name: qemu-cc
Version: @VERSION@+git.%{qemu_cc_hash}
Release: @RELEASE@.<B_CNT>
Source0: %{name}-%{version}.tar.gz
Source1: qemu-cc-rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}

Summary : OpenBIOS development utilities
Group : Development/Tools
License : BSD-2-Clause BSD-3-Clause GPL-2.0 GPL-2.0+ LGPL-2.0+ LGPL-2.1

Requires: qemu-cc-bin
Requires: qemu-cc-data

BuildRequires : automake
BuildRequires : bison
BuildRequires : flex
BuildRequires : gcc-c++
BuildRequires : glib2-devel
BuildRequires : libattr-devel
BuildRequires : libcap-devel
BuildRequires : libcap-ng-devel
BuildRequires : libtool
BuildRequires : libtool-ltdl-devel
BuildRequires : libtool
BuildRequires : m4
%if 0%{?suse_version}
BuildRequires : libnuma-devel
%else
BuildRequires : numactl-devel
%endif
BuildRequires : python-devel
BuildRequires : zlib-devel
BuildRequires : pkgconfig(pixman-1)
Patch1: configure.patch

%undefine _missing_build_ids_terminate_build
%define debug_package %{nil}

%description
===========
QEMU is a generic and open source machine & userspace emulator and
virtualizer.

%package bin
Summary: bin components for the qemu-cc package.
Group: Binaries
Requires: qemu-cc-data

%description bin
bin components for the qemu-cc package.


%package data
Summary: data components for the qemu-cc package.
Group: Data

%description data
data components for the qemu-cc package.

%package doc
Summary: docs for the qemu-cc package.
Group: Data

%description doc
Docs for the qemu-cc package.

%prep
%setup -q
%patch1 -p1

%build
export LANG=C

./configure \
--prefix=/usr \
--datadir=/usr/share/qemu-cc \
--libdir=/usr/lib64/qemu-cc \
--libexecdir=/usr/libexec/qemu-cc \
--disable-tools \
--disable-libssh2 \
--disable-tcmalloc \
--disable-glusterfs \
--disable-seccomp \
--disable-{bzip2,snappy,lzo} \
--disable-usb-redir \
--disable-libusb \
--disable-libnfs \
--disable-tcg-interpreter \
--disable-debug-tcg \
--disable-libiscsi \
--disable-rbd \
--disable-spice \
--disable-attr \
--disable-cap-ng \
--disable-linux-aio \
--disable-brlapi \
--disable-vnc-{jpeg,png,sasl} \
--disable-rdma \
--disable-bluez \
--disable-fdt \
--disable-curl \
--disable-curses \
--disable-sdl \
--disable-gtk \
--disable-tpm \
--disable-vte \
--disable-vnc \
--disable-xen \
--disable-opengl \
--disable-slirp \
--enable-trace-backend=nop \
--enable-virtfs --enable-attr \
--enable-cap-ng \
--target-list=x86_64-softmmu \
--enable-vhost-net \
--disable-docs

make V=1 %{?_smp_mflags}

%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} PREFIX=/usr
mv %{buildroot}/usr/bin/qemu-system-x86_64 %{buildroot}/usr/bin/qemu-cc-system-x86_64
mv %{buildroot}/usr/bin/qemu-ga %{buildroot}/usr/bin/qemu-cc-ga
mv %{buildroot}/usr/bin/virtfs-proxy-helper %{buildroot}/usr/bin/virtfs-cc-proxy-helper

%files
%defattr(-,root,root,-)

%files bin
%defattr(-,root,root,-)
/usr/bin/qemu-cc-ga
/usr/bin/qemu-cc-system-x86_64
/usr/bin/virtfs-cc-proxy-helper
/usr/libexec
/usr/libexec/qemu-cc
/usr/libexec/qemu-cc/qemu-bridge-helper

%files data
%defattr(-,root,root,-)
/usr/share/qemu-cc
/usr/share/qemu-cc/qemu
/usr/share/qemu-cc/qemu/acpi-dsdt.aml
/usr/share/qemu-cc/qemu/bamboo.dtb
/usr/share/qemu-cc/qemu/bios-256k.bin
/usr/share/qemu-cc/qemu/bios.bin
/usr/share/qemu-cc/qemu/efi-e1000e.rom
/usr/share/qemu-cc/qemu/efi-e1000.rom
/usr/share/qemu-cc/qemu/efi-eepro100.rom
/usr/share/qemu-cc/qemu/efi-ne2k_pci.rom
/usr/share/qemu-cc/qemu/efi-pcnet.rom
/usr/share/qemu-cc/qemu/efi-rtl8139.rom
/usr/share/qemu-cc/qemu/efi-virtio.rom
/usr/share/qemu-cc/qemu/efi-vmxnet3.rom
/usr/share/qemu-cc/qemu/kvmvapic.bin
/usr/share/qemu-cc/qemu/linuxboot.bin
/usr/share/qemu-cc/qemu/linuxboot_dma.bin
/usr/share/qemu-cc/qemu/multiboot.bin
/usr/share/qemu-cc/qemu/openbios-ppc
/usr/share/qemu-cc/qemu/openbios-sparc32
/usr/share/qemu-cc/qemu/openbios-sparc64
/usr/share/qemu-cc/qemu/palcode-clipper
/usr/share/qemu-cc/qemu/petalogix-ml605.dtb
/usr/share/qemu-cc/qemu/petalogix-s3adsp1800.dtb
/usr/share/qemu-cc/qemu/ppc_rom.bin
/usr/share/qemu-cc/qemu/pxe-e1000.rom
/usr/share/qemu-cc/qemu/pxe-eepro100.rom
/usr/share/qemu-cc/qemu/pxe-ne2k_pci.rom
/usr/share/qemu-cc/qemu/pxe-pcnet.rom
/usr/share/qemu-cc/qemu/pxe-rtl8139.rom
/usr/share/qemu-cc/qemu/pxe-virtio.rom
/usr/share/qemu-cc/qemu/QEMU,cgthree.bin
/usr/share/qemu-cc/qemu/qemu-icon.bmp
/usr/share/qemu-cc/qemu/qemu_logo_no_text.svg
/usr/share/qemu-cc/qemu/QEMU,tcx.bin
/usr/share/qemu-cc/qemu/s390-ccw.img
/usr/share/qemu-cc/qemu/sgabios.bin
/usr/share/qemu-cc/qemu/skiboot.lid
/usr/share/qemu-cc/qemu/slof.bin
/usr/share/qemu-cc/qemu/spapr-rtas.bin
/usr/share/qemu-cc/qemu/trace-events-all
/usr/share/qemu-cc/qemu/u-boot.e500
/usr/share/qemu-cc/qemu/vgabios.bin
/usr/share/qemu-cc/qemu/vgabios-cirrus.bin
/usr/share/qemu-cc/qemu/vgabios-qxl.bin
/usr/share/qemu-cc/qemu/vgabios-stdvga.bin
/usr/share/qemu-cc/qemu/vgabios-virtio.bin
/usr/share/qemu-cc/qemu/vgabios-vmware.bin
/usr/share/qemu-cc/qemu/keymaps
/usr/share/qemu-cc/qemu/keymaps/ar
/usr/share/qemu-cc/qemu/keymaps/bepo
/usr/share/qemu-cc/qemu/keymaps/common
/usr/share/qemu-cc/qemu/keymaps/cz
/usr/share/qemu-cc/qemu/keymaps/da
/usr/share/qemu-cc/qemu/keymaps/de
/usr/share/qemu-cc/qemu/keymaps/de-ch
/usr/share/qemu-cc/qemu/keymaps/en-gb
/usr/share/qemu-cc/qemu/keymaps/en-us
/usr/share/qemu-cc/qemu/keymaps/es
/usr/share/qemu-cc/qemu/keymaps/et
/usr/share/qemu-cc/qemu/keymaps/fi
/usr/share/qemu-cc/qemu/keymaps/fo
/usr/share/qemu-cc/qemu/keymaps/fr
/usr/share/qemu-cc/qemu/keymaps/fr-be
/usr/share/qemu-cc/qemu/keymaps/fr-ca
/usr/share/qemu-cc/qemu/keymaps/fr-ch
/usr/share/qemu-cc/qemu/keymaps/hr
/usr/share/qemu-cc/qemu/keymaps/hu
/usr/share/qemu-cc/qemu/keymaps/is
/usr/share/qemu-cc/qemu/keymaps/it
/usr/share/qemu-cc/qemu/keymaps/ja
/usr/share/qemu-cc/qemu/keymaps/lt
/usr/share/qemu-cc/qemu/keymaps/lv
/usr/share/qemu-cc/qemu/keymaps/mk
/usr/share/qemu-cc/qemu/keymaps/modifiers
/usr/share/qemu-cc/qemu/keymaps/nl
/usr/share/qemu-cc/qemu/keymaps/nl-be
/usr/share/qemu-cc/qemu/keymaps/no
/usr/share/qemu-cc/qemu/keymaps/pl
/usr/share/qemu-cc/qemu/keymaps/pt
/usr/share/qemu-cc/qemu/keymaps/pt-br
/usr/share/qemu-cc/qemu/keymaps/ru
/usr/share/qemu-cc/qemu/keymaps/sl
/usr/share/qemu-cc/qemu/keymaps/sv
/usr/share/qemu-cc/qemu/keymaps/th
/usr/share/qemu-cc/qemu/keymaps/tr
1 change: 1 addition & 0 deletions qemu-cc/release
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
Loading