Bug 276739 - security/vaultwarden config file config.json.sample is not a JSON
Summary: security/vaultwarden config file config.json.sample is not a JSON
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Michael Reifenberger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-30 19:59 UTC by Miroslav Lachman
Modified: 2024-03-09 10:24 UTC (History)
1 user (show)

See Also:
linimon: maintainer-feedback+
linimon: merge-quarterly?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Lachman 2024-01-30 19:59:05 UTC
I already post about this issue back in October 2023 to maintainer's e-mail and to ports@, but without any reply.

I noticed the change of config file location. It was previously in local/etc/rc.conf.d/vaultwarden (and I still have this file)
But according to this https://reviews.freebsd.org/D41602 new install location is local/www/data/config.json.sample so I looked in to this file and it is totally different than local/www/data/config.json. 
The later is real JSON file, but config.json.sample is not a JSON file at all so why it is named like it? 
(this is the source of the sample file https://cgit.freebsd.org/ports/tree/security/vaultwarden/files/vaultwarden_conf.in) 

Beginning of the config.json:
------------------
{
  "domain": "http://localhost/vaultwarden/",
  "sends_allowed": true,
  "incomplete_2fa_time_limit": 3,
  "disable_icon_download": false,
  "signups_allowed": false,
  "signups_verify": false,
  "signups_verify_resend_time": 3600,
  "signups_verify_resend_limit": 6,
------------------

Beginning config.json.sample:
------------------
#Warning : Some of these settings may be overridden when changing settings on the admin page or in the config.json file
#located by default at: /usr/local/www/vaulwarden/data/config.json

ROCKET_ADDRESS=127.0.0.1
export ROCKET_ADDRESS

ROCKET_PORT=4567 # your port here
export ROCKET_PORT
------------------

Note, there is also a typo in a commented path "vaulwarden" instead of "vaultwarden"


What is the right way to configure vaultwarden now?
Comment 1 commit-hook freebsd_committer freebsd_triage 2024-02-08 18:09:28 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ee63c50e82f3c8cc5aa860bdc0791a548acf4560

commit ee63c50e82f3c8cc5aa860bdc0791a548acf4560
Author:     Michael Reifenberger <mr@FreeBSD.org>
AuthorDate: 2024-02-08 17:57:38 +0000
Commit:     Michael Reifenberger <mr@FreeBSD.org>
CommitDate: 2024-02-08 18:08:27 +0000

    security/vaultwarden: Update to 1.30.3

    While there address PR:276739 by installing the static configfile sample
    to etc/rc.conf.d/vaultwarden.sample since www/vaultwarden/data/config.json
    is for dynamic changes via the UI.

    PR:             276745, 276739

 security/vaultwarden/Makefile                      |  23 +-
 security/vaultwarden/Makefile.crates               | 259 +++++-----
 security/vaultwarden/distinfo                      | 524 +++++++++++----------
 security/vaultwarden/files/patch-Cargo.lock (gone) |  37 --
 security/vaultwarden/files/patch-Cargo.toml (gone) |  15 -
 security/vaultwarden/pkg-plist                     |   9 +-
 6 files changed, 434 insertions(+), 433 deletions(-)