Commit d849ec78 authored by Patrick Williams's avatar Patrick Williams
Browse files

Squashed 'import-layers/meta-virtualization/' content from commit c4a1711


Change-Id: I42132e4f0aef12ec265e74d95f489a6409e22f46
git-subtree-dir: import-layers/meta-virtualization
git-subtree-split: c4a1711dd31659b027c70c07e4ef6da98591ac95
Signed-off-by: default avatarPatrick Williams <patrick@stwcx.xyz>
parent 60f9d69e
build*/
pyshtables.py
*.swp
*.orig
*.rej
*~
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
meta-virtualization
===================
This layer provides support for building Xen, KVM, Libvirt, and associated
packages necessary for constructing OE-based virtualized solutions.
Dependencies
------------
This layer depends on:
URI: git://github.com/openembedded/openembedded-core.git
branch: master
revision: HEAD
prio: default
URI: git://github.com/openembedded/meta-openembedded.git
branch: master
revision: HEAD
layers: meta-oe
meta-networking
meta-filesystems
meta-python
URI: git://github.com/errordeveloper/oe-meta-go.git
branch: master
revision: HEAD
BBFILE_PRIORITY_openembedded-layer = "4"
Required for Xen XSM policy:
URI: git://git.yoctoproject.org/meta-selinux
branch: master
revision: HEAD
prio: default
Maintenance
-----------
Send pull requests, patches, comments or questions to meta-virtualization@yoctoproject.org
Maintainers: Raymond Danks <ray.danks@se-eng.com>
Bruce Ashfield <bruce.ashfield@gmail.com>
When sending single patches, please using something like:
'git send-email -1 --to meta-virtualization@yoctoproject.org --subject-prefix=meta-virtualization][PATCH'
License
-------
All metadata is MIT licensed unless otherwise stated. Source code included
in tree for individual recipes is under the LICENSE stated in each recipe
(.bb file) unless otherwise stated.
BUILD_GOOS = "${@go_map_os(d.getVar('BUILD_OS', True), d)}"
BUILD_GOARCH = "${@go_map_arch(d.getVar('BUILD_ARCH', True), d)}"
BUILD_GOTUPLE = "${BUILD_GOOS}_${BUILD_GOARCH}"
HOST_GOOS = "${@go_map_os(d.getVar('HOST_OS', True), d)}"
HOST_GOARCH = "${@go_map_arch(d.getVar('HOST_ARCH', True), d)}"
HOST_GOARM = "${@go_map_arm(d.getVar('HOST_ARCH', True), d.getVar('TUNE_FEATURES', True), d)}"
HOST_GOTUPLE = "${HOST_GOOS}_${HOST_GOARCH}"
TARGET_GOOS = "${@go_map_os(d.getVar('TARGET_OS', True), d)}"
TARGET_GOARCH = "${@go_map_arch(d.getVar('TARGET_ARCH', True), d)}"
TARGET_GOARM = "${@go_map_arm(d.getVar('TARGET_ARCH', True), d.getVar('TUNE_FEATURES', True), d)}"
TARGET_GOTUPLE = "${TARGET_GOOS}_${TARGET_GOARCH}"
GO_BUILD_BINDIR = "${@['bin/${HOST_GOTUPLE}','bin'][d.getVar('BUILD_GOTUPLE',True) == d.getVar('HOST_GOTUPLE',True)]}"
def go_map_arch(a, d):
import re
if re.match('i.86', a):
return '386'
elif a == 'x86_64':
return 'amd64'
elif re.match('arm.*', a):
return 'arm'
elif re.match('aarch64.*', a):
return 'arm64'
elif re.match('p(pc|owerpc)(|64)', a):
return 'powerpc'
else:
bb.error("cannot map '%s' to a Go architecture" % a)
def go_map_arm(a, f, d):
import re
if re.match('arm.*', a) and re.match('arm.*7.*', f):
return '7'
return ''
def go_map_os(o, d):
if o.startswith('linux'):
return 'linux'
return o
# Build errors with the pie options enabled
SECURITY_CFLAGS_pn-libvirt = "${SECURITY_NO_PIE_CFLAGS}"
# This has text relco errors with the pie options enabled
SECURITY_CFLAGS_pn-lxc = "${SECURITY_NO_PIE_CFLAGS}"
# We have a conf and classes directory, append to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have a recipes directory, add to BBFILES
BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
BBFILE_COLLECTIONS += "virtualization-layer"
BBFILE_PATTERN_virtualization-layer := "^${LAYERDIR}/"
BBFILE_PRIORITY_virtualization-layer = "8"
# Custom licenses used by some packages in this layer
LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"
# This should only be incremented on significant changes that will
# cause compatibility issues with other layers
LAYERVERSION_virtualization-layer = "1"
LAYERDEPENDS_virtualization-layer = "core networking-layer"
# Override security flags
require conf/distro/include/virt_security_flags.inc
This is a brief list of all the files in meta-virtualization/docs and what
they contain. If you add a documentation file, please list it here in
alphabetical order as well.
00-INDEX
- this file.
00-README
- info on the goals of meta-virtualization and this docs subdir
openvswitch.txt
- example on how to setup openvswitch with qemu/kvm.
meta-virtualization: docs
=========================
The docs subdirectory is a holding tank for meta-virtualization related
READMEs, documentation, testing information, configuration and other
notes that help the users of meta-virt.
Simple setup for connecting openvswitch to qemu/kvm
===================================================
This example brings up openvswitch using a private network.
Preliminary notes
=================
1. Make sure to build kernel support for openvswitch as a module. The
openvswitch init scripts expect to load a module and upon success
continue to setup the switch. If openvswitch is compiled
statically, the init scripts not load the ovs-vswitchd daemon
and none of the configured bridges will show up in the interfaces
table (ifconfig). You can get around this limiation by running the
following by hand:
# ovs-vswitchd --pidfile --detach
2. Verify that ovs-vswitchd is running before proceeding:
# /etc/init.d/openvswitch-switch status
ovsdb-server is running with pid 1867
ovs-vswitchd is running with pid 1877
3. A kernel and rootfs is required for qemu bring up.
Qemu Setup
==========
The host requires a /etc/qemu-ifup script to setup the bridging and tap
devices. Qemu will invoke this qemu-ifup script at startup. Here is
an example script:
$ cat /etc/qemu-fup
#!/bin/sh
# the tap is dynamically assigned and passed into this script
# as a parameter
TAP=$1
# Note: if booting over NFS, once the $ETH0 device is added to the bridge,
# your host will be unusable. In that case, setup networking
# init scripts appropriately and change the following to work
# with it.
ETH0="eth1"
NETMASK=255.255.255.0
IP=192.168.1.1
GATEWAY=
SWITCH=ovsbr0
if [ -n "$TAP" ];then
ifconfig $TAP up
ifconfig $SWITCH down &>/dev/null
ovs-vsctl del-br $SWITCH
ovs-vsctl add-br $SWITCH
ifconfig $ETH0 0.0.0.0
ifconfig $SWITCH $IP up netmask $NETMASK
#-- external access not required for this test.
#route add default gw $GATEWAY
ovs-vsctl add-port $SWITCH $ETH0
ovs-vsctl add-port $SWITCH $TAP
exit 0
else
echo "$0: No tap device"
exit 1
fi
Start Qemu
==========
This example will bring up qemu with a tap network interface.
Note: this command must be run as root due to the networking setup.
$ qemu-system-x86_64 -nographic -k en-us -m 1024 \
-net nic,macaddr=1a:46:0b:ca:bc:7a,model=virtio \
-net tap -enable-kvm\
-kernel /opt/dpdk-guest-kernel \
-append 'root=/dev/vda ro console=ttyS0' \
-drive file=/opt/intel-xeon-core-ovp-kvm-preempt-rt-dist.ext3,cache=none,if=virtio
Once the guest OS is up and running, configure the quest network interface:
$ ifconfig eth0 192.168.1.10
Ping the bridge:
$ ping 192.168.1.1
From the host, view the bridged network:
$ ovs-vsctl show
c1212b96-ef49-4a8e-b598-09b05b854dd0
Bridge "ovsbr0"
Port "tap0"
Interface "tap0"
Port "eth1"
Interface "eth1"
Port "ovsbr0"
Interface "ovsbr0"
type: internal
At this point, openvswitch is up and running. If you want external
network access, you need to set a GATEWAY in the qemu-ifup script and
make sure the external device is part of the bridge.
Note:
Proper setup will require a /etc/qemu-ifdown script to tear down the
bridge and interfaces. (not provided here).
1. Copyright Notice
Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp.
All rights reserved.
2. License
2.1. This is your license from Intel Corp. under its intellectual property
rights. You may have additional license terms from the party that provided
you this software, covering your right to use that party's intellectual
property rights.
2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
copy of the source code appearing in this file ("Covered Code") an
irrevocable, perpetual, worldwide license under Intel's copyrights in the
base code distributed originally by Intel ("Original Intel Code") to copy,
make derivatives, distribute, use and display any portion of the Covered
Code in any form, with the right to sublicense such rights; and
2.3. Intel grants Licensee a non-exclusive and non-transferable patent
license (with the right to sublicense), under only those claims of Intel
patents that are infringed by the Original Intel Code, to make, use, sell,
offer to sell, and import the Covered Code and derivative works thereof
solely to the minimum extent necessary to exercise the above copyright
license, and in no event shall the patent license extend to any additions
to or modifications of the Original Intel Code. No other license or right
is granted directly or by implication, estoppel or otherwise;
The above copyright and patent license is granted only if the following
conditions are met:
3. Conditions
3.1. Redistribution of Source with Rights to Further Distribute Source.
Redistribution of source code of any substantial portion of the Covered
Code or modification with rights to further distribute source must include
the above Copyright Notice, the above License, this list of Conditions,
and the following Disclaimer and Export Compliance provision. In addition,
Licensee must cause all Covered Code to which Licensee contributes to
contain a file documenting the changes Licensee made to create that Covered
Code and the date of any change. Licensee must include in that file the
documentation of any changes made by any predecessor Licensee. Licensee
must include a prominent statement that the modification is derived,
directly or indirectly, from Original Intel Code.
3.2. Redistribution of Source with no Rights to Further Distribute Source.
Redistribution of source code of any substantial portion of the Covered
Code or modification without rights to further distribute source must
include the following Disclaimer and Export Compliance provision in the
documentation and/or other materials provided with distribution. In
addition, Licensee may not authorize further sublicense of source of any
portion of the Covered Code, and must include terms to the effect that the
license from Licensee to its licensee is limited to the intellectual
property embodied in the software Licensee provides to its licensee, and
not to intellectual property embodied in modifications its licensee may
make.
3.3. Redistribution of Executable. Redistribution in executable form of any
substantial portion of the Covered Code or modification must reproduce the
above Copyright Notice, and the following Disclaimer and Export Compliance
provision in the documentation and/or other materials provided with the
distribution.
3.4. Intel retains all right, title, and interest in and to the Original
Intel Code.
3.5. Neither the name Intel nor any other trademark owned or controlled by
Intel shall be used in advertising or otherwise to promote the sale, use or
other dealings in products derived from or relating to the Covered Code
without prior written authorization from Intel.
4. Disclaimer and Export Compliance
4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
PARTICULAR PURPOSE.
4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
LIMITED REMEDY.
4.3. Licensee shall not export, either directly or indirectly, any of this
software or system incorporating such software without first obtaining any
required license or other approval from the U. S. Department of Commerce or
any other agency or department of the United States Government. In the
event Licensee exports any such software from the United States or
re-exports any such software from a foreign destination, Licensee shall
ensure that the distribution and export/re-export of the software is in
compliance with all laws, regulations, orders, or other restrictions of the
U.S. Export Administration Regulations. Licensee agrees that neither it nor
any of its subsidiaries will export/re-export any technical data, process,
software, or service, directly or indirectly, to any country for which the
United States government or any agency thereof requires an export license,
other governmental approval, or letter of assurance, without first obtaining
such license, approval or letter.
SECTION = "devel"
SUMMARY = "Light-weight package to set up cgroups at system boot."
DESCRIPTION = "Light-weight package to set up cgroups at system boot."
HOMEPAGE = "http://packages.ubuntu.com/source/precise/cgroup-lite"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=5d5da4e0867cf06014f87102154d0102"
SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/main/c/cgroup-lite/cgroup-lite_1.1.tar.gz"
SRC_URI += "file://cgroups-init"
SRC_URI[md5sum] = "041a0d8ad2b192271a2e5507fdb6809f"
SRC_URI[sha256sum] = "e7f9992b90b5b4634f3b8fb42580ff28ff31093edb297ab872c37f61a94586bc"
inherit update-rc.d
INITSCRIPT_NAME = "cgroups-init"
INITSCRIPT_PARAMS = "start 8 2 3 4 5 . stop 20 0 1 6 ."
do_install() {
install -d ${D}/bin
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${S}/scripts/cgroups-mount ${D}/bin
install -m 0755 ${S}/scripts/cgroups-umount ${D}/bin
install -m 0755 ${WORKDIR}/cgroups-init ${D}${sysconfdir}/init.d/cgroups-init
}
#!/bin/sh
### BEGIN INIT INFO
# Provides: cgroups mount
# Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: mount/unmount cgroups
### END INIT INFO
# must start before libvirtd is run
case "$1" in
start)
echo -n "Mounting cgroups..."
/bin/cgroups-mount
echo "Done"
;;
stop)
echo -n "Unmounting cgroups..."
/bin/cgroups-umount
echo "Done"
;;
*)
echo "Usage: /etc/init.d/cgroups-init {start|stop}"
exit 1
;;
esac
SUMMARY = "CRIU"
DESCRIPTION = "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"
HOMEPAGE = "http://criu.org"
SECTION = "console/tools"
LICENSE = "GPLv2"
EXCLUDE_FROM_WORLD = "1"
LIC_FILES_CHKSUM = "file://COPYING;md5=5cc804625b8b491b6b4312f0c9cb5efa"
SRCREV = "4c5b23e52c1dc4e3fbbc7472b92e7b1ce9d22f02"
PR = "r0"
PV = "1.6+git${SRCPV}"
SRC_URI = "git://github.com/xemul/criu.git;protocol=git \
file://0001-criu-Fix-toolchain-hardcode.patch \
file://0002-criu-Skip-documentation-install.patch \
file://0001-criu-Change-libraries-install-directory.patch \
"
COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
DEPENDS += "protobuf-c-native protobuf-c"
S = "${WORKDIR}/git"
#
# CRIU just can be built on ARMv7 and ARMv6, so the Makefile check
# if the ARCH is ARMv7 or ARMv6.
# ARM BSPs need set CRIU_BUILD_ARCH variable for building CRIU.
#
EXTRA_OEMAKE_arm += "ARCH=${CRIU_BUILD_ARCH} WERROR=0"
EXTRA_OEMAKE_x86-64 += "ARCH=${TARGET_ARCH} WERROR=0"
EXTRA_OEMAKE_aarch64 += "ARCH=${TARGET_ARCH} WERROR=0"
EXTRA_OEMAKE_append += "SBINDIR=${sbindir} LIBDIR=${libdir} INCLUDEDIR=${includedir} PIEGEN=no"
EXTRA_OEMAKE_append += "LOGROTATEDIR=${sysconfdir} SYSTEMDUNITDIR=${systemd_unitdir}"
CFLAGS += "-D__USE_GNU -D_GNU_SOURCE"
# overide LDFLAGS to allow criu to build without: "x86_64-poky-linux-ld: unrecognized option '-Wl,-O1'"
export LDFLAGS=""
export BUILD_SYS
export HOST_SYS
inherit setuptools
do_compile_prepend() {
rm -rf ${S}/protobuf/google/protobuf/descriptor.proto
ln -s ${PKG_CONFIG_SYSROOT_DIR}/usr/include/google/protobuf/descriptor.proto ${S}/protobuf/google/protobuf/descriptor.proto
}
do_compile () {
oe_runmake
}
do_install () {
oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" install
}
FILES_${PN} += "${systemd_unitdir}/ \
${libdir}/python2.7/site-packages/ \
${libdir}/pycriu/ \
${libdir}/crit-0.0.1-py2.7.egg-info \
"
From cb9933dc34af0b4d52c4584332600114ac65c402 Mon Sep 17 00:00:00 2001
From: Jianchuan Wang <jianchuan.wang@windriver.com>
Date: Tue, 4 Aug 2015 17:45:51 +0800
Subject: [PATCH] criu: Change libraries install directory
Install the libraries into /usr/lib(/usr/lib64)
Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
---
Makefile | 2 +-
Makefile.inc | 9 ---------
2 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/Makefile b/Makefile
index 7f5c890..6dbc436 100644
--- a/Makefile
+++ b/Makefile
@@ -351,7 +351,7 @@ install-man:
install-crit: crit
$(E) " INSTALL crit"
- $(Q) python scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX)
+ $(Q) python scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --install-lib=$(LIBDIR)
.PHONY: install install-man install-crit install-criu
diff --git a/Makefile.inc b/Makefile.inc
index 5496f41..ba70aea 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -17,14 +17,5 @@ MANDIR := $(PREFIX)/share/man
SYSTEMDUNITDIR := $(PREFIX)/lib/systemd/system/
LOGROTATEDIR := $(PREFIX)/etc/logrotate.d/
LIBDIR := $(PREFIX)/lib
-# For recent Debian/Ubuntu with multiarch support
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture \
- -qDEB_HOST_MULTIARCH 2>/dev/null)
-ifneq "$(DEB_HOST_MULTIARCH)" ""
-LIBDIR := $(PREFIX)/lib/$(DEB_HOST_MULTIARCH)
-# For most other systems
-else ifeq "$(shell uname -m)" "x86_64"
-LIBDIR := $(PREFIX)/lib64
-endif
INCLUDEDIR := $(PREFIX)/include/criu
--
1.9.1
From 3d4f112fdb434712eba09239a468842323f1af4c Mon Sep 17 00:00:00 2001
From: Yang Shi <yang.shi@windriver.com>
Date: Tue, 26 Aug 2014 14:42:42 -0700
Subject: [PATCH 1/2] criu: Fix toolchain hardcode
Replace ":=" to "?=" so that the toolchain used by bitbake build system will
be taken.
Signed-off-by: Yang Shi <yang.shi@windriver.com>
Signed-off-by: Nam Ninh <nam.ninh@windriver.com>
---
Makefile | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/Makefile b/Makefile
index f1c8784..43252ec 100644
--- a/Makefile
+++ b/Makefile
@@ -23,15 +23,15 @@ export VERSION_SO_MAJOR VERSION_SO_MINOR
# Common definitions
#
-FIND := find
-CSCOPE := cscope
-RM := rm -f
-LD := $(CROSS_COMPILE)ld
-CC := $(CROSS_COMPILE)gcc
-NM := $(CROSS_COMPILE)nm
-SH := bash
-MAKE := make
-OBJCOPY := $(CROSS_COMPILE)objcopy
+FIND ?= find
+CSCOPE ?= cscope
+RM ?= rm -f
+LD ?= $(CROSS_COMPILE)ld
+CC ?= $(CROSS_COMPILE)gcc
+NM ?= $(CROSS_COMPILE)nm
+SH ?= bash
+MAKE ?= make
+OBJCOPY ?= $(CROSS_COMPILE)objcopy
CFLAGS += $(USERCFLAGS)
--
2.0.2
From 81bc5928cdc1b432656eb6590967306d8cf3ac9d Mon Sep 17 00:00:00 2001
From: Jianchuan Wang <jianchuan.wang@windriver.com>
Date: Tue, 4 Aug 2015 10:22:21 +0800
Subject: [PATCH] protobuf-c: Remove the rules which depend on the native
command
Those rules are not for cross-compile since the command protoc-c/cxx-generate-packed-data
need be executed to generate some local files in the compiling processing.
Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
---
Makefile.am | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 310aa09..0602e96 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -148,17 +148,18 @@ t_generated_code2_cxx_generate_packed_data_CXXFLAGS = \
t_generated_code2_cxx_generate_packed_data_LDADD = \
$(protobuf_LIBS)
-t/test.pb-c.c t/test.pb-c.h: $(top_builddir)/protoc-c/protoc-c$(EXEEXT) $(top_srcdir)/t/test.proto
- $(AM_V_GEN)$(top_builddir)/protoc-c/protoc-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test.proto
+t/test.pb-c.c t/test.pb-c.h: $(top_srcdir)/t/test.proto
+ $(AM_V_GEN)protoc-c -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test.proto
-t/test-full.pb-c.c t/test-full.pb-c.h: $(top_builddir)/protoc-c/protoc-c$(EXEEXT) $(top_srcdir)/t/test-full.proto
- $(AM_V_GEN)$(top_builddir)/protoc-c/protoc-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-full.proto
+t/test-full.pb-c.c t/test-full.pb-c.h: $(top_srcdir)/t/test-full.proto
+ $(AM_V_GEN)protoc-c -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-full.proto
t/test-full.pb.cc t/test-full.pb.h: @PROTOC@ $(top_srcdir)/t/test-full.proto
$(AM_V_GEN)@PROTOC@ -I$(top_srcdir) --cpp_out=$(top_builddir) $(top_srcdir)/t/test-full.proto
-t/generated-code2/test-full-cxx-output.inc: t/generated-code2/cxx-generate-packed-data$(EXEEXT)
- $(AM_V_GEN)$(top_builddir)/t/generated-code2/cxx-generate-packed-data$(EXEEXT) > $(top_builddir)/t/generated-code2/test-full-cxx-output.inc
+t/generated-code2/test-full-cxx-output.inc:
+ mkdir -p $(top_builddir)/t/generated-code2
+ $(AM_V_GEN)cxx-generate-packed-data > $(top_builddir)/t/generated-code2/test-full-cxx-output.inc
BUILT_SOURCES += \
t/test.pb-c.c t/test.pb-c.h \
--
1.9.1
From e9c2a94b9eb37ad24672b10caa398bd18282b962 Mon Sep 17 00:00:00 2001
From: Yang Shi <yang.shi@windriver.com>
Date: Tue, 26 Aug 2014 14:44:51 -0700
Subject: [PATCH 2/2] criu: Skip documentation install
asciidoc is needed to generate CRIU documentation, so skip it in install.
Signed-off-by: Yang Shi <yang.shi@windriver.com>
Signed-off-by: Nam Ninh <nam.ninh@windriver.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 43252ec..e25edcc 100644
--- a/Makefile
+++ b/Makefile
@@ -265,7 +265,7 @@ install: $(PROGRAM) install-man
$(Q) install -m 644 scripts/logrotate.d/criu-service $(DESTDIR)$(LOGROTATEDIR)
install-man:
- $(Q) $(MAKE) -C Documentation install
+# $(Q) $(MAKE) -C Documentation install
.PHONY: install install-man
--
2.0.2
From f8b7c90f6da90b67bdd7d5301894c5c28bd9d076 Mon Sep 17 00:00:00 2001
From: Jianchuan Wang <jianchuan.wang@windriver.com>
Date: Mon, 10 Aug 2015 11:23:31 +0800
Subject: [PATCH] Omit google-apputils dependency
Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
---
python/setup.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/python/setup.py b/python/setup.py
index 2450a77..6f6bffb 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -189,7 +189,6 @@ if __name__ == '__main__':
'google.protobuf.text_format'],
cmdclass = { 'clean': clean, 'build_py': build_py },
install_requires = ['setuptools'],
- setup_requires = ['google-apputils'],
ext_modules = ext_module_list,
url = 'https://developers.google.com/protocol-buffers/',
maintainer = maintainer_email,
--
1.9.1
diff -Naur protobuf-c-0.15.old/src/Makefile.am protobuf-c-0.15/src/Makefile.am
--- protobuf-c-0.15.old/src/Makefile.am 2012-11-28 14:59:57.845251943 +0100
+++ protobuf-c-0.15/src/Makefile.am 2012-11-28 15:00:23.549252632 +0100
@@ -1,5 +1,5 @@
if BUILD_PROTOC_C
-SUBDIRS = . test
+
bin_PROGRAMS = protoc-c
protoc_c_SOURCES = \
google/protobuf/compiler/c/c_service.cc \
@@ -23,7 +23,7 @@
lib_LTLIBRARIES = libprotobuf-c.la
protobufcincludedir = $(includedir)/google/protobuf-c
-EXTRA_DIST = CMakeLists.txt test/CMakeLists.txt
+EXTRA_DIST = CMakeLists.txt
libprotobuf_c_la_SOURCES = \
google/protobuf-c/protobuf-c-dispatch.c \
From 46e331263eb92e47510e88478b255f226d30245c Mon Sep 17 00:00:00 2001
From: Keith Holman <Keith.Holman@windriver.com>
Date: Mon, 18 Aug 2014 15:19:35 -0400
Subject: [PATCH] protobuf: allow running python scripts from anywhere
The Makefile to generate the examples with Google Protocol Buffers
generates some scripts for python. However, these generated scripts
only work if they are ran in the same directory as the source files.
This fix generates scripts to execute from anywhere on the system.
Signed-off-by: Keith Holman <Keith.Holman@windriver.com>
---
examples/Makefile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/examples/Makefile b/examples/Makefile
index 8dc9083..a993d63 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -48,11 +48,13 @@ list_people_java: javac_middleman
add_person_python: add_person.py protoc_middleman
@echo "Writing shortcut script add_person_python..."
@echo '#! /bin/sh' > add_person_python
- @echo './add_person.py "$$@"' >> add_person_python
+ @echo 'SCRIPT_DIR=$$(dirname $$0)' >> add_person_python
+ @echo '$$SCRIPT_DIR/add_person.py "$$@"' >> add_person_python
@chmod +x add_person_python
list_people_python: list_people.py protoc_middleman
@echo "Writing shortcut script list_people_python..."
@echo '#! /bin/sh' > list_people_python
- @echo './list_people.py "$$@"' >> list_people_python
+ @echo 'SCRIPT_DIR=$$(dirname $$0)' >> list_people_python
+ @echo '$$SCRIPT_DIR/list_people.py "$$@"' >> list_people_python
@chmod +x list_people_python
--
1.9.3
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment