Merge branch 'release/2.2.3' into develop

This commit is contained in:
Janek Bevendorff 2017-10-24 18:00:38 +02:00
commit be88e93820
No known key found for this signature in database
GPG Key ID: 2FDEB0D40BCA5E11
5 changed files with 68 additions and 35 deletions

View File

@ -68,10 +68,6 @@ get_apprun
copy_deps
delete_blacklisted
# remove dbus and systemd libs as they are not blacklisted
find . -name libdbus-1.so.3 -exec rm {} \;
find . -name libsystemd.so.0 -exec rm {} \;
get_desktop
get_icon
cat << EOF > ./usr/bin/keepassxc_env
@ -91,8 +87,8 @@ else
fi
EOF
chmod +x ./usr/bin/keepassxc_env
sed -i 's/Exec=keepassxc/Exec=keepassxc_env/' org.keepassxc.desktop
get_desktopintegration $LOWERAPP
sed -i 's/Exec=keepassxc/Exec=keepassxc_env/' org.${LOWERAPP}.desktop
get_desktopintegration "org.${LOWERAPP}"
GLIBC_NEEDED=$(glibc_needed)

View File

@ -14,44 +14,72 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
FROM centos:7
FROM ubuntu:14.04
ENV QT5_VERSION=59
ENV QT5_PPA_VERSION=${QT5_VERSION}2
RUN set -x \
&& curl "https://copr.fedorainfracloud.org/coprs/bugzy/keepassxc/repo/epel-7/bugzy-keepassxc-epel-7.repo" \
> /etc/yum.repos.d/bugzy-keepassxc-epel-7.repo
&& apt-get update -y \
&& apt-get -y install software-properties-common
RUN set -x \
&& yum clean -y all \
&& yum install -y epel-release \
&& yum upgrade -y
&& add-apt-repository ppa:beineri/opt-qt${QT5_PPA_VERSION}-trusty
RUN set -x \
&& apt-get update -y \
&& apt-get upgrade -y
# build and runtime dependencies
RUN set -x \
&& yum install -y \
make \
automake \
gcc-c++ \
&& apt-get install -y \
cmake3 \
libgcrypt16-devel \
qt5-qtbase-devel \
qt5-linguist \
qt5-qttools \
zlib-devel \
qt5-qtx11extras \
qt5-qtx11extras-devel \
libXi-devel \
libXtst-devel \
libyubikey-devel \
ykpers-devel
g++ \
libgcrypt20-dev \
qt${QT5_VERSION}base \
qt${QT5_VERSION}tools \
qt${QT5_VERSION}x11extras \
zlib1g-dev \
libxi-dev \
libxtst-dev \
mesa-common-dev
ENV CMAKE_PREFIX_PATH=/opt/qt${QT5_VERSION}/lib/cmake
ENV LD_LIBRARY_PATH=/opt/qt${QT5_VERSION}/lib
RUN set -x \
&& echo /opt/qt${QT_VERSION}/lib > /etc/ld.so.conf.d/qt${QT5_VERSION}.conf
# AppImage dependencies
RUN set -x \
&& yum install -y \
&& apt-get install -y \
wget \
fuse-libs
libfuse2
# build libyubikey
ENV YUBIKEY_VERSION=1.13
RUN set -x \
&& ln -s /usr/bin/cmake3 /usr/bin/cmake
&& wget "https://developers.yubico.com/yubico-c/Releases/libyubikey-${YUBIKEY_VERSION}.tar.gz" \
&& tar xf libyubikey-${YUBIKEY_VERSION}.tar.gz \
&& cd libyubikey-${YUBIKEY_VERSION} \
&& ./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu \
&& make \
&& make install \
&& cd .. \
&& rm -Rf libyubikey-${YUBIKEY_VERSION}*
# build libykpers-1
ENV YKPERS_VERSION=1.18.0
RUN set -x \
&& apt-get install -y libusb-dev
RUN set -x \
&& wget "https://developers.yubico.com/yubikey-personalization/Releases/ykpers-${YKPERS_VERSION}.tar.gz" \
&& tar xf ykpers-${YKPERS_VERSION}.tar.gz \
&& cd ykpers-${YKPERS_VERSION} \
&& ./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu \
&& make \
&& make install \
&& cd .. \
&& rm -Rf ykpers-${YKPERS_VERSION}*
VOLUME /keepassxc/src
VOLUME /keepassxc/out

View File

@ -95,11 +95,16 @@ void DatabaseOpenWidget::showEvent(QShowEvent* event)
m_ui->editPassword->setFocus();
#ifdef WITH_XC_YUBIKEY
connect(YubiKey::instance(), SIGNAL(detected(int,bool)), SLOT(yubikeyDetected(int,bool)), Qt::QueuedConnection);
// showEvent() may be called twice, so make sure we are only polling once
if (!m_yubiKeyBeingPolled) {
connect(YubiKey::instance(), SIGNAL(detected(int, bool)), SLOT(yubikeyDetected(int, bool)),
Qt::QueuedConnection);
connect(YubiKey::instance(), SIGNAL(detectComplete()), SLOT(yubikeyDetectComplete()), Qt::QueuedConnection);
connect(YubiKey::instance(), SIGNAL(notFound()), SLOT(noYubikeyFound()), Qt::QueuedConnection);
pollYubikey();
m_yubiKeyBeingPolled = true;
}
#endif
}
@ -110,6 +115,7 @@ void DatabaseOpenWidget::hideEvent(QHideEvent* event)
#ifdef WITH_XC_YUBIKEY
// Don't listen to any Yubikey events if we are hidden
disconnect(YubiKey::instance(), 0, this, 0);
m_yubiKeyBeingPolled = false;
#endif
}
@ -311,10 +317,12 @@ void DatabaseOpenWidget::yubikeyDetectComplete()
m_ui->checkChallengeResponse->setEnabled(true);
m_ui->buttonRedetectYubikey->setEnabled(true);
m_ui->yubikeyProgress->setVisible(false);
m_yubiKeyBeingPolled = false;
}
void DatabaseOpenWidget::noYubikeyFound()
{
m_ui->buttonRedetectYubikey->setEnabled(true);
m_ui->yubikeyProgress->setVisible(false);
m_yubiKeyBeingPolled = false;
}

View File

@ -73,6 +73,7 @@ protected:
QString m_filename;
private:
bool m_yubiKeyBeingPolled = false;
Q_DISABLE_COPY(DatabaseOpenWidget)
};

View File

@ -884,7 +884,7 @@ void MainWindow::toggleWindow()
raise();
activateWindow();
#if defined(Q_OS_LINUX) && ! defined(QT_NO_DBUS)
#if defined(Q_OS_LINUX) && ! defined(QT_NO_DBUS) && (QT_VERSION < QT_VERSION_CHECK(5, 9, 0))
// re-register global D-Bus menu (needed on Ubuntu with Unity)
// see https://github.com/keepassxreboot/keepassxc/issues/271
// and https://bugreports.qt.io/browse/QTBUG-58723