From nobody Sun Oct 29 00:14:04 2023 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 4SHxhr4CJTz4yD6N; Sun, 29 Oct 2023 00:14:04 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SHxhr3kzBz3P32; Sun, 29 Oct 2023 00:14:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698538444; 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=vSIuOzJez3XLvTpwqAcu6gsyQb7iex4qX6UfPgDSQeE=; b=NXOOmXeF607YgRSe8/lQsIkvAeGD9i6WcIGczYxaq2CNeObFwtjiBtbSJ8z61yp6FpAeaG ksOuiCvZqxeSwHxStQ2OK8YjgwxjiKqbcTVMK06J9JiPjOF4j8B0HT9N2F1HWebUHT3l9n lUrb2jeK+Kk9/R5C88rscnQ+KE4VDruti4jgooWMabBCnupxORPJ9fsQ3/y0eY1nfez0yd NlVzyWRJtDqCJvu1xCE3un4NKNTCmltHCrbUUC5tN+3sXa80vL4njJdvaQEcpbDaYcBGpk 28Yte05u2tPgOkpLgNazUByLYX6u51J22bElBQI+POuzFjG+wKFNLDQskd/xMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698538444; 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=vSIuOzJez3XLvTpwqAcu6gsyQb7iex4qX6UfPgDSQeE=; b=d9xyxt9XhStrwk6FJ8HjvEGYCwkJhkDhzOhiZIcALj5xnrriOKUMY6hkuQx0W4yX9nM3YB OUW21JUx5JzSWinNRWrxySa2KUiFUmkRFSr6KWQlnn+P9XhMfNWOZmuYSb8soqaSZrpOH4 gkRujiEXjsn0LrlZj3TSv3x0tkpJ3Y6tlpQsOd+8mUcxnFG8q4oC8vXiw3YZ9op7WV6RGD wUKIOrLAjl46/46F5a8a05+FbTEdU4p9nIn2g087pVkKq+gTpDdzdrBc7ml7zJkM+4RWi3 UJed+hgBQ2+xHOuailLbUgSQVXgN2vhtekKoNb8W6fl/bZQsFvWkiHdf6BVMMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698538444; a=rsa-sha256; cv=none; b=E0O8jSqanCYRX0EcSPtL99q62WAudNZA7wAoufBJWnllz4rVhOhVvrf7M6xwnOgmAPqyI2 eXOyf85vVySz+Yai2x+iGg/hvS7KlpfbVvqT+Nn+Xt5NuIf+IxFTUv9zpJknLrcLKmRdat PadrpgLfYrTAyhPJgRCz7G71LCzfFsaKOMhnIzil+LUhjG9NR+C0WIGq+xdZTERk5tkk2n mzIOH56o8RxBnUr9lmPbywEOy4RW5ltaOIJA2riz/Yqw7LqL4W9e1rgL1isLJApL9WiuV4 inG70e77QZsUVBMBmxVQjA/hr3u8DgFQqFAtKyijLUuhkV6S5M4sZ6pbASbCVg== 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 4SHxhr2p8Dz2x9; Sun, 29 Oct 2023 00:14:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39T0E4AA061439; Sun, 29 Oct 2023 00:14:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39T0E4KK061433; Sun, 29 Oct 2023 00:14:04 GMT (envelope-from git) Date: Sun, 29 Oct 2023 00:14:04 GMT Message-Id: <202310290014.39T0E4KK061433@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dan Langille Subject: git: c5dbdf1971ad - main - net-mgmt/librenms: unbreak lnms 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=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dvl X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c5dbdf1971ad604ef3e2ca626462edd3d4adbdc0 Auto-Submitted: auto-generated The branch main has been updated by dvl: URL: https://cgit.FreeBSD.org/ports/commit/?id=c5dbdf1971ad604ef3e2ca626462edd3d4adbdc0 commit c5dbdf1971ad604ef3e2ca626462edd3d4adbdc0 Author: Dan Langille AuthorDate: 2023-10-29 00:12:03 +0000 Commit: Dan Langille CommitDate: 2023-10-29 00:14:01 +0000 net-mgmt/librenms: unbreak lnms lnms insists upon lnms file is owned by root, it should be owned and ran by a non-privileged user Make it chown www because that's what the librenms service runs as. I'm discussing a solution with upstream as to how to better fix this in their code. The current solution allows the app to modify its own code. --- net-mgmt/librenms/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net-mgmt/librenms/Makefile b/net-mgmt/librenms/Makefile index bc6c50aef790..6f7ff9b9a6a3 100644 --- a/net-mgmt/librenms/Makefile +++ b/net-mgmt/librenms/Makefile @@ -1,6 +1,6 @@ PORTNAME= librenms PORTVERSION= 23.10.0 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= net-mgmt MASTER_SITES= LOCAL/dvl:vendor @@ -178,6 +178,9 @@ do-install: .for f in ${_SCRIPT_FILES} ${INSTALL_SCRIPT} ${WRKSRC}/${f} ${STAGEDIR}/${WWWDIR} .endfor + # avoid: Error: lnms file is owned by root, it should be owned and ran by a non-privileged user + ${ECHO_CMD} "@(www,wheel,0555) www/${PORTNAME}/lnms" >> ${TMPPLIST} + ${MKDIR} ${STAGEDIR}/${WWWDIR}/vendor (cd ${WRKDIR}/${PORTNAME}-vendor-${PORTVERSION} && ${COPYTREE_SHARE} . ${STAGEDIR}/${WWWDIR}/vendor) @@ -219,7 +222,7 @@ do-install-EXAMPLES-on: post-install: ${FIND} -s ${STAGEDIR}${WWWDIR} -type f '(' -name '*.orig' -or -name '*.bak' -or -name '.gitignore' ')' -delete ${FIND} -s ${STAGEDIR}${WWWDIR} -not -type d | ${SORT} | \ - ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} + ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' | grep -v www/librenms/lnms >> ${TMPPLIST} # we do this file separately because it needs a different chmod/chown # it will eventually contains secrets