Bug 257261

Summary: security/keepassxc: build CLI-only flavour
Product: Ports & Packages Reporter: Yonas Yanfa <yonas.yanfa>
Component: Individual Port(s)Assignee: Li-Wen Hsu <lwhsu>
Status: Open ---    
Severity: Affects Some People CC: lwhsu, melanhit
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://github.com/keepassxreboot/keepassxc/issues/1714
Attachments:
Description Flags
Compile cli only none

Description Yonas Yanfa 2021-07-19 03:54:02 UTC
It would be great to have KeePassXC without requiring x11 dependencies.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-19 04:11:31 UTC
Can you see if its  possible to build/package the cli separately, such that a keepasscx-cli port can be created, that depends on the main one, rather than a flavor (which conflicts with the other flavors). This may also be possible for the GUI portion.
Comment 2 Yonas Yanfa 2022-07-18 20:40:41 UTC
(In reply to Kubilay Kocak from comment #1)

Sorry, I don't have ports installed, but this should be possible as of merge #6280: https://github.com/keepassxreboot/keepassxc/pull/6280
Comment 3 Yonas Yanfa 2022-09-09 19:26:48 UTC
Created attachment 236460 [details]
Compile cli only

1. In addition to whatever I already had installed on my system, I needed to install these additional dependencies:


pkg install -y qt5-core qt5-qmake qt5-buildtools qt5-network qt5-concurrent qt5-dbus qt5-linguisttools qt5-widgets botan2


2. Run cmake:

cmake -DWITH_XC_X11=off -DWITH_TESTS=off -DWITH_APP_BUNDLE=off -DWITH_XC_UPDATECHECK=off -DWITH_XC_DOCS=off -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release


3. Run make:

make keepassxc-cli

4. Run the cli:

./src/cli/keepassxc-cli --help
Comment 4 Yonas Yanfa 2022-09-09 19:47:59 UTC
I've found two issues:

1. A "Couldn't load translations." warning message is always shown at the top.

2. Using a key file doesn't work - it will display "Enter password to unlock <db>:" . This patch only works when using a password prompt.