net-dns/AdGuardHome: update to 0.107.76

Signed-off-by: Rahil Bhimjiani <me@rahil.rocks>
This commit is contained in:
Rahil Bhimjiani
2026-05-31 00:33:23 +05:30
parent 31b4dda4f2
commit 6d76bdf87a
2 changed files with 140 additions and 0 deletions

View File

@@ -0,0 +1,137 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit fcaps go-module readme.gentoo-r1 systemd
DESCRIPTION="Network-wide ads & trackers blocking DNS server like Pi-Hole with web ui"
HOMEPAGE="https://github.com/AdguardTeam/AdGuardHome/"
SRC_URI="
https://github.com/AdguardTeam/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
https://github.com/rahilarious/gentoo-distfiles/releases/download/${P}/deps.tar.xz -> ${P}-deps.tar.xz
web? ( https://github.com/AdguardTeam/AdGuardHome/releases/download/v${PV}/AdGuardHome_frontend.tar.gz -> ${P}-web.tar.gz )
"
# main
LICENSE="GPL-3"
# deps
LICENSE+=" Apache-2.0 BSD BSD-2 MIT ZLIB"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
IUSE="+web"
# RESTRICT="test"
FILECAPS=(
-m 755 'cap_net_bind_service=+eip cap_net_raw=+eip' usr/bin/${PN}
)
PATCHES=(
"${FILESDIR}"/disable-update-cmd-opt.patch
)
DOCS="
${PN}.wiki/*
"
DOC_CONTENTS="\n
User is advised to not run binary directly instead use systemd service\n\n
Defaults for systemd service:\n
Web UI: 0.0.0.0:3000\n
Data directory: /var/lib/${PN}\n
Default config: /var/lib/${PN}/${PN}.yaml
"
src_unpack() {
# because we're using vendor/ so we don't need go-module_src_unpack
default
}
src_prepare() {
default
# symlinking doesn't work for some reason so MUST `mv`
use web && { rm -v build/gitkeep && rmdir build && mv ../build ./ || die ; }
}
src_compile() {
# mimicking https://github.com/AdguardTeam/AdGuardHome/blob/master/scripts/make/go-build.sh
local MY_LDFLAGS="-s -w"
MY_LDFLAGS+=" -X github.com/AdguardTeam/AdGuardHome/internal/version.version=${PV}"
MY_LDFLAGS+=" -X github.com/AdguardTeam/AdGuardHome/internal/version.channel=release"
MY_LDFLAGS+=" -X github.com/AdguardTeam/AdGuardHome/internal/version.committime=$(date +%s)"
if [ "$(go env GOARM)" != '' ]
then
MY_LDFLAGS+=" -X github.com/AdguardTeam/AdGuardHome/internal/version.goarm=$(go env GOARM)"
elif [ "$(go env GOMIPS)" != '' ]
then
MY_LDFLAGS+=" -X github.com/AdguardTeam/AdGuardHome/internal/version.gomips=$(go env GOMIPS)"
fi
ego build -ldflags "${MY_LDFLAGS}" -trimpath -v=1 -x=1
}
src_test() {
# mimicking https://github.com/AdguardTeam/AdGuardHome/blob/master/scripts/make/go-test.sh
count_flags='--count=1'
cover_flags='--coverprofile=./coverage.txt'
shuffle_flags='--shuffle=on'
timeout_flags="--timeout=30s"
fuzztime_flags="--fuzztime=20s"
readonly count_flags cover_flags shuffle_flags timeout_flags fuzztime_flags
# race only works when pie is disabled
export GOFLAGS="${GOFLAGS/-buildmode=pie/}"
# following test is failing without giving any reason. Tried disabling internal/updater internal/whois tests toggling race, but still failing.
# ego test\
# "$count_flags"\
# "$cover_flags"\
# "$shuffle_flags"\
# --race=1\
# "$timeout_flags"\
# ./...
# mimicking https://github.com/AdguardTeam/AdGuardHome/blob/master/scripts/make/go-bench.sh
ego test\
"$count_flags"\
"$shuffle_flags"\
--race=0\
"$timeout_flags"\
--bench='.'\
--benchmem\
--benchtime=1s\
--run='^$'\
./...
# mimicking https://github.com/AdguardTeam/AdGuardHome/blob/master/scripts/make/go-fuzz.sh
ego test\
"$count_flags"\
"$shuffle_flags"\
--race=0\
"$timeout_flags"\
"$fuzztime_flags"\
--fuzz='.'\
--run='^$'\
./internal/filtering/rulelist/\
;
}
src_install() {
dobin "${PN}"
dosym -r /usr/bin/"${PN}" /usr/bin/adguardhome
einstalldocs
readme.gentoo_create_doc
systemd_newunit "${FILESDIR}"/AdGuardHome-0.107.63.service "${PN}".service
}
pkg_postinst() {
readme.gentoo_print_elog
}

View File

@@ -7,5 +7,8 @@ DIST AdGuardHome-0.107.64.tar.gz 2321767 BLAKE2B a877aea963800fbd3dddabf9043a230
DIST AdGuardHome-0.107.71-deps.tar.xz 5072116 BLAKE2B c54351471ac3129ab6f88d9267546fc6dca56d9a158f64aae3b15449d290fbdac177fe1efaaebb7ca0a08fe2e97368540fcd19496b8a47dbb17cca1d554dd78c SHA512 94aac6f2bd6205aa8bf00c859b0568bd88df11ee081a34a509f85e588a513c01ef2acf0e766de9b0a5e999bfe6410bdf4b7efb9ca14c7941264b75b2078b3ec3
DIST AdGuardHome-0.107.71-web.tar.gz 2598727 BLAKE2B 7295e21965ed076002bded008159d7c8504f5f69eeef4e843d908ad4e9060049249775ae03cf9e443f72890fa937fe2b32c3cd42ca77d338a7fdbb2d617e9f06 SHA512 45682ca3f59a05be36543948377dd04c723a2ca905f5d9772f655d8835e1ed1c0b1456e609918886e6fe8afab4452d776f39a5e2bc80855348d2e407922a13dd
DIST AdGuardHome-0.107.71.tar.gz 2366341 BLAKE2B 2619d0fbe8e6e4e67df6bc4898c7b1f5fec2885614b1a3b4b9b53a14268b0dfaf6d2a8748d6eb9629b0a5717dfb65c43b64c1b09230f8bd975e7143bacfff683 SHA512 af6e6d207fe2f87543b7db4549783561be715397613d4eb964fa8da3275a297babed4ed9b5a77b45ec4372f513dc61f4c8428b3240be763b8b278fd3ff5c6a72
DIST AdGuardHome-0.107.76-deps.tar.xz 5778796 BLAKE2B c4bc760975884a20d8e4c32ea53e5108f3182b9d4609d874819da22d450b35bbd717c4378f9929f63da81c5d277f22121667ccf9f32072c48842a16c768b0e21 SHA512 953aacbcae938a78d748973eae2d3728c25503aba0cb8cfae617aab0b2c1337083a7bce1f8fff5d12be008cb2154281749e30fbe112a37037e6dc15de5ae7974
DIST AdGuardHome-0.107.76-web.tar.gz 2578604 BLAKE2B 5094826d9c0234769db572a626672e8039750ef7ab719bf10464bf7fd20f655e26f59b091e1d9d76dd11c3847334bee4f8ddf4b78bcc67572ca0db6cc1a2cd7d SHA512 61e49874f2aaf53cbf2b66baa4a5015822c60be06c8d5fe20214241158e83b0ef72f95ae3091dc564164af0a13252a719f3956b8d56aad577abef17274099245
DIST AdGuardHome-0.107.76.tar.gz 2351664 BLAKE2B 5c1f2ca6f10ea1dfea8d9b0b9c79910ee6950521e6078fdf1306847cc849bba5cea9cf4f40604154585c3e4d649114ba0dba9441ce8388ed8a5984213cf88e0b SHA512 0d7e393e7189c568aed6324ad50e573b044039f30725a2345710450184bd75cc6387f8a323d8e546aed6a0a91ead9a3cc81675070b8ad94e52747e168b2a796c
DIST AdGuardHome-wiki-ad09f2b.tar.xz 181172 BLAKE2B 604484e8ecad6a1af61af5b3f5f46a20779951936e55eb51884081c161dd6a97b3a1ec08ad0fec2511ec5173944cacfbe8ca2d4b56c44b375b281671a2280068 SHA512 1a555490b6145a611c456e0443bcd07504c51c2cf1afa20ca74850479762297451c9096a0f0d03aa2f1fe95ae9fa500beb16d4d080d2525c71c987b52f0eb861
DIST AdGuardHome-wiki-da0097b.tar.xz 44752 BLAKE2B d53aaec1c694dac5782b2f44898da828579263fff11a2f397c5580e3b3e7633247754d6fbdf26d7395b4ed01232eb3af6ff161c907a51b8d9d0f8eb09f518e47 SHA512 ffebc99001fb37ef5fe38b5a2161cbf9eb67319c61fdaa56ff8690fbf4361b3e18a9050f836b3ec2383d9cdc2592fa9aa6564757876b5f5a615c33b8580e2255