From 824607080a5fda83e6d667b076f99a607b09721d Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Sat, 13 Jan 2018 01:38:26 +0100 Subject: [PATCH] Install needed PPA packages for deployment --- AppImage-Recipe.sh | 2 ++ Dockerfile | 22 ++++++++++++++-------- ci/trusty/Dockerfile | 32 +++++++++++++++++++++++--------- cmake/FindLibGPGError.cmake | 2 +- src/format/KdbxXmlReader.cpp | 2 +- 5 files changed, 41 insertions(+), 19 deletions(-) diff --git a/AppImage-Recipe.sh b/AppImage-Recipe.sh index f8d7e105f..2187fde1f 100755 --- a/AppImage-Recipe.sh +++ b/AppImage-Recipe.sh @@ -72,6 +72,8 @@ get_desktop get_icon cat << EOF > ./usr/bin/keepassxc_env #!/usr/bin/env bash +export LD_LIBRARY_PATH="/opt/libgcrypt20-18/lib/x86_64-linux-gnu:\${LD_LIBRARY_PATH}" +export LD_LIBRARY_PATH="/opt/gpg-error-127/lib/x86_64-linux-gnu:\${LD_LIBRARY_PATH}" export LD_LIBRARY_PATH="..$(dirname ${QT_PLUGIN_PATH})/lib:\${LD_LIBRARY_PATH}" export QT_PLUGIN_PATH="..${QT_PLUGIN_PATH}:\${KPXC_QT_PLUGIN_PATH}" diff --git a/Dockerfile b/Dockerfile index 20d7ff352..4ceaf9968 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,8 @@ FROM ubuntu:14.04 +ENV REBUILD_COUNTER=1 + ENV QT5_VERSION=59 ENV QT5_PPA_VERSION=${QT5_VERSION}2 @@ -25,8 +27,7 @@ RUN set -x \ RUN set -x \ && add-apt-repository ppa:beineri/opt-qt${QT5_PPA_VERSION}-trusty \ - && add-apt-repository ppa:phoerious/keepassxc \ - && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php + && add-apt-repository ppa:phoerious/keepassxc RUN set -x \ && apt-get update -y \ @@ -37,7 +38,9 @@ RUN set -x \ && apt-get install -y \ cmake3 \ g++ \ - libgcrypt20-dev \ + libgcrypt20-18-dev \ + libargon2-0-dev \ + libsodium-dev \ qt${QT5_VERSION}base \ qt${QT5_VERSION}tools \ qt${QT5_VERSION}x11extras \ @@ -47,13 +50,16 @@ RUN set -x \ libxtst-dev \ mesa-common-dev \ libyubikey-dev \ - libykpers-1-dev \ - libsodium-dev + libykpers-1-dev -ENV CMAKE_PREFIX_PATH=/opt/qt${QT5_VERSION}/lib/cmake -ENV LD_LIBRARY_PATH=/opt/qt${QT5_VERSION}/lib +ENV CMAKE_PREFIX_PATH="/opt/qt${QT5_VERSION}/lib/cmake" +ENV CMAKE_INCLUDE_PATH="/opt/libgcrypt20-18/include:/opt/gpg-error-127/include" +ENV CMAKE_LIBRARY_PATH="/opt/libgcrypt20-18/lib/x86_64-linux-gnu:/opt/gpg-error-127/lib/x86_64-linux-gnu" +ENV LD_LIBRARY_PATH="/opt/qt${QT5_VERSION}/lib:/opt/libgcrypt20-18/lib/x86_64-linux-gnu:/opt/gpg-error-127/lib/x86_64-linux-gnu" RUN set -x \ - && echo /opt/qt${QT_VERSION}/lib > /etc/ld.so.conf.d/qt${QT5_VERSION}.conf + && echo "/opt/qt${QT_VERSION}/lib" > /etc/ld.so.conf.d/qt${QT5_VERSION}.conf \ + && echo "/opt/libgcrypt20-18/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/libgcrypt20-18.conf \ + && echo "/opt/gpg-error-127/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/libgpg-error-127.conf # AppImage dependencies RUN set -x \ diff --git a/ci/trusty/Dockerfile b/ci/trusty/Dockerfile index bd6bec1d2..d8911f2af 100644 --- a/ci/trusty/Dockerfile +++ b/ci/trusty/Dockerfile @@ -18,6 +18,8 @@ FROM ubuntu:14.04 +ENV REBUILD_COUNTER=1 + ENV QT5_VERSION=53 ENV QT5_PPA_VERSION=${QT5_VERSION}2 @@ -27,27 +29,39 @@ RUN set -x \ RUN set -x \ && add-apt-repository ppa:beineri/opt-qt${QT5_PPA_VERSION}-trusty \ - && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php + && add-apt-repository ppa:phoerious/keepassxc RUN set -x \ && apt-get -y update \ && apt-get -y --no-install-recommends install \ - git build-essential clang-3.6 libclang-common-3.6-dev clang-format-3.6 cmake3 make \ - curl ca-certificates gnupg2 \ - libgcrypt20-dev zlib1g-dev libyubikey-dev libykpers-1-dev \ + build-essential \ + clang-3.6 \ + libclang-common-3.6-dev \ + clang-format-3.6 \ + cmake3 \ + make \ + libgcrypt20-18-dev \ + libargon2-0-dev \ + libsodium-dev \ qt${QT5_VERSION}base \ qt${QT5_VERSION}tools \ qt${QT5_VERSION}x11extras \ qt${QT5_VERSION}translations \ + zlib1g-dev \ + libyubikey-dev \ + libykpers-1-dev \ libxi-dev \ libxtst-dev \ - xvfb \ - libsodium-dev + xvfb -ENV CMAKE_PREFIX_PATH=/opt/qt${QT5_VERSION}/lib/cmake -ENV LD_LIBRARY_PATH=/opt/qt${QT5_VERSION}/lib +ENV CMAKE_PREFIX_PATH="/opt/qt${QT5_VERSION}/lib/cmake" +ENV CMAKE_INCLUDE_PATH="/opt/libgcrypt20-18/include:/opt/gpg-error-127/include" +ENV CMAKE_LIBRARY_PATH="/opt/libgcrypt20-18/lib/x86_64-linux-gnu:/opt/gpg-error-127/lib/x86_64-linux-gnu" +ENV LD_LIBRARY_PATH="/opt/qt${QT5_VERSION}/lib:/opt/libgcrypt20-18/lib/x86_64-linux-gnu:/opt/gpg-error-127/lib/x86_64-linux-gnu" RUN set -x \ - && echo /opt/qt${QT_VERSION}/lib > /etc/ld.so.conf.d/qt${QT5_VERSION}.conf + && echo "/opt/qt${QT_VERSION}/lib" > /etc/ld.so.conf.d/qt${QT5_VERSION}.conf \ + && echo "/opt/libgcrypt20-18/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/libgcrypt20-18.conf \ + && echo "/opt/gpg-error-127/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/libgpg-error-127.conf RUN set -x \ && apt-get autoremove --purge \ diff --git a/cmake/FindLibGPGError.cmake b/cmake/FindLibGPGError.cmake index c1e1b8686..9a18371ba 100644 --- a/cmake/FindLibGPGError.cmake +++ b/cmake/FindLibGPGError.cmake @@ -14,10 +14,10 @@ # along with this program. If not, see . find_path(GPGERROR_INCLUDE_DIR gpg-error.h) - find_library(GPGERROR_LIBRARIES gpg-error) mark_as_advanced(GPGERROR_LIBRARIES GPGERROR_INCLUDE_DIR) include(FindPackageHandleStandardArgs) +include_directories(${GPGERROR_INCLUDE_DIR}) find_package_handle_standard_args(LibGPGError DEFAULT_MSG GPGERROR_LIBRARIES GPGERROR_INCLUDE_DIR) diff --git a/src/format/KdbxXmlReader.cpp b/src/format/KdbxXmlReader.cpp index be692abe3..774bb00c7 100644 --- a/src/format/KdbxXmlReader.cpp +++ b/src/format/KdbxXmlReader.cpp @@ -629,7 +629,7 @@ void KdbxXmlReader::parseDeletedObject() { Q_ASSERT(m_xml.isStartElement() && m_xml.name() == "DeletedObject"); - DeletedObject delObj{}; + DeletedObject delObj{{}, {}}; while (!m_xml.hasError() && m_xml.readNextStartElement()) { if (m_xml.name() == "UUID") {