1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-22 04:17:44 +00:00

security/vaultwarden: Level up ports compliance

add some of the changes (except the openssl debundling) of the PR.

PR:		256081
This commit is contained in:
Michael Reifenberger 2021-06-02 17:07:57 +02:00
parent 424103f71d
commit f097145a00
3 changed files with 7 additions and 7 deletions

View File

@ -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}

View File

@ -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"

View File

@ -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