aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Reifenberger <mr@FreeBSD.org>2021-06-02 15:07:57 +0000
committerMichael Reifenberger <mr@FreeBSD.org>2021-06-02 15:12:12 +0000
commitf097145a000b6ce646c4193be59368413d678518 (patch)
treeef78930b05f25c9131948e35a29b8cab1b4700ed
parent424103f71d8941dcdf0297347405e22f99692417 (diff)
downloadports-f097145a000b6ce646c4193be59368413d678518.tar.gz
ports-f097145a000b6ce646c4193be59368413d678518.zip
security/vaultwarden: Level up ports compliance
add some of the changes (except the openssl debundling) of the PR. PR: 256081
-rw-r--r--security/vaultwarden/Makefile8
-rw-r--r--security/vaultwarden/files/vaultwarden.in4
-rw-r--r--security/vaultwarden/pkg-plist2
3 files changed, 7 insertions, 7 deletions
diff --git a/security/vaultwarden/Makefile b/security/vaultwarden/Makefile
index fd123de8e149..a97a36bbb227 100644
--- a/security/vaultwarden/Makefile
+++ b/security/vaultwarden/Makefile
@@ -2,7 +2,7 @@
PORTNAME= vaultwarden
DISTVERSION= 1.21.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= https://github.com/dani-garcia/bw_web_builds/releases/download/v${DISTVERSION_WV}/:web
DISTFILES= ${WV_DISTFILE}:web
@@ -23,6 +23,7 @@ DISTVERSION_WV= 2.20.1
WV_DISTFILE= bw_web_v${DISTVERSION_WV}.tar.gz
USE_RC_SUBR= ${PORTNAME}
SUB_FILES= pkg-message
+SUB_LIST= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
# make makeplist > pkg-plist #One has to edit/review the generated plist
# make generate-plist && make check-plist
@@ -34,6 +35,7 @@ CARGO_GIT_SUBDIR+= dataurl:data-url:data-url
CARGO_GIT_SUBDIR+= devise:devise:lib
CARGO_GIT_SUBDIR+= rocket:rocket:core/lib
CARGO_GIT_SUBDIR+= rocket:rocket_contrib:contrib/lib
+
# make cargo-crates
GH_TUPLE= servo:rust-url:540ede02d0771824c0c80ff9f57fe8eff38b1291:dataurl \
SergioBenitez:Devise:e58b3ac9afc3b6ff10a8aaf02a3e768a8f530089:devise \
@@ -381,12 +383,10 @@ CARGO_USE_GITHUB= yes
post-install:
${MKDIR} ${STAGEDIR}/${ETCDIR}/rc.conf.d
- ${CP} ${FILESDIR}/vaultwarden_conf.in ${STAGEDIR}/${LOCALBASE}/etc/rc.conf.d/${PORTNAME}.sample
+ ${CP} ${FILESDIR}/${PORTNAME}_conf.in ${STAGEDIR}/${LOCALBASE}/etc/rc.conf.d/${PORTNAME}.sample
${MKDIR} ${STAGEDIR}/${WWWDIR}
${MKDIR} ${STAGEDIR}/${WWWDIR}/data
- # ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${STAGEDIR}/${WWWDIR}/data
(cd ${WRKDIR} && ${COPYTREE_SHARE} web-vault ${STAGEDIR}/${WWWDIR})
- # @${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}/data' >> ${TMPPLIST}
${ECHO_CMD} \
'@postexec chown -R ${WWWOWN}:${WWWGRP} %D/${WWWDIR_REL}/data' \
>> ${TMPPLIST}
diff --git a/security/vaultwarden/files/vaultwarden.in b/security/vaultwarden/files/vaultwarden.in
index 7c94b20eb04e..14b9eae460d7 100644
--- a/security/vaultwarden/files/vaultwarden.in
+++ b/security/vaultwarden/files/vaultwarden.in
@@ -16,8 +16,8 @@ rcvar=vaultwarden_enable
load_rc_config ${name}
: ${vaultwarden_chdir=%%PREFIX%%/www/vaultwarden}
-: ${vaultwarden_user:=www}
-: ${vaultwarden_group:=www}
+: ${vaultwarden_user:=%%WWWOWN%%}
+: ${vaultwarden_group:=%%WWWGRP%%}
# This is the tool init launches
command="/usr/sbin/daemon"
diff --git a/security/vaultwarden/pkg-plist b/security/vaultwarden/pkg-plist
index 080d750adfa6..b8004282cb67 100644
--- a/security/vaultwarden/pkg-plist
+++ b/security/vaultwarden/pkg-plist
@@ -1,5 +1,5 @@
bin/vaultwarden
-etc/rc.conf.d/vaultwarden.sample
+@sample etc/rc.conf.d/vaultwarden.sample
etc/rc.d/vaultwarden
%%WWWDIR%%/web-vault/.nojekyll
%%WWWDIR%%/web-vault/404.html