From 7bf0338610ec866e3bb4b4b50d77eb9ba20f76e5 Mon Sep 17 00:00:00 2001 From: Sergey Kiselev Date: Fri, 27 Jun 2025 13:03:04 +0500 Subject: [PATCH] security/keepassxc: Update to 2.7.10 Migrating to 'botan3'. Also preserving version 2.7.6. PR: 279879 --- security/Makefile | 1 + security/keepassxc/Makefile | 11 ++- security/keepassxc/distinfo | 6 +- security/keepassxc/files/patch-CMakeLists.txt | 13 ++++ security/keepassxc276/Makefile | 69 +++++++++++++++++++ security/keepassxc276/distinfo | 3 + security/keepassxc276/files/patch-botan3 | 31 +++++++++ ...patch-src_thirdparty_ykcore_CMakeLists.txt | 11 +++ security/keepassxc276/pkg-descr | 22 ++++++ security/keepassxc276/pkg-plist | 67 ++++++++++++++++++ 10 files changed, 224 insertions(+), 10 deletions(-) create mode 100644 security/keepassxc/files/patch-CMakeLists.txt create mode 100644 security/keepassxc276/Makefile create mode 100644 security/keepassxc276/distinfo create mode 100644 security/keepassxc276/files/patch-botan3 create mode 100644 security/keepassxc276/files/patch-src_thirdparty_ykcore_CMakeLists.txt create mode 100644 security/keepassxc276/pkg-descr create mode 100644 security/keepassxc276/pkg-plist diff --git a/security/Makefile b/security/Makefile index d8b14da244aa..4ac088d602c1 100644 --- a/security/Makefile +++ b/security/Makefile @@ -255,6 +255,7 @@ SUBDIR += keepass SUBDIR += keepass-plugin-keepassrpc SUBDIR += keepassxc + SUBDIR += keepassxc276 SUBDIR += keybase SUBDIR += keychain SUBDIR += keyprint diff --git a/security/keepassxc/Makefile b/security/keepassxc/Makefile index 4cb9c335c67b..c215ed92d68f 100644 --- a/security/keepassxc/Makefile +++ b/security/keepassxc/Makefile @@ -1,5 +1,5 @@ PORTNAME= keepassxc -DISTVERSION= 2.7.6 +DISTVERSION= 2.7.10 CATEGORIES= security MASTER_SITES= https://github.com/keepassxreboot/keepassxc/releases/download/${DISTVERSION}/ DISTNAME= ${PORTNAME}-${DISTVERSION}-src @@ -15,24 +15,21 @@ LICENSE_NAME_NOKIA-LGPL-EXCEPTION= Nokia Qt LGPL Exception version 1.1 LICENSE_FILE_NOKIA-LGPL-EXCEPTION= ${WRKSRC}/LICENSE.NOKIA-LGPL-EXCEPTION LICENSE_PERMS_NOKIA-LGPL-EXCEPTION= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept -DEPRECATED= Depends on expired security/botan2 -EXPIRATION_DATE=2025-06-21 - BUILD_DEPENDS= asciidoctor:textproc/rubygem-asciidoctor LIB_DEPENDS= libargon2.so:security/libargon2 \ libqrencode.so:graphics/libqrencode \ - libbotan-2.so:security/botan2 + libbotan-3.so:security/botan3 USES= cmake compiler:c++17-lang desktop-file-utils pkgconfig qt:5 \ readline shared-mime-info tar:xz xorg USE_QT= concurrent core dbus gui network svg widgets buildtools:build \ linguisttools:build qmake:build testlib:build x11extras USE_XORG= x11 +WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION} -WRKSRC= ${WRKDIR}/${DISTNAME:S/-src//} CMAKE_OFF= WITH_XC_UPDATECHECK -CONFLICTS_INSTALL= keepassx-0.* keepassx2 keepassx +CONFLICTS_INSTALL= keepassx-0.* keepassx2 keepassx keepassxc276 OPTIONS_DEFINE= AUTOTYPE BROWSER FDOSECRETS KEESHARE NETWORKING SSHAGENT YUBIKEY TEST OPTIONS_DEFAULT= AUTOTYPE BROWSER FDOSECRETS KEESHARE NETWORKING SSHAGENT YUBIKEY diff --git a/security/keepassxc/distinfo b/security/keepassxc/distinfo index 25f70dd938b3..1059d9f8f609 100644 --- a/security/keepassxc/distinfo +++ b/security/keepassxc/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1692163985 -SHA256 (keepassxc-2.7.6-src.tar.xz) = a58074509fa8e90f152c6247f73e75e126303081f55eedb4ea0cbb6fa980d670 -SIZE (keepassxc-2.7.6-src.tar.xz) = 8474624 +TIMESTAMP = 1745259410 +SHA256 (keepassxc-2.7.10-src.tar.xz) = 5ce76d6440986c24842585f019d5f3cadc166fa71fc911a4fe97b8bbc4819dfa +SIZE (keepassxc-2.7.10-src.tar.xz) = 9787952 diff --git a/security/keepassxc/files/patch-CMakeLists.txt b/security/keepassxc/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..3ed50358efb6 --- /dev/null +++ b/security/keepassxc/files/patch-CMakeLists.txt @@ -0,0 +1,13 @@ +--- CMakeLists.txt.orig 2024-06-19 14:32:55.000000000 -0700 ++++ CMakeLists.txt 2024-06-20 07:26:46.907481000 -0700 +@@ -575,8 +575,8 @@ + include_directories(SYSTEM ${PCSC_INCLUDE_DIRS}) + + if(UNIX AND NOT APPLE) +- find_library(LIBUSB_LIBRARIES NAMES usb-1.0 REQUIRED) +- find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h PATH_SUFFIXES "libusb-1.0" "libusb" REQUIRED) ++ find_library(LIBUSB_LIBRARIES NAMES usb REQUIRED) ++ find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h PATH_SUFFIXES "libusb" "libusb" REQUIRED) + include_directories(SYSTEM ${LIBUSB_INCLUDE_DIR}) + endif() + endif() diff --git a/security/keepassxc276/Makefile b/security/keepassxc276/Makefile new file mode 100644 index 000000000000..d7c46b8e46c7 --- /dev/null +++ b/security/keepassxc276/Makefile @@ -0,0 +1,69 @@ +PORTNAME= keepassxc +DISTVERSION= 2.7.6 +CATEGORIES= security +MASTER_SITES= https://github.com/keepassxreboot/keepassxc/releases/download/${DISTVERSION}/ +PKGNAMESUFFIX= 276 +DISTNAME= ${PORTNAME}-${DISTVERSION}-src + +MAINTAINER= lwhsu@FreeBSD.org +COMMENT= KeePass Cross-platform Community Edition +WWW= https://keepassxc.org + +#CONFLICTS= keepassxc-[1-9]* + +LICENSE= APACHE20 BSD3CLAUSE CC0-1.0 GPLv2 GPLv3 LGPL21 LGPL3 MIT \ + NOKIA-LGPL-EXCEPTION +LICENSE_COMB= multi +LICENSE_NAME_NOKIA-LGPL-EXCEPTION= Nokia Qt LGPL Exception version 1.1 +LICENSE_FILE_NOKIA-LGPL-EXCEPTION= ${WRKSRC}/LICENSE.NOKIA-LGPL-EXCEPTION +LICENSE_PERMS_NOKIA-LGPL-EXCEPTION= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept + +BUILD_DEPENDS= asciidoctor:textproc/rubygem-asciidoctor +LIB_DEPENDS= libargon2.so:security/libargon2 \ + libqrencode.so:graphics/libqrencode \ + libbotan-3.so:security/botan3 + +USES= cmake compiler:c++17-lang desktop-file-utils pkgconfig qt:5 \ + readline shared-mime-info tar:xz xorg +USE_QT= concurrent core dbus gui network svg widgets buildtools:build \ + linguisttools:build qmake:build testlib:build x11extras +USE_XORG= x11 + +WRKSRC= ${WRKDIR}/${DISTNAME:S/-src//} +CMAKE_OFF= WITH_XC_UPDATECHECK + +CONFLICTS_INSTALL= keepassx-0.* keepassx2 keepassx + +OPTIONS_DEFINE= AUTOTYPE BROWSER FDOSECRETS KEESHARE NETWORKING SSHAGENT YUBIKEY TEST +OPTIONS_DEFAULT= AUTOTYPE BROWSER FDOSECRETS KEESHARE NETWORKING SSHAGENT YUBIKEY +OPTIONS_SUB= yes + +AUTOTYPE_CMAKE_BOOL= WITH_XC_AUTOTYPE +AUTOTYPE_DESC= Auto-type passwords in input fields +AUTOTYPE_USE= XORG=xi,xtst + +BROWSER_CMAKE_BOOL= WITH_XC_BROWSER +BROWSER_DESC= Browser integration with KeePassXC-Browser + +FDOSECRETS_CMAKE_BOOL= WITH_XC_FDOSECRETS +FDOSECRETS_DESC= freedesktop.org secrets service support + +KEESHARE_CMAKE_BOOL= WITH_XC_KEESHARE +KEESHARE_DESC= Sharing integration with KeeShare +KEESHARE_USES= minizip + +# Legacy/Deprecated. +NETWORKING_CMAKE_BOOL= WITH_XC_NETWORKING +NETWORKING_DESC= Networking support (e.g. for downloading website icons) + +SSHAGENT_CMAKE_BOOL= WITH_XC_SSHAGENT +SSHAGENT_DESC= SSH agent support + +YUBIKEY_CMAKE_BOOL= WITH_XC_YUBIKEY +YUBIKEY_DESC= YubiKey support +YUBIKEY_LIB_DEPENDS= libpcsclite.so:devel/pcsc-lite + +TEST_CMAKE_BOOL= WITH_TESTS WITH_GUI_TESTS +TEST_TEST_TARGET= test + +.include diff --git a/security/keepassxc276/distinfo b/security/keepassxc276/distinfo new file mode 100644 index 000000000000..25f70dd938b3 --- /dev/null +++ b/security/keepassxc276/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1692163985 +SHA256 (keepassxc-2.7.6-src.tar.xz) = a58074509fa8e90f152c6247f73e75e126303081f55eedb4ea0cbb6fa980d670 +SIZE (keepassxc-2.7.6-src.tar.xz) = 8474624 diff --git a/security/keepassxc276/files/patch-botan3 b/security/keepassxc276/files/patch-botan3 new file mode 100644 index 000000000000..0fda614bd44c --- /dev/null +++ b/security/keepassxc276/files/patch-botan3 @@ -0,0 +1,31 @@ +From cc0530ba4671a7e2b6ac4a6c00cd097f4114fd22 Mon Sep 17 00:00:00 2001 +From: Dan Church +Date: Sun, 19 Nov 2023 11:05:21 -0600 +Subject: [PATCH] Fix Botan 2/3 include + +Botan::secure_scrub_memory -> defined in mem_ops.h +Botan::secure_vector -> defined in secmem.h + +The reason only including secmem.h worked in previous (<3.0) versions of +Botan was because secmem.h included mem_ops.h. This is no longer the +case since commit +randombit/botan@49dbbcb2bfda05ef9d3f09848c9ba22fcbcd5066 (2023-10-11; +"Split out allocator helpers to allocator.h") + +Fixes #10038 +--- + src/keys/FileKey.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/keys/FileKey.h b/src/keys/FileKey.h +index 795f03bdbc..65cd955a7c 100644 +--- src/keys/FileKey.h ++++ src/keys/FileKey.h +@@ -19,6 +19,7 @@ + #ifndef KEEPASSX_FILEKEY_H + #define KEEPASSX_FILEKEY_H + ++#include + #include + + #include "keys/Key.h" diff --git a/security/keepassxc276/files/patch-src_thirdparty_ykcore_CMakeLists.txt b/security/keepassxc276/files/patch-src_thirdparty_ykcore_CMakeLists.txt new file mode 100644 index 000000000000..3335de52b43a --- /dev/null +++ b/security/keepassxc276/files/patch-src_thirdparty_ykcore_CMakeLists.txt @@ -0,0 +1,11 @@ +--- src/thirdparty/ykcore/CMakeLists.txt.orig 2022-03-21 22:47:20 UTC ++++ src/thirdparty/ykcore/CMakeLists.txt +@@ -27,7 +27,7 @@ elseif(UNIX AND NOT APPLE) + elseif(UNIX AND NOT APPLE) + target_sources(ykcore PRIVATE ykcore_libusb-1.0.c) + +- find_library(LIBUSB_LIBRARY NAMES usb-1.0) ++ find_library(LIBUSB_LIBRARY NAMES usb-1.0 usb) + find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h PATH_SUFFIXES "libusb-1.0" "libusb") + if(NOT LIBUSB_LIBRARY OR NOT LIBUSB_INCLUDE_DIR) + message(FATAL_ERROR "libusb-1.0 dev package required, but not found") diff --git a/security/keepassxc276/pkg-descr b/security/keepassxc276/pkg-descr new file mode 100644 index 000000000000..f71cf7e984f7 --- /dev/null +++ b/security/keepassxc276/pkg-descr @@ -0,0 +1,22 @@ +KeePassXC is a community fork of KeePassX, a native cross-platform port of +KeePass Password Safe, with the goal to extend and improve it with new features +and bugfixes to provide a feature-rich, fully cross-platform and modern +open-source password manager. + +Main Features + + * Secure storage with AES, Twofish or ChaCha20 encryption + * File format compatibility with KeePass2, KeePassX, MacPass, KeeWeb and many + others (KDBX 3.1 and 4.0) + * SSH Agent integration + * Passwords synchronization using KeeShare + * Auto-Type for automagically filling in login forms + * Key file and YubiKey challenge-response support for additional security + * TOTP generation (including Steam Guard) + * CSV import from other password managers (e.g., LastPass) + * Command line interface + * Custom icons for database entries and download of website favicons + * Database merge functionality + * Automatic reload when the database was changed externally + * Browser integration with KeePassXC-Browser for Google Chrome, Chromium, + Vivaldi, and Mozilla Firefox. diff --git a/security/keepassxc276/pkg-plist b/security/keepassxc276/pkg-plist new file mode 100644 index 000000000000..28f44ae6c9c8 --- /dev/null +++ b/security/keepassxc276/pkg-plist @@ -0,0 +1,67 @@ +bin/keepassxc +bin/keepassxc-cli +%%BROWSER%%bin/keepassxc-proxy +%%AUTOTYPE%%lib/keepassxc/libkeepassxc-autotype-xcb.so +share/man/man1/keepassxc-cli.1.gz +share/man/man1/keepassxc.1.gz +share/applications/org.keepassxc.KeePassXC.desktop +share/icons/hicolor/256x256/apps/keepassxc.png +share/icons/hicolor/scalable/apps/keepassxc-locked.svg +share/icons/hicolor/scalable/apps/keepassxc-monochrome-dark-locked.svg +share/icons/hicolor/scalable/apps/keepassxc-monochrome-dark.svg +share/icons/hicolor/scalable/apps/keepassxc-monochrome-light-locked.svg +share/icons/hicolor/scalable/apps/keepassxc-monochrome-light.svg +share/icons/hicolor/scalable/apps/keepassxc-unlocked.svg +share/icons/hicolor/scalable/apps/keepassxc.svg +share/icons/hicolor/scalable/mimetypes/application-x-keepassxc.svg +%%DATADIR%%/docs/KeePassXC_GettingStarted.html +%%DATADIR%%/docs/KeePassXC_KeyboardShortcuts.html +%%DATADIR%%/docs/KeePassXC_UserGuide.html +%%DATADIR%%/icons/application/256x256/apps/keepassxc.png +%%DATADIR%%/translations/keepassxc_ar.qm +%%DATADIR%%/translations/keepassxc_bg.qm +%%DATADIR%%/translations/keepassxc_ca.qm +%%DATADIR%%/translations/keepassxc_cs.qm +%%DATADIR%%/translations/keepassxc_da.qm +%%DATADIR%%/translations/keepassxc_de.qm +%%DATADIR%%/translations/keepassxc_el.qm +%%DATADIR%%/translations/keepassxc_en.qm +%%DATADIR%%/translations/keepassxc_en_GB.qm +%%DATADIR%%/translations/keepassxc_en_US.qm +%%DATADIR%%/translations/keepassxc_es.qm +%%DATADIR%%/translations/keepassxc_et.qm +%%DATADIR%%/translations/keepassxc_fi.qm +%%DATADIR%%/translations/keepassxc_fil.qm +%%DATADIR%%/translations/keepassxc_fr.qm +%%DATADIR%%/translations/keepassxc_fr_CA.qm +%%DATADIR%%/translations/keepassxc_he.qm +%%DATADIR%%/translations/keepassxc_hr.qm +%%DATADIR%%/translations/keepassxc_hu.qm +%%DATADIR%%/translations/keepassxc_id.qm +%%DATADIR%%/translations/keepassxc_it.qm +%%DATADIR%%/translations/keepassxc_ja.qm +%%DATADIR%%/translations/keepassxc_km.qm +%%DATADIR%%/translations/keepassxc_ko.qm +%%DATADIR%%/translations/keepassxc_lt.qm +%%DATADIR%%/translations/keepassxc_my.qm +%%DATADIR%%/translations/keepassxc_nb.qm +%%DATADIR%%/translations/keepassxc_nl.qm +%%DATADIR%%/translations/keepassxc_pl.qm +%%DATADIR%%/translations/keepassxc_pt_BR.qm +%%DATADIR%%/translations/keepassxc_pt_PT.qm +%%DATADIR%%/translations/keepassxc_ro.qm +%%DATADIR%%/translations/keepassxc_ru.qm +%%DATADIR%%/translations/keepassxc_si.qm +%%DATADIR%%/translations/keepassxc_sk.qm +%%DATADIR%%/translations/keepassxc_sl.qm +%%DATADIR%%/translations/keepassxc_sq.qm +%%DATADIR%%/translations/keepassxc_sr.qm +%%DATADIR%%/translations/keepassxc_sv.qm +%%DATADIR%%/translations/keepassxc_th.qm +%%DATADIR%%/translations/keepassxc_tr.qm +%%DATADIR%%/translations/keepassxc_uk.qm +%%DATADIR%%/translations/keepassxc_zh_CN.qm +%%DATADIR%%/translations/keepassxc_zh_TW.qm +%%DATADIR%%/wordlists/eff_large.wordlist +share/metainfo/org.keepassxc.KeePassXC.appdata.xml +share/mime/packages/keepassxc.xml