On Mon Nov 04, 2019 at 07:53:03PM +0100, Solene Rapenne wrote:
> I managed to update the patch so it applies on keepassxc 2.5.0 (2.4.3 is no
> longer compatible with firefox extension, I wanted to try keepassxc)
>
> I get an error about yubikey (error at the bottom of the mail)
>
I have a working version and all my patches mergred upstream. I think it
will be a 2.5.1 soon but we can go in with the following diff.
I also enabled WITH_XC_FDOSECRET:
"Implement freedesktop.org Secret Storage Spec server side API."
I haven't tested yet but it compiles fine, so let's try in the wild.
Index: Makefile
===================================================================
RCS file: /cvs/ports/security/keepassxc/Makefile,v
retrieving revision 1.23
diff -u -p -u -p -r1.23 Makefile
--- Makefile 12 Jul 2019 20:49:03 -0000 1.23
+++ Makefile 30 Oct 2019 05:48:03 -0000
@@ -2,7 +2,7 @@
COMMENT = management tool for password and sensitive data
-V = 2.4.3
+V = 2.5.0
DISTNAME = keepassxc-${V}
CATEGORIES = security
@@ -16,7 +16,8 @@ PERMIT_PACKAGE = Yes
WANTLIB += ${COMPILER_LIBCXX} Qt5Concurrent Qt5Core Qt5DBus Qt5Gui
WANTLIB += Qt5Network Qt5Svg Qt5Widgets Qt5X11Extras X11 Xi Xtst
-WANTLIB += argon2 c gcrypt gpg-error m qrencode sodium z
+WANTLIB += argon2 c gcrypt gpg-error m qrencode readline sodium
+WANTLIB += z
MASTER_SITES =
https://github.com/keepassxreboot/keepassxc/releases/download/${V}/
EXTRACT_SUFX = -src.tar.xz
@@ -38,7 +39,8 @@ RUN_DEPENDS = devel/desktop-file-utils \
CONFIGURE_ARGS= -DCMAKE_INSTALL_MANDIR="man" \
-DWITH_GUI_TESTS=ON \
-DWITH_XC_AUTOTYPE=ON \
- -DWITH_XC_SSHAGENT=ON
+ -DWITH_XC_SSHAGENT=ON \
+ -DWITH_XC_FDOSECRETS=ON
TEST_IS_INTERACTIVE = X11
Index: distinfo
===================================================================
RCS file: /cvs/ports/security/keepassxc/distinfo,v
retrieving revision 1.13
diff -u -p -u -p -r1.13 distinfo
--- distinfo 15 Jun 2019 08:55:26 -0000 1.13
+++ distinfo 30 Oct 2019 05:48:03 -0000
@@ -1,2 +1,2 @@
-SHA256 (keepassxc-2.4.3-src.tar.xz) =
18lSGSExBHaJw/j7cnXfDg378glKVU277pptbPqPJzQ=
-SIZE (keepassxc-2.4.3-src.tar.xz) = 3301944
+SHA256 (keepassxc-2.5.0-src.tar.xz) =
Y1nOlytyCovOHoulQABmbpxY+RZPLp5SvvLiTkYSeIE=
+SIZE (keepassxc-2.5.0-src.tar.xz) = 6752776
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/security/keepassxc/patches/patch-CMakeLists_txt,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt 4 Jun 2019 18:42:08 -0000 1.1
+++ patches/patch-CMakeLists_txt 30 Oct 2019 05:48:03 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-CMakeLists_txt,v 1.1 201
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
-@@ -415,6 +415,14 @@ if(UNIX)
+@@ -438,6 +438,14 @@ if(UNIX)
int main() { prctl(PR_SET_DUMPABLE, 0); return 0; }"
HAVE_PR_SET_DUMPABLE)
Index: patches/patch-src_core_Alloc_cpp
===================================================================
RCS file: /cvs/ports/security/keepassxc/patches/patch-src_core_Alloc_cpp,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-src_core_Alloc_cpp
--- patches/patch-src_core_Alloc_cpp 4 Jun 2019 18:42:08 -0000 1.1
+++ patches/patch-src_core_Alloc_cpp 30 Oct 2019 05:48:03 -0000
@@ -3,10 +3,10 @@ $OpenBSD: patch-src_core_Alloc_cpp,v 1.1
Index: src/core/Alloc.cpp
--- src/core/Alloc.cpp.orig
+++ src/core/Alloc.cpp
-@@ -20,8 +20,10 @@
- #include <sodium.h>
- #ifdef Q_OS_MACOS
+@@ -23,8 +23,10 @@
#include <malloc/malloc.h>
+ #elif defined(Q_OS_FREEBSD)
+ #include <malloc_np.h>
-#else
+#elif defined(HAVE_MALLOC_H)
#include <malloc.h>
@@ -15,7 +15,7 @@ Index: src/core/Alloc.cpp
#endif
#if defined(NDEBUG) && !defined(__cpp_sized_deallocation)
-@@ -61,7 +63,7 @@ void operator delete(void* ptr) noexcept
+@@ -64,7 +66,7 @@ void operator delete(void* ptr) noexcept
::operator delete(ptr, _msize(ptr));
#elif defined(Q_OS_MACOS)
::operator delete(ptr, malloc_size(ptr));
Index: patches/patch-src_keys_drivers_YubiKeyStub_cpp
===================================================================
RCS file: patches/patch-src_keys_drivers_YubiKeyStub_cpp
diff -N patches/patch-src_keys_drivers_YubiKeyStub_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_keys_drivers_YubiKeyStub_cpp 30 Oct 2019 05:48:03
-0000
@@ -0,0 +1,19 @@
+$OpenBSD$
+
+Fix building without features
+https://github.com/keepassxreboot/keepassxc/commit/d13e79dac484d09887861930bb2cebd4ef39022e?diff
+
+Index: src/keys/drivers/YubiKeyStub.cpp
+--- src/keys/drivers/YubiKeyStub.cpp.orig
++++ src/keys/drivers/YubiKeyStub.cpp
+@@ -75,3 +75,10 @@ YubiKey::ChallengeResult YubiKey::challenge(int slot,
+
+ return ERROR;
+ }
++
++bool YubiKey::checkSlotIsBlocking(int slot, QString& errorMessage)
++{
++ Q_UNUSED(slot);
++ Q_UNUSED(errorMessage);
++ return false;
++}
Index: patches/patch-tests_CMakeLists_txt
===================================================================
RCS file: patches/patch-tests_CMakeLists_txt
diff -N patches/patch-tests_CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-tests_CMakeLists_txt 30 Oct 2019 05:48:03 -0000
@@ -0,0 +1,38 @@
+$OpenBSD$
+
+Fix building without features
+https://github.com/keepassxreboot/keepassxc/commit/d13e79dac484d09887861930bb2cebd4ef39022e?diff
+
+Index: tests/CMakeLists.txt
+--- tests/CMakeLists.txt.orig
++++ tests/CMakeLists.txt
+@@ -87,17 +87,7 @@ macro(add_unit_test)
+ endif()
+ endmacro(add_unit_test)
+
+-set(TEST_LIBRARIES
+- keepassx_core
+- ${keepassxcbrowser_LIB}
+- ${autotype_LIB}
+- Qt5::Core
+- Qt5::Concurrent
+- Qt5::Widgets
+- Qt5::Test
+- ${GCRYPT_LIBRARIES}
+- ${GPGERROR_LIBRARIES}
+- ${ZLIB_LIBRARIES})
++set(TEST_LIBRARIES keepassx_core Qt5::Test)
+
+ set(testsupport_SOURCES
+ modeltest.cpp
+@@ -107,10 +97,6 @@ set(testsupport_SOURCES
+ stub/TestRandom.cpp)
+ add_library(testsupport STATIC ${testsupport_SOURCES})
+ target_link_libraries(testsupport Qt5::Core Qt5::Concurrent Qt5::Widgets
Qt5::Test)
+-
+-if(YUBIKEY_FOUND)
+- set(TEST_LIBRARIES ${TEST_LIBRARIES} ${YUBIKEY_LIBRARIES})
+-endif()
+
+ add_unit_test(NAME testgroup SOURCES TestGroup.cpp
+ LIBS testsupport ${TEST_LIBRARIES})
Index: patches/patch-tests_TestCli_cpp
===================================================================
RCS file: patches/patch-tests_TestCli_cpp
diff -N patches/patch-tests_TestCli_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-tests_TestCli_cpp 30 Oct 2019 05:48:03 -0000
@@ -0,0 +1,19 @@
+$OpenBSD$
+
+Fix building without features
+https://github.com/keepassxreboot/keepassxc/commit/d13e79dac484d09887861930bb2cebd4ef39022e?diff
+
+Index: tests/TestCli.cpp
+--- tests/TestCli.cpp.orig
++++ tests/TestCli.cpp
+@@ -21,9 +21,9 @@
+ #include "core/Bootstrap.h"
+ #include "core/Config.h"
+ #include "core/Global.h"
+-#include "core/PasswordGenerator.h"
+ #include "core/Tools.h"
+ #include "crypto/Crypto.h"
++#include "keys/drivers/YubiKey.h"
+ #include "format/Kdbx3Reader.h"
+ #include "format/Kdbx3Writer.h"
+ #include "format/Kdbx4Reader.h"
Index: patches/patch-tests_gui_CMakeLists_txt
===================================================================
RCS file: patches/patch-tests_gui_CMakeLists_txt
diff -N patches/patch-tests_gui_CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-tests_gui_CMakeLists_txt 30 Oct 2019 05:48:03 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+Fix building without features
+https://github.com/keepassxreboot/keepassxc/commit/d13e79dac484d09887861930bb2cebd4ef39022e?diff
+
+Index: tests/gui/CMakeLists.txt
+--- tests/gui/CMakeLists.txt.orig
++++ tests/gui/CMakeLists.txt
+@@ -16,5 +16,8 @@
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
+
+ add_unit_test(NAME testgui SOURCES TestGui.cpp ../util/TemporaryFile.cpp LIBS
${TEST_LIBRARIES})
+-add_unit_test(NAME testguibrowser SOURCES TestGuiBrowser.cpp
../util/TemporaryFile.cpp LIBS ${TEST_LIBRARIES})
+ add_unit_test(NAME testguipixmaps SOURCES TestGuiPixmaps.cpp LIBS
${TEST_LIBRARIES})
++
++if(WITH_XC_BROWSER)
++ add_unit_test(NAME testguibrowser SOURCES TestGuiBrowser.cpp
../util/TemporaryFile.cpp LIBS ${TEST_LIBRARIES})
++endif()
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/security/keepassxc/pkg/PLIST,v
retrieving revision 1.15
diff -u -p -u -p -r1.15 PLIST
--- pkg/PLIST 21 Apr 2019 11:29:44 -0000 1.15
+++ pkg/PLIST 30 Oct 2019 05:48:03 -0000
@@ -5,6 +5,7 @@
lib/keepassxc/
lib/keepassxc/libkeepassx-autotype-xcb.so
@man man/man1/keepassxc-cli.1
+@man man/man1/keepassxc.1
share/applications/org.keepassxc.KeePassXC.desktop
share/icons/hicolor/128x128/apps/keepassxc-dark.png
share/icons/hicolor/128x128/apps/keepassxc-locked.png
@@ -45,6 +46,10 @@ share/icons/hicolor/scalable/apps/keepas
share/icons/hicolor/scalable/apps/keepassxc.svg
share/icons/hicolor/scalable/mimetypes/application-x-keepassxc.svg
share/keepassxc/
+share/keepassxc/docs/
+share/keepassxc/docs/KeePassXC_GettingStarted.pdf
+share/keepassxc/docs/KeePassXC_UserGuide.pdf
+share/keepassxc/docs/man/
share/keepassxc/icons/
share/keepassxc/icons/application/
share/keepassxc/icons/application/128x128/
@@ -62,9 +67,9 @@ share/keepassxc/icons/application/16x16/
share/keepassxc/icons/application/16x16/actions/auto-type.png
share/keepassxc/icons/application/16x16/actions/configure.png
share/keepassxc/icons/application/16x16/actions/database-change-key.png
+share/keepassxc/icons/application/16x16/actions/database-lock.png
share/keepassxc/icons/application/16x16/actions/document-close.png
share/keepassxc/icons/application/16x16/actions/document-edit.png
-share/keepassxc/icons/application/16x16/actions/document-encrypt.png
share/keepassxc/icons/application/16x16/actions/document-new.png
share/keepassxc/icons/application/16x16/actions/document-open.png
share/keepassxc/icons/application/16x16/actions/document-save-as.png
@@ -104,9 +109,9 @@ share/keepassxc/icons/application/22x22/
share/keepassxc/icons/application/22x22/actions/auto-type.png
share/keepassxc/icons/application/22x22/actions/chronometer.png
share/keepassxc/icons/application/22x22/actions/database-change-key.png
+share/keepassxc/icons/application/22x22/actions/database-lock.png
share/keepassxc/icons/application/22x22/actions/dialog-close.png
share/keepassxc/icons/application/22x22/actions/dialog-ok.png
-share/keepassxc/icons/application/22x22/actions/document-encrypt.png
share/keepassxc/icons/application/22x22/actions/document-new.png
share/keepassxc/icons/application/22x22/actions/document-open.png
share/keepassxc/icons/application/22x22/actions/document-save.png
@@ -151,11 +156,11 @@ share/keepassxc/icons/application/32x32/
share/keepassxc/icons/application/32x32/actions/chronometer.png
share/keepassxc/icons/application/32x32/actions/configure.png
share/keepassxc/icons/application/32x32/actions/database-change-key.png
+share/keepassxc/icons/application/32x32/actions/database-lock.png
share/keepassxc/icons/application/32x32/actions/dialog-close.png
share/keepassxc/icons/application/32x32/actions/dialog-ok.png
share/keepassxc/icons/application/32x32/actions/document-close.png
share/keepassxc/icons/application/32x32/actions/document-edit.png
-share/keepassxc/icons/application/32x32/actions/document-encrypt.png
share/keepassxc/icons/application/32x32/actions/document-new.png
share/keepassxc/icons/application/32x32/actions/document-open.png
share/keepassxc/icons/application/32x32/actions/document-properties.png
@@ -176,6 +181,7 @@ share/keepassxc/icons/application/32x32/
share/keepassxc/icons/application/32x32/actions/password-generator.png
share/keepassxc/icons/application/32x32/actions/password-show-off.png
share/keepassxc/icons/application/32x32/actions/password-show-on.png
+share/keepassxc/icons/application/32x32/actions/statistics.png
share/keepassxc/icons/application/32x32/actions/system-help.png
share/keepassxc/icons/application/32x32/actions/system-search.png
share/keepassxc/icons/application/32x32/actions/url-copy.png
@@ -211,6 +217,7 @@ share/keepassxc/icons/application/64x64/
share/keepassxc/icons/application/64x64/mimetypes/application-x-keepassxc.png
share/keepassxc/icons/application/scalable/
share/keepassxc/icons/application/scalable/apps/
+share/keepassxc/icons/application/scalable/apps/freedesktop.svg
share/keepassxc/icons/application/scalable/apps/keepassxc-dark.svg
share/keepassxc/icons/application/scalable/apps/keepassxc-locked.svg
share/keepassxc/icons/application/scalable/apps/keepassxc-unlocked.svg