greizgh / vaultwarden-debian

vaultwarden_rs packaging tool
GNU General Public License v3.0
55 stars 16 forks source link

Error setting up vaultwarden package: Failed to open 'vaultwarden.conf' #54

Closed kevinior closed 11 months ago

kevinior commented 11 months ago

On installing the package generated by vaultwarden-debian (latest master) I get this error at the end of the install (Debian bookworm):

Selecting previously unselected package vaultwarden.
Preparing to unpack .../vaultwarden-1.30.0-sqlite-amd64.deb ...
Unpacking vaultwarden (1.30.0-1) ...
Setting up libpq5:amd64 (15.5-0+deb12u1) ...
Setting up vaultwarden (1.30.0-1) ...
Failed to open 'vaultwarden.conf', ignoring: No such file or directory
dpkg: error processing package vaultwarden (--configure):
 installed vaultwarden package post-installation script subprocess returned error exit status 1
Processing triggers for libc-bin (2.36-9+deb12u3) ...
Errors were encountered while processing:
 vaultwarden
E: Sub-process /usr/bin/dpkg returned an error code (1)

This leaves the package "half-configured":

$ apt show vaultwarden
Package: vaultwarden
Version: 1.30.0-1
Status: install ok half-configured
Priority: optional
Maintainer: Greizgh <greizgh+vaultwarden@ephax.org>
Installed-Size: unknown
Depends: libc6, libgcc-s1, libssl3, libmariadb3, libpq5, systemd | systemd-standalone-sysusers | opensysusers, systemd | default-systemd-tmpfiles | systemd-tmpfiles | systemd-standalone-tmpfiles
Homepage: https://github.com/greizgh/vaultwarden-debian
Download-Size: unknown
APT-Manual-Installed: yes
APT-Sources: /var/lib/dpkg/status
Description: Unofficial Bitwarden compatible server written in Rust

Should the vaultwarden.conf references in debian/postinst actually be sysusers.conf and tmpfiles.conf respectively? I know very little about Debian packaging, so maybe I'm misunderstanding.

kevinior commented 11 months ago

@greizgh I've made a couple of small changes to the Dockerfile to fix this, in the linked PR. It works on my Debian bookworm server.