From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D0AFD158041 for ; Thu, 21 Mar 2024 15:58:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D31A6E29B6; Thu, 21 Mar 2024 15:58:20 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B2AC9E29B6 for ; Thu, 21 Mar 2024 15:58:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A9D4F34164C for ; Thu, 21 Mar 2024 15:58:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BCCA8ED1 for ; Thu, 21 Mar 2024 15:58:17 +0000 (UTC) From: "Rahil Bhimjiani" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Rahil Bhimjiani" Message-ID: <1711036616.3adf3880e01ee86f72142b96298e5f38dc245e96.rahilarious@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: net-dns/AdGuardHome/ X-VCS-Repository: repo/proj/guru X-VCS-Files: net-dns/AdGuardHome/AdGuardHome-0.107.46.ebuild net-dns/AdGuardHome/Manifest X-VCS-Directories: net-dns/AdGuardHome/ X-VCS-Committer: rahilarious X-VCS-Committer-Name: Rahil Bhimjiani X-VCS-Revision: 3adf3880e01ee86f72142b96298e5f38dc245e96 X-VCS-Branch: dev Date: Thu, 21 Mar 2024 15:58:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 934a9ecd-6fcd-4cc2-b711-6de350b18459 X-Archives-Hash: 1b09be2cada4679d5fa609c0abf45b19 commit: 3adf3880e01ee86f72142b96298e5f38dc245e96 Author: Rahil Bhimjiani rahil rocks> AuthorDate: Thu Mar 21 15:54:51 2024 +0000 Commit: Rahil Bhimjiani gmail com> CommitDate: Thu Mar 21 15:56:56 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3adf3880 net-dns/AdGuardHome: add 0.107.46 Signed-off-by: Rahil Bhimjiani rahil.rocks> net-dns/AdGuardHome/AdGuardHome-0.107.46.ebuild | 142 ++++++++++++++++++++++++ net-dns/AdGuardHome/Manifest | 3 + 2 files changed, 145 insertions(+) diff --git a/net-dns/AdGuardHome/AdGuardHome-0.107.46.ebuild b/net-dns/AdGuardHome/AdGuardHome-0.107.46.ebuild new file mode 100644 index 0000000000..c760965a48 --- /dev/null +++ b/net-dns/AdGuardHome/AdGuardHome-0.107.46.ebuild @@ -0,0 +1,142 @@ +# Copyright 1999-2024 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="7964837" +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/${P}/wiki.tar.xz -> ${PN}-wiki-${WIKI_COMMIT}.tar.xz + web? ( https://github.com/AdguardTeam/${PN}/releases/download/v${PV}/AdGuardHome_frontend.tar.gz -> ${P}-frontend.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" + +BDEPEND="app-arch/unzip" + +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 + # move frontend to project directory + use web && { rm -v build/gitkeep && mv -v ../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.43.service "${PN}".service +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/net-dns/AdGuardHome/Manifest b/net-dns/AdGuardHome/Manifest index 329e947636..cdc5dccb48 100644 --- a/net-dns/AdGuardHome/Manifest +++ b/net-dns/AdGuardHome/Manifest @@ -7,4 +7,7 @@ DIST AdGuardHome-0.107.44.tar.gz 2243237 BLAKE2B f7a7299304f915de2c5e1a673170d48 DIST AdGuardHome-0.107.45-deps.tar.xz 109986456 BLAKE2B a2b78f368d3fb406cae26c3869fd5c30588373a4c58687e5821c75afe943ada8e7f79f18625cd324e0979b8d11a2964fcfc10fe1ce99750a3abbc0952f5d8880 SHA512 31d6fa1758aaac5039b5310dedd851ca3125eddc183dee33ef8c34af9ba9637fca197d278910854746c24d7dc9fa1628ccca12e38b39b8456879e38e6eefc9e6 DIST AdGuardHome-0.107.45-frontend.tar.gz 2793159 BLAKE2B 361a10477317787e2ed414f92bc3d01724182fe7054be2ce0febc68968a3227b875baa1e3b01aee1374652b22d395128041a23af923cffd437c7a9ead31b622b SHA512 68f1163459673e0213675d195196aaabb564b50640d005ef0664653a2580da6f3fbf84e1c6034119e7f55260b03d61d4513c65e8fd1a00ea5c8a856b2946b822 DIST AdGuardHome-0.107.45.tar.gz 2248687 BLAKE2B 257fbd716d769657c9b40a03f91f7dcaaee5c59788b43c86d1b90120f301cfbbfdf68f547143b6505d5bed70f03e992ca6ca3d86d0b1e9b760d0a21d9a19db89 SHA512 cfbb6eaacde706c9ce1bb632484a8d18a915be9642435fbeff087e9cc8cb8f6c787a244068a2f4cc051750a367558aa7487af7c4c58b88d28b64df7e80b55e09 +DIST AdGuardHome-0.107.46-deps.tar.xz 2617456 BLAKE2B b53495335b348bcc86dd1c03765e14e6d30a85a60405179d5de9105ebc83ffc39dc035ff6c58adec9f92dfe3dee9714a563372f16902e8c8956b32926b4b117c SHA512 15b7521f038914757ff9e72f441b78957750a26730041adea57488548711402b76a642ae49fc970f69aea84e5d033a146fd201cb8707c0de099be096ae68a81c +DIST AdGuardHome-0.107.46-frontend.tar.gz 2791684 BLAKE2B 086826322a3cfa799081bc7b67ae91f7222cb4fa020e0be51ab6f46cb862edca967289f66747dc95f287a48e342e91156f9d155e1080aa2ca02b342223ce8192 SHA512 b4b9b5f9dfae16af9b6a77ca70226ad30e7ecf7eff883bf071304b4a3583ad6bc57d122f956db2bf7cd199abeb582f14e91393740062396eebc376d1c1018ad6 +DIST AdGuardHome-0.107.46.tar.gz 2258665 BLAKE2B d3b7a6cd24e35fc22fc90919ce7143fbe3475891f151011b5c059f66cbcb78b756d40e797cbee5a1cc2d22064969abac329165f16794619e1b60ea6b22366692 SHA512 aaac649e162885c7128a0e8596b03a2b3e1a53fb605ff6d0070e97632d5b8141a3ebba6f93e7f17a51e69394dace0f5bc9b7715a739137dca6740a678ff6a075 DIST AdGuardHome-wiki-7964837.tar.xz 44012 BLAKE2B 0cef0fb890e9fd80db12d74abd39ea90efa5561e11fba0e9df55b5e48536cd5a604d18bd17907921568d73bcc1b08ebb2980e16cb4e1eeb37be10ef89a106243 SHA512 2177fe47986f3086804ef900d2e338efbaf647df7f81d8b28235f77f0375681f96db112d3b06f69ee36706fc44698bdd960b919f5b87f82546ce87cb93b3f196