From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1448067-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 548E0158020
	for <garchives@archives.gentoo.org>; Tue, 18 Oct 2022 02:49:02 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 9DD91E08F4;
	Tue, 18 Oct 2022 02:49:01 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 83389E08F4
	for <gentoo-commits@lists.gentoo.org>; Tue, 18 Oct 2022 02:49:01 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id C62003410BB
	for <gentoo-commits@lists.gentoo.org>; Tue, 18 Oct 2022 02:49:00 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 477C05D7
	for <gentoo-commits@lists.gentoo.org>; Tue, 18 Oct 2022 02:48:59 +0000 (UTC)
From: "Zac Medico" <zmedico@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, "Zac Medico" <zmedico@gentoo.org>
Message-ID: <1666061335.36b27e842492f61360f6a9ebd6efa26a667f106d.zmedico@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/coredns/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-dns/coredns/Manifest net-dns/coredns/coredns-1.10.0.ebuild
X-VCS-Directories: net-dns/coredns/
X-VCS-Committer: zmedico
X-VCS-Committer-Name: Zac Medico
X-VCS-Revision: 36b27e842492f61360f6a9ebd6efa26a667f106d
X-VCS-Branch: master
Date: Tue, 18 Oct 2022 02:48:59 +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: 976bf368-b4a9-485c-8fd4-0bf5bdf27bd0
X-Archives-Hash: b4ac720c128b9f609e3466f98b7f852a

commit:     36b27e842492f61360f6a9ebd6efa26a667f106d
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 18 02:48:06 2022 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Oct 18 02:48:55 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36b27e84

net-dns/coredns: add 1.10.0

Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 net-dns/coredns/Manifest              |  2 +
 net-dns/coredns/coredns-1.10.0.ebuild | 89 +++++++++++++++++++++++++++++++++++
 2 files changed, 91 insertions(+)

diff --git a/net-dns/coredns/Manifest b/net-dns/coredns/Manifest
index c1e417963e76..db476103568c 100644
--- a/net-dns/coredns/Manifest
+++ b/net-dns/coredns/Manifest
@@ -1,3 +1,5 @@
+DIST coredns-1.10.0-deps.tar.xz 216362488 BLAKE2B e94075f547b604cdb770bf5b5f116dd99710d3011e48e9c7da0f2f8cb51c9128c60a4873f5152180ccac90008d50979b993f67b00fa836bea55f67cb32101156 SHA512 8ba7d76d4840abcd6cdedb3c7754e2dc94610c7996f3dbd7d7e81f3b624c8fee0a903679ef63c91ca86c799c744582ac9fe4a6766939abe3fee8d7c45a0a787d
+DIST coredns-1.10.0.tar.gz 656927 BLAKE2B 25803e0e62e75122d951123d0e04c60a9bee14756decbff9d1c8b27bd996e97d863be83961f03decd118eddc9c06c80709aa881a902dbf42f4c408ee2c4647c6 SHA512 ddec7ee0139105f417249756133d0384d28cd7f6960183644dfb26d6dfba43a80d461da65040f160a8a7e38785bfdc9f458b2bab2fe8ce82635e8dd0dd42a467
 DIST coredns-1.8.3-deps.tar.xz 160097444 BLAKE2B e7c59bc3b732b84211bb2142edf6953eec839adac239b92082eb86aebd6d3f31b7e736000ba789836acc0cd88c3beda30b6f208f1192a878889399c43328c1ef SHA512 9b519214762aee3c28071a21cc052ecfa32b001cca56b99f5fe675a0cc6c08aadb68bfe0bedf39ca87040d18c906b9e2c8829acd9741b3b1e333d6c27ae7fa74
 DIST coredns-1.8.3.tar.gz 553278 BLAKE2B 8dddf12686e498f937c057a2fd539ff455980deef1dc889f8e7f6891a712dedb4089528c0a228240332603a37040ab22f80e17af38998a73757f9d1c18d28064 SHA512 2cc2754e9e626d40a2101f17744e8c57bd6d469eacbb4cfee965c2bf485156ae91f4cc99f8e63b5641163e8716c9614b6f9481fb91acb96e62951044bdac1fa8
 DIST coredns-1.9.3-deps.tar.xz 205913904 BLAKE2B d5a630d7afa14577e1d5b9aba48a43808b990bc6e550408d141b509253c611266e3d5b5acc33222582693d7542630c0efdad973535564a37434a50dc67289099 SHA512 d954e73c3f6c3d1c37d959420c92cd59aa61bb5b2f69fdbcf017cbba173a0b8e9e0d73ef85e9b7fa8657c9916afd4843df0886058815c7df854ec3ddc67eae1d

diff --git a/net-dns/coredns/coredns-1.10.0.ebuild b/net-dns/coredns/coredns-1.10.0.ebuild
new file mode 100644
index 000000000000..d502e872e48e
--- /dev/null
+++ b/net-dns/coredns/coredns-1.10.0.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# Don't forget to update when bumping. Used in --version output
+EGIT_COMMIT="596a9f9e67dd9b01e15bc04a999460422fe65166"
+
+inherit fcaps go-module systemd tmpfiles
+
+ARCHIVE_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI="${ARCHIVE_URI} https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz"
+
+KEYWORDS="~amd64"
+
+DESCRIPTION="A DNS server that chains middleware"
+HOMEPAGE="https://github.com/coredns/coredns"
+
+LICENSE="Apache-2.0 MIT BSD ISC MPL-2.0 BSD-2"
+SLOT="0"
+RDEPEND="acct-user/coredns
+	acct-group/coredns"
+
+# TODO: debug test failure with deps tarball
+RESTRICT+=" test"
+
+FILECAPS=(
+	-m 755 'cap_net_bind_service=+ep' usr/bin/${PN}
+)
+
+src_compile() {
+	go build -v -ldflags="-X github.com/coredns/coredns/coremain.GitCommit=${EGIT_COMMIT}" ||
+		die "go build failed"
+}
+
+src_install() {
+	dobin "${PN}"
+	einstalldocs
+	doman man/*
+
+	newinitd "${FILESDIR}"/coredns.initd coredns
+	newconfd "${FILESDIR}"/coredns.confd coredns
+
+	insinto /etc/coredns/
+	newins "${FILESDIR}"/Corefile.example Corefile
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}"/coredns.logrotated coredns
+
+	systemd_dounit "${FILESDIR}"/coredns.service
+	newtmpfiles "${FILESDIR}"/coredns.tmpfiles "${PN}.conf"
+}
+
+src_test() {
+	# eclass default '-x' makes tests output unreadable
+	export GOFLAGS="-v -mod=readonly"
+
+	local known_fail=(
+		"TestZoneExternalCNAMELookupWithProxy"
+		"TestMetricsSeveralBlocs"
+		"TestMetricsAvailable"
+		"TestMetricsAvailableAfterReload"
+		"TestMetricsAvailableAfterReloadAndFailedReload"
+	)
+	# concat as '|^Test1$|^Test2$|^Test3...$':
+	local known_fail_re="$(printf '|^%s$' "${known_fail[@]}")"
+	# drop '|' in the begining:
+	known_fail_re="${known_fail_re:1}"
+
+	local working_tests_re="$(
+		# get list of all test:
+		{ GOFLAGS="-mod=readonly" go test -list . ./... ||
+			die "Can't get list of tests"; } |
+		# skip "no tests" messages as well as know failures:
+		grep -v -E " |${known_fail_re}" |
+		# format a regexp:
+		sed -z 's/\n/$|^/g'
+	)"
+	# drop '|^' in the end:
+	working_tests_re="^${working_tests_re::-2}"
+
+	go test -race -run "${working_tests_re}" ./... || die "Tests failed"
+	go test -race -run "${known_fail_re}" ./... || ewarn "Known test failure"
+}
+
+pkg_postinst() {
+	fcaps_pkg_postinst
+	tmpfiles_process ${PN}.conf
+}