[SCM] plasma-nm packaging branch, master, updated. debian/0.9.3.3-2-5-g924118a
Maximiliano Curia
maxy at moszumanska.debian.org
Mon Apr 28 09:13:22 UTC 2014
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/plasma-nm.git;a=commitdiff;h=4f43855
The following commit has been merged in the master branch:
commit 4f43855218738a2818132682f00c0ed469e58d80
Author: Maximiliano Curia <maxy at gnuservers.com.ar>
Date: Mon Apr 28 10:45:26 2014 +0200
New patch: upstream_fix_build_new_openconnnect (Closes: #742090) Thanks to Mike Miller
---
debian/changelog | 2 +
debian/patches/series | 1 +
debian/patches/upstream_fix_build_new_openconnnect | 109 +++++++++++++++++++++
3 files changed, 112 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 6a5aefc..9ffdb64 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
plasma-nm (0.9.3.3-3) UNRELEASED; urgency=medium
* Bump network-manager dependency in the binary package. (Closes: #743041)
+ * New patch: upstream_fix_build_new_openconnnect (Closes: #742090)
+ Thanks to Mike Miller
-- Maximiliano Curia <maxy at debian.org> Sun, 30 Mar 2014 19:57:56 +0200
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..3e803b1
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+upstream_fix_build_new_openconnnect
diff --git a/debian/patches/upstream_fix_build_new_openconnnect b/debian/patches/upstream_fix_build_new_openconnnect
new file mode 100644
index 0000000..8cba845
--- /dev/null
+++ b/debian/patches/upstream_fix_build_new_openconnnect
@@ -0,0 +1,109 @@
+commit 947f56f1cd21a72fa0f88e1c42ac8c19e23864d0
+Author: Jan Grulich <jgrulich at redhat.com>
+Date: Thu Mar 13 12:07:47 2014 +0100
+
+ Fix build with the new version of openconnect
+
+ Still needs to be finished and tested
+
+diff --git a/vpn/openconnect/openconnectauth.cpp b/vpn/openconnect/openconnectauth.cpp
+index 33e8c93..fdfdd61 100644
+--- a/vpn/openconnect/openconnectauth.cpp
++++ b/vpn/openconnect/openconnectauth.cpp
+@@ -414,7 +414,7 @@ void OpenconnectAuthWidget::processAuthForm(struct oc_auth_form *form)
+ int passwordnumber = 0;
+ bool focusSet = false;
+ for (opt = form->opts; opt; opt = opt->next) {
+- if (opt->type == OC_FORM_OPT_HIDDEN)
++ if (opt->type == OC_FORM_OPT_HIDDEN || IGNORE_OPT(opt))
+ continue;
+ QLabel *text = new QLabel(this);
+ text->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
+@@ -441,9 +441,20 @@ void OpenconnectAuthWidget::processAuthForm(struct oc_auth_form *form)
+ KComboBox *cmb = new KComboBox(this);
+ struct oc_form_opt_select *sopt = reinterpret_cast<oc_form_opt_select *>(opt);
+ for (int i = 0; i < sopt->nr_choices; i++) {
+- cmb->addItem(QString::fromUtf8(sopt->choices[i].label), QString::fromUtf8(sopt->choices[i].name));
+- if (value == QString::fromUtf8(sopt->choices[i].name))
++ cmb->addItem(QString::fromUtf8(FORMCHOICE(sopt, i)->label),
++ QString::fromUtf8(FORMCHOICE(sopt, i)->name));
++ if (value == QString::fromUtf8(FORMCHOICE(sopt, i)->name)) {
+ cmb->setCurrentIndex(i);
++ if (sopt == AUTHGROUP_OPT(form) &&
++ i != AUTHGROUP_SELECTION(form)) {
++ // XXX: Immediately return OC_FORM_RESULT_NEWGROUP to
++ // change group
++ }
++ }
++ }
++ if (sopt == AUTHGROUP_OPT(form)) {
++ // TODO: Hook up signal when the KComboBox entry changes, to
++ // return OC_FORM_RESULT_NEWGROUP
+ }
+ widget = qobject_cast<QWidget*>(cmb);
+ }
+@@ -540,6 +551,7 @@ void OpenconnectAuthWidget::validatePeerCert(const QString &fingerprint,
+ void OpenconnectAuthWidget::formLoginClicked()
+ {
+ Q_D(OpenconnectAuthWidget);
++ /// XXX: This, or something like it, needs to be called when the KComboBox for the auth group changes too.
+ const int lastIndex = d->ui.loginBoxLayout->count() - 1;
+ QLayout *layout = d->ui.loginBoxLayout->itemAt(lastIndex - 2)->layout();
+ struct oc_auth_form *form = (struct oc_auth_form *) d->ui.loginBoxLayout->itemAt(lastIndex)->widget()->property("openconnect_form").value<quintptr>();
+diff --git a/vpn/openconnect/openconnectauthworkerthread.cpp b/vpn/openconnect/openconnectauthworkerthread.cpp
+index 4c16388..7060fb2 100644
+--- a/vpn/openconnect/openconnectauthworkerthread.cpp
++++ b/vpn/openconnect/openconnectauthworkerthread.cpp
+@@ -59,7 +59,7 @@ public:
+ {
+ if (obj)
+ return static_cast<OpenconnectAuthWorkerThread*>(obj)->processAuthFormP(form);
+- return -1;
++ return OC_FORM_RESULT_ERR;
+ }
+ static void writeProgress(void *obj, int level, const char *str, ...)
+ {
+@@ -181,9 +181,11 @@ int OpenconnectAuthWorkerThread::processAuthFormP(struct oc_auth_form *form)
+ m_waitForUserInput->wait(m_mutex);
+ m_mutex->unlock();
+ if (*m_userDecidedToQuit)
+- return -1;
++ return OC_FORM_RESULT_CANCELLED;
+
+- return 0;
++ // TODO : If group changed, return OC_FORM_RESULT_NEWGROUP
++
++ return OC_FORM_RESULT_OK;
+ }
+
+ void OpenconnectAuthWorkerThread::writeProgress(int level, const char *fmt, va_list argPtr)
+diff --git a/vpn/openconnect/openconnectauthworkerthread.h b/vpn/openconnect/openconnectauthworkerthread.h
+index 37c854f..39d68b3 100644
+--- a/vpn/openconnect/openconnectauthworkerthread.h
++++ b/vpn/openconnect/openconnectauthworkerthread.h
+@@ -40,6 +40,25 @@ struct x509_st;
+ #define OPENCONNECT_OPENSSL
+ #endif
+
++#if OPENCONNECT_CHECK_VER(3,0)
++#define NEWGROUP_SUPPORTED 1
++#define AUTHGROUP_OPT(form) (void *)(form)->authgroup_opt
++#define AUTHGROUP_SELECTION(form) (form)->authgroup_selection
++#define FORMCHOICE(sopt, i) ((sopt)->choices[i])
++#define IGNORE_OPT(opt) ((opt)->flags & OC_FORM_OPT_IGNORE)
++#else
++#define NEWGROUP_SUPPORTED 0
++#define AUTHGROUP_OPT(form) NULL
++#define AUTHGROUP_SELECTION(form) 0
++#define FORMCHOICE(sopt, i) (&(sopt)->choices[i])
++#define IGNORE_OPT(opt) 0
++
++#define OC_FORM_RESULT_ERR -1
++#define OC_FORM_RESULT_OK 0
++#define OC_FORM_RESULT_CANCELLED 1
++#define OC_FORM_RESULT_NEWGROUP 2
++#endif
++
+ #include <QThread>
+
+ class QMutex;
--
plasma-nm packaging
More information about the pkg-kde-commits
mailing list