diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/meta-virtualization/recipes-networking | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/meta-virtualization/recipes-networking')
16 files changed, 178 insertions, 698 deletions
diff --git a/external/meta-virtualization/recipes-networking/cni/cni_git.bb b/external/meta-virtualization/recipes-networking/cni/cni_git.bb index f7a7597b..3ad939bd 100644 --- a/external/meta-virtualization/recipes-networking/cni/cni_git.bb +++ b/external/meta-virtualization/recipes-networking/cni/cni_git.bb @@ -9,11 +9,12 @@ Because of this focus, CNI has a wide range of support and the specification \ is simple to implement. \ " -SRCREV_cni = "cc562d1b44b3d00b8c341250d49a8a0823a1c085" -SRCREV_plugins = "9abd20edd6c83385ff6c2a6e6ff265158059e723" +SRCREV_cni = "4cfb7b568922a3c79a23e438dc52fe537fc9687e" +# Version 0.8.5 +SRCREV_plugins = "1f33fb729ae2b8900785f896df2dc1f6fe5e8239" SRC_URI = "\ git://github.com/containernetworking/cni.git;nobranch=1;name=cni \ - git://github.com/containernetworking/plugins.git;nobranch=1;destsuffix=plugins;name=plugins \ + git://github.com/containernetworking/plugins.git;nobranch=1;destsuffix=${S}/src/github.com/containernetworking/plugins;name=plugins \ " RPROVIDES_${PN} += "kubernetes-cni" @@ -23,76 +24,47 @@ LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464 GO_IMPORT = "import" -PV = "0.6.0+git${SRCREV_cni}" +PV = "0.7.1+git${SRCREV_cni}" inherit go inherit goarch do_compile() { - export GOARCH="${TARGET_GOARCH}" - export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" - export GOPATH="${S}/src/import:${S}/src/import/vendor" - - # Pass the needed cflags/ldflags so that cgo - # can find the needed headers files and libraries - export CGO_ENABLED="1" - export CFLAGS="" - export LDFLAGS="" - export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" - export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" - - # link fixups for compilation - rm -f ${S}/src/import/vendor/src - mkdir -p ${S}/src/import/vendor/ - ln -sf ./ ${S}/src/import/vendor/src - rm -rf ${S}/src/import/plugins - rm -rf ${S}/src/import/vendor/github.com/containernetworking/plugins - - mkdir -p ${S}/src/import/vendor/github.com/containernetworking/cni - - ln -sf ../../../../libcni ${S}/src/import/vendor/github.com/containernetworking/cni/libcni - ln -sf ../../../../pkg ${S}/src/import/vendor/github.com/containernetworking/cni/pkg - ln -sf ../../../../cnitool ${S}/src/import/vendor/github.com/containernetworking/cni/cnitool - ln -sf ${WORKDIR}/plugins ${S}/src/import/vendor/github.com/containernetworking/plugins - - export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" - export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" - - # Pass the needed cflags/ldflags so that cgo - # can find the needed headers files and libraries - export CGO_ENABLED="1" - export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}" - export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" - - cd ${S}/src/import/vendor/github.com/containernetworking/cni/libcni - go build - - cd ${S}/src/import/vendor/github.com/containernetworking/cni/cnitool - go build - - cd ${S}/src/import/vendor/github.com/containernetworking/plugins/ - PLUGINS="$(ls -d plugins/meta/*; ls -d plugins/main/* | grep -v windows)" - mkdir -p ${WORKDIR}/plugins/bin/ + mkdir -p ${S}/src/github.com/containernetworking + ln -sfr ${S}/src/import ${S}/src/github.com/containernetworking/cni + + cd ${B}/src/github.com/containernetworking/cni/libcni + ${GO} build + + cd ${B}/src/github.com/containernetworking/cni/cnitool + ${GO} build + + cd ${B}/src/github.com/containernetworking/plugins + PLUGINS="$(ls -d plugins/meta/*; ls -d plugins/ipam/*; ls -d plugins/main/* | grep -v windows)" + mkdir -p ${B}/plugins/bin/ for p in $PLUGINS; do plugin="$(basename "$p")" echo "building: $p" - go build -o ${WORKDIR}/plugins/bin/$plugin github.com/containernetworking/plugins/$p + ${GO} build -mod=vendor -o ${B}/plugins/bin/$plugin github.com/containernetworking/plugins/$p done } do_install() { - localbindir="/opt/cni/bin" + localbindir="${libexecdir}/cni/" install -d ${D}${localbindir} install -d ${D}/${sysconfdir}/cni/net.d install -m 755 ${S}/src/import/cnitool/cnitool ${D}/${localbindir} - install -m 755 -D ${WORKDIR}/plugins/bin/* ${D}/${localbindir} + install -m 755 -D ${B}/plugins/bin/* ${D}/${localbindir} + + # Parts of k8s expect the cni binaries to be available in /opt/cni + install -d ${D}/opt/cni + ln -sf ${libexecdir}/cni/ ${D}/opt/cni/bin } -FILES_${PN} += "/opt/cni/bin/*" +FILES_${PN} += "${libexecdir}/cni/* /opt/cni/bin" -INHIBIT_PACKAGE_STRIP = "1" INSANE_SKIP_${PN} += "ldflags already-stripped" deltask compile_ptest_base diff --git a/external/meta-virtualization/recipes-networking/netns/files/0001-Allow-selection-of-go-compiler.patch b/external/meta-virtualization/recipes-networking/netns/files/0001-Allow-selection-of-go-compiler.patch deleted file mode 100644 index 84fb9a43..00000000 --- a/external/meta-virtualization/recipes-networking/netns/files/0001-Allow-selection-of-go-compiler.patch +++ /dev/null @@ -1,107 +0,0 @@ -From 6576f228339b7931e05a8e861f085f483817806b Mon Sep 17 00:00:00 2001 -From: Paul Barker <pbarker@toganlabs.com> -Date: Tue, 8 May 2018 11:01:14 +0000 -Subject: [PATCH] Allow selection of go compiler - -By running `make GO=/path/to/go` we can now select the appropriate go compiler -to use. This also makes it possible to cross compile netns more easily. - -Signed-off-by: Paul Barker <pbarker@toganlabs.com> -Upstream-status: Pending ---- - Makefile | 25 ++++++++++++++----------- - 1 file changed, 14 insertions(+), 11 deletions(-) - -diff --git a/Makefile b/Makefile -index 3a22f3e..476cb9b 100644 ---- a/src/import/Makefile -+++ b/src/import/Makefile -@@ -23,6 +23,9 @@ CTIMEVAR=-X $(PKG)/version.GITCOMMIT=$(GITCOMMIT) -X $(PKG)/version.VERSION=$(VE - GO_LDFLAGS=-ldflags "-w $(CTIMEVAR)" - GO_LDFLAGS_STATIC=-ldflags "-w $(CTIMEVAR) -extldflags -static" - -+# Set our default go compiler -+GO := go -+ - # List the GOOS and GOARCH to build - GOOSARCHES = linux/arm linux/arm64 linux/amd64 linux/386 - -@@ -33,12 +36,12 @@ build: $(NAME) ## Builds a dynamic executable or package - - $(NAME): *.go VERSION.txt - @echo "+ $@" -- go build -tags "$(BUILDTAGS)" ${GO_LDFLAGS} -o $(NAME) . -+ $(GO) build -tags "$(BUILDTAGS)" ${GO_LDFLAGS} -o $(NAME) . - - .PHONY: static - static: ## Builds a static executable - @echo "+ $@" -- CGO_ENABLED=0 go build \ -+ CGO_ENABLED=0 $(GO) build \ - -tags "$(BUILDTAGS) static_build" \ - ${GO_LDFLAGS_STATIC} -o $(NAME) . - -@@ -55,23 +58,23 @@ lint: ## Verifies `golint` passes - .PHONY: test - test: ## Runs the go tests - @echo "+ $@" -- @go test -v -tags "$(BUILDTAGS) cgo" $(shell go list ./... | grep -v vendor) -+ @$(GO) test -v -tags "$(BUILDTAGS) cgo" $(shell $(GO) list ./... | grep -v vendor) - - .PHONY: vet - vet: ## Verifies `go vet` passes - @echo "+ $@" -- @go vet $(shell go list ./... | grep -v vendor) | grep -v '.pb.go:' | tee /dev/stderr -+ @$(GO) vet $(shell $(GO) list ./... | grep -v vendor) | grep -v '.pb.go:' | tee /dev/stderr - - .PHONY: staticcheck - staticcheck: ## Verifies `staticcheck` passes - @echo "+ $@" -- @staticcheck $(shell go list ./... | grep -v vendor) | grep -v '.pb.go:' | tee /dev/stderr -+ @staticcheck $(shell $(GO) list ./... | grep -v vendor) | grep -v '.pb.go:' | tee /dev/stderr - - .PHONY: cover - cover: ## Runs go test with coverage - @echo "" > coverage.txt -- @for d in $(shell go list ./... | grep -v vendor); do \ -- go test -race -coverprofile=profile.out -covermode=atomic "$$d"; \ -+ @for d in $(shell $(GO) list ./... | grep -v vendor); do \ -+ $(GO) test -race -coverprofile=profile.out -covermode=atomic "$$d"; \ - if [ -f profile.out ]; then \ - cat profile.out >> coverage.txt; \ - rm profile.out; \ -@@ -81,11 +84,11 @@ cover: ## Runs go test with coverage - .PHONY: install - install: ## Installs the executable or package - @echo "+ $@" -- go install -a -tags "$(BUILDTAGS)" ${GO_LDFLAGS} . -+ $(GO) install -a -tags "$(BUILDTAGS)" ${GO_LDFLAGS} . - - define buildpretty - mkdir -p $(BUILDDIR)/$(1)/$(2); --GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 go build \ -+GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 $(GO) build \ - -o $(BUILDDIR)/$(1)/$(2)/$(NAME) \ - -a -tags "$(BUILDTAGS) static_build netgo" \ - -installsuffix netgo ${GO_LDFLAGS_STATIC} .; -@@ -99,7 +102,7 @@ cross: *.go VERSION.txt ## Builds the cross-compiled binaries, creating a clean - $(foreach GOOSARCH,$(GOOSARCHES), $(call buildpretty,$(subst /,,$(dir $(GOOSARCH))),$(notdir $(GOOSARCH)))) - - define buildrelease --GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 go build \ -+GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 $(GO) build \ - -o $(BUILDDIR)/$(NAME)-$(1)-$(2) \ - -a -tags "$(BUILDTAGS) static_build netgo" \ - -installsuffix netgo ${GO_LDFLAGS_STATIC} .; -@@ -115,7 +118,7 @@ release: *.go VERSION.txt ## Builds the cross-compiled binaries, naming them in - .PHONY: bump-version - BUMP := patch - bump-version: ## Bump the version in the version file. Set BUMP to [ patch | major | minor ] -- @go get -u github.com/jessfraz/junk/sembump # update sembump tool -+ @$(GO) get -u github.com/jessfraz/junk/sembump # update sembump tool - $(eval NEW_VERSION = $(shell sembump --kind $(BUMP) $(VERSION))) - @echo "Bumping VERSION.txt from $(VERSION) to $(NEW_VERSION)" - echo $(NEW_VERSION) > VERSION.txt --- -2.7.4 - diff --git a/external/meta-virtualization/recipes-networking/netns/files/0001-Use-correct-go-cross-compiler.patch b/external/meta-virtualization/recipes-networking/netns/files/0001-Use-correct-go-cross-compiler.patch deleted file mode 100644 index ed66e11b..00000000 --- a/external/meta-virtualization/recipes-networking/netns/files/0001-Use-correct-go-cross-compiler.patch +++ /dev/null @@ -1,77 +0,0 @@ -From d5c319bb61155d94bef2571a095d82983d786b94 Mon Sep 17 00:00:00 2001 -From: Paul Barker <pbarker@toganlabs.com> -Date: Fri, 13 Oct 2017 17:58:11 +0000 -Subject: [PATCH] Use correct go cross-compiler - -Signed-off-by: Paul Barker <pbarker@toganlabs.com> -Upstream-status: Pending ---- - Makefile | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/Makefile b/Makefile -index cb9a46d..633f884 100644 ---- a/src/import/Makefile -+++ b/src/import/Makefile -@@ -33,12 +33,12 @@ build: $(NAME) ## Builds a dynamic executable or package - - $(NAME): *.go VERSION - @echo "+ $@" -- go build -tags "$(BUILDTAGS)" ${GO_LDFLAGS} -o $(NAME) . -+ $(GO) build -tags "$(BUILDTAGS)" ${GO_LDFLAGS} -o $(NAME) . - - .PHONY: static - static: ## Builds a static executable - @echo "+ $@" -- CGO_ENABLED=0 go build \ -+ CGO_ENABLED=0 $(GO) build \ - -tags "$(BUILDTAGS) static_build" \ - ${GO_LDFLAGS_STATIC} -o $(NAME) . - -@@ -55,21 +55,21 @@ lint: ## Verifies `golint` passes - .PHONY: test - test: ## Runs the go tests - @echo "+ $@" -- @go test -v -tags "$(BUILDTAGS) cgo" $(shell go list ./... | grep -v vendor) -+ @$(GO) test -v -tags "$(BUILDTAGS) cgo" $(shell $(GO) list ./... | grep -v vendor) - - .PHONY: vet - vet: ## Verifies `go vet` passes - @echo "+ $@" -- @go vet $(shell go list ./... | grep -v vendor) | grep -v '.pb.go:' | tee /dev/stderr -+ @$(GO) vet $(shell $(GO) list ./... | grep -v vendor) | grep -v '.pb.go:' | tee /dev/stderr - - .PHONY: install - install: ## Installs the executable or package - @echo "+ $@" -- @go install . -+ @$(GO) install . - - define buildpretty - mkdir -p $(BUILDDIR)/$(1)/$(2); --GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 go build \ -+GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 $(GO) build \ - -o $(BUILDDIR)/$(1)/$(2)/$(NAME) \ - -a -tags "$(BUILDTAGS) static_build netgo" \ - -installsuffix netgo ${GO_LDFLAGS_STATIC} .; -@@ -83,7 +83,7 @@ cross: *.go VERSION ## Builds the cross-compiled binaries, creating a clean dire - $(foreach GOOSARCH,$(GOOSARCHES), $(call buildpretty,$(subst /,,$(dir $(GOOSARCH))),$(notdir $(GOOSARCH)))) - - define buildrelease --GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 go build \ -+GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 $(GO) build \ - -o $(BUILDDIR)/$(NAME)-$(1)-$(2) \ - -a -tags "$(BUILDTAGS) static_build netgo" \ - -installsuffix netgo ${GO_LDFLAGS_STATIC} .; -@@ -99,7 +99,7 @@ release: *.go VERSION ## Builds the cross-compiled binaries, naming them in such - .PHONY: bump-version - BUMP := patch - bump-version: ## Bump the version in the version file. Set KIND to [ patch | major | minor ] -- @go get -u github.com/jessfraz/junk/sembump # update sembump tool -+ @$(GO) get -u github.com/jessfraz/junk/sembump # update sembump tool - $(eval NEW_VERSION = $(shell sembump --kind $(BUMP) $(VERSION))) - @echo "Bumping VERSION from $(VERSION) to $(NEW_VERSION)" - echo $(NEW_VERSION) > VERSION --- -2.7.4 - diff --git a/external/meta-virtualization/recipes-networking/netns/files/Makefile-force-rebuilding-all-packages-to-avoid-cgo.patch b/external/meta-virtualization/recipes-networking/netns/files/Makefile-force-rebuilding-all-packages-to-avoid-cgo.patch new file mode 100644 index 00000000..e4967d2e --- /dev/null +++ b/external/meta-virtualization/recipes-networking/netns/files/Makefile-force-rebuilding-all-packages-to-avoid-cgo.patch @@ -0,0 +1,64 @@ +From fa402247e9b24470648a366cfda1c9134660146a Mon Sep 17 00:00:00 2001 +From: Mark Asselstine <mark.asselstine@windriver.com> +Date: Mon, 18 Mar 2019 14:04:16 -0400 +Subject: [PATCH] Makefile: force rebuilding all packages to avoid cgo + +We are running into an issue when attempting to build 'static', +similar to what is described by + +https://plus.google.com/117192131596509381660/posts/eNnNePihYnK +and +https://github.com/golang/go/issues/9369 + +In our case we can see that it manifests as a build error + + cannot find package runtime/cgo (using -importcfg) + ...go/pkg/tool/linux_amd64/link: cannot open file : open : no such file or directory + +Although the descriptions of issue indicate that newer versions of GO, +such as the version we are using, should not have this issue it is +clear from the error that cgo is being referenced when it should be +out of the picture. + +Interesting enough this issue only manifests when we are building on +x86-64 and building for x86-64 which might indicate that GO might be +finding -native packages and not -cross packages. + +This change works around the issue and will allow for the building of +the 'static' make target, but at this time and until the issue is +completely understood, it is recommended that the 'build' target is +used. + +Upstream-Status: Inappropriate [only an issue with our builds] + +Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> + +Forward-ported to v0.5.3. + +Signed-off-by: Paul Barker <paul@betafive.co.uk> +--- + basic.mk | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/basic.mk b/basic.mk +index 187dff3..76a8d93 100644 +--- a/src/import/basic.mk ++++ b/src/import/basic.mk +@@ -45,12 +45,12 @@ build: prebuild $(NAME) ## Builds a dynamic executable or package. + + $(NAME): $(wildcard *.go) $(wildcard */*.go) VERSION.txt + @echo "+ $@" +- $(GO) build -tags "$(BUILDTAGS)" ${GO_LDFLAGS} -o $(NAME) . ++ $(GO) build -a -pkgdir dontusecurrentpkgs -tags "$(BUILDTAGS)" ${GO_LDFLAGS} -o $(NAME) . + + .PHONY: static + static: prebuild ## Builds a static executable. + @echo "+ $@" +- CGO_ENABLED=$(CGO_ENABLED) $(GO) build \ ++ CGO_ENABLED=$(CGO_ENABLED) $(GO) build -a -pkgdir dontusecurrentpkgs \ + -tags "$(BUILDTAGS) static_build" \ + ${GO_LDFLAGS_STATIC} -o $(NAME) . + +-- +2.23.0 + diff --git a/external/meta-virtualization/recipes-networking/netns/netns_git.bb b/external/meta-virtualization/recipes-networking/netns/netns_git.bb index b6d35948..da6aac21 100644 --- a/external/meta-virtualization/recipes-networking/netns/netns_git.bb +++ b/external/meta-virtualization/recipes-networking/netns/netns_git.bb @@ -4,10 +4,10 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=48ef0979a2bcc3fae14ff30b8a7f5dbf" SRC_URI = "git://github.com/genuinetools/netns;branch=master \ - file://0001-Allow-selection-of-go-compiler.patch \ + file://Makefile-force-rebuilding-all-packages-to-avoid-cgo.patch \ " -SRCREV = "0da6ab0997707024debe68c91e940c9168041bf8" -PV = "0.4.0" +SRCREV = "9b103a19b917cc3762a33b7d78244b1d5e45ccfd" +PV = "0.5.3" GO_IMPORT = "import" S = "${WORKDIR}/git" @@ -42,7 +42,15 @@ do_compile() { export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" cd ${S}/src/import - oe_runmake static + # Static builds work but are not recommended. See Makefile*cgo patch. + #oe_runmake static + oe_runmake build + + # Golang forces permissions to 0500 on directories and 0400 on files in + # the module cache which prevents us from easily cleaning up the build + # directory. Let's just fix the permissions here so we don't have to + # hack the clean tasks. + chmod -R u+w vendor/pkg/mod } do_install() { diff --git a/external/meta-virtualization/recipes-networking/openvswitch/files/openvswitch-testcontroller b/external/meta-virtualization/recipes-networking/openvswitch/files/openvswitch-testcontroller index aad5ad60..57c77983 100755 --- a/external/meta-virtualization/recipes-networking/openvswitch/files/openvswitch-testcontroller +++ b/external/meta-virtualization/recipes-networking/openvswitch/files/openvswitch-testcontroller @@ -40,7 +40,7 @@ PIDFILE=/var/run/openvswitch/$NAME.pid test -x $DAEMON || exit 0 -. /lib/lsb/init-functions +. /usr/share/openvswitch/scripts/ovs-lib # Default options, these can be overriden by the information # at /etc/default/openvswitch-testcontroller @@ -89,6 +89,14 @@ running_pid() { return 0 } +log_begin_msg () { + echo "$@" +} + +log_end_msg () { + echo "$@" +} + running() { # Check if the process is running looking at /proc # (works for all users) diff --git a/external/meta-virtualization/recipes-networking/openvswitch/files/python-make-remaining-scripts-use-usr-bin-env.patch b/external/meta-virtualization/recipes-networking/openvswitch/files/python-make-remaining-scripts-use-usr-bin-env.patch deleted file mode 100644 index 0dc6b11b..00000000 --- a/external/meta-virtualization/recipes-networking/openvswitch/files/python-make-remaining-scripts-use-usr-bin-env.patch +++ /dev/null @@ -1,372 +0,0 @@ -From a0a2d829642e916bd5d1c498a3e6f3641ed717a0 Mon Sep 17 00:00:00 2001 -From: Mark Asselstine <mark.asselstine@windriver.com> -Date: Fri, 13 Jan 2017 16:12:55 -0500 -Subject: [PATCH] python: make remaining scripts use /usr/bin/env - -Unfortunately there is no concept of a host python vs. target python -to facilitate cross compilation. There is only one PYTHON variable and -this is used during building and in the header of python scripts after -installation. The best approach for cross compilation is to thus to -ensure python is in the path and avoid passing a path as part of -PYTHON. To make this function smoothly all installed scripts should -make use of /usr/bin/env to increase the chances of finding python. - -Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> ---- - build-aux/check-structs | 2 +- - build-aux/dpdkstrip.py | 2 +- - build-aux/extract-ofp-actions | 2 +- - build-aux/extract-ofp-errors | 2 +- - build-aux/extract-ofp-fields | 2 +- - build-aux/extract-ofp-msgs | 2 +- - build-aux/sodepends.py | 2 +- - build-aux/soexpand.py | 2 +- - build-aux/text2c | 2 +- - build-aux/xml2nroff | 2 +- - ovn/utilities/ovn-detrace.in | 2 +- - ovn/utilities/ovn-docker-overlay-driver.in | 2 +- - ovn/utilities/ovn-docker-underlay-driver.in | 2 +- - ovsdb/dot2pic | 2 +- - ovsdb/ovsdb-doc | 2 +- - ovsdb/ovsdb-dot.in | 2 +- - ovsdb/ovsdb-idlc.in | 2 +- - python/build/soutil.py | 2 +- - tests/flowgen.py | 2 +- - tests/ovsdb-monitor-sort.py | 2 +- - tests/uuidfilt.py | 2 +- - utilities/bugtool/ovs-bugtool.in | 2 +- - utilities/ovs-check-dead-ifs.in | 2 +- - utilities/ovs-dpctl-top.in | 2 +- - utilities/ovs-l3ping.in | 2 +- - utilities/ovs-parse-backtrace.in | 2 +- - utilities/ovs-pcap.in | 2 +- - utilities/ovs-tcpdump.in | 2 +- - utilities/ovs-tcpundump.in | 2 +- - utilities/ovs-test.in | 2 +- - utilities/ovs-vlan-test.in | 2 +- - vtep/ovs-vtep.in | 2 +- - 32 files changed, 32 insertions(+), 32 deletions(-) - -diff --git a/build-aux/check-structs b/build-aux/check-structs -index 37ffa06..eb44c91 100755 ---- a/build-aux/check-structs -+++ b/build-aux/check-structs -@@ -1,4 +1,4 @@ --#! /usr/bin/python -+#! /usr/bin/env python3 - - import os.path - import sys -diff --git a/build-aux/dpdkstrip.py b/build-aux/dpdkstrip.py -index 48c7f06..b8b8ba9 100755 ---- a/build-aux/dpdkstrip.py -+++ b/build-aux/dpdkstrip.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#! /usr/bin/env python3 - # Copyright (c) 2017 Red Hat, Inc. - # - # Licensed under the Apache License, Version 2.0 (the "License"); -diff --git a/build-aux/extract-ofp-actions b/build-aux/extract-ofp-actions -index bd7131f..4d05ef9 100755 ---- a/build-aux/extract-ofp-actions -+++ b/build-aux/extract-ofp-actions -@@ -1,4 +1,4 @@ --#! /usr/bin/python -+#! /usr/bin/env python3 - - import sys - import os.path -diff --git a/build-aux/extract-ofp-errors b/build-aux/extract-ofp-errors -index 71ae0bd..58ba006 100755 ---- a/build-aux/extract-ofp-errors -+++ b/build-aux/extract-ofp-errors -@@ -1,4 +1,4 @@ --#! /usr/bin/python -+#! /usr/bin/env python3 - - import sys - import os.path -diff --git a/build-aux/extract-ofp-fields b/build-aux/extract-ofp-fields -index 184b75e..cf339f8 100755 ---- a/build-aux/extract-ofp-fields -+++ b/build-aux/extract-ofp-fields -@@ -1,4 +1,4 @@ --#! /usr/bin/python -+#! /usr/bin/env python3 - - import getopt - import sys -diff --git a/build-aux/extract-ofp-msgs b/build-aux/extract-ofp-msgs -index a67e870..92c4bda 100755 ---- a/build-aux/extract-ofp-msgs -+++ b/build-aux/extract-ofp-msgs -@@ -1,4 +1,4 @@ --#! /usr/bin/python -+#! /usr/bin/env python3 - - import sys - import os.path -diff --git a/build-aux/sodepends.py b/build-aux/sodepends.py -index 90cfaa0..45812bc 100755 ---- a/build-aux/sodepends.py -+++ b/build-aux/sodepends.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#! /usr/bin/env python3 - - # Copyright (c) 2008, 2011, 2017 Nicira, Inc. - # -diff --git a/build-aux/soexpand.py b/build-aux/soexpand.py -index 53ca640..00adcf4 100755 ---- a/build-aux/soexpand.py -+++ b/build-aux/soexpand.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#! /usr/bin/env python3 - - # Copyright (c) 2008, 2017 Nicira, Inc. - # -diff --git a/build-aux/text2c b/build-aux/text2c -index cb1f256..ab7910e 100755 ---- a/build-aux/text2c -+++ b/build-aux/text2c -@@ -1,4 +1,4 @@ --#! /usr/bin/python -+#! /usr/bin/env python3 - - import re - import sys -diff --git a/build-aux/xml2nroff b/build-aux/xml2nroff -index bd4e879..db45c56 100755 ---- a/build-aux/xml2nroff -+++ b/build-aux/xml2nroff -@@ -1,4 +1,4 @@ --#! /usr/bin/python -+#! /usr/bin/env python3 - - # Copyright (c) 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc. - # -diff --git a/ovn/utilities/ovn-detrace.in b/ovn/utilities/ovn-detrace.in -index e2e5b4c..5549219 100755 ---- a/ovn/utilities/ovn-detrace.in -+++ b/ovn/utilities/ovn-detrace.in -@@ -1,4 +1,4 @@ --#! @PYTHON@ -+#!/usr/bin/env @PYTHON@ - # - # Copyright (c) 2017 eBay Inc. - # -diff --git a/ovn/utilities/ovn-docker-overlay-driver.in b/ovn/utilities/ovn-docker-overlay-driver.in -index 65edfcd..895426b 100755 ---- a/ovn/utilities/ovn-docker-overlay-driver.in -+++ b/ovn/utilities/ovn-docker-overlay-driver.in -@@ -1,4 +1,4 @@ --#! @PYTHON@ -+#!/usr/bin/env @PYTHON@ - # Copyright (C) 2015 Nicira, Inc. - # - # Licensed under the Apache License, Version 2.0 (the "License"); -diff --git a/ovn/utilities/ovn-docker-underlay-driver.in b/ovn/utilities/ovn-docker-underlay-driver.in -index d91ce9f..e0c8db6 100755 ---- a/ovn/utilities/ovn-docker-underlay-driver.in -+++ b/ovn/utilities/ovn-docker-underlay-driver.in -@@ -1,4 +1,4 @@ --#! @PYTHON@ -+#!/usr/bin/env @PYTHON@ - # Copyright (C) 2015 Nicira, Inc. - # - # Licensed under the Apache License, Version 2.0 (the "License"); -diff --git a/ovsdb/dot2pic b/ovsdb/dot2pic -index de67261..174e723 100755 ---- a/ovsdb/dot2pic -+++ b/ovsdb/dot2pic -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#! /usr/bin/env python3 - - # Copyright (c) 2009, 2010, 2011, 2013, 2017 Nicira, Inc. - # -diff --git a/ovsdb/ovsdb-doc b/ovsdb/ovsdb-doc -index 406c293..d55c6e6 100755 ---- a/ovsdb/ovsdb-doc -+++ b/ovsdb/ovsdb-doc -@@ -1,4 +1,4 @@ --#! /usr/bin/python -+#! /usr/bin/env python3 - - # Copyright (c) 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc. - # -diff --git a/ovsdb/ovsdb-dot.in b/ovsdb/ovsdb-dot.in -index 8eea617..38ba33a 100755 ---- a/ovsdb/ovsdb-dot.in -+++ b/ovsdb/ovsdb-dot.in -@@ -1,4 +1,4 @@ --#! @PYTHON@ -+#! /usr/bin/env @PYTHON@ - - from datetime import date - import ovs.db.error -diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in -index 1ea2115..4ecb2e2 100755 ---- a/ovsdb/ovsdb-idlc.in -+++ b/ovsdb/ovsdb-idlc.in -@@ -1,4 +1,4 @@ --#! @PYTHON@ -+#!/usr/bin/env @PYTHON@ - - from __future__ import print_function - import getopt -diff --git a/python/build/soutil.py b/python/build/soutil.py -index b8027af..8f52803 100755 ---- a/python/build/soutil.py -+++ b/python/build/soutil.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#! /usr/bin/env python3 - - # Copyright (c) 2008, 2017 Nicira, Inc. - # -diff --git a/tests/flowgen.py b/tests/flowgen.py -index 221a8f2..5d96d76 100755 ---- a/tests/flowgen.py -+++ b/tests/flowgen.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#! /usr/bin/env python3 - - # Copyright (c) 2009, 2010, 2011, 2012, 2015, 2017 Nicira, Inc. - # -diff --git a/tests/ovsdb-monitor-sort.py b/tests/ovsdb-monitor-sort.py -index 7d368a7..ab4c38c 100755 ---- a/tests/ovsdb-monitor-sort.py -+++ b/tests/ovsdb-monitor-sort.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#! /usr/bin/env python3 - - # Breaks lines read from stdin into groups using blank lines as - # group separators, then sorts lines within the groups for -diff --git a/tests/uuidfilt.py b/tests/uuidfilt.py -index ea72812..f1a9aff 100755 ---- a/tests/uuidfilt.py -+++ b/tests/uuidfilt.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - - import re - import sys -diff --git a/utilities/bugtool/ovs-bugtool.in b/utilities/bugtool/ovs-bugtool.in -index 8d220fd..76cedf4 100755 ---- a/utilities/bugtool/ovs-bugtool.in -+++ b/utilities/bugtool/ovs-bugtool.in -@@ -1,4 +1,4 @@ --#! @PYTHON@ -+#! /usr/bin/env @PYTHON@ - - # This library is free software; you can redistribute it and/or - # modify it under the terms of version 2.1 of the GNU Lesser General Public -diff --git a/utilities/ovs-check-dead-ifs.in b/utilities/ovs-check-dead-ifs.in -index ac54f6c..13d86b3 100755 ---- a/utilities/ovs-check-dead-ifs.in -+++ b/utilities/ovs-check-dead-ifs.in -@@ -1,4 +1,4 @@ --#! @PYTHON@ -+#!/usr/bin/env @PYTHON@ - - import os - import re -diff --git a/utilities/ovs-dpctl-top.in b/utilities/ovs-dpctl-top.in -index 7f0f1f8..ece707a 100755 ---- a/utilities/ovs-dpctl-top.in -+++ b/utilities/ovs-dpctl-top.in -@@ -1,4 +1,4 @@ --#! @PYTHON@ -+#!/usr/bin/env @PYTHON@ - # - # Copyright (c) 2013 Nicira, Inc. - # -diff --git a/utilities/ovs-l3ping.in b/utilities/ovs-l3ping.in -index 1b07972..9852699 100644 ---- a/utilities/ovs-l3ping.in -+++ b/utilities/ovs-l3ping.in -@@ -1,4 +1,4 @@ --#! @PYTHON@ -+#!/usr/bin/env @PYTHON@ - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. -diff --git a/utilities/ovs-parse-backtrace.in b/utilities/ovs-parse-backtrace.in -index 350cbd9..1960fb4 100755 ---- a/utilities/ovs-parse-backtrace.in -+++ b/utilities/ovs-parse-backtrace.in -@@ -1,4 +1,4 @@ --#! @PYTHON@ -+#!/usr/bin/env @PYTHON@ - # - # Copyright (c) 2012 Nicira, Inc. - # -diff --git a/utilities/ovs-pcap.in b/utilities/ovs-pcap.in -index fc15321..bd55a41 100755 ---- a/utilities/ovs-pcap.in -+++ b/utilities/ovs-pcap.in -@@ -1,4 +1,4 @@ --#! @PYTHON@ -+#!/usr/bin/env @PYTHON@ - # - # Copyright (c) 2010 Nicira, Inc. - # -diff --git a/utilities/ovs-tcpdump.in b/utilities/ovs-tcpdump.in -index 91fa14e..bad67b7 100755 ---- a/utilities/ovs-tcpdump.in -+++ b/utilities/ovs-tcpdump.in -@@ -1,4 +1,4 @@ --#! @PYTHON@ -+#!/usr/bin/env @PYTHON@ - # - # Copyright (c) 2016 Red Hat, Inc. - # -diff --git a/utilities/ovs-tcpundump.in b/utilities/ovs-tcpundump.in -index c99015b..9a617ce 100755 ---- a/utilities/ovs-tcpundump.in -+++ b/utilities/ovs-tcpundump.in -@@ -1,4 +1,4 @@ --#! @PYTHON@ -+#!/usr/bin/env @PYTHON@ - # - # Copyright (c) 2010 Nicira, Inc. - # -diff --git a/utilities/ovs-test.in b/utilities/ovs-test.in -index fb1f9ad..4dba169 100644 ---- a/utilities/ovs-test.in -+++ b/utilities/ovs-test.in -@@ -1,4 +1,4 @@ --#! @PYTHON@ -+#!/usr/bin/env @PYTHON@ - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. -diff --git a/utilities/ovs-vlan-test.in b/utilities/ovs-vlan-test.in -index e229498..5b70118 100755 ---- a/utilities/ovs-vlan-test.in -+++ b/utilities/ovs-vlan-test.in -@@ -1,4 +1,4 @@ --#! @PYTHON@ -+#!/usr/bin/env @PYTHON@ - # - # Copyright (c) 2010 Nicira, Inc. - # -diff --git a/vtep/ovs-vtep.in b/vtep/ovs-vtep.in -index 98748e4..3f12ae2 100755 ---- a/vtep/ovs-vtep.in -+++ b/vtep/ovs-vtep.in -@@ -1,4 +1,4 @@ --#! @PYTHON@ -+#!/usr/bin/env @PYTHON@ - # Copyright (C) 2013 Nicira, Inc. All Rights Reserved. - # - # Licensed under the Apache License, Version 2.0 (the "License"); --- -2.7.4 - diff --git a/external/meta-virtualization/recipes-networking/openvswitch/files/python-switch-remaining-scripts-to-use-python3.patch b/external/meta-virtualization/recipes-networking/openvswitch/files/python-switch-remaining-scripts-to-use-python3.patch index 64e0e3f4..113bc91d 100644 --- a/external/meta-virtualization/recipes-networking/openvswitch/files/python-switch-remaining-scripts-to-use-python3.patch +++ b/external/meta-virtualization/recipes-networking/openvswitch/files/python-switch-remaining-scripts-to-use-python3.patch @@ -10,13 +10,12 @@ Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> --- ofproto/ipfix-gen-entities | 2 +- tests/test-l7.py | 2 +- - utilities/checkpatch.py | 2 +- utilities/ovs-dev.py | 2 +- utilities/ovs-pipegen.py | 2 +- xenserver/etc_xapi.d_plugins_openvswitch-cfg-update | 2 +- xenserver/opt_xensource_libexec_interface-reconfigure | 2 +- xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync | 2 +- - 8 files changed, 8 insertions(+), 8 deletions(-) + 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ofproto/ipfix-gen-entities b/ofproto/ipfix-gen-entities index 0be7199..d2cce42 100755 @@ -38,16 +37,6 @@ index d7854a1..f09defb 100755 # Copyright (c) 2015, 2016 Nicira, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); -diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py -index f929714..e17a1cf 100755 ---- a/utilities/checkpatch.py -+++ b/utilities/checkpatch.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # Copyright (c) 2016, 2017 Red Hat, Inc. - # Copyright (c) 2018 Nicira, Inc. - # diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py index 9ce0f04..839e13e 100755 --- a/utilities/ovs-dev.py diff --git a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0002-Define-WAIT_ANY-if-not-provided-by-system.patch b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0002-Define-WAIT_ANY-if-not-provided-by-system.patch deleted file mode 100644 index f997bbff..00000000 --- a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0002-Define-WAIT_ANY-if-not-provided-by-system.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 801023e72b31e7c49cbccedd76ade33a17fcbe45 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 20 Mar 2017 12:13:30 -0700 -Subject: [PATCH] Define WAIT_ANY if not provided by system - -POSIX does not define it and uses -1 directly -some libc do not have this definitions - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - tests/test-ovn.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/tests/test-ovn.c b/tests/test-ovn.c -index 84adf81..2bc6bdf 100644 ---- a/tests/test-ovn.c -+++ b/tests/test-ovn.c -@@ -38,6 +38,10 @@ - #include "simap.h" - #include "util.h" - -+#ifndef WAIT_ANY -+# define WAIT_ANY (-1) /* Any process. */ -+#endif -+ - /* --relops: Bitmap of the relational operators to test, in exhaustive test. */ - static unsigned int test_relops; - diff --git a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/kernel_module.patch b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/kernel_module.patch index c177202f..5e5a38d9 100644 --- a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/kernel_module.patch +++ b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/kernel_module.patch @@ -1,26 +1,29 @@ -From adfd2380d71dff1a31efaf63cf7ac97470466ec9 Mon Sep 17 00:00:00 2001 -From: Amy Fong <amy.fong@windriver.com> -Date: Thu, 29 Jan 2015 09:56:03 -0500 -Subject: [PATCH] Specify install path for kernel module +From 9b7fb1346702d59af67435487254ef35940bc16a Mon Sep 17 00:00:00 2001 +From: "Hongzhi.Song" <hongzhi.song@windriver.com> +Date: Wed, 23 Jan 2019 03:41:30 -0500 +Subject: [PATCH] datapatch/linux: Specify install path for kernel module Signed-off-by: Amy Fong <amy.fong@windriver.com> - +Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> --- datapath/linux/Makefile.main.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datapath/linux/Makefile.main.in b/datapath/linux/Makefile.main.in -index 7d18253..63c520f 100644 +index 328bbfb..6dcc8d0 100644 --- a/datapath/linux/Makefile.main.in +++ b/datapath/linux/Makefile.main.in @@ -71,8 +71,8 @@ default: - $(MAKE) -C $(KSRC) M=$(builddir) modules + $(MAKE) -C $(KSRC) $(if @KARCH@,ARCH=@KARCH@) M=$(builddir) modules modules_install: -- $(MAKE) -C $(KSRC) M=$(builddir) modules_install -- depmod `sed -n 's/#define UTS_RELEASE "\([^"]*\)"/\1/p' $(KSRC)/include/generated/utsrelease.h` -+ $(MAKE) -C $(KSRC) M=$(builddir) modules_install INSTALL_MOD_PATH=${INSTALL_MOD_PATH} -+ # depmod `sed -n 's/#define UTS_RELEASE "\([^"]*\)"/\1/p' $(KSRC)/include/generated/utsrelease.h` +- $(MAKE) -C $(KSRC) $(if @KARCH@,ARCH=@KARCH@) M=$(builddir) modules_install +- /sbin/depmod `sed -n 's/#define UTS_RELEASE "\([^"]*\)"/\1/p' $(KSRC)/include/generated/utsrelease.h` ++ $(MAKE) -C $(KSRC) $(if @KARCH@,ARCH=@KARCH@) M=$(builddir) modules_install INSTALL_MOD_PATH=${INSTALL_MOD_PATH} ++ #/sbin/depmod `sed -n 's/#define UTS_RELEASE "\([^"]*\)"/\1/p' $(KSRC)/include/generated/utsrelease.h` endif # Much of the kernel build system in this file is derived from Intel's +-- +2.8.1 + diff --git a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-5563e309b80bbea9bff538e71ecfd7e5e538bab9.patch b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-71d553b995d0bd527d3ab1e9fbaf5a2ae34de2f3.patch index a8fc86c9..fc74debb 100644 --- a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-5563e309b80bbea9bff538e71ecfd7e5e538bab9.patch +++ b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-71d553b995d0bd527d3ab1e9fbaf5a2ae34de2f3.patch @@ -13,6 +13,8 @@ Fix ptest for v2.5 Signed-off-by: He Zhe <zhe.he@windriver.com> +refresh patch to fix patch-fuzz warning +Signed-off-by: Changqing Li <changqing.li@windriver.com> --- Makefile.am | 1 + test.mk | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -23,8 +25,8 @@ diff --git a/Makefile.am b/Makefile.am index 7889728..6435399 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -494,3 +494,4 @@ include windows/automake.mk - include ovn/automake.mk +@@ -497,3 +497,4 @@ include windows/automake.mk + include windows/automake.mk include selinux/automake.mk include build-aux/automake.mk +include test.mk diff --git a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch index 65290cf6..0438cf88 100644 --- a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch +++ b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch @@ -1,4 +1,4 @@ -From 219e7cf9f28fdf14747fdf674bec293f763fe8e3 Mon Sep 17 00:00:00 2001 +From 6876e0c155b7f83e1f8545446e2dd69c2b7989f2 Mon Sep 17 00:00:00 2001 From: Mark Asselstine <mark.asselstine@windriver.com> Date: Tue, 4 Sep 2018 15:38:59 -0400 Subject: [PATCH] systemd: create runtime dirs @@ -15,17 +15,17 @@ Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> 1 file changed, 1 insertion(+) diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service -index 694598f..0bb2274 100644 +index aad557f..69b0bf6 100644 --- a/rhel/usr_lib_systemd_system_ovsdb-server.service +++ b/rhel/usr_lib_systemd_system_ovsdb-server.service -@@ -10,6 +10,7 @@ Type=forking +@@ -11,6 +11,7 @@ PIDFile=/var/run/openvswitch/ovsdb-server.pid Restart=on-failure EnvironmentFile=/etc/openvswitch/default.conf EnvironmentFile=-/etc/sysconfig/openvswitch +ExecStartPre=-/bin/mkdir /var/run/openvswitch /var/log/openvswitch - ExecStartPre=/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch - ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch/useropts; if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /bin/echo "OVSUSER=--ovs-user=${OVS_USER_ID}" > /run/openvswitch/useropts; fi' - EnvironmentFile=-/run/openvswitch/useropts + ExecStartPre=-/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch + ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch.useropts; /bin/echo "OVS_USER_ID=${OVS_USER_ID}" > /run/openvswitch.useropts' + ExecStartPre=/bin/sh -c 'if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /bin/echo "OVS_USER_OPT=--ovs-user=${OVS_USER_ID}" >> /run/openvswitch.useropts; fi' -- 2.7.4 diff --git a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/systemd-update-tool-paths.patch b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/systemd-update-tool-paths.patch index d7d4c159..aae44fe7 100644 --- a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/systemd-update-tool-paths.patch +++ b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/systemd-update-tool-paths.patch @@ -1,7 +1,7 @@ -From 163020a5bba1323dc337d72d4771bb81d824b0dc Mon Sep 17 00:00:00 2001 +From efd6b8f03ef7278d2477833f84bb8488bd0c346d Mon Sep 17 00:00:00 2001 From: Mark Asselstine <mark.asselstine@windriver.com> Date: Tue, 29 May 2018 18:57:46 +0000 -Subject: [PATCH] systemd: update tool paths +Subject: [PATCH 1/2] systemd: update tool paths We are using the rhel files but we install our tools in a slightly different path, update accordingly. @@ -9,16 +9,16 @@ different path, update accordingly. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> --- rhel/usr_lib_systemd_system_ovs-vswitchd.service.in | 4 ++-- - rhel/usr_lib_systemd_system_ovsdb-server.service | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) + rhel/usr_lib_systemd_system_ovsdb-server.service | 6 +++--- + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in -index 11b34c6..94c48f8 100644 +index ff43dae..f88b57c 100644 --- a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in +++ b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in -@@ -15,8 +15,8 @@ EnvironmentFile=/etc/openvswitch/default.conf - EnvironmentFile=-/etc/sysconfig/openvswitch - EnvironmentFile=-/run/openvswitch/useropts +@@ -17,8 +17,8 @@ EnvironmentFile=-/etc/sysconfig/openvswitch + EnvironmentFile=-/run/openvswitch.useropts + LimitSTACK=2M @begin_dpdk@ -ExecStartPre=-/bin/sh -c '/usr/bin/chown :$${OVS_USER_ID##*:} /dev/hugepages' -ExecStartPre=-/usr/bin/chmod 0775 /dev/hugepages @@ -28,18 +28,20 @@ index 11b34c6..94c48f8 100644 ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \ --no-ovsdb-server --no-monitor --system-id=random \ diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service -index 70da1ec..694598f 100644 +index 4c170c0..aad557f 100644 --- a/rhel/usr_lib_systemd_system_ovsdb-server.service +++ b/rhel/usr_lib_systemd_system_ovsdb-server.service -@@ -10,8 +10,8 @@ Type=forking +@@ -11,9 +11,9 @@ PIDFile=/var/run/openvswitch/ovsdb-server.pid Restart=on-failure EnvironmentFile=/etc/openvswitch/default.conf EnvironmentFile=-/etc/sysconfig/openvswitch --ExecStartPre=/usr/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch --ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch/useropts; if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /usr/bin/echo "OVSUSER=--ovs-user=${OVS_USER_ID}" > /run/openvswitch/useropts; fi' -+ExecStartPre=/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch -+ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch/useropts; if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /bin/echo "OVSUSER=--ovs-user=${OVS_USER_ID}" > /run/openvswitch/useropts; fi' - EnvironmentFile=-/run/openvswitch/useropts +-ExecStartPre=-/usr/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch +-ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch.useropts; /usr/bin/echo "OVS_USER_ID=${OVS_USER_ID}" > /run/openvswitch.useropts' +-ExecStartPre=/bin/sh -c 'if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /usr/bin/echo "OVS_USER_OPT=--ovs-user=${OVS_USER_ID}" >> /run/openvswitch.useropts; fi' ++ExecStartPre=-/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch ++ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch.useropts; /bin/echo "OVS_USER_ID=${OVS_USER_ID}" > /run/openvswitch.useropts' ++ExecStartPre=/bin/sh -c 'if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /bin/echo "OVS_USER_OPT=--ovs-user=${OVS_USER_ID}" >> /run/openvswitch.useropts; fi' + EnvironmentFile=-/run/openvswitch.useropts ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \ --no-ovs-vswitchd --no-monitor --system-id=random \ -- diff --git a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch.inc b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch.inc index 8aab739b..37fbe5ab 100644 --- a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch.inc +++ b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch.inc @@ -16,7 +16,7 @@ DEPENDS += "bridge-utils openssl python3 perl python3-six-native coreutils-nativ RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid coreutils \ python3 perl perl-module-strict ${PN}-switch \ bash python3-twisted python3-six" -RDEPENDS_${PN}-testcontroller = "${PN} lsb ${PN}-pki" +RDEPENDS_${PN}-testcontroller = "${PN} ${PN}-pki" RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen" RDEPENDS_${PN}-pki = "${PN}" RDEPENDS_${PN}-brcompat = "${PN} ${PN}-switch" @@ -129,6 +129,9 @@ do_install_append() { install -m 644 ${S}/rhel/usr_lib_systemd_system_ovsdb-server.service \ ${D}/${systemd_unitdir}/system/ovsdb-server.service + install -d ${D}/usr/share/openvswitch/scripts/ + install -m 755 ${S}/rhel/usr_share_openvswitch_scripts_ovs-systemd-reload ${D}/usr/share/openvswitch/scripts/ovs-systemd-reload + oe_runmake modules_install INSTALL_MOD_PATH=${D} install -d ${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages cp -r ${S}/python/ovstest/ ${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages/ diff --git a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch_git.bb b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch_git.bb index a9309332..07258be7 100644 --- a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch_git.bb +++ b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch_git.bb @@ -5,31 +5,29 @@ DEPENDS += "virtual/kernel" PACKAGE_ARCH = "${MACHINE_ARCH}" RDEPENDS_${PN}-ptest += "\ - python3-logging python3-syslog python3-io \ + python3-logging python3-syslog python3-io python3-core \ python3-fcntl python3-shell python3-xml python3-math \ python3-datetime python3-netclient python3 sed \ ldd perl-module-socket perl-module-carp perl-module-exporter \ perl-module-xsloader python3-netserver python3-threading \ - python3-resource findutils which \ + python3-resource findutils which diffutils \ " S = "${WORKDIR}/git" -PV = "2.10.0+${SRCREV}" +PV = "2.13+${SRCPV}" FILESEXTRAPATHS_append := "${THISDIR}/${PN}-git:" -SRCREV = "5563e309b80bbea9bff538e71ecfd7e5e538bab9" +SRCREV = "71d553b995d0bd527d3ab1e9fbaf5a2ae34de2f3" SRC_URI = "file://openvswitch-switch \ file://openvswitch-switch-setup \ file://openvswitch-testcontroller \ file://openvswitch-testcontroller-setup \ - git://github.com/openvswitch/ovs.git;protocol=git;branch=branch-2.10 \ - file://openvswitch-add-ptest-${SRCREV}.patch \ + git://github.com/openvswitch/ovs.git;protocol=git;branch=branch-2.13 \ + file://openvswitch-add-ptest-71d553b995d0bd527d3ab1e9fbaf5a2ae34de2f3.patch \ file://run-ptest \ file://disable_m4_check.patch \ file://kernel_module.patch \ - file://python-make-remaining-scripts-use-usr-bin-env.patch \ - file://0002-Define-WAIT_ANY-if-not-provided-by-system.patch \ file://python-switch-remaining-scripts-to-use-python3.patch \ file://systemd-update-tool-paths.patch \ file://systemd-create-runtime-dirs.patch \ diff --git a/external/meta-virtualization/recipes-networking/slirp4netns/slirp4netns_0.4.1.bb b/external/meta-virtualization/recipes-networking/slirp4netns/slirp4netns_0.4.1.bb new file mode 100644 index 00000000..b47df968 --- /dev/null +++ b/external/meta-virtualization/recipes-networking/slirp4netns/slirp4netns_0.4.1.bb @@ -0,0 +1,16 @@ +SUMMARY = "User-mode networking for unprivileged network namespaces." +DESCRIPTION = "slirp4netns allows connecting a network namespace to the \ +Internet in a completely unprivileged way, by connecting a TAP device in a \ +network namespace to the usermode TCP/IP stack ("slirp")." + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=1e2efd29c201480c6be2744d9edade26" + +SRCREV = "4d38845e2e311b684fc8d1c775c725bfcd5ddc27" +SRC_URI = "git://github.com/rootless-containers/slirp4netns.git;nobranch=1" + +DEPENDS = "glib-2.0 libcap libseccomp" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig |