Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keepassxc: 2.2.4 -> 2.3.0 #36133

Closed
wants to merge 2 commits into from
Closed

Conversation

zimbatm
Copy link
Member

@zimbatm zimbatm commented Feb 28, 2018

Motivation for this change

HN-driven development. https://news.ycombinator.com/item?id=16483722

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘libargon2-20171227’ in /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/development/libraries/libargon2/default.nix:28 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

@zimbatm
Copy link
Member Author

zimbatm commented Feb 28, 2018

@GrahamcOfBorg build keepassxc

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

shrinking /nix/store/qn9z5y9j9q6qi7czpckrjv2r5sdhb36l-keepassxc-2.3.0/bin/keepassxc-cli
shrinking /nix/store/qn9z5y9j9q6qi7czpckrjv2r5sdhb36l-keepassxc-2.3.0/bin/keepassxc
shrinking /nix/store/qn9z5y9j9q6qi7czpckrjv2r5sdhb36l-keepassxc-2.3.0/lib/keepassxc/libkeepassx-autotype-xcb.so
gzipping man pages under /nix/store/qn9z5y9j9q6qi7czpckrjv2r5sdhb36l-keepassxc-2.3.0/share/man/
strip is /nix/store/b0zlxla7dmy1iwc3g459rjznx59797xy-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/qn9z5y9j9q6qi7czpckrjv2r5sdhb36l-keepassxc-2.3.0/lib  /nix/store/qn9z5y9j9q6qi7czpckrjv2r5sdhb36l-keepassxc-2.3.0/bin 
patching script interpreter paths in /nix/store/qn9z5y9j9q6qi7czpckrjv2r5sdhb36l-keepassxc-2.3.0
checking for references to /tmp/nix-build-keepassxc-2.3.0.drv-0 in /nix/store/qn9z5y9j9q6qi7czpckrjv2r5sdhb36l-keepassxc-2.3.0...
postPatchMkspecs
postPatchMkspecs

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

/nix/store/9avjr40zgds5rycm2ndw9imrfpkb3vga-CF-osx-10.10.5-private/Library/Frameworks/CoreFoundation.framework/Headers/CFUserNotification.h:123:78: error: use of old-style cast [-Werror,-Wold-style-cast]
CF_INLINE CFOptionFlags CFUserNotificationPopUpSelection(CFIndex n) {return ((CFOptionFlags)(n << 24));}
                                                                             ^              ~~~~~~~~~
11 errors generated.
make[2]: *** [src/CMakeFiles/keepassx_core.dir/build.make:519: src/CMakeFiles/keepassx_core.dir/core/ScreenLockListenerPrivate.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:197: src/CMakeFiles/keepassx_core.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
builder for '/nix/store/khvf1asxnjlrrk1pa5gjip43g2y01xp6-keepassxc-2.3.0.drv' failed with exit code 2
error: build of '/nix/store/khvf1asxnjlrrk1pa5gjip43g2y01xp6-keepassxc-2.3.0.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

shrinking /nix/store/qn9z5y9j9q6qi7czpckrjv2r5sdhb36l-keepassxc-2.3.0/bin/keepassxc-cli
shrinking /nix/store/qn9z5y9j9q6qi7czpckrjv2r5sdhb36l-keepassxc-2.3.0/bin/keepassxc
shrinking /nix/store/qn9z5y9j9q6qi7czpckrjv2r5sdhb36l-keepassxc-2.3.0/lib/keepassxc/libkeepassx-autotype-xcb.so
gzipping man pages under /nix/store/qn9z5y9j9q6qi7czpckrjv2r5sdhb36l-keepassxc-2.3.0/share/man/
strip is /nix/store/b0zlxla7dmy1iwc3g459rjznx59797xy-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/qn9z5y9j9q6qi7czpckrjv2r5sdhb36l-keepassxc-2.3.0/lib  /nix/store/qn9z5y9j9q6qi7czpckrjv2r5sdhb36l-keepassxc-2.3.0/bin 
patching script interpreter paths in /nix/store/qn9z5y9j9q6qi7czpckrjv2r5sdhb36l-keepassxc-2.3.0
checking for references to /tmp/nix-build-keepassxc-2.3.0.drv-0 in /nix/store/qn9z5y9j9q6qi7czpckrjv2r5sdhb36l-keepassxc-2.3.0...
postPatchMkspecs
postPatchMkspecs

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

/nix/store/qn9z5y9j9q6qi7czpckrjv2r5sdhb36l-keepassxc-2.3.0
/nix/store/31rjpj51sv2vs1h6402qa5f4yrdy7shd-libargon2-20171227

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

                                                                              ^              ~~~~~~~~~~~~~~~~~
/nix/store/9avjr40zgds5rycm2ndw9imrfpkb3vga-CF-osx-10.10.5-private/Library/Frameworks/CoreFoundation.framework/Headers/CFUserNotification.h:123:78: error: use of old-style cast [-Werror,-Wold-style-cast]
CF_INLINE CFOptionFlags CFUserNotificationPopUpSelection(CFIndex n) {return ((CFOptionFlags)(n << 24));}
                                                                             ^              ~~~~~~~~~
11 errors generated.
make[2]: *** [src/CMakeFiles/keepassx_core.dir/build.make:519: src/CMakeFiles/keepassx_core.dir/core/ScreenLockListenerPrivate.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:197: src/CMakeFiles/keepassx_core.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
builder for '/nix/store/y84iiclw5a954g9pqb101fj1a12cfh4f-keepassxc-2.3.0.drv' failed with exit code 2
error: build of '/nix/store/y84iiclw5a954g9pqb101fj1a12cfh4f-keepassxc-2.3.0.drv' failed

@Mic92
Copy link
Member

Mic92 commented Feb 28, 2018

Is the browser extension build by default?

@Mic92
Copy link
Member

Mic92 commented Feb 28, 2018

I would suggest to disable KeePassHTTP by default:

CMake Warning at CMakeLists.txt:53 (message):
  KeePassHTTP support has been deprecated and will be removed in a future
  version.  Please use WITH_XC_BROWSER instead!
  For enabling / disabling network access code, WITH_XC_HTTP has been
  replaced by WITH_XC_NETWORKING.

Copy link
Contributor

@jonafato jonafato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a local branch started for this as well. I'll add some comments here instead of submitting a redundant PR.

, qtbase
, qtx11extras
, yubikey-personalization
, zlib
, withKeePassHTTP ? true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing options for withKeePassBrowser (requires a new dependency on libsodium), withNetworking, and withSSHAgent and their equivalent CMAKE flags.

To preserve the spirit of the existing configuration, withKeePassBrowser should likely default to true.

};

patches = [ ./cmake.patch ./darwin.patch ];

cmakeFlags = [
"-DWITH_GUI_TESTS=ON"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll want to add "-DKEEPASSXC_BUILD_TYPE=Release" to avoid a big prerelease warning in the UI.

, qtbase
, qtx11extras
, yubikey-personalization
, zlib
, withKeePassHTTP ? true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Echoing @Mic92, KeePassHTTP is deprecated and should be disabled by default.

};

patches = [ ./cmake.patch ./darwin.patch ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cmake.patch file should be removed if it's no longer needed.

};

patches = [ ./cmake.patch ./darwin.patch ];
Copy link
Contributor

@jonafato jonafato Feb 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is darwin.patch not necessary anymore? (I don't use MacOS and can't verify whether or not it's still needed.) If it still is, here's an updated version that applies against the 2.3.0 tag:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7410b4e0..0fd39403 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -250,8 +250,8 @@ else()
   set(PROGNAME keepassxc)
 endif()
 
-if(APPLE AND WITH_APP_BUNDLE AND "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
-  set(CMAKE_INSTALL_PREFIX "/Applications")
+if(APPLE AND WITH_APP_BUNDLE)
+  set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/Applications")
   set(CMAKE_INSTALL_MANDIR "/usr/local/share/man")
 endif()
 
@@ -262,7 +262,7 @@ if(MINGW)
   set(PLUGIN_INSTALL_DIR ".")
   set(DATA_INSTALL_DIR   "share")
 elseif(APPLE AND WITH_APP_BUNDLE)
-  set(CLI_INSTALL_DIR    "/usr/local/bin")
+  set(CLI_INSTALL_DIR    "../bin")
   set(PROXY_INSTALL_DIR  "/usr/local/bin")
   set(BIN_INSTALL_DIR    ".")
   set(PLUGIN_INSTALL_DIR "${PROGNAME}.app/Contents/PlugIns")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 69526967..38f7c5d4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -319,11 +319,6 @@ if(APPLE AND WITH_APP_BUNDLE)
   set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}")
   include(CPack)
 
-  add_custom_command(TARGET ${PROGNAME}
-                     POST_BUILD
-                     COMMAND ${MACDEPLOYQT_EXE} ${PROGNAME}.app
-                     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src
-                     COMMENT "Deploying app bundle")
 endif()
 
 install(TARGETS ${PROGNAME}
diff --git a/src/autotype/mac/CMakeLists.txt b/src/autotype/mac/CMakeLists.txt
index 08c53278..b833b692 100644
--- a/src/autotype/mac/CMakeLists.txt
+++ b/src/autotype/mac/CMakeLists.txt
@@ -14,7 +14,6 @@ if(WITH_APP_BUNDLE)
   add_custom_command(TARGET keepassx-autotype-cocoa
                      POST_BUILD
                      COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libkeepassx-autotype-cocoa.so ${PLUGIN_INSTALL_DIR}
-                     COMMAND ${MACDEPLOYQT_EXE} ${PROGNAME}.app -executable=${PLUGIN_INSTALL_DIR}/libkeepassx-autotype-cocoa.so -no-plugins
                      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src
   COMMENT "Deploying autotype plugin")
 else()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/cc @orivej

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

[ 72%] Built target testcsvparser_autogen
[ 73%] Built target testcsvparser
[ 74%] Automatic MOC, UIC and RCC for target testmerge
[ 74%] Built target testmerge_autogen
[ 74%] Built target testmerge
[ 74%] Automatic MOC, UIC and RCC for target testkdbx4
[ 74%] Built target testkdbx4_autogen
[ 76%] Built target testkdbx4
building of '/nix/store/nzdknsyi8pjfj8j20kkcmqrwbjz1wfx6-keepassxc-2.3.0.drv' timed out after 3600 seconds
�[31;1merror:�[0m build of '/nix/store/nzdknsyi8pjfj8j20kkcmqrwbjz1wfx6-keepassxc-2.3.0.drv' failed

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

shrinking /nix/store/dmz3w56np3bxnq6im850rvxlf5z88qzg-keepassxc-2.3.0/bin/keepassxc-cli
shrinking /nix/store/dmz3w56np3bxnq6im850rvxlf5z88qzg-keepassxc-2.3.0/bin/keepassxc
gzipping man pages under /nix/store/dmz3w56np3bxnq6im850rvxlf5z88qzg-keepassxc-2.3.0/share/man/
strip is /nix/store/lvx1acn1ig1j2km8jds5x3ggh3f2wa8v-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/dmz3w56np3bxnq6im850rvxlf5z88qzg-keepassxc-2.3.0/lib  /nix/store/dmz3w56np3bxnq6im850rvxlf5z88qzg-keepassxc-2.3.0/bin
patching script interpreter paths in /nix/store/dmz3w56np3bxnq6im850rvxlf5z88qzg-keepassxc-2.3.0
checking for references to /build in /nix/store/dmz3w56np3bxnq6im850rvxlf5z88qzg-keepassxc-2.3.0...
postPatchMkspecs
postPatchMkspecs
/nix/store/dmz3w56np3bxnq6im850rvxlf5z88qzg-keepassxc-2.3.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

these derivations will be built:
  /nix/store/nib871al02lnyy991iixwy2jz4crsqki-source.drv
  /nix/store/nzdknsyi8pjfj8j20kkcmqrwbjz1wfx6-keepassxc-2.3.0.drv
waiting for locks or build slots...
/nix/store/dmz3w56np3bxnq6im850rvxlf5z88qzg-keepassxc-2.3.0
/nix/store/jf03y908hmc8qd6zljampzvapwmvycn3-libargon2-20171227

@zimbatm
Copy link
Member Author

zimbatm commented Mar 2, 2018

@jonafato can you take over? I'm probably not going to finish this

@jonafato
Copy link
Contributor

jonafato commented Mar 4, 2018

@zimbatm See #36281.

@Mic92 Mic92 closed this Mar 4, 2018
@zimbatm zimbatm deleted the keepassxc-2.3.0 branch March 5, 2018 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants