From 6cddc1cb150243c09c1c82070322f643da0d7af0 Mon Sep 17 00:00:00 2001 From: Geoff Levand Date: Mon, 5 Jun 2017 10:05:36 -0700 Subject: [PATCH] flannel-wrapper: Enable on arm64 Signed-off-by: Geoff Levand --- .../files/flannel-docker-opts.service | 2 +- .../flannel-wrapper/files/flanneld.service | 2 +- .../flannel-wrapper-0.7.1-r1.ebuild | 16 +++++++++++++--- .../coreos-base/coreos/coreos-0.0.1.ebuild | 2 +- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/app-admin/flannel-wrapper/files/flannel-docker-opts.service b/sdk_container/src/third_party/coreos-overlay/app-admin/flannel-wrapper/files/flannel-docker-opts.service index ac0e4df468..911b67aed7 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-admin/flannel-wrapper/files/flannel-docker-opts.service +++ b/sdk_container/src/third_party/coreos-overlay/app-admin/flannel-wrapper/files/flannel-docker-opts.service @@ -9,7 +9,7 @@ Before=docker.service [Service] Type=oneshot -Environment="FLANNEL_IMAGE_TAG=v0.7.1" +Environment="FLANNEL_IMAGE_TAG=@FLANNEL_IMAGE_TAG@" Environment="RKT_RUN_ARGS=--uuid-file-save=/var/lib/coreos/flannel-wrapper2.uuid" Environment="FLANNEL_IMAGE_ARGS=--exec=/opt/bin/mk-docker-opts.sh" diff --git a/sdk_container/src/third_party/coreos-overlay/app-admin/flannel-wrapper/files/flanneld.service b/sdk_container/src/third_party/coreos-overlay/app-admin/flannel-wrapper/files/flanneld.service index dfcd63b349..9171d2cc37 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-admin/flannel-wrapper/files/flanneld.service +++ b/sdk_container/src/third_party/coreos-overlay/app-admin/flannel-wrapper/files/flanneld.service @@ -12,7 +12,7 @@ TimeoutStartSec=300 LimitNOFILE=40000 LimitNPROC=1048576 -Environment="FLANNEL_IMAGE_TAG=v0.7.1" +Environment="FLANNEL_IMAGE_TAG=@FLANNEL_IMAGE_TAG@" Environment="FLANNEL_OPTS=--ip-masq=true" Environment="RKT_RUN_ARGS=--uuid-file-save=/var/lib/coreos/flannel-wrapper.uuid" EnvironmentFile=-/run/flannel/options.env diff --git a/sdk_container/src/third_party/coreos-overlay/app-admin/flannel-wrapper/flannel-wrapper-0.7.1-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/app-admin/flannel-wrapper/flannel-wrapper-0.7.1-r1.ebuild index 9d4cb7e6eb..f306643fde 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-admin/flannel-wrapper/flannel-wrapper-0.7.1-r1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-admin/flannel-wrapper/flannel-wrapper-0.7.1-r1.ebuild @@ -8,7 +8,7 @@ inherit systemd DESCRIPTION="flannel (System Application Container)" HOMEPAGE="https://github.com/coreos/flannel" -KEYWORDS="amd64" +KEYWORDS="amd64 arm64" SRC_URI="" LICENSE="Apache-2.0" @@ -23,11 +23,21 @@ RDEPEND=" S="$WORKDIR" src_install() { + local tag="v${PV}" + if [[ "${ARCH}" != "amd64" ]]; then + tag+="-${ARCH}" + fi + exeinto /usr/lib/coreos doexe "${FILESDIR}"/flannel-wrapper - systemd_dounit "${FILESDIR}"/flanneld.service - systemd_dounit "${FILESDIR}"/flannel-docker-opts.service + sed "s|@FLANNEL_IMAGE_TAG@|${tag}|g" \ + "${FILESDIR}"/flanneld.service > ${T}/flanneld.service + systemd_dounit ${T}/flanneld.service + + sed "s|@FLANNEL_IMAGE_TAG@|${tag}|g" \ + "${FILESDIR}"/flannel-docker-opts.service > ${T}/flannel-docker-opts.service + systemd_dounit ${T}/flannel-docker-opts.service insinto /usr/lib/systemd/network doins "${FILESDIR}"/50-flannel.network diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild index 7426033b73..8ab2bc1f2c 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild @@ -82,11 +82,11 @@ RDEPEND="${RDEPEND} app-emulation/xenstore sys-auth/realmd sys-auth/sssd - app-admin/flannel-wrapper )" RDEPEND="${RDEPEND} app-admin/etcd-wrapper + app-admin/flannel-wrapper app-admin/fleet app-admin/kubelet-wrapper app-admin/locksmith