commit: 7f0f78ec85ddda3ecefd86ce24fe7d5b7f531aae Author: Rahil Bhimjiani <me <AT> rahil <DOT> rocks> AuthorDate: Fri Dec 12 06:33:53 2025 +0000 Commit: Rahil Bhimjiani <rahil3108 <AT> gmail <DOT> com> CommitDate: Fri Dec 12 06:33:53 2025 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=7f0f78ec
net-dns/AdGuardHome: update to 0.107.71 Signed-off-by: Rahil Bhimjiani <me <AT> rahil.rocks> net-dns/AdGuardHome/AdGuardHome-0.107.71.ebuild | 141 ++++++++++++++++++++++++ net-dns/AdGuardHome/Manifest | 4 + 2 files changed, 145 insertions(+) diff --git a/net-dns/AdGuardHome/AdGuardHome-0.107.71.ebuild b/net-dns/AdGuardHome/AdGuardHome-0.107.71.ebuild new file mode 100644 index 0000000000..7e047f1520 --- /dev/null +++ b/net-dns/AdGuardHome/AdGuardHome-0.107.71.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2025 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/" + +WIKI_COMMIT="da0097b" +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 + https://github.com/rahilarious/gentoo-distfiles/releases/download/${P}/wiki.tar.xz -> ${PN}-wiki-${WIKI_COMMIT}.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() { + ln -sv ../vendor ./ || die + + 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 +} diff --git a/net-dns/AdGuardHome/Manifest b/net-dns/AdGuardHome/Manifest index 651c032f0e..bf3aa26e4e 100644 --- a/net-dns/AdGuardHome/Manifest +++ b/net-dns/AdGuardHome/Manifest @@ -10,5 +10,9 @@ DIST AdGuardHome-0.107.63.tar.gz 2319402 BLAKE2B 5cd3b86080cb9c467f6f1a77992786b DIST AdGuardHome-0.107.64-deps.tar.xz 5203032 BLAKE2B 6b8952fff2cfbe8b9ce6e8e79f5f1cc183d84d0a0f9d07e07d3ad0327f8beb23b8c8d763cd2d5212066e6abb2159112051d50be5f4fda3b29b215fa291623069 SHA512 7065f9e53b06451c1099d38d39d4d5c405f6ff75d6a00d69be8674c8de69ee6c9b0453381c090854b0d5ae2e38712f66ade1a59c4bc6311f52fcce9a2a90e054 DIST AdGuardHome-0.107.64-web.tar.gz 2553149 BLAKE2B 7788e09b1be30f3aa302301bc9752ad9d45967e738f9a380ec82f2ab88e88de716aec1de76de8a3e2da612ccb5555508b3e38d756c5ca91a42cf583eb28e50f6 SHA512 16b8004aa0a78978f613dc543b4125cc055e34215ec380310334d7693cb4d82dd5e80294bbde75d580e93434fbb0f28f09b94cd8e9efdaabc97ecc297c72ab10 DIST AdGuardHome-0.107.64.tar.gz 2321767 BLAKE2B a877aea963800fbd3dddabf9043a230a88969bed0804fbb06ebfeae57c0147ccade2c769cc570d400ada4b7b93c2f72f5db049c35ccc9688724f8b4f1c01518f SHA512 fc9b158d0b4563817e01924f71b0358815563b2f46b38a5ab7483bc26f494938dbfaa62b4c422bca46e2e180322aaa36d87e71fd6bcdab7c8698a4b3b9f514b1 +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-wiki-5657b4b.tar.xz 181172 BLAKE2B 604484e8ecad6a1af61af5b3f5f46a20779951936e55eb51884081c161dd6a97b3a1ec08ad0fec2511ec5173944cacfbe8ca2d4b56c44b375b281671a2280068 SHA512 1a555490b6145a611c456e0443bcd07504c51c2cf1afa20ca74850479762297451c9096a0f0d03aa2f1fe95ae9fa500beb16d4d080d2525c71c987b52f0eb861 DIST AdGuardHome-wiki-ad09f2b.tar.xz 181172 BLAKE2B 604484e8ecad6a1af61af5b3f5f46a20779951936e55eb51884081c161dd6a97b3a1ec08ad0fec2511ec5173944cacfbe8ca2d4b56c44b375b281671a2280068 SHA512 1a555490b6145a611c456e0443bcd07504c51c2cf1afa20ca74850479762297451c9096a0f0d03aa2f1fe95ae9fa500beb16d4d080d2525c71c987b52f0eb861 +DIST AdGuardHome-wiki-da0097b.tar.xz 44752 BLAKE2B d53aaec1c694dac5782b2f44898da828579263fff11a2f397c5580e3b3e7633247754d6fbdf26d7395b4ed01232eb3af6ff161c907a51b8d9d0f8eb09f518e47 SHA512 ffebc99001fb37ef5fe38b5a2161cbf9eb67319c61fdaa56ff8690fbf4361b3e18a9050f836b3ec2383d9cdc2592fa9aa6564757876b5f5a615c33b8580e2255
