From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1195773-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 5E66E138359
	for <garchives@archives.gentoo.org>; Wed, 12 Aug 2020 07:59:56 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id C595CE092F;
	Wed, 12 Aug 2020 07:59:54 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 97101E092F
	for <gentoo-commits@lists.gentoo.org>; Wed, 12 Aug 2020 07:59:54 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 670E534F48F
	for <gentoo-commits@lists.gentoo.org>; Wed, 12 Aug 2020 07:59:53 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 0F39D9C
	for <gentoo-commits@lists.gentoo.org>; Wed, 12 Aug 2020 07:59:52 +0000 (UTC)
From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" <juippis@gentoo.org>
Message-ID: <1597219180.4a77a7c4a87f6a387a7a628e62c2b852c9c236d7.juippis@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/kube-router/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-cluster/kube-router/Manifest sys-cluster/kube-router/kube-router-1.0.1.ebuild
X-VCS-Directories: sys-cluster/kube-router/
X-VCS-Committer: juippis
X-VCS-Committer-Name: Joonas Niilola
X-VCS-Revision: 4a77a7c4a87f6a387a7a628e62c2b852c9c236d7
X-VCS-Branch: master
Date: Wed, 12 Aug 2020 07:59:52 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 46b880d8-e46b-49e7-a890-a6fee6ce24ad
X-Archives-Hash: 962c9c9335973c7082c0bdc282a11d8d

commit:     4a77a7c4a87f6a387a7a628e62c2b852c9c236d7
Author:     Konstantin Podshumok <kpp.live+signed <AT> gmail <DOT> com>
AuthorDate: Mon Jul 20 22:47:17 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Aug 12 07:59:40 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a77a7c4

sys-cluster/kube-router: bump v1.0.1.ebuild

Signed-off-by: Konstantin Podshumok <kpp.live+signed <AT> gmail.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 sys-cluster/kube-router/Manifest                 |   1 +
 sys-cluster/kube-router/kube-router-1.0.1.ebuild | 198 +++++++++++++++++++++++
 2 files changed, 199 insertions(+)

diff --git a/sys-cluster/kube-router/Manifest b/sys-cluster/kube-router/Manifest
index 6cf2a1e48fc..4b66844af34 100644
--- a/sys-cluster/kube-router/Manifest
+++ b/sys-cluster/kube-router/Manifest
@@ -1,2 +1,3 @@
 DIST kube-router-0.3.1.tar.gz 8468463 BLAKE2B 23ee608e6415b3627f5024c8778ae1f33c5db3c1c564d0eb1e0fcb45dd90ff4a148c39e7fd0a4888d6b4cf13b129c5249c2db868efa584f15e31c7ff539829d5 SHA512 185e3a58dc6112e33ed7dc5702795dd7be0a37b63c7c882a1c092060a57a755ea4ea5c2cc96c93210bee632a4a4c4b19f3506ceb44b96d4727cf62cb2f28818f
 DIST kube-router-0.4.0.tar.gz 8403982 BLAKE2B e5e9e92064f00d696ca1cde310813541910d3e37b9c31336b1f2729e63a963fb454a2a9d07b2394134b9ea96e64d6caa26b6230bfd214883f5951bcfdd30c674 SHA512 00617e434b770c1b5eeb3f2c85ae9b6f49157224a5df223f5d1ec514ba087164bb03f0e28a38c75d3149c0c028ed54ceccf898a77c474bbf64921f45db7c3e3c
+DIST kube-router-1.0.1.tar.gz 8413249 BLAKE2B dd158fda5a25925d1f630764f7ad77a821c145def887093692333fcdb4e9a3d9736fe3243f7834abf60d71835fe37a81e4d0a9f20cb45e05d9bb817a50d81196 SHA512 a84176785367fb87562a9a410d87376d938fb32c8aec0cd71259ca3af2204b76ba083201b5f2ad38b395a83a321f0feec4b304a4f3add595b5eadf0837a6918b

diff --git a/sys-cluster/kube-router/kube-router-1.0.1.ebuild b/sys-cluster/kube-router/kube-router-1.0.1.ebuild
new file mode 100644
index 00000000000..f1c72e8048b
--- /dev/null
+++ b/sys-cluster/kube-router/kube-router-1.0.1.ebuild
@@ -0,0 +1,198 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+EGO_PN="github.com/cloudnativelabs/${PN}"
+
+inherit golang-build golang-vcs-snapshot
+
+KEYWORDS="~amd64"
+
+DESCRIPTION="A turnkey solution for Kubernetes networking"
+HOMEPAGE="https://kube-router.io"
+SRC_URI="https://github.com/cloudnativelabs/kube-router/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 MIT BSD BSD-2 MPL-2.0 ISC LGPL-3-with-linking-exception"
+
+SLOT="0"
+
+RDEPEND="
+	net-firewall/iptables[conntrack]
+	net-firewall/ipset
+	sys-cluster/ipvsadm
+"
+
+# Vendored dependencies (helps with LICENSE, see https://bugs.gentoo.org/694792):
+# github.com/PuerkitoBio/purell # BSD
+# github.com/PuerkitoBio/urlesc # BSD
+# github.com/armon/go-radix # MIT
+# github.com/aws/aws-sdk-go # Apache-2.0
+# github.com/beorn7/perks # MIT
+# github.com/containernetworking/cni # Apache-2.0
+# github.com/coreos/go-iptables # Apache-2.0
+# github.com/docker/distribution # Apache-2.0
+# github.com/docker/docker # Apache-2.0
+# github.com/docker/go-connections # Apache-2.0
+# github.com/docker/go-units # Apache-2.0
+# github.com/docker/libnetwork # Apache-2.0
+# github.com/davecgh/go-spew # ISC
+# github.com/dgryski/go-farm # MIT
+# github.com/eapache/channels # MIT
+# github.com/eapache/queue # MIT
+# github.com/emicklei/go-restful # MIT
+# github.com/emicklei/go-restful-swagger12 # MIT
+# github.com/fsnotify/fsnotify # BSD
+# github.com/ghodss/yaml # MIT BSD
+# github.com/go-ini/ini # Apache-2.0
+# github.com/go-openapi/jsonpointer # Apache-2.0
+# github.com/go-openapi/jsonreference # Apache-2.0
+# github.com/go-openapi/spec # Apache-2.0
+# github.com/go-openapi/swag # Apache-2.0
+# github.com/gogo/protobuf # BSD
+# github.com/golang/glog # Apache-2.0
+# github.com/golang/protobuf # BSD
+# github.com/google/btree # Apache-2.0
+# github.com/google/gofuzz # Apache-2.0
+# github.com/googleapis/gnostic # Apache-2.0
+# github.com/gregjones/httpcache # MIT
+# github.com/hashicorp/golang-lru # MPL-2.0
+# github.com/hashicorp/hcl # MPL-2.0
+# github.com/howeyc/gopass # ISC
+# github.com/imdario/mergo # BSD
+# github.com/influxdata/influxdb # MIT
+# github.com/jmespath/go-jmespath # Apache-2.0
+# github.com/json-iterator/go # MIT
+# github.com/juju/ratelimit # LGPL-3-with-linking-exception
+# github.com/magiconair/properties # BSD-2
+# github.com/mailru/easyjson # MIT
+# github.com/matttproud/golang_protobuf_extensions # Apache-2.0
+# github.com/mitchellh/mapstructure # MIT
+# github.com/modern-go/concurrent # Apache-2.0
+# github.com/modern-go/reflect2 # Apache-2.0
+# github.com/opencontainers/go-digest # Apache-2.0
+# github.com/opencontainers/image-spec # Apache-2.0
+# github.com/osrg/gobgp # Apache-2.0
+# github.com/pelletier/go-toml # MIT
+# github.com/peterbourgon/diskv # MIT
+# github.com/pkg/errors # BSD-2
+# github.com/prometheus/client_golang # Apache-2.0
+# github.com/prometheus/client_model # Apache-2.0
+# github.com/prometheus/common # Apache-2.0
+# github.com/prometheus/procfs # Apache-2.0
+# github.com/satori/go.uuid # MIT
+# github.com/sirupsen/logrus # MIT
+# github.com/spf13/afero # Apache-2.0
+# github.com/spf13/cast # MIT
+# github.com/spf13/jwalterweatherman # MIT
+# github.com/spf13/pflag # BSD
+# github.com/spf13/viper # MIT
+# github.com/vishvananda/netlink # Apache-2.0
+# github.com/vishvananda/netns # Apache-2.0
+# google.golang.org/genproto # Apache-2.0
+# google.golang.org/grpc # Apache-2.0
+# golang.org/x/crypto # BSD
+# golang.org/x/net # BSD
+# golang.org/x/sys # BSD
+# golang.org/x/text # BSD
+# k8s.io/api # Apache-2.0
+# k8s.io/apimachinery # Apache-2.0
+# k8s.io/client-go # Apache-2.0
+# k8s.io/kube-openapi # Apache-2.0
+# gopkg.in/inf.v0 # BSD
+# gopkg.in/tomb.v2 # BSD
+# gopkg.in/yaml.v2 # Apache-2.0 && MIT
+
+# Test dependencies:
+# github.com/onsi/ginkgo # MIT
+# github.com/onsi/gomega # MIT
+
+src_prepare() {
+	eapply_user
+	# we are going to remove some stuff that is not required for compoilation
+	# but may have some license issues
+	local unneeded_dir
+	local unneeded_dirs=(
+		github.com/howeyc/gopass/terminal_solaris.go
+		github.com/docker/libnetwork/client/mflag
+		github.com/prometheus/client_model/ruby
+		github.com/docker/docker/contrib
+
+		github.com/Microsoft/go-winio
+		github.com/inconshreveable/mousetrap
+
+		github.com/petar/GoLLRB
+		github.com/spf13/cobra
+	)
+	for unneeded_dir in ${unneeded_dirs[@]}; do
+		mv -v "${S}/src/${EGO_PN}/vendor/${unneeded_dir}" "${T}" || \
+			die "can't remove ${unneeded_dir}"
+	done
+}
+
+src_compile() {
+	pushd "src/${EGO_PN}" || die
+	GOPATH="${S}" go build -x -work -v \
+		-ldflags "-X 'github.com/cloudnativelabs/kube-router/pkg/cmd.version=${PV}' "\
+"-X 'github.com/cloudnativelabs/kube-router/pkg/cmd.buildDate=$(date -u +%FT%T%z)'" \
+		-o kube-router cmd/kube-router/kube-router.go || die
+	popd || die
+}
+
+src_test() {
+	local line
+	local testdirs="github.com/cloudnativelabs/kube-router/cmd/kube-router/
+		github.com/cloudnativelabs/kube-router/pkg/..."
+
+	local known_fail=(
+		Test_advertiseClusterIPs
+		Test_advertiseExternalIPs
+		Test_advertiseAnnotationOptOut
+		Test_advertiseAnnotationOptIn
+		Test_advertisePodRoute
+		Test_syncInternalPeers
+		Test_AddPolicies
+		Test_routeReflectorConfiguration
+	)
+
+	# concat as '|^Test1$|^Test2$|^Test3...$':
+	local known_fail_re="$(printf '|^%s$' "${known_fail[@]}" || die)"
+	# drop '|' in the begining:
+	known_fail_re="${known_fail_re:1}"
+
+	einfo "Looking for tests"
+	local working_tests_re="$(
+		# get list of all test:
+		{
+			GOFLLAGS="-mod=readonly" GOPATH="${S}" \
+				go test -list . ${testdirs} ||
+			die "Can't get list of tests";
+		} |
+		{ while read line; do echo "${line}"; echo "${line}" >&2; done; } |
+		# skip "no tests" messages as well as know failures:
+		{ grep -v -E " |${known_fail_re}" || die "Can't parse tests list"; } |
+		# format a regexp:
+		{ sed -z 's/\n/$|^/g' || die; }
+	)"
+	# drop '|^' in the end:
+	working_tests_re="^${working_tests_re::-2}"
+
+	GOFLLAGS="-mod=readonly" GOPATH="${S}" \
+		go test -v -timeout 30s -run "${working_tests_re}" ${testdirs} || \
+			die "Tests failed"
+	GOFLLAGS="-mod=readonly" GOPATH="${S}" \
+		go test -v -timeout 30s -run "${known_fail_re}" ${testdirs} || \
+			ewarn "Known test failure"
+}
+
+src_install() {
+	pushd "src/${EGO_PN}" || die
+	dobin "${PN}"
+	einstalldocs
+	popd || die
+
+	newinitd "${FILESDIR}"/kube-router.initd kube-router
+	newconfd "${FILESDIR}"/kube-router.confd kube-router
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}"/kube-router.logrotated kube-router
+}