From nobody Mon Sep 26 08:46:41 2022 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 4Mbbw16Pp9z4dS1d; Mon, 26 Sep 2022 08:46:41 +0000 (UTC) (envelope-from rene@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mbbw15wt7z3Nrh; Mon, 26 Sep 2022 08:46:41 +0000 (UTC) (envelope-from rene@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664182001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3TJjE38lq8/8Ton0gbvN9apioXpgF63Jk2p1Zcf91m4=; b=MOgWBWLdPXnFjjINhJcDruaiKeti9+nBb9JkFLO1GGCati8xi6hLL7rIOvAs0/ir/K81QK qxciHOt+5kuyICka7nN7ajwOf5T/sFnZ/cfIOcYmolyOL3jfuyLnHzQsP03OgLNu5AOzx6 hNTvad8RkJaPn3+f/qxxLgqYtzXHRNi8cx7Nrj2rWd7Yp18qlBaOkZPqFtntc4wTvrc4rp c4H7WvI4Gje1pwaNZBoZggl2F0itmLeKfQ6vqMcz36BVY+z0u2d2y676F91sMvPNBUB213 E1UMV2Xgx3HGug+xy68RaVUcKf6EuQnoX8O/O0eidZFprzckFZ3S1VM+u3DQJQ== Received: by freefall.freebsd.org (Postfix, from userid 1185) id A8A2CA97F; Mon, 26 Sep 2022 08:46:41 +0000 (UTC) Date: Mon, 26 Sep 2022 08:46:41 +0000 From: Rene Ladan To: Carlo Strub Cc: ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Subject: Re: git: 918612d6fe2e - main - security/arti: Fix rc.d service using daemon, update URL Message-ID: References: <202209251622.28PGM06A017195@gitrepo.freebsd.org> 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: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202209251622.28PGM06A017195@gitrepo.freebsd.org> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664182001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3TJjE38lq8/8Ton0gbvN9apioXpgF63Jk2p1Zcf91m4=; b=vLrb9teBCV/IzvHhTxBR2X0xWMzdnlYL/W+f5aw/ZYzfxg7pEdqb9IAqirZ21WsSoNEO7G dlbcuFDIRBWbRNxqEACAebmVA4DzrqYFY7sSsbXiwylT8mYudlJTXRcCN4u0HmLpcl06ua 2yxnBx8SQ3W5rgyxPNtvPdH+LF/Et0+OH3Gtq0xRerVjQkT4EEoxX7k9y7rmbFG5TnviA2 1PMG7uoND9u9hBHWKBA6iteXo9dVetodrfYt6vKuHkaPv1L5cRTf/+DuSyY4/R+5oSyOrN MXON2tj6FMzR7uyWR1KJR8bD0Y/mm8M9MY/npcXeEsj4Red18ZWvompljCkrmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664182001; a=rsa-sha256; cv=none; b=lSKYM7apbptxQFBUH6VasOmhDMdJN6FgATauf9W8vOH0cCSdiE4Fp/uauqQV8YKGKpSF2F jiphAtj5l+uPhTgNIzxmW/qu/IV+6az62P2aJrjw4iHgnwkEcrBaVDzcjBK/XMTqwWxhrI QhP2lxdHLWYvtUnPKTdqCMDpFmCMs79mQ25SXVKfNrOjlaDyZhpKtq2E65JY8LcvZJKwLM sZOeVZuxWSWpp6fifDb5XgSn1S4ONU9fgikwfk9+G72rSrUj/PSjOvTQc4sFmbN81Z8KQw 5lobh4Tr3dqsYKbvWAFCuGb/lwWD6OBWRrQfRFfkrVbioVDtw9Hq800NaWgIFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Sun, Sep 25, 2022 at 04:22:00PM +0000, Carlo Strub wrote: > The branch main has been updated by cs: > > URL: https://cgit.FreeBSD.org/ports/commit/?id=918612d6fe2e312a1a57446d1c8f9c72df400e9e > Again (somewhat) based upon PR 266296. Just closing that PR as OBE somehow doesn't feel right to me. Perhaps I'm just grumpy again. René > commit 918612d6fe2e312a1a57446d1c8f9c72df400e9e > Author: Carlo Strub > AuthorDate: 2022-09-25 16:21:15 +0000 > Commit: Carlo Strub > CommitDate: 2022-09-25 16:21:15 +0000 > > security/arti: Fix rc.d service using daemon, update URL > --- > GIDs | 2 +- > UIDs | 2 +- > security/arti/Makefile | 11 ++--- > security/arti/files/arti.in | 51 ++++++++++++++-------- > .../patch-crates_arti_src_arti-example-config.toml | 10 +++-- > 5 files changed, 48 insertions(+), 28 deletions(-) > > diff --git a/GIDs b/GIDs > index 4e3ef856f3a4..743b8d57e5e9 100644 > --- a/GIDs > +++ b/GIDs > @@ -251,7 +251,7 @@ jicofo:*:307:jitsi > jvb:*:308:jitsi > wazuh:*:309: > cardano:*:310: > -# free: 311 > +_arti:*:311: > _sphinx:*:312: > _fastdfs:*:313: > # free: 314 > diff --git a/UIDs b/UIDs > index 1e52a1072fe9..1fa5eb54fad1 100644 > --- a/UIDs > +++ b/UIDs > @@ -256,7 +256,7 @@ jicofo:*:307:307::0:0:Jitsi Conference Focus Owner:/nonexistent:/usr/sbin/nologi > jvb:*:308:308::0:0:Jitsi VideoBridge Owner:/nonexistent:/usr/sbin/nologin > wazuh:*:309:309::0:0:Wazuh Owner:/var/ossec:/usr/sbin/nologin > cardano:*:310:310::0:0:Cardano Node Daemon:/nonexistent:/usr/sbin/nologin > -# free: 311 > +_arti:*:311:311::0:0:Arti Daemon:/nonexistent:/usr/sbin/nologin > _sphinx:*:312:312::0:0:Sphinxsearch Owner:/nonexistent:/usr/sbin/nologin > _fastdfs:*:313:313::0:0:FastDFS Owner:/nonexistent:/usr/sbin/nologin > # free: 314 > diff --git a/security/arti/Makefile b/security/arti/Makefile > index fa8ffb74ba0a..3fea1e343fde 100644 > --- a/security/arti/Makefile > +++ b/security/arti/Makefile > @@ -1,19 +1,20 @@ > PORTNAME= arti > DISTVERSION= 1.0.0 > +PORTREVISION= 1 > CATEGORIES= security > > MAINTAINER= cs@FreeBSD.org > COMMENT= Implementation of Tor, in Rust > -WWW= https://gitlab.torproject.org/tpo/core/arti/ > +WWW= https://arti.torproject.org/ > > LICENSE= MIT > > USES= cargo sqlite ssl > USE_RC_SUBR= arti > -#GROUPS= _arti > -#USERS= _arti > -#SUB_LIST= USER="${USERS}" GROUP="${GROUPS}" > -#PLIST_SUB= USER="${USERS}" GROUP="${GROUPS}" > +GROUPS= _arti > +USERS= _arti > +SUB_LIST= USERS="${USERS}" GROUPS="${GROUPS}" > +PLIST_SUB= USERS="${USERS}" GROUPS="${GROUPS}" > USE_GITLAB= yes > GL_SITE= https://gitlab.torproject.org > GL_ACCOUNT= tpo/core > diff --git a/security/arti/files/arti.in b/security/arti/files/arti.in > index b7226c5ebe14..8cb8d4a48513 100644 > --- a/security/arti/files/arti.in > +++ b/security/arti/files/arti.in > @@ -1,37 +1,54 @@ > #!/bin/sh > > -# $FreeBSD$ > -# > # PROVIDE: arti > -# REQUIRE: LOGIN > -# KEYWORD: shutdown > +# REQUIRE: DAEMON FILESYSTEMS > +# BEFORE: LOGIN > # > # Add these lines to /etc/rc.conf.local or /etc/rc.conf > # to enable this service: > # > # arti_enable (bool): Set to NO by default. > # Set it to YES to enable arti. > -# arti_config (path): Set to %%PREFIX%%/etc/arti/arti.cf > +# arti_config (path): Set to %%PREFIX%%/etc/arti/arti.toml > # by default. > -# arti_user (str): Arti daemon user. Default: %%USER%% > -# arti_pidfile (str): Arti pid file. Default: /var/run/arti/arti.pid > - > +# arti_user (str): Arti daemon user. Default: %%USERS%% > +# arti_group (str): Arti daemon group. Default: %%GROUPS%% > > . /etc/rc.subr > > -name=arti > -rcvar=arti_enable > +name="arti" > +rcvar="arti_enable" > > load_rc_config $name > > : ${arti_enable:="NO"} > : ${arti_config="%%PREFIX%%/etc/arti/arti.toml"} > -: ${arti_pidfile="/var/run/arti/arti.pid"} > -: ${arti_logfile="/var/log/arti/arti.log"} > - > -command=/usr/sbin/daemon > -arti=%%PREFIX%%/bin/${name} > - > -command_args="-f -o $arti_logfile -P $arti_pidfile $arti proxy -c $arti_config" > +: ${arti_user="%%USERS%%"} > +: ${arti_group="%%GROUPS%%"} > + > +pidfiledir="/var/run/${name}" > +pidfile="${pidfiledir}/${name}.pid" > +logfiledir="/var/log/${name}" > +logfile="${logfiledir}/${name}.log" > +dbfiledir="/var/db/${name}" > +command="/usr/sbin/daemon" > +procname="%%PREFIX%%/bin/${name}" > + > +command_args="-f -o $logfile -p $pidfile $procname proxy --config $arti_config" > + > +start_precmd="${name}_prestart" > + > +arti_prestart() > +{ > + if [ ! -d ${pidfiledir} ]; then > + install -d -o ${arti_user} -g ${arti_group} ${pidfiledir} > + fi > + if [ ! -d ${logfiledir} ]; then > + install -d -o ${arti_user} -g ${arti_group} ${logfiledir} > + fi > + if [ ! -d ${dbfiledir} ]; then > + install -d -o ${arti_user} -g ${arti_group} ${dbfiledir} > + fi > +} > > run_rc_command "$1" > diff --git a/security/arti/files/patch-crates_arti_src_arti-example-config.toml b/security/arti/files/patch-crates_arti_src_arti-example-config.toml > index ce175bb1c293..8ba17cd44b05 100644 > --- a/security/arti/files/patch-crates_arti_src_arti-example-config.toml > +++ b/security/arti/files/patch-crates_arti_src_arti-example-config.toml > @@ -1,11 +1,13 @@ > ---- crates/arti/src/arti-example-config.toml.orig 2022-05-29 12:30:55 UTC > +--- crates/arti/src/arti-example-config.toml.orig 2022-09-25 15:06:18 UTC > +++ crates/arti/src/arti-example-config.toml > -@@ -62,7 +62,7 @@ > +@@ -86,8 +86,8 @@ > # > # The state directory is not yet used. > [storage] > -#cache_dir = "${ARTI_CACHE}" > -+cache_dir = "/var/db/arti" > - #state_dir = "${ARTI_LOCAL_DATA}" > +-#state_dir = "${ARTI_LOCAL_DATA}" > ++cache_dir = "/var/db/arti/" > ++state_dir = "/var/db/arti/" > > # Describe how to enforce permissions on the filesystem when accessing the cache > + # and state directories. (This does not apply to configuration files)