version bump www-apps/vaultwarden-1.37.4

This commit is contained in:
2026-10-09 17:48:35 +02:00
parent d0ed468360
commit 7e0bb7862f
8 changed files with 294 additions and 0 deletions
@@ -0,0 +1,9 @@
# Location of config file
#CONF_FILE=/etc/vaultwarden/vaultwarden.conf
# User & group to start daemon as
#VW_USER=vaultwarden
#VW_GROUP=vaultwarden
# Directory to store data in
#DATA_FOLDER=/var/lib/vaultwarden
@@ -0,0 +1,18 @@
#!/sbin/openrc-run
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
export ENV_FILE="${CONF_FILE:-/etc/${RC_SVCNAME}/${RC_SVCNAME}.conf}"
name="Vaultwarden"
description="Unofficial Bitwarden compatible password manager"
command="/usr/bin/${RC_SVCNAME}"
command_user="${VW_USER:-vaultwarden}:${VW_GROUP:-vaultwarden}"
command_background="true"
pidfile="/run/${RC_SVCNAME}.pid"
directory="${DATA_FOLDER:-/var/lib/${RC_SVCNAME}}"
umask=0027
depend() {
after net
}
@@ -0,0 +1,9 @@
/var/log/vaultwarden/vaultwarden.log {
su vaultwarden vaultwarden
size 5M
compress
rotate 4
copytruncate
missingok
notifempty
}
@@ -0,0 +1,45 @@
[Unit]
Description=Vaultwarden, unofficial Bitwarden compatible password manager
Documentation=https://github.com/dani-garcia/vaultwarden
After=network.target
Wants=network.target
[Service]
Environment=ENV_FILE=/etc/%N/%N.conf
ExecStart=/usr/bin/%N
WorkingDirectory=/var/lib/%N
User=%N
Group=%N
UMask=0027
# Sandboxing and hardening systemd.exec(5)
PrivateUsers=yes
ProtectClock=yes
ProtectHostname=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectKernelLogs=yes
ProtectControlGroups=yes
RestrictNamespaces=yes
LockPersonality=yes
MemoryDenyWriteExecute=yes
RestrictSUIDSGID=yes
RemoveIPC=yes
RestrictRealtime=yes
PrivateTmp=true
PrivateDevices=true
ProtectHome=true
# set entire file system to read only except following paths
ProtectSystem=strict
ReadWritePaths=/var/lib/%N -/var/log/%N/%N.log
CacheDirectory=%N
# Set reasonable connection and process limits
LimitNOFILE=1048576
LimitNPROC=64
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,53 @@
As upstream defaults create directories where binary is executed (/usr/bin/), this patch is needed to change paths to Gentoo specific locations
--- a/.env.template
+++ b/.env.template
@@ -5,10 +5,6 @@
## Be aware that most of these settings will be overridden if they were changed
## in the admin interface. Those overrides are stored within DATA_FOLDER/config.json .
##
-## By default, Vaultwarden expects for this file to be named ".env" and located
-## in the current working directory. If this is not the case, the environment
-## variable ENV_FILE can be set to the location of this file prior to starting
-## Vaultwarden.
####################
### Data folders ###
@@ -23,17 +19,17 @@
## When using an external location, make sure to set TMP_FOLDER,
## TEMPLATES_FOLDER, and DATABASE_URL to local paths and/or a remote database
## location.
-# DATA_FOLDER=data
+DATA_FOLDER=/var/lib/vaultwarden
## Individual folders, these override %DATA_FOLDER%
# RSA_KEY_FILENAME=data/rsa_key
-# ICON_CACHE_FOLDER=data/icon_cache
+ICON_CACHE_FOLDER=/var/cache/vaultwarden/icon_cache
# ATTACHMENTS_FOLDER=data/attachments
# SENDS_FOLDER=data/sends
## Temporary folder used for storing temporary file uploads
## Must be a local path.
-# TMP_FOLDER=data/tmp
+TMP_FOLDER=/tmp/vaultwarden
## HTML template overrides data folder
## Must be a local path.
@@ -42,7 +38,7 @@
# RELOAD_TEMPLATES=false
## Web vault settings
-# WEB_VAULT_FOLDER=web-vault/
+WEB_VAULT_FOLDER=/usr/share/webapps/vaultwarden-web
# WEB_VAULT_ENABLED=true
#########################
@@ -386,7 +382,7 @@
# USE_SYSLOG=false
## Logging to file
-# LOG_FILE=/path/to/log
+LOG_FILE=/var/log/vaultwarden/vaultwarden.log
## Log level
## Change the verbosity of the log output
@@ -0,0 +1,5 @@
# Fields: type; path; mode; uid; gid; age; argument
# tmpfiled.d(5)
d /var/cache/vaultwarden 0750 vaultwarden vaultwarden
d /tmp/vaultwarden 0750 vaultwarden vaultwarden 1d
f /var/log/vaultwarden/vaultwarden.log 0640 vaultwarden vaultwarden