This plugin implements the Secret Storage specification version 0.2. While running KeePassXC, it acts as a Secret Service server, registered on DBus, so clients like seahorse, python-secretstorage, or other implementations can connect and access the exposed database in KeePassXC. Squashed commits: - Initial code - Add SessionAdaptor and fix build - The skeletons for all dbus objects are in place - Implement collection creation and deletion - Emit collectionChanged signal - Implement app-wise settings page - Implement error message on GUI - Implement settings - Fix uuid to dbus path - Implement app level settings - Add freedesktop logo - Implement database settings page - Change database settings to a treeview - Move all settings read/write to one place - Rename SecretServiceOptionsPage to SettingsWidgetFdoSecrets - Fix selected group can not be saved if the user hasn't click on the item - Show selected group per database in app settings - Disable editing of various readonly widgets - Remove unused warning about non exposed database - Fix method signature on dbus adaptors - Fix type derived from DBusObject not recognized as QDBusContext - Resolve a few TODOs around error handling - Remove const when passing DBus exposed objects - Move dismiss to PromptBase - Implement per collection locking/unlocking - Fix const correctness on Item::setSecret - Implement SecretService::getSecrets - Rework the signal connections around collections. - Remove generateId from DBusObject - Per spec, use encoded label as DBus object path for collections - Fix some corner cases around collection name changes - Implement alias - Fix wrong alias dbus path - Implement encryption per spec - Cleanup SessionCipher - Implement searchItems for SecretService - Use Tools::uuidToHex - Implement Item attributes and delete - Implement createItem - Always check if the database is unlocked before perform any operation - Add missing ReadAlias/SetAlias on service - Reorganize and fix OpenSession always returning empty output - Overhaul error handling - Make sure default alias is always present - Remove collection aliases early in doDelete - Handles all content types, fix setProperties not working - Fix sometimes there is an extraneous leading zero when converting from MPI - Fix session encryption negotiation - Do not expose recycle bin - Protect against the methods not called from DBus - Also emit collectionChanged signal when lock state changes - Show notification when entry secret is requested - Add a README file - Actually close session when client disconnects - Gracefully return alternative label when collection is locked - Reorganize, rename secretservice to fdosecrets - Fix issues reported by clazy - Unify UI strings and fix icon - Implement a setting to skip confirmation when deleting entries from DBus - Remove some unused debugging log - Simply ignore errors when DBus context is not available. QtDBus won't set QDBusContext when deliver property get/set, and there is no way to get a QDBusMessage in property getter/setter. - Simplify GcryptMPI using std::unique_ptr and add unit test - Format code in fdosecrets - Move DBusReturnImpl to details namespace - Fix crash when locking a database: don't modify exposedGroup setting in customData when database is deleted - Make sure Collection::searchItems works, whether it's locked or not - Fix FdoSecrets::Collection becomes empty after a database reload - Fix crash when looping while modifying the list
5.9 KiB
Build and Install KeePassXC
This document will guide you through the steps to build and install KeePassXC from source. You can visit the online version of this document at the following link:
https://github.com/keepassxreboot/keepassx/wiki/Install-Instruction-from-Source
The KeePassXC QuickStart gets you started using KeePassXC on your Windows, Mac, or Linux computer using the pre-built binaries.
Build Dependencies
The following tools must exist within your PATH:
- make
- cmake (>= 2.8.12)
- g++ (>= 4.7) or clang++ (>= 3.0)
The following libraries are required:
- Qt 5 (>= 5.2): qtbase and qttools5
- libgcrypt (>= 1.6)
- zlib
- libmicrohttpd
- libxi, libxtst, qtx11extras (optional for auto-type on X11)
- libsodium (>= 1.0.12)
- libargon2
- qrencode
- yubikey ykpers (optional to support YubiKey)
Prepare the Building Environment
Build Steps
We recommend using the release tool to perform builds, please read up-to-date instructions on our wiki.
To compile from source, open a Terminal (on Linux/MacOS) or a MSYS2-MinGW shell (on Windows)
Note: on Windows make sure you are using a MINGW shell by checking the label before the current path
First, download the KeePassXC source tarball or check out the latest version from our Git repository.
To clone the project from Git, cd
to a suitable location and run
git clone https://github.com/keepassxreboot/keepassxc.git
This will clone the entire contents of the repository and check out the current develop
branch.
To update the project from within the project's folder, you can run the following command:
git pull
For a stable build, it is recommended to checkout the master branch.
git checkout master
Navigate to the directory where you have downloaded KeePassXC and type these commands:
cd directory-where-sources-live
mkdir build
cd build
cmake -DWITH_XC_ALL=ON ..
make
If you are on Windows, you may have to add -G "MSYS Makefiles"
to the beginning of the cmake command. See the Windows Build Instructions for more information.
These steps place the compiled KeePassXC binary inside the ./build/src/
directory.
(Note the cmake notes/options below.)
Cmake Notes:
-
Common cmake parameters
-DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=<RelWithDebInfo/Debug/Release> -DWITH_GUI_TESTS=ON
-
cmake accepts the following options:
-DWITH_XC_AUTOTYPE=[ON|OFF] Enable/Disable Auto-Type (default: ON) -DWITH_XC_YUBIKEY=[ON|OFF] Enable/Disable YubiKey HMAC-SHA1 authentication support (default: OFF) -DWITH_XC_BROWSER=[ON|OFF] Enable/Disable KeePassXC-Browser extension support (default: OFF) -DWITH_XC_NETWORKING=[ON|OFF] Enable/Disable Networking support (e.g., favicon downloading) (default: OFF) -DWITH_XC_SSHAGENT=[ON|OFF] Enable/Disable SSHAgent support (default: OFF) -DWITH_XC_TOUCHID=[ON|OFF] (macOS Only) Enable/Disable Touch ID unlock (default:OFF) -DWITH_XC_FDOSECRETS=[ON|OFF] (Linux Only) Enable/Disable Freedesktop.org Secrets Service support (default:OFF) -DWITH_XC_KEESHARE=[ON|OFF] Enable/Disable KeeShare group synchronization extension (default: OFF) -DWITH_XC_KEESHARE_SECURE=[ON|OFF] Enable/Disable KeeShare signed containers, requires libquazip5 (default: OFF) -DWITH_XC_ALL=[ON|OFF] Enable/Disable compiling all plugins above (default: OFF) -DWITH_XC_UPDATECHECK=[ON|OFF] Enable/Disable automatic updating checking (requires WITH_XC_NETWORKING) (default: ON) -DWITH_TESTS=[ON|OFF] Enable/Disable building of unit tests (default: ON) -DWITH_GUI_TESTS=[ON|OFF] Enable/Disable building of GUI tests (default: OFF) -DWITH_DEV_BUILD=[ON|OFF] Enable/Disable deprecated method warnings (default: OFF) -DWITH_ASAN=[ON|OFF] Enable/Disable address sanitizer checks (Linux / macOS only) (default: OFF) -DWITH_COVERAGE=[ON|OFF] Enable/Disable coverage tests (GCC only) (default: OFF) -DWITH_APP_BUNDLE=[ON|OFF] Enable Application Bundle for macOS (default: ON) -DKEEPASSXC_BUILD_TYPE=[Snapshot|PreRelease|Release] Set the build type to show/hide stability warnings (default: "Snapshot") -DKEEPASSXC_DIST_TYPE=[Snap|AppImage|Other] Specify the distribution method (default: "Other") -DOVERRIDE_VERSION=[X.X.X] Specify a version number when building. Used with snapshot builds (default: "") -DGIT_HEAD_OVERRIDE=[XXXXXXX] Specify the 7 digit git commit ref for this build. Used with distribution builds (default: "")
-
If you are on MacOS you must add this parameter to Cmake, with the Qt version you have installed
-DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.6.2/lib/cmake/
❗ When building with ASan support on macOS, you need to use export ASAN_OPTIONS=detect_leaks=0
before running the tests (no LSan support in macOS).
Installation
After you have successfully built KeePassXC, install the binary by executing the following:
sudo make install
You can specify the destination dir with
DESTDIR=X
Packaging
You can create a package to redistribute KeePassXC (zip, deb, rpm, dmg, etc..)
make package
Testing
You can perform test on the executable
make test
Common parameters:
CTEST_OUTPUT_ON_FAILURE=1
ARGS+=-jX
ARGS+="-E testgui"