summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:07 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:07 +0200
commitee97d3d279164f8b44fb8afc997e4ae953d17106 (patch)
treebff0bd4240f00bbb21624c1df55583f61abaea25
downloadmeta-virtualization-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
-rw-r--r--.gitignore6
-rw-r--r--COPYING.MIT17
-rw-r--r--README48
-rw-r--r--conf/layer.conf18
-rw-r--r--docs/00-INDEX12
-rw-r--r--docs/00-README6
-rw-r--r--docs/openvswitch.txt96
-rw-r--r--files/custom-licenses/Intel-ACPI104
-rw-r--r--recipes-containers/criu/criu_git.bb29
-rw-r--r--recipes-containers/criu/files/0001-Fixed-hardcoding.patch47
-rw-r--r--recipes-containers/criu/files/disable_tests.patch19
-rw-r--r--recipes-containers/criu/protobuf-c_0.15.bb20
-rw-r--r--recipes-containers/criu/protobuf_2.4.1.bb18
-rw-r--r--recipes-containers/lxc/files/config_network_type-set-macvlan-default-mode-to-priv.patch43
-rw-r--r--recipes-containers/lxc/files/lxc-1.0.0-disable-udhcp-from-busybox-template.patch24
-rw-r--r--recipes-containers/lxc/files/lxc-busybox-follow-symlinks-when-inspecting-busybox-.patch27
-rw-r--r--recipes-containers/lxc/files/network.c-Add-missing-LXC_NET_NONE-option-refactor.patch38
-rw-r--r--recipes-containers/lxc/files/run-ptest4
-rw-r--r--recipes-containers/lxc/files/runtest.patch32
-rw-r--r--recipes-containers/lxc/lxc_1.0.1.bb78
-rw-r--r--recipes-core/base-files/base-files_3.0.14.bbappend5
-rw-r--r--recipes-core/busybox/busybox/getopt.cfg2
-rw-r--r--recipes-core/busybox/busybox/lspci.cfg1
-rw-r--r--recipes-core/busybox/busybox/lsusb.cfg1
-rw-r--r--recipes-core/busybox/busybox/mdev.cfg6
-rw-r--r--recipes-core/busybox/busybox/mount-cifs.cfg1
-rw-r--r--recipes-core/busybox/busybox/ps-extras.cfg3
-rw-r--r--recipes-core/busybox/busybox_1.22.1.bbappend10
-rw-r--r--recipes-core/initscripts/initscripts_1.0.bbappend16
-rw-r--r--recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bbappend6
-rw-r--r--recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch138
-rw-r--r--recipes-devtools/python/python_2.7.3.bbappend8
-rw-r--r--recipes-extended/dev86/dev86_0.16.19.bb37
-rw-r--r--recipes-extended/iasl/iasl_20120215.bb29
-rw-r--r--recipes-extended/images/cloud-image-compute.bb14
-rw-r--r--recipes-extended/images/cloud-image-controller.bb34
-rw-r--r--recipes-extended/images/cloud-image-guest.bb18
-rw-r--r--recipes-extended/images/kvm-image-minimal.bb25
-rw-r--r--recipes-extended/images/xen-bootimg.inc35
-rw-r--r--recipes-extended/images/xen-guest-image-minimal.bb16
-rw-r--r--recipes-extended/images/xen-image-minimal.bb53
-rw-r--r--recipes-extended/iptables/iptables_1.4.21.bbappend8
-rw-r--r--recipes-extended/irqbalance/irqbalance.inc39
-rw-r--r--recipes-extended/irqbalance/irqbalance/add-initscript.patch47
-rw-r--r--recipes-extended/irqbalance/irqbalance/irqbalance-Add-status-and-reload-commands.patch55
-rw-r--r--recipes-extended/irqbalance/irqbalance_1.0.4.bb16
-rw-r--r--recipes-extended/irqbalance/irqbalance_1.0.5.bb14
-rw-r--r--recipes-extended/irqbalance/irqbalance_1.0.6.bb15
-rw-r--r--recipes-extended/libvirt/libvirt-python.inc55
-rw-r--r--recipes-extended/libvirt/libvirt/dnsmasq_exclude_virbr.conf1
-rw-r--r--recipes-extended/libvirt/libvirt/libvirt-1.0.3-fix-thread-safety-in-lxc-callback-handling.patch63
-rw-r--r--recipes-extended/libvirt/libvirt/libvirt_api_xml_path.patch89
-rw-r--r--recipes-extended/libvirt/libvirt/libvirtd.conf393
-rwxr-xr-xrecipes-extended/libvirt/libvirt/libvirtd.sh103
-rw-r--r--recipes-extended/libvirt/libvirt/qemu-fix-crash-in-qemuOpen.patch39
-rw-r--r--recipes-extended/libvirt/libvirt/run-ptest3
-rw-r--r--recipes-extended/libvirt/libvirt/runptest.patch112
-rw-r--r--recipes-extended/libvirt/libvirt/tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch112
-rw-r--r--recipes-extended/libvirt/libvirt_1.2.2.bb216
-rw-r--r--recipes-extended/multipath-tools/multipath-tools_git.bb46
-rw-r--r--recipes-extended/xen/files/flask-avoid-installing-policy-file-as-boot.patch26
-rw-r--r--recipes-extended/xen/xen.inc658
-rw-r--r--recipes-extended/xen/xen_4.3.1.bb24
-rw-r--r--recipes-extended/xen/xen_git.bb18
-rw-r--r--recipes-kernel/linux/linux-yocto/ebtables.cfg2
-rw-r--r--recipes-kernel/linux/linux-yocto/ebtables.scc4
-rw-r--r--recipes-kernel/linux/linux-yocto/lxc.cfg22
-rw-r--r--recipes-kernel/linux/linux-yocto/lxc.scc4
-rw-r--r--recipes-kernel/linux/linux-yocto/vswitch.cfg2
-rw-r--r--recipes-kernel/linux/linux-yocto/vswitch.scc4
-rw-r--r--recipes-kernel/linux/linux-yocto/xen.cfg54
-rw-r--r--recipes-kernel/linux/linux-yocto/xen.scc4
-rw-r--r--recipes-kernel/linux/linux-yocto/xt-checksum.cfg1
-rw-r--r--recipes-kernel/linux/linux-yocto/xt-checksum.scc4
-rw-r--r--recipes-kernel/linux/linux-yocto_3.10.bbappend19
-rw-r--r--recipes-kernel/linux/linux-yocto_3.14.bbappend19
-rw-r--r--recipes-kernel/linux/linux-yocto_3.4.bbappend16
-rw-r--r--recipes-networking/netcf/netcf/0001-fix-network-driver-check-issue-on-opensuse.patch28
-rw-r--r--recipes-networking/netcf/netcf_git.bb27
-rw-r--r--recipes-networking/openvswitch/files/configure-Only-link-against-libpcap-on-FreeBSD.patch70
-rw-r--r--recipes-networking/openvswitch/files/openvswitch-add-more-target-python-substitutions.patch50
-rw-r--r--recipes-networking/openvswitch/files/openvswitch-add-ptest.patch67
-rw-r--r--recipes-networking/openvswitch/files/openvswitch-add-target-perl-handling.patch48
-rw-r--r--recipes-networking/openvswitch/files/openvswitch-add-target-python-handling.patch149
-rwxr-xr-xrecipes-networking/openvswitch/files/openvswitch-controller274
-rw-r--r--recipes-networking/openvswitch/files/openvswitch-controller-setup29
-rw-r--r--recipes-networking/openvswitch/files/openvswitch-example102
-rw-r--r--recipes-networking/openvswitch/files/openvswitch-switch102
-rw-r--r--recipes-networking/openvswitch/files/openvswitch-switch-setup8
-rw-r--r--recipes-networking/openvswitch/files/run-ptest4
-rw-r--r--recipes-networking/openvswitch/openvswitch_1.10.0.bb118
-rw-r--r--recipes-networking/openvswitch/openvswitch_2.0.0.bb130
92 files changed, 4657 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..65feb826
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
1build*/
2pyshtables.py
3*.swp
4*.orig
5*.rej
6*~
diff --git a/COPYING.MIT b/COPYING.MIT
new file mode 100644
index 00000000..fb950dc6
--- /dev/null
+++ b/COPYING.MIT
@@ -0,0 +1,17 @@
1Permission is hereby granted, free of charge, to any person obtaining a copy
2of this software and associated documentation files (the "Software"), to deal
3in the Software without restriction, including without limitation the rights
4to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5copies of the Software, and to permit persons to whom the Software is
6furnished to do so, subject to the following conditions:
7
8The above copyright notice and this permission notice shall be included in
9all copies or substantial portions of the Software.
10
11THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
17THE SOFTWARE.
diff --git a/README b/README
new file mode 100644
index 00000000..48327a2d
--- /dev/null
+++ b/README
@@ -0,0 +1,48 @@
1meta-virtualization
2===================
3
4This layer provides support for building Xen, KVM, Libvirt, and associated
5packages necessary for constructing OE-based virtualized solutions.
6
7Dependencies
8------------
9This layer depends on:
10
11URI: git://github.com/openembedded/oe-core.git
12branch: master
13revision: HEAD
14prio: default
15
16URI: git://github.com/openembedded/meta-oe.git
17branch: master
18revision: HEAD
19layers: meta-oe
20 meta-networking
21
22BBFILE_PRIORITY_openembedded-layer = "4"
23
24Required for Xen XSM policy:
25URI: git://git.yoctoproject.org/meta-selinux
26branch: master
27revision: HEAD
28prio: default
29
30Maintenance
31-----------
32
33Send pull requests, patches, comments or questions to meta-virtualization@yoctoproject.org
34
35Maintainers: Raymond Danks <ray.danks@se-eng.com>
36 David Nyström <david.nystrom@enea.com>
37 Bruce Ashfield <bruce.ashfield@gmail.com>
38
39When sending single patches, please using something like:
40'git send-email -1 --to meta-virtualization@yoctoproject.org --subject-prefix=meta-virtualization][PATCH'
41
42License
43-------
44
45All metadata is MIT licensed unless otherwise stated. Source code included
46in tree for individual recipes is under the LICENSE stated in each recipe
47(.bb file) unless otherwise stated.
48
diff --git a/conf/layer.conf b/conf/layer.conf
new file mode 100644
index 00000000..3d21667b
--- /dev/null
+++ b/conf/layer.conf
@@ -0,0 +1,18 @@
1# We have a conf and classes directory, append to BBPATH
2BBPATH .= ":${LAYERDIR}"
3
4# We have a recipes directory, add to BBFILES
5BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
6
7BBFILE_COLLECTIONS += "virtualization-layer"
8BBFILE_PATTERN_virtualization-layer := "^${LAYERDIR}/"
9BBFILE_PRIORITY_virtualization-layer = "7"
10
11# Custom licenses used by some packages in this layer
12LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"
13
14# This should only be incremented on significant changes that will
15# cause compatibility issues with other layers
16LAYERVERSION_virtualization-layer = "1"
17
18LAYERDEPENDS_virtualization-layer = "core networking-layer"
diff --git a/docs/00-INDEX b/docs/00-INDEX
new file mode 100644
index 00000000..a2ffd99f
--- /dev/null
+++ b/docs/00-INDEX
@@ -0,0 +1,12 @@
1This is a brief list of all the files in meta-virtualization/docs and what
2they contain. If you add a documentation file, please list it here in
3alphabetical order as well.
4
500-INDEX
6 - this file.
7
800-README
9 - info on the goals of meta-virtualization and this docs subdir
10
11openvswitch.txt
12 - example on how to setup openvswitch with qemu/kvm.
diff --git a/docs/00-README b/docs/00-README
new file mode 100644
index 00000000..6fea1125
--- /dev/null
+++ b/docs/00-README
@@ -0,0 +1,6 @@
1meta-virtualization: docs
2=========================
3
4The docs subdirectory is a holding tank for meta-virtualization related
5READMEs, documentation, testing information, configuration and other
6notes that help the users of meta-virt.
diff --git a/docs/openvswitch.txt b/docs/openvswitch.txt
new file mode 100644
index 00000000..4410d27e
--- /dev/null
+++ b/docs/openvswitch.txt
@@ -0,0 +1,96 @@
1Simple setup for connecting openvswitch to qemu/kvm
2===================================================
3This example brings up openvswitch using a private network.
4
5Preliminary notes
6=================
71. Make sure to build kernel support for openvswitch as a module. The
8openvswitch init scripts expect to load a module and upon success
9continue to setup the switch. If openvswitch is compiled
10statically, the init scripts not load the ovs-vswitchd daemon
11and none of the configured bridges will show up in the interfaces
12table (ifconfig). You can get around this limiation by running the
13following by hand:
14 # ovs-vswitchd --pidfile --detach
15
162. Verify that ovs-vswitchd is running before proceeding:
17 # /etc/init.d/openvswitch-switch status
18 ovsdb-server is running with pid 1867
19 ovs-vswitchd is running with pid 1877
20
213. A kernel and rootfs is required for qemu bring up.
22
23Qemu Setup
24==========
25The host requires a /etc/qemu-ifup script to setup the bridging and tap
26devices. Qemu will invoke this qemu-ifup script at startup. Here is
27an example script:
28$ cat /etc/qemu-fup
29 #!/bin/sh
30 # the tap is dynamically assigned and passed into this script
31 # as a parameter
32 TAP=$1
33
34 # Note: if booting over NFS, once the $ETH0 device is added to the bridge,
35 # your host will be unusable. In that case, setup networking
36 # init scripts appropriately and change the following to work
37 # with it.
38 ETH0="eth1"
39 NETMASK=255.255.255.0
40 IP=192.168.1.1
41 GATEWAY=
42 SWITCH=ovsbr0
43 if [ -n "$TAP" ];then
44 ifconfig $TAP up
45 ifconfig $SWITCH down &>/dev/null
46 ovs-vsctl del-br $SWITCH
47 ovs-vsctl add-br $SWITCH
48 ifconfig $ETH0 0.0.0.0
49 ifconfig $SWITCH $IP up netmask $NETMASK
50 #-- external access not required for this test.
51 #route add default gw $GATEWAY
52 ovs-vsctl add-port $SWITCH $ETH0
53 ovs-vsctl add-port $SWITCH $TAP
54 exit 0
55 else
56 echo "$0: No tap device"
57 exit 1
58 fi
59
60Start Qemu
61==========
62This example will bring up qemu with a tap network interface.
63Note: this command must be run as root due to the networking setup.
64
65 $ qemu-system-x86_64 -nographic -k en-us -m 1024 \
66 -net nic,macaddr=1a:46:0b:ca:bc:7a,model=virtio \
67 -net tap -enable-kvm\
68 -kernel /opt/dpdk-guest-kernel \
69 -append 'root=/dev/vda ro console=ttyS0' \
70 -drive file=/opt/intel-xeon-core-ovp-kvm-preempt-rt-dist.ext3,cache=none,if=virtio
71
72Once the guest OS is up and running, configure the quest network interface:
73 $ ifconfig eth0 192.168.1.10
74
75Ping the bridge:
76 $ ping 192.168.1.1
77
78From the host, view the bridged network:
79$ ovs-vsctl show
80c1212b96-ef49-4a8e-b598-09b05b854dd0
81 Bridge "ovsbr0"
82 Port "tap0"
83 Interface "tap0"
84 Port "eth1"
85 Interface "eth1"
86 Port "ovsbr0"
87 Interface "ovsbr0"
88 type: internal
89
90At this point, openvswitch is up and running. If you want external
91network access, you need to set a GATEWAY in the qemu-ifup script and
92make sure the external device is part of the bridge.
93
94Note:
95Proper setup will require a /etc/qemu-ifdown script to tear down the
96bridge and interfaces. (not provided here).
diff --git a/files/custom-licenses/Intel-ACPI b/files/custom-licenses/Intel-ACPI
new file mode 100644
index 00000000..df0d0bba
--- /dev/null
+++ b/files/custom-licenses/Intel-ACPI
@@ -0,0 +1,104 @@
11. Copyright Notice
2
3Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp.
4All rights reserved.
5
62. License
7
82.1. This is your license from Intel Corp. under its intellectual property
9rights. You may have additional license terms from the party that provided
10you this software, covering your right to use that party's intellectual
11property rights.
12
132.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
14copy of the source code appearing in this file ("Covered Code") an
15irrevocable, perpetual, worldwide license under Intel's copyrights in the
16base code distributed originally by Intel ("Original Intel Code") to copy,
17make derivatives, distribute, use and display any portion of the Covered
18Code in any form, with the right to sublicense such rights; and
19
202.3. Intel grants Licensee a non-exclusive and non-transferable patent
21license (with the right to sublicense), under only those claims of Intel
22patents that are infringed by the Original Intel Code, to make, use, sell,
23offer to sell, and import the Covered Code and derivative works thereof
24solely to the minimum extent necessary to exercise the above copyright
25license, and in no event shall the patent license extend to any additions
26to or modifications of the Original Intel Code. No other license or right
27is granted directly or by implication, estoppel or otherwise;
28
29The above copyright and patent license is granted only if the following
30conditions are met:
31
323. Conditions
33
343.1. Redistribution of Source with Rights to Further Distribute Source.
35Redistribution of source code of any substantial portion of the Covered
36Code or modification with rights to further distribute source must include
37the above Copyright Notice, the above License, this list of Conditions,
38and the following Disclaimer and Export Compliance provision. In addition,
39Licensee must cause all Covered Code to which Licensee contributes to
40contain a file documenting the changes Licensee made to create that Covered
41Code and the date of any change. Licensee must include in that file the
42documentation of any changes made by any predecessor Licensee. Licensee
43must include a prominent statement that the modification is derived,
44directly or indirectly, from Original Intel Code.
45
463.2. Redistribution of Source with no Rights to Further Distribute Source.
47Redistribution of source code of any substantial portion of the Covered
48Code or modification without rights to further distribute source must
49include the following Disclaimer and Export Compliance provision in the
50documentation and/or other materials provided with distribution. In
51addition, Licensee may not authorize further sublicense of source of any
52portion of the Covered Code, and must include terms to the effect that the
53license from Licensee to its licensee is limited to the intellectual
54property embodied in the software Licensee provides to its licensee, and
55not to intellectual property embodied in modifications its licensee may
56make.
57
583.3. Redistribution of Executable. Redistribution in executable form of any
59substantial portion of the Covered Code or modification must reproduce the
60above Copyright Notice, and the following Disclaimer and Export Compliance
61provision in the documentation and/or other materials provided with the
62distribution.
63
643.4. Intel retains all right, title, and interest in and to the Original
65Intel Code.
66
673.5. Neither the name Intel nor any other trademark owned or controlled by
68Intel shall be used in advertising or otherwise to promote the sale, use or
69other dealings in products derived from or relating to the Covered Code
70without prior written authorization from Intel.
71
724. Disclaimer and Export Compliance
73
744.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
75HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
76IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
77INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
78UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
79IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
80PARTICULAR PURPOSE.
81
824.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
83OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
84COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
85SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
86CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
87HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
88SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
89LIMITED REMEDY.
90
914.3. Licensee shall not export, either directly or indirectly, any of this
92software or system incorporating such software without first obtaining any
93required license or other approval from the U. S. Department of Commerce or
94any other agency or department of the United States Government. In the
95event Licensee exports any such software from the United States or
96re-exports any such software from a foreign destination, Licensee shall
97ensure that the distribution and export/re-export of the software is in
98compliance with all laws, regulations, orders, or other restrictions of the
99U.S. Export Administration Regulations. Licensee agrees that neither it nor
100any of its subsidiaries will export/re-export any technical data, process,
101software, or service, directly or indirectly, to any country for which the
102United States government or any agency thereof requires an export license,
103other governmental approval, or letter of assurance, without first obtaining
104such license, approval or letter.
diff --git a/recipes-containers/criu/criu_git.bb b/recipes-containers/criu/criu_git.bb
new file mode 100644
index 00000000..878827f8
--- /dev/null
+++ b/recipes-containers/criu/criu_git.bb
@@ -0,0 +1,29 @@
1SUMMARY = "CRIU"
2DESCRIPTION = "Checkpoint/Restore In Userspace, or CRIU, is a software tool for Linux operating system. Using this tool, you can freeze a running application (or part of it) and checkpoint it to a hard drive as a collection of files. You can then use the files to restore and run the application from the point it was frozen at. The distinctive feature of the CRIU project is that it is mainly implemented in user space"
3HOMEPAGE = "http://criu.org"
4SECTION = "console/tools"
5LICENSE = "GPLv2"
6
7LIC_FILES_CHKSUM = "file://COPYING;md5=12920dfe6b35a0758155f0e62878b366"
8
9SRCREV = "d81c9a4618db2f618bdb8e207b7f0fec631c7142"
10PR = "r0"
11PV = "0.2+git${SRCPV}"
12
13SRC_URI = "git://git.criu.org/crtools.git;protocol=git \
14 file://0001-Fixed-hardcoding.patch"
15
16DEPENDS += "protobuf-c-native protobuf-c"
17
18S = "${WORKDIR}/git"
19
20EXTRA_OEMAKE += "ARCH=${TARGET_ARCH} WERROR=0"
21
22do_compile () {
23 oe_runmake
24}
25
26do_install () {
27 mkdir -p ${D}/${bindir}
28 install -m 755 ${S}/crtools ${D}/${bindir}/crtools
29} \ No newline at end of file
diff --git a/recipes-containers/criu/files/0001-Fixed-hardcoding.patch b/recipes-containers/criu/files/0001-Fixed-hardcoding.patch
new file mode 100644
index 00000000..5ff0a78d
--- /dev/null
+++ b/recipes-containers/criu/files/0001-Fixed-hardcoding.patch
@@ -0,0 +1,47 @@
1From 32c6c037a6de0a0972e16949ebb64ffebb5b7bcc Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?David=20Nystr=C3=B6m?= <david.nystrom@enea.com>
3Date: Wed, 28 Nov 2012 15:07:27 +0100
4Subject: [PATCH] Fixed hardcoding
5
6---
7 Makefile.inc | 24 ++++++++++++------------
8 1 file changed, 12 insertions(+), 12 deletions(-)
9
10diff --git a/Makefile.inc b/Makefile.inc
11index 722cbfc..3ae693e 100644
12--- a/Makefile.inc
13+++ b/Makefile.inc
14@@ -11,18 +11,18 @@ else
15 endif
16 export E Q
17
18-FIND := find
19-CSCOPE := cscope
20-TAGS := ctags
21-RM := rm
22-LD := ld
23-HEXDUMP := hexdump
24-CC := gcc
25-ECHO := echo
26-NM := nm
27-AWK := awk
28-SH := sh
29-MAKE := make
30+FIND ?= find
31+CSCOPE ?= cscope
32+TAGS ?= ctags
33+RM ?= rm
34+LD ?= ld
35+HEXDUMP ?= hexdump
36+CC ?= gcc
37+ECHO ?= echo
38+NM ?= nm
39+AWK ?= awk
40+SH ?= sh
41+MAKE ?= make
42
43 # Additional ARCH settings for x86
44 ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
45--
461.7.9.5
47
diff --git a/recipes-containers/criu/files/disable_tests.patch b/recipes-containers/criu/files/disable_tests.patch
new file mode 100644
index 00000000..dac89421
--- /dev/null
+++ b/recipes-containers/criu/files/disable_tests.patch
@@ -0,0 +1,19 @@
1diff -Naur protobuf-c-0.15.old/src/Makefile.am protobuf-c-0.15/src/Makefile.am
2--- protobuf-c-0.15.old/src/Makefile.am 2012-11-28 14:59:57.845251943 +0100
3+++ protobuf-c-0.15/src/Makefile.am 2012-11-28 15:00:23.549252632 +0100
4@@ -1,5 +1,5 @@
5 if BUILD_PROTOC_C
6-SUBDIRS = . test
7+
8 bin_PROGRAMS = protoc-c
9 protoc_c_SOURCES = \
10 google/protobuf/compiler/c/c_service.cc \
11@@ -23,7 +23,7 @@
12 lib_LTLIBRARIES = libprotobuf-c.la
13 protobufcincludedir = $(includedir)/google/protobuf-c
14
15-EXTRA_DIST = CMakeLists.txt test/CMakeLists.txt
16+EXTRA_DIST = CMakeLists.txt
17
18 libprotobuf_c_la_SOURCES = \
19 google/protobuf-c/protobuf-c-dispatch.c \
diff --git a/recipes-containers/criu/protobuf-c_0.15.bb b/recipes-containers/criu/protobuf-c_0.15.bb
new file mode 100644
index 00000000..d9d4fd97
--- /dev/null
+++ b/recipes-containers/criu/protobuf-c_0.15.bb
@@ -0,0 +1,20 @@
1SUMMARY = "protobuf-c"
2DESCRIPTION = "This package provides a code generator and runtime libraries to use Protocol Buffers from pure C"
3HOMEPAGE = "http://code.google.com/p/protobuf-c/"
4SECTION = "console/tools"
5LICENSE = "Apache-2.0"
6
7LIC_FILES_CHKSUM = "file://src/google/protobuf-c/protobuf-c.c;endline=33;md5=333140fae7cf8a38dc5f980ddb63704b"
8
9PR = "r0"
10
11DEPENDS = "protobuf"
12
13SRC_URI[md5sum] = "73ff0c8df50d2eee75269ad8f8c07dc8"
14SRC_URI[sha256sum] = "8fcb538e13a5431c46168fc8f2e6ad2574e2db9b684c0c72b066e24f010a0036"
15SRC_URI = "http://protobuf-c.googlecode.com/files/protobuf-c-${PV}.tar.gz \
16 file://disable_tests.patch"
17
18inherit autotools
19
20BBCLASSEXTEND = "native nativesdk" \ No newline at end of file
diff --git a/recipes-containers/criu/protobuf_2.4.1.bb b/recipes-containers/criu/protobuf_2.4.1.bb
new file mode 100644
index 00000000..d8f1b530
--- /dev/null
+++ b/recipes-containers/criu/protobuf_2.4.1.bb
@@ -0,0 +1,18 @@
1SUMMARY = "protobuf"
2DESCRIPTION = "Protocol Buffers are a way of encoding structured data in an efficient yet extensible format. Google uses Protocol Buffers for almost all of its internal RPC protocols and file formats."
3HOMEPAGE = "http://code.google.com/p/protobuf/"
4SECTION = "console/tools"
5LICENSE = "BSD-3-Clause"
6
7LIC_FILES_CHKSUM = "file://COPYING.txt;md5=af6809583bfde9a31595a58bb4a24514"
8
9PR = "r0"
10
11SRC_URI[md5sum] = "dc84e9912ea768baa1976cb7bbcea7b5"
12SRC_URI[sha256sum] = "eac6969b617f397247e805267da2b0db3ff9e5a9163b123503a192fbb5776567"
13SRC_URI = "http://protobuf.googlecode.com/files/protobuf-${PV}.tar.gz"
14
15EXTRA_OECONF += " --with-protoc=echo"
16inherit autotools
17
18BBCLASSEXTEND = "native nativesdk" \ No newline at end of file
diff --git a/recipes-containers/lxc/files/config_network_type-set-macvlan-default-mode-to-priv.patch b/recipes-containers/lxc/files/config_network_type-set-macvlan-default-mode-to-priv.patch
new file mode 100644
index 00000000..8cb321bb
--- /dev/null
+++ b/recipes-containers/lxc/files/config_network_type-set-macvlan-default-mode-to-priv.patch
@@ -0,0 +1,43 @@
1From 261658e80014c031852a024f8794dd7f2a2351ad Mon Sep 17 00:00:00 2001
2From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
3Date: Fri, 28 Mar 2014 10:31:41 -0400
4Subject: [PATCH] config_network_type: set macvlan default mode to private
5
6If a default mode is not set, the container requires an explicit
7mode specified in the config file, otherwise creating the
8container fails.
9
10Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
11Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
12---
13 src/lxc/confile.c | 6 +++++-
14 1 file changed, 5 insertions(+), 1 deletion(-)
15
16diff --git a/src/lxc/confile.c b/src/lxc/confile.c
17index d6cf151..90fb344 100644
18--- a/src/lxc/confile.c
19+++ b/src/lxc/confile.c
20@@ -303,6 +303,8 @@ out:
21 return ret;
22 }
23
24+static int macvlan_mode(int *valuep, const char *value);
25+
26 static int config_network_type(const char *key, const char *value,
27 struct lxc_conf *lxc_conf)
28 {
29@@ -337,8 +339,10 @@ static int config_network_type(const char *key, const char *value,
30
31 if (!strcmp(value, "veth"))
32 netdev->type = LXC_NET_VETH;
33- else if (!strcmp(value, "macvlan"))
34+ else if (!strcmp(value, "macvlan")) {
35 netdev->type = LXC_NET_MACVLAN;
36+ macvlan_mode(&netdev->priv.macvlan_attr.mode, "private");
37+ }
38 else if (!strcmp(value, "vlan"))
39 netdev->type = LXC_NET_VLAN;
40 else if (!strcmp(value, "phys"))
41--
421.9.rc1
43
diff --git a/recipes-containers/lxc/files/lxc-1.0.0-disable-udhcp-from-busybox-template.patch b/recipes-containers/lxc/files/lxc-1.0.0-disable-udhcp-from-busybox-template.patch
new file mode 100644
index 00000000..723be277
--- /dev/null
+++ b/recipes-containers/lxc/files/lxc-1.0.0-disable-udhcp-from-busybox-template.patch
@@ -0,0 +1,24 @@
1From d7e07e7acb1cbad33806f49143a2a30b4468c369 Mon Sep 17 00:00:00 2001
2From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
3Date: Mon, 8 Apr 2013 18:30:19 +0300
4Subject: [PATCH] lxc-0.9.0-disable-udhcp-from-busybox-template
5
6---
7 templates/lxc-busybox.in | 1 -
8 1 file changed, 1 deletion(-)
9
10diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in
11index cb425ec..bb8c951 100644
12--- a/templates/lxc-busybox.in
13+++ b/templates/lxc-busybox.in
14@@ -84,7 +84,6 @@ EOF
15 #!/bin/sh
16 /bin/syslogd
17 /bin/mount -a
18-/bin/udhcpc
19 EOF
20
21 # executable
22--
231.7.11.7
24
diff --git a/recipes-containers/lxc/files/lxc-busybox-follow-symlinks-when-inspecting-busybox-.patch b/recipes-containers/lxc/files/lxc-busybox-follow-symlinks-when-inspecting-busybox-.patch
new file mode 100644
index 00000000..6882c16e
--- /dev/null
+++ b/recipes-containers/lxc/files/lxc-busybox-follow-symlinks-when-inspecting-busybox-.patch
@@ -0,0 +1,27 @@
1From 50dbb8209bf65e4d24ccd06d3ca05004d0ddc63c Mon Sep 17 00:00:00 2001
2From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
3Date: Mon, 24 Mar 2014 12:43:03 -0400
4Subject: [PATCH] lxc-busybox: follow symlinks when inspecting busybox binary
5
6Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
7Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8---
9 templates/lxc-busybox.in | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in
13index e5a512a..246e743 100644
14--- a/templates/lxc-busybox.in
15+++ b/templates/lxc-busybox.in
16@@ -187,7 +187,7 @@ configure_busybox()
17 return 1
18 fi
19
20- file $(which busybox) | grep -q "statically linked"
21+ file -L $(which busybox) | grep -q "statically linked"
22 if [ $? -ne 0 ]; then
23 echo "warning : busybox is not statically linked."
24 echo "warning : The template script may not correctly"
25--
261.9.rc1
27
diff --git a/recipes-containers/lxc/files/network.c-Add-missing-LXC_NET_NONE-option-refactor.patch b/recipes-containers/lxc/files/network.c-Add-missing-LXC_NET_NONE-option-refactor.patch
new file mode 100644
index 00000000..81fde835
--- /dev/null
+++ b/recipes-containers/lxc/files/network.c-Add-missing-LXC_NET_NONE-option-refactor.patch
@@ -0,0 +1,38 @@
1From b343592b45c91db8c18e863fac5ab8eeb94445d6 Mon Sep 17 00:00:00 2001
2From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
3Date: Wed, 26 Mar 2014 11:35:09 -0400
4Subject: [PATCH] network.c: Add missing LXC_NET_NONE option + refactor
5
6Add LXC_NET_NONE to known lxc_network_types, so parsing a config
7file with lxc.network.type = none does not result in failure
8(e.g. doc/examples/lxc-no-netns.conf). Options have also been
9reordered to match the enum in conf.h.
10
11Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
12Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
13---
14 src/lxc/network.c | 5 +++--
15 1 file changed, 3 insertions(+), 2 deletions(-)
16
17diff --git a/src/lxc/network.c b/src/lxc/network.c
18index 090b9bd..a9900de 100644
19--- a/src/lxc/network.c
20+++ b/src/lxc/network.c
21@@ -1202,11 +1202,12 @@ int lxc_bridge_attach(const char *bridge, const char *ifname)
22 }
23
24 static const char* const lxc_network_types[LXC_NET_MAXCONFTYPE + 1] = {
25+ [LXC_NET_EMPTY] = "empty",
26 [LXC_NET_VETH] = "veth",
27 [LXC_NET_MACVLAN] = "macvlan",
28- [LXC_NET_VLAN] = "vlan",
29 [LXC_NET_PHYS] = "phys",
30- [LXC_NET_EMPTY] = "empty",
31+ [LXC_NET_VLAN] = "vlan",
32+ [LXC_NET_NONE] = "none",
33 };
34
35 const char *lxc_net_type_to_str(int type)
36--
371.9.rc1
38
diff --git a/recipes-containers/lxc/files/run-ptest b/recipes-containers/lxc/files/run-ptest
new file mode 100644
index 00000000..23a6256b
--- /dev/null
+++ b/recipes-containers/lxc/files/run-ptest
@@ -0,0 +1,4 @@
1#!/bin/sh
2
3make -C src/tests -k check-TESTS
4
diff --git a/recipes-containers/lxc/files/runtest.patch b/recipes-containers/lxc/files/runtest.patch
new file mode 100644
index 00000000..e4e034b2
--- /dev/null
+++ b/recipes-containers/lxc/files/runtest.patch
@@ -0,0 +1,32 @@
1Add install-ptest rule.
2
3Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com>
4Upstream-status: Pending
5
6diff -uNr a/src/tests/Makefile.am b/src/tests/Makefile.am
7--- a/src/tests/Makefile.am 2014-04-07 16:25:59.246238815 +0300
8+++ b/src/tests/Makefile.am 2014-04-10 18:09:43.195772467 +0300
9@@ -54,6 +54,23 @@
10
11 endif
12
13+TESTS = lxc-test-containertests lxc-test-locktests \
14+ lxc-test-getkeys lxc-test-lxcpath lxc-test-cgpath lxc-test-console \
15+ lxc-test-snapshot lxc-test-concurrent lxc-test-may-control \
16+ lxc-test-reboot lxc-test-list lxc-test-attach lxc-test-device-add-remove
17+
18+buildtest-TESTS: $(TESTS)
19+
20+install-ptest:
21+ install -d $(TEST_DIR)
22+ install -D ../lxc/liblxc.so $(TEST_DIR)/../lxc/liblxc.so
23+ install -D ../../config/test-driver $(TEST_DIR)/../../config/test-driver
24+ cp Makefile $(TEST_DIR)
25+ @(for file in $(TESTS); do install $$file $(TEST_DIR); done;)
26+ sed -i 's|^Makefile:|_Makefile:|' $(TEST_DIR)/Makefile
27+ sed -i 's|^all-am:|_all-am:|' $(TEST_DIR)/Makefile
28+ sed -i -e 's|^\(.*\.log:\) \(.*EXEEXT.*\)|\1|g' $(TEST_DIR)/Makefile
29+
30 EXTRA_DIST = \
31 cgpath.c \
32 clonetest.c \
diff --git a/recipes-containers/lxc/lxc_1.0.1.bb b/recipes-containers/lxc/lxc_1.0.1.bb
new file mode 100644
index 00000000..b366116d
--- /dev/null
+++ b/recipes-containers/lxc/lxc_1.0.1.bb
@@ -0,0 +1,78 @@
1DESCRIPTION = "lxc aims to use these new functionnalities to provide an userspace container object"
2SECTION = "console/utils"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
5PRIORITY = "optional"
6PR = "r4"
7DEPENDS = "libxml2 libcap"
8RDEPENDS_${PN} = " \
9 rsync \
10 gzip \
11 libcap-bin \
12 bridge-utils \
13 dnsmasq \
14 perl-module-strict \
15 perl-module-getopt-long \
16 perl-module-vars \
17 perl-module-warnings-register \
18 perl-module-exporter \
19 perl-module-constant \
20 perl-module-overload \
21 perl-module-exporter-heavy \
22"
23RDEPENDS_${PN}-ptest += "file make"
24
25SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \
26 file://lxc-1.0.0-disable-udhcp-from-busybox-template.patch \
27 file://config_network_type-set-macvlan-default-mode-to-priv.patch \
28 file://lxc-busybox-follow-symlinks-when-inspecting-busybox-.patch \
29 file://network.c-Add-missing-LXC_NET_NONE-option-refactor.patch \
30 file://runtest.patch \
31 file://run-ptest \
32 "
33SRC_URI[md5sum] = "3c7379891e45713817ec873a167070b0"
34SRC_URI[sha256sum] = "17d8e5b575207b4fb57da0b8ba2d13f3e5ee20ce8ccd1259d6eae4bd5ca575b1"
35
36S = "${WORKDIR}/${BPN}-${PV}"
37
38# Let's not configure for the host distro.
39#
40PTEST_CONF = "${@base_contains('DISTRO_FEATURES', 'ptest', '--enable-tests', '', d)}"
41EXTRA_OECONF += "--with-distro=${DISTRO} ${PTEST_CONF}"
42
43PACKAGECONFIG ??= ""
44PACKAGECONFIG[doc] = "--enable-doc,--disable-doc,,"
45PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath,,"
46PACKAGECONFIG[apparmour] = "--enable-apparmor,--disable-apparmor,apparmor,apparmor"
47
48inherit autotools pkgconfig ptest
49
50FILES_${PN}-doc = "${mandir} ${infodir}"
51# For LXC the docdir only contains example configuration files and should be included in the lxc package
52FILES_${PN} += "${docdir}"
53FILES_${PN}-dbg += "${libexecdir}/lxc/.debug"
54
55PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1"
56
57do_install_append() {
58 # The /var/cache/lxc directory created by the Makefile
59 # is wiped out in volatile, we need to create this at boot.
60 rm -rf ${D}${localstatedir}/cache
61 install -d ${D}${sysconfdir}/default/volatiles
62 echo "d root root 0755 ${localstatedir}/cache/lxc none" \
63 > ${D}${sysconfdir}/default/volatiles/99_lxc
64
65}
66
67EXTRA_OEMAKE += "TEST_DIR=${D}${PTEST_PATH}/src/tests"
68
69do_install_ptest() {
70 oe_runmake -C src/tests install-ptest
71}
72
73pkg_postinst_${PN}() {
74 if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
75 /etc/init.d/populate-volatile.sh update
76 fi
77}
78
diff --git a/recipes-core/base-files/base-files_3.0.14.bbappend b/recipes-core/base-files/base-files_3.0.14.bbappend
new file mode 100644
index 00000000..eb973adf
--- /dev/null
+++ b/recipes-core/base-files/base-files_3.0.14.bbappend
@@ -0,0 +1,5 @@
1do_install_append() {
2 if echo "${DISTRO_FEATURES}" | grep -q 'xen'; then
3 echo "xenfs /proc/xen xenfs defaults 0 0" >> ${D}${sysconfdir}/fstab
4 fi
5}
diff --git a/recipes-core/busybox/busybox/getopt.cfg b/recipes-core/busybox/busybox/getopt.cfg
new file mode 100644
index 00000000..8dcd3504
--- /dev/null
+++ b/recipes-core/busybox/busybox/getopt.cfg
@@ -0,0 +1,2 @@
1CONFIG_GETOPT=y
2CONFIG_FEATURE_GETOPT_LONG=y
diff --git a/recipes-core/busybox/busybox/lspci.cfg b/recipes-core/busybox/busybox/lspci.cfg
new file mode 100644
index 00000000..6458af84
--- /dev/null
+++ b/recipes-core/busybox/busybox/lspci.cfg
@@ -0,0 +1 @@
CONFIG_LSPCI=y
diff --git a/recipes-core/busybox/busybox/lsusb.cfg b/recipes-core/busybox/busybox/lsusb.cfg
new file mode 100644
index 00000000..2aba6ef6
--- /dev/null
+++ b/recipes-core/busybox/busybox/lsusb.cfg
@@ -0,0 +1 @@
CONFIG_LSUSB=y
diff --git a/recipes-core/busybox/busybox/mdev.cfg b/recipes-core/busybox/busybox/mdev.cfg
new file mode 100644
index 00000000..f8d6da82
--- /dev/null
+++ b/recipes-core/busybox/busybox/mdev.cfg
@@ -0,0 +1,6 @@
1CONFIG_MDEV=y
2CONFIG_FEATURE_MDEV_CONF=y
3CONFIG_FEATURE_MDEV_RENAME=y
4CONFIG_FEATURE_MDEV_RENAME_REGEXP=y
5CONFIG_FEATURE_MDEV_EXEC=y
6CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y
diff --git a/recipes-core/busybox/busybox/mount-cifs.cfg b/recipes-core/busybox/busybox/mount-cifs.cfg
new file mode 100644
index 00000000..88f0404f
--- /dev/null
+++ b/recipes-core/busybox/busybox/mount-cifs.cfg
@@ -0,0 +1 @@
CONFIG_FEATURE_MOUNT_CIFS=y
diff --git a/recipes-core/busybox/busybox/ps-extras.cfg b/recipes-core/busybox/busybox/ps-extras.cfg
new file mode 100644
index 00000000..74346355
--- /dev/null
+++ b/recipes-core/busybox/busybox/ps-extras.cfg
@@ -0,0 +1,3 @@
1CONFIG_DESKTOP=y
2CONFIG_FEATURE_PS_TIME=y
3CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS=y
diff --git a/recipes-core/busybox/busybox_1.22.1.bbappend b/recipes-core/busybox/busybox_1.22.1.bbappend
new file mode 100644
index 00000000..8369a031
--- /dev/null
+++ b/recipes-core/busybox/busybox_1.22.1.bbappend
@@ -0,0 +1,10 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
3SRC_URI += " \
4 file://lspci.cfg \
5 file://lsusb.cfg \
6 file://mdev.cfg \
7 file://mount-cifs.cfg \
8 file://ps-extras.cfg \
9 file://getopt.cfg \
10 "
diff --git a/recipes-core/initscripts/initscripts_1.0.bbappend b/recipes-core/initscripts/initscripts_1.0.bbappend
new file mode 100644
index 00000000..0600ab2a
--- /dev/null
+++ b/recipes-core/initscripts/initscripts_1.0.bbappend
@@ -0,0 +1,16 @@
1do_install_append() {
2
3 echo >> ${D}${sysconfdir}/init.d/functions
4 echo success \(\) \{ >> ${D}${sysconfdir}/init.d/functions
5 echo \ \ \ \ echo \$* >> ${D}${sysconfdir}/init.d/functions
6 echo \} >> ${D}${sysconfdir}/init.d/functions
7 echo failure \(\) \{ >> ${D}${sysconfdir}/init.d/functions
8 echo \ \ \ \ echo \$* >> ${D}${sysconfdir}/init.d/functions
9 echo \} >> ${D}${sysconfdir}/init.d/functions
10 echo warning \(\) \{ >> ${D}${sysconfdir}/init.d/functions
11 echo \ \ \ \ echo \$* >> ${D}${sysconfdir}/init.d/functions
12 echo \} >> ${D}${sysconfdir}/init.d/functions
13 echo begin \(\) \{ >> ${D}${sysconfdir}/init.d/functions
14 echo \ \ \ \ echo \$* >> ${D}${sysconfdir}/init.d/functions
15 echo \} >> ${D}${sysconfdir}/init.d/functions
16}
diff --git a/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bbappend b/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bbappend
new file mode 100644
index 00000000..1b89aecd
--- /dev/null
+++ b/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bbappend
@@ -0,0 +1,6 @@
1do_install_append() {
2 if echo "${DISTRO_FEATURES}" | grep -q 'xen'; then
3 echo "" >> ${D}${sysconfdir}/inittab
4 echo "X0:12345:respawn:/sbin/getty 115200 hvc0" >> ${D}${sysconfdir}/inittab
5 fi
6}
diff --git a/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch b/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
new file mode 100644
index 00000000..2589bdec
--- /dev/null
+++ b/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
@@ -0,0 +1,138 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3# We need to ensure our host tools get run during build, not the freshly
4# built cross-tools (this will not work), so we introduce HOSTPYTHON and HOSTPGEN.
5# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
6
7Index: Python-2.7.2/Makefile.pre.in
8===================================================================
9--- Python-2.7.2.orig/Makefile.pre.in
10+++ Python-2.7.2/Makefile.pre.in
11@@ -182,6 +182,7 @@ UNICODE_OBJS= @UNICODE_OBJS@
12
13 PYTHON= python$(EXE)
14 BUILDPYTHON= python$(BUILDEXE)
15+HOSTPYTHON= $(BUILDPYTHON)
16
17 # The task to run while instrument when building the profile-opt target
18 PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
19@@ -214,7 +215,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
20 ##########################################################################
21 # Parser
22 PGEN= Parser/pgen$(EXE)
23-
24+HOSTPGEN= $(PGEN)$(EXE)
25 POBJS= \
26 Parser/acceler.o \
27 Parser/grammar1.o \
28@@ -401,14 +402,14 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA
29 $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
30
31 platform: $(BUILDPYTHON)
32- $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
33+ $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
34
35
36 # Build the shared modules
37 sharedmods: $(BUILDPYTHON)
38 @case $$MAKEFLAGS in \
39- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
40- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
41+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
42+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
43 esac
44
45 # Build static library
46@@ -542,7 +543,7 @@ Modules/python.o: $(srcdir)/Modules/pyth
47 $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp
48 Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT)
49 -@$(INSTALL) -d Include
50- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
51+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
52 -touch Parser/pgen.stamp
53
54 $(PGEN): $(PGENOBJS)
55@@ -926,25 +927,25 @@ libinstall: build_all $(srcdir)/Lib/$(PL
56 done
57 $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
58 PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
59- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
60+ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
61 -d $(LIBDEST) -f \
62 -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
63 $(DESTDIR)$(LIBDEST)
64 PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
65- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
66+ $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
67 -d $(LIBDEST) -f \
68 -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
69 $(DESTDIR)$(LIBDEST)
70 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
71- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
72+ $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
73 -d $(LIBDEST)/site-packages -f \
74 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
75 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
76- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
77+ $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
78 -d $(LIBDEST)/site-packages -f \
79 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
80 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
81- ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
82+ $(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
83
84 # Create the PLATDIR source directory, if one wasn't distributed..
85 $(srcdir)/Lib/$(PLATDIR):
86@@ -1049,7 +1050,7 @@ libainstall: all python-config
87 # Install the dynamically loadable modules
88 # This goes into $(exec_prefix)
89 sharedinstall: sharedmods
90- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
91+ $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
92 --prefix=$(prefix) \
93 --install-scripts=$(BINDIR) \
94 --install-platlib=$(DESTSHARED) \
95Index: Python-2.7.2/setup.py
96===================================================================
97--- Python-2.7.2.orig/setup.py
98+++ Python-2.7.2/setup.py
99@@ -313,6 +313,7 @@ class PyBuildExt(build_ext):
100 self.failed.append(ext.name)
101 self.announce('*** WARNING: renaming "%s" since importing it'
102 ' failed: %s' % (ext.name, why), level=3)
103+ return
104 assert not self.inplace
105 basename, tail = os.path.splitext(ext_filename)
106 newname = basename + "_failed" + tail
107@@ -369,8 +370,8 @@ class PyBuildExt(build_ext):
108
109 def detect_modules(self):
110 # Ensure that /usr/local is always used
111- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
112- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
113+ #add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
114+ #add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
115 self.add_multiarch_paths()
116
117 # Add paths specified in the environment variables LDFLAGS and
118@@ -475,6 +476,9 @@ class PyBuildExt(build_ext):
119
120 # XXX Omitted modules: gl, pure, dl, SGI-specific modules
121
122+ lib_dirs = [ os.getenv( "STAGING_LIBDIR" ) ]
123+ inc_dirs = [ os.getenv( "STAGING_INCDIR" ) ]
124+ lib_dirs += os.getenv('LIBRARY_PATH', '').split(os.pathsep)
125 #
126 # The following modules are all pretty straightforward, and compile
127 # on pretty much any POSIXish platform.
128@@ -677,8 +681,8 @@ class PyBuildExt(build_ext):
129 elif curses_library:
130 readline_libs.append(curses_library)
131 elif self.compiler.find_library_file(lib_dirs +
132- ['/usr/lib/termcap'],
133- 'termcap'):
134+ ['/usr/lib/termcap'],
135+ 'termcap'):
136 readline_libs.append('termcap')
137 exts.append( Extension('readline', ['readline.c'],
138 library_dirs=['/usr/lib/termcap'],
diff --git a/recipes-devtools/python/python_2.7.3.bbappend b/recipes-devtools/python/python_2.7.3.bbappend
new file mode 100644
index 00000000..55301c7e
--- /dev/null
+++ b/recipes-devtools/python/python_2.7.3.bbappend
@@ -0,0 +1,8 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
3DEPENDS += " ncurses"
4
5do_compile_prepend() {
6 export LIBRARY_PATH=${STAGING_DIR_TARGET}/lib
7}
8
diff --git a/recipes-extended/dev86/dev86_0.16.19.bb b/recipes-extended/dev86/dev86_0.16.19.bb
new file mode 100644
index 00000000..807504ed
--- /dev/null
+++ b/recipes-extended/dev86/dev86_0.16.19.bb
@@ -0,0 +1,37 @@
1DESCRIPTION = "This is a cross development C compiler, assembler and linker environment for the production of 8086 executables (Optionally MSDOS COM)"
2HOMEPAGE = "http://www.debath.co.uk/dev86/"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
5SECTION = "console/tools"
6PR="r0"
7
8SRC_URI="http://www.debath.co.uk/dev86/Dev86src-${PV}.tar.gz"
9
10SRC_URI[md5sum] = "442e98e1afa23fe00d40c5a996385942"
11SRC_URI[sha256sum] = "33398b87ca85e2b69e4062cf59f2f7354af46da5edcba036c6f97bae17b8d00e"
12
13S = "${WORKDIR}/dev86-${PV}"
14
15BBCLASSEXTEND = "native"
16EXTRA_OEMAKE = "VERSION=${PV} PREFIX=${prefix} DIST=${D}"
17
18do_compile() {
19
20 oe_runmake make.fil
21 oe_runmake -f make.fil bcc86 as86 ld86
22
23}
24
25do_install() {
26
27 if [ "${prefix}"=="" ] ; then
28 export prefix=/usr
29 fi
30
31 oe_runmake install-bcc
32 ln -s ../lib/bcc/bcc-cpp ${D}${prefix}/bin/bcc-cpp
33 ln -s ../lib/bcc/bcc-cc1 ${D}${prefix}/bin/bcc-cc1
34
35}
36COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
37FILES_${PN} += "${libdir}/bcc"
diff --git a/recipes-extended/iasl/iasl_20120215.bb b/recipes-extended/iasl/iasl_20120215.bb
new file mode 100644
index 00000000..5ce09300
--- /dev/null
+++ b/recipes-extended/iasl/iasl_20120215.bb
@@ -0,0 +1,29 @@
1DESCRIPTION = "This is a cross development C compiler, assembler and linker environment for the production of 8086 executables (Optionally MSDOS COM)"
2HOMEPAGE = "http://www.acpica.org/"
3LICENSE = "Intel-ACPI"
4LIC_FILES_CHKSUM = "file://asldefine.h;endline=115;md5=d4d7cf809b8b5e03131327b3f718e8f0"
5SECTION = "console/tools"
6PR="r1"
7
8DEPENDS="flex bison"
9
10SRC_URI="https://acpica.org/sites/acpica/files/acpica-unix-${PV}.tar.gz"
11
12SRC_URI[md5sum] = "324c89e5bb9002e2711e0494290ceacc"
13SRC_URI[sha256sum] = "b2b497415f29ddbefe7be8b9429b62c1f1f6e1ec11456928e4e7da86578e5b8d"
14
15S="${WORKDIR}/acpica-unix-${PV}/source/compiler"
16
17NATIVE_INSTALL_WORKS = "1"
18BBCLASSEXTEND = "native"
19
20do_compile() {
21 CFLAGS="-Wno-error=redundant-decls" $MAKE
22}
23
24do_install() {
25 mkdir -p ${D}${prefix}/bin
26 cp ${S}/iasl ${D}${prefix}/bin
27}
28
29
diff --git a/recipes-extended/images/cloud-image-compute.bb b/recipes-extended/images/cloud-image-compute.bb
new file mode 100644
index 00000000..197624f9
--- /dev/null
+++ b/recipes-extended/images/cloud-image-compute.bb
@@ -0,0 +1,14 @@
1IMAGE_FEATURES += "ssh-server-openssh"
2EXTRA_IMAGE_FEATURES = "tools-debug debug-tweaks"
3
4IMAGE_INSTALL = "\
5 ${CORE_IMAGE_BASE_INSTALL} \
6 packagegroup-core-basic \
7 openvswitch \
8 libvirt \
9 openflow \
10 "
11
12inherit core-image
13
14IMAGE_FSTYPES = "tar.gz"
diff --git a/recipes-extended/images/cloud-image-controller.bb b/recipes-extended/images/cloud-image-controller.bb
new file mode 100644
index 00000000..74f724b7
--- /dev/null
+++ b/recipes-extended/images/cloud-image-controller.bb
@@ -0,0 +1,34 @@
1IMAGE_FEATURES += "ssh-server-openssh package-management"
2EXTRA_IMAGE_FEATURES = "tools-debug debug-tweaks"
3
4IMAGE_INSTALL = "\
5 ${CORE_IMAGE_BASE_INSTALL} \
6 ${ROOTFS_PKGMANAGE_BOOTSTRAP} \
7 packagegroup-core-basic \
8 openvswitch \
9 openvswitch-controller \
10 openvswitch-switch \
11 openvswitch-brcompat \
12 criu \
13 libvirt \
14 libvirt-libvirtd \
15 libvirt-python \
16 libvirt-virsh \
17 openflow \
18 qemu \
19 kernel-modules \
20 dhcp-client \
21 perl-modules \
22 grub \
23 mysql5 \
24 python-twisted \
25 python-lxml \
26 "
27
28inherit core-image
29inherit image-vmdk
30
31IMAGE_FSTYPES = "vmdk tar.gz"
32
33# Ensure extra space for guest images
34#IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
diff --git a/recipes-extended/images/cloud-image-guest.bb b/recipes-extended/images/cloud-image-guest.bb
new file mode 100644
index 00000000..818a5131
--- /dev/null
+++ b/recipes-extended/images/cloud-image-guest.bb
@@ -0,0 +1,18 @@
1IMAGE_FEATURES += "ssh-server-openssh package-management"
2EXTRA_IMAGE_FEATURES = "tools-debug debug-tweaks"
3
4IMAGE_INSTALL = "\
5 ${CORE_IMAGE_BASE_INSTALL} \
6 ${ROOTFS_PKGMANAGE_BOOTSTRAP} \
7 packagegroup-core-basic \
8 openflow \
9 qemu \
10 kernel-modules \
11 tcpdump \
12 dhcp-client \
13 "
14
15inherit core-image
16inherit image-vmdk
17
18IMAGE_FSTYPES += "vmdk"
diff --git a/recipes-extended/images/kvm-image-minimal.bb b/recipes-extended/images/kvm-image-minimal.bb
new file mode 100644
index 00000000..abc0feed
--- /dev/null
+++ b/recipes-extended/images/kvm-image-minimal.bb
@@ -0,0 +1,25 @@
1DESCRIPTION = "A minimal kvm image"
2
3IMAGE_INSTALL = " \
4 packagegroup-core-boot \
5 ${ROOTFS_PKGMANAGE_BOOTSTRAP} \
6 qemu \
7 libvirt \
8 libvirt-libvirtd \
9 libvirt-virsh \
10 kernel-module-kvm \
11 kernel-module-kvm-intel \
12 kernel-module-kvm-amd \
13 "
14
15IMAGE_FEATURES += "ssh-server-openssh"
16
17IMAGE_LINGUAS = " "
18
19LICENSE = "MIT"
20
21inherit core-image
22
23IMAGE_ROOTFS_SIZE = "8192"
24
25ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; "
diff --git a/recipes-extended/images/xen-bootimg.inc b/recipes-extended/images/xen-bootimg.inc
new file mode 100644
index 00000000..093aa683
--- /dev/null
+++ b/recipes-extended/images/xen-bootimg.inc
@@ -0,0 +1,35 @@
1SYSLINUX_TIMEOUT = "10"
2SYSLINUX_LABEL = "boot"
3SYSLINUX_XEN_APPEND = "dom0_mem=1048576"
4SYSLINUX_KERNEL_APPEND = "ramdisk_size=32768 root=/dev/ram0 rw console=tty0 console=ttyS0,115200n8"
5#LABELS_append = " ${SYSLINUX_LABEL} "
6
7INITRD = "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.cpio.lzma"
8
9do_bootimg[depends] += "${IMAGE_BASENAME}:do_rootfs"
10
11inherit bootimg
12
13syslinux_populate_append() {
14 install -m 0444 ${STAGING_LIBDIR}/syslinux/mboot.c32 ${HDDDIR}${SYSLINUXDIR}/mboot.c32
15}
16
17grubefi_populate_append() {
18 install -m 0644 ${DEPLOY_DIR_IMAGE}/xen-${MACHINE}.gz ${DEST}${EFIDIR}/xen.gz
19}
20
21populate_append() {
22 install -m 0644 ${DEPLOY_DIR_IMAGE}/xen-${MACHINE}.gz ${DEST}/xen.gz
23}
24
25build_syslinux_cfg() {
26 echo ALLOWOPTIONS 1 > ${SYSLINUXCFG}
27 echo SERIAL 0 115200 > ${SYSLINUXCFG}
28 echo DEFAULT ${SYSLINUX_LABEL} >> ${SYSLINUXCFG}
29 echo TIMEOUT ${SYSLINUX_TIMEOUT} >> ${SYSLINUXCFG}
30 echo PROMPT 1 >> ${SYSLINUXCFG}
31 echo LABEL ${SYSLINUX_LABEL} >> ${SYSLINUXCFG}
32 echo KERNEL mboot.c32 >> ${SYSLINUXCFG}
33 echo APPEND xen.gz ${SYSLINUX_XEN_APPEND} --- vmlinuz ${SYSLINUX_KERNEL_APPEND} --- initrd >> ${SYSLINUXCFG}
34}
35
diff --git a/recipes-extended/images/xen-guest-image-minimal.bb b/recipes-extended/images/xen-guest-image-minimal.bb
new file mode 100644
index 00000000..bcac4d79
--- /dev/null
+++ b/recipes-extended/images/xen-guest-image-minimal.bb
@@ -0,0 +1,16 @@
1DESCRIPTION = "A Xen guest image."
2
3inherit core-image
4
5IMAGE_INSTALL += " \
6 packagegroup-core-boot \
7 kernel-module-xen-acpi-processor \
8 "
9
10IMAGE_INSTALL += "${@base_contains('DISTRO_FEATURES', 'x11', ' xf86-video-fbdev', '', d)}"
11IMAGE_INSTALL += "${@base_contains('DISTRO_FEATURES', 'x11', ' xf86-video-vesa', '', d)}"
12
13LICENSE = "MIT"
14
15# Send console messages to xen console
16APPEND += "console=hvc0"
diff --git a/recipes-extended/images/xen-image-minimal.bb b/recipes-extended/images/xen-image-minimal.bb
new file mode 100644
index 00000000..13917c5c
--- /dev/null
+++ b/recipes-extended/images/xen-image-minimal.bb
@@ -0,0 +1,53 @@
1DESCRIPTION = "A minimal xen image"
2
3INITRD_IMAGE = "core-image-minimal-initramfs"
4
5IMAGE_INSTALL += " \
6 packagegroup-core-boot \
7 packagegroup-core-ssh-openssh \
8 kernel-module-xen-acpi-processor \
9 kernel-module-xen-blkback \
10 kernel-module-xen-gntalloc \
11 kernel-module-xen-gntdev \
12 kernel-module-xen-netback \
13 kernel-module-xen-pciback \
14 kernel-module-xen-wdt \
15 xen-base \
16 xen-qemu \
17 "
18
19LICENSE = "MIT"
20
21inherit core-image
22
23syslinux_iso_populate_append() {
24 install -m 0444 ${STAGING_DATADIR}/syslinux/libcom32.c32 ${ISODIR}${ISOLINUXDIR}
25 install -m 0444 ${STAGING_DATADIR}/syslinux/mboot.c32 ${ISODIR}${ISOLINUXDIR}
26}
27
28syslinux_hddimg_populate_append() {
29 install -m 0444 ${STAGING_DATADIR}/syslinux/libcom32.c32 ${HDDDIR}${SYSLINUXDIR}
30 install -m 0444 ${STAGING_DATADIR}/syslinux/mboot.c32 ${HDDDIR}${SYSLINUXDIR}
31}
32
33grubefi_populate_append() {
34 install -m 0644 ${DEPLOY_DIR_IMAGE}/xen-${MACHINE}.gz ${DEST}${EFIDIR}/xen.gz
35}
36
37populate_append() {
38 install -m 0644 ${DEPLOY_DIR_IMAGE}/xen-${MACHINE}.gz ${DEST}/xen.gz
39}
40
41SYSLINUX_XEN_ARGS ?= "loglvl=all guest_loglvl=all console=com1,vga com1=115200,8n1"
42SYSLINUX_KERNEL_ARGS ?= "ramdisk_size=32768 root=/dev/ram0 rw console=hvc0 earlyprintk=xen console=tty0 panic=10 LABEL=boot debugshell=5"
43
44build_syslinux_cfg () {
45 echo "ALLOWOPTIONS 1" > ${SYSLINUXCFG}
46 echo "DEFAULT boot" >> ${SYSLINUXCFG}
47 echo "TIMEOUT 10" >> ${SYSLINUXCFG}
48 echo "PROMPT 1" >> ${SYSLINUXCFG}
49 echo "LABEL boot" >> ${SYSLINUXCFG}
50 echo " KERNEL mboot.c32" >> ${SYSLINUXCFG}
51 echo " APPEND /xen.gz ${SYSLINUX_XEN_ARGS} --- /vmlinuz ${SYSLINUX_KERNEL_ARGS} --- /initrd" >> ${SYSLINUXCFG}
52}
53
diff --git a/recipes-extended/iptables/iptables_1.4.21.bbappend b/recipes-extended/iptables/iptables_1.4.21.bbappend
new file mode 100644
index 00000000..52a4c4fe
--- /dev/null
+++ b/recipes-extended/iptables/iptables_1.4.21.bbappend
@@ -0,0 +1,8 @@
1RRECOMMENDS_${PN} += "kernel-module-ip6-tables \
2 kernel-module-ip6table-filter \
3 kernel-module-xt-tcpudp \
4 kernel-module-ipt-reject \
5 kernel-module-iptable-mangle \
6 kernel-module-xt-checksum \
7 kernel-module-xt-state \
8 "
diff --git a/recipes-extended/irqbalance/irqbalance.inc b/recipes-extended/irqbalance/irqbalance.inc
new file mode 100644
index 00000000..c20840df
--- /dev/null
+++ b/recipes-extended/irqbalance/irqbalance.inc
@@ -0,0 +1,39 @@
1#
2# Copyright (C) 2013 Wind River Systems, Inc.
3#
4SUMMARY = "IRQ allocation daemon"
5DESCRIPTION = "A daemon to balance interrupts across multiple CPUs, \
6which can lead to better performance and IO balance on SMP systems."
7
8HOMEPAGE = "http://code.google.com/p/irqbalance/"
9BUGTRACKER = "http://code.google.com/p/irqbalance/issues/list"
10
11LICENSE = "GPLv2"
12LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
13 file://irqbalance.c;beginline=6;endline=8;md5=b94e153694672307b503b1bc87dc9e24 \
14 "
15
16DEPENDS = "glib-2.0"
17
18INITSCRIPT_NAME = "irqbalanced"
19INITSCRIPT_PARAMS = "defaults"
20
21inherit autotools update-rc.d pkgconfig
22
23EXTRA_OECONF = "--program-transform-name= \
24 "
25
26# let the recipes or appends define options
27#
28PACKAGECONFIG ?= ""
29
30# enable,disable,depends,rdepends
31#
32PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl,"
33
34do_install () {
35 oe_runmake 'DESTDIR=${D}' install
36 install -d ${D}${sysconfdir}/init.d
37 cat ${S}/irqbalance.init | sed -e's,/usr/sbin,${sbindir},g' > ${D}${sysconfdir}/init.d/irqbalanced
38 chmod 755 ${D}${sysconfdir}/init.d/irqbalanced
39}
diff --git a/recipes-extended/irqbalance/irqbalance/add-initscript.patch b/recipes-extended/irqbalance/irqbalance/add-initscript.patch
new file mode 100644
index 00000000..46a75a86
--- /dev/null
+++ b/recipes-extended/irqbalance/irqbalance/add-initscript.patch
@@ -0,0 +1,47 @@
1irqbalance: add basic init script
2
3The upstream irqbalance release package does not contain an
4init script so we create a basic one here.
5
6Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
7---
8Index: irqbalance-0.56/irqbalance.init
9===================================================================
10--- /dev/null
11+++ irqbalance-0.56/irqbalance.init
12@@ -0,0 +1,35 @@
13+#!/bin/sh
14+#
15+# Copyright (c) 2012 Wind River Systems, Inc.
16+#
17+### BEGIN INIT INFO
18+# Provides: irqbalance
19+# Required-Start:
20+# Required-Stop:
21+# Default-Start: 2 3 4 5
22+# Default-Stop: 0 1 6
23+# Short-Description: IRQ allocation daemon
24+### END INIT INFO
25+
26+case "$1" in
27+ start)
28+ echo -n "Starting irqbalance: "
29+ start-stop-daemon -S -b -n irqbalance -a /usr/sbin/irqbalance
30+ echo "done"
31+ ;;
32+ stop)
33+ echo -n "Shutting down irqbalance: "
34+ start-stop-daemon -K -n irqbalance
35+ echo "done"
36+ ;;
37+ restart)
38+ $0 stop
39+ $0 start
40+ ;;
41+ *)
42+ echo "Usage: $0 {start | stop | restart}" >&2
43+ exit 1
44+ ;;
45+esac
46+
47+exit 0
diff --git a/recipes-extended/irqbalance/irqbalance/irqbalance-Add-status-and-reload-commands.patch b/recipes-extended/irqbalance/irqbalance/irqbalance-Add-status-and-reload-commands.patch
new file mode 100644
index 00000000..d853d0b4
--- /dev/null
+++ b/recipes-extended/irqbalance/irqbalance/irqbalance-Add-status-and-reload-commands.patch
@@ -0,0 +1,55 @@
1From dc7366896dd5a5bae82be4b11530bc9fdb7cbcdd Mon Sep 17 00:00:00 2001
2From: Yang Shi <yang.shi@windriver.com>
3Date: Mon, 26 Aug 2013 10:58:02 -0700
4Subject: [PATCH] irqbalance: Add status and reload commands
5
6Add status and reload commands for irqbalanced init script
7
8Signed-off-by: Yang Shi <yang.shi@windriver.com>
9---
10 irqbalance.init | 12 +++++++++---
11 1 files changed, 9 insertions(+), 3 deletions(-)
12
13diff --git a/irqbalance.init b/irqbalance.init
14index d12d62c..f58bf55 100644
15--- a/irqbalance.init
16+++ b/irqbalance.init
17@@ -1,6 +1,6 @@
18 #!/bin/sh
19 #
20-# Copyright (c) 2012 Wind River Systems, Inc.
21+# Copyright (c) 2013 Wind River Systems, Inc.
22 #
23 ### BEGIN INIT INFO
24 # Provides: irqbalance
25@@ -11,6 +11,8 @@
26 # Short-Description: IRQ allocation daemon
27 ### END INIT INFO
28
29+. /etc/init.d/functions
30+
31 case "$1" in
32 start)
33 echo -n "Starting irqbalance: "
34@@ -22,12 +24,16 @@ case "$1" in
35 start-stop-daemon -K -n irqbalance
36 echo "done"
37 ;;
38- restart)
39+ restart|reload)
40 $0 stop
41 $0 start
42 ;;
43+ status)
44+ status irqbalance
45+ echo "done"
46+ ;;
47 *)
48- echo "Usage: $0 {start | stop | restart}" >&2
49+ echo "Usage: $0 {start | stop | restart | reload | status}" >&2
50 exit 1
51 ;;
52 esac
53--
541.7.5.4
55
diff --git a/recipes-extended/irqbalance/irqbalance_1.0.4.bb b/recipes-extended/irqbalance/irqbalance_1.0.4.bb
new file mode 100644
index 00000000..33703f8b
--- /dev/null
+++ b/recipes-extended/irqbalance/irqbalance_1.0.4.bb
@@ -0,0 +1,16 @@
1#
2# Copyright (C) 2013 Wind River Systems, Inc.
3#
4
5require irqbalance.inc
6
7PR = "r1"
8
9SRC_URI[md5sum] = "f7ca283c46331db73f27e686a643dcfb"
10SRC_URI[sha256su] = "15725edf4a6f20258620cbd05ebf02d0c25aadd5ffa4871ef8507c9215021c43"
11
12EXTRA_OECONF += "--with-sysroot=${STAGING_DIR_TARGET}"
13
14SRC_URI = "http://irqbalance.googlecode.com/files/irqbalance-${PV}.tar.bz2 \
15 file://add-initscript.patch \
16 "
diff --git a/recipes-extended/irqbalance/irqbalance_1.0.5.bb b/recipes-extended/irqbalance/irqbalance_1.0.5.bb
new file mode 100644
index 00000000..49c3acd1
--- /dev/null
+++ b/recipes-extended/irqbalance/irqbalance_1.0.5.bb
@@ -0,0 +1,14 @@
1#
2# Copyright (C) 2013 Wind River Systems, Inc.
3#
4
5require irqbalance.inc
6
7PR = "r0"
8
9SRC_URI[md5sum] = "b6403fa067c96adce448a48c9993654d"
10SRC_URI[sha256sum] = "1123e75224b9c0b63ac85892e920bc4a9c76211278ea3d5d4bcbbde44815685c"
11
12SRC_URI = "http://irqbalance.googlecode.com/files/irqbalance-${PV}.tar.gz \
13 file://add-initscript.patch \
14 "
diff --git a/recipes-extended/irqbalance/irqbalance_1.0.6.bb b/recipes-extended/irqbalance/irqbalance_1.0.6.bb
new file mode 100644
index 00000000..fd08b73f
--- /dev/null
+++ b/recipes-extended/irqbalance/irqbalance_1.0.6.bb
@@ -0,0 +1,15 @@
1#
2# Copyright (C) 2013 Wind River Systems, Inc.
3#
4
5require irqbalance.inc
6
7PR = "r0"
8
9SRC_URI[md5sum] = "b73b1a5a9e1c3c428ae39024c711e41e"
10SRC_URI[sha256sum] = "95ac79992e6de501f613c781b0fc8aa17a4aaf6a3d865bb6e15ac6a46c6ab1fd"
11
12SRC_URI = "http://irqbalance.googlecode.com/files/irqbalance-${PV}.tar.gz \
13 file://add-initscript.patch \
14 file://irqbalance-Add-status-and-reload-commands.patch \
15 "
diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc
new file mode 100644
index 00000000..195a9dee
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt-python.inc
@@ -0,0 +1,55 @@
1inherit pythonnative python-dir
2
3export STAGING_INCDIR
4export STAGING_LIBDIR
5export BUILD_SYS
6export HOST_SYS
7
8RDEPENDS_${PN}-python += "python"
9PACKAGECONFIG_${PN}-python[xen] = ",,,xen-python"
10
11PACKAGES += "${PN}-python-staticdev ${PN}-python-dev ${PN}-python-dbg ${PN}-python"
12
13FILES_${PN}-python-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
14FILES_${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
15FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
16FILES_${PN}-python = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*"
17
18SRC_URI += "http://libvirt.org/sources/python/libvirt-python-${PV}.tar.gz;name=libvirt_python"
19SRC_URI += "file://libvirt_api_xml_path.patch;patchdir=../libvirt-python-${PV}"
20
21SRC_URI[libvirt_python.md5sum] = "cd3b75c0eb64e933f0b648fbdca6e868"
22SRC_URI[libvirt_python.sha256sum] = "94d79d662b6010f6c688b8856b2d95077736d48ffa35feed5a339d7fafbf8c39"
23
24export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml"
25export LIBVIRT_CFLAGS = "-I${S}/include"
26export LIBVIRT_LIBS = "-L${S}/src/.libs -lvirt -ldl"
27export LDFLAGS="-L${S}/src/.libs"
28
29LIBVIRT_INSTALL_ARGS = "--root=${D} \
30 --prefix=${prefix} \
31 --install-lib=${PYTHON_SITEPACKAGES_DIR} \
32 --install-data=${datadir}"
33
34python __anonymous () {
35 pkgconfig = d.getVar('PACKAGECONFIG', True)
36 if ('python') in pkgconfig.split():
37 d.setVar('LIBVIRT_PYTHON_ENABLE', '1')
38 else:
39 d.setVar('LIBVIRT_PYTHON_ENABLE', '0')
40}
41
42do_compile_append() {
43 if [ "${LIBVIRT_PYTHON_ENABLE}" = "1" ]; then
44 cd ${WORKDIR}/libvirt-python-${PV} && \
45 ${STAGING_BINDIR_NATIVE}/python-native/python setup.py build
46 fi
47}
48
49do_install_append() {
50 if [ "${LIBVIRT_PYTHON_ENABLE}" = "1" ]; then
51 cd ${WORKDIR}/${PN}-python-${PV} && \
52 ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install \
53 --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${LIBVIRT_INSTALL_ARGS}
54 fi
55}
diff --git a/recipes-extended/libvirt/libvirt/dnsmasq_exclude_virbr.conf b/recipes-extended/libvirt/libvirt/dnsmasq_exclude_virbr.conf
new file mode 100644
index 00000000..16bf1986
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt/dnsmasq_exclude_virbr.conf
@@ -0,0 +1 @@
except-interface=virbr0
diff --git a/recipes-extended/libvirt/libvirt/libvirt-1.0.3-fix-thread-safety-in-lxc-callback-handling.patch b/recipes-extended/libvirt/libvirt/libvirt-1.0.3-fix-thread-safety-in-lxc-callback-handling.patch
new file mode 100644
index 00000000..558d5ef6
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt/libvirt-1.0.3-fix-thread-safety-in-lxc-callback-handling.patch
@@ -0,0 +1,63 @@
1From ad5d9cee87357f9f38f62583119606ef95ba10df Mon Sep 17 00:00:00 2001
2From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
3Date: Fri, 24 May 2013 16:46:00 +0300
4Subject: [PATCH] Fix thread safety in LXC callback handling
5
6Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
7---
8 src/lxc/lxc_process.c | 18 +++++++++++++++++-
9 1 file changed, 17 insertions(+), 1 deletion(-)
10
11diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
12index aaa81a7..0eadc67 100644
13--- a/src/lxc/lxc_process.c
14+++ b/src/lxc/lxc_process.c
15@@ -609,8 +609,13 @@ static void virLXCProcessMonitorExitNotify(virLXCMonitorPtr mon ATTRIBUTE_UNUSED
16 virLXCProtocolExitStatus status,
17 virDomainObjPtr vm)
18 {
19+ virLXCDriverPtr driver = lxc_driver;
20 virLXCDomainObjPrivatePtr priv = vm->privateData;
21
22+ lxcDriverLock(driver);
23+ virObjectLock(vm);
24+ lxcDriverUnlock(driver);
25+
26 switch (status) {
27 case VIR_LXC_PROTOCOL_EXIT_STATUS_SHUTDOWN:
28 priv->stopReason = VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN;
29@@ -628,6 +633,8 @@ static void virLXCProcessMonitorExitNotify(virLXCMonitorPtr mon ATTRIBUTE_UNUSED
30 }
31 VIR_DEBUG("Domain shutoff reason %d (from status %d)",
32 priv->stopReason, status);
33+
34+ virObjectUnlock(vm);
35 }
36
37 /* XXX a little evil */
38@@ -636,12 +643,21 @@ static void virLXCProcessMonitorInitNotify(virLXCMonitorPtr mon ATTRIBUTE_UNUSED
39 pid_t initpid,
40 virDomainObjPtr vm)
41 {
42- virLXCDomainObjPrivatePtr priv = vm->privateData;
43+ virLXCDriverPtr driver = lxc_driver;
44+ virLXCDomainObjPrivatePtr priv;
45+
46+ lxcDriverLock(driver);
47+ virObjectLock(vm);
48+ lxcDriverUnlock(driver);
49+
50+ priv = vm->privateData;
51 priv->initpid = initpid;
52 virDomainAuditInit(vm, initpid);
53
54 if (virDomainSaveStatus(lxc_driver->caps, lxc_driver->stateDir, vm) < 0)
55 VIR_WARN("Cannot update XML with PID for LXC %s", vm->def->name);
56+
57+ virObjectUnlock(vm);
58 }
59
60 static virLXCMonitorCallbacks monitorCallbacks = {
61--
621.7.11.7
63
diff --git a/recipes-extended/libvirt/libvirt/libvirt_api_xml_path.patch b/recipes-extended/libvirt/libvirt/libvirt_api_xml_path.patch
new file mode 100644
index 00000000..0aa3bde2
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt/libvirt_api_xml_path.patch
@@ -0,0 +1,89 @@
1Adding support for LIBVIRT_CFLAGS and LIBVIRT_LIBS
2
3Signed-off-by: Amy Fong <amy.fong@windriver.com>
4
5
6Adding a support for LIBVIRT_API_PATH evironment variable, which can
7control where the script should look for the 'libvirt-api.xml' file.
8This allows building libvirt-python against different libvirt than the
9one installed in the system. This may be used for example in autotest
10or by packagers without the need to install libvirt into the system.
11
12Signed-off-by: Martin Kletzander <mkletzan redhat com>
13---
14 setup.py | 25 ++++++++++++++++++++++---
15 1 file changed, 22 insertions(+), 3 deletions(-)
16
17Index: libvirt-python-1.2.1/setup.py
18===================================================================
19--- libvirt-python-1.2.1.orig/setup.py
20+++ libvirt-python-1.2.1/setup.py
21@@ -30,18 +30,19 @@
22 if pkgcfg is None:
23 raise Exception("pkg-config binary is required to compile libvirt-python")
24
25-spawn([pkgcfg,
26- "--print-errors",
27- "--atleast-version=%s" % MIN_LIBVIRT,
28- "libvirt"])
29+# spawn([pkgcfg,
30+# "--print-errors",
31+# "--atleast-version=%s" % MIN_LIBVIRT,
32+# "libvirt"])
33
34 have_libvirt_lxc=True
35-try:
36- spawn([pkgcfg,
37- "--atleast-version=%s" % MIN_LIBVIRT_LXC,
38- "libvirt"])
39-except DistutilsExecError:
40- have_libvirt_lxc=False
41+# try:
42+# spawn([pkgcfg,
43+# "--atleast-version=%s" % MIN_LIBVIRT_LXC,
44+# "libvirt"])
45+# except DistutilsExecError:
46+# have_libvirt_lxc=False
47+have_libvirt_lxc=True
48
49 def get_pkgconfig_data(args, mod, required=True):
50 """Run pkg-config to and return content associated with it"""
51@@ -63,7 +64,17 @@
52 """Check with pkg-config that libvirt is present and extract
53 the API XML file paths we need from it"""
54
55- libvirt_api = get_pkgconfig_data(["--variable", "libvirt_api"], "libvirt")
56+ libvirt_api = os.getenv("LIBVIRT_API_PATH")
57+
58+ if libvirt_api:
59+ if not libvirt_api.endswith("-api.xml"):
60+ raise ValueError("Invalid path '%s' for API XML" % libvirt_api)
61+ if not os.path.exists(libvirt_api):
62+ raise ValueError("API XML '%s' does not exist, "
63+ "have you built libvirt?" % libvirt_api)
64+ else:
65+ libvirt_api = get_pkgconfig_data(["--variable", "libvirt_api"],
66+ "libvirt")
67
68 offset = libvirt_api.index("-api.xml")
69 libvirt_qemu_api = libvirt_api[0:offset] + "-qemu-api.xml"
70@@ -73,8 +84,17 @@
71
72 return (libvirt_api, libvirt_qemu_api, libvirt_lxc_api)
73
74-ldflags = get_pkgconfig_data(["--libs-only-L"], "libvirt", False)
75-cflags = get_pkgconfig_data(["--cflags"], "libvirt", False)
76+libvirt_cflags = os.getenv("LIBVIRT_CFLAGS")
77+if libvirt_cflags:
78+ cflags = libvirt_cflags
79+else:
80+ cflags = get_pkgconfig_data(["--cflags"], "libvirt", False)
81+
82+libvirt_libs = os.getenv("LIBVIRT_LIBS")
83+if libvirt_libs:
84+ ldflags = libvirt_libs
85+else:
86+ ldflags = get_pkgconfig_data(["--libs-only-L"], "libvirt", False)
87
88 c_modules = []
89 py_modules = []
diff --git a/recipes-extended/libvirt/libvirt/libvirtd.conf b/recipes-extended/libvirt/libvirt/libvirtd.conf
new file mode 100644
index 00000000..c0462b47
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt/libvirtd.conf
@@ -0,0 +1,393 @@
1# Master libvirt daemon configuration file
2#
3# For further information consult http://libvirt.org/format.html
4#
5# NOTE: the tests/daemon-conf regression test script requires
6# that each "PARAMETER = VALUE" line in this file have the parameter
7# name just after a leading "#".
8
9#################################################################
10#
11# Network connectivity controls
12#
13
14# Flag listening for secure TLS connections on the public TCP/IP port.
15# NB, must pass the --listen flag to the libvirtd process for this to
16# have any effect.
17#
18# It is necessary to setup a CA and issue server certificates before
19# using this capability.
20#
21# This is enabled by default, uncomment this to disable it
22listen_tls = 0
23
24# Listen for unencrypted TCP connections on the public TCP/IP port.
25# NB, must pass the --listen flag to the libvirtd process for this to
26# have any effect.
27#
28# Using the TCP socket requires SASL authentication by default. Only
29# SASL mechanisms which support data encryption are allowed. This is
30# DIGEST_MD5 and GSSAPI (Kerberos5)
31#
32# This is disabled by default, uncomment this to enable it.
33listen_tcp = 1
34
35
36
37# Override the port for accepting secure TLS connections
38# This can be a port number, or service name
39#
40#tls_port = "16514"
41
42# Override the port for accepting insecure TCP connections
43# This can be a port number, or service name
44#
45#tcp_port = "16509"
46
47
48# Override the default configuration which binds to all network
49# interfaces. This can be a numeric IPv4/6 address, or hostname
50#
51#listen_addr = "192.168.0.1"
52
53
54# Flag toggling mDNS advertizement of the libvirt service.
55#
56# Alternatively can disable for all services on a host by
57# stopping the Avahi daemon
58#
59# This is enabled by default, uncomment this to disable it
60#mdns_adv = 0
61
62# Override the default mDNS advertizement name. This must be
63# unique on the immediate broadcast network.
64#
65# The default is "Virtualization Host HOSTNAME", where HOSTNAME
66# is subsituted for the short hostname of the machine (without domain)
67#
68#mdns_name = "Virtualization Host Joe Demo"
69
70
71#################################################################
72#
73# UNIX socket access controls
74#
75
76# Set the UNIX domain socket group ownership. This can be used to
77# allow a 'trusted' set of users access to management capabilities
78# without becoming root.
79#
80# This is restricted to 'root' by default.
81#unix_sock_group = "libvirt"
82
83# Set the UNIX socket permissions for the R/O socket. This is used
84# for monitoring VM status only
85#
86# Default allows any user. If setting group ownership may want to
87# restrict this to:
88#unix_sock_ro_perms = "0777"
89
90# Set the UNIX socket permissions for the R/W socket. This is used
91# for full management of VMs
92#
93# Default allows only root. If PolicyKit is enabled on the socket,
94# the default will change to allow everyone (eg, 0777)
95#
96# If not using PolicyKit and setting group ownership for access
97# control then you may want to relax this to:
98#unix_sock_rw_perms = "0770"
99
100# Set the name of the directory in which sockets will be found/created.
101#unix_sock_dir = "/var/run/libvirt"
102
103#################################################################
104#
105# Authentication.
106#
107# - none: do not perform auth checks. If you can connect to the
108# socket you are allowed. This is suitable if there are
109# restrictions on connecting to the socket (eg, UNIX
110# socket permissions), or if there is a lower layer in
111# the network providing auth (eg, TLS/x509 certificates)
112#
113# - sasl: use SASL infrastructure. The actual auth scheme is then
114# controlled from /etc/sasl2/libvirt.conf. For the TCP
115# socket only GSSAPI & DIGEST-MD5 mechanisms will be used.
116# For non-TCP or TLS sockets, any scheme is allowed.
117#
118# - polkit: use PolicyKit to authenticate. This is only suitable
119# for use on the UNIX sockets. The default policy will
120# require a user to supply their own password to gain
121# full read/write access (aka sudo like), while anyone
122# is allowed read/only access.
123#
124# Set an authentication scheme for UNIX read-only sockets
125# By default socket permissions allow anyone to connect
126#
127# To restrict monitoring of domains you may wish to enable
128# an authentication mechanism here
129#auth_unix_ro = "none"
130
131# Set an authentication scheme for UNIX read-write sockets
132# By default socket permissions only allow root. If PolicyKit
133# support was compiled into libvirt, the default will be to
134# use 'polkit' auth.
135#
136# If the unix_sock_rw_perms are changed you may wish to enable
137# an authentication mechanism here
138#auth_unix_rw = "none"
139
140# Change the authentication scheme for TCP sockets.
141#
142# If you don't enable SASL, then all TCP traffic is cleartext.
143# Don't do this outside of a dev/test scenario. For real world
144# use, always enable SASL and use the GSSAPI or DIGEST-MD5
145# mechanism in /etc/sasl2/libvirt.conf
146#auth_tcp = "sasl"
147
148# Change the authentication scheme for TLS sockets.
149#
150# TLS sockets already have encryption provided by the TLS
151# layer, and limited authentication is done by certificates
152#
153# It is possible to make use of any SASL authentication
154# mechanism as well, by using 'sasl' for this option
155#auth_tls = "none"
156
157
158
159#################################################################
160#
161# TLS x509 certificate configuration
162#
163
164
165# Override the default server key file path
166#
167#key_file = "/etc/pki/libvirt/private/serverkey.pem"
168
169# Override the default server certificate file path
170#
171#cert_file = "/etc/pki/libvirt/servercert.pem"
172
173# Override the default CA certificate path
174#
175#ca_file = "/etc/pki/CA/cacert.pem"
176
177# Specify a certificate revocation list.
178#
179# Defaults to not using a CRL, uncomment to enable it
180#crl_file = "/etc/pki/CA/crl.pem"
181
182
183
184#################################################################
185#
186# Authorization controls
187#
188
189
190# Flag to disable verification of our own server certificates
191#
192# When libvirtd starts it performs some sanity checks against
193# its own certificates.
194#
195# Default is to always run sanity checks. Uncommenting this
196# will disable sanity checks which is not a good idea
197#tls_no_sanity_certificate = 1
198
199# Flag to disable verification of client certificates
200#
201# Client certificate verification is the primary authentication mechanism.
202# Any client which does not present a certificate signed by the CA
203# will be rejected.
204#
205# Default is to always verify. Uncommenting this will disable
206# verification - make sure an IP whitelist is set
207#tls_no_verify_certificate = 1
208
209
210# A whitelist of allowed x509 Distinguished Names
211# This list may contain wildcards such as
212#
213# "C=GB,ST=London,L=London,O=Red Hat,CN=*"
214#
215# See the POSIX fnmatch function for the format of the wildcards.
216#
217# NB If this is an empty list, no client can connect, so comment out
218# entirely rather than using empty list to disable these checks
219#
220# By default, no DN's are checked
221#tls_allowed_dn_list = ["DN1", "DN2"]
222
223
224# A whitelist of allowed SASL usernames. The format for usernames
225# depends on the SASL authentication mechanism. Kerberos usernames
226# look like username@REALM
227#
228# This list may contain wildcards such as
229#
230# "*@EXAMPLE.COM"
231#
232# See the POSIX fnmatch function for the format of the wildcards.
233#
234# NB If this is an empty list, no client can connect, so comment out
235# entirely rather than using empty list to disable these checks
236#
237# By default, no Username's are checked
238#sasl_allowed_username_list = ["joe@EXAMPLE.COM", "fred@EXAMPLE.COM" ]
239
240
241
242#################################################################
243#
244# Processing controls
245#
246
247# The maximum number of concurrent client connections to allow
248# over all sockets combined.
249#max_clients = 20
250
251
252# The minimum limit sets the number of workers to start up
253# initially. If the number of active clients exceeds this,
254# then more threads are spawned, upto max_workers limit.
255# Typically you'd want max_workers to equal maximum number
256# of clients allowed
257#min_workers = 5
258#max_workers = 20
259
260
261# The number of priority workers. If all workers from above
262# pool will stuck, some calls marked as high priority
263# (notably domainDestroy) can be executed in this pool.
264#prio_workers = 5
265
266# Total global limit on concurrent RPC calls. Should be
267# at least as large as max_workers. Beyond this, RPC requests
268# will be read into memory and queued. This directly impact
269# memory usage, currently each request requires 256 KB of
270# memory. So by default upto 5 MB of memory is used
271#
272# XXX this isn't actually enforced yet, only the per-client
273# limit is used so far
274#max_requests = 20
275
276# Limit on concurrent requests from a single client
277# connection. To avoid one client monopolizing the server
278# this should be a small fraction of the global max_requests
279# and max_workers parameter
280#max_client_requests = 5
281
282#################################################################
283#
284# Logging controls
285#
286
287# Logging level: 4 errors, 3 warnings, 2 information, 1 debug
288# basically 1 will log everything possible
289#log_level = 3
290
291# Logging filters:
292# A filter allows to select a different logging level for a given category
293# of logs
294# The format for a filter is:
295# x:name
296# where name is a match string e.g. remote or qemu
297# the x prefix is the minimal level where matching messages should be logged
298# 1: DEBUG
299# 2: INFO
300# 3: WARNING
301# 4: ERROR
302#
303# Multiple filter can be defined in a single @filters, they just need to be
304# separated by spaces.
305#
306# e.g:
307# log_filters="3:remote 4:event"
308# to only get warning or errors from the remote layer and only errors from
309# the event layer.
310
311# Logging outputs:
312# An output is one of the places to save logging information
313# The format for an output can be:
314# x:stderr
315# output goes to stderr
316# x:syslog:name
317# use syslog for the output and use the given name as the ident
318# x:file:file_path
319# output to a file, with the given filepath
320# In all case the x prefix is the minimal level, acting as a filter
321# 1: DEBUG
322# 2: INFO
323# 3: WARNING
324# 4: ERROR
325#
326# Multiple output can be defined, they just need to be separated by spaces.
327# e.g.:
328# log_outputs="3:syslog:libvirtd"
329# to log all warnings and errors to syslog under the libvirtd ident
330
331# Log debug buffer size: default 64
332# The daemon keeps an internal debug log buffer which will be dumped in case
333# of crash or upon receiving a SIGUSR2 signal. This setting allows to override
334# the default buffer size in kilobytes.
335# If value is 0 or less the debug log buffer is deactivated
336#log_buffer_size = 64
337
338
339##################################################################
340#
341# Auditing
342#
343# This setting allows usage of the auditing subsystem to be altered:
344#
345# audit_level == 0 -> disable all auditing
346# audit_level == 1 -> enable auditing, only if enabled on host (default)
347# audit_level == 2 -> enable auditing, and exit if disabled on host
348#
349#audit_level = 2
350#
351# If set to 1, then audit messages will also be sent
352# via libvirt logging infrastructure. Defaults to 0
353#
354#audit_logging = 1
355
356###################################################################
357# UUID of the host:
358# Provide the UUID of the host here in case the command
359# 'dmidecode -s system-uuid' does not provide a valid uuid. In case
360# 'dmidecode' does not provide a valid UUID and none is provided here, a
361# temporary UUID will be generated.
362# Keep the format of the example UUID below. UUID must not have all digits
363# be the same.
364
365# NB This default all-zeros UUID will not work. Replace
366# it with the output of the 'uuidgen' command and then
367# uncomment this entry
368#host_uuid = "00000000-0000-0000-0000-000000000000"
369
370###################################################################
371# Keepalive protocol:
372# This allows libvirtd to detect broken client connections or even
373# dead client. A keepalive message is sent to a client after
374# keepalive_interval seconds of inactivity to check if the client is
375# still responding; keepalive_count is a maximum number of keepalive
376# messages that are allowed to be sent to the client without getting
377# any response before the connection is considered broken. In other
378# words, the connection is automatically closed approximately after
379# keepalive_interval * (keepalive_count + 1) seconds since the last
380# message received from the client. If keepalive_interval is set to
381# -1, libvirtd will never send keepalive requests; however clients
382# can still send them and the deamon will send responses. When
383# keepalive_count is set to 0, connections will be automatically
384# closed after keepalive_interval seconds of inactivity without
385# sending any keepalive messages.
386#
387#keepalive_interval = 5
388#keepalive_count = 5
389#
390# If set to 1, libvirtd will refuse to talk to clients that do not
391# support keepalive protocol. Defaults to 0.
392#
393#keepalive_required = 1
diff --git a/recipes-extended/libvirt/libvirt/libvirtd.sh b/recipes-extended/libvirt/libvirt/libvirtd.sh
new file mode 100755
index 00000000..29dbf391
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt/libvirtd.sh
@@ -0,0 +1,103 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: libvirtd
4# Required-Start: $local_fs $network dbus
5# Required-Stop: $local_fs $network dbus
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8### END INIT INFO
9
10if [ -f /lib/lsb/init-functions ]
11then
12 . /lib/lsb/init-functions
13else
14 # int log_begin_message (char *message)
15 log_begin_msg () {
16 if [ -z "$1" ]; then
17 return 1
18 fi
19 echo " * $@"
20 }
21
22 # int log_end_message (int exitstatus)
23 log_end_msg () {
24
25 # If no arguments were passed, return
26 [ -z "$1" ] && return 1
27
28 # Only do the fancy stuff if we have an appropriate terminal
29 # and if /usr is already mounted
30 TPUT=/usr/bin/tput
31 EXPR=/usr/bin/expr
32 if [ -x $TPUT ] && [ -x $EXPR ] && $TPUT hpa 60 >/dev/null 2>&1; then
33 COLS=`$TPUT cols`
34 if [ -n "$COLS" ]; then
35 COL=`$EXPR $COLS - 7`
36 else
37 COL=73
38 fi
39 UP=`$TPUT cuu1`
40 END=`$TPUT hpa $COL`
41 START=`$TPUT hpa 0`
42 RED=`$TPUT setaf 1`
43 NORMAL=`$TPUT op`
44 if [ $1 -eq 0 ]; then
45 echo "$UP$END[ ok ]"
46 else
47 echo -e "$UP$START $RED*$NORMAL$END[${RED}fail${NORMAL}]"
48 fi
49 else
50 if [ $1 -eq 0 ]; then
51 echo " ...done."
52 else
53 echo " ...fail!"
54 fi
55 fi
56 return $1
57 }
58
59 log_warning_msg () {
60 if log_use_fancy_output; then
61 YELLOW=`$TPUT setaf 3`
62 NORMAL=`$TPUT op`
63 echo "$YELLOW*$NORMAL $@"
64 else
65 echo "$@"
66 fi
67 }
68
69fi
70
71case "$1" in
72 start)
73 if [ -e /var/run/libvirtd.pid ]; then
74 if [ -d /proc/$(cat /var/run/libvirtd.pid) ]; then
75 echo "virtualization library already started; not starting."
76 else
77 echo "Removing stale PID file /var/run/libvirtd.pid."
78 rm -f /var/run/libvirtd.pid
79 fi
80 fi
81 log_begin_msg "Starting virtualization library daemon: libvirtd"
82 if [ ! -e /var/run/libvirtd.pid ]; then
83 start-stop-daemon -K -x /usr/bin/dnsmasq --pidfile /var/run/libvirt/network/default.pid
84 fi
85 start-stop-daemon --start --quiet --pidfile /var/run/libvirtd.pid --exec /usr/sbin/libvirtd -- --daemon --listen
86 log_end_msg $?
87 ;;
88 stop)
89 log_begin_msg "Stopping virtualization library daemon: libvirtd"
90 start-stop-daemon --stop --quiet --retry 3 --exec /usr/sbin/libvirtd --pidfile /var/run/libvirtd.pid
91 log_end_msg $?
92 rm -f /var/run/libvirtd.pid
93 ;;
94 restart)
95 $0 stop
96 sleep 1
97 $0 start
98 ;;
99 *)
100 echo "Usage: $0 {start|stop|restart}"
101 exit 1
102 ;;
103esac
diff --git a/recipes-extended/libvirt/libvirt/qemu-fix-crash-in-qemuOpen.patch b/recipes-extended/libvirt/libvirt/qemu-fix-crash-in-qemuOpen.patch
new file mode 100644
index 00000000..3cf9e839
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt/qemu-fix-crash-in-qemuOpen.patch
@@ -0,0 +1,39 @@
1From 74bff2509080912ea8abf1de8fd95fa2412b659a Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
3Date: Thu, 11 Apr 2013 11:37:25 +0200
4Subject: [PATCH] qemu: fix crash in qemuOpen
5
6commit 74bff2509080912ea8abf1de8fd95fa2412b659a from upsteam
7git://libvirt.org/libvirt.git
8
9If the path part of connection URI is not present, cfg is used
10unitialized.
11
12https://bugzilla.redhat.com/show_bug.cgi?id=950855
13---
14 src/qemu/qemu_driver.c | 2 +-
15 1 files changed, 1 insertions(+), 1 deletions(-)
16
17diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
18index 2c0d7d1..0d41e39 100644
19--- a/src/qemu/qemu_driver.c
20+++ b/src/qemu/qemu_driver.c
21@@ -1026,6 +1026,7 @@ static virDrvOpenStatus qemuOpen(virConnectPtr conn,
22 goto cleanup;
23 }
24
25+ cfg = virQEMUDriverGetConfig(qemu_driver);
26 if (conn->uri->path == NULL) {
27 virReportError(VIR_ERR_INTERNAL_ERROR,
28 _("no QEMU URI path given, try %s"),
29@@ -1033,7 +1034,6 @@ static virDrvOpenStatus qemuOpen(virConnectPtr conn,
30 goto cleanup;
31 }
32
33- cfg = virQEMUDriverGetConfig(qemu_driver);
34 if (cfg->privileged) {
35 if (STRNEQ(conn->uri->path, "/system") &&
36 STRNEQ(conn->uri->path, "/session")) {
37--
381.7.1
39
diff --git a/recipes-extended/libvirt/libvirt/run-ptest b/recipes-extended/libvirt/libvirt/run-ptest
new file mode 100644
index 00000000..a434b186
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt/run-ptest
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3make -C tests -k check-TESTS
diff --git a/recipes-extended/libvirt/libvirt/runptest.patch b/recipes-extended/libvirt/libvirt/runptest.patch
new file mode 100644
index 00000000..0c019751
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt/runptest.patch
@@ -0,0 +1,112 @@
1Add 'install-ptest' rule.
2Change TESTS_ENVIRONMENT to allow running outside build dir.
3
4Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com>
5Upstream-status: Pending
6
7diff -uNr a/tests/Makefile.am b/tests/Makefile.am
8--- a/tests/Makefile.am 2014-03-11 11:37:31.497605736 +0200
9+++ b/tests/Makefile.am 2014-03-17 15:57:35.515268399 +0200
10@@ -27,9 +27,11 @@
11 -I$(top_srcdir)/src/conf \
12 $(GETTEXT_CPPFLAGS)
13
14+PTEST_DIR ?= /usr/lib/libvirt/ptest
15+
16 AM_CFLAGS = \
17- -Dabs_builddir="\"`pwd`\"" \
18- -Dabs_srcdir="\"`cd '$(srcdir)'; pwd`\"" \
19+ -Dabs_builddir="\"$(PTEST_DIR)/tests\"" \
20+ -Dabs_srcdir="\"$(PTEST_DIR)/tests\"" \
21 $(LIBXML_CFLAGS) \
22 $(GNUTLS_CFLAGS) \
23 $(SASL_CFLAGS) \
24@@ -41,7 +43,7 @@
25
26 if WITH_DRIVER_MODULES
27 INCLUDES += \
28- -DTEST_DRIVER_DIR=\"$(top_builddir)/src/.libs\"
29+ -DTEST_DRIVER_DIR=\"$(PTEST_DIR)/src/.libs\"
30 endif WITH_DRIVER_MODULES
31
32 PROBES_O =
33@@ -344,20 +346,19 @@
34 # Also, BSD sh doesn't like 'a=b b=$$a', so we can't use an
35 # intermediate shell variable, but must do all the expansion in make
36
37-lv_abs_top_builddir=`cd '$(top_builddir)'; pwd`
38 path_add = $(subst :,$(PATH_SEPARATOR),\
39- $(subst !,$(lv_abs_top_builddir)/,!daemon:!tools:!tests))
40+ $(subst !,$(PTEST_DIR)/,!daemon:!tools:!tests))
41
42 VIR_TEST_EXPENSIVE ?= $(VIR_TEST_EXPENSIVE_DEFAULT)
43 TESTS_ENVIRONMENT = \
44- abs_top_builddir=$(lv_abs_top_builddir) \
45- abs_top_srcdir=`cd '$(top_srcdir)'; pwd` \
46- abs_builddir=`pwd` \
47- abs_srcdir=`cd '$(srcdir)'; pwd` \
48- CONFIG_HEADER="`cd '$(top_builddir)'; pwd`/config.h" \
49+ abs_top_builddir="$(PTEST_DIR)" \
50+ abs_top_srcdir="$(PTEST_DIR)" \
51+ abs_builddir="$(PTEST_DIR)/tests" \
52+ abs_srcdir="$(PTEST_DIR)/tests" \
53+ CONFIG_HEADER="$(PTEST_DIR)/config.h" \
54 PATH="$(path_add)$(PATH_SEPARATOR)$$PATH" \
55 SHELL="$(SHELL)" \
56- LIBVIRT_DRIVER_DIR="$(lv_abs_top_builddir)/src/.libs" \
57+ LIBVIRT_DRIVER_DIR="$(PTEST_DIR)/src/.libs" \
58 LIBVIRT_AUTOSTART=0 \
59 LC_ALL=C \
60 VIR_TEST_EXPENSIVE=$(VIR_TEST_EXPENSIVE) \
61@@ -933,5 +934,51 @@
62 EXTRA_DIST += object-locking.ml
63 endif ! WITH_CIL
64
65+buildtest-TESTS: $(TESTS) $(test_libraries) $(test_helpers)
66+
67+PTESTS = $(TESTS) $(test_helpers) test-lib.sh schematestutils.sh
68+
69+install-ptest:
70+ list='$(TESTS) $(test_helpers) test-lib.sh schematestutils.sh'
71+ install -d $(DEST_DIR)/tools
72+ @(if [ -d ../tools/.libs ] ; then cd ../tools/.libs; fi; \
73+ install * $(DEST_DIR)/tools)
74+ install -d $(DEST_DIR)/src/network
75+ cp ../src/network/*.xml $(DEST_DIR)/src/network
76+ install -d $(DEST_DIR)/src/cpu
77+ cp ../src/cpu/*.xml $(DEST_DIR)/src/cpu
78+ install ../src/libvirt_iohelper $(DEST_DIR)/src
79+ install -D ../daemon/libvirtd $(DEST_DIR)/daemon/libvirtd
80+ install -D ../daemon/libvirtd.conf $(DEST_DIR)/daemon/libvirtd.conf
81+ @(if [ -d ../daemon/.libs ] ; then cd ../daemon/.libs; fi; \
82+ install * $(DEST_DIR)/daemon)
83+ install -d $(DEST_DIR)/src/.libs
84+ @(if [ -d ../src/.libs ] ; then cd ../src/.libs; fi; \
85+ install * $(DEST_DIR)/src/.libs)
86+ install -d $(DEST_DIR)/docs/schemas
87+ cp ../docs/schemas/*.rng $(DEST_DIR)/docs/schemas
88+ cp -r ../build-aux $(DEST_DIR)
89+ install -d $(DEST_DIR)/examples/xml
90+ cp -r ../examples/xml/test $(DEST_DIR)/examples/xml
91+ install -d $(DEST_DIR)/tests/.libs
92+ find . -type d -name "*xml2xml*" -exec cp -r {} $(DEST_DIR)/tests \;
93+ find . -type d -name "*data" -exec cp -r {} $(DEST_DIR)/tests \;
94+ @(for file in $(PTESTS); do \
95+ if [ -f .libs/$$file ]; then \
96+ install .libs/$$file $(DEST_DIR)/tests; \
97+ else \
98+ install $$file $(DEST_DIR)/tests; \
99+ fi; \
100+ done;)
101+ @(if [ -d .libs ]; then install .libs/*.so $(DEST_DIR)/tests/.libs; fi;)
102+ cp ../config.h $(DEST_DIR)
103+ cp Makefile $(DEST_DIR)/tests
104+ sed -i -e 's/^Makefile:/_Makefile:/' $(DEST_DIR)/tests/Makefile
105+ cp ../Makefile $(DEST_DIR)
106+ sed -i -e 's|^Makefile:|_Makefile:|' $(DEST_DIR)/Makefile
107+ sed -i -e 's|$(BUILD_DIR)|$(PTEST_DIR)|g' $(DEST_DIR)/tests/Makefile
108+ sed -i -e 's|$(BUILD_DIR)|$(PTEST_DIR)|g' $(DEST_DIR)/Makefile
109+ sed -i -e 's|^\(.*\.log:\) \(.*EXEEXT.*\)|\1|g' $(DEST_DIR)/tests/Makefile
110+
111 CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.cmi *.cmx \
112 object-locking-files.txt
diff --git a/recipes-extended/libvirt/libvirt/tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch b/recipes-extended/libvirt/libvirt/tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch
new file mode 100644
index 00000000..91410449
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt/tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch
@@ -0,0 +1,112 @@
1From dade75d1ce25df6ab61867250d7adb65b4912090 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@windriver.com>
3Date: Fri, 2 Aug 2013 11:38:43 -0400
4Subject: [PATCH] tools: add libvirt-net-rpc to virt-host-validate when TLS is
5 enabled
6
7When gnu-tls is enabled for libvirt references to virNetTLSInit are
8generated in libvirt. Any binaries linking against libvirt, must also
9link against libvirt-net-rpc which provides the implementation.
10
11Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
12---
13 examples/dominfo/Makefile.am | 7 +++++++
14 examples/domsuspend/Makefile.am | 7 +++++++
15 examples/hellolibvirt/Makefile.am | 7 +++++++
16 examples/openauth/Makefile.am | 6 ++++++
17 tools/Makefile.am | 13 +++++++++++++
18 5 files changed, 40 insertions(+)
19
20diff --git a/examples/dominfo/Makefile.am b/examples/dominfo/Makefile.am
21index 4a30c7768df9..99b3e17eb741 100644
22--- a/examples/dominfo/Makefile.am
23+++ b/examples/dominfo/Makefile.am
24@@ -23,3 +23,10 @@ noinst_PROGRAMS=info1
25 info1_SOURCES=info1.c
26 info1_LDFLAGS=
27 info1_LDADD= $(LDADDS)
28+
29+if WITH_GNUTLS
30+info1_LDADD += $(top_builddir)/src/libvirt-net-rpc.la \
31+ $(top_builddir)/gnulib/lib/libgnu.la \
32+ $(NULL)
33+endif
34+
35diff --git a/examples/domsuspend/Makefile.am b/examples/domsuspend/Makefile.am
36index b8e65f24a28d..9553e0f1d948 100644
37--- a/examples/domsuspend/Makefile.am
38+++ b/examples/domsuspend/Makefile.am
39@@ -25,3 +25,10 @@ noinst_PROGRAMS=suspend
40 suspend_SOURCES=suspend.c
41 suspend_LDFLAGS=
42 suspend_LDADD= $(LDADDS)
43+
44+if WITH_GNUTLS
45+suspend_LDADD += $(top_builddir)/src/libvirt-net-rpc.la \
46+ $(top_builddir)/gnulib/lib/libgnu.la \
47+ $(NULL)
48+endif
49+
50diff --git a/examples/hellolibvirt/Makefile.am b/examples/hellolibvirt/Makefile.am
51index 55ea972c42f8..a5272e2bb565 100644
52--- a/examples/hellolibvirt/Makefile.am
53+++ b/examples/hellolibvirt/Makefile.am
54@@ -19,3 +19,10 @@ noinst_PROGRAMS = hellolibvirt
55 hellolibvirt_CFLAGS = $(WARN_CFLAGS)
56 hellolibvirt_SOURCES = hellolibvirt.c
57 hellolibvirt_LDADD = $(top_builddir)/src/libvirt.la
58+
59+if WITH_GNUTLS
60+hellolibvirt_LDADD += $(top_builddir)/src/libvirt-net-rpc.la \
61+ $(top_builddir)/gnulib/lib/libgnu.la \
62+ $(NULL)
63+endif
64+
65diff --git a/examples/openauth/Makefile.am b/examples/openauth/Makefile.am
66index 7bb860491e73..34e9b47f65cb 100644
67--- a/examples/openauth/Makefile.am
68+++ b/examples/openauth/Makefile.am
69@@ -19,3 +19,9 @@ noinst_PROGRAMS = openauth
70 openauth_CFLAGS = $(WARN_CFLAGS)
71 openauth_SOURCES = openauth.c
72 openauth_LDADD = $(top_builddir)/src/libvirt.la
73+if WITH_GNUTLS
74+openauth_LDADD += $(top_builddir)/src/libvirt-net-rpc.la \
75+ $(top_builddir)/gnulib/lib/libgnu.la \
76+ $(NULL)
77+endif
78+
79diff --git a/tools/Makefile.am b/tools/Makefile.am
80index 256a8f37a2a9..837a83fb612a 100644
81--- a/tools/Makefile.am
82+++ b/tools/Makefile.am
83@@ -147,6 +147,13 @@ virt_host_validate_LDADD = \
84 ../gnulib/lib/libgnu.la \
85 $(NULL)
86
87+if WITH_GNUTLS
88+virt_host_validate_LDADD += ../src/libvirt-net-rpc.la \
89+ ../gnulib/lib/libgnu.la \
90+ $(NULL)
91+endif
92+
93+
94 virt_host_validate_CFLAGS = \
95 $(WARN_CFLAGS) \
96 $(PIE_CFLAGS) \
97@@ -214,6 +221,12 @@ virsh_CFLAGS = \
98 $(READLINE_CFLAGS)
99 BUILT_SOURCES =
100
101+if WITH_GNUTLS
102+virsh_LDADD += ../src/libvirt-net-rpc.la \
103+ ../gnulib/lib/libgnu.la \
104+ $(NULL)
105+endif
106+
107 if WITH_WIN_ICON
108 virsh_LDADD += virsh_win_icon.$(OBJEXT)
109
110--
1111.8.1.2
112
diff --git a/recipes-extended/libvirt/libvirt_1.2.2.bb b/recipes-extended/libvirt/libvirt_1.2.2.bb
new file mode 100644
index 00000000..0cd6b990
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt_1.2.2.bb
@@ -0,0 +1,216 @@
1DESCRIPTION = "A toolkit to interact with the virtualization capabilities of recent versions of Linux."
2HOMEPAGE = "http://libvirt.org"
3LICENSE = "LGPLv2.1+"
4LICENSE_${PN}-ptest = "GPLv2+ & LGPLv2.1"
5LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
6 file://COPYING.LESSER;md5=4fbd65380cdd255951079008b364516c"
7SECTION = "console/tools"
8PR = "r1"
9
10DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap util-linux e2fsprogs pm-utils \
11 iptables dnsmasq readline"
12
13# libvirt-guests.sh needs gettext.sh
14#
15RDEPENDS_${PN} = "gettext-runtime"
16
17RDEPENDS_${PN}-ptest += "make gawk"
18
19RDEPENDS_libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasq netcat-openbsd"
20RDEPENDS_libvirt-libvirtd_append_x86-64 = " dmidecode"
21RDEPENDS_libvirt-libvirtd_append_x86 = " dmidecode"
22
23#connman blocks the 53 port and libvirtd can't start its DNS service
24RCONFLICTS_${PN}_libvirtd = "connman"
25
26SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.gz;name=libvirt \
27 file://tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch \
28 file://libvirtd.sh \
29 file://libvirtd.conf \
30 file://runptest.patch \
31 file://run-ptest \
32 "
33
34SRC_URI[libvirt.md5sum] = "592958ad1ddce7574d8cb0a31e635acd"
35SRC_URI[libvirt.sha256sum] = "a48377e307c5c21b67e43db99af909a23c33aff8cbbaa3361fd389eb047cbbc3"
36
37inherit autotools gettext update-rc.d pkgconfig ptest
38
39CACHED_CONFIGUREVARS += "\
40ac_cv_path_XMLLINT=/usr/bin/xmllint \
41ac_cv_path_XMLCATLOG=/usr/bin/xmlcatalog \
42ac_cv_path_AUGPARSE=/usr/bin/augparse \
43ac_cv_path_DNSMASQ=/usr/bin/dnsmasq \
44ac_cv_path_BRCTL=/usr/sbin/brctl \
45ac_cv_path_TC=/sbin/tc \
46ac_cv_path_UDEVADM=/sbin/udevadm \
47ac_cv_path_MODPROBE=/sbin/modprobe \
48ac_cv_path_IP_PATH=/bin/ip \
49ac_cv_path_IPTABLES_PATH=/usr/sbin/iptables \
50ac_cv_path_IP6TABLES_PATH=/usr/sbin/ip6tables \
51ac_cv_path_MOUNT=/bin/mount \
52ac_cv_path_UMOUNT=/bin/umount \
53ac_cv_path_MKFS=/usr/sbin/mkfs \
54ac_cv_path_SHOWMOUNT=/usr/sbin/showmount \
55ac_cv_path_PVCREATE=/usr/sbin/pvcreate \
56ac_cv_path_VGCREATE=/usr/sbin/vgcreate \
57ac_cv_path_LVCREATE=/usr/sbin/lvcreate \
58ac_cv_path_PVREMOVE=/usr/sbin/pvremove \
59ac_cv_path_VGREMOVE=/usr/sbin/vgremove \
60ac_cv_path_LVREMOVE=/usr/sbin/lvremove \
61ac_cv_path_LVCHANGE=/usr/sbin/lvchange \
62ac_cv_path_VGCHANGE=/usr/sbin/vgchange \
63ac_cv_path_VGSCAN=/usr/sbin/vgscan \
64ac_cv_path_PVS=/usr/sbin/pvs \
65ac_cv_path_VGS=/usr/sbin/vgs \
66ac_cv_path_LVS=/usr/sbin/lvs \
67ac_cv_path_PARTED=/usr/sbin/parted \
68ac_cv_path_DMSETUP=/usr/sbin/dmsetup"
69
70# Some other possible paths we are not yet setting
71#ac_cv_path_RPCGEN=
72#ac_cv_path_XSLTPROC=
73#ac_cv_path_RADVD=
74#ac_cv_path_UDEVSETTLE=
75#ac_cv_path_EBTABLES_PATH=
76#ac_cv_path_PKG_CONFIG=
77#ac_cv_path_ac_pt_PKG_CONFIG
78#ac_cv_path_PKCHECK_PATH=
79#ac_cv_path_POLKIT_AUTH=
80#ac_cv_path_DTRACE=
81#ac_cv_path_ISCSIADM=
82#ac_cv_path_MSGFMT=
83#ac_cv_path_GMSGFMT=
84#ac_cv_path_XGETTEXT=
85#ac_cv_path_MSGMERGE=
86#ac_cv_path_SCRUB=
87#ac_cv_path_PYTHON=
88
89ALLOW_EMPTY_${PN} = "1"
90
91PACKAGES =+ "${PN}-libvirtd ${PN}-virsh"
92
93ALLOW_EMPTY_${PN}-libvirtd = "1"
94
95FILES_${PN}-libvirtd = "${sysconfdir}/init.d \
96 ${sysconfdir}/sysctl.d \
97 ${sysconfdir}/logrotate.d \
98 ${sysconfdir}/libvirt/libvirtd.conf \
99 /usr/lib/sysctl.d/libvirtd.conf \
100 ${sbindir}/libvirtd"
101
102FILES_${PN}-virsh = "${bindir}/virsh"
103FILES_${PN} += "${libdir}/libvirt/connection-driver \
104 ${datadir}/augeas \
105 ${datadir}/polkit-1"
106
107FILES_${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug ${libdir}/libvirt/lock-driver/.debug"
108FILES_${PN}-staticdev += "${libdir}/*.a ${libdir}/libvirt/connection-driver/*.a ${libdir}/libvirt/lock-driver/*.a"
109
110INITSCRIPT_PACKAGES = "${PN}-libvirtd"
111INITSCRIPT_NAME_${PN}-libvirtd = "libvirtd"
112INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72"
113
114PRIVATE_LIBS_${PN}-ptest = " \
115 libvirt-lxc.so.0 \
116 libvirt.so.0 \
117 libvirt-qemu.so.0 \
118 lockd.so \
119 libvirt_driver_secret.so \
120 libvirt_driver_nodedev.so \
121 libvirt_driver_vbox.so \
122 libvirt_driver_interface.so \
123 libvirt_driver_uml.so \
124 libvirt_driver_network.so \
125 libvirt_driver_nwfilter.so \
126 libvirt_driver_qemu.so \
127 libvirt_driver_storage.so \
128 libvirt_driver_lxc.so \
129 "
130
131# xen-minimal config
132#PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd"
133
134# full config
135PACKAGECONFIG ??= "qemu yajl uml openvz vmware vbox esx iproute2 lxc test \
136 remote macvtap libvirtd netcf udev python ebtables \
137 ${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
138 ${@base_contains('DISTRO_FEATURES', 'xen', 'xen libxl xen-inotify', '', d)} \
139 ${@base_contains('DISTRO_FEATURES', 'x11', 'polkit', '', d)} \
140 "
141
142# enable,disable,depends,rdepends
143#
144PACKAGECONFIG[qemu] = "--with-qemu,--without-qemu,qemu,"
145PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl"
146PACKAGECONFIG[xen] = "--with-xen,--without-xen,xen,"
147PACKAGECONFIG[xenapi] = "--with-xenapi,--without-xenapi,,"
148PACKAGECONFIG[libxl] = "--with-libxl=${STAGING_DIR_TARGET}/lib,--without-libxl,libxl,"
149PACKAGECONFIG[xen-inotify] = "--with-xen-inotify,--without-xen-inotify,xen,"
150PACKAGECONFIG[uml] = "--with-uml, --without-uml,,"
151PACKAGECONFIG[openvz] = "--with-openvz,--without-openvz,,"
152PACKAGECONFIG[vmware] = "--with-vmware,--without-vmware,,"
153PACKAGECONFIG[phyp] = "--with-phyp,--without-phyp,,"
154PACKAGECONFIG[vbox] = "--with-vbox,--without-vbox,,"
155PACKAGECONFIG[esx] = "--with-esx,--without-esx,,"
156PACKAGECONFIG[hyperv] = "--with-hyperv,--without-hyperv,,"
157PACKAGECONFIG[polkit] = "--with-polkit,--without-polkit,polkit,polkit"
158PACKAGECONFIG[lxc] = "--with-lxc,--without-lxc, lxc,"
159PACKAGECONFIG[test] = "--with-test=yes,--with-test=no,,"
160PACKAGECONFIG[remote] = "--with-remote,--without-remote,,"
161PACKAGECONFIG[macvtap] = "--with-macvtap=yes,--with-macvtap=no,libnl,libnl"
162PACKAGECONFIG[libvirtd] = "--with-libvirtd,--without-libvirtd,,"
163PACKAGECONFIG[netcf] = "--with-netcf,--without-netcf,netcf,netcf"
164PACKAGECONFIG[dtrace] = "--with-dtrace,--without-dtrace,,"
165PACKAGECONFIG[udev] = "--with-udev --with-pciaccess,--without-udev,udev libpciaccess,"
166PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux,"
167PACKAGECONFIG[ebtables] = "ac_cv_path_EBTABLES_PATH=/sbin/ebtables,ac_cv_path_EBTABLES_PATH=,ebtables,ebtables"
168PACKAGECONFIG[python] = ",,python,"
169PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl,cyrus-sasl"
170PACKAGECONFIG[iproute2] = "ac_cv_path_IP_PATH=/sbin/ip,ac_cv_path_IP_PATH=,iproute2,iproute2"
171
172# Enable the Python tool support
173require libvirt-python.inc
174
175do_install_append() {
176 install -d ${D}/etc/init.d
177 install -d ${D}/etc/libvirt
178
179 install -m 0755 ${WORKDIR}/libvirtd.sh ${D}/etc/init.d/libvirtd
180 install -m 0644 ${WORKDIR}/libvirtd.conf ${D}/etc/libvirt/libvirtd.conf
181
182 # This will wind up in the libvirtd package, but will NOT be invoked by default.
183 #
184 mv ${D}/${libexecdir}/libvirt-guests.sh ${D}/${sysconfdir}/init.d
185
186 # The /var/run/libvirt directories created by the Makefile
187 # are wiped out in volatile, we need to create these at boot.
188 rm -rf ${D}${localstatedir}/run
189 install -d ${D}${sysconfdir}/default/volatiles
190 echo "d root root 0755 ${localstatedir}/run/libvirt none" \
191 > ${D}${sysconfdir}/default/volatiles/99_libvirt
192 echo "d root root 0755 ${localstatedir}/run/libvirt/lockd none" \
193 >> ${D}${sysconfdir}/default/volatiles/99_libvirt
194 echo "d root root 0755 ${localstatedir}/run/libvirt/lxc none" \
195 >> ${D}${sysconfdir}/default/volatiles/99_libvirt
196 echo "d root root 0755 ${localstatedir}/run/libvirt/network none" \
197 >> ${D}${sysconfdir}/default/volatiles/99_libvirt
198 echo "d root root 0755 ${localstatedir}/run/libvirt/qemu none" \
199 >> ${D}${sysconfdir}/default/volatiles/99_libvirt
200}
201
202EXTRA_OEMAKE = "BUILD_DIR=${B} DEST_DIR=${D}${PTEST_PATH} PTEST_DIR=${PTEST_PATH}"
203
204do_compile_ptest() {
205 oe_runmake -C tests buildtest-TESTS
206}
207
208do_install_ptest() {
209 oe_runmake -C tests install-ptest
210}
211
212pkg_postinst_libvirt() {
213 if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
214 /etc/init.d/populate-volatile.sh update
215 fi
216}
diff --git a/recipes-extended/multipath-tools/multipath-tools_git.bb b/recipes-extended/multipath-tools/multipath-tools_git.bb
new file mode 100644
index 00000000..633b9f2f
--- /dev/null
+++ b/recipes-extended/multipath-tools/multipath-tools_git.bb
@@ -0,0 +1,46 @@
1SUMMARY = "Tools to Manage Multipathed Devices with the device-mapper"
2DESCRIPTION = "This package provides the tools to manage multipathed devices by \
3instructing the device-mapper multipath module what to do"
4
5HOMEPAGE = "http://christophe.varoqui.free.fr/"
6DEPENDS = "readline libaio lvm2"
7LICENSE = "GPLv2"
8
9LIC_FILES_CHKSUM = "file://COPYING;md5=7be2873b6270e45abacc503abbe2aa3d"
10S="${WORKDIR}/git"
11
12
13SRC_URI = "git://git.opensvc.com/multipath-tools/.git;protocol=http"
14
15SRCREV = "d3683ab18b386e9b3b54b59a122c689e9ebdf5cf"
16PV = "0.4.9+gitr${SRCPV}"
17
18inherit autotools
19
20EXTRA_OEMAKE="LIB=${libdir} exec_prefix=${exec_prefix} libdir=${libdir}"
21
22PACKAGES =+ "libmpathpersist mpathpersist kpartx libmultipath multipath multipathd libmultipath-dev libmpathpersist-dev"
23
24
25RDEPENDS_${PN} += "libmpathpersist mpathpersist kpartx libmultipath multipath multipathd udev"
26
27do_install_append () {
28 ln -sf libmpathpersist.so.0 ${D}${libdir}/libmpathpersist.so
29 ln -sf libmultipath.so.0 ${D}${libdir}/libmultipath.so
30}
31
32ALLOW_EMPTY_${PN} = "1"
33FILES_${PN} = ""
34
35FILES_libmpathpersist = "${libdir}/libmpathpersist*.so.0"
36FILES_mpathpersist = "${sbindir}/mpathpersist"
37FILES_kpartx = "${sbindir}/kpartx ${base_libdir}/udev/"
38FILES_libmultipath = "${libdir}/libcheck*.so ${libdir}/libpri*.so ${libdir}/libmultipath*.so.0"
39FILES_multipath = "${sbindir}/multipath ${sysconfdir}"
40FILES_multipathd = "${sbindir}/multipathd ${base_libdir}"
41
42#put the symbol link lib in -dev
43FILES_libmultipath-dev = "${libdir}/libmultipath*.so"
44FILES_libmpathpersist-dev = "${libdir}/libmpathpersist*.so"
45
46
diff --git a/recipes-extended/xen/files/flask-avoid-installing-policy-file-as-boot.patch b/recipes-extended/xen/files/flask-avoid-installing-policy-file-as-boot.patch
new file mode 100644
index 00000000..d980807d
--- /dev/null
+++ b/recipes-extended/xen/files/flask-avoid-installing-policy-file-as-boot.patch
@@ -0,0 +1,26 @@
1From 8bff3edead4318bfebc487f929f833d11922c238 Mon Sep 17 00:00:00 2001
2From: "Vadim A. Misbakh-Soloviov" <mva@mva.name>
3Date: Tue, 30 Jul 2013 16:34:38 +0400
4Subject: [PATCH] flask: avoid installing policy file as '/boot'
5
6Signed-off-by: Vadim A. Misbakh-Soloviov <mva@mva.name>
7Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
8---
9 tools/flask/policy/Makefile | 1 +
10 1 file changed, 1 insertion(+)
11
12diff --git a/tools/flask/policy/Makefile b/tools/flask/policy/Makefile
13index e666f3e..df1e8f3 100644
14--- a/tools/flask/policy/Makefile
15+++ b/tools/flask/policy/Makefile
16@@ -103,6 +103,7 @@ POLICY_SECTIONS += $(USERS) $(CONSTRAINTS) $(ISID_DEFS)
17 all: $(POLICY_FILENAME)
18
19 install: $(POLICY_FILENAME)
20+ $(INSTALL_DIR) $(POLICY_LOADPATH)
21 $(INSTALL_DATA) $^ $(POLICY_LOADPATH)
22
23 $(POLICY_FILENAME): policy.conf
24--
251.7.10.4
26
diff --git a/recipes-extended/xen/xen.inc b/recipes-extended/xen/xen.inc
new file mode 100644
index 00000000..b1212501
--- /dev/null
+++ b/recipes-extended/xen/xen.inc
@@ -0,0 +1,658 @@
1DESCRIPTION = "Xen hypervisor"
2HOMEPAGE = "http://xen.org"
3LICENSE = "GPLv2"
4SECTION = "console/tools"
5PR = "r0"
6
7LIC_FILES_CHKSUM = "file://COPYING;md5=e0f0f3ac55608719a82394cc353928df"
8
9COMPATIBLE_HOST = '(x86_64.*).*-linux'
10
11inherit autotools gettext setuptools update-rc.d
12
13PACKAGECONFIG ??= " \
14 sdl \
15"
16
17PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,virtual/libsdl,"
18PACKAGECONFIG[xsm] = "--enable-xsmpolicy,--disable-xsmpolicy,checkpolicy-native,"
19
20DEPENDS = "util-linux util-linux-native file-native zlib ncurses openssl bison-native flex-native gettext dev86-native iasl-native pciutils bridge-utils iproute2 procps yajl pixman python xz xz-native glib-2.0"
21
22# inherit setuptools adds python to RDEPENDS, override it
23RDEPENDS_${PN} = ""
24
25RDEPENDS_${PN}-base = "\
26 libgcc udev bash perl xz \
27 ${PN}-blktap \
28 ${PN}-console \
29 ${PN}-libblktapctl \
30 ${PN}-libxenguest \
31 ${PN}-libxenlight \
32 ${PN}-libxenvchan \
33 ${PN}-libxenctrl \
34 ${PN}-libxlutil \
35 ${PN}-libvhd \
36 ${PN}-libxenstat \
37 ${PN}-libxenstore \
38 ${PN}-libfsimage \
39 ${PN}-fsimage \
40 ${PN}-hvmloader \
41 ${PN}-scripts-block \
42 ${PN}-scripts-network \
43 ${PN}-udev \
44 ${PN}-xenpaging \
45 ${PN}-xen-watchdog \
46 ${PN}-xencommons \
47 ${PN}-xendomains \
48 ${PN}-xenstore \
49 ${PN}-xenstored \
50 ${PN}-xl \
51 "
52
53RDEPENDS_${PN}-scripts-block = "\
54 ${PN}-scripts-common \
55 ${PN}-udev \
56 ${PN}-volatiles \
57 "
58
59RDEPENDS_${PN}-scripts-network = "\
60 bridge-utils \
61 ${PN}-scripts-common \
62 ${PN}-udev \
63 ${PN}-volatiles \
64 "
65
66RDEPENDS_${PN}-xencommons = "\
67 ${PN}-console \
68 ${PN}-xenstore \
69 ${PN}-xenstored \
70 ${PN}-scripts-common \
71 "
72
73RDEPENDS_${PN}-xendomains = "\
74 ${PN}-console \
75 ${PN}-scripts-block \
76 ${PN}-scripts-common \
77 ${PN}-xenstored \
78 "
79
80RDEPENDS_${PN}-xl = "libgcc"
81
82PACKAGES = "\
83 ${PN}-base \
84 ${PN}-blktap \
85 ${PN}-console \
86 ${PN}-dbg \
87 ${PN}-dev \
88 ${PN}-doc \
89 ${PN}-flask \
90 ${PN}-fsimage \
91 ${PN}-gdbsx \
92 ${PN}-hvmloader \
93 ${PN}-hypervisor \
94 ${PN}-kdd \
95 ${PN}-libblktap \
96 ${PN}-libblktapctl \
97 ${PN}-libblktapctl-dev \
98 ${PN}-libblktap-dev \
99 ${PN}-libfsimage \
100 ${PN}-libfsimage-dev \
101 ${PN}-libvhd \
102 ${PN}-libvhd-dev \
103 ${PN}-libxenctrl \
104 ${PN}-libxenctrl-dev \
105 ${PN}-libxenguest \
106 ${PN}-libxenguest-dev \
107 ${PN}-libxenlight \
108 ${PN}-libxenlight-dev \
109 ${PN}-libxenstat \
110 ${PN}-libxenstat-dev \
111 ${PN}-libxenstore \
112 ${PN}-libxenstore-dev \
113 ${PN}-libxenvchan \
114 ${PN}-libxenvchan-dev \
115 ${PN}-libxlutil \
116 ${PN}-libxlutil-dev \
117 ${PN}-misc \
118 ${PN}-pygrub \
119 ${PN}-python \
120 ${PN}-qemu \
121 ${PN}-remus \
122 ${PN}-scripts-block \
123 ${PN}-scripts-common \
124 ${PN}-scripts-network \
125 ${PN}-staticdev \
126 ${PN}-udev \
127 ${PN}-volatiles \
128 ${PN}-xcutils \
129 ${PN}-xencommons \
130 ${PN}-xend \
131 ${PN}-xend-examples \
132 ${PN}-xendomains \
133 ${PN}-xenmon \
134 ${PN}-xenpaging \
135 ${PN}-xenpmd \
136 ${PN}-xenstat \
137 ${PN}-xenstore \
138 ${PN}-xenstored \
139 ${PN}-xentrace \
140 ${PN}-xen-watchdog \
141 ${PN}-xl \
142 ${PN}-xl-examples \
143 ${PN}-xm \
144 ${PN}-xm-examples \
145 "
146
147FILES_${PN}-dbg += "\
148 ${libdir}/.debug \
149 ${libdir}/xen/bin/.debug \
150 ${libdir}/python2.7/site-packages/.debug \
151 ${libdir}/python2.7/site-packages/xen/lowlevel/.debug \
152 ${libdir}/fs/xfs/.debug \
153 ${libdir}/fs/ufs/.debug \
154 ${libdir}/fs/ext2fs-lib/.debug \
155 ${libdir}/fs/fat/.debug \
156 ${libdir}/fs/zfs/.debug \
157 ${libdir}/fs/reiserfs/.debug \
158 ${libdir}/fs/iso9660/.debug \
159 ${sbindir}/.debug \
160 ${libdir}exec/.debug \
161 ${bindir}/.debug \
162 ${libdir}/python2.7/dist-packages/.debug \
163 ${libdir}/python2.7/dist-packages/xen/lowlevel/.debug \
164 "
165
166FILES_${PN}-dev = "\
167 ${includedir} \
168 "
169
170FILES_${PN}-doc = "\
171 ${sysconfdir}/xen/README \
172 ${sysconfdir}/xen/README.incompatibilities \
173 ${datadir}/doc \
174 ${datadir}/man \
175 "
176
177FILES_${PN}-staticdev += "\
178 ${libdir}/libblktapctl.a \
179 ${libdir}/libxenguest.a \
180 ${libdir}/libxenlight.a \
181 ${libdir}/libxenvchan.a \
182 ${libdir}/libxenctrl.a \
183 ${libdir}/libxlutil.a \
184 ${libdir}/libvhd.a \
185 ${libdir}/libxenstat.a \
186 ${libdir}/libxenstore.a \
187 ${libdir}/libblktap.a \
188 "
189
190FILES_${PN}-libblktapctl = "${libdir}/libblktapctl.so.*"
191FILES_${PN}-libblktapctl-dev = "${libdir}/libblktapctl.so"
192
193FILES_${PN}-libxenguest = "${libdir}/libxenguest.so.*"
194FILES_${PN}-libxenguest-dev = "${libdir}/libxenguest.so"
195
196FILES_${PN}-libxenlight = "${libdir}/libxenlight.so.*"
197FILES_${PN}-libxenlight-dev = "${libdir}/libxenlight.so"
198
199FILES_${PN}-libxenvchan = "${libdir}/libxenvchan.so.*"
200FILES_${PN}-libxenvchan-dev = "${libdir}/libxenvchan.so"
201
202FILES_${PN}-libxenctrl = "${libdir}/libxenctrl.so.*"
203FILES_${PN}-libxenctrl-dev = "${libdir}/libxenctrl.so"
204
205FILES_${PN}-libxlutil = "${libdir}/libxlutil.so.*"
206FILES_${PN}-libxlutil-dev = "${libdir}/libxlutil.so"
207
208FILES_${PN}-libvhd = "${libdir}/libvhd.so.*"
209FILES_${PN}-libvhd-dev = "${libdir}/libvhd.so"
210
211FILES_${PN}-libxenstat = "${libdir}/libxenstat.so.*"
212FILES_${PN}-libxenstat-dev = "${libdir}/libxenstat.so"
213
214FILES_${PN}-libxenstore = "${libdir}/libxenstore.so.*"
215FILES_${PN}-libxenstore-dev = "${libdir}/libxenstore.so"
216
217FILES_${PN}-libblktap = "${libdir}/libblktap.so.*"
218FILES_${PN}-libblktap-dev = "${libdir}/libblktap.so"
219
220FILES_${PN}-libfsimage = "${libdir}/libfsimage.so.*"
221FILES_${PN}-libfsimage-dev = "${libdir}/libfsimage.so"
222
223FILES_${PN}-fsimage = "${libdir}/fs/*/*fsimage.so"
224
225FILES_${PN}-hypervisor = "\
226 /boot/xen-*.gz \
227 /boot/xen.gz \
228 /boot/xen-syms-* \
229 "
230
231FILES_${PN}-base = "\
232 ${sysconfdir}/xen/auto \
233 ${sysconfdir}/xen/cpupool \
234 ${localstatedir}/xen/dump \
235 "
236
237FILES_${PN}-blktap = "\
238 ${sbindir}/blktapctrl \
239 ${sbindir}/img2qcow \
240 ${sbindir}/lock-util \
241 ${sbindir}/qcow2raw \
242 ${sbindir}/qcow-create \
243 ${sbindir}/tap-ctl \
244 ${sbindir}/tapdisk \
245 ${sbindir}/tapdisk2 \
246 ${sbindir}/tapdisk-client \
247 ${sbindir}/tapdisk-diff \
248 ${sbindir}/tapdisk-stream \
249 ${sbindir}/td-util \
250 ${sbindir}/vhd-update \
251 ${sbindir}/vhd-util \
252 "
253
254FILES_${PN}-console = "\
255 ${libdir}/xen/bin/xenconsole \
256 ${sbindir}/xenconsoled \
257 "
258
259FILES_${PN}-flask = "\
260 ${sbindir}/flask-get-bool \
261 ${sbindir}/flask-getenforce \
262 ${sbindir}/flask-label-pci \
263 ${sbindir}/flask-loadpolicy \
264 ${sbindir}/flask-set-bool \
265 ${sbindir}/flask-setenforce \
266 /boot/xenpolicy.24 \
267 "
268
269FILES_${PN}-gdbsx = "\
270 ${sbindir}/gdbsx \
271 "
272
273INSANE_SKIP_${PN}-hvmloader = "arch"
274FILES_${PN}-hvmloader = "\
275 ${libdir}/xen/boot/hvmloader \
276 "
277
278FILES_${PN}-kdd = "\
279 ${sbindir}/kdd \
280 "
281
282FILES_${PN}-misc = "\
283 ${bindir}/xencons \
284 ${bindir}/xencov_split \
285 ${bindir}/xen-detect \
286 ${libdir}/xen/bin/xenpvnetboot \
287 ${sbindir}/gtracestat \
288 ${sbindir}/gtraceview \
289 ${sbindir}/xen-bugtool \
290 ${sbindir}/xencov \
291 ${sbindir}/xenperf \
292 ${sbindir}/xenpm \
293 ${sbindir}/xsview \
294 ${sbindir}/xen-tmem-list-parse \
295 ${sbindir}/xen-python-path \
296 ${sbindir}/xen-ringwatch \
297 ${sbindir}/xen-hptool \
298 ${sbindir}/xen-hvmcrash \
299 ${sbindir}/xen-hvmctx \
300 ${sbindir}/xenlockprof \
301 ${sbindir}/xen-lowmemd \
302 "
303
304FILES_${PN}-pygrub = "\
305 ${bindir}/pygrub \
306 ${libdir}/xen/bin/pygrub \
307 "
308
309FILES_${PN}-python = "\
310 ${libdir}/python2.7 \
311 "
312
313INSANE_SKIP_${PN} = "already-stripped"
314INSANE_SKIP_${PN}-qemu = "arch"
315FILES_${PN}-qemu = " \
316 ${datadir}/xen/qemu \
317 ${libdir}/xen/bin/qemu-system-i386 \
318 ${libdir}/xen/bin/qemu-system-x86_64 \
319 ${libdir}/xen/bin/qemu-img \
320 ${libdir}/xen/bin/qemu-nbd \
321 ${libdir}/xen/bin/qemu-ga \
322 ${libdir}/xen/bin/qemu-io \
323 ${libdir}/xen/bin/qemu-dm \
324 ${libdir}/xen/bin/virtfs-proxy-helper \
325 /usr/libexec/qemu-bridge-helper \
326 /usr/etc/qemu \
327 /usr/etc/qemu/target-x86_64.conf \
328 ${datadir}/qemu-xen \
329 ${datadir}/qemu-xen/qemu \
330 ${datadir}/qemu-xen/qemu/bamboo.dtb \
331 ${datadir}/qemu-xen/qemu/pxe-pcnet.rom \
332 ${datadir}/qemu-xen/qemu/vgabios-vmware.bin \
333 ${datadir}/qemu-xen/qemu/pxe-eepro100.rom \
334 ${datadir}/qemu-xen/qemu/pxe-e1000.rom \
335 ${datadir}/qemu-xen/qemu/openbios-ppc \
336 ${datadir}/qemu-xen/qemu/multiboot.bin \
337 ${datadir}/qemu-xen/qemu/vgabios-cirrus.bin \
338 ${datadir}/qemu-xen/qemu/bios.bin \
339 ${datadir}/qemu-xen/qemu/vgabios-stdvga.bin \
340 ${datadir}/qemu-xen/qemu/palcode-clipper \
341 ${datadir}/qemu-xen/qemu/pxe-ne2k_pci.rom \
342 ${datadir}/qemu-xen/qemu/spapr-rtas.bin \
343 ${datadir}/qemu-xen/qemu/slof.bin \
344 ${datadir}/qemu-xen/qemu/vgabios-qxl.bin \
345 ${datadir}/qemu-xen/qemu/pxe-rtl8139.rom \
346 ${datadir}/qemu-xen/qemu/openbios-sparc64 \
347 ${datadir}/qemu-xen/qemu/pxe-virtio.rom \
348 ${datadir}/qemu-xen/qemu/kvmvapic.bin \
349 ${datadir}/qemu-xen/qemu/openbios-sparc32 \
350 ${datadir}/qemu-xen/qemu/petalogix-s3adsp1800.dtb \
351 ${datadir}/qemu-xen/qemu/sgabios.bin \
352 ${datadir}/qemu-xen/qemu/linuxboot.bin \
353 ${datadir}/qemu-xen/qemu/qemu-icon.bmp \
354 ${datadir}/qemu-xen/qemu/ppc_rom.bin \
355 ${datadir}/qemu-xen/qemu/vgabios.bin \
356 ${datadir}/qemu-xen/qemu/s390-zipl.rom \
357 ${datadir}/qemu-xen/qemu/petalogix-ml605.dtb \
358 ${datadir}/qemu-xen/qemu/keymaps \
359 ${datadir}/qemu-xen/qemu/keymaps/common \
360 ${datadir}/qemu-xen/qemu/keymaps/th \
361 ${datadir}/qemu-xen/qemu/keymaps/is \
362 ${datadir}/qemu-xen/qemu/keymaps/en-gb \
363 ${datadir}/qemu-xen/qemu/keymaps/ar \
364 ${datadir}/qemu-xen/qemu/keymaps/fr-be \
365 ${datadir}/qemu-xen/qemu/keymaps/ru \
366 ${datadir}/qemu-xen/qemu/keymaps/hu \
367 ${datadir}/qemu-xen/qemu/keymaps/de-ch \
368 ${datadir}/qemu-xen/qemu/keymaps/no \
369 ${datadir}/qemu-xen/qemu/keymaps/fr \
370 ${datadir}/qemu-xen/qemu/keymaps/pl \
371 ${datadir}/qemu-xen/qemu/keymaps/fr-ca \
372 ${datadir}/qemu-xen/qemu/keymaps/de \
373 ${datadir}/qemu-xen/qemu/keymaps/fr-ch \
374 ${datadir}/qemu-xen/qemu/keymaps/bepo \
375 ${datadir}/qemu-xen/qemu/keymaps/lv \
376 ${datadir}/qemu-xen/qemu/keymaps/ja \
377 ${datadir}/qemu-xen/qemu/keymaps/da \
378 ${datadir}/qemu-xen/qemu/keymaps/lt \
379 ${datadir}/qemu-xen/qemu/keymaps/hr \
380 ${datadir}/qemu-xen/qemu/keymaps/es \
381 ${datadir}/qemu-xen/qemu/keymaps/modifiers \
382 ${datadir}/qemu-xen/qemu/keymaps/sl \
383 ${datadir}/qemu-xen/qemu/keymaps/it \
384 ${datadir}/qemu-xen/qemu/keymaps/nl \
385 ${datadir}/qemu-xen/qemu/keymaps/fo \
386 ${datadir}/qemu-xen/qemu/keymaps/mk \
387 ${datadir}/qemu-xen/qemu/keymaps/pt-br \
388 ${datadir}/qemu-xen/qemu/keymaps/tr \
389 ${datadir}/qemu-xen/qemu/keymaps/sv \
390 ${datadir}/qemu-xen/qemu/keymaps/fi \
391 ${datadir}/qemu-xen/qemu/keymaps/en-us \
392 ${datadir}/qemu-xen/qemu/keymaps/et \
393 ${datadir}/qemu-xen/qemu/keymaps/nl-be \
394 ${datadir}/qemu-xen/qemu/keymaps/pt \
395 ${bindir}/qemu-nbd-xen \
396 ${bindir}/qemu-img-xen \
397 "
398
399FILES_${PN}-remus = "\
400 ${bindir}/remus \
401 "
402
403FILES_${PN}-scripts-network = " \
404 ${sysconfdir}/xen/scripts/network-bridge \
405 ${sysconfdir}/xen/scripts/network-nat \
406 ${sysconfdir}/xen/scripts/network-route \
407 ${sysconfdir}/xen/scripts/qemu-ifup \
408 ${sysconfdir}/xen/scripts/vif2 \
409 ${sysconfdir}/xen/scripts/vif-bridge \
410 ${sysconfdir}/xen/scripts/vif-common.sh \
411 ${sysconfdir}/xen/scripts/vif-nat \
412 ${sysconfdir}/xen/scripts/vif-openvswitch \
413 ${sysconfdir}/xen/scripts/vif-route \
414 ${sysconfdir}/xen/scripts/vif-setup \
415 "
416
417FILES_${PN}-scripts-block = " \
418 ${sysconfdir}/xen/scripts/blktap \
419 ${sysconfdir}/xen/scripts/block \
420 ${sysconfdir}/xen/scripts/block-common.sh \
421 ${sysconfdir}/xen/scripts/block-enbd \
422 ${sysconfdir}/xen/scripts/block-iscsi \
423 ${sysconfdir}/xen/scripts/block-nbd \
424 ${sysconfdir}/xen/scripts/vscsi \
425 "
426
427FILES_${PN}-scripts-common = " \
428 ${sysconfdir}/xen/scripts/external-device-migrate \
429 ${sysconfdir}/xen/scripts/hotplugpath.sh \
430 ${sysconfdir}/xen/scripts/locking.sh \
431 ${sysconfdir}/xen/scripts/logging.sh \
432 ${sysconfdir}/xen/scripts/xen-hotplug-cleanup \
433 ${sysconfdir}/xen/scripts/xen-hotplug-common.sh \
434 ${sysconfdir}/xen/scripts/xen-network-common.sh \
435 ${sysconfdir}/xen/scripts/xen-script-common.sh \
436 "
437
438FILES_${PN}-udev = "\
439 ${sysconfdir}/udev/rules.d/xen-backend.rules \
440 ${sysconfdir}/udev/rules.d/xend.rules \
441 "
442
443FILES_${PN}-volatiles = "\
444 ${sysconfdir}/default/volatiles/99_xen \
445 "
446
447FILES_${PN}-xcutils = "\
448 ${libdir}/xen/bin/lsevtchn \
449 ${libdir}/xen/bin/readnotes \
450 ${libdir}/xen/bin/xc_restore \
451 ${libdir}/xen/bin/xc_save \
452 "
453
454FILES_${PN}-xend-examples = "\
455 ${sysconfdir}/xen/xend-config.sxp \
456 ${sysconfdir}/xen/xend-pci-permissive.sxp \
457 ${sysconfdir}/xen/xend-pci-quirks.sxp \
458 "
459
460FILES_${PN}-xenpaging = "\
461 ${libdir}/xen/bin/xenpaging \
462 ${localstatedir}/lib/xen/xenpaging \
463 "
464
465FILES_${PN}-xenpmd = "\
466 ${sbindir}/xenpmd \
467 "
468
469FILES_${PN}-xenstat = "\
470 ${sbindir}/xentop \
471 "
472
473FILES_${PN}-xenstore = "\
474 ${bindir}/xenstore \
475 ${bindir}/xenstore-chmod \
476 ${bindir}/xenstore-control \
477 ${bindir}/xenstore-exists \
478 ${bindir}/xenstore-list \
479 ${bindir}/xenstore-ls \
480 ${bindir}/xenstore-read \
481 ${bindir}/xenstore-rm \
482 ${bindir}/xenstore-watch \
483 ${bindir}/xenstore-write \
484 "
485
486FILES_${PN}-xenstored = "\
487 ${sbindir}/xenstored \
488 ${localstatedir}/lib/xenstored \
489 "
490
491FILES_${PN}-xentrace = "\
492 ${bindir}/xentrace \
493 ${bindir}/xentrace_format \
494 ${bindir}/xentrace_setsize \
495 ${libdir}/xen/bin/xenctx \
496 "
497
498FILES_${PN}-xen-watchdog = "\
499 ${sbindir}/xenwatchdogd \
500 ${sysconfdir}/init.d/xen-watchdog \
501 "
502
503FILES_${PN}-xl = "\
504 ${sysconfdir}/bash_completion.d/xl.sh \
505 ${sysconfdir}/xen/xl.conf \
506 ${libdir}/xen/bin/libxl-save-helper \
507 ${sbindir}/xl \
508 "
509
510FILES_${PN}-xl-examples = "\
511 ${sysconfdir}/xen/xlexample.hvm \
512 ${sysconfdir}/xen/xlexample.pvlinux \
513 "
514
515FILES_${PN}-xm-examples = "\
516 ${sysconfdir}/xen/xmexample1 \
517 ${sysconfdir}/xen/xmexample2 \
518 ${sysconfdir}/xen/xmexample3 \
519 ${sysconfdir}/xen/xmexample.hvm \
520 ${sysconfdir}/xen/xmexample.hvm-stubdom \
521 ${sysconfdir}/xen/xmexample.nbd \
522 ${sysconfdir}/xen/xmexample.pv-grub \
523 ${sysconfdir}/xen/xmexample.vti \
524 "
525
526FILES_${PN}-xenmon = "\
527 ${sbindir}/xenbaked \
528 ${sbindir}/xentrace_setmask \
529 ${sbindir}/xenmon.py \
530 "
531
532FILES_${PN}-xm = "\
533 ${sysconfdir}/xen/xm-config.xml \
534 ${datadir}/xen/create.dtd \
535 ${sbindir}/xm \
536 "
537
538FILES_${PN}-xencommons += "\
539 ${sysconfdir}/default/xencommons \
540 ${sysconfdir}/init.d/xencommons \
541 "
542
543FILES_${PN}-xend += " \
544 ${sysconfdir}/init.d/xend \
545 ${sbindir}/xend \
546 "
547
548FILES_${PN}-xendomains += "\
549 ${sysconfdir}/default/xendomains \
550 ${sysconfdir}/init.d/xendomains \
551 ${sysconfdir}/sysconfig/xendomains \
552 "
553
554# configure init.d scripts
555INITSCRIPT_PACKAGES = "${PN}-xend ${PN}-xencommons ${PN}-xen-watchdog ${PN}-xendomains"
556INITSCRIPT_NAME_${PN}-xencommons = "xencommons"
557INITSCRIPT_PARAMS_${PN}-xencommons = "defaults 80"
558INITSCRIPT_NAME_${PN}-xen-watchdog = "xen-watchdog"
559INITSCRIPT_PARAMS_${PN}-xen-watchdog = "defaults 81"
560INITSCRIPT_NAME_${PN}-xend = "xend"
561INITSCRIPT_PARAMS_${PN}-xend = "defaults 82"
562INITSCRIPT_NAME_${PN}-xendomains = "xendomains"
563INITSCRIPT_PARAMS_${PN}-xendomains = "defaults 83"
564
565#### REQUIRED ENVIRONMENT VARIABLES ####
566export BUILD_SYS
567export HOST_SYS
568export STAGING_INCDIR
569export STAGING_LIBDIR
570
571# specify xen hypervisor to target x86_64 (x86_32 not supported)
572export XEN_TARGET_ARCH="x86_64"
573export XEN_COMPILE_ARCH="x86_64"
574
575# this is used for the header (#!${bindir}/python) of the install python scripts
576export PYTHONPATH="${bindir}/python"
577
578# seabios forcefully sets HOSTCC to CC - fixup to allow it to build native conf executable
579export HOSTCC="${BUILD_CC}"
580
581# make xen requires CROSS_COMPILE set by hand as it does not abide by ./configure
582export CROSS_COMPILE="${TARGET_PREFIX}"
583
584# overide LDFLAGS to allow xen to build without: "x86_64-oe-linux-ld: unrecognized option '-Wl,-O1'"
585export LDFLAGS=""
586
587EXTRA_OECONF += " \
588 --exec-prefix=/usr \
589 --prefix=/usr \
590 --host=${HOST_SYS} \
591 --disable-stubdom \
592 --disable-ioemu-stubdom \
593 --disable-pv-grub \
594 --disable-xenstore-stubdom \
595"
596
597do_configure() {
598 # no stubs-32.h in our 64-bit sysroot - hack it into tools/include/gnu
599 test -d ${S}/tools/include/gnu || mkdir ${S}/tools/include/gnu
600 if ! test -f ${STAGING_DIR_TARGET}/usr/include/gnu/stubs-32.h ; then
601 cat ${STAGING_DIR_TARGET}/usr/include/gnu/stubs-64.h | grep -v stub_bdflush | grep -v stub_getmsg | grep -v stub_putmsg > ${S}/tools/include/gnu/stubs-32.h
602 echo \#define __stub___kernel_cosl >> ${S}/tools/include/gnu/stubs-32.h
603 echo \#define __stub___kernel_sinl >> ${S}/tools/include/gnu/stubs-32.h
604 echo \#define __stub___kernel_tanl >> ${S}/tools/include/gnu/stubs-32.h
605 fi
606
607 # do configure
608 oe_runconf
609
610 # seabios needs a patch to specify correct compiler - pull and patch Makefile
611 make -C ${S}/tools/firmware seabios-dir
612 sed -i 's/export HOSTCC.*$(CC)/export HOSTCC ?= $(CC)/g' ${S}/tools/firmware/seabios-dir/Makefile
613}
614
615do_compile() {
616 oe_runmake
617}
618
619do_install() {
620 oe_runmake DESTDIR="${D}" install
621
622 # remove installed volatiles
623 rm -rf ${D}${localstatedir}/run ${D}${localstatedir}/lock ${D}${localstatedir}/log ${D}${localstatedir}/volatile
624
625 # install volatiles using populate_volatiles mechanism
626 install -d ${D}${sysconfdir}/default/volatiles
627 echo "d root root 0755 ${localstatedir}/run/xenstored none" \
628 > ${D}${sysconfdir}/default/volatiles/99_xen
629 echo "d root root 0755 ${localstatedir}/run/xend none" \
630 >> ${D}${sysconfdir}/default/volatiles/99_xen
631 echo "d root root 0755 ${localstatedir}/run/xend/boot none" \
632 >> ${D}${sysconfdir}/default/volatiles/99_xen
633 echo "d root root 0755 ${localstatedir}/run/xen none" \
634 >> ${D}${sysconfdir}/default/volatiles/99_xen
635 echo "d root root 0755 ${localstatedir}/log/xen none" \
636 >> ${D}${sysconfdir}/default/volatiles/99_xen
637 echo "d root root 0755 ${localstatedir}/lock/xen none" \
638 >> ${D}${sysconfdir}/default/volatiles/99_xen
639 echo "d root root 0755 ${localstatedir}/lock/subsys none" \
640 >> ${D}${sysconfdir}/default/volatiles/99_xen
641
642 # workaround for xendomains script which searchs sysconfig if directory exists
643 install -d ${D}${sysconfdir}/sysconfig
644 ln -sf ${sysconfdir}/default/xendomains ${D}${sysconfdir}/sysconfig/xendomains
645}
646
647pkg_postinst_${PN}-volatiles() {
648 if [ -z "$D" ] && [ -e ${sysconfdir}/init.d/populate-volatile.sh ] ; then
649 ${sysconfdir}/init.d/populate-volatile.sh update
650 fi
651}
652
653sysroot_stage_all_append() {
654 sysroot_stage_dir ${D}/boot ${SYSROOT_DESTDIR}/kernel
655
656 install -d ${DEPLOY_DIR_IMAGE}
657 install -m 0644 ${D}/boot/xen.gz ${DEPLOY_DIR_IMAGE}/xen-${MACHINE}.gz
658}
diff --git a/recipes-extended/xen/xen_4.3.1.bb b/recipes-extended/xen/xen_4.3.1.bb
new file mode 100644
index 00000000..2c9806b6
--- /dev/null
+++ b/recipes-extended/xen/xen_4.3.1.bb
@@ -0,0 +1,24 @@
1require xen.inc
2
3SRC_URI = " \
4 http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \
5 file://flask-avoid-installing-policy-file-as-boot.patch \
6 "
7
8SRC_URI[md5sum] = "7616b8704e1ab89c81f011f0e3703bc8"
9SRC_URI[sha256sum] = "3b5b7cc508b1739753585b5c25635471cdcef680e8770a78bf6ef9333d26a9fd"
10
11S = "${WORKDIR}/xen-${PV}"
12
13RDEPENDS_${PN}-base += "\
14 ${PN}-libblktap \
15 ${PN}-flask \
16 "
17
18do_configure_prepend() {
19 # fixup qemu-xen-traditional pciutils check hardcoded to test /usr/include/pci
20 sed -i 's/\/usr\/include\/pci/$(STAGING_INCDIR)\/pci/g' ${S}/tools/qemu-xen-traditional/xen-hooks.mak
21
22 # fixup for qemu to cross compile
23 sed -i 's/configure --d/configure --cross-prefix=${TARGET_PREFIX} --d/g' ${S}/tools/qemu-xen-traditional/xen-setup
24}
diff --git a/recipes-extended/xen/xen_git.bb b/recipes-extended/xen/xen_git.bb
new file mode 100644
index 00000000..f333157a
--- /dev/null
+++ b/recipes-extended/xen/xen_git.bb
@@ -0,0 +1,18 @@
1require xen.inc
2
3SRCREV = "68bd172e6fa565899c846eb72755c8ffd8562c8a"
4
5PV = "4.4.0+git${SRCPV}"
6
7S = "${WORKDIR}/git"
8
9SRC_URI = " \
10 git://xenbits.xen.org/xen.git \
11 "
12
13DEFAULT_PREFERENCE = "-1"
14
15PACKAGES += "${PN}-xen-mfndump"
16
17FILES_${PN}-xen-mfndump = "${sbindir}/xen-mfndump"
18
diff --git a/recipes-kernel/linux/linux-yocto/ebtables.cfg b/recipes-kernel/linux/linux-yocto/ebtables.cfg
new file mode 100644
index 00000000..a3c514e1
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/ebtables.cfg
@@ -0,0 +1,2 @@
1CONFIG_BRIDGE_NF_EBTABLES=m
2CONFIG_BRIDGE_EBT_T_NAT=m
diff --git a/recipes-kernel/linux/linux-yocto/ebtables.scc b/recipes-kernel/linux/linux-yocto/ebtables.scc
new file mode 100644
index 00000000..b3895e58
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/ebtables.scc
@@ -0,0 +1,4 @@
1define KFEATURE_DESCRIPTION "Enable ebtables support"
2define KFEATURE_COMPATIBILITY board
3
4kconf non-hardware ebtables.cfg
diff --git a/recipes-kernel/linux/linux-yocto/lxc.cfg b/recipes-kernel/linux/linux-yocto/lxc.cfg
new file mode 100644
index 00000000..f720ca6d
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/lxc.cfg
@@ -0,0 +1,22 @@
1CONFIG_CGROUP_DEVICE=y
2CONFIG_CPUSETS=y
3CONFIG_PROC_PID_CPUSET=y
4CONFIG_RESOURCE_COUNTERS=y
5CONFIG_CGROUP_MEM_RES_CTLR=y
6CONFIG_CGROUP_SCHED=y
7CONFIG_FAIR_GROUP_SCHED=y
8CONFIG_RT_GROUP_SCHED=y
9CONFIG_CHECKPOINT_RESTORE=y
10CONFIG_NAMESPACES=y
11CONFIG_UTS_NS=y
12CONFIG_IPC_NS=y
13CONFIG_USER_NS=y
14CONFIG_PID_NS=y
15CONFIG_NET_NS=y
16CONFIG_SECCOMP=y
17CONFIG_SECURITY_APPARMOR=y
18
19CONFIG_CLS_CGROUP=m
20CONFIG_BLK_CGROUP=m
21CONFIG_NETPRIO_CGROUP=m
22
diff --git a/recipes-kernel/linux/linux-yocto/lxc.scc b/recipes-kernel/linux/linux-yocto/lxc.scc
new file mode 100644
index 00000000..ee518835
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/lxc.scc
@@ -0,0 +1,4 @@
1define KFEATURE_DESCRIPTION "Enable Features needed by LxC, namespaces, cgroups et.c."
2define KFEATURE_COMPATIBILITY board
3
4kconf non-hardware lxc.cfg
diff --git a/recipes-kernel/linux/linux-yocto/vswitch.cfg b/recipes-kernel/linux/linux-yocto/vswitch.cfg
new file mode 100644
index 00000000..00675042
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/vswitch.cfg
@@ -0,0 +1,2 @@
1CONFIG_OPENVSWITCH=m
2CONFIG_NET_SCH_INGRESS=m
diff --git a/recipes-kernel/linux/linux-yocto/vswitch.scc b/recipes-kernel/linux/linux-yocto/vswitch.scc
new file mode 100644
index 00000000..2790b4fe
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/vswitch.scc
@@ -0,0 +1,4 @@
1define KFEATURE_DESCRIPTION "Enable in kernel OpenvSwitch module"
2define KFEATURE_COMPATIBILITY board
3
4kconf non-hardware vswitch.cfg
diff --git a/recipes-kernel/linux/linux-yocto/xen.cfg b/recipes-kernel/linux/linux-yocto/xen.cfg
new file mode 100644
index 00000000..4e796b95
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/xen.cfg
@@ -0,0 +1,54 @@
1###
2# linux 3.4, 3.8
3CONFIG_PARAVIRT_GUEST=y
4###
5
6###
7# linux 3.10
8CONFIG_HYPERVISOR_GUEST=y
9###
10
11CONFIG_PARAVIRT=y
12CONFIG_XEN=y
13CONFIG_XEN_DOM0=y
14CONFIG_XEN_PRIVILEGED_GUEST=y
15CONFIG_XEN_PVHVM=y
16CONFIG_XEN_MAX_DOMAIN_MEMORY=500
17CONFIG_XEN_SAVE_RESTORE=y
18CONFIG_PARAVIRT_CLOCK=y
19CONFIG_HIBERNATE_CALLBACKS=y
20CONFIG_PCI_XEN=y
21CONFIG_XEN_PCIDEV_FRONTEND=y
22CONFIG_SYS_HYPERVISOR=y
23CONFIG_XEN_BLKDEV_FRONTEND=y
24CONFIG_XEN_BLKDEV_BACKEND=m
25CONFIG_XEN_NETDEV_FRONTEND=y
26CONFIG_XEN_NETDEV_BACKEND=m
27CONFIG_INPUT_MISC=y
28CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
29CONFIG_HVC_IRQ=y
30CONFIG_HVC_XEN=y
31CONFIG_HVC_XEN_FRONTEND=y
32CONFIG_XEN_WDT=m
33CONFIG_FB_SYS_FILLRECT=y
34CONFIG_FB_SYS_COPYAREA=y
35CONFIG_FB_SYS_IMAGEBLIT=y
36CONFIG_FB_SYS_FOPS=y
37CONFIG_FB_DEFERRED_IO=y
38CONFIG_XEN_FBDEV_FRONTEND=y
39CONFIG_XEN_BALLOON=y
40CONFIG_XEN_SCRUB_PAGES=y
41CONFIG_XEN_DEV_EVTCHN=y
42CONFIG_XEN_BACKEND=y
43CONFIG_XENFS=y
44CONFIG_XEN_COMPAT_XENFS=y
45CONFIG_XEN_SYS_HYPERVISOR=y
46CONFIG_XEN_XENBUS_FRONTEND=y
47CONFIG_XEN_GNTDEV=m
48CONFIG_XEN_GRANT_DEV_ALLOC=m
49CONFIG_SWIOTLB_XEN=y
50CONFIG_XEN_PCIDEV_BACKEND=m
51CONFIG_XEN_PRIVCMD=y
52CONFIG_XEN_ACPI_PROCESSOR=m
53CONFIG_XEN_MCE_LOG=y
54CONFIG_XEN_HAVE_PVMMU=y
diff --git a/recipes-kernel/linux/linux-yocto/xen.scc b/recipes-kernel/linux/linux-yocto/xen.scc
new file mode 100644
index 00000000..b588e5df
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/xen.scc
@@ -0,0 +1,4 @@
1define KFEATURE_DESCRIPTION "Xen Kernel Support"
2define KFEATURE_COMPATIBILITY arch
3
4kconf non-hardware xen.cfg
diff --git a/recipes-kernel/linux/linux-yocto/xt-checksum.cfg b/recipes-kernel/linux/linux-yocto/xt-checksum.cfg
new file mode 100644
index 00000000..58afbff6
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/xt-checksum.cfg
@@ -0,0 +1 @@
CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
diff --git a/recipes-kernel/linux/linux-yocto/xt-checksum.scc b/recipes-kernel/linux/linux-yocto/xt-checksum.scc
new file mode 100644
index 00000000..d3804f0c
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/xt-checksum.scc
@@ -0,0 +1,4 @@
1define KFEATURE_DESCRIPTION "Add extra iptables modules"
2define KFEATURE_COMPATIBILITY board
3
4kconf non-hardware xt-checksum.cfg
diff --git a/recipes-kernel/linux/linux-yocto_3.10.bbappend b/recipes-kernel/linux/linux-yocto_3.10.bbappend
new file mode 100644
index 00000000..c029c05e
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto_3.10.bbappend
@@ -0,0 +1,19 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
3SRC_URI += "file://xt-checksum.scc \
4 file://ebtables.scc \
5 file://vswitch.scc \
6 file://lxc.scc \
7 "
8module_autoload_openvswitch = "openvswitch"
9KERNEL_FEATURES_append = " features/kvm/qemu-kvm-enable.scc"
10
11module_autoload_kvm = "kvm"
12module_autoload_kvm-amd = "kvm-amd"
13module_autoload_kvm-intel = "kvm-intel"
14
15# aufs kernel support required for xen-image-minimal
16KERNEL_FEATURES_append += "${@base_contains('DISTRO_FEATURES', 'aufs', ' features/aufs/aufs-enable.scc', '', d)}"
17
18# xen kernel support
19SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"
diff --git a/recipes-kernel/linux/linux-yocto_3.14.bbappend b/recipes-kernel/linux/linux-yocto_3.14.bbappend
new file mode 100644
index 00000000..c029c05e
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto_3.14.bbappend
@@ -0,0 +1,19 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
3SRC_URI += "file://xt-checksum.scc \
4 file://ebtables.scc \
5 file://vswitch.scc \
6 file://lxc.scc \
7 "
8module_autoload_openvswitch = "openvswitch"
9KERNEL_FEATURES_append = " features/kvm/qemu-kvm-enable.scc"
10
11module_autoload_kvm = "kvm"
12module_autoload_kvm-amd = "kvm-amd"
13module_autoload_kvm-intel = "kvm-intel"
14
15# aufs kernel support required for xen-image-minimal
16KERNEL_FEATURES_append += "${@base_contains('DISTRO_FEATURES', 'aufs', ' features/aufs/aufs-enable.scc', '', d)}"
17
18# xen kernel support
19SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"
diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend b/recipes-kernel/linux/linux-yocto_3.4.bbappend
new file mode 100644
index 00000000..bf84725a
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend
@@ -0,0 +1,16 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
3SRC_URI += "file://xt-checksum.scc \
4 file://ebtables.scc \
5 file://vswitch.scc \
6 file://lxc.scc \
7 "
8module_autoload_openvswitch = "openvswitch"
9KERNEL_FEATURES_append = " features/kvm/qemu-kvm-enable.scc"
10
11module_autoload_kvm = "kvm"
12module_autoload_kvm-amd = "kvm-amd"
13module_autoload_kvm-intel = "kvm-intel"
14
15# xen kernel support
16SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"
diff --git a/recipes-networking/netcf/netcf/0001-fix-network-driver-check-issue-on-opensuse.patch b/recipes-networking/netcf/netcf/0001-fix-network-driver-check-issue-on-opensuse.patch
new file mode 100644
index 00000000..eef5b5cb
--- /dev/null
+++ b/recipes-networking/netcf/netcf/0001-fix-network-driver-check-issue-on-opensuse.patch
@@ -0,0 +1,28 @@
1From 285871a2db42727665a2ab7fc16fa2fb8fa830d3 Mon Sep 17 00:00:00 2001
2From: Ting Liu <b28495@freescale.com>
3Date: Thu, 23 May 2013 17:39:35 +0800
4Subject: [PATCH] fix network driver check issue on opensuse
5
6Upstream-Status: Pending
7
8Signed-off-by: Ting Liu <b28495@freescale.com>
9---
10 configure.ac | 2 +-
11 1 files changed, 1 insertions(+), 1 deletions(-)
12
13diff --git a/configure.ac b/configure.ac
14index 3f30865..708eb28 100644
15--- a/configure.ac
16+++ b/configure.ac
17@@ -77,7 +77,7 @@ fi
18 if test "x$with_driver" = "xcheck" && test -f /etc/ubuntu_version ; then
19 with_driver=debian
20 fi
21-if test "x$with_driver" = "xcheck" && test -f /etc/suse-release ; then
22+if test "x$with_driver" = "xcheck" && (test -f /etc/suse-release || test -f /etc/SuSE-release) ; then
23 with_driver=suse
24 fi
25 if test "x$with_driver" = "xcheck" ; then
26--
271.7.3.4
28
diff --git a/recipes-networking/netcf/netcf_git.bb b/recipes-networking/netcf/netcf_git.bb
new file mode 100644
index 00000000..d380e95e
--- /dev/null
+++ b/recipes-networking/netcf/netcf_git.bb
@@ -0,0 +1,27 @@
1SUMMARY = "netcf"
2DESCRIPTION = "netcf is a cross-platform network configuration library."
3HOMEPAGE = "https://fedorahosted.org/netcf/"
4SECTION = "console/tools"
5LICENSE = "LGPLv2.1"
6
7LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff"
8
9SRCREV = "2b0d9ca226c13d7150382367f62b256bdb2db5ef"
10PR = "r1"
11PV = "0.2.2+git${SRCPV}"
12
13SRC_URI = "git://git.fedorahosted.org/netcf.git;protocol=git \
14 file://0001-fix-network-driver-check-issue-on-opensuse.patch \
15"
16
17DEPENDS += "augeas libnl libxslt libxml2"
18
19S = "${WORKDIR}/git"
20
21inherit gettext autotools
22
23do_configure_prepend() {
24 cd ${S}
25 ./bootstrap
26}
27
diff --git a/recipes-networking/openvswitch/files/configure-Only-link-against-libpcap-on-FreeBSD.patch b/recipes-networking/openvswitch/files/configure-Only-link-against-libpcap-on-FreeBSD.patch
new file mode 100644
index 00000000..0a44b85e
--- /dev/null
+++ b/recipes-networking/openvswitch/files/configure-Only-link-against-libpcap-on-FreeBSD.patch
@@ -0,0 +1,70 @@
1From d30e714ccb9d13caf39d14d5b2fc9523b678ed51 Mon Sep 17 00:00:00 2001
2From: Ben Pfaff <blp@nicira.com>
3Date: Thu, 14 Mar 2013 15:20:55 -0700
4Subject: [PATCH] configure: Only link against libpcap on FreeBSD.
5
6commit d30e714ccb9d13caf39d14d5b2fc9523b678ed51 upstream
7http://git.openvswitch.org/git/openvswitch
8
9On other platforms there is no benefit to linking against libpcap, because
10it is not used.
11
12Signed-off-by: Ben Pfaff <blp@nicira.com>
13CC: Ed Maste <emaste@freebsd.org>
14---
15 acinclude.m4 | 7 ++++++-
16 configure.ac | 3 +--
17 2 files changed, 7 insertions(+), 3 deletions(-)
18
19diff --git a/acinclude.m4 b/acinclude.m4
20index f0610c9..19a47dd 100644
21--- a/acinclude.m4
22+++ b/acinclude.m4
23@@ -1,6 +1,6 @@
24 # -*- autoconf -*-
25
26-# Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc.
27+# Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
28 #
29 # Licensed under the Apache License, Version 2.0 (the "License");
30 # you may not use this file except in compliance with the License.
31@@ -295,6 +295,8 @@ AC_DEFUN([OVS_CHECK_IF_PACKET],
32 fi])
33
34 dnl Checks for net/if_dl.h.
35+dnl
36+dnl (We use this as a proxy for checking whether we're building on FreeBSD.)
37 AC_DEFUN([OVS_CHECK_IF_DL],
38 [AC_CHECK_HEADER([net/if_dl.h],
39 [HAVE_IF_DL=yes],
40@@ -303,6 +305,9 @@ AC_DEFUN([OVS_CHECK_IF_DL],
41 if test "$HAVE_IF_DL" = yes; then
42 AC_DEFINE([HAVE_IF_DL], [1],
43 [Define to 1 if net/if_dl.h is available.])
44+
45+ # On FreeBSD we use libpcap to access network devices.
46+ AC_SEARCH_LIBS([pcap_open_live], [pcap])
47 fi])
48
49 dnl Checks for buggy strtok_r.
50diff --git a/configure.ac b/configure.ac
51index 1cacd29..bd49179 100644
52--- a/configure.ac
53+++ b/configure.ac
54@@ -1,4 +1,4 @@
55-# Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc.
56+# Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
57 #
58 # Licensed under the Apache License, Version 2.0 (the "License");
59 # you may not use this file except in compliance with the License.
60@@ -44,7 +44,6 @@ AC_SYS_LARGEFILE
61 AC_SEARCH_LIBS([pow], [m])
62 AC_SEARCH_LIBS([clock_gettime], [rt])
63 AC_SEARCH_LIBS([timer_create], [rt])
64-AC_SEARCH_LIBS([pcap_open_live], [pcap])
65
66 OVS_CHECK_ESX
67 OVS_CHECK_COVERAGE
68--
691.8.3.2
70
diff --git a/recipes-networking/openvswitch/files/openvswitch-add-more-target-python-substitutions.patch b/recipes-networking/openvswitch/files/openvswitch-add-more-target-python-substitutions.patch
new file mode 100644
index 00000000..2b87a116
--- /dev/null
+++ b/recipes-networking/openvswitch/files/openvswitch-add-more-target-python-substitutions.patch
@@ -0,0 +1,50 @@
1From d1ab2f62a03c2c977de6fed5fca8de63e328a870 Mon Sep 17 00:00:00 2001
2Message-Id: <d1ab2f62a03c2c977de6fed5fca8de63e328a870.1391527986.git.Jim.Somerville@windriver.com>
3From: Jim Somerville <Jim.Somerville@windriver.com>
4Date: Tue, 4 Feb 2014 15:30:41 +0000
5Subject: [PATCH 1/1] openvswitch: add more target python substitutions
6
7The TARGET_PYTHON variable is used for script
8substitutions to ensure the scripts will be able to properly execute
9if the target system has a different path for the python.
10
11Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
12---
13 ovsdb/ovsdb-dot.in | 2 +-
14 ovsdb/ovsdb-idlc.in | 2 +-
15 utilities/ovs-dpctl-top.in | 2 +-
16 3 files changed, 3 insertions(+), 3 deletions(-)
17
18diff --git a/ovsdb/ovsdb-dot.in b/ovsdb/ovsdb-dot.in
19index 85c126d..402a77c 100755
20--- a/ovsdb/ovsdb-dot.in
21+++ b/ovsdb/ovsdb-dot.in
22@@ -1,4 +1,4 @@
23-#! @PYTHON@
24+#! @TARGET_PYTHON@
25
26 from datetime import date
27 import ovs.db.error
28diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
29index ec1c655..f5c135f 100755
30--- a/ovsdb/ovsdb-idlc.in
31+++ b/ovsdb/ovsdb-idlc.in
32@@ -1,4 +1,4 @@
33-#! @PYTHON@
34+#! @TARGET_PYTHON@
35
36 import getopt
37 import os
38diff --git a/utilities/ovs-dpctl-top.in b/utilities/ovs-dpctl-top.in
39index f43fdeb..8475118 100755
40--- a/utilities/ovs-dpctl-top.in
41+++ b/utilities/ovs-dpctl-top.in
42@@ -1,4 +1,4 @@
43-#! @PYTHON@
44+#! @TARGET_PYTHON@
45 #
46 # Copyright (c) 2013 Nicira, Inc.
47 #
48--
491.8.3.4
50
diff --git a/recipes-networking/openvswitch/files/openvswitch-add-ptest.patch b/recipes-networking/openvswitch/files/openvswitch-add-ptest.patch
new file mode 100644
index 00000000..aebb1823
--- /dev/null
+++ b/recipes-networking/openvswitch/files/openvswitch-add-ptest.patch
@@ -0,0 +1,67 @@
1Add test-install rule to support ptest execution
2
3Signed-off-by: Radu Patriu <radu.patriu@enea.com>
4
5Index: ovs/Makefile.am
6===================================================================
7--- ovs.orig/Makefile.am 2014-03-10 16:19:46.000000000 +0200
8+++ ovs/Makefile.am 2014-03-10 16:23:10.481075341 +0200
9@@ -276,3 +276,4 @@
10 include python/automake.mk
11 include python/compat/automake.mk
12 include tutorial/automake.mk
13+include test.mk
14Index: ovs/test.mk
15===================================================================
16--- /dev/null 1970-01-01 00:00:00.000000000 +0000
17+++ ovs/test.mk 2014-03-10 16:42:41.000000000 +0200
18@@ -0,0 +1,49 @@
19+TEST_DEST ?= ${prefix}/lib/openvswitch
20+TEST_ROOT ?= ${prefix}/lib/openvswitch
21+TEST_DEPEND =
22+
23+if HAVE_OPENSSL
24+TEST_DEPEND += $(TESTPKI_FILES)
25+endif
26+
27+test-install: $(TEST_DEPEND)
28+ @list='$(noinst_PROGRAMS) $(EXTRA_DIST) $(dist_check_SCRIPTS) $(TEST_DEPEND) tests/atlocal tests/atconfig' ;\
29+ install -d $(TEST_DEST)/tests ;\
30+ install -d $(TEST_DEST)/python ;\
31+ install -d $(TEST_DEST)/python/ovs ;\
32+ install -d $(TEST_DEST)/python/ovs/db ;\
33+ install -d $(TEST_DEST)/python/ovs/unixctl ;\
34+ install -d $(TEST_DEST)/vswitchd ;\
35+ install vswitchd/vswitch.ovsschema $(TEST_DEST)/vswitchd ;\
36+ install -d $(TEST_DEST)/debian ;\
37+ install debian/ovs-monitor-ipsec $(TEST_DEST)/debian ;\
38+ install -d $(TEST_DEST)/build-aux ;\
39+ install build-aux/check-structs $(TEST_DEST)/build-aux ;\
40+ install -d $(TEST_DEST)/xenserver ;\
41+ install xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync $(TEST_DEST)/xenserver ;\
42+ install xenserver/opt_xensource_libexec_interface-reconfigure $(TEST_DEST)/xenserver ;\
43+ install xenserver/opt_xensource_libexec_InterfaceReconfigure.py $(TEST_DEST)/xenserver ;\
44+ install xenserver/opt_xensource_libexec_InterfaceReconfigureBridge.py $(TEST_DEST)/xenserver ;\
45+ install xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py $(TEST_DEST)/xenserver ;\
46+ install -d $(TEST_DEST)/vtep ;\
47+ install vtep/vtep.ovsschema $(TEST_DEST)/vtep ;\
48+ for p in $$list ; do \
49+ echo $$p ;\
50+ p=$${p#./} ;\
51+ pre=$${p#tests\/} ;\
52+ if test $$pre != $$p ; then \
53+ echo installing $$p to $(TEST_DEST)/tests/$$pre ;\
54+ install $$p $(TEST_DEST)/tests/$$pre ;\
55+ continue ;\
56+ fi ;\
57+ pre=$${p#python\/ovs\/} ;\
58+ if test $$pre != $$p ; then \
59+ echo installing $$p to $(TEST_DEST)/python/ovs/$$pre ;\
60+ install $$p $(TEST_DEST)/python/ovs/$$pre ;\
61+ continue ;\
62+ fi; \
63+ done ;\
64+ sed -i 's|abs_builddir=.*|abs_builddir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
65+ sed -i 's|abs_srcdir=.*|abs_srcdir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
66+ sed -i 's|abs_top_srcdir=.*|abs_top_srcdir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig
67+ sed -i 's|abs_top_builddir=.*|abs_top_builddir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig
diff --git a/recipes-networking/openvswitch/files/openvswitch-add-target-perl-handling.patch b/recipes-networking/openvswitch/files/openvswitch-add-target-perl-handling.patch
new file mode 100644
index 00000000..98224b42
--- /dev/null
+++ b/recipes-networking/openvswitch/files/openvswitch-add-target-perl-handling.patch
@@ -0,0 +1,48 @@
1From 569ac1066cd3046b8ac899153df9f07908d45145 Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Fri, 21 Jun 2013 11:16:00 -0400
4Subject: [PATCH] openvswitch: add target perl handling
5
6Allow the build to specify a path for the perl instead of reusing
7the PERL variable which can lead to inconsistencies if we are cross
8compiling. The TARGET_PERL variable will be used for script
9substitutions to ensure the scripts will be able to properly execute
10if the target system has a different path for the perl.
11
12Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
13---
14 Makefile.am | 1 +
15 configure.ac | 7 +++++++
16 utilities/ovs-parse-leaks.in | 2 +-
17 3 files changed, 9 insertions(+), 1 deletion(-)
18
19Index: openvswitch-2.0.0/Makefile.am
20===================================================================
21--- openvswitch-2.0.0.orig/Makefile.am
22+++ openvswitch-2.0.0/Makefile.am
23@@ -114,6 +114,7 @@
24 -e 's,[@]LOGDIR[@],$(LOGDIR),g' \
25 -e 's,[@]DBDIR[@],$(DBDIR),g' \
26 -e 's,[@]PERL[@],$(PERL),g' \
27+ -e 's,[@]TARGET_PERL[@],$(TARGET_PERL),g' \
28 -e 's,[@]PYTHON[@],$(PYTHON),g' \
29 -e 's,[@]TARGET_PYTHON[@],$(TARGET_PYTHON),g' \
30 -e 's,[@]RUNDIR[@],$(RUNDIR),g' \
31Index: openvswitch-2.0.0/configure.ac
32===================================================================
33--- openvswitch-2.0.0.orig/configure.ac
34+++ openvswitch-2.0.0/configure.ac
35@@ -115,6 +115,13 @@
36 AC_SUBST(KARCH)
37 OVS_CHECK_LINUX
38
39+if test "$TARGET_PERL"; then
40+ TARGET_PERL=$TARGET_PERL
41+else
42+ TARGET_PERL=$PERL
43+fi
44+AC_SUBST(TARGET_PERL)
45+
46 if test "$TARGET_PYTHON"; then
47 TARGET_PYTHON=$TARGET_PYTHON
48 else
diff --git a/recipes-networking/openvswitch/files/openvswitch-add-target-python-handling.patch b/recipes-networking/openvswitch/files/openvswitch-add-target-python-handling.patch
new file mode 100644
index 00000000..59607dad
--- /dev/null
+++ b/recipes-networking/openvswitch/files/openvswitch-add-target-python-handling.patch
@@ -0,0 +1,149 @@
1From e8a5d34885c5fdba7d951fb1bb85131cbafca432 Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Wed, 19 Jun 2013 17:25:56 -0400
4Subject: [PATCH] openvswitch: add target python handling
5
6Allow the build to specify a path for the python instead of reusing
7the PYTHON variable which can lead to inconsistencies if we are cross
8compiling. The TARGET_PYTHON variable will be used for script
9substitutions to ensure the scripts will be able to properly execute
10if the target system has a different path for the python.
11
12Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
13---
14 Makefile.am | 1 +
15 configure.ac | 7 +++++++
16 ovsdb/ovsdbmonitor/ovsdbmonitor.in | 2 +-
17 utilities/bugtool/ovs-bugtool.in | 2 +-
18 utilities/ovs-check-dead-ifs.in | 2 +-
19 utilities/ovs-l3ping.in | 2 +-
20 utilities/ovs-parse-backtrace.in | 2 +-
21 utilities/ovs-pcap.in | 2 +-
22 utilities/ovs-tcpundump.in | 2 +-
23 utilities/ovs-test.in | 2 +-
24 utilities/ovs-vlan-test.in | 2 +-
25 11 files changed, 17 insertions(+), 9 deletions(-)
26
27diff --git a/Makefile.am b/Makefile.am
28index b71ca1f..c4f8341 100644
29--- a/Makefile.am
30+++ b/Makefile.am
31@@ -112,6 +112,7 @@ SUFFIXES += .in
32 -e 's,[@]DBDIR[@],$(DBDIR),g' \
33 -e 's,[@]PERL[@],$(PERL),g' \
34 -e 's,[@]PYTHON[@],$(PYTHON),g' \
35+ -e 's,[@]TARGET_PYTHON[@],$(TARGET_PYTHON),g' \
36 -e 's,[@]RUNDIR[@],$(RUNDIR),g' \
37 -e 's,[@]VERSION[@],$(VERSION),g' \
38 -e 's,[@]localstatedir[@],$(localstatedir),g' \
39diff --git a/configure.ac b/configure.ac
40index 060b53f..74cb691 100644
41--- a/configure.ac
42+++ b/configure.ac
43@@ -101,6 +101,13 @@ AC_ARG_VAR(KARCH, [Kernel Architecture String])
44 AC_SUBST(KARCH)
45 OVS_CHECK_LINUX
46
47+if test "$TARGET_PYTHON"; then
48+ TARGET_PYTHON=$TARGET_PYTHON
49+else
50+ TARGET_PYTHON=$PYTHON
51+fi
52+AC_SUBST(TARGET_PYTHON)
53+
54 AC_CONFIG_FILES([Makefile
55 datapath/Makefile
56 datapath/linux/Kbuild
57diff --git a/ovsdb/ovsdbmonitor/ovsdbmonitor.in b/ovsdb/ovsdbmonitor/ovsdbmonitor.in
58index e26130a..aaf1aff 100755
59--- a/ovsdb/ovsdbmonitor/ovsdbmonitor.in
60+++ b/ovsdb/ovsdbmonitor/ovsdbmonitor.in
61@@ -1,4 +1,4 @@
62-#! @PYTHON@
63+#! @TARGET_PYTHON@
64 # Copyright (c) 2010 Citrix Systems, Inc.
65 #
66 # Licensed under the Apache License, Version 2.0 (the "License");
67diff --git a/utilities/bugtool/ovs-bugtool.in b/utilities/bugtool/ovs-bugtool.in
68index 2074e23..525939e 100755
69--- a/utilities/bugtool/ovs-bugtool.in
70+++ b/utilities/bugtool/ovs-bugtool.in
71@@ -1,4 +1,4 @@
72-#! @PYTHON@
73+#! @TARGET_PYTHON@
74
75 # This library is free software; you can redistribute it and/or
76 # modify it under the terms of version 2.1 of the GNU Lesser General Public
77diff --git a/utilities/ovs-check-dead-ifs.in b/utilities/ovs-check-dead-ifs.in
78index 9b806ed..b6f6fcb 100755
79--- a/utilities/ovs-check-dead-ifs.in
80+++ b/utilities/ovs-check-dead-ifs.in
81@@ -1,4 +1,4 @@
82-#! @PYTHON@
83+#! @TARGET_PYTHON@
84
85 import os
86 import re
87diff --git a/utilities/ovs-l3ping.in b/utilities/ovs-l3ping.in
88index 1b07972..4fedb6f 100644
89--- a/utilities/ovs-l3ping.in
90+++ b/utilities/ovs-l3ping.in
91@@ -1,4 +1,4 @@
92-#! @PYTHON@
93+#! @TARGET_PYTHON@
94 #
95 # Licensed under the Apache License, Version 2.0 (the "License");
96 # you may not use this file except in compliance with the License.
97diff --git a/utilities/ovs-parse-backtrace.in b/utilities/ovs-parse-backtrace.in
98index 4f793be..4a07f47 100755
99--- a/utilities/ovs-parse-backtrace.in
100+++ b/utilities/ovs-parse-backtrace.in
101@@ -1,4 +1,4 @@
102-#! @PYTHON@
103+#! @TARGET_PYTHON@
104 #
105 # Copyright (c) 2012 Nicira, Inc.
106 #
107diff --git a/utilities/ovs-pcap.in b/utilities/ovs-pcap.in
108index 5306480..3221c7c 100755
109--- a/utilities/ovs-pcap.in
110+++ b/utilities/ovs-pcap.in
111@@ -1,4 +1,4 @@
112-#! @PYTHON@
113+#! @TARGET_PYTHON@
114 #
115 # Copyright (c) 2010 Nicira, Inc.
116 #
117diff --git a/utilities/ovs-tcpundump.in b/utilities/ovs-tcpundump.in
118index 0268c50..dad0bb5 100755
119--- a/utilities/ovs-tcpundump.in
120+++ b/utilities/ovs-tcpundump.in
121@@ -1,4 +1,4 @@
122-#! @PYTHON@
123+#! @TARGET_PYTHON@
124 #
125 # Copyright (c) 2010 Nicira, Inc.
126 #
127diff --git a/utilities/ovs-test.in b/utilities/ovs-test.in
128index fb1f9ad..bddd327 100644
129--- a/utilities/ovs-test.in
130+++ b/utilities/ovs-test.in
131@@ -1,4 +1,4 @@
132-#! @PYTHON@
133+#! @TARGET_PYTHON@
134 #
135 # Licensed under the Apache License, Version 2.0 (the "License");
136 # you may not use this file except in compliance with the License.
137diff --git a/utilities/ovs-vlan-test.in b/utilities/ovs-vlan-test.in
138index e229498..da64040 100755
139--- a/utilities/ovs-vlan-test.in
140+++ b/utilities/ovs-vlan-test.in
141@@ -1,4 +1,4 @@
142-#! @PYTHON@
143+#! @TARGET_PYTHON@
144 #
145 # Copyright (c) 2010 Nicira, Inc.
146 #
147--
1481.8.1.2
149
diff --git a/recipes-networking/openvswitch/files/openvswitch-controller b/recipes-networking/openvswitch/files/openvswitch-controller
new file mode 100755
index 00000000..026974a7
--- /dev/null
+++ b/recipes-networking/openvswitch/files/openvswitch-controller
@@ -0,0 +1,274 @@
1#!/bin/sh
2#
3# Copyright (c) 2011 Nicira Networks Inc.
4# Copyright (c) 2007, 2009 Javier Fernandez-Sanguino <jfs@debian.org>
5#
6# This is free software; you may redistribute it and/or modify
7# it under the terms of the GNU General Public License as
8# published by the Free Software Foundation; either version 2,
9# or (at your option) any later version.
10#
11# This is distributed in the hope that it will be useful, but
12# WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License with
17# the Debian operating system, in /usr/share/common-licenses/GPL; if
18# not, write to the Free Software Foundation, Inc., 59 Temple Place,
19# Suite 330, Boston, MA 02111-1307 USA
20#
21### BEGIN INIT INFO
22# Provides: openvswitch-controller
23# Required-Start: $network $local_fs $remote_fs
24# Required-Stop: $remote_fs
25# Should-Start: $named
26# Should-Stop:
27# Default-Start: 2 3 4 5
28# Default-Stop: 0 1 6
29# Short-Description: Open vSwitch controller
30### END INIT INFO
31
32PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
33
34DAEMON=/usr/bin/ovs-controller # Introduce the server's location here
35NAME=ovs-controller # Introduce the short server's name here
36DESC=ovs-controller # Introduce a short description here
37LOGDIR=/var/log/openvswitch # Log directory to use
38
39PIDFILE=/var/run/openvswitch/$NAME.pid
40
41test -x $DAEMON || exit 0
42
43. /lib/lsb/init-functions
44
45# Default options, these can be overriden by the information
46# at /etc/default/openvswitch-controller
47DAEMON_OPTS="" # Additional options given to the server
48
49DODTIME=10 # Time to wait for the server to die, in seconds
50 # If this value is set too low you might not
51 # let some servers to die gracefully and
52 # 'restart' will not work
53
54LOGFILE=$LOGDIR/$NAME.log # Server logfile
55#DAEMONUSER= # User to run the daemons as. If this value
56 # is set start-stop-daemon will chuid the server
57
58# Include defaults if available
59default=/etc/default/openvswitch-controller
60if [ -f $default ] ; then
61 . $default
62fi
63
64# Check that the user exists (if we set a user)
65# Does the user exist?
66if [ -n "$DAEMONUSER" ] ; then
67 if getent passwd | grep -q "^$DAEMONUSER:"; then
68 # Obtain the uid and gid
69 DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'`
70 DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'`
71 else
72 log_failure_msg "The user $DAEMONUSER, required to run $NAME does not exist."
73 exit 1
74 fi
75fi
76
77
78set -e
79
80running_pid() {
81# Check if a given process pid's cmdline matches a given name
82 pid=$1
83 name=$2
84 [ -z "$pid" ] && return 1
85 [ ! -d /proc/$pid ] && return 1
86 cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1`
87 # Is this the expected server
88 [ "$cmd" != "$name" ] && return 1
89 return 0
90}
91
92running() {
93# Check if the process is running looking at /proc
94# (works for all users)
95
96 # No pidfile, probably no daemon present
97 [ ! -f "$PIDFILE" ] && return 1
98 pid=`cat $PIDFILE`
99 running_pid $pid $DAEMON || return 1
100 return 0
101}
102
103start_server() {
104 if [ -z "$LISTEN" ]; then
105 echo "$default: No connection methods configured, controller disabled" >&2
106 exit 0
107 fi
108
109 if [ ! -d /var/run/openvswitch ]; then
110 install -d -m 755 -o root -g root /var/run/openvswitch
111 fi
112
113 SSL_OPTS=
114 case $LISTEN in
115 *ssl*)
116 : ${PRIVKEY:=/etc/openvswitch-controller/privkey.pem}
117 : ${CERT:=/etc/openvswitch-controller/cert.pem}
118 : ${CACERT:=/etc/openvswitch-controller/cacert.pem}
119 if test ! -e "$PRIVKEY" || test ! -e "$CERT" ||
120 test ! -e "$CACERT"; then
121 if test ! -e "$PRIVKEY"; then
122 echo "$PRIVKEY: private key missing" >&2
123 fi
124 if test ! -e "$CERT"; then
125 echo "$CERT: certificate for private key missing" >&2
126 fi
127 if test ! -e "$CACERT"; then
128 echo "$CACERT: CA certificate missing" >&2
129 fi
130 exit 1
131 fi
132 SSL_OPTS="--private-key=$PRIVKEY --certificate=$CERT --ca-cert=$CACERT"
133 ;;
134 esac
135
136# Start the process using the wrapper
137 if [ -z "$DAEMONUSER" ] ; then
138 start-stop-daemon --start --pidfile $PIDFILE \
139 --exec $DAEMON -- --detach --pidfile=$PIDFILE \
140 $LISTEN $DAEMON_OPTS $SSL_OPTS
141 errcode=$?
142 else
143# if we are using a daemonuser then change the user id
144 start-stop-daemon --start --quiet --pidfile $PIDFILE \
145 --chuid $DAEMONUSER --exec $DAEMON -- \
146 --detach --pidfile=$PIDFILE $LISTEN $DAEMON_OPTS \
147 $SSL_OPTS
148 errcode=$?
149 fi
150 return $errcode
151}
152
153stop_server() {
154# Stop the process using the wrapper
155 if [ -z "$DAEMONUSER" ] ; then
156 start-stop-daemon --stop --quiet --pidfile $PIDFILE \
157 --exec $DAEMON
158 errcode=$?
159 else
160# if we are using a daemonuser then look for process that match
161 start-stop-daemon --stop --quiet --pidfile $PIDFILE \
162 --user $DAEMONUSER --exec $DAEMON
163 errcode=$?
164 fi
165
166 return $errcode
167}
168
169reload_server() {
170 [ ! -f "$PIDFILE" ] && return 1
171 pid=`cat $PIDFILE` # This is the daemon's pid
172 # Send a SIGHUP
173 kill -1 $pid
174 return $?
175}
176
177force_stop() {
178# Force the process to die killing it manually
179 [ ! -e "$PIDFILE" ] && return
180 if running ; then
181 kill -15 $pid
182 # Is it really dead?
183 sleep "$DODTIME"
184 if running ; then
185 kill -9 $pid
186 sleep "$DODTIME"
187 if running ; then
188 echo "Cannot kill $NAME (pid=$pid)!"
189 exit 1
190 fi
191 fi
192 fi
193 rm -f $PIDFILE
194}
195
196
197case "$1" in
198 start)
199 log_begin_msg "Starting $DESC " "$NAME"
200 # Check if it's running first
201 if running ; then
202 log_warning_msg "apparently already running"
203 log_end_msg 0
204 exit 0
205 fi
206 if start_server && running ; then
207 # It's ok, the server started and is running
208 log_end_msg 0
209 else
210 # Either we could not start it or it is not running
211 # after we did
212 # NOTE: Some servers might die some time after they start,
213 # this code does not try to detect this and might give
214 # a false positive (use 'status' for that)
215 log_end_msg 1
216 fi
217 ;;
218 stop)
219 log_begin_msg "Stopping $DESC" "$NAME"
220 if running ; then
221 # Only stop the server if we see it running
222 stop_server
223 log_end_msg $?
224 else
225 # If it's not running don't do anything
226 log_warning_msg "apparently not running"
227 log_end_msg 0
228 exit 0
229 fi
230 ;;
231 force-stop)
232 # First try to stop gracefully the program
233 $0 stop
234 if running; then
235 # If it's still running try to kill it more forcefully
236 log_begin_msg "Stopping (force) $DESC" "$NAME"
237 force_stop
238 log_end_msg $?
239 fi
240 ;;
241 restart|force-reload)
242 log_begin_msg "Restarting $DESC" "$NAME"
243 stop_server
244 # Wait some sensible amount, some server need this
245 [ -n "$DODTIME" ] && sleep $DODTIME
246 start_server
247 running
248 log_end_msg $?
249 ;;
250 status)
251
252 log_begin_msg "Checking status of $DESC" "$NAME"
253 if running ; then
254 log_begin_msg "running"
255 log_end_msg 0
256 else
257 log_warning_msg "apparently not running"
258 log_end_msg 1
259 exit 1
260 fi
261 ;;
262 # Use this if the daemon cannot reload
263 reload)
264 log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon"
265 log_warning_msg "cannot re-read the config file (use restart)."
266 ;;
267 *)
268 N=/etc/init.d/openvswitch-controller
269 echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2
270 exit 1
271 ;;
272esac
273
274exit 0
diff --git a/recipes-networking/openvswitch/files/openvswitch-controller-setup b/recipes-networking/openvswitch/files/openvswitch-controller-setup
new file mode 100644
index 00000000..1d9f9261
--- /dev/null
+++ b/recipes-networking/openvswitch/files/openvswitch-controller-setup
@@ -0,0 +1,29 @@
1# This is a POSIX shell fragment -*- sh -*-
2
3# LISTEN: What OpenFlow connection methods should the controller listen on?
4#
5# This is a space-delimited list of connection methods:
6#
7# * "pssl:[PORT]": Listen for SSL connections on the specified PORT
8# (default: 6633). The private key, certificate, and CA certificate
9# must be specified below.
10#
11# * "pctp:[PORT]": Listen for TCP connections on the specified PORT
12# (default: 6633). Not recommended for security reasons.
13#
14LISTEN="pssl:"
15
16# PRIVKEY: Name of file containing controller's private key.
17# Required if SSL enabled.
18PRIVKEY=/etc/openvswitch-controller/privkey.pem
19
20# CERT: Name of file containing certificate for private key.
21# Required if SSL enabled.
22CERT=/etc/openvswitch-controller/cert.pem
23
24# CACERT: Name of file containing switch CA certificate.
25# Required if SSL enabled.
26CACERT=/etc/openvswitch-controller/cacert.pem
27
28# Additional options to pass to controller, e.g. "--hub"
29DAEMON_OPTS=""
diff --git a/recipes-networking/openvswitch/files/openvswitch-example b/recipes-networking/openvswitch/files/openvswitch-example
new file mode 100644
index 00000000..6f08c3fa
--- /dev/null
+++ b/recipes-networking/openvswitch/files/openvswitch-example
@@ -0,0 +1,102 @@
1#! /bin/sh
2#
3# Copyright (C) 2011 Nicira Networks, Inc.
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at:
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17### BEGIN INIT INFO
18# Provides: openvswitch-switch
19# Required-Start: $network $named $remote_fs $syslog
20# Required-Stop: $remote_fs
21# Default-Start: 2 3 4 5
22# Default-Stop: 0 1 6
23# Short-Description: Open vSwitch switch
24### END INIT INFO
25
26(test -x /usr/sbin/ovs-vswitchd && test -x /usr/sbin/ovsdb-server) || exit 0
27
28. /usr/share/openvswitch/scripts/ovs-lib
29test -e /etc/default/openvswitch-switch && . /etc/default/openvswitch-switch
30
31if test X"$BRCOMPAT" = Xyes && test ! -x /usr/sbin/ovs-brcompatd; then
32 BRCOMPAT=no
33 log_warning_msg "ovs-brcompatd missing, disabling bridge compatibility"
34fi
35
36ovs_ctl () {
37 set /usr/share/openvswitch/scripts/ovs-ctl "$@"
38 if test X"$BRCOMPAT" = Xyes; then
39 set "$@" --brcompat
40 fi
41 "$@"
42}
43
44load_kmod () {
45 ovs_ctl load-kmod || exit $?
46}
47
48start () {
49 if ovs_ctl load-kmod; then
50 :
51 else
52 echo "Module has probably not been built for this kernel."
53 if ! test -d /usr/share/doc/openvswitch-datapath-source; then
54 echo "Install the openvswitch-datapath-source package, then read"
55 else
56 echo "For instructions, read"
57 fi
58 echo "/usr/share/doc/openvswitch-datapath-source/README.Debian"
59 fi
60 set ovs_ctl ${1-start} --system-id=random
61 if test X"$FORCE_COREFILES" != X; then
62 set "$@" --force-corefiles="$FORCE_COREFILES"
63 fi
64 "$@" || exit $?
65
66 ovs_ctl --protocol=gre enable-protocol
67}
68
69stop () {
70 ovs_ctl stop
71}
72
73case $1 in
74 start)
75 start
76 ;;
77 stop | force-stop)
78 stop
79 ;;
80 reload | force-reload)
81 # The OVS daemons keep up-to-date.
82 ;;
83 restart)
84 stop
85 start
86 ;;
87 status)
88 ovs_ctl status
89 ;;
90 force-reload-kmod)
91 start force-reload-kmod
92 ;;
93 load-kmod)
94 load_kmod
95 ;;
96 *)
97 echo "Usage: $0 {start|stop|restart|force-reload|status|force-stop|force-reload-kmod|load-kmod}" >&2
98 exit 1
99 ;;
100esac
101
102exit 0
diff --git a/recipes-networking/openvswitch/files/openvswitch-switch b/recipes-networking/openvswitch/files/openvswitch-switch
new file mode 100644
index 00000000..6f08c3fa
--- /dev/null
+++ b/recipes-networking/openvswitch/files/openvswitch-switch
@@ -0,0 +1,102 @@
1#! /bin/sh
2#
3# Copyright (C) 2011 Nicira Networks, Inc.
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at:
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17### BEGIN INIT INFO
18# Provides: openvswitch-switch
19# Required-Start: $network $named $remote_fs $syslog
20# Required-Stop: $remote_fs
21# Default-Start: 2 3 4 5
22# Default-Stop: 0 1 6
23# Short-Description: Open vSwitch switch
24### END INIT INFO
25
26(test -x /usr/sbin/ovs-vswitchd && test -x /usr/sbin/ovsdb-server) || exit 0
27
28. /usr/share/openvswitch/scripts/ovs-lib
29test -e /etc/default/openvswitch-switch && . /etc/default/openvswitch-switch
30
31if test X"$BRCOMPAT" = Xyes && test ! -x /usr/sbin/ovs-brcompatd; then
32 BRCOMPAT=no
33 log_warning_msg "ovs-brcompatd missing, disabling bridge compatibility"
34fi
35
36ovs_ctl () {
37 set /usr/share/openvswitch/scripts/ovs-ctl "$@"
38 if test X"$BRCOMPAT" = Xyes; then
39 set "$@" --brcompat
40 fi
41 "$@"
42}
43
44load_kmod () {
45 ovs_ctl load-kmod || exit $?
46}
47
48start () {
49 if ovs_ctl load-kmod; then
50 :
51 else
52 echo "Module has probably not been built for this kernel."
53 if ! test -d /usr/share/doc/openvswitch-datapath-source; then
54 echo "Install the openvswitch-datapath-source package, then read"
55 else
56 echo "For instructions, read"
57 fi
58 echo "/usr/share/doc/openvswitch-datapath-source/README.Debian"
59 fi
60 set ovs_ctl ${1-start} --system-id=random
61 if test X"$FORCE_COREFILES" != X; then
62 set "$@" --force-corefiles="$FORCE_COREFILES"
63 fi
64 "$@" || exit $?
65
66 ovs_ctl --protocol=gre enable-protocol
67}
68
69stop () {
70 ovs_ctl stop
71}
72
73case $1 in
74 start)
75 start
76 ;;
77 stop | force-stop)
78 stop
79 ;;
80 reload | force-reload)
81 # The OVS daemons keep up-to-date.
82 ;;
83 restart)
84 stop
85 start
86 ;;
87 status)
88 ovs_ctl status
89 ;;
90 force-reload-kmod)
91 start force-reload-kmod
92 ;;
93 load-kmod)
94 load_kmod
95 ;;
96 *)
97 echo "Usage: $0 {start|stop|restart|force-reload|status|force-stop|force-reload-kmod|load-kmod}" >&2
98 exit 1
99 ;;
100esac
101
102exit 0
diff --git a/recipes-networking/openvswitch/files/openvswitch-switch-setup b/recipes-networking/openvswitch/files/openvswitch-switch-setup
new file mode 100644
index 00000000..73387fbc
--- /dev/null
+++ b/recipes-networking/openvswitch/files/openvswitch-switch-setup
@@ -0,0 +1,8 @@
1# This is a POSIX shell fragment -*- sh -*-
2
3# FORCE_COREFILES: If 'yes' then core files will be enabled.
4# FORCE_COREFILES=yes
5
6# BRCOMPAT: If 'yes' and the openvswitch-brcompat package is installed, then
7# Linux bridge compatibility will be enabled.
8# BRCOMPAT=yes
diff --git a/recipes-networking/openvswitch/files/run-ptest b/recipes-networking/openvswitch/files/run-ptest
new file mode 100644
index 00000000..dd067076
--- /dev/null
+++ b/recipes-networking/openvswitch/files/run-ptest
@@ -0,0 +1,4 @@
1#!/bin/sh
2
3./tests/testsuite --am-fmt -C tests AUTOTEST_PATH=utilities:vswitchd:ovsdb:tests
4
diff --git a/recipes-networking/openvswitch/openvswitch_1.10.0.bb b/recipes-networking/openvswitch/openvswitch_1.10.0.bb
new file mode 100644
index 00000000..42d4bc44
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch_1.10.0.bb
@@ -0,0 +1,118 @@
1SUMMARY = "OpenvSwitch"
2DESCRIPTION = "Open vSwitch is a production quality, multilayer virtual switch licensed under the open source Apache 2.0 license. It is designed to enable massive network automation through programmatic extension, while still supporting standard management interfaces and protocols (e.g. NetFlow, sFlow, SPAN, RSPAN, CLI, LACP, 802.1ag)"
3HOMEPAGE = "http://openvswitch.org/"
4SECTION = "networking"
5LICENSE = "Apache-2"
6
7DEPENDS += "bridge-utils openssl python perl"
8
9RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid coreutils \
10 python perl perl-module-strict ${PN}-switch ${PN}-controller"
11RDEPENDS_${PN}-controller = "${PN} lsb ${PN}-pki"
12RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen"
13RDEPENDS_${PN}-pki = "${PN}"
14RDEPENDS_${PN}-brcompat = "${PN} ${PN}-switch"
15RRECOMMENDS_${PN} += "kernel-module-openvswitch"
16
17# Some installers will fail because of an install order based on
18# rdeps. E.g. ovs-pki calls sed in the postinstall. sed may be
19# queued for install later.
20RDEPENDS_${PN} += "sed gawk grep"
21PR = "r4"
22
23SRC_URI = "http://openvswitch.org/releases/openvswitch-${PV}.tar.gz \
24 file://openvswitch-switch \
25 file://openvswitch-switch-setup \
26 file://openvswitch-controller \
27 file://openvswitch-controller-setup \
28 file://openvswitch-add-target-python-handling.patch \
29 file://openvswitch-add-target-perl-handling.patch \
30 file://configure-Only-link-against-libpcap-on-FreeBSD.patch \
31 "
32
33SRC_URI[md5sum] = "fe8b49efe9f86b57abab00166b971106"
34SRC_URI[sha256sum] = "803966c89d6a5de6d710a2cb4ed73ac8d8111a2c44b12b846dcef8e91ffab167"
35LIC_FILES_CHKSUM = "file://COPYING;md5=49eeb5acb1f5e510f12c44f176c42253"
36
37# Don't compile kernel modules by default since it heavily depends on
38# kernel version. Use the in-kernel module for now.
39# distro layers can enable with EXTRA_OECONF_pn_openvswitch += ""
40# EXTRA_OECONF = "--with-linux=${STAGING_KERNEL_DIR} KARCH=${TARGET_ARCH}"
41
42EXTRA_OECONF += "TARGET_PYTHON=${bindir}/python \
43 TARGET_PERL=${bindir}/perl \
44 "
45
46ALLOW_EMPTY_${PN}-pki = "1"
47PACKAGES =+ "${PN}-controller ${PN}-switch ${PN}-brcompat ${PN}-pki"
48
49FILES_${PN}-controller = "${sysconfdir}/init.d/openvswitch-controller \
50 ${sysconfdir}/default/openvswitch-controller \
51 ${sysconfdir}/openvswitch-controller \
52 ${bindir}/ovs-controller"
53
54FILES_${PN}-brcompat = "${sbindir}/ovs-brcompatd"
55
56FILES_${PN}-switch = "${sysconfdir}/init.d/openvswitch-switch \
57 ${sysconfdir}/default/openvswitch-switch \
58 "
59# silence a warning
60FILES_${PN} += "${datadir}/ovsdbmonitor"
61FILES_${PN} += "/run"
62
63inherit autotools update-rc.d pkgconfig
64
65INITSCRIPT_PACKAGES = "${PN}-switch ${PN}-controller"
66INITSCRIPT_NAME_${PN}-switch = "openvswitch-switch"
67INITSCRIPT_PARAMS_${PN}-switch = "defaults 71"
68
69INITSCRIPT_NAME_${PN}-controller = "openvswitch-controller"
70INITSCRIPT_PARAMS_${PN}-controller = "defaults 72"
71
72do_install_append() {
73 install -d ${D}/${sysconfdir}/default/
74 install -m 660 ${WORKDIR}/openvswitch-switch-setup ${D}/${sysconfdir}/default/openvswitch-switch
75 install -d ${D}/${sysconfdir}/openvswitch-controller
76 install -m 660 ${WORKDIR}/openvswitch-controller-setup ${D}/${sysconfdir}/default/openvswitch-controller
77
78 install -d ${D}/${sysconfdir}/init.d/
79 install -m 755 ${WORKDIR}/openvswitch-controller ${D}/${sysconfdir}/init.d/openvswitch-controller
80 install -m 755 ${WORKDIR}/openvswitch-switch ${D}/${sysconfdir}/init.d/openvswitch-switch
81 true || rm -fr ${D}/${datadir}/${PN}/pki
82}
83
84pkg_postinst_${PN}-pki () {
85 # can't do this offline
86 if [ "x$D" != "x" ]; then
87 exit 1
88 fi
89 if test ! -d $D/${datadir}/${PN}/pki; then
90 ovs-pki init --dir=$D/${datadir}/${PN}/pki
91 fi
92}
93
94pkg_postinst_${PN}-controller () {
95 # can't do this offline
96 if [ "x$D" != "x" ]; then
97 exit 1
98 fi
99
100 if test ! -d $D/${datadir}/${PN}/pki; then
101 ovs-pki init --dir=$D/${datadir}/${PN}/pki
102 fi
103
104 cd $D/${sysconfdir}/openvswitch-controller
105 if ! test -e cacert.pem; then
106 ln -s $D/${datadir}/${PN}/pki/switchca/cacert.pem cacert.pem
107 fi
108 if ! test -e privkey.pem || ! test -e cert.pem; then
109 oldumask=$(umask)
110 umask 077
111 ovs-pki req+sign --dir=$D/${datadir}/${PN}/pki tmp controller >/dev/null
112 mv tmp-privkey.pem privkey.pem
113 mv tmp-cert.pem cert.pem
114 mv tmp-req.pem req.pem
115 chmod go+r cert.pem req.pem
116 umask $oldumask
117 fi
118}
diff --git a/recipes-networking/openvswitch/openvswitch_2.0.0.bb b/recipes-networking/openvswitch/openvswitch_2.0.0.bb
new file mode 100644
index 00000000..01003082
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch_2.0.0.bb
@@ -0,0 +1,130 @@
1SUMMARY = "OpenvSwitch"
2DESCRIPTION = "Open vSwitch is a production quality, multilayer virtual switch licensed under the open source Apache 2.0 license. It is designed to enable massive network automation through programmatic extension, while still supporting standard management interfaces and protocols (e.g. NetFlow, sFlow, SPAN, RSPAN, CLI, LACP, 802.1ag)"
3HOMEPAGE = "http://openvswitch.org/"
4SECTION = "networking"
5LICENSE = "Apache-2"
6
7DEPENDS += "bridge-utils openssl python perl"
8
9RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid coreutils \
10 python perl perl-module-strict ${PN}-switch ${PN}-controller"
11RDEPENDS_${PN}-controller = "${PN} lsb ${PN}-pki"
12RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen"
13RDEPENDS_${PN}-pki = "${PN}"
14RDEPENDS_${PN}-brcompat = "${PN} ${PN}-switch"
15RRECOMMENDS_${PN} += "kernel-module-openvswitch"
16
17RDEPENDS_${PN}-ptest += "python-logging python-syslog python-argparse python-io \
18 python-fcntl python-shell python-lang python-xml python-math \
19 python-datetime python-netclient python sed"
20
21# Some installers will fail because of an install order based on
22# rdeps. E.g. ovs-pki calls sed in the postinstall. sed may be
23# queued for install later.
24RDEPENDS_${PN} += "sed gawk grep"
25
26SRC_URI = "http://openvswitch.org/releases/openvswitch-${PV}.tar.gz \
27 file://openvswitch-switch \
28 file://openvswitch-switch-setup \
29 file://openvswitch-controller \
30 file://openvswitch-controller-setup \
31 file://openvswitch-add-target-python-handling.patch \
32 file://openvswitch-add-target-perl-handling.patch \
33 file://openvswitch-add-more-target-python-substitutions.patch \
34 file://openvswitch-add-ptest.patch \
35 file://run-ptest \
36 "
37
38SRC_URI[md5sum] = "7d7a58350e634e515e0fe43c64d64f44"
39SRC_URI[sha256sum] = "5060e2be69cce01c15f67b481482cb1a0eaa6ef5cbdbed592bac3c3ab2a390f8"
40
41LIC_FILES_CHKSUM = "file://COPYING;md5=49eeb5acb1f5e510f12c44f176c42253"
42
43# Don't compile kernel modules by default since it heavily depends on
44# kernel version. Use the in-kernel module for now.
45# distro layers can enable with EXTRA_OECONF_pn_openvswitch += ""
46# EXTRA_OECONF = "--with-linux=${STAGING_KERNEL_DIR} KARCH=${TARGET_ARCH}"
47
48EXTRA_OECONF += "TARGET_PYTHON=${bindir}/python \
49 TARGET_PERL=${bindir}/perl \
50 "
51
52ALLOW_EMPTY_${PN}-pki = "1"
53PACKAGES =+ "${PN}-controller ${PN}-switch ${PN}-brcompat ${PN}-pki"
54
55FILES_${PN}-controller = "${sysconfdir}/init.d/openvswitch-controller \
56 ${sysconfdir}/default/openvswitch-controller \
57 ${sysconfdir}/openvswitch-controller \
58 ${bindir}/ovs-controller"
59
60FILES_${PN}-brcompat = "${sbindir}/ovs-brcompatd"
61
62FILES_${PN}-switch = "${sysconfdir}/init.d/openvswitch-switch \
63 ${sysconfdir}/default/openvswitch-switch \
64 "
65# silence a warning
66FILES_${PN} += "${datadir}/ovsdbmonitor"
67FILES_${PN} += "/run"
68
69inherit autotools update-rc.d ptest
70
71EXTRA_OEMAKE += "TEST_DEST=${D}${PTEST_PATH} TEST_ROOT=${PTEST_PATH}"
72
73do_install_ptest() {
74 oe_runmake test-install
75}
76
77INITSCRIPT_PACKAGES = "${PN}-switch ${PN}-controller"
78INITSCRIPT_NAME_${PN}-switch = "openvswitch-switch"
79INITSCRIPT_PARAMS_${PN}-switch = "defaults 71"
80
81INITSCRIPT_NAME_${PN}-controller = "openvswitch-controller"
82INITSCRIPT_PARAMS_${PN}-controller = "defaults 72"
83
84do_install_append() {
85 install -d ${D}/${sysconfdir}/default/
86 install -m 660 ${WORKDIR}/openvswitch-switch-setup ${D}/${sysconfdir}/default/openvswitch-switch
87 install -d ${D}/${sysconfdir}/openvswitch-controller
88 install -m 660 ${WORKDIR}/openvswitch-controller-setup ${D}/${sysconfdir}/default/openvswitch-controller
89
90 install -d ${D}/${sysconfdir}/init.d/
91 install -m 755 ${WORKDIR}/openvswitch-controller ${D}/${sysconfdir}/init.d/openvswitch-controller
92 install -m 755 ${WORKDIR}/openvswitch-switch ${D}/${sysconfdir}/init.d/openvswitch-switch
93 true || rm -fr ${D}/${datadir}/${PN}/pki
94}
95
96pkg_postinst_${PN}-pki () {
97 # can't do this offline
98 if [ "x$D" != "x" ]; then
99 exit 1
100 fi
101 if test ! -d $D/${datadir}/${PN}/pki; then
102 ovs-pki init --dir=$D/${datadir}/${PN}/pki
103 fi
104}
105
106pkg_postinst_${PN}-controller () {
107 # can't do this offline
108 if [ "x$D" != "x" ]; then
109 exit 1
110 fi
111
112 if test ! -d $D/${datadir}/${PN}/pki; then
113 ovs-pki init --dir=$D/${datadir}/${PN}/pki
114 fi
115
116 cd $D/${sysconfdir}/openvswitch-controller
117 if ! test -e cacert.pem; then
118 ln -s $D/${datadir}/${PN}/pki/switchca/cacert.pem cacert.pem
119 fi
120 if ! test -e privkey.pem || ! test -e cert.pem; then
121 oldumask=$(umask)
122 umask 077
123 ovs-pki req+sign --dir=$D/${datadir}/${PN}/pki tmp controller >/dev/null
124 mv tmp-privkey.pem privkey.pem
125 mv tmp-cert.pem cert.pem
126 mv tmp-req.pem req.pem
127 chmod go+r cert.pem req.pem
128 umask $oldumask
129 fi
130}