1 |
commit: 54c7c5e2305c7cc94a96dc921b6711b02aeb53ce |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 28 17:42:42 2022 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 28 17:42:42 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54c7c5e2 |
7 |
|
8 |
net-dns/coredns: add 1.9.3 |
9 |
|
10 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
11 |
|
12 |
net-dns/coredns/Manifest | 2 + |
13 |
net-dns/coredns/coredns-1.9.3.ebuild | 89 ++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 91 insertions(+) |
15 |
|
16 |
diff --git a/net-dns/coredns/Manifest b/net-dns/coredns/Manifest |
17 |
index 74f2a56dbba8..c1e417963e76 100644 |
18 |
--- a/net-dns/coredns/Manifest |
19 |
+++ b/net-dns/coredns/Manifest |
20 |
@@ -1,2 +1,4 @@ |
21 |
DIST coredns-1.8.3-deps.tar.xz 160097444 BLAKE2B e7c59bc3b732b84211bb2142edf6953eec839adac239b92082eb86aebd6d3f31b7e736000ba789836acc0cd88c3beda30b6f208f1192a878889399c43328c1ef SHA512 9b519214762aee3c28071a21cc052ecfa32b001cca56b99f5fe675a0cc6c08aadb68bfe0bedf39ca87040d18c906b9e2c8829acd9741b3b1e333d6c27ae7fa74 |
22 |
DIST coredns-1.8.3.tar.gz 553278 BLAKE2B 8dddf12686e498f937c057a2fd539ff455980deef1dc889f8e7f6891a712dedb4089528c0a228240332603a37040ab22f80e17af38998a73757f9d1c18d28064 SHA512 2cc2754e9e626d40a2101f17744e8c57bd6d469eacbb4cfee965c2bf485156ae91f4cc99f8e63b5641163e8716c9614b6f9481fb91acb96e62951044bdac1fa8 |
23 |
+DIST coredns-1.9.3-deps.tar.xz 205913904 BLAKE2B d5a630d7afa14577e1d5b9aba48a43808b990bc6e550408d141b509253c611266e3d5b5acc33222582693d7542630c0efdad973535564a37434a50dc67289099 SHA512 d954e73c3f6c3d1c37d959420c92cd59aa61bb5b2f69fdbcf017cbba173a0b8e9e0d73ef85e9b7fa8657c9916afd4843df0886058815c7df854ec3ddc67eae1d |
24 |
+DIST coredns-1.9.3.tar.gz 624914 BLAKE2B a27e73da8c67ff38d33757bf8fdae5938574b1b0f4db4a469e67e6063c1643b0dc60227646998b87bbd79d48bdf8c792be432ae253b54fca0d6afdec1138bad7 SHA512 d0c24c5d9f27883519e0d6edf917c6e0051b80627a320a20f6d5ee3e154f65790d1f66b5e0255aeed66874ff5826b2ab3d1237d6fd53452e7dfaf3b34b17fdfb |
25 |
|
26 |
diff --git a/net-dns/coredns/coredns-1.9.3.ebuild b/net-dns/coredns/coredns-1.9.3.ebuild |
27 |
new file mode 100644 |
28 |
index 000000000000..f2aae567db44 |
29 |
--- /dev/null |
30 |
+++ b/net-dns/coredns/coredns-1.9.3.ebuild |
31 |
@@ -0,0 +1,89 @@ |
32 |
+# Copyright 1999-2022 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+ |
37 |
+# Don't forget to update when bumping. Used in --version output |
38 |
+EGIT_COMMIT="45b0a11294c59bfd806a57807aaa2a185f761cd5" |
39 |
+ |
40 |
+inherit fcaps go-module systemd tmpfiles |
41 |
+ |
42 |
+ARCHIVE_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
43 |
+SRC_URI="${ARCHIVE_URI} https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz" |
44 |
+ |
45 |
+KEYWORDS="~amd64" |
46 |
+ |
47 |
+DESCRIPTION="A DNS server that chains middleware" |
48 |
+HOMEPAGE="https://github.com/coredns/coredns" |
49 |
+ |
50 |
+LICENSE="Apache-2.0 MIT BSD ISC MPL-2.0 BSD-2" |
51 |
+SLOT="0" |
52 |
+RDEPEND="acct-user/coredns |
53 |
+ acct-group/coredns" |
54 |
+ |
55 |
+# TODO: debug test failure with deps tarball |
56 |
+RESTRICT+=" test" |
57 |
+ |
58 |
+FILECAPS=( |
59 |
+ -m 755 'cap_net_bind_service=+ep' usr/bin/${PN} |
60 |
+) |
61 |
+ |
62 |
+src_compile() { |
63 |
+ go build -v -ldflags="-X github.com/coredns/coredns/coremain.GitCommit=${EGIT_COMMIT}" || |
64 |
+ die "go build failed" |
65 |
+} |
66 |
+ |
67 |
+src_install() { |
68 |
+ dobin "${PN}" |
69 |
+ einstalldocs |
70 |
+ doman man/* |
71 |
+ |
72 |
+ newinitd "${FILESDIR}"/coredns.initd coredns |
73 |
+ newconfd "${FILESDIR}"/coredns.confd coredns |
74 |
+ |
75 |
+ insinto /etc/coredns/ |
76 |
+ newins "${FILESDIR}"/Corefile.example Corefile |
77 |
+ |
78 |
+ insinto /etc/logrotate.d |
79 |
+ newins "${FILESDIR}"/coredns.logrotated coredns |
80 |
+ |
81 |
+ systemd_dounit "${FILESDIR}"/coredns.service |
82 |
+ newtmpfiles "${FILESDIR}"/coredns.tmpfiles "${PN}.conf" |
83 |
+} |
84 |
+ |
85 |
+src_test() { |
86 |
+ # eclass default '-x' makes tests output unreadable |
87 |
+ export GOFLAGS="-v -mod=readonly" |
88 |
+ |
89 |
+ local known_fail=( |
90 |
+ "TestZoneExternalCNAMELookupWithProxy" |
91 |
+ "TestMetricsSeveralBlocs" |
92 |
+ "TestMetricsAvailable" |
93 |
+ "TestMetricsAvailableAfterReload" |
94 |
+ "TestMetricsAvailableAfterReloadAndFailedReload" |
95 |
+ ) |
96 |
+ # concat as '|^Test1$|^Test2$|^Test3...$': |
97 |
+ local known_fail_re="$(printf '|^%s$' "${known_fail[@]}")" |
98 |
+ # drop '|' in the begining: |
99 |
+ known_fail_re="${known_fail_re:1}" |
100 |
+ |
101 |
+ local working_tests_re="$( |
102 |
+ # get list of all test: |
103 |
+ { GOFLAGS="-mod=readonly" go test -list . ./... || |
104 |
+ die "Can't get list of tests"; } | |
105 |
+ # skip "no tests" messages as well as know failures: |
106 |
+ grep -v -E " |${known_fail_re}" | |
107 |
+ # format a regexp: |
108 |
+ sed -z 's/\n/$|^/g' |
109 |
+ )" |
110 |
+ # drop '|^' in the end: |
111 |
+ working_tests_re="^${working_tests_re::-2}" |
112 |
+ |
113 |
+ go test -race -run "${working_tests_re}" ./... || die "Tests failed" |
114 |
+ go test -race -run "${known_fail_re}" ./... || ewarn "Known test failure" |
115 |
+} |
116 |
+ |
117 |
+pkg_postinst() { |
118 |
+ fcaps_pkg_postinst |
119 |
+ tmpfiles_process ${PN}.conf |
120 |
+} |