From nobody Mon Sep 11 09:47:44 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 4Rkhhx1WLhz4sk6v; Mon, 11 Sep 2023 09:47:45 +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 4Rkhhw5xqFz4WBC; Mon, 11 Sep 2023 09:47:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694425664; 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=IlLRTfM8ctHWlmGLjnO1iIHeW6O8TREOESWpf1UlupI=; b=qcswHUkJlda0/5iMp9k2oneO6yPv/2+kXDSDW8xSDJ46RP/4k5zlBDxT7MOUD4XujiE9sR SYkI6LVJ9hCwN7/cTZEuzNxpji6q614f2lLRQ8KF+un8y2elUUgDebdvODt8d4bT1oz6EV UfmJHfJeTzrmEveaEvY8jZcv48HKwqGiz23xv9AYd9f2mCjPRKXOxBVwZJqcfmcd3DEV2w GXyBnJGkT7jtG0HbGrchxXyPZZ7N0cBPjqiDGvnmTukOURI41ycQy2P6jb0gcIDDa9hfrZ IuUnTMvDShecCw2iOs//bTwc5soJNdQHbzOm7HEHngDHEcXMi3Bt3c410s3azg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694425664; a=rsa-sha256; cv=none; b=y0BKwoVVn38ZPHMDeDX48BzC+KAaQ1Tp6kGH8bV/fmpirz4+sTcVAgZPlx0cljCxxjamQx og8UJCmBvuLiNuV/VYxX0dQLVAccH5gcsuFtt3YAO5/6Lfms5MKXYnfC4670VOsK63FFUI NdnP6G0HiOfWdcCGBcTCdqkRVORonjhIA/wRtKf9+tRoiNPTsravuFD1H16ziDmRRXMEiE N2fjFL4+oBJSQd8fpiBc+po550AsjCouotcwNFMawTHGhQ4Mu9TjaL8I9Ftuyq6fyocGo9 8USqZFyRvMYmh+FTpry+vHrVWsXqgu2LrX7x4q0Wc35foKpKgwVyzrJ+dvRWAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694425664; 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=IlLRTfM8ctHWlmGLjnO1iIHeW6O8TREOESWpf1UlupI=; b=bl9cujLQSERr1OSWP8frDULfQSa618PRaFrofcHEwVEAy5CWmJ9v+BFs/nzeAJVIt2liOQ evT8fbAaFCNJJDG1+PpisScw/xpNHRImVQ6V7X2HDDKT6rWjvnB2IONLQlX9gtbAkOYte4 kuaGJyMA+5iP1gOxqckxR5X9IaEZG3eCU3UbNZUPmOWZzD3Nl8B0EqCwEfAh2fTU4BYlet WTzw/9Vjq6/4vmrCBpscalCA0TTDPlOT8y3LtyDhA7vsD5ywUbTDpJ6kviUq85sNRw+qoR Igbr2cnTNnXRarI0T8yN47SmvwOHhKmrZ44vFtZ6vd78eQ3AnosabmoCK/uQ1A== 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 4Rkhhw4vkVzkV6; Mon, 11 Sep 2023 09:47:44 +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 38B9lijo076278; Mon, 11 Sep 2023 09:47:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38B9liUa076275; Mon, 11 Sep 2023 09:47:44 GMT (envelope-from git) Date: Mon, 11 Sep 2023 09:47:44 GMT Message-Id: <202309110947.38B9liUa076275@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 4c7443125c2e - main - security/vaultwarden: Make package rootdir friendly 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: manu X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c7443125c2e90ede58b0f8739a0197214034572 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/ports/commit/?id=4c7443125c2e90ede58b0f8739a0197214034572 commit 4c7443125c2e90ede58b0f8739a0197214034572 Author: Emmanuel Vadot AuthorDate: 2023-08-26 08:37:03 +0000 Commit: Emmanuel Vadot CommitDate: 2023-09-11 09:46:50 +0000 security/vaultwarden: Make package rootdir friendly - Use @dir with ownership instead of executing chown in postexec We should never chown -R the data directory at install (because it's empty) or when we upgrade (not needed) - Fix the shipped configuration file, do not install it in etc/rc.conf.d, install it where vaultwarden will actually load it and use @sample Differential Revision: https://reviews.freebsd.org/D41602 --- security/vaultwarden/Makefile | 11 +++++------ security/vaultwarden/files/pkg-message.in | 14 -------------- security/vaultwarden/pkg-plist | 5 ++--- 3 files changed, 7 insertions(+), 23 deletions(-) diff --git a/security/vaultwarden/Makefile b/security/vaultwarden/Makefile index d081103d869c..2a5fc35b4ca0 100644 --- a/security/vaultwarden/Makefile +++ b/security/vaultwarden/Makefile @@ -22,6 +22,10 @@ USE_GITHUB= yes GH_ACCOUNT= dani-garcia USE_RC_SUBR= ${PORTNAME} +USERS= ${WWWOWN} +GROUPS= ${WWWGRP} +PLIST_SUB= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} + OPTIONS_DEFINE= WEBVAULT OPTIONS_DEFAULT=WEBVAULT @@ -36,7 +40,6 @@ CARGO_FEATURES= mysql postgresql sqlite #vendored_openssl INSTALL_TARGET= install-strip -SUB_FILES= pkg-message SUB_LIST= WWWGRP=${WWWGRP} \ WWWOWN=${WWWOWN} @@ -45,11 +48,7 @@ SUB_LIST= WWWGRP=${WWWGRP} \ # ${WRKSRC}/Cargo.toml post-install: - ${MKDIR} ${STAGEDIR}/${ETCDIR}/rc.conf.d - ${INSTALL} -m0600 ${FILESDIR}/${PORTNAME}_conf.in ${STAGEDIR}/${LOCALBASE}/etc/rc.conf.d/${PORTNAME}.sample ${MKDIR} ${STAGEDIR}/${WWWDIR}/data - ${ECHO_CMD} \ - '@postexec chown -R ${WWWOWN}:${WWWGRP} %D/${WWWDIR_REL}/data' \ - >> ${TMPPLIST} + ${INSTALL} -m0600 ${FILESDIR}/${PORTNAME}_conf.in ${STAGEDIR}/${WWWDIR}/data/config.json.sample .include diff --git a/security/vaultwarden/files/pkg-message.in b/security/vaultwarden/files/pkg-message.in deleted file mode 100644 index 7f2614605175..000000000000 --- a/security/vaultwarden/files/pkg-message.in +++ /dev/null @@ -1,14 +0,0 @@ -[ -{ type: install - message: <