From nobody Mon Oct 14 17:32:11 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XS46g3PsNz5Yt1P; Mon, 14 Oct 2024 17:32:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XS46g1Vpqz4dfn; Mon, 14 Oct 2024 17:32:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728927131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qkDpK2HzvvmWm+hRFGc5NHhu1O+uYqt6TZMbpC8tsl4=; b=DmO5flX2vn8eqzZLGCeZlfEk2U2V6wdp4QU6dY3T0Q+Iq37jvlwwlBMzSSxCgyZXtpkZbJ cADgO/2c+ethg6ZuEjE1FAdkVODfcoAWNWjbd44PZavrnx0octIbYyiLW/hNIc4W8Urq3s lZ30YfzFJNKgCZd9VsP1gJft80dws9M4uwBvgG40++npiju7bR1VtpRrqDVuWeTnaClMgW 4Rm/hQtFIgh/aMwaLDdJlPfha6BpHT5oq409vv2+Odpl/uD56fAPeqWxSlzKbyoEicd6VQ 3g8m5yyXLGvnLj+Ufdcw7Yft5InPdvsRm7S4JWunJqCcl+wjhfXVhhyWWKwY4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728927131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qkDpK2HzvvmWm+hRFGc5NHhu1O+uYqt6TZMbpC8tsl4=; b=p28cE1tJ6Ua+7y4UorcVAZPL8co97XfB4E5syzJq/2bbEHAJs5htsv/03UCxKtu+8MFlFt Ifwzy9dT+Fu74hFIBCxOJMqbGDv8gz9H4W6Tv99XjVRULQgnnklXUDaHzBQrIX/sZjMEzg ibGZvgYmqsZsWZI0mwhIF7H9IzKU7foPc7YYM2M5qPXck8lxwqpShTCXCs4bbYQTYLoWS0 jB/K52ydbWv2K6AX2N/PigjbGXNOWXJtGnk8xUg8DcgzmRcVac0HJLXAkOhG1CzDq4HgnE khrZ7YTjvFanWYp2Fg2X6eeregEcbuP1dX9HRShYbEZcfdLUoTqcwttZzcM8gA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728927131; a=rsa-sha256; cv=none; b=VENfTp32RTUKZovIeK8Tv0cY6q1o99L18trBR7AqbujBYNt7HF+ZHk+uaRyQAk3Aahprbb EPg90zXQH56fGGzO7CYU0DpY5zzPHob03VUqbOxocNUNIEIppekMwum3o9BxQAp1B7ym8r vWpMrW9cHLU+jJNlDov3t1bVdeMM2Uwin79X91eQk9dD4WtSciL622KIR4QJmKSreBN1G4 OIXXtmc6pj55EPJneuuBU9duWxAVw2gNPc0wlF6HDd3ps+0zDnIjISoPVzVfED8NR80FQh BfAb9PdCvostDO4ETxM4Mv5SqugEm/40A8hJjvtx4gj0SgPgFjHFIZohwZqwiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XS46g161Fzmq3; Mon, 14 Oct 2024 17:32:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49EHWBd0097464; Mon, 14 Oct 2024 17:32:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EHWBMn097461; Mon, 14 Oct 2024 17:32:11 GMT (envelope-from git) Date: Mon, 14 Oct 2024 17:32:11 GMT Message-Id: <202410141732.49EHWBMn097461@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: b521c14b6d8a - main - www/adguardhome: update 0.107.51 =?utf-8?Q?=E2=86=92?= 0.107.53 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b521c14b6d8a099a172e55e869de65a99680cd47 Auto-Submitted: auto-generated The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=b521c14b6d8a099a172e55e869de65a99680cd47 commit b521c14b6d8a099a172e55e869de65a99680cd47 Author: Denis Shaposhnikov AuthorDate: 2024-10-14 15:02:33 +0000 Commit: Yuri Victorovich CommitDate: 2024-10-14 17:32:08 +0000 www/adguardhome: update 0.107.51 → 0.107.53 PR: 281875 --- www/adguardhome/Makefile | 47 +++++++++------------------- www/adguardhome/distinfo | 16 +++++----- www/adguardhome/files/adguardhome.in | 59 ++++++++++++++++++------------------ www/adguardhome/files/newsyslog.conf | 5 +++ www/adguardhome/files/patch-go.mod | 10 ++++++ www/adguardhome/pkg-plist | 3 ++ 6 files changed, 70 insertions(+), 70 deletions(-) diff --git a/www/adguardhome/Makefile b/www/adguardhome/Makefile index 8cdc2f055541..95d394f1b173 100644 --- a/www/adguardhome/Makefile +++ b/www/adguardhome/Makefile @@ -1,8 +1,9 @@ PORTNAME= adguardhome DISTVERSIONPREFIX= v -DISTVERSION= 0.107.51 -PORTREVISION= 4 +DISTVERSION= 0.107.53 CATEGORIES= www +MASTER_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/releases/download/${DISTVERSIONFULL}/ +DISTFILES= ${GH_PROJECT}_frontend${EXTRACT_SUFX} MAINTAINER= yuri@FreeBSD.org COMMENT= Network-wide ads & trackers blocking DNS server @@ -13,47 +14,29 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.txt RUN_DEPENDS= ca_root_nss>=0:security/ca_root_nss -USES= cpe go:1.22,modules +USES= cpe go:1.23,modules -GO_MODULE= github.com/AdguardTeam/AdGuardHome -GO_BUILDFLAGS= -ldflags="-s -w -X github.com/AdguardTeam/AdGuardHome/internal/version.version=${DISTVERSION}" # workaround for https://github.com/AdguardTeam/AdGuardHome/issues/4774 - -# to rebuild the deps archives: -# 1. set DEV_UPDATE_MODE=yes -# 2. make makesum build -# 3. upload the *-html-{build,client}* archives -# 4. set DEV_UPDATE_MODE=no -# 5. make clean makesum +GH_ACCOUNT= AdguardTeam +GH_PROJECT= AdGuardHome -DEV_UPDATE_MODE= no +GO_MODULE= github.com/AdguardTeam/AdGuardHome +GO_BUILDFLAGS= -ldflags="-s -w -X github.com/${GH_ACCOUNT}/${GH_PROJECT}/internal/version.version=${DISTVERSION}" # workaround for https://github.com/AdguardTeam/AdGuardHome/issues/4774 USER= root # it has to run as root because it listens on the privileged DNS port GROUP= wheel SUB_LIST= USER=${USER} GROUP=${GROUP} USE_RC_SUBR= ${PORTNAME} +PLIST_SUB= PORTNAME=${PORTNAME} CPE_VENDOR= adguard -.if (${DEV_UPDATE_MODE} == "yes") -BUILD_DEPENDS= npm:www/npm \ - yarn:www/yarn -MAKE_ENV+= NODE_OPTIONS=--openssl-legacy-provider # workaround suggested in https://github.com/AdguardTeam/AdGuardHome/issues/6585 - -do-build: - @cd ${WRKSRC} && \ - ${SETENV} ${MAKE_ENV} ${MAKE_CMD} js-deps js-build && \ - ${TAR} czf ${DISTDIR}/${DIST_SUBDIR}/${PORTNAME}-html-build-${DISTVERSION}${EXTRACT_SUFX} build && \ - ${TAR} czf ${DISTDIR}/${DIST_SUBDIR}/${PORTNAME}-html-client-${DISTVERSION}${EXTRACT_SUFX} client && \ - ${ECHO} "Please upload files ${DISTDIR}/${DIST_SUBDIR}/${PORTNAME}-html-build-${DISTVERSION}${EXTRACT_SUFX} and ${DISTDIR}/${DIST_SUBDIR}/${PORTNAME}-html-client-${DISTVERSION}${EXTRACT_SUFX}" -.else -MASTER_SITES= LOCAL/yuri/:deps -DISTFILES= ${PORTNAME}-html-build-${DISTVERSION}${EXTRACT_SUFX}:deps \ - ${PORTNAME}-html-client-${DISTVERSION}${EXTRACT_SUFX}:deps - pre-build: - @${CP} -r ${WRKDIR}/build ${WRKDIR}/client ${WRKSRC}/ -.endif + @${CP} -r ${WRKDIR}/build ${WRKSRC}/ -PLIST_FILES= bin/${PORTNAME} +post-install: + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} \ + ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d + ${INSTALL_DATA} ${FILESDIR}/newsyslog.conf \ + ${STAGEDIR}${EXAMPLESDIR}/newsyslog.conf .include diff --git a/www/adguardhome/distinfo b/www/adguardhome/distinfo index 83d0dfa44d43..48a2b454f73c 100644 --- a/www/adguardhome/distinfo +++ b/www/adguardhome/distinfo @@ -1,9 +1,7 @@ -TIMESTAMP = 1717774829 -SHA256 (go/www_adguardhome/adguardhome-v0.107.51/adguardhome-html-build-0.107.51.tar.gz) = 9e1c7f95401fc2555aa0cdf4475b3d06cf35ea86ce106fcc9bcd31b617e7ea0f -SIZE (go/www_adguardhome/adguardhome-v0.107.51/adguardhome-html-build-0.107.51.tar.gz) = 2817042 -SHA256 (go/www_adguardhome/adguardhome-v0.107.51/adguardhome-html-client-0.107.51.tar.gz) = f2ab3c324162e485795baae7293713b0b1c86141610148f392eb1999687f9e34 -SIZE (go/www_adguardhome/adguardhome-v0.107.51/adguardhome-html-client-0.107.51.tar.gz) = 36857142 -SHA256 (go/www_adguardhome/adguardhome-v0.107.51/v0.107.51.mod) = 674f69b0bd06161f1a8689b32eb5709cf1cfe3e5eb15afd601f00d9a1694f22c -SIZE (go/www_adguardhome/adguardhome-v0.107.51/v0.107.51.mod) = 2597 -SHA256 (go/www_adguardhome/adguardhome-v0.107.51/v0.107.51.zip) = cbd015bd2b5683d5cef9c17f6fc0ed055e96c3a07bd2aa98caaeb76a7c0e665c -SIZE (go/www_adguardhome/adguardhome-v0.107.51/v0.107.51.zip) = 2688166 +TIMESTAMP = 1728926887 +SHA256 (go/www_adguardhome/adguardhome-v0.107.53/AdGuardHome_frontend.tar.gz) = 69047225e2a5474e55fa56d12b71ba4e58e36b5af299f27099d216e1e7ab7f43 +SIZE (go/www_adguardhome/adguardhome-v0.107.53/AdGuardHome_frontend.tar.gz) = 2455367 +SHA256 (go/www_adguardhome/adguardhome-v0.107.53/v0.107.53.mod) = d1bc920c2193b1fcbfebcd8794b905295dbd610a21fe3de039546e079966b594 +SIZE (go/www_adguardhome/adguardhome-v0.107.53/v0.107.53.mod) = 2786 +SHA256 (go/www_adguardhome/adguardhome-v0.107.53/v0.107.53.zip) = 0e308e24be562dd2691a0549c12d360785afc72516d555f0931409b60dc4fe7c +SIZE (go/www_adguardhome/adguardhome-v0.107.53/v0.107.53.zip) = 2712383 diff --git a/www/adguardhome/files/adguardhome.in b/www/adguardhome/files/adguardhome.in index 347814f8a0d3..16035b8c1ff4 100644 --- a/www/adguardhome/files/adguardhome.in +++ b/www/adguardhome/files/adguardhome.in @@ -9,62 +9,63 @@ . /etc/rc.subr -name=adguardhome -rcvar=adguardhome_enable +name="adguardhome" +rcvar="${name}_enable" -load_rc_config $name +load_rc_config "$name" -: ${adguardhome_enable:=NO} -: ${adguardhome_config:=%%PREFIX%%/etc/AdGuardHome.yaml} -: ${adguardhome_user:=%%USER%%} -: ${adguardhome_group:=%%GROUP%%} -: ${adguardhome_work_dir:=/var/db/adguardhome} -: ${adguardhome_work_dir_data:=/var/db/adguardhome/data} -: ${adguardhome_svcj_options:="net_basic"} +: "${adguardhome_enable:=NO}" +: "${adguardhome_config:=%%PREFIX%%/etc/AdGuardHome.yaml}" +: "${adguardhome_user:=%%USER%%}" +: "${adguardhome_group:=%%GROUP%%}" +: "${adguardhome_work_dir:=/var/db/adguardhome}" +: "${adguardhome_svcj_options:=net_basic}" +: "${adguardhome_extra:=}" # old values -: ${adguardhome_config_old:=%%PREFIX%%/bin/AdGuardHome.yaml} -: ${adguardhome_work_dir_data_old:=%%PREFIX%%/bin/data} +: "${adguardhome_config_old:=%%PREFIX%%/bin/AdGuardHome.yaml}" +: "${adguardhome_work_dir_old:=%%PREFIX%%/bin}" logfile="/var/log/${name}.log" pidfile="/var/run/${name}.pid" -procname=%%PREFIX%%/bin/adguardhome command="/usr/sbin/daemon" -command_args="-u ${adguardhome_user} -o ${logfile} -t ${name} -p ${pidfile} %%PREFIX%%/bin/adguardhome -c ${adguardhome_config} -w ${adguardhome_work_dir}" +command_args="-H -o $logfile -t $name -P $pidfile %%PREFIX%%/bin/adguardhome -c $adguardhome_config -w $adguardhome_work_dir $adguardhome_extra" start_precmd="${name}_prestart" +extra_commands="reload" adguardhome_prestart() { # check if the old config exists - if [ -f ${adguardhome_config_old} ] || [ -d ${adguardhome_work_dir_data_old} ]; then - if ! [ -f ${adguardhome_config} ] && ! [ -d ${adguardhome_work_dir_data} ]; then # old config exists, new config doesn't exist + if [ -f "$adguardhome_config_old" ] || [ -d "${adguardhome_work_dir_old}/data" ]; then + if ! [ -f "$adguardhome_config" ] && ! [ -d "${adguardhome_work_dir}/data" ]; then + # old config exists, new config doesn't exist # move old config to new locations - if [ -f ${adguardhome_config_old} ]; then - echo "moving old config ${adguardhome_config_old} to the new location ${adguardhome_config}" - mv ${adguardhome_config_old} ${adguardhome_config} + if [ -f "$adguardhome_config_old" ]; then + echo "moving old config $adguardhome_config_old to the new location $adguardhome_config" + mv "$adguardhome_config_old" "$adguardhome_config" fi - if [ -d ${adguardhome_work_dir_data_old} ]; then - install -d -m 0750 -o ${adguardhome_user} -g ${adguardhome_group} \ - ${adguardhome_work_dir} - echo "moving old config ${adguardhome_work_dir_data_old} to the new location ${adguardhome_work_dir_data}" - mv ${adguardhome_work_dir_data_old} ${adguardhome_work_dir_data} + if [ -d "${adguardhome_work_dir_old}/data" ]; then + install -d -m 0750 -o "$adguardhome_user" \ + -g "$adguardhome_group" "$adguardhome_work_dir" + echo "moving old config ${adguardhome_work_dir_old}/data to the new location ${adguardhome_work_dir}/data" + mv "${adguardhome_work_dir_old}/data" "${adguardhome_work_dir}/data" fi else # both old and new config exist echo "(!!!) WARNING ==================================================================" echo "(!!!) WARNING Both old and new configs exist" echo "(!!!) WARNING Please choose which configs do you need and remove the old configs" - echo "(!!!) WARNING OLD config locations: ${adguardhome_config_old} ${adguardhome_work_dir_data_old}" - echo "(!!!) WARNING NEW config locations: ${adguardhome_config} ${adguardhome_work_dir_data}" + echo "(!!!) WARNING OLD config locations: $adguardhome_config_old ${adguardhome_work_dir_old}/data" + echo "(!!!) WARNING NEW config locations: $adguardhome_config ${adguardhome_work_dir}/data" echo "(!!!) WARNING ==================================================================" fi fi # install dir - if [ ! -d ${adguardhome_work_dir} ]; then - install -d -m 0750 -o ${adguardhome_user} -g ${adguardhome_group} \ - ${adguardhome_work_dir} + if [ ! -d "$adguardhome_work_dir" ]; then + install -d -m 0750 -o "$adguardhome_user" -g "$adguardhome_group" \ + "$adguardhome_work_dir" fi } diff --git a/www/adguardhome/files/newsyslog.conf b/www/adguardhome/files/newsyslog.conf new file mode 100644 index 000000000000..492184b74a5f --- /dev/null +++ b/www/adguardhome/files/newsyslog.conf @@ -0,0 +1,5 @@ +# Newsyslog configuration file for zrepl. +# See newsyslog.conf(5) for details. +# +# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] +/var/log/adguardhome.log 644 5 1000 @0101T JC /var/run/adguardhome.pid diff --git a/www/adguardhome/files/patch-go.mod b/www/adguardhome/files/patch-go.mod new file mode 100644 index 000000000000..a0181dc3e1a2 --- /dev/null +++ b/www/adguardhome/files/patch-go.mod @@ -0,0 +1,10 @@ +--- go.mod.orig 1979-11-29 23:00:00 UTC ++++ go.mod +@@ -1,6 +1,6 @@ module github.com/AdguardTeam/AdGuardHome + module github.com/AdguardTeam/AdGuardHome + +-go 1.23.2 ++go 1.23 + + require ( + github.com/AdguardTeam/dnsproxy v0.73.2 diff --git a/www/adguardhome/pkg-plist b/www/adguardhome/pkg-plist new file mode 100644 index 000000000000..2b6b53d5cc7f --- /dev/null +++ b/www/adguardhome/pkg-plist @@ -0,0 +1,3 @@ +bin/%%PORTNAME%% +@sample %%EXAMPLESDIR%%/newsyslog.conf etc/newsyslog.conf.d/adguardhome.conf +@dir etc/newsyslog.conf.d