commit: f6a1220473b596ad7af15fa71b3e573fe7fa8cfa Author: Rahil Bhimjiani <me <AT> rahil <DOT> rocks> AuthorDate: Mon Jul 28 23:38:31 2025 +0000 Commit: Rahil Bhimjiani <rahil3108 <AT> gmail <DOT> com> CommitDate: Mon Jul 28 23:38:31 2025 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f6a12204
net-dns/AdGuardHome: update to 0.107.64 Signed-off-by: Rahil Bhimjiani <me <AT> rahil.rocks> net-dns/AdGuardHome/AdGuardHome-0.107.64.ebuild | 141 ++++++++++++++++++++++++ net-dns/AdGuardHome/Manifest | 3 + 2 files changed, 144 insertions(+) diff --git a/net-dns/AdGuardHome/AdGuardHome-0.107.64.ebuild b/net-dns/AdGuardHome/AdGuardHome-0.107.64.ebuild new file mode 100644 index 0000000000..3ed98e6209 --- /dev/null +++ b/net-dns/AdGuardHome/AdGuardHome-0.107.64.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="ad09f2b" +SRC_URI=" + https://github.com/AdguardTeam/${PN}/archive/refs/tags/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/${PN}-0.107.57/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 72a45dec5b..651c032f0e 100644 --- a/net-dns/AdGuardHome/Manifest +++ b/net-dns/AdGuardHome/Manifest @@ -7,5 +7,8 @@ DIST AdGuardHome-0.107.61.tar.gz 2269745 BLAKE2B 79f6d4e1b57a803a42f9a7d4abe5fc7 DIST AdGuardHome-0.107.63-deps.tar.xz 5310180 BLAKE2B e574095b1279afa7b1a9274df358d28d630da8daca09801f61d5a808be0e12748dfd9354bfdc370c1d65e6753dc99cfe300552daacae2454c43abf28dc1f4295 SHA512 c1726eb2e03fe03afc23b300c9ad5bbe97067215313a8d12fdc76712e49baddd2d189fb3ce5a19e0ed0bf27284b05fb0aa15ce83a048946a371c9169c5a6029d DIST AdGuardHome-0.107.63-web.tar.gz 2554041 BLAKE2B 4eb67d1ca79e99923cff5706765b8db1f84dcd980e298b7f1cb84e84197954793a4f1296d446048d3c4af152d9aefd2c11e2aa40e70684514eaffd24b3f70b5f SHA512 0350c38aa1700b9b4657ba7b041bd63eb3fe5f6abfa73adb344006b552656ccadc742c528e54d188211e7310e23d39c224df9c775885134d655c576fe9e5ba80 DIST AdGuardHome-0.107.63.tar.gz 2319402 BLAKE2B 5cd3b86080cb9c467f6f1a77992786b66b088b21923022d309493ee0c22bdcf0f4a4e44ccb7ca3fac96b0416576cbd301773fe897b6b5af29b0c5cf5ac98829d SHA512 c1e3b074ebf1b1a842858c609e483a9b2b11124f4a3f588296691a697873bdc1fffd2b5155e9a4ab14947b04f526a8ae6c4362c6d7de0f9be415cf41c0670fb0 +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-wiki-5657b4b.tar.xz 181172 BLAKE2B 604484e8ecad6a1af61af5b3f5f46a20779951936e55eb51884081c161dd6a97b3a1ec08ad0fec2511ec5173944cacfbe8ca2d4b56c44b375b281671a2280068 SHA512 1a555490b6145a611c456e0443bcd07504c51c2cf1afa20ca74850479762297451c9096a0f0d03aa2f1fe95ae9fa500beb16d4d080d2525c71c987b52f0eb861 DIST AdGuardHome-wiki-ad09f2b.tar.xz 181172 BLAKE2B 604484e8ecad6a1af61af5b3f5f46a20779951936e55eb51884081c161dd6a97b3a1ec08ad0fec2511ec5173944cacfbe8ca2d4b56c44b375b281671a2280068 SHA512 1a555490b6145a611c456e0443bcd07504c51c2cf1afa20ca74850479762297451c9096a0f0d03aa2f1fe95ae9fa500beb16d4d080d2525c71c987b52f0eb861
