Opened 15 months ago

Last modified 9 months ago

#72178 new defect

KeePassXC: update to 2.7.10

Reported by: contextnerror Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: KeePassXC

Description

2.7.10 is no longer pre-release: https://github.com/keepassxreboot/keepassxc/releases/tag/2.7.10
Cannot update myself until #70682 is fixed

Attachments (3)

main.log.bz2 (34.2 KB) - added by contextnerror 13 months ago.
main-2.log.bz2 (43.4 KB) - added by contextnerror 13 months ago.
add_support_for_old_macos-2-wip.diff (1.8 KB) - added by contextnerror 13 months ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 13 months ago by contextnerror

I was able to to some preliminary testing after restoring qt5-qttools from a backup. Building 2.7.10 without add_support_for_old_macos.diff, which does not apply cleanly after this change: https://github.com/keepassxreboot/keepassxc/pull/11428

Currently the build fails on 10.14 due to ScreenCaptureKit. It looks like there is supposed to be some built-in checks for systems that don't support it, but right now it's not working correctly.

:info:build /opt/local/var/macports/build/_Users_christinel18_dports_security_KeePassXC/KeePassXC/work/keepassxc-2.7.10/src/gui/osutils/macutils/AppKitImpl.mm:22:63: warning: 'MAC_OS_VERSION_12_3' is not defined, evaluates to 0 [-Wundef]
:info:build    22 | #if __clang_major__ >= 13 && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_12_3
:info:build       |                                                               ^
:info:build /opt/local/var/macports/build/_Users_christinel18_dports_security_KeePassXC/KeePassXC/work/keepassxc-2.7.10/src/gui/osutils/macutils/AppKitImpl.mm:23:9: fatal error: 'ScreenCaptureKit/ScreenCaptureKit.h' file not found
:info:build    23 | #import <ScreenCaptureKit/ScreenCaptureKit.h>
:info:build       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build 1 warning and 1 error generated.
:info:build make[2]: *** [src/CMakeFiles/keepassx_core.dir/gui/osutils/macutils/AppKitImpl.mm.o] Error 1

Will attach full logs.

Changed 13 months ago by contextnerror

Attachment: main.log.bz2 added

comment:2 Changed 13 months ago by tenzap

Looks like MAC_OS_VERSION_12_3 is not known. You should probably replace it by the real value of that macro.

You have an example below but I don't remember how to compute the correct value for it.

https://github.com/macports/macports-ports/blob/0d59d52fe4ba07dd3fe24e3b56cceb6ccb6390a5/security/KeePassXC/files/add_support_for_old_macos-2.diff#L16C30-L16C69

comment:3 Changed 13 months ago by contextnerror

I think I managed to patch MAC_OS_VERSION_12_3 correctly, but it's still trying to fetch ScreenCaptureKit while working on tests.

:info:build [ 70%] Linking CXX executable keepassxc-cli
:info:build cd /opt/local/var/macports/build/_Users_christinel18_dports_security_KeePassXC/KeePassXC/work/build/src/cli && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/keepassxc-cli.dir/link.txt --verbose=ON
:info:build ld: framework not found ScreenCaptureKit
:info:build clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Will attach logs and my current version of the patchfile for AppKitImpl.mm.

Changed 13 months ago by contextnerror

Attachment: main-2.log.bz2 added

Changed 13 months ago by contextnerror

comment:4 Changed 9 months ago by tenzap

For the error you have:

:info:build cd /opt/local/var/macports/build/_Users_christinel18_dports_security_KeePassXC/KeePassXC/work/build/src/cli && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/keepassxc-cli.dir/link.txt --verbose=ON
:info:build ld: framework not found ScreenCaptureKit
:info:build clang++: error: linker command failed with exit code 1 (use -v to see invocation)

You should do the same kind of patching as for LocalAuthentication in https://github.com/macports/macports-ports/blob/0d59d52fe4ba07dd3fe24e3b56cceb6ccb6390a5/security/KeePassXC/files/add_support_for_old_macos.diff

It shouldn't be too difficult. Mostly replicate the same logic as for LocalAuthentication but for ScreenCaptureKit.

comment:5 Changed 9 months ago by tenzap

Concerning your patch, the idea looks good. Maybe the change from MAC_OS_VERSION_12_3 to 120300 could be forwarded upstream?

Note: See TracTickets for help on using tickets.