Addition of meta-cloud
v3 cover Addition of meta-cloud
From: David Nyström <[email protected]>
Since there are some common parts, please review,
specifically the libvirt changes.
David Nyström (14):
Added protobuf-c criu dependency
Added protobuf criu dependency
Added CRIU recipe
Added lxc recipe
Added netcf recipe, libvirt dependency
Added openbsd-netcat recipe, libvirt dependency
Added openflow recipe
Added openvswitch recipe
Added .gitignore file
Changed David Nyströms email in README
Added template cloud-* images
Added some details in README, and made the description common Upgraded to libvirt 1.0.0, and added a more detailed packageconfig Added kernel configuration for LxC and in kernel OpenvSwitch
.gitignore | 6 + README | 13 +- recipes-containers/criu/criu_git.bb | 29 +++ .../criu/files/0001-Fixed-hardcoding.patch | 47 ++++ recipes-containers/criu/files/disable_tests.patch | 19 ++ recipes-containers/criu/protobuf-c_0.15.bb | 20 ++ recipes-containers/criu/protobuf_2.4.1.bb | 18 ++ recipes-containers/lxc/files/libmounts.patch | 48 ++++ recipes-containers/lxc/files/noldconfig.patch | 29 +++ recipes-containers/lxc/lxc_0.8.0.bb | 39 +++ recipes-extended/images/cloud-image-compute.bb | 14 + recipes-extended/images/cloud-image-controller.bb | 34 +++ recipes-extended/images/cloud-image-guest.bb | 18 ++ recipes-extended/libvirt/libvirt_1.0.0.bb | 139 ++++++++++ recipes-kernel/linux/linux-yocto/lxc.cfg | 22 ++ recipes-kernel/linux/linux-yocto/lxc.scc | 4 + recipes-kernel/linux/linux-yocto/vswitch.cfg | 2 + recipes-kernel/linux/linux-yocto/vswitch.scc | 4 + recipes-kernel/linux/linux-yocto_3.4.bbappend | 5 +- recipes-networking/netcat/openbsd-netcat_1.6.bb | 29 +++ recipes-networking/netcf/netcf_git.bb | 25 ++ recipes-networking/openflow/openflow_1.0.bb | 24 ++ .../openvswitch/files/openvswitch-controller | 274 ++++++++++++++++++++ .../openvswitch/files/openvswitch-controller-setup | 29 +++ .../openvswitch/files/openvswitch-example | 102 ++++++++ .../openvswitch/files/openvswitch-switch | 102 ++++++++ .../openvswitch/files/openvswitch-switch-setup | 8 + .../openvswitch/openvswitch_1.4.3.bb | 99 +++++++ 28 files changed, 1194 insertions(+), 8 deletions(-) create mode 100644 .gitignore create mode 100644 recipes-containers/criu/criu_git.bb create mode 100644 recipes-containers/criu/files/0001-Fixed-hardcoding.patch create mode 100644 recipes-containers/criu/files/disable_tests.patch create mode 100644 recipes-containers/criu/protobuf-c_0.15.bb create mode 100644 recipes-containers/criu/protobuf_2.4.1.bb create mode 100644 recipes-containers/lxc/files/libmounts.patch create mode 100644 recipes-containers/lxc/files/noldconfig.patch create mode 100644 recipes-containers/lxc/lxc_0.8.0.bb create mode 100644 recipes-extended/images/cloud-image-compute.bb create mode 100644 recipes-extended/images/cloud-image-controller.bb create mode 100644 recipes-extended/images/cloud-image-guest.bb create mode 100644 recipes-extended/libvirt/libvirt_1.0.0.bb create mode 100644 recipes-kernel/linux/linux-yocto/lxc.cfg create mode 100644 recipes-kernel/linux/linux-yocto/lxc.scc create mode 100644 recipes-kernel/linux/linux-yocto/vswitch.cfg create mode 100644 recipes-kernel/linux/linux-yocto/vswitch.scc create mode 100644 recipes-networking/netcat/openbsd-netcat_1.6.bb create mode 100644 recipes-networking/netcf/netcf_git.bb create mode 100644 recipes-networking/openflow/openflow_1.0.bb create mode 100755 recipes-networking/openvswitch/files/openvswitch-controller create mode 100644 recipes-networking/openvswitch/files/openvswitch-controller-setup create mode 100644 recipes-networking/openvswitch/files/openvswitch-example create mode 100644 recipes-networking/openvswitch/files/openvswitch-switch create mode 100644 recipes-networking/openvswitch/files/openvswitch-switch-setup create mode 100644 recipes-networking/openvswitch/openvswitch_1.4.3.bb
Signature · 1 line
1.7.9.5
PATCH v3 1/14 Added protobuf-c criu dependency
From: David Nyström <[email protected]>
--- recipes-containers/criu/files/disable_tests.patch | 19 +++++++++++++++++++ recipes-containers/criu/protobuf-c_0.15.bb | 20 ++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 recipes-containers/criu/files/disable_tests.patch create mode 100644 recipes-containers/criu/protobuf-c_0.15.bb
recipes-containers/criu/files/disable_tests.patch new file +19 -0
@@ -0,0 +1,19 @@ +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 \
recipes-containers/criu/protobuf-c_0.15.bb new file +20 -0
@@ -0,0 +1,20 @@ +SUMMARY = "protobuf-c" +DESCRIPTION = "This package provides a code generator and runtime libraries to use Protocol Buffers from pure C" +HOMEPAGE = "http://code.google.com/p/protobuf-c/" +SECTION = "console/tools" +LICENSE = "Apache-2.0" + +LIC_FILES_CHKSUM = "file://src/google/protobuf-c/protobuf-c.c;endline=33;md5=333140fae7cf8a38dc5f980ddb63704b" + +PR = "r0" + +DEPENDS = "protobuf" + +SRC_URI[md5sum] = "73ff0c8df50d2eee75269ad8f8c07dc8" +SRC_URI[sha256sum] = "8fcb538e13a5431c46168fc8f2e6ad2574e2db9b684c0c72b066e24f010a0036" +SRC_URI = "http://protobuf-c.googlecode.com/files/protobuf-c-${PV}.tar.gz \ + file://disable_tests.patch" + +inherit autotools + +BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
1.7.9.5
PATCH v3 2/14 Added protobuf criu dependency
In reply to [email protected]From: David Nyström <[email protected]>
--- recipes-containers/criu/protobuf_2.4.1.bb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 recipes-containers/criu/protobuf_2.4.1.bb
recipes-containers/criu/protobuf_2.4.1.bb new file +18 -0
@@ -0,0 +1,18 @@ +SUMMARY = "protobuf" +DESCRIPTION = "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." +HOMEPAGE = "http://code.google.com/p/protobuf/" +SECTION = "console/tools" +LICENSE = "BSD-3-Clause" + +LIC_FILES_CHKSUM = "file://COPYING.txt;md5=af6809583bfde9a31595a58bb4a24514" + +PR = "r0" + +SRC_URI[md5sum] = "dc84e9912ea768baa1976cb7bbcea7b5" +SRC_URI[sha256sum] = "eac6969b617f397247e805267da2b0db3ff9e5a9163b123503a192fbb5776567" +SRC_URI = "http://protobuf.googlecode.com/files/protobuf-${PV}.tar.gz" + +EXTRA_OECONF += " --with-protoc=echo" +inherit autotools + +BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
1.7.9.5
PATCH v3 3/14 Added CRIU recipe
In reply to [email protected]From: David Nyström <[email protected]>
--- recipes-containers/criu/criu_git.bb | 29 ++++++++++++ .../criu/files/0001-Fixed-hardcoding.patch | 47 ++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 recipes-containers/criu/criu_git.bb create mode 100644 recipes-containers/criu/files/0001-Fixed-hardcoding.patch
recipes-containers/criu/criu_git.bb new file +29 -0
@@ -0,0 +1,29 @@ +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" + +LIC_FILES_CHKSUM = "file://COPYING;md5=12920dfe6b35a0758155f0e62878b366" + +SRCREV = "d81c9a4618db2f618bdb8e207b7f0fec631c7142" +PR = "r0" +PV = "0.2+git${SRCPV}" + +SRC_URI = "git://git.criu.org/crtools.git;protocol=git \ + file://0001-Fixed-hardcoding.patch" + +DEPENDS += "protobuf-c-native protobuf-c" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE += "ARCH=${TARGET_ARCH} WERROR=0" + +do_compile () { + oe_runmake +} + +do_install () { + mkdir -p ${D}/${bindir} + install -m 755 ${S}/crtools ${D}/${bindir}/crtools +}
recipes-containers/criu/files/0001-Fixed-hardcoding.patch new file +47 -0
47 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v3 4/14 Added lxc recipe
In reply to [email protected]From: David Nyström <[email protected]>
--- recipes-containers/lxc/files/libmounts.patch | 48 +++++++++++++++++++++++++ recipes-containers/lxc/files/noldconfig.patch | 29 +++++++++++++++ recipes-containers/lxc/lxc_0.8.0.bb | 39 ++++++++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 recipes-containers/lxc/files/libmounts.patch create mode 100644 recipes-containers/lxc/files/noldconfig.patch create mode 100644 recipes-containers/lxc/lxc_0.8.0.bb
recipes-containers/lxc/files/libmounts.patch new file +48 -0
@@ -0,0 +1,48 @@ +From dfef62f0334c65397254215f809a8f25364ea6ef Mon Sep 17 00:00:00 2001 +From: Stuart Yoder <[email protected]> +Date: Wed, 12 Sep 2012 11:05:07 -0500 +Subject: [PATCH] create lib mounts only if the host directories exist + +Signed-off-by: Stuart Yoder <[email protected]> +--- + templates/lxc-busybox.in | 24 +++++++++++------------- + 1 file changed, 11 insertions(+), 13 deletions(-) + +diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in +index 720ceef..f6cb1ba 100644 +--- a/templates/lxc-busybox.in ++++ b/templates/lxc-busybox.in +@@ -235,19 +235,17 @@ lxc.pts = 1 + lxc.rootfs = $rootfs + EOF + +-if [ -d "$rootfs/lib" ]; then +-cat <<EOF >> $path/config +-lxc.mount.entry=/lib $rootfs/lib none ro,bind 0 0 +-lxc.mount.entry=/usr/lib $rootfs/usr/lib none ro,bind 0 0 +-EOF +-fi +- +-if [ -d "/lib64" ] && [ -d "$rootfs/lib64" ]; then +-cat <<EOF >> $path/config +-lxc.mount.entry=/lib64 $rootfs/lib64 none ro,bind 0 0 +-lxc.mount.entry=/usr/lib64 $rootfs/usr/lib64 none ro,bind 0 0 +-EOF +-fi ++ libdirs="\ ++ /lib \ ++ /usr/lib \ ++ /lib64 \ ++ /usr/lib64" ++ ++ for dir in $libdirs; do ++ if [ -d $dir ]; then ++ echo "lxc.mount.entry=$dir $rootfs$dir none ro,bind 0 0" >> $path/config ++ fi ++ done + } + + usage() +-- +1.7.9.7 +
recipes-containers/lxc/files/noldconfig.patch new file +29 -0
@@ -0,0 +1,29 @@ +From a8aa8d131a7140d5625c24c9f4c28c605213552c Mon Sep 17 00:00:00 2001 +From: Andrey Mazo <[email protected]> +Date: Fri, 18 May 2012 21:11:22 +0400 +Subject: [PATCH] Avoid ldconfig due to cross-compilation problems. + +Make required symlinks manually. +Otherwise, it cases problems on cbuild endianness != ctarget endianness +setups because /sbin/ldconfig expects elf header in the wrong endianness. +--- + src/lxc/Makefile.am | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am +index 1c26952..3b84c1a 100644 +--- a/src/lxc/Makefile.am ++++ b/src/lxc/Makefile.am +@@ -125,8 +125,8 @@ lxc_kill_SOURCES = lxc_kill.c + + install-exec-local: install-soPROGRAMS + mv $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.$(VERSION) +- /sbin/ldconfig -l $(DESTDIR)$(libdir)/liblxc.so.$(VERSION) + cd $(DESTDIR)$(libdir); \ ++ ln -sf liblxc.so.$(VERSION) liblxc.so.$(firstword $(subst ., ,$(VERSION))); \ + ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so + + uninstall-local: +-- +1.7.3.4 +
recipes-containers/lxc/lxc_0.8.0.bb new file +39 -0
@@ -0,0 +1,39 @@ +DESCRIPTION = "lxc aims to use these new functionnalities to provide an userspace container object" +SECTION = "console/utils" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" +PRIORITY = "optional" +PR = "r2" +DEPENDS = "libxml2 libcap" +RDEPENDS_${PN} = " \ + rsync \ + gzip \ + libcap-bin \ + bridge-utils \ + dnsmasq \ + perl-module-strict \ + perl-module-getopt-long \ + perl-module-vars \ + perl-module-warnings-register \ + perl-module-exporter \ + perl-module-constant \ + perl-module-overload \ + perl-module-exporter-heavy \ +" + +SRC_URI = "http://lxc.sourceforge.net/download/lxc/${PN}-${PV}.tar.gz \ + file://noldconfig.patch \ + " +SRC_URI[md5sum] = "7304fa57146ce687f749b5df876bb20d" +SRC_URI[sha256sum] = "eac833730b94e423d4bef6834bc4a716437d2abd6ab8b24334c506aaaa08692c" + +S = "${WORKDIR}/${PN}-${PV}" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[doc] = "--enable-doc,--disable-doc" +PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath" +PACKAGECONFIG[apparmour] = "--enable-apparmor,--disable-apparmor,apparmor,apparmor" + +inherit autotools + +FILES_${PN}-dbg += "${libexecdir}/lxc/.debug"
Signature · 1 line
1.7.9.5
Re: [PATCHv3 04/14] Added lxc recipe
Quoted 20 lines · On Thu, Dec 6, 2012 at 9:03 AM, <[email protected]> wrote:
From: David Nyström <[email protected]>
--- recipes-containers/lxc/files/libmounts.patch | 48 +++++++++++++++++++++++++ recipes-containers/lxc/files/noldconfig.patch | 29 +++++++++++++++ recipes-containers/lxc/lxc_0.8.0.bb | 39 ++++++++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 recipes-containers/lxc/files/libmounts.patch create mode 100644 recipes-containers/lxc/files/noldconfig.patch create mode 100644 recipes-containers/lxc/lxc_0.8.0.bbrecipes-containers/lxc/files/libmounts.patch new file +0
-0
recipes-containers/lxc/files/libmounts.patch line 5
Quoted 5 lines
recipes-containers/lxc/files/libmounts.patch new file +5
-0@@ -0,0 +1,48 @@ +From dfef62f0334c65397254215f809a8f25364ea6ef Mon Sep 17 00:00:00 2001 +From: Stuart Yoder <[email protected]> +Date: Wed, 12 Sep 2012 11:05:07 -0500 +Subject: [PATCH] create lib mounts only if the host directories exist +
Is the source of the lxc recipe the meta-fsl layers ? If so, it's always a good idea
to provide a reference to the original recipe (or layer) in the commit message or
even in the patch itself. It serves to give credit and help people trace the history
of a particular recipe.
Cheers,
Bruce
Quoted 139 lines
recipes-containers/lxc/files/libmounts.patch new file +35
-0+Signed-off-by: Stuart Yoder <[email protected]> +--- + templates/lxc-busybox.in | 24 +++++++++++------------- + 1 file changed, 11 insertions(+), 13 deletions(-) + +diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in +index 720ceef..f6cb1ba 100644 +--- a/templates/lxc-busybox.in ++++ b/templates/lxc-busybox.in +@@ -235,19 +235,17 @@ lxc.pts = 1 + lxc.rootfs = $rootfs + EOF + +-if [ -d "$rootfs/lib" ]; then +-cat <<EOF >> $path/config +-lxc.mount.entry=/lib $rootfs/lib none ro,bind 0 0 +-lxc.mount.entry=/usr/lib $rootfs/usr/lib none ro,bind 0 0 +-EOF +-fi +- +-if [ -d "/lib64" ] && [ -d "$rootfs/lib64" ]; then +-cat <<EOF >> $path/config +-lxc.mount.entry=/lib64 $rootfs/lib64 none ro,bind 0 0 +-lxc.mount.entry=/usr/lib64 $rootfs/usr/lib64 none ro,bind 0 0 +-EOF +-fi ++ libdirs="\ ++ /lib \ ++ /usr/lib \ ++ /lib64 \ ++ /usr/lib64" ++ ++ for dir in $libdirs; do ++ if [ -d $dir ]; then ++ echo "lxc.mount.entry=$dir $rootfs$dir none ro,bind 0 0" >>$path/config
++ fi
++ done
+ }recipes-containers/lxc/files/libmounts.patch new file +5
-0+ + usage() +-- +1.7.9.7 +recipes-containers/lxc/files/noldconfig.patch new file +20
-0@@ -0,0 +1,29 @@ +From a8aa8d131a7140d5625c24c9f4c28c605213552c Mon Sep 17 00:00:00 2001 +From: Andrey Mazo <[email protected]> +Date: Fri, 18 May 2012 21:11:22 +0400 +Subject: [PATCH] Avoid ldconfig due to cross-compilation problems. + +Make required symlinks manually. +Otherwise, it cases problems on cbuild endianness != ctarget endianness +setups because /sbin/ldconfig expects elf header in the wrong endianness. +--- + src/lxc/Makefile.am | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am +index 1c26952..3b84c1a 100644 +--- a/src/lxc/Makefile.am ++++ b/src/lxc/Makefile.am +@@ -125,8 +125,8 @@ lxc_kill_SOURCES = lxc_kill.c + + install-exec-local: install-soPROGRAMS + mv $(DESTDIR)$(libdir)/liblxc.so$(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
+- /sbin/ldconfig -l $(DESTDIR)$(libdir)/liblxc.so.$(VERSION) + cd $(DESTDIR)$(libdir); \ ++ ln -sf liblxc.so.$(VERSION) liblxc.so.$(firstword $(subst .,,$(VERSION))); \
recipes-containers/lxc/files/noldconfig.patch new file +6
-0+ ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so + + uninstall-local: +-- +1.7.3.4 +recipes-containers/lxc/ renamed from recipes-containers/lxc/lxc_0.8.0.bb +0
-0lxc_0.8.0.bb
new file mode 100644
index 0000000..c662cb1recipes-containers/lxc/lxc_0.8.0.bb new file +1
-0@@ -0,0 +1,39 @@ +DESCRIPTION = "lxc aims to use these new functionnalities to provide anuserspace container object"
recipes-containers/lxc/lxc_0.8.0.bb new file +27
-0+SECTION = "console/utils" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" +PRIORITY = "optional" +PR = "r2" +DEPENDS = "libxml2 libcap" +RDEPENDS_${PN} = " \ + rsync \ + gzip \ + libcap-bin \ + bridge-utils \ + dnsmasq \ + perl-module-strict \ + perl-module-getopt-long \ + perl-module-vars \ + perl-module-warnings-register \ + perl-module-exporter \ + perl-module-constant \ + perl-module-overload \ + perl-module-exporter-heavy \ +" + +SRC_URI = "http://lxc.sourceforge.net/download/lxc/${PN}-${PV}.tar.gz \ + file://noldconfig.patch \ + " +SRC_URI[md5sum] = "7304fa57146ce687f749b5df876bb20d" +SRC_URI[sha256sum] ="
eac833730b94e423d4bef6834bc4a716437d2abd6ab8b24334c506aaaa08692c"recipes-containers/lxc/lxc_0.8.0.bb new file +7
-0+ +S = "${WORKDIR}/${PN}-${PV}" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[doc] = "--enable-doc,--disable-doc" +PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath" +PACKAGECONFIG[apparmour] ="--enable-apparmor,--disable-apparmor,apparmor,apparmor"
recipes-containers/lxc/lxc_0.8.0.bb new file +4
-1+ +inherit autotools + +FILES_${PN}-dbg += "${libexecdir}/lxc/.debug" --1.7.9.5
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
Re: [PATCHv3 04/14] Added lxc recipe
Quoted 36 lines · Bruce Ashfield
Quoted 20 lines · On Thu, Dec 6, 2012 at 9:03 AM, <[email protected]> wrote:
From: David Nyström <[email protected]>
--- recipes-containers/lxc/files/libmounts.patch | 48 +++++++++++++++++++++++++ recipes-containers/lxc/files/noldconfig.patch | 29 +++++++++++++++ recipes-containers/lxc/lxc_0.8.0.bb | 39 ++++++++++++++++++++ 3 files changed, 116 insertions(+)create mode 100644
recipes-containers/lxc/files/libmounts.patchcreate mode 100644recipes-containers/lxc/files/noldconfig.patchcreate mode 100644 recipes-containers/lxc/lxc_0.8.0.bbrecipes-containers/lxc/files/libmounts.patch new file +0
-0recipes-containers/lxc/files/libmounts.patch line 5
Quoted 5 lines
recipes-containers/lxc/files/libmounts.patch new file +5
-0@@ -0,0 +1,48 @@ +From dfef62f0334c65397254215f809a8f25364ea6ef Mon Sep 17 00:00:00 2001 +From: Stuart Yoder <[email protected]> +Date: Wed, 12 Sep 2012 11:05:07 -0500 +Subject: [PATCH] create lib mounts only if the host directories exist +Is the source of the lxc recipe the meta-fsl layers ? If so, it's always a good idea
to provide a reference to the original recipe (or layer) in the commit message or
even in the patch itself. It serves to give credit and help people trace the history
of a particular recipe.
Quoted 3 lines
Cheers,
Bruce
Yes, the source is lxc_0.8.0-rc1.bb in meta-fsl-ppc. Unfortunately I lack the git-fu needed to import _only_ one file with history from another repo. Any suggestions are welcome here.
I'll make a note in the commit message of the origin.
Quoted 144 lines
Quoted 141 lines
recipes-containers/lxc/files/libmounts.patch new file +35
-0+Signed-off-by: Stuart Yoder <[email protected]> +--- + templates/lxc-busybox.in | 24 +++++++++++------------- + 1 file changed, 11 insertions(+), 13 deletions(-) + +diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in +index 720ceef..f6cb1ba 100644 +--- a/templates/lxc-busybox.in ++++ b/templates/lxc-busybox.in +@@ -235,19 +235,17 @@ lxc.pts = 1 + lxc.rootfs = $rootfs + EOF + +-if [ -d "$rootfs/lib" ]; then +-cat <<EOF >> $path/config +-lxc.mount.entry=/lib $rootfs/lib none ro,bind 0 0 +-lxc.mount.entry=/usr/lib $rootfs/usr/lib none ro,bind 0 0 +-EOF +-fi +- +-if [ -d "/lib64" ] && [ -d "$rootfs/lib64" ]; then +-cat <<EOF >> $path/config +-lxc.mount.entry=/lib64 $rootfs/lib64 none ro,bind 0 0 +-lxc.mount.entry=/usr/lib64 $rootfs/usr/lib64 none ro,bind 0 0 +-EOF +-fi ++ libdirs="\ ++ /lib \ ++ /usr/lib \ ++ /lib64 \ ++ /usr/lib64" ++ ++ for dir in $libdirs; do ++ if [ -d $dir ]; then ++ echo "lxc.mount.entry=$dir $rootfs$dir none ro,bind 0 0" >>$path/config
++ fi
++ done
+ }recipes-containers/lxc/files/libmounts.patch new file +5
-0+ + usage() +-- +1.7.9.7 +recipes-containers/lxc/files/noldconfig.patch new file +20
-0@@ -0,0 +1,29 @@ +From a8aa8d131a7140d5625c24c9f4c28c605213552c Mon Sep 17 00:00:00 2001 +From: Andrey Mazo <[email protected]> +Date: Fri, 18 May 2012 21:11:22 +0400 +Subject: [PATCH] Avoid ldconfig due to cross-compilation problems. + +Make required symlinks manually. +Otherwise, it cases problems on cbuild endianness != ctarget endianness +setups because /sbin/ldconfig expects elf header in the wrong endianness. +--- + src/lxc/Makefile.am | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am +index 1c26952..3b84c1a 100644 +--- a/src/lxc/Makefile.am ++++ b/src/lxc/Makefile.am +@@ -125,8 +125,8 @@ lxc_kill_SOURCES = lxc_kill.c + + install-exec-local: install-soPROGRAMS + mv $(DESTDIR)$(libdir)/liblxc.so$(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
+- /sbin/ldconfig -l $(DESTDIR)$(libdir)/liblxc.so.$(VERSION) + cd $(DESTDIR)$(libdir); \ ++ ln -sf liblxc.so.$(VERSION) liblxc.so.$(firstword $(subst .,,$(VERSION))); \
recipes-containers/lxc/files/noldconfig.patch new file +6
-0+ ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so + + uninstall-local: +-- +1.7.3.4 +recipes-containers/lxc/ renamed from recipes-containers/lxc/lxc_0.8.0.bb +0
-0lxc_0.8.0.bb
new file mode 100644
index 0000000..c662cb1recipes-containers/lxc/lxc_0.8.0.bb new file +1
-0@@ -0,0 +1,39 @@ +DESCRIPTION = "lxc aims to use these new functionnalities to provide anuserspace container object"
recipes-containers/lxc/lxc_0.8.0.bb new file +27
-0+SECTION = "console/utils" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" +PRIORITY = "optional" +PR = "r2" +DEPENDS = "libxml2 libcap" +RDEPENDS_${PN} = " \ + rsync \ + gzip \ + libcap-bin \ + bridge-utils \ + dnsmasq \ + perl-module-strict \ + perl-module-getopt-long \ + perl-module-vars \ + perl-module-warnings-register \ + perl-module-exporter \ + perl-module-constant \ + perl-module-overload \ + perl-module-exporter-heavy \ +" + +SRC_URI = "http://lxc.sourceforge.net/download/lxc/${PN}-${PV}.tar.gz \ + file://noldconfig.patch \ + " +SRC_URI[md5sum] = "7304fa57146ce687f749b5df876bb20d" +SRC_URI[sha256sum] ="
eac833730b94e423d4bef6834bc4a716437d2abd6ab8b24334c506aaaa08692c"recipes-containers/lxc/lxc_0.8.0.bb new file +7
-0+ +S = "${WORKDIR}/${PN}-${PV}" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[doc] = "--enable-doc,--disable-doc" +PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath" +PACKAGECONFIG[apparmour] ="--enable-apparmor,--disable-apparmor,apparmor,apparmor"
recipes-containers/lxc/lxc_0.8.0.bb new file +4
-1+ +inherit autotools + +FILES_${PN}-dbg += "${libexecdir}/lxc/.debug" --1.7.9.5
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
PATCH v3 5/14 Added netcf recipe, libvirt dependency
In reply to [email protected]From: David Nyström <[email protected]>
--- recipes-networking/netcf/netcf_git.bb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 recipes-networking/netcf/netcf_git.bb
recipes-networking/netcf/netcf_git.bb new file +25 -0
@@ -0,0 +1,25 @@ +SUMMARY = "netcf" +DESCRIPTION = "netcf is a cross-platform network configuration library." +HOMEPAGE = "https://fedorahosted.org/netcf/" +SECTION = "console/tools" +LICENSE = "LGPLv2.1" + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff" + +SRCREV = "2b0d9ca226c13d7150382367f62b256bdb2db5ef" +PR = "r0" +PV = "0.2.2+git${SRCPV}" + +SRC_URI = "git://git.fedorahosted.org/netcf.git;protocol=git" + +DEPENDS += "augeas libnl libxslt libxml2" + +S = "${WORKDIR}/git" + +inherit gettext autotools + +do_configure_prepend() { + cd ${S} + ./bootstrap +} +
Signature · 1 line
1.7.9.5
PATCH v3 6/14 Added openbsd-netcat recipe, libvirt dependency
In reply to [email protected]From: David Nyström <[email protected]>
--- recipes-networking/netcat/openbsd-netcat_1.6.bb | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 recipes-networking/netcat/openbsd-netcat_1.6.bb
recipes-networking/netcat/openbsd-netcat_1.6.bb new file +29 -0
@@ -0,0 +1,29 @@ +DESCRIPTION = "OpenBSD Netcat" +HOMEPAGE = "http://code.google.com/p/openbsd-netcat/" +SECTION = "console/network" +LICENSE = "BSD-3-Clause" +PR = "r0" + +SRCREV = "5" + +SRC_URI = "svn://openbsd-netcat.googlecode.com/svn;module=trunk;protocol=http" +S = "${WORKDIR}/trunk" + +inherit update-alternatives gettext + +do_configure[noexec] = "1" + +do_compile() { + cd ${S} + oe_runmake +} + +do_install() { + install -d ${D}${bindir} + install -m 755 ${S}/nc ${D}${bindir}/nc.${BPN} +} + +ALTERNATIVE_${PN} = "nc" +ALTERNATIVE_PRIORITY = "101" + +BBCLASSEXTEND = "nativesdk"
Signature · 1 line
1.7.9.5
Re: [PATCHv3 06/14] Added openbsd-netcat recipe, libvirt dependency
Quoted 8 lines · On Thu, Dec 6, 2012 at 9:03 AM, <[email protected]> wrote:
From: David Nyström <[email protected]>
--- recipes-networking/netcat/openbsd-netcat_1.6.bb | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 recipes-networking/netcat/openbsd-netcat_1.6.bb
Random comment. I was surprised that this wasn't already in the meta-networking
layer, so I went to have a look. And indeed I don't see it.
Is that consistent with what other people see ? This seems like it could go in another
layer at some point.
At a glance, I'm not seeing the libvirt dependency. Am I overlooking it somehow ?
Cheers,
Bruce
Quoted 46 lines
(quoted diff) +0
-0openbsd-netcat_1.6.bb
new file mode 100644
index 0000000..1ae3f37recipes-networking/netcat/openbsd-netcat_1.6.bb new file +9
-0@@ -0,0 +1,29 @@ +DESCRIPTION = "OpenBSD Netcat" +HOMEPAGE = "http://code.google.com/p/openbsd-netcat/" +SECTION = "console/network" +LICENSE = "BSD-3-Clause" +PR = "r0" + +SRCREV = "5" + +SRC_URI = "svn://openbsd-netcat.googlecode.com/svn;module=trunk;protocol=http"
recipes-networking/netcat/openbsd-netcat_1.6.bb new file +20
-1+S = "${WORKDIR}/trunk" + +inherit update-alternatives gettext + +do_configure[noexec] = "1" + +do_compile() { + cd ${S} + oe_runmake +} + +do_install() { + install -d ${D}${bindir} + install -m 755 ${S}/nc ${D}${bindir}/nc.${BPN} +} + +ALTERNATIVE_${PN} = "nc" +ALTERNATIVE_PRIORITY = "101" + +BBCLASSEXTEND = "nativesdk" --1.7.9.5
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
Re: [PATCHv3 06/14] Added openbsd-netcat recipe, libvirt dependency
Quoted 19 lines · Bruce Ashfield
Quoted 8 lines · On Thu, Dec 6, 2012 at 9:03 AM, <[email protected]> wrote:
From: David Nyström <[email protected]>
--- recipes-networking/netcat/openbsd-netcat_1.6.bb | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+)create mode 100644 recipes-networking/netcat/openbsd-netcat_1.6.bb
Random comment. I was surprised that this wasn't already in the meta-networking
layer, so I went to have a look. And indeed I don't see it.Is that consistent with what other people see ? This seems like it could go in another
layer at some point.
Quoted 7 lines
At a glance, I'm not seeing the libvirt dependency. Am I overlooking it somehow ?
Cheers,
Bruce
A good explanation is here:
https://bugs.archlinux.org/task/22068
Quoted 50 lines
Quoted 47 lines
(quoted diff) +0
-0openbsd-netcat_1.6.bb
new file mode 100644
index 0000000..1ae3f37recipes-networking/netcat/openbsd-netcat_1.6.bb new file +9
-0@@ -0,0 +1,29 @@ +DESCRIPTION = "OpenBSD Netcat" +HOMEPAGE = "http://code.google.com/p/openbsd-netcat/" +SECTION = "console/network" +LICENSE = "BSD-3-Clause" +PR = "r0" + +SRCREV = "5" + +SRC_URI = "svn://openbsd-netcat.googlecode.com/svn;module=trunk;protocol=http"
recipes-networking/netcat/openbsd-netcat_1.6.bb new file +20
-1+S = "${WORKDIR}/trunk" + +inherit update-alternatives gettext + +do_configure[noexec] = "1" + +do_compile() { + cd ${S} + oe_runmake +} + +do_install() { + install -d ${D}${bindir} + install -m 755 ${S}/nc ${D}${bindir}/nc.${BPN} +} + +ALTERNATIVE_${PN} = "nc" +ALTERNATIVE_PRIORITY = "101" + +BBCLASSEXTEND = "nativesdk" --1.7.9.5
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
Re: [PATCHv3 06/14] Added openbsd-netcat recipe, libvirt dependency
Quoted 25 lines · David Nyström
Quoted 23 lines · Bruce Ashfield
On Thu, Dec 6, 2012 at 9:03 AM, <[email protected]> wrote:
From: David Nyström <[email protected]>
Quoted 8 lines
--- recipes-networking/netcat/open**bsd-netcat_1.6.bb<http://openbsd-netcat_1.6.bb>| 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+)create mode 100644 recipes-networking/netcat/open**bsd-netcat_1.6.bb<http://openbsd-netcat_1.6.bb>
Random comment. I was surprised that this wasn't already in the meta-networking
layer, so I went to have a look. And indeed I don't see it.Is that consistent with what other people see ? This seems like it could go
in another
layer at some point.At a glance, I'm not seeing the libvirt dependency. Am I overlooking it somehow ?
Quoted 9 lines
Quoted 5 lines
Cheers,
Bruce
A good explanation is here:
https://bugs.archlinux.org/**task/22068<https://bugs.archlinux.org/task/22068>
Aha. I read the shortlog as meaning something else (or maybe I'm still misunderstanding). I thought you were saying that netcat had a dependency on libvirt, but it looks like it's more of a libvirt dependency on netcat (the
way I translate things).
Cheers,
Bruce
Quoted 56 lines
Quoted 55 lines
Quoted 52 lines
(quoted diff) +0
-0recipes-networking/netcat/
openbsd-netcat_1.6.bb
new file mode 100644
index 0000000..1ae3f37recipes-networking/netcat/op**enbsd-netcat_1.6.bb<http://openbsd-netcat_1.6.bb> new file +2
-0@@ -0,0 +1,29 @@ +DESCRIPTION = "OpenBSD Netcat" +HOMEPAGE = "http://code.google.com/p/**openbsd-netcat/<http://code.google.com/p/openbsd-netcat/>"
recipes-networking/netcat/op**enbsd-netcat_1.6.bb<http://openbsd-netcat_1.6.bb> new file +7
-0+SECTION = "console/network" +LICENSE = "BSD-3-Clause" +PR = "r0" + +SRCREV = "5" + +SRC_URI = "svn://openbsd-netcat.googlecode.com/**svn;module=trunk;protocol=http<http://openbsd-netcat.googlecode.com/svn;module=trunk;protocol=http> **"
recipes-networking/netcat/op**enbsd-netcat_1.6.bb<http://openbsd-netcat_1.6.bb> new file +20
-1+S = "${WORKDIR}/trunk" + +inherit update-alternatives gettext + +do_configure[noexec] = "1" + +do_compile() { + cd ${S} + oe_runmake +} + +do_install() { + install -d ${D}${bindir} + install -m 755 ${S}/nc ${D}${bindir}/nc.${BPN} +} + +ALTERNATIVE_${PN} = "nc" +ALTERNATIVE_PRIORITY = "101" + +BBCLASSEXTEND = "nativesdk" --1.7.9.5
______________________________**_________________
meta-virtualization mailing list meta-virtualization@**yoctoproject.org<[email protected]>
https://lists.yoctoproject.**org/listinfo/meta-**virtualization<https://lists.yoctoproject.org/listinfo/meta-virtualization>
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
PATCH v3 7/14 Added openflow recipe
In reply to [email protected]From: David Nyström <[email protected]>
--- recipes-networking/openflow/openflow_1.0.bb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 recipes-networking/openflow/openflow_1.0.bb
recipes-networking/openflow/openflow_1.0.bb new file +24 -0
@@ -0,0 +1,24 @@ +SUMMARY = "OpelFlow" +DESCRIPTION = "Provide a generic framework for handling devices in userspace." +HOMEPAGE = "http://www.openflow.org" +SECTION = "networking" +LICENSE = "GPLv2" + +LIC_FILES_CHKSUM = "file://COPYING;md5=e870c934e2c3d6ccf085fd7cf0a1e2e2" + +SRCREV = "5ccca75a69f99791659bcfbcf35353ab1921320a" +PR = "r0" +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gitosis.stanford.edu/openflow.git;protocol=git" + +DEPENDS = "virtual/libc" + +EXTRA_OECONF += "KARCH=${TARGET_ARCH}" + +PACKAGECONFIG ??= "libssl" +PACKAGECONFIG[libssl] = "--enable-ssl,--disable-ssl, openssl, libssl" + +S = "${WORKDIR}/git" + +inherit autotools
Signature · 1 line
1.7.9.5
PATCH v3 8/14 Added openvswitch recipe
In reply to [email protected]From: David Nyström <[email protected]>
--- .../openvswitch/files/openvswitch-controller | 274 ++++++++++++++++++++ .../openvswitch/files/openvswitch-controller-setup | 29 +++ .../openvswitch/files/openvswitch-example | 102 ++++++++ .../openvswitch/files/openvswitch-switch | 102 ++++++++ .../openvswitch/files/openvswitch-switch-setup | 8 + .../openvswitch/openvswitch_1.4.3.bb | 99 +++++++ 6 files changed, 614 insertions(+) create mode 100755 recipes-networking/openvswitch/files/openvswitch-controller create mode 100644 recipes-networking/openvswitch/files/openvswitch-controller-setup create mode 100644 recipes-networking/openvswitch/files/openvswitch-example create mode 100644 recipes-networking/openvswitch/files/openvswitch-switch create mode 100644 recipes-networking/openvswitch/files/openvswitch-switch-setup create mode 100644 recipes-networking/openvswitch/openvswitch_1.4.3.bb
recipes-networking/openvswitch/files/openvswitch-controller new file +274 -0
@@ -0,0 +1,274 @@ +#!/bin/sh +# +# Copyright (c) 2011 Nicira Networks Inc. +# Copyright (c) 2007, 2009 Javier Fernandez-Sanguino <[email protected]> +# +# This is free software; you may redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2, +# or (at your option) any later version. +# +# This is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License with +# the Debian operating system, in /usr/share/common-licenses/GPL; if +# not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA +# +### BEGIN INIT INFO +# Provides: openvswitch-controller +# Required-Start: $network $local_fs $remote_fs +# Required-Stop: $remote_fs +# Should-Start: $named +# Should-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Open vSwitch controller +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + +DAEMON=/usr/bin/ovs-controller # Introduce the server's location here +NAME=ovs-controller # Introduce the short server's name here +DESC=ovs-controller # Introduce a short description here +LOGDIR=/var/log/openvswitch # Log directory to use + +PIDFILE=/var/run/openvswitch/$NAME.pid + +test -x $DAEMON || exit 0 + +. /lib/lsb/init-functions + +# Default options, these can be overriden by the information +# at /etc/default/openvswitch-controller +DAEMON_OPTS="" # Additional options given to the server + +DODTIME=10 # Time to wait for the server to die, in seconds + # If this value is set too low you might not + # let some servers to die gracefully and + # 'restart' will not work + +LOGFILE=$LOGDIR/$NAME.log # Server logfile +#DAEMONUSER= # User to run the daemons as. If this value + # is set start-stop-daemon will chuid the server + +# Include defaults if available +default=/etc/default/openvswitch-controller +if [ -f $default ] ; then + . $default +fi + +# Check that the user exists (if we set a user) +# Does the user exist? +if [ -n "$DAEMONUSER" ] ; then + if getent passwd | grep -q "^$DAEMONUSER:"; then + # Obtain the uid and gid + DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'` + DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'` + else + log_failure_msg "The user $DAEMONUSER, required to run $NAME does not exist." + exit 1 + fi +fi + + +set -e + +running_pid() { +# Check if a given process pid's cmdline matches a given name + pid=$1 + name=$2 + [ -z "$pid" ] && return 1 + [ ! -d /proc/$pid ] && return 1 + cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` + # Is this the expected server + [ "$cmd" != "$name" ] && return 1 + return 0 +} + +running() { +# Check if the process is running looking at /proc +# (works for all users) + + # No pidfile, probably no daemon present + [ ! -f "$PIDFILE" ] && return 1 + pid=`cat $PIDFILE` + running_pid $pid $DAEMON || return 1 + return 0 +} + +start_server() { + if [ -z "$LISTEN" ]; then + echo "$default: No connection methods configured, controller disabled" >&2 + exit 0 + fi + + if [ ! -d /var/run/openvswitch ]; then + install -d -m 755 -o root -g root /var/run/openvswitch + fi + + SSL_OPTS= + case $LISTEN in + *ssl*) + : ${PRIVKEY:=/etc/openvswitch-controller/privkey.pem} + : ${CERT:=/etc/openvswitch-controller/cert.pem} + : ${CACERT:=/etc/openvswitch-controller/cacert.pem} + if test ! -e "$PRIVKEY" || test ! -e "$CERT" || + test ! -e "$CACERT"; then + if test ! -e "$PRIVKEY"; then + echo "$PRIVKEY: private key missing" >&2 + fi + if test ! -e "$CERT"; then + echo "$CERT: certificate for private key missing" >&2 + fi + if test ! -e "$CACERT"; then + echo "$CACERT: CA certificate missing" >&2 + fi + exit 1 + fi + SSL_OPTS="--private-key=$PRIVKEY --certificate=$CERT --ca-cert=$CACERT" + ;; + esac + +# Start the process using the wrapper + if [ -z "$DAEMONUSER" ] ; then + start-stop-daemon --start --pidfile $PIDFILE \ + --exec $DAEMON -- --detach --pidfile=$PIDFILE \ + $LISTEN $DAEMON_OPTS $SSL_OPTS + errcode=$? + else +# if we are using a daemonuser then change the user id + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --chuid $DAEMONUSER --exec $DAEMON -- \ + --detach --pidfile=$PIDFILE $LISTEN $DAEMON_OPTS \ + $SSL_OPTS + errcode=$? + fi + return $errcode +} + +stop_server() { +# Stop the process using the wrapper + if [ -z "$DAEMONUSER" ] ; then + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --exec $DAEMON + errcode=$? + else +# if we are using a daemonuser then look for process that match + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --user $DAEMONUSER --exec $DAEMON + errcode=$? + fi + + return $errcode +} + +reload_server() { + [ ! -f "$PIDFILE" ] && return 1 + pid=`cat $PIDFILE` # This is the daemon's pid + # Send a SIGHUP + kill -1 $pid + return $? +} + +force_stop() { +# Force the process to die killing it manually + [ ! -e "$PIDFILE" ] && return + if running ; then + kill -15 $pid + # Is it really dead? + sleep "$DODTIME" + if running ; then + kill -9 $pid + sleep "$DODTIME" + if running ; then + echo "Cannot kill $NAME (pid=$pid)!" + exit 1 + fi + fi + fi + rm -f $PIDFILE +} + + +case "$1" in + start) + log_begin_msg "Starting $DESC " "$NAME" + # Check if it's running first + if running ; then + log_warning_msg "apparently already running" + log_end_msg 0 + exit 0 + fi + if start_server && running ; then + # It's ok, the server started and is running + log_end_msg 0 + else + # Either we could not start it or it is not running + # after we did + # NOTE: Some servers might die some time after they start, + # this code does not try to detect this and might give + # a false positive (use 'status' for that) + log_end_msg 1 + fi + ;; + stop) + log_begin_msg "Stopping $DESC" "$NAME" + if running ; then + # Only stop the server if we see it running + stop_server + log_end_msg $? + else + # If it's not running don't do anything + log_warning_msg "apparently not running" + log_end_msg 0 + exit 0 + fi + ;; + force-stop) + # First try to stop gracefully the program + $0 stop + if running; then + # If it's still running try to kill it more forcefully + log_begin_msg "Stopping (force) $DESC" "$NAME" + force_stop + log_end_msg $? + fi + ;; + restart|force-reload) + log_begin_msg "Restarting $DESC" "$NAME" + stop_server + # Wait some sensible amount, some server need this + [ -n "$DODTIME" ] && sleep $DODTIME + start_server + running + log_end_msg $? + ;; + status) + + log_begin_msg "Checking status of $DESC" "$NAME" + if running ; then + log_begin_msg "running" + log_end_msg 0 + else + log_warning_msg "apparently not running" + log_end_msg 1 + exit 1 + fi + ;; + # Use this if the daemon cannot reload + reload) + log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon" + log_warning_msg "cannot re-read the config file (use restart)." + ;; + *) + N=/etc/init.d/openvswitch-controller + echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0
recipes-networking/openvswitch/files/openvswitch-controller-setup new file +29 -0
@@ -0,0 +1,29 @@ +# This is a POSIX shell fragment -*- sh -*- + +# LISTEN: What OpenFlow connection methods should the controller listen on? +# +# This is a space-delimited list of connection methods: +# +# * "pssl:[PORT]": Listen for SSL connections on the specified PORT +# (default: 6633). The private key, certificate, and CA certificate +# must be specified below. +# +# * "pctp:[PORT]": Listen for TCP connections on the specified PORT +# (default: 6633). Not recommended for security reasons. +# +LISTEN="pssl:" + +# PRIVKEY: Name of file containing controller's private key. +# Required if SSL enabled. +PRIVKEY=/etc/openvswitch-controller/privkey.pem + +# CERT: Name of file containing certificate for private key. +# Required if SSL enabled. +CERT=/etc/openvswitch-controller/cert.pem + +# CACERT: Name of file containing switch CA certificate. +# Required if SSL enabled. +CACERT=/etc/openvswitch-controller/cacert.pem + +# Additional options to pass to controller, e.g. "--hub" +DAEMON_OPTS=""
recipes-networking/openvswitch/files/openvswitch-example new file +102 -0
102 lines not on this page · raw message
recipes-networking/openvswitch/files/openvswitch-switch new file +102 -0
102 lines not on this page · raw message
recipes-networking/openvswitch/files/openvswitch-switch-setup new file +8 -0
@@ -0,0 +1,8 @@ +# This is a POSIX shell fragment -*- sh -*- + +# FORCE_COREFILES: If 'yes' then core files will be enabled. +# FORCE_COREFILES=yes + +# BRCOMPAT: If 'yes' and the openvswitch-brcompat package is installed, then +# Linux bridge compatibility will be enabled. +# BRCOMPAT=yes
recipes-networking/openvswitch/openvswitch_1.4.3.bb new file +99 -0
99 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v3 9/14 Added .gitignore file
In reply to [email protected]From: David Nyström <[email protected]>
--- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .gitignore
.gitignore new file +6 -0
@@ -0,0 +1,6 @@ +build*/ +pyshtables.py +*.swp +*.orig +*.rej +*~
Signature · 1 line
1.7.9.5
PATCH v3 10/14 Changed David Nyströms email in README
In reply to [email protected]From: David Nyström <[email protected]>
--- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
README +1 -1
@@ -26,7 +26,7 @@ Maintenance Send pull requests, patches, comments or questions to [email protected] Maintainers: Raymond Danks <[email protected]> - David Nyström <[email protected]> + David Nyström <[email protected]> Bruce Ashfield <[email protected]> When sending single patches, please using something like:
Signature · 1 line
1.7.9.5
PATCH v3 11/14 Added template cloud-* images
In reply to [email protected]From: David Nyström <[email protected]>
--- recipes-extended/images/cloud-image-compute.bb | 14 +++++++++ recipes-extended/images/cloud-image-controller.bb | 34 +++++++++++++++++++++ recipes-extended/images/cloud-image-guest.bb | 18 +++++++++++ 3 files changed, 66 insertions(+) create mode 100644 recipes-extended/images/cloud-image-compute.bb create mode 100644 recipes-extended/images/cloud-image-controller.bb create mode 100644 recipes-extended/images/cloud-image-guest.bb
recipes-extended/images/cloud-image-compute.bb new file +14 -0
@@ -0,0 +1,14 @@ +IMAGE_FEATURES += "ssh-server-openssh" +EXTRA_IMAGE_FEATURES = "tools-debug debug-tweaks" + +IMAGE_INSTALL = "\ + ${CORE_IMAGE_BASE_INSTALL} \ + packagegroup-core-basic \ + openvswitch \ + libvirt \ + openflow \ + " + +inherit core-image + +IMAGE_FSTYPES = "tar.gz"
recipes-extended/images/cloud-image-controller.bb new file +34 -0
@@ -0,0 +1,34 @@ +IMAGE_FEATURES += "ssh-server-openssh package-management" +EXTRA_IMAGE_FEATURES = "tools-debug debug-tweaks" + +IMAGE_INSTALL = "\ + ${CORE_IMAGE_BASE_INSTALL} \ + ${ROOTFS_PKGMANAGE_BOOTSTRAP} \ + packagegroup-core-basic \ + openvswitch \ + openvswitch-controller \ + openvswitch-switch \ + openvswitch-brcompat \ + criu \ + libvirt \ + libvirt-libvirtd \ + libvirt-python \ + libvirt-virsh \ + openflow \ + qemu \ + kernel-modules \ + dhcp-client \ + perl-modules \ + grub \ + mysql5 \ + python-twisted \ + python-lxml \ + " + +inherit core-image +inherit image-vmdk + +IMAGE_FSTYPES = "vmdk tar.gz" + +# Ensure extra space for guest images +#IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
recipes-extended/images/cloud-image-guest.bb new file +18 -0
@@ -0,0 +1,18 @@ +IMAGE_FEATURES += "ssh-server-openssh package-management" +EXTRA_IMAGE_FEATURES = "tools-debug debug-tweaks" + +IMAGE_INSTALL = "\ + ${CORE_IMAGE_BASE_INSTALL} \ + ${ROOTFS_PKGMANAGE_BOOTSTRAP} \ + packagegroup-core-basic \ + openflow \ + qemu \ + kernel-modules \ + tcpdump \ + dhcp-client \ + " + +inherit core-image +inherit image-vmdk + +IMAGE_FSTYPES += "vmdk"
Signature · 1 line
1.7.9.5
PATCH v3 12/14 Added some details in README, and made the description common
In reply to [email protected]From: David Nyström <[email protected]>
--- README | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
README +5 -6
@@ -1,12 +1,8 @@ meta-xen =========== -This layer provides support for building Xen, Libvirt, and associated -packages necessary for constructing an OE-based Xen distribution. - -This layer provides support for building KVM, Libvirt, OpenvSwitch et.c. -and associated packages necessary for constructing virtualized solutions for -Openembedded based distros. +This layer provides support for building Xen, KVM, Libvirt, and associated +packages necessary for constructing OE-based virtualized solutions. Dependencies ------------
@@ -15,10 +11,13 @@ This layer depends on: URI: git://github.com/openembedded/oe-core.git branch: master revision: HEAD +prio: default URI: git://github.com/openembedded/meta-oe.git branch: master revision: HEAD +layers: meta-oe +BBFILE_PRIORITY_openembedded-layer = "4" Maintenance -----------
Signature · 1 line
1.7.9.5
PATCH v3 13/14 Upgraded to libvirt 1.0.0, and added a more detailed packageconfig
In reply to [email protected]From: David Nyström <[email protected]>
--- recipes-extended/libvirt/libvirt_1.0.0.bb | 139 +++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 recipes-extended/libvirt/libvirt_1.0.0.bb
recipes-extended/libvirt/libvirt_1.0.0.bb new file +139 -0
@@ -0,0 +1,139 @@ +DESCRIPTION = "A toolkit to interact with the virtualization capabilities of recent versions of Linux." +HOMEPAGE = "http://libvirt.org" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=fb919cc88dbe06ec0b0bd50e001ccf1f" +SECTION = "console/tools" +PR = "r2" + +DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap util-linux e2fsprogs pm-utils \ + iptables ebtables dnsmasq readline" + +# These might be included by PACKAGECONFIG +#RRECOMMENDS+= "polkit qemu yajl libnl lxc netcf" + +RDEPENDS_libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasq openbsd-netcat" +RDEPENDS_libvirt-libvirtd_append_x86-64 = " dmidecode" +RDEPENDS_libvirt-libvirtd_append_x86 = " dmidecode" + +#connman blocks the 53 port and libvirtd can't start its DNS service +RCONFLICTS_${PN}_libvirtd = "connman" + +SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.gz \ + file://libvirtd.sh \ + file://libvirtd.conf" + +SRC_URI[md5sum] = "7c8b006de7338e30866bb56738803b21" +SRC_URI[sha256sum] = "14c8a30ebfb939c82cab5f759a95d09646b43b4210e45490e92459ae65123076" + +inherit autotools gettext update-rc.d + +CACHED_CONFIGUREVARS += "\ +ac_cv_path_XMLLINT=/usr/bin/xmllint \ +ac_cv_path_XMLCATLOG=/usr/bin/xmlcatalog \ +ac_cv_path_AUGPARSE=/usr/bin/augparse \ +ac_cv_path_DNSMASQ=/usr/bin/dnsmasq \ +ac_cv_path_BRCTL=/usr/sbin/brctl \ +ac_cv_path_TC=/sbin/tc \ +ac_cv_path_UDEVADM=/sbin/udevadm \ +ac_cv_path_MODPROBE=/sbin/modprobe \ +ac_cv_path_IP_PATH=/bin/ip \ +ac_cv_path_IPTABLES_PATH=/usr/sbin/iptables \ +ac_cv_path_IP6TABLES_PATH=/usr/sbin/ip6tables \ +ac_cv_path_MOUNT=/bin/mount \ +ac_cv_path_UMOUNT=/bin/umount \ +ac_cv_path_MKFS=/usr/sbin/mkfs \ +ac_cv_path_SHOWMOUNT=/usr/sbin/showmount \ +ac_cv_path_PVCREATE=/usr/sbin/pvcreate \ +ac_cv_path_VGCREATE=/usr/sbin/vgcreate \ +ac_cv_path_LVCREATE=/usr/sbin/lvcreate \ +ac_cv_path_PVREMOVE=/usr/sbin/pvremove \ +ac_cv_path_VGREMOVE=/usr/sbin/vgremove \ +ac_cv_path_LVREMOVE=/usr/sbin/lvremove \ +ac_cv_path_LVCHANGE=/usr/sbin/lvchange \ +ac_cv_path_VGCHANGE=/usr/sbin/vgchange \ +ac_cv_path_VGSCAN=/usr/sbin/vgscan \ +ac_cv_path_PVS=/usr/sbin/pvs \ +ac_cv_path_VGS=/usr/sbin/vgs \ +ac_cv_path_LVS=/usr/sbin/lvs \ +ac_cv_path_PARTED=/usr/sbin/parted \ +ac_cv_path_DMSETUP=/usr/sbin/dmsetup" + +# Some other possible paths we are not yet setting +#ac_cv_path_RPCGEN= +#ac_cv_path_XSLTPROC= +#ac_cv_path_RADVD= +#ac_cv_path_UDEVSETTLE= +#ac_cv_path_EBTABLES_PATH= +#ac_cv_path_PKG_CONFIG= +#ac_cv_path_ac_pt_PKG_CONFIG +#ac_cv_path_PKCHECK_PATH= +#ac_cv_path_POLKIT_AUTH= +#ac_cv_path_DTRACE= +#ac_cv_path_ISCSIADM= +#ac_cv_path_MSGFMT= +#ac_cv_path_GMSGFMT= +#ac_cv_path_XGETTEXT= +#ac_cv_path_MSGMERGE= +#ac_cv_path_SCRUB= +#ac_cv_path_PYTHON= + +ALLOW_EMPTY_${PN} = "1" + +PACKAGES =+ "${PN}-libvirtd ${PN}-virsh" + +FILES_${PN}-libvirtd = "${sysconfdir}/init.d \ + ${sysconfdir}/sysctl.d \ + ${sysconfdir}/logrotate.d \ + ${sysconfdir}/libvirt/libvirtd.conf \ + ${sbindir}/libvirtd" + +FILES_${PN}-virsh = "${bindir}/virsh" +FILES_${PN} += "${libdir}/libvirt/connection-driver \ + ${datadir}/augeas \ + ${datadir}/polkit-1" + +FILES_${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug" +FILES_${PN}-staticdev += "${libdir}/*.a ${libdir}/libvirt/connection-driver/*.a" + +INITSCRIPT_PACKAGES = "${PN}-libvirtd" +INITSCRIPT_NAME_${PN}-libvirtd = "libvirtd" +INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72" + +# xen-minimal config +#PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd" + +# full config +PACKAGECONFIG ??= "qemu yajl xen libxl xen-inotify uml openvz vmware vbox esx \ + polkit lxc test remote macvtap libvirtd netcf" + +PACKAGECONFIG[qemu] = "--with-qemu,--without-qemu,qemu" +PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl" +PACKAGECONFIG[xen] = "--with-xen,--without-xen,xen" +PACKAGECONFIG[xenapi] = "--with-xenapi,--without-xenapi" +PACKAGECONFIG[libxl] = "--with-libxl=${STAGING_DIR_TARGET}/lib,--without-libxl,xen" +PACKAGECONFIG[xen-inotify] = "--with-xen-inotify,--without-xen-inotify,xen" +PACKAGECONFIG[uml] = "--with-uml, --without-uml" +PACKAGECONFIG[openvz] = "--with-openvz,--without-openvz" +PACKAGECONFIG[vmware] = "--with-vmware,--without-vmware" +PACKAGECONFIG[phyp] = "--with-phyp,--without-phyp" +PACKAGECONFIG[vbox] = "--with-vbox,--without-vbox" +PACKAGECONFIG[esx] = "--with-esx,--without-esx" +PACKAGECONFIG[hyperv] = "--with-hyperv,--without-hyperv" +PACKAGECONFIG[polkit] = "--with-polkit,--without-polkit,polkit,polkit" +PACKAGECONFIG[lxc] = "--with-lxc,--without-lxc, lxc" +PACKAGECONFIG[test] = "--with-test=yes,--with-test=no" +PACKAGECONFIG[remote] = "--with-remote,--without-remote" +PACKAGECONFIG[macvtap] = "--with-macvtap=yes,--with-macvtap=no,libnl,libnl" +PACKAGECONFIG[libvirtd] = "--with-libvirtd,--without-libvirtd" +PACKAGECONFIG[netcf] = "--with-netcf,--without-netcf,netcf,netcf" + +# Enable the Python tool support +require libvirt-python.inc + +do_install_append() { + install -d ${D}/etc/init.d + install -d ${D}/etc/libvirt + + install -m 0755 ${WORKDIR}/libvirtd.sh ${D}/etc/init.d/libvirtd + install -m 0644 ${WORKDIR}/libvirtd.conf ${D}/etc/libvirt/libvirtd.conf +}
Signature · 1 line
1.7.9.5
Re: [PATCHv3 13/14] Upgraded to libvirt 1.0.0, and added a more detailed packageconfig
Quoted 98 lines · On Thu, Dec 6, 2012 at 9:03 AM, <[email protected]> wrote:
From: David Nyström <[email protected]>
--- recipes-extended/libvirt/libvirt_1.0.0.bb | 139 +++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 recipes-extended/libvirt/libvirt_1.0.0.bb(quoted diff) +0
-0libvirt_1.0.0.bb
new file mode 100644
index 0000000..45b460arecipes-extended/libvirt/libvirt_1.0.0.bb new file +1
-0@@ -0,0 +1,139 @@ +DESCRIPTION = "A toolkit to interact with the virtualization capabilitiesof recent versions of Linux."
recipes-extended/libvirt/libvirt_1.0.0.bb new file +7
-0+HOMEPAGE = "http://libvirt.org" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=fb919cc88dbe06ec0b0bd50e001ccf1f" +SECTION = "console/tools" +PR = "r2" + +DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcaputil-linux e2fsprogs pm-utils \
recipes-extended/libvirt/libvirt_1.0.0.bb new file +6
-0+ iptables ebtables dnsmasq readline" + +# These might be included by PACKAGECONFIG +#RRECOMMENDS+= "polkit qemu yajl libnl lxc netcf" + +RDEPENDS_libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasqopenbsd-netcat"
recipes-extended/libvirt/libvirt_1.0.0.bb new file +12
-0+RDEPENDS_libvirt-libvirtd_append_x86-64 = " dmidecode" +RDEPENDS_libvirt-libvirtd_append_x86 = " dmidecode" + +#connman blocks the 53 port and libvirtd can't start its DNS service +RCONFLICTS_${PN}_libvirtd = "connman" + +SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.gz \ + file://libvirtd.sh \ + file://libvirtd.conf" + +SRC_URI[md5sum] = "7c8b006de7338e30866bb56738803b21" +SRC_URI[sha256sum] ="
14c8a30ebfb939c82cab5f759a95d09646b43b4210e45490e92459ae65123076"recipes-extended/libvirt/libvirt_1.0.0.bb new file +52
-0+ +inherit autotools gettext update-rc.d + +CACHED_CONFIGUREVARS += "\ +ac_cv_path_XMLLINT=/usr/bin/xmllint \ +ac_cv_path_XMLCATLOG=/usr/bin/xmlcatalog \ +ac_cv_path_AUGPARSE=/usr/bin/augparse \ +ac_cv_path_DNSMASQ=/usr/bin/dnsmasq \ +ac_cv_path_BRCTL=/usr/sbin/brctl \ +ac_cv_path_TC=/sbin/tc \ +ac_cv_path_UDEVADM=/sbin/udevadm \ +ac_cv_path_MODPROBE=/sbin/modprobe \ +ac_cv_path_IP_PATH=/bin/ip \ +ac_cv_path_IPTABLES_PATH=/usr/sbin/iptables \ +ac_cv_path_IP6TABLES_PATH=/usr/sbin/ip6tables \ +ac_cv_path_MOUNT=/bin/mount \ +ac_cv_path_UMOUNT=/bin/umount \ +ac_cv_path_MKFS=/usr/sbin/mkfs \ +ac_cv_path_SHOWMOUNT=/usr/sbin/showmount \ +ac_cv_path_PVCREATE=/usr/sbin/pvcreate \ +ac_cv_path_VGCREATE=/usr/sbin/vgcreate \ +ac_cv_path_LVCREATE=/usr/sbin/lvcreate \ +ac_cv_path_PVREMOVE=/usr/sbin/pvremove \ +ac_cv_path_VGREMOVE=/usr/sbin/vgremove \ +ac_cv_path_LVREMOVE=/usr/sbin/lvremove \ +ac_cv_path_LVCHANGE=/usr/sbin/lvchange \ +ac_cv_path_VGCHANGE=/usr/sbin/vgchange \ +ac_cv_path_VGSCAN=/usr/sbin/vgscan \ +ac_cv_path_PVS=/usr/sbin/pvs \ +ac_cv_path_VGS=/usr/sbin/vgs \ +ac_cv_path_LVS=/usr/sbin/lvs \ +ac_cv_path_PARTED=/usr/sbin/parted \ +ac_cv_path_DMSETUP=/usr/sbin/dmsetup" + +# Some other possible paths we are not yet setting +#ac_cv_path_RPCGEN= +#ac_cv_path_XSLTPROC= +#ac_cv_path_RADVD= +#ac_cv_path_UDEVSETTLE= +#ac_cv_path_EBTABLES_PATH= +#ac_cv_path_PKG_CONFIG= +#ac_cv_path_ac_pt_PKG_CONFIG +#ac_cv_path_PKCHECK_PATH= +#ac_cv_path_POLKIT_AUTH= +#ac_cv_path_DTRACE= +#ac_cv_path_ISCSIADM= +#ac_cv_path_MSGFMT= +#ac_cv_path_GMSGFMT= +#ac_cv_path_XGETTEXT= +#ac_cv_path_MSGMERGE= +#ac_cv_path_SCRUB= +#ac_cv_path_PYTHON=
recipes-extended/libvirt/libvirt_1.0.0.bb line 88
Quoted 10 lines
recipes-extended/libvirt/libvirt_1.0.0.bb new file +10
-0+ +ALLOW_EMPTY_${PN} = "1" + +PACKAGES =+ "${PN}-libvirtd ${PN}-virsh" + +FILES_${PN}-libvirtd = "${sysconfdir}/init.d \ + ${sysconfdir}/sysctl.d \ + ${sysconfdir}/logrotate.d \ + ${sysconfdir}/libvirt/libvirtd.conf \ + ${sbindir}/libvirtd"
What happens if libvirtd is disabled via:
PACKAGECONFIG[libvirtd] = "--with-libvirtd,--without-libvirtd"
I haven't tried it to see, but on a glance, it looks like some missing files and packaging issues.
Cheers,
Bruce
+
Quoted 43 lines
recipes-extended/libvirt/libvirt_1.0.0.bb new file +7
-0+FILES_${PN}-virsh = "${bindir}/virsh" +FILES_${PN} += "${libdir}/libvirt/connection-driver \ + ${datadir}/augeas \ + ${datadir}/polkit-1" + +FILES_${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug" +FILES_${PN}-staticdev += "${libdir}/*.a${libdir}/libvirt/connection-driver/*.a"
recipes-extended/libvirt/libvirt_1.0.0.bb new file +10
-0+ +INITSCRIPT_PACKAGES = "${PN}-libvirtd" +INITSCRIPT_NAME_${PN}-libvirtd = "libvirtd" +INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72" + +# xen-minimal config +#PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd" + +# full config +PACKAGECONFIG ??= "qemu yajl xen libxl xen-inotify uml openvz vmware vboxesx \
recipes-extended/libvirt/libvirt_1.0.0.bb new file +7
-0+ polkit lxc test remote macvtap libvirtd netcf" + +PACKAGECONFIG[qemu] = "--with-qemu,--without-qemu,qemu" +PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl" +PACKAGECONFIG[xen] = "--with-xen,--without-xen,xen" +PACKAGECONFIG[xenapi] = "--with-xenapi,--without-xenapi" +PACKAGECONFIG[libxl] ="--with-libxl=${STAGING_DIR_TARGET}/lib,--without-libxl,xen" +PACKAGECONFIG[xen-inotify] = "--with-xen-inotify,--without-xen-inotify,xen"
recipes-extended/libvirt/libvirt_1.0.0.bb new file +12
-0+PACKAGECONFIG[uml] = "--with-uml, --without-uml" +PACKAGECONFIG[openvz] = "--with-openvz,--without-openvz" +PACKAGECONFIG[vmware] = "--with-vmware,--without-vmware" +PACKAGECONFIG[phyp] = "--with-phyp,--without-phyp" +PACKAGECONFIG[vbox] = "--with-vbox,--without-vbox" +PACKAGECONFIG[esx] = "--with-esx,--without-esx" +PACKAGECONFIG[hyperv] = "--with-hyperv,--without-hyperv" +PACKAGECONFIG[polkit] = "--with-polkit,--without-polkit,polkit,polkit" +PACKAGECONFIG[lxc] = "--with-lxc,--without-lxc, lxc" +PACKAGECONFIG[test] = "--with-test=yes,--with-test=no" +PACKAGECONFIG[remote] = "--with-remote,--without-remote" +PACKAGECONFIG[macvtap] ="--with-macvtap=yes,--with-macvtap=no,libnl,libnl"
recipes-extended/libvirt/libvirt_1.0.0.bb line 128
Quoted 2 lines
recipes-extended/libvirt/libvirt_1.0.0.bb new file +2
-0+PACKAGECONFIG[libvirtd] = "--with-libvirtd,--without-libvirtd" +PACKAGECONFIG[netcf] = "--with-netcf,--without-netcf,netcf,netcf"
Another random questions. I've got some other libvirt recipes kicking around, and
is it generally frowned upon to trigger options via DISTRO_FEATURES vs PACKAGECONFIG ? I'm thinking of bigger scale features like selinux, which are
decided on a distro basis.
Cheers,
Bruce
Quoted 20 lines
recipes-extended/libvirt/libvirt_1.0.0.bb new file +10
-0+ +# Enable the Python tool support +require libvirt-python.inc + +do_install_append() { + install -d ${D}/etc/init.d + install -d ${D}/etc/libvirt + + install -m 0755 ${WORKDIR}/libvirtd.sh ${D}/etc/init.d/libvirtd + install -m 0644 ${WORKDIR}/libvirtd.conf
${D}/etc/libvirt/libvirtd.conf
+}
--
1.7.9.5_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
Re: [PATCHv3 13/14] Upgraded to libvirt 1.0.0, and added a more detailed packageconfig
Quoted 113 lines · Bruce Ashfield
Quoted 98 lines · On Thu, Dec 6, 2012 at 9:03 AM, <[email protected]> wrote:
From: David Nyström <[email protected]>
--- recipes-extended/libvirt/libvirt_1.0.0.bb | 139 +++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+)create mode 100644 recipes-extended/libvirt/libvirt_1.0.0.bb
(quoted diff) +0
-0libvirt_1.0.0.bb
new file mode 100644
index 0000000..45b460arecipes-extended/libvirt/libvirt_1.0.0.bb new file +1
-0@@ -0,0 +1,139 @@ +DESCRIPTION = "A toolkit to interact with the virtualization capabilitiesof recent versions of Linux."
recipes-extended/libvirt/libvirt_1.0.0.bb new file +7
-0+HOMEPAGE = "http://libvirt.org" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=fb919cc88dbe06ec0b0bd50e001ccf1f" +SECTION = "console/tools" +PR = "r2" + +DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcaputil-linux e2fsprogs pm-utils \
recipes-extended/libvirt/libvirt_1.0.0.bb new file +6
-0+ iptables ebtables dnsmasq readline" + +# These might be included by PACKAGECONFIG +#RRECOMMENDS+= "polkit qemu yajl libnl lxc netcf" + +RDEPENDS_libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasqopenbsd-netcat"
recipes-extended/libvirt/libvirt_1.0.0.bb new file +12
-0+RDEPENDS_libvirt-libvirtd_append_x86-64 = " dmidecode" +RDEPENDS_libvirt-libvirtd_append_x86 = " dmidecode" + +#connman blocks the 53 port and libvirtd can't start its DNS service +RCONFLICTS_${PN}_libvirtd = "connman" + +SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.gz \ + file://libvirtd.sh \ + file://libvirtd.conf" + +SRC_URI[md5sum] = "7c8b006de7338e30866bb56738803b21" +SRC_URI[sha256sum] ="
14c8a30ebfb939c82cab5f759a95d09646b43b4210e45490e92459ae65123076"recipes-extended/libvirt/libvirt_1.0.0.bb new file +52
-0+ +inherit autotools gettext update-rc.d + +CACHED_CONFIGUREVARS += "\ +ac_cv_path_XMLLINT=/usr/bin/xmllint \ +ac_cv_path_XMLCATLOG=/usr/bin/xmlcatalog \ +ac_cv_path_AUGPARSE=/usr/bin/augparse \ +ac_cv_path_DNSMASQ=/usr/bin/dnsmasq \ +ac_cv_path_BRCTL=/usr/sbin/brctl \ +ac_cv_path_TC=/sbin/tc \ +ac_cv_path_UDEVADM=/sbin/udevadm \ +ac_cv_path_MODPROBE=/sbin/modprobe \ +ac_cv_path_IP_PATH=/bin/ip \ +ac_cv_path_IPTABLES_PATH=/usr/sbin/iptables \ +ac_cv_path_IP6TABLES_PATH=/usr/sbin/ip6tables \ +ac_cv_path_MOUNT=/bin/mount \ +ac_cv_path_UMOUNT=/bin/umount \ +ac_cv_path_MKFS=/usr/sbin/mkfs \ +ac_cv_path_SHOWMOUNT=/usr/sbin/showmount \ +ac_cv_path_PVCREATE=/usr/sbin/pvcreate \ +ac_cv_path_VGCREATE=/usr/sbin/vgcreate \ +ac_cv_path_LVCREATE=/usr/sbin/lvcreate \ +ac_cv_path_PVREMOVE=/usr/sbin/pvremove \ +ac_cv_path_VGREMOVE=/usr/sbin/vgremove \ +ac_cv_path_LVREMOVE=/usr/sbin/lvremove \ +ac_cv_path_LVCHANGE=/usr/sbin/lvchange \ +ac_cv_path_VGCHANGE=/usr/sbin/vgchange \ +ac_cv_path_VGSCAN=/usr/sbin/vgscan \ +ac_cv_path_PVS=/usr/sbin/pvs \ +ac_cv_path_VGS=/usr/sbin/vgs \ +ac_cv_path_LVS=/usr/sbin/lvs \ +ac_cv_path_PARTED=/usr/sbin/parted \ +ac_cv_path_DMSETUP=/usr/sbin/dmsetup" + +# Some other possible paths we are not yet setting +#ac_cv_path_RPCGEN= +#ac_cv_path_XSLTPROC= +#ac_cv_path_RADVD= +#ac_cv_path_UDEVSETTLE= +#ac_cv_path_EBTABLES_PATH= +#ac_cv_path_PKG_CONFIG= +#ac_cv_path_ac_pt_PKG_CONFIG +#ac_cv_path_PKCHECK_PATH= +#ac_cv_path_POLKIT_AUTH= +#ac_cv_path_DTRACE= +#ac_cv_path_ISCSIADM= +#ac_cv_path_MSGFMT= +#ac_cv_path_GMSGFMT= +#ac_cv_path_XGETTEXT= +#ac_cv_path_MSGMERGE= +#ac_cv_path_SCRUB= +#ac_cv_path_PYTHON=recipes-extended/libvirt/libvirt_1.0.0.bb line 88
Quoted 10 lines
recipes-extended/libvirt/libvirt_1.0.0.bb new file +10
-0+ +ALLOW_EMPTY_${PN} = "1" + +PACKAGES =+ "${PN}-libvirtd ${PN}-virsh" + +FILES_${PN}-libvirtd = "${sysconfdir}/init.d \ + ${sysconfdir}/sysctl.d \ + ${sysconfdir}/logrotate.d \ + ${sysconfdir}/libvirt/libvirtd.conf \ + ${sbindir}/libvirtd"What happens if libvirtd is disabled via:
Quoted 8 lines
PACKAGECONFIG[libvirtd] = "--with-libvirtd,--without-libvirtd"
I haven't tried it to see, but on a glance, it looks like some missing files and packaging issues.
Cheers,
Bruce
I assume your suggested solution for this would be to ALLOW_EMPTY_${PN}-libvirtd = "1". Not good for QA, but do we have any other options ?
Quoted 55 lines
+
Quoted 43 lines
recipes-extended/libvirt/libvirt_1.0.0.bb new file +7
-0+FILES_${PN}-virsh = "${bindir}/virsh" +FILES_${PN} += "${libdir}/libvirt/connection-driver \ + ${datadir}/augeas \ + ${datadir}/polkit-1" + +FILES_${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug" +FILES_${PN}-staticdev += "${libdir}/*.a${libdir}/libvirt/connection-driver/*.a"
recipes-extended/libvirt/libvirt_1.0.0.bb new file +10
-0+ +INITSCRIPT_PACKAGES = "${PN}-libvirtd" +INITSCRIPT_NAME_${PN}-libvirtd = "libvirtd" +INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72" + +# xen-minimal config +#PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd" + +# full config +PACKAGECONFIG ??= "qemu yajl xen libxl xen-inotify uml openvz vmware vboxesx \
recipes-extended/libvirt/libvirt_1.0.0.bb new file +7
-0+ polkit lxc test remote macvtap libvirtd netcf" + +PACKAGECONFIG[qemu] = "--with-qemu,--without-qemu,qemu" +PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl" +PACKAGECONFIG[xen] = "--with-xen,--without-xen,xen" +PACKAGECONFIG[xenapi] = "--with-xenapi,--without-xenapi" +PACKAGECONFIG[libxl] ="--with-libxl=${STAGING_DIR_TARGET}/lib,--without-libxl,xen" +PACKAGECONFIG[xen-inotify] = "--with-xen-inotify,--without-xen-inotify,xen"
recipes-extended/libvirt/libvirt_1.0.0.bb new file +12
-0+PACKAGECONFIG[uml] = "--with-uml, --without-uml" +PACKAGECONFIG[openvz] = "--with-openvz,--without-openvz" +PACKAGECONFIG[vmware] = "--with-vmware,--without-vmware" +PACKAGECONFIG[phyp] = "--with-phyp,--without-phyp" +PACKAGECONFIG[vbox] = "--with-vbox,--without-vbox" +PACKAGECONFIG[esx] = "--with-esx,--without-esx" +PACKAGECONFIG[hyperv] = "--with-hyperv,--without-hyperv" +PACKAGECONFIG[polkit] = "--with-polkit,--without-polkit,polkit,polkit" +PACKAGECONFIG[lxc] = "--with-lxc,--without-lxc, lxc" +PACKAGECONFIG[test] = "--with-test=yes,--with-test=no" +PACKAGECONFIG[remote] = "--with-remote,--without-remote" +PACKAGECONFIG[macvtap] ="--with-macvtap=yes,--with-macvtap=no,libnl,libnl"
recipes-extended/libvirt/libvirt_1.0.0.bb line 128
Quoted 2 lines
recipes-extended/libvirt/libvirt_1.0.0.bb new file +2
-0+PACKAGECONFIG[libvirtd] = "--with-libvirtd,--without-libvirtd" +PACKAGECONFIG[netcf] = "--with-netcf,--without-netcf,netcf,netcf"Another random questions. I've got some other libvirt recipes kicking around, and
is it generally frowned upon to trigger options viaDISTRO_FEATURESvs PACKAGECONFIG ? I'm thinking of bigger scale features like selinux, which are
decided on a distro basis.
Quoted 3 lines
Cheers,
Bruce
Thats a good question, CC:ing RP who added the feature in 1.3.
Don't know whats generally frowned upon by the community, I see PACKAGECONFIG as a more fine granular way of doing this. Alot of packages in oe-core do a R/DEPENDS split with:
DEPENDS += ${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxtst libice libsm libxcb gtk+', '', d)}"
I see no reason for why DISTRO_FEATURES can't select a PACKAGECONFIG setup instead. I'm guessing that's why it was added. i.e.
PACKAGECONFIG += ${@base_contains('DISTRO_FEATURES', 'kvm', 'qemu yajl', '', d)}"
Quoted 32 lines
Quoted 17 lines
recipes-extended/libvirt/libvirt_1.0.0.bb new file +10
-0+ +# Enable the Python tool support +require libvirt-python.inc + +do_install_append() { + install -d ${D}/etc/init.d + install -d ${D}/etc/libvirt + + install -m 0755 ${WORKDIR}/libvirtd.sh ${D}/etc/init.d/libvirtd + install -m 0644 ${WORKDIR}/libvirtd.conf
${D}/etc/libvirt/libvirtd.conf
+}
--
1.7.9.5Quoted 5 lines
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
Re: [PATCHv3 13/14] Upgraded to libvirt 1.0.0, and added a more detailed packageconfig
Quoted 199 lines · David Nyström
Quoted 118 lines · Bruce Ashfield
Quoted 101 lines · On Thu, Dec 6, 2012 at 9:03 AM, <[email protected]> wrote:
From: David Nyström <[email protected]>
--- recipes-extended/libvirt/libvirt_1.0.0.bb | 139 +++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+)create mode 100644 recipes-extended/libvirt/libvirt_1.0.0.bb
diff --git a/recipes-extended/libvirt/libvirt_1.0.0.bbb/recipes-extended/libvirt/ libvirt_1.0.0.bb
new file mode 100644
index 0000000..45b460arecipes-extended/libvirt/libvirt_1.0.0.bb new file +1
-0@@ -0,0 +1,139 @@ +DESCRIPTION = "A toolkit to interact with the virtualizationcapabilities
of recent versions of Linux."recipes-extended/libvirt/libvirt_1.0.0.bb new file +3
-0+HOMEPAGE = "http://libvirt.org" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM ="file://COPYING;md5=fb919cc88dbe06ec0b0bd50e001ccf1f"
recipes-extended/libvirt/libvirt_1.0.0.bb new file +4
-0+SECTION = "console/tools" +PR = "r2" + +DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcaputil-linux e2fsprogs pm-utils \
recipes-extended/libvirt/libvirt_1.0.0.bb new file +6
-0+ iptables ebtables dnsmasq readline" + +# These might be included by PACKAGECONFIG +#RRECOMMENDS+= "polkit qemu yajl libnl lxc netcf" + +RDEPENDS_libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasqopenbsd-netcat"
recipes-extended/libvirt/libvirt_1.0.0.bb new file +12
-0+RDEPENDS_libvirt-libvirtd_append_x86-64 = " dmidecode" +RDEPENDS_libvirt-libvirtd_append_x86 = " dmidecode" + +#connman blocks the 53 port and libvirtd can't start its DNS service +RCONFLICTS_${PN}_libvirtd = "connman" + +SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.gz \ + file://libvirtd.sh \ + file://libvirtd.conf" + +SRC_URI[md5sum] = "7c8b006de7338e30866bb56738803b21" +SRC_URI[sha256sum] ="
14c8a30ebfb939c82cab5f759a95d09646b43b4210e45490e92459ae65123076"recipes-extended/libvirt/libvirt_1.0.0.bb new file +52
-0+ +inherit autotools gettext update-rc.d + +CACHED_CONFIGUREVARS += "\ +ac_cv_path_XMLLINT=/usr/bin/xmllint \ +ac_cv_path_XMLCATLOG=/usr/bin/xmlcatalog \ +ac_cv_path_AUGPARSE=/usr/bin/augparse \ +ac_cv_path_DNSMASQ=/usr/bin/dnsmasq \ +ac_cv_path_BRCTL=/usr/sbin/brctl \ +ac_cv_path_TC=/sbin/tc \ +ac_cv_path_UDEVADM=/sbin/udevadm \ +ac_cv_path_MODPROBE=/sbin/modprobe \ +ac_cv_path_IP_PATH=/bin/ip \ +ac_cv_path_IPTABLES_PATH=/usr/sbin/iptables \ +ac_cv_path_IP6TABLES_PATH=/usr/sbin/ip6tables \ +ac_cv_path_MOUNT=/bin/mount \ +ac_cv_path_UMOUNT=/bin/umount \ +ac_cv_path_MKFS=/usr/sbin/mkfs \ +ac_cv_path_SHOWMOUNT=/usr/sbin/showmount \ +ac_cv_path_PVCREATE=/usr/sbin/pvcreate \ +ac_cv_path_VGCREATE=/usr/sbin/vgcreate \ +ac_cv_path_LVCREATE=/usr/sbin/lvcreate \ +ac_cv_path_PVREMOVE=/usr/sbin/pvremove \ +ac_cv_path_VGREMOVE=/usr/sbin/vgremove \ +ac_cv_path_LVREMOVE=/usr/sbin/lvremove \ +ac_cv_path_LVCHANGE=/usr/sbin/lvchange \ +ac_cv_path_VGCHANGE=/usr/sbin/vgchange \ +ac_cv_path_VGSCAN=/usr/sbin/vgscan \ +ac_cv_path_PVS=/usr/sbin/pvs \ +ac_cv_path_VGS=/usr/sbin/vgs \ +ac_cv_path_LVS=/usr/sbin/lvs \ +ac_cv_path_PARTED=/usr/sbin/parted \ +ac_cv_path_DMSETUP=/usr/sbin/dmsetup" + +# Some other possible paths we are not yet setting +#ac_cv_path_RPCGEN= +#ac_cv_path_XSLTPROC= +#ac_cv_path_RADVD= +#ac_cv_path_UDEVSETTLE= +#ac_cv_path_EBTABLES_PATH= +#ac_cv_path_PKG_CONFIG= +#ac_cv_path_ac_pt_PKG_CONFIG +#ac_cv_path_PKCHECK_PATH= +#ac_cv_path_POLKIT_AUTH= +#ac_cv_path_DTRACE= +#ac_cv_path_ISCSIADM= +#ac_cv_path_MSGFMT= +#ac_cv_path_GMSGFMT= +#ac_cv_path_XGETTEXT= +#ac_cv_path_MSGMERGE= +#ac_cv_path_SCRUB= +#ac_cv_path_PYTHON=recipes-extended/libvirt/libvirt_1.0.0.bb line 88
Quoted 10 lines
recipes-extended/libvirt/libvirt_1.0.0.bb new file +10
-0+ +ALLOW_EMPTY_${PN} = "1" + +PACKAGES =+ "${PN}-libvirtd ${PN}-virsh" + +FILES_${PN}-libvirtd = "${sysconfdir}/init.d \ + ${sysconfdir}/sysctl.d \ + ${sysconfdir}/logrotate.d \ + ${sysconfdir}/libvirt/libvirtd.conf \ + ${sbindir}/libvirtd"What happens if libvirtd is disabled via:
PACKAGECONFIG[libvirtd] = "--with-libvirtd,--without-libvirtd"
Quoted 7 lines
I haven't tried it to see, but on a glance, it looks like some missing files
and packaging issues.Cheers,
Bruce
I assume your suggested solution for this would be to ALLOW_EMPTY_${PN}-libvirtd = "1".
Not good for QA, but do we have any other options ?Quoted 56 lines
+
Quoted 44 lines
recipes-extended/libvirt/libvirt_1.0.0.bb new file +7
-0+FILES_${PN}-virsh = "${bindir}/virsh" +FILES_${PN} += "${libdir}/libvirt/connection-driver \ + ${datadir}/augeas \ + ${datadir}/polkit-1" + +FILES_${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug" +FILES_${PN}-staticdev += "${libdir}/*.a${libdir}/libvirt/connection-driver/*.a"
recipes-extended/libvirt/libvirt_1.0.0.bb new file +10
-0+ +INITSCRIPT_PACKAGES = "${PN}-libvirtd" +INITSCRIPT_NAME_${PN}-libvirtd = "libvirtd" +INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72" + +# xen-minimal config +#PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd" + +# full config +PACKAGECONFIG ??= "qemu yajl xen libxl xen-inotify uml openvz vmwarevbox
esx \recipes-extended/libvirt/libvirt_1.0.0.bb new file +7
-0+ polkit lxc test remote macvtap libvirtd netcf" + +PACKAGECONFIG[qemu] = "--with-qemu,--without-qemu,qemu" +PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl" +PACKAGECONFIG[xen] = "--with-xen,--without-xen,xen" +PACKAGECONFIG[xenapi] = "--with-xenapi,--without-xenapi" +PACKAGECONFIG[libxl] ="--with-libxl=${STAGING_DIR_TARGET}/lib,--without-libxl,xen" +PACKAGECONFIG[xen-inotify] = "--with-xen-inotify,--without-xen-inotify,xen"
recipes-extended/libvirt/libvirt_1.0.0.bb new file +12
-0+PACKAGECONFIG[uml] = "--with-uml, --without-uml" +PACKAGECONFIG[openvz] = "--with-openvz,--without-openvz" +PACKAGECONFIG[vmware] = "--with-vmware,--without-vmware" +PACKAGECONFIG[phyp] = "--with-phyp,--without-phyp" +PACKAGECONFIG[vbox] = "--with-vbox,--without-vbox" +PACKAGECONFIG[esx] = "--with-esx,--without-esx" +PACKAGECONFIG[hyperv] = "--with-hyperv,--without-hyperv" +PACKAGECONFIG[polkit] = "--with-polkit,--without-polkit,polkit,polkit" +PACKAGECONFIG[lxc] = "--with-lxc,--without-lxc, lxc" +PACKAGECONFIG[test] = "--with-test=yes,--with-test=no" +PACKAGECONFIG[remote] = "--with-remote,--without-remote" +PACKAGECONFIG[macvtap] ="--with-macvtap=yes,--with-macvtap=no,libnl,libnl"
recipes-extended/libvirt/libvirt_1.0.0.bb line 128
Quoted 2 lines
recipes-extended/libvirt/libvirt_1.0.0.bb new file +2
-0+PACKAGECONFIG[libvirtd] = "--with-libvirtd,--without-libvirtd" +PACKAGECONFIG[netcf] = "--with-netcf,--without-netcf,netcf,netcf"Another random questions. I've got some other libvirt recipes kicking around, and
is it generally frowned upon to trigger options viaDISTRO_FEATURESvs PACKAGECONFIG ? I'm thinking of bigger scale features like selinux, which are
decided on a distro basis.Quoted 3 lines
Cheers,
Bruce
Thats a good question, CC:ing RP who added the feature in 1.3.
Don't know whats generally frowned upon by the community, I see PACKAGECONFIG as a more fine granular way of doing this. Alot of packages in oe-core do a R/DEPENDS split with:
Quoted 9 lines
DEPENDS += ${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxtst libice libsm libxcb gtk+', '', d)}"
I see no reason for why
DISTRO_FEATUREScan't select a PACKAGECONFIG setup instead. I'm guessing that's why it was added. i.e.PACKAGECONFIG += ${@base_contains('DISTRO_FEATURES', 'kvm', 'qemu yajl', '', d)}"
Exactly, DISTRO_FEATURES can enable local PACKAGECONFIG items, DISTRO_FEAUTRES is more of a GLOBAL (DISTRO) setting.
On a different note, will there be plans to remove the older libvirt recipe? Is there a reason it needs to be kept around?
In the Yocto Project, we try not to keep older versions of recipes unless required because of license changes from GPLv2 -> GPLv3.
Sau!
Quoted 37 lines
Quoted 18 lines
Quoted 18 lines
recipes-extended/libvirt/libvirt_1.0.0.bb new file +10
-0+ +# Enable the Python tool support +require libvirt-python.inc + +do_install_append() { + install -d ${D}/etc/init.d + install -d ${D}/etc/libvirt + + install -m 0755 ${WORKDIR}/libvirtd.sh ${D}/etc/init.d/libvirtd + install -m 0644 ${WORKDIR}/libvirtd.conf
${D}/etc/libvirt/libvirtd.conf
+}
--
1.7.9.5Quoted 15 lines
Quoted 5 lines
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
Re: [PATCHv3 13/14] Upgraded to libvirt 1.0.0, and added a more detailed packageconfig
Quoted 210 lines · Saul Wold
Quoted 200 lines · David Nyström
Quoted 118 lines · Bruce Ashfield
Quoted 101 lines · On Thu, Dec 6, 2012 at 9:03 AM, <[email protected]> wrote:
From: David Nyström <[email protected]>
--- recipes-extended/libvirt/libvirt_1.0.0.bb | 139 +++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+)create mode 100644 recipes-extended/libvirt/libvirt_1.0.0.bb
diff --git a/recipes-extended/libvirt/libvirt_1.0.0.bbb/recipes-extended/libvirt/ libvirt_1.0.0.bb
new file mode 100644
index 0000000..45b460arecipes-extended/libvirt/libvirt_1.0.0.bb new file +1
-0@@ -0,0 +1,139 @@ +DESCRIPTION = "A toolkit to interact with the virtualizationcapabilities
of recent versions of Linux."recipes-extended/libvirt/libvirt_1.0.0.bb new file +3
-0+HOMEPAGE = "http://libvirt.org" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM ="file://COPYING;md5=fb919cc88dbe06ec0b0bd50e001ccf1f"
recipes-extended/libvirt/libvirt_1.0.0.bb new file +4
-0+SECTION = "console/tools" +PR = "r2" + +DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcaputil-linux e2fsprogs pm-utils \
recipes-extended/libvirt/libvirt_1.0.0.bb new file +6
-0+ iptables ebtables dnsmasq readline" + +# These might be included by PACKAGECONFIG +#RRECOMMENDS+= "polkit qemu yajl libnl lxc netcf" + +RDEPENDS_libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasqopenbsd-netcat"
recipes-extended/libvirt/libvirt_1.0.0.bb new file +12
-0+RDEPENDS_libvirt-libvirtd_append_x86-64 = " dmidecode" +RDEPENDS_libvirt-libvirtd_append_x86 = " dmidecode" + +#connman blocks the 53 port and libvirtd can't start its DNS service +RCONFLICTS_${PN}_libvirtd = "connman" + +SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.gz \ + file://libvirtd.sh \ + file://libvirtd.conf" + +SRC_URI[md5sum] = "7c8b006de7338e30866bb56738803b21" +SRC_URI[sha256sum] ="
14c8a30ebfb939c82cab5f759a95d09646b43b4210e45490e92459ae65123076"recipes-extended/libvirt/libvirt_1.0.0.bb new file +52
-0+ +inherit autotools gettext update-rc.d + +CACHED_CONFIGUREVARS += "\ +ac_cv_path_XMLLINT=/usr/bin/xmllint \ +ac_cv_path_XMLCATLOG=/usr/bin/xmlcatalog \ +ac_cv_path_AUGPARSE=/usr/bin/augparse \ +ac_cv_path_DNSMASQ=/usr/bin/dnsmasq \ +ac_cv_path_BRCTL=/usr/sbin/brctl \ +ac_cv_path_TC=/sbin/tc \ +ac_cv_path_UDEVADM=/sbin/udevadm \ +ac_cv_path_MODPROBE=/sbin/modprobe \ +ac_cv_path_IP_PATH=/bin/ip \ +ac_cv_path_IPTABLES_PATH=/usr/sbin/iptables \ +ac_cv_path_IP6TABLES_PATH=/usr/sbin/ip6tables \ +ac_cv_path_MOUNT=/bin/mount \ +ac_cv_path_UMOUNT=/bin/umount \ +ac_cv_path_MKFS=/usr/sbin/mkfs \ +ac_cv_path_SHOWMOUNT=/usr/sbin/showmount \ +ac_cv_path_PVCREATE=/usr/sbin/pvcreate \ +ac_cv_path_VGCREATE=/usr/sbin/vgcreate \ +ac_cv_path_LVCREATE=/usr/sbin/lvcreate \ +ac_cv_path_PVREMOVE=/usr/sbin/pvremove \ +ac_cv_path_VGREMOVE=/usr/sbin/vgremove \ +ac_cv_path_LVREMOVE=/usr/sbin/lvremove \ +ac_cv_path_LVCHANGE=/usr/sbin/lvchange \ +ac_cv_path_VGCHANGE=/usr/sbin/vgchange \ +ac_cv_path_VGSCAN=/usr/sbin/vgscan \ +ac_cv_path_PVS=/usr/sbin/pvs \ +ac_cv_path_VGS=/usr/sbin/vgs \ +ac_cv_path_LVS=/usr/sbin/lvs \ +ac_cv_path_PARTED=/usr/sbin/parted \ +ac_cv_path_DMSETUP=/usr/sbin/dmsetup" + +# Some other possible paths we are not yet setting +#ac_cv_path_RPCGEN= +#ac_cv_path_XSLTPROC= +#ac_cv_path_RADVD= +#ac_cv_path_UDEVSETTLE= +#ac_cv_path_EBTABLES_PATH= +#ac_cv_path_PKG_CONFIG= +#ac_cv_path_ac_pt_PKG_CONFIG +#ac_cv_path_PKCHECK_PATH= +#ac_cv_path_POLKIT_AUTH= +#ac_cv_path_DTRACE= +#ac_cv_path_ISCSIADM= +#ac_cv_path_MSGFMT= +#ac_cv_path_GMSGFMT= +#ac_cv_path_XGETTEXT= +#ac_cv_path_MSGMERGE= +#ac_cv_path_SCRUB= +#ac_cv_path_PYTHON=recipes-extended/libvirt/libvirt_1.0.0.bb line 88
Quoted 10 lines
recipes-extended/libvirt/libvirt_1.0.0.bb new file +10
-0+ +ALLOW_EMPTY_${PN} = "1" + +PACKAGES =+ "${PN}-libvirtd ${PN}-virsh" + +FILES_${PN}-libvirtd = "${sysconfdir}/init.d \ + ${sysconfdir}/sysctl.d \ + ${sysconfdir}/logrotate.d \ + ${sysconfdir}/libvirt/libvirtd.conf \ + ${sbindir}/libvirtd"What happens if libvirtd is disabled via:
PACKAGECONFIG[libvirtd] = "--with-libvirtd,--without-libvirtd"
Quoted 7 lines
I haven't tried it to see, but on a glance, it looks like some missing files
and packaging issues.Cheers,
Bruce
I assume your suggested solution for this would be to ALLOW_EMPTY_${PN}-libvirtd = "1".
Not good for QA, but do we have any other options ?Quoted 57 lines
+
Quoted 44 lines
recipes-extended/libvirt/libvirt_1.0.0.bb new file +7
-0+FILES_${PN}-virsh = "${bindir}/virsh" +FILES_${PN} += "${libdir}/libvirt/connection-driver \ + ${datadir}/augeas \ + ${datadir}/polkit-1" + +FILES_${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug" +FILES_${PN}-staticdev += "${libdir}/*.a${libdir}/libvirt/connection-driver/*.a"
recipes-extended/libvirt/libvirt_1.0.0.bb new file +10
-0+ +INITSCRIPT_PACKAGES = "${PN}-libvirtd" +INITSCRIPT_NAME_${PN}-libvirtd = "libvirtd" +INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72" + +# xen-minimal config +#PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd" + +# full config +PACKAGECONFIG ??= "qemu yajl xen libxl xen-inotify uml openvz vmwarevbox
esx \recipes-extended/libvirt/libvirt_1.0.0.bb new file +7
-0+ polkit lxc test remote macvtap libvirtd netcf" + +PACKAGECONFIG[qemu] = "--with-qemu,--without-qemu,qemu" +PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl" +PACKAGECONFIG[xen] = "--with-xen,--without-xen,xen" +PACKAGECONFIG[xenapi] = "--with-xenapi,--without-xenapi" +PACKAGECONFIG[libxl] ="--with-libxl=${STAGING_DIR_TARGET}/lib,--without-libxl,xen" +PACKAGECONFIG[xen-inotify] = "--with-xen-inotify,--without-xen-inotify,xen"
recipes-extended/libvirt/libvirt_1.0.0.bb new file +12
-0+PACKAGECONFIG[uml] = "--with-uml, --without-uml" +PACKAGECONFIG[openvz] = "--with-openvz,--without-openvz" +PACKAGECONFIG[vmware] = "--with-vmware,--without-vmware" +PACKAGECONFIG[phyp] = "--with-phyp,--without-phyp" +PACKAGECONFIG[vbox] = "--with-vbox,--without-vbox" +PACKAGECONFIG[esx] = "--with-esx,--without-esx" +PACKAGECONFIG[hyperv] = "--with-hyperv,--without-hyperv" +PACKAGECONFIG[polkit] = "--with-polkit,--without-polkit,polkit,polkit" +PACKAGECONFIG[lxc] = "--with-lxc,--without-lxc, lxc" +PACKAGECONFIG[test] = "--with-test=yes,--with-test=no" +PACKAGECONFIG[remote] = "--with-remote,--without-remote" +PACKAGECONFIG[macvtap] ="--with-macvtap=yes,--with-macvtap=no,libnl,libnl"
recipes-extended/libvirt/libvirt_1.0.0.bb line 128
Quoted 2 lines
recipes-extended/libvirt/libvirt_1.0.0.bb new file +2
-0+PACKAGECONFIG[libvirtd] = "--with-libvirtd,--without-libvirtd" +PACKAGECONFIG[netcf] = "--with-netcf,--without-netcf,netcf,netcf"Another random questions. I've got some other libvirt recipes kicking around, and
is it generally frowned upon to trigger options viaDISTRO_FEATURESvs PACKAGECONFIG ? I'm thinking of bigger scale features like selinux, which
are
decided on a distro basis.Quoted 3 lines
Cheers,
Bruce
Thats a good question, CC:ing RP who added the feature in 1.3.
Don't know whats generally frowned upon by the community, I see PACKAGECONFIG as a more fine granular way of doing this. Alot of packages in oe-core do a R/DEPENDS split with:
Quoted 9 lines
DEPENDS += ${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxtst libice libsm libxcb gtk+', '', d)}"
I see no reason for why
DISTRO_FEATUREScan't select a PACKAGECONFIG setup instead. I'm guessing that's why it was added. i.e.PACKAGECONFIG += ${@base_contains('DISTRO_FEATURES', 'kvm', 'qemu yajl', '', d)}"
Quoted 8 lines
Exactly,
DISTRO_FEATUREScan enable local PACKAGECONFIG items,DISTRO_FEAUTRESis more of a GLOBAL (DISTRO) setting.On a different note, will there be plans to remove the older libvirt recipe? Is there a reason it needs to be kept around?
In the Yocto Project, we try not to keep older versions of recipes unless required because of license changes from GPLv2 -> GPLv3.
Yes, removing it in v4.
Quoted 39 lines
Sau!
Quoted 37 lines
Quoted 18 lines
Quoted 18 lines
recipes-extended/libvirt/libvirt_1.0.0.bb new file +10
-0+ +# Enable the Python tool support +require libvirt-python.inc + +do_install_append() { + install -d ${D}/etc/init.d + install -d ${D}/etc/libvirt + + install -m 0755 ${WORKDIR}/libvirtd.sh ${D}/etc/init.d/libvirtd + install -m 0644 ${WORKDIR}/libvirtd.conf
${D}/etc/libvirt/libvirtd.conf
+}
--
1.7.9.5Quoted 15 lines
Quoted 5 lines
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
Re: [PATCHv3 13/14] Upgraded to libvirt 1.0.0, and added a more detailed packageconfig
In reply to David NyströmQuoted 17 lines · David Nyström
Quoted 10 lines
Another random questions. I've got some other libvirt recipes kicking around, and
is it generally frowned upon to trigger options viaDISTRO_FEATURESvs PACKAGECONFIG ? I'm thinking of bigger scale features like selinux, which are
decided on a distro basis.Cheers,
Bruce
Thats a good question, CC:ing RP who added the feature in 1.3.
Don't know whats generally frowned upon by the community, I see PACKAGECONFIG as a more fine granular way of doing this. Alot of packages in oe-core do a R/DEPENDS split with:
Quoted 8 lines
DEPENDS += ${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxtst libice libsm libxcb gtk+', '', d)}"
I see no reason for why
DISTRO_FEATUREScan't select a PACKAGECONFIG setup instead. I'm guessing that's why it was added. i.e.PACKAGECONFIG += ${@base_contains('DISTRO_FEATURES', 'kvm', 'qemu yajl', '', d)}"
Its ok to select PACKAGECONFIG based on DISTRO_FEATURES and some recipes do this already in OE-Core. Lets try and keep a relatively trim set of things we do at the DISTRO_FEATURE level though (and we should better document the options available).
I'm a big fan of having sensible defaults and only exposing choices that have significant real world value.
Cheers,
Richard
PATCH v3 14/14 Added kernel configuration for LxC and in kernel OpenvSwitch
In reply to [email protected]From: David Nyström <[email protected]>
--- recipes-kernel/linux/linux-yocto/lxc.cfg | 22 ++++++++++++++++++++++ recipes-kernel/linux/linux-yocto/lxc.scc | 4 ++++ recipes-kernel/linux/linux-yocto/vswitch.cfg | 2 ++ recipes-kernel/linux/linux-yocto/vswitch.scc | 4 ++++ recipes-kernel/linux/linux-yocto_3.4.bbappend | 5 ++++- 5 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 recipes-kernel/linux/linux-yocto/lxc.cfg create mode 100644 recipes-kernel/linux/linux-yocto/lxc.scc create mode 100644 recipes-kernel/linux/linux-yocto/vswitch.cfg create mode 100644 recipes-kernel/linux/linux-yocto/vswitch.scc
recipes-kernel/linux/linux-yocto/lxc.cfg new file +22 -0
@@ -0,0 +1,22 @@ +CONFIG_CGROUP_DEVICE=y +CONFIG_CPUSETS=y +CONFIG_PROC_PID_CPUSET=y +CONFIG_RESOURCE_COUNTERS=y +CONFIG_CGROUP_MEM_RES_CTLR=y +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +CONFIG_RT_GROUP_SCHED=y +CONFIG_CHECKPOINT_RESTORE=y +CONFIG_NAMESPACES=y +CONFIG_UTS_NS=y +CONFIG_IPC_NS=y +CONFIG_USER_NS=y +CONFIG_PID_NS=y +CONFIG_NET_NS=y +CONFIG_SECCOMP=y +CONFIG_SECURITY_APPARMOR=y + +CONFIG_CLS_CGROUP=m +CONFIG_BLK_CGROUP=m +CONFIG_NETPRIO_CGROUP=m +
recipes-kernel/linux/linux-yocto/lxc.scc new file +4 -0
@@ -0,0 +1,4 @@ +define KFEATURE_DESCRIPTION "Enable Features needed by LxC, namespaces, cgroups et.c." +define KFEATURE_COMPATIBILITY board + +kconf non-hardware lxc.cfg
recipes-kernel/linux/linux-yocto/vswitch.cfg new file +2 -0
@@ -0,0 +1,2 @@ +CONFIG_OPENVSWITCH=m +
recipes-kernel/linux/linux-yocto/vswitch.scc new file +4 -0
@@ -0,0 +1,4 @@ +define KFEATURE_DESCRIPTION "Enable in kernel OpenvSwitch module" +define KFEATURE_COMPATIBILITY board + +kconf non-hardware vswitch.cfg
recipes-kernel/linux/linux-yocto_3.4.bbappend +4 -1
@@ -1,5 +1,8 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" SRC_URI += "file://xt-checksum.scc \ - file://ebtables.scc " + file://ebtables.scc \ + file://vswitch.scc \ + file://lxc.scc \ + "
Signature · 1 line
1.7.9.5