net-dns/coredns: update to 1.13.2

Signed-off-by: Rahil Bhimjiani <me@rahil.rocks>
Part-of: https://github.com/gentoo/gentoo/pull/45003
Closes: https://github.com/gentoo/gentoo/pull/45003
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Rahil Bhimjiani 2025-12-12 22:58:09 +05:30 committed by Sam James
parent 873117b309
commit ef018c04b4
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
3 changed files with 112 additions and 2 deletions

View File

@ -2,3 +2,5 @@ DIST coredns-1.12.1-deps.tar.xz 9209492 BLAKE2B cf56598af4244c254933be32d966d857
DIST coredns-1.12.1.tar.gz 669045 BLAKE2B b1f75863a44b4cd75ab0d01f595576553a27bda11d989f78195181d78374d6bc208d25be8450c79b5a51ca5c7bffc90cbc273221688d86b6b71d2ab0acd2ad4c SHA512 a0b941a9631bb2429a7dab3cd4cff59aaba7c4c73cb16b9a7ae40894b968a0de47af656a77cfb3ad57ccfa7334be1e1a4d5ca33cab7bd426b7eb217c3ffb04b5
DIST coredns-1.12.2-deps.tar.xz 9286816 BLAKE2B 2a51001080bf5a09edb7921319019d797dc5df58dcdfb765c283ba0bf4d198c6246698a0f5935819e159ea60d4e81430490e0a03753aad1c5ee7a08c772b0dfc SHA512 8a9e64aece6dfa535b9e149ceef86a85edcf2da880131da4e527842ec8f2da4daeea4af8ce07da196f2e5cb2c95e1839725937ad69bf3282e08f60f36b34a619
DIST coredns-1.12.2.tar.gz 702782 BLAKE2B d6fbd6f4e43837e56da8a958361d69c26f824b1663d8be48f90d40dfcc32b85907130e762f32fa4ad32b9d98c9374c72537fa4cb322692aafeb5d778cb7e1399 SHA512 eeb209a60223ed1d41f904570c37e25bbc69217d78facfce521b25d787528877a8d4309856813fb2878b2531cc832ee6e07a339c01544c7c18079d700d1346bb
DIST coredns-1.13.2-deps.tar.xz 9947332 BLAKE2B 0e3d0fb5c89144b053b4010fc8d12b14b439555ea05bafd9e5cd78f143f98df3298f8879473639f78a386fed547ed9fde0de182562e50c0a7c45a91f821ce876 SHA512 9eb83d4293bf12517f0f127660f5c725f7c79a841820b3849df55812341745455997e22e7c70910562aa103a32cbc8b9273f9ef734d79f00baf851ecde94d87a
DIST coredns-1.13.2.tar.gz 748835 BLAKE2B 9552492c1df10185338e79e2419547b4c82386f717d0bd624b7c91ac85cb734c95554a21c7c87953a1a60b2d27ca290337d75fd85f2e2b0214b046fa93a54228 SHA512 1c325a6c9424c831e2652dc129e0688bde2766c7cc4a407ab0b2967ae782060d81ec52a1bfed27baf051ed9fecbae82a2bd423e5abf31e08699c4cf5f30a95a8

View File

@ -0,0 +1,108 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit fcaps go-module systemd tmpfiles
DESCRIPTION="CoreDNS is a DNS server that chains plugins"
HOMEPAGE="https://github.com/coredns/coredns"
if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/coredns/coredns.git"
else
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://github.com/rahilarious/gentoo-distfiles/releases/download/${P}/deps.tar.xz -> ${P}-deps.tar.xz"
KEYWORDS="~amd64"
fi
# main
LICENSE="Apache-2.0"
# deps
LICENSE+=" MIT BSD ISC MPL-2.0 BSD-2"
SLOT="0"
# TODO: debug test failure with deps tarball
RESTRICT="test"
RDEPEND="acct-user/coredns
acct-group/coredns"
FILECAPS=(
-m 755 'cap_net_bind_service=+ep' usr/bin/${PN}
)
src_unpack() {
if [[ ${PV} == 9999* ]]; then
git-r3_src_unpack
go-module_live_vendor
else
default
fi
}
src_prepare() {
[[ ${PV} != 9999* ]] && { ln -sv ../vendor ./ || die ; }
default
}
src_compile() {
[[ ${PV} == 9999* ]] && local GIT_COMMIT="$(git describe --dirty --always)"
ego build -ldflags="-s -w -X github.com/coredns/coredns/coremain.GitCommit=${GIT_COMMIT}"
}
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
}

View File

@ -1,9 +1,9 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit fcaps go-module multiprocessing systemd tmpfiles toolchain-funcs
inherit fcaps go-module systemd tmpfiles
DESCRIPTION="CoreDNS is a DNS server that chains plugins"
HOMEPAGE="https://github.com/coredns/coredns"