Update packages
This commit is contained in:
parent
6622fa1265
commit
8447c7ee48
48
debian/control
vendored
48
debian/control
vendored
@ -10,11 +10,42 @@ Package: nymea-remoteproxy
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
awscli,
|
||||
libnymea-remoteproxy (= ${binary:Version}),
|
||||
Description: The nymea remote proxy server
|
||||
The nymea remote proxy server
|
||||
|
||||
|
||||
Package: libnymea-remoteproxy
|
||||
Architecture: any
|
||||
Section: libs
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
Description: The nymea remote proxy server lib
|
||||
The nymea remote proxy server lib
|
||||
|
||||
Package: libnymea-remoteproxy-dev
|
||||
Architecture: any
|
||||
Section: libdevel
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
libnymea-remoteproxy (= ${binary:Version}),
|
||||
Description: The nymea remote proxy server lib - development files
|
||||
The nymea remote proxy server lib - development files
|
||||
|
||||
Package: libnymea-remoteproxy-dbg
|
||||
Architecture: any
|
||||
Section: debug
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
libnymea-remoteproxy (= ${binary:Version}),
|
||||
Description: The nymea remote proxy server lib - debug symbols
|
||||
The nymea remote proxy server lib - debug symbols
|
||||
|
||||
|
||||
Package: nymea-remoteproxy-client
|
||||
Architecture: any
|
||||
Section: libs
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
Description: The nymea remote proxy client for testing
|
||||
@ -22,6 +53,7 @@ Description: The nymea remote proxy client for testing
|
||||
|
||||
Package: libnymea-remoteproxyclient
|
||||
Architecture: any
|
||||
Section: libs
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
Description: The nymea remote proxy server client lib
|
||||
@ -29,14 +61,26 @@ Description: The nymea remote proxy server client lib
|
||||
|
||||
Package: libnymea-remoteproxyclient-dev
|
||||
Architecture: any
|
||||
Section: libdevel
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
Description: The nymea remote proxy server client lib, development files
|
||||
The nymea remote proxy server client lib, development files
|
||||
libnymea-remoteproxyclient (= ${binary:Version}),
|
||||
Description: The nymea remote proxy server client lib - development files
|
||||
The nymea remote proxy server client lib - development files
|
||||
|
||||
Package: libnymea-remoteproxyclient-dbg
|
||||
Architecture: any
|
||||
Section: debug
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
libnymea-remoteproxyclient (= ${binary:Version}),
|
||||
Description: The nymea remote proxy server client lib - debug symbols
|
||||
The nymea remote proxy server client lib - debug symbols
|
||||
|
||||
Package: nymea-remoteproxy-tests
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
libnymea-remoteproxy (= ${binary:Version}),
|
||||
Description: The nymea remote proxy server tests
|
||||
The nymea remote proxy server tests
|
||||
|
||||
2
debian/libnymea-remoteproxy-dev.install.in
vendored
Normal file
2
debian/libnymea-remoteproxy-dev.install.in
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
usr/lib/@DEB_HOST_MULTIARCH@/libnymea-remoteproxy.so
|
||||
usr/include/nymea-remoteproxy/* usr/include/nymea-remoteproxy
|
||||
3
debian/libnymea-remoteproxy.install.in
vendored
Normal file
3
debian/libnymea-remoteproxy.install.in
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
usr/lib/@DEB_HOST_MULTIARCH@/libnymea-remoteproxy.so.1
|
||||
usr/lib/@DEB_HOST_MULTIARCH@/libnymea-remoteproxy.so.1.0
|
||||
usr/lib/@DEB_HOST_MULTIARCH@/libnymea-remoteproxy.so.1.0.0
|
||||
2
debian/libnymea-remoteproxyclient-dev.install.in
vendored
Normal file
2
debian/libnymea-remoteproxyclient-dev.install.in
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
usr/lib/@DEB_HOST_MULTIARCH@/libnymea-remoteproxyclient.so
|
||||
usr/include/nymea-remoteproxyclient/* usr/include/nymea-remoteproxyclient
|
||||
4
debian/libnymea-remoteproxyclient.install.in
vendored
4
debian/libnymea-remoteproxyclient.install.in
vendored
@ -1 +1,3 @@
|
||||
usr/lib/@DEB_HOST_MULTIARCH@/libnymea-remoteproxyclient.so.*
|
||||
usr/lib/@DEB_HOST_MULTIARCH@/libnymea-remoteproxyclient.so.1
|
||||
usr/lib/@DEB_HOST_MULTIARCH@/libnymea-remoteproxyclient.so.1.0
|
||||
usr/lib/@DEB_HOST_MULTIARCH@/libnymea-remoteproxyclient.so.1.0.0
|
||||
|
||||
3
debian/nymea-remoteproxy-tests.install
vendored
3
debian/nymea-remoteproxy-tests.install
vendored
@ -1 +1,2 @@
|
||||
usr/bin/nymea-remoteproxy-tests
|
||||
usr/bin/nymea-remoteproxy-tests-offline
|
||||
usr/bin/nymea-remoteproxy-tests-online
|
||||
|
||||
9
debian/rules
vendored
9
debian/rules
vendored
@ -11,5 +11,14 @@ $(PREPROCESS_FILES:.in=): %: %.in
|
||||
override_dh_install: $(PREPROCESS_FILES:.in=)
|
||||
dh_install
|
||||
|
||||
override_dh_strip:
|
||||
dh_strip --dbg-package=libnymea-remoteproxy-dbg
|
||||
dh_strip --dbg-package=libnymea-remoteproxyclient-dbg
|
||||
|
||||
override_dh_auto_clean:
|
||||
dh_auto_clean
|
||||
find . -name *.qm -exec rm {} \;
|
||||
rm -rf $(PREPROCESS_FILES:.in=)
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
@ -24,6 +24,7 @@ void AuthenticationProcess::useDynamicCredentials(bool dynamicCredentials)
|
||||
|
||||
void AuthenticationProcess::requestDynamicCredentials()
|
||||
{
|
||||
m_requestTimer.start();
|
||||
QNetworkReply *reply = m_manager->get(QNetworkRequest(QUrl("http://169.254.169.254/latest/meta-data/iam/security-credentials/EC2-Remote-Connection-Proxy-Role")));
|
||||
connect(reply, &QNetworkReply::finished, this, &AuthenticationProcess::onDynamicCredentialsReady);
|
||||
}
|
||||
@ -52,7 +53,7 @@ void AuthenticationProcess::startVerificationProcess()
|
||||
m_resultFileName = "/tmp/" + QUuid::createUuid().toString().remove("{").remove("}").remove("-") + ".json";
|
||||
|
||||
qCDebug(dcAuthentication()) << "Start authenticator process and store result in" << m_resultFileName;
|
||||
|
||||
m_processTimer.start();
|
||||
m_process->start("aws", { "lambda", "invoke",
|
||||
"--function-name", "system-services-authorizer-dev-checkToken",
|
||||
"--invocation-type", "RequestResponse",
|
||||
@ -66,6 +67,7 @@ void AuthenticationProcess::onDynamicCredentialsReady()
|
||||
QNetworkReply *reply = static_cast<QNetworkReply *>(sender());
|
||||
reply->deleteLater();
|
||||
|
||||
qCDebug(dcAuthenticationProcess()) << "Dynamic credentials request finished (" << m_requestTimer.elapsed() << "[ms] )";
|
||||
if (reply->error()) {
|
||||
qCWarning(dcAuthenticationProcess()) << "Dynamic credentials reply error: " << reply->errorString();
|
||||
emit authenticationFinished(Authenticator::AuthenticationErrorProxyError);
|
||||
@ -95,16 +97,20 @@ void AuthenticationProcess::onDynamicCredentialsReady()
|
||||
|
||||
void AuthenticationProcess::onProcessFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
{
|
||||
qCDebug(dcAuthenticationProcess()) << "Authentication process finished (" << m_processTimer.elapsed() << "[ms] )";;
|
||||
|
||||
if (exitStatus == QProcess::CrashExit) {
|
||||
qCWarning(dcAuthenticationProcess()) << "Authentication process crashed:" << endl << qUtf8Printable(m_process->readAll());
|
||||
emit authenticationFinished(Authenticator::AuthenticationErrorProxyError);
|
||||
return;
|
||||
}
|
||||
|
||||
if (exitCode != 0) {
|
||||
qCWarning(dcAuthenticationProcess()) << "The authentication process finished with error" << exitCode << endl << qUtf8Printable(m_process->readAll());
|
||||
emit authenticationFinished(Authenticator::AuthenticationErrorProxyError);
|
||||
return;
|
||||
}
|
||||
|
||||
qCDebug(dcAuthenticationProcess()) << "Finished successfully";
|
||||
QFile resultFile(m_resultFileName);
|
||||
|
||||
if (!resultFile.exists()) {
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
#include <QObject>
|
||||
#include <QProcess>
|
||||
#include <QElapsedTimer>
|
||||
#include <QNetworkAccessManager>
|
||||
|
||||
#include "authenticator.h"
|
||||
@ -28,6 +29,8 @@ private:
|
||||
|
||||
QNetworkAccessManager *m_manager = nullptr;
|
||||
QProcess *m_process = nullptr;
|
||||
QElapsedTimer m_requestTimer;
|
||||
QElapsedTimer m_processTimer;
|
||||
|
||||
void requestDynamicCredentials();
|
||||
void startVerificationProcess();
|
||||
|
||||
@ -9,7 +9,7 @@ AwsAuthenticator::AwsAuthenticator(QObject *parent) :
|
||||
Authenticator(parent),
|
||||
m_manager(new QNetworkAccessManager(this))
|
||||
{
|
||||
|
||||
// TODO: verify if aws command is installed
|
||||
}
|
||||
|
||||
AwsAuthenticator::~AwsAuthenticator()
|
||||
|
||||
Reference in New Issue
Block a user