1 |
commit: cd754c8fa40d987ebe4c137dc3ddcac300b707a2 |
2 |
Author: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 22 16:10:13 2014 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 22 16:10:13 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=cd754c8f |
7 |
|
8 |
[kde-base/krdc] Add patch from upstream to support >=net-misc/freerdp-1.1.0 wrt bug #511010. |
9 |
|
10 |
Package-Manager: portage-2.2.8-r1 |
11 |
|
12 |
--- |
13 |
kde-base/krdc/files/krdc-4.13.1-freerdp.patch | 184 ++++++++++++++++++++++++++ |
14 |
kde-base/krdc/krdc-4.13.49.9999.ebuild | 2 + |
15 |
kde-base/krdc/krdc-4.9999.ebuild | 2 + |
16 |
3 files changed, 188 insertions(+) |
17 |
|
18 |
diff --git a/kde-base/krdc/files/krdc-4.13.1-freerdp.patch b/kde-base/krdc/files/krdc-4.13.1-freerdp.patch |
19 |
new file mode 100644 |
20 |
index 0000000..75b5146 |
21 |
--- /dev/null |
22 |
+++ b/kde-base/krdc/files/krdc-4.13.1-freerdp.patch |
23 |
@@ -0,0 +1,184 @@ |
24 |
+Support >=free-rdp-1.1.0. |
25 |
+ |
26 |
+https://git.reviewboard.kde.org/r/115059/ |
27 |
+ |
28 |
+diff --git a/rdp/rdpview.cpp b/rdp/rdpview.cpp |
29 |
+index 0d14e04691549e084b58501cd10ca2382ef25c63..9062ba5fa060284a679f0c9bc211ab7dd6972c0a 100644 |
30 |
+--- a/rdp/rdpview.cpp |
31 |
++++ b/rdp/rdpview.cpp |
32 |
+@@ -158,71 +158,58 @@ bool RdpView::start() |
33 |
+ width = this->parentWidget()->size().width(); |
34 |
+ height = this->parentWidget()->size().height(); |
35 |
+ } |
36 |
+- arguments << "-g" << QString::number(width) + 'x' + QString::number(height); |
37 |
++ arguments << "-decorations"; // put this option first so we can detect xfreerdp < 1.1 |
38 |
++ arguments << "/w:" + QString::number(width); |
39 |
++ arguments << "/h:" + QString::number(height); |
40 |
+ |
41 |
+- arguments << "-k" << keymapToXfreerdp(m_hostPreferences->keyboardLayout()); |
42 |
++ arguments << "/kbd:" + keymapToXfreerdp(m_hostPreferences->keyboardLayout()); |
43 |
+ |
44 |
+ if (!m_url.userName().isEmpty()) { |
45 |
+ // if username contains a domain, it needs to be set with another parameter |
46 |
+ if (m_url.userName().contains('\\')) { |
47 |
+ const QStringList splittedName = m_url.userName().split('\\'); |
48 |
+- arguments << "-d" << splittedName.at(0); |
49 |
+- arguments << "-u" << splittedName.at(1); |
50 |
++ arguments << "/d:" + splittedName.at(0); |
51 |
++ arguments << "/u:" + splittedName.at(1); |
52 |
+ } else { |
53 |
+- arguments << "-u" << m_url.userName(); |
54 |
++ arguments << "/u:" + m_url.userName(); |
55 |
+ } |
56 |
+ } else { |
57 |
+- arguments << "-u" << ""; |
58 |
++ arguments << "-u:"; |
59 |
+ } |
60 |
+ |
61 |
+- if (!m_url.password().isNull()) |
62 |
+- arguments << "-p" << m_url.password(); |
63 |
+- |
64 |
+- arguments << "-D"; // request the window has no decorations |
65 |
+- arguments << "-X" << QString::number(m_container->winId()); |
66 |
+- arguments << "-a" << QString::number((m_hostPreferences->colorDepth() + 1) * 8); |
67 |
+- |
68 |
+- switch (m_hostPreferences->sound()) { |
69 |
+- case 1: |
70 |
+- arguments << "-o"; |
71 |
+- break; |
72 |
+- case 0: |
73 |
+- arguments << "--plugin" << "rdpsnd"; |
74 |
+- break; |
75 |
+- case 2: |
76 |
+- default: |
77 |
+- break; |
78 |
+- } |
79 |
++ arguments << "/parent-window:" + QString::number(m_container->winId()); |
80 |
++ arguments << "/bpp:" + QString::number((m_hostPreferences->colorDepth() + 1) * 8); |
81 |
++ arguments << "/audio-mode:" + m_hostPreferences->sound(); |
82 |
+ |
83 |
+ if (!m_hostPreferences->shareMedia().isEmpty()) { |
84 |
+ QStringList shareMedia; |
85 |
+- shareMedia << "--plugin" << "rdpdr" << "--data" << "disk:media:" + m_hostPreferences->shareMedia() << "--"; |
86 |
++ shareMedia << "/drive:media," + m_hostPreferences->shareMedia(); |
87 |
+ arguments += shareMedia; |
88 |
+ } |
89 |
+ |
90 |
+ QString performance; |
91 |
+ switch (m_hostPreferences->performance()) { |
92 |
+ case 0: |
93 |
+- performance = 'm'; |
94 |
++ performance = "modem"; |
95 |
+ break; |
96 |
+ case 1: |
97 |
+- performance = 'b'; |
98 |
++ performance = "broadband"; |
99 |
+ break; |
100 |
+ case 2: |
101 |
+- performance = 'l'; |
102 |
++ performance = "lan"; |
103 |
+ break; |
104 |
+ default: |
105 |
+ break; |
106 |
+ } |
107 |
+ |
108 |
+- arguments << "-x" << performance; |
109 |
++ arguments << "/network:" + performance; |
110 |
+ |
111 |
+ if (m_hostPreferences->console()) { |
112 |
+- arguments << "-0"; |
113 |
++ arguments << "/admin"; |
114 |
+ } |
115 |
+ |
116 |
+ if (m_hostPreferences->remoteFX()) { |
117 |
+- arguments << "--rfx"; |
118 |
++ arguments << "/rfx"; |
119 |
+ } |
120 |
+ |
121 |
+ if (!m_hostPreferences->extraOptions().isEmpty()) { |
122 |
+@@ -233,16 +220,21 @@ bool RdpView::start() |
123 |
+ // krdc has no support for certificate management yet; it would not be possbile to connect to any host: |
124 |
+ // "The host key for example.com has changed" ... |
125 |
+ // "Add correct host key in ~/.freerdp/known_hosts to get rid of this message." |
126 |
+- arguments << "--ignore-certificate"; |
127 |
++ arguments << "/cert-ignore"; |
128 |
+ |
129 |
+ // clipboard sharing is activated in KRDC; user can disable it at runtime |
130 |
+- arguments << "--plugin" << "cliprdr"; |
131 |
++ arguments << "/clipboard"; |
132 |
+ |
133 |
+- arguments << "-t" << QString::number(m_port); |
134 |
+- arguments << m_host; |
135 |
++ arguments << "/port:" + QString::number(m_port); |
136 |
++ arguments << "/v:" + m_host; |
137 |
+ |
138 |
+ kDebug(5012) << "Starting xfreerdp with arguments:" << arguments; |
139 |
+ |
140 |
++ //avoid printing the password in debug |
141 |
++ if (!m_url.password().isNull()) { |
142 |
++ arguments << "/p:" + m_url.password(); |
143 |
++ } |
144 |
++ |
145 |
+ setStatus(Connecting); |
146 |
+ |
147 |
+ connect(m_process, SIGNAL(error(QProcess::ProcessError)), SLOT(processError(QProcess::ProcessError))); |
148 |
+@@ -302,7 +294,7 @@ void RdpView::connectionError() |
149 |
+ |
150 |
+ void RdpView::processError(QProcess::ProcessError error) |
151 |
+ { |
152 |
+- kDebug(5012) << "processError:" << error; |
153 |
++ kDebug(5012) << error; |
154 |
+ if (m_quitFlag) // do not try to show error messages while quitting (prevent crashes) |
155 |
+ return; |
156 |
+ |
157 |
+@@ -319,33 +311,13 @@ void RdpView::processError(QProcess::ProcessError error) |
158 |
+ void RdpView::receivedStandardError() |
159 |
+ { |
160 |
+ const QString output(m_process->readAllStandardError()); |
161 |
+- kDebug(5012) << "receivedStandardError:" << output; |
162 |
+- QString line; |
163 |
+- int i = 0; |
164 |
+- while (!(line = output.section('\n', i, i)).isEmpty()) { |
165 |
+- |
166 |
+- // the following error is issued by freerdp because of a bug in freerdp 1.0.1 and below; |
167 |
+- // see: https://github.com/FreeRDP/FreeRDP/pull/576 |
168 |
+- //"X Error of failed request: BadWindow (invalid Window parameter) |
169 |
+- // Major opcode of failed request: 7 (X_ReparentWindow) |
170 |
+- // Resource id in failed request: 0x71303348 |
171 |
+- // Serial number of failed request: 36 |
172 |
+- // Current serial number in output stream: 36" |
173 |
+- if (line.contains(QLatin1String("X_ReparentWindow"))) { |
174 |
+- KMessageBox::error(0, i18n("The version of \"xfreerdp\" you are using is too old.\n" |
175 |
+- "xfreerdp 1.0.2 or greater is required."), |
176 |
+- i18n("RDP Failure")); |
177 |
+- connectionError(); |
178 |
+- return; |
179 |
+- } |
180 |
+- i++; |
181 |
+- } |
182 |
++ kDebug(5012) << output; |
183 |
+ } |
184 |
+ |
185 |
+ void RdpView::receivedStandardOutput() |
186 |
+ { |
187 |
+ const QString output(m_process->readAllStandardOutput()); |
188 |
+- kDebug(5012) << "receivedStandardOutput:" << output; |
189 |
++ kDebug(5012) << output; |
190 |
+ QString line; |
191 |
+ int i = 0; |
192 |
+ while (!(line = output.section('\n', i, i)).isEmpty()) { |
193 |
+@@ -373,6 +345,14 @@ void RdpView::receivedStandardOutput() |
194 |
+ return; |
195 |
+ } |
196 |
+ |
197 |
++ // we no longer support freerdp < 1.1, we only support versions with the new interface |
198 |
++ if (line.contains(QLatin1String("invalid option: -decorations"))) { |
199 |
++ KMessageBox::error(0, i18n("The version of \"xfreerdp\" you are using is too old.\n" |
200 |
++ "xfreerdp 1.1 or greater is required."), |
201 |
++ i18n("RDP Failure")); |
202 |
++ connectionError(); |
203 |
++ return; |
204 |
++ } |
205 |
+ i++; |
206 |
+ } |
207 |
+ } |
208 |
|
209 |
diff --git a/kde-base/krdc/krdc-4.13.49.9999.ebuild b/kde-base/krdc/krdc-4.13.49.9999.ebuild |
210 |
index 59390f4..01402c9 100644 |
211 |
--- a/kde-base/krdc/krdc-4.13.49.9999.ebuild |
212 |
+++ b/kde-base/krdc/krdc-4.13.49.9999.ebuild |
213 |
@@ -24,6 +24,8 @@ RDEPEND="${DEPEND} |
214 |
rdesktop? ( >=net-misc/freerdp-1.1.0_beta1[X] ) |
215 |
" |
216 |
|
217 |
+PATCHES=( "${FILESDIR}/${PN}-4.13.1-freerdp.patch" ) |
218 |
+ |
219 |
src_configure() { |
220 |
mycmakeargs=( |
221 |
$(cmake-utils_use_with jpeg) |
222 |
|
223 |
diff --git a/kde-base/krdc/krdc-4.9999.ebuild b/kde-base/krdc/krdc-4.9999.ebuild |
224 |
index 59390f4..01402c9 100644 |
225 |
--- a/kde-base/krdc/krdc-4.9999.ebuild |
226 |
+++ b/kde-base/krdc/krdc-4.9999.ebuild |
227 |
@@ -24,6 +24,8 @@ RDEPEND="${DEPEND} |
228 |
rdesktop? ( >=net-misc/freerdp-1.1.0_beta1[X] ) |
229 |
" |
230 |
|
231 |
+PATCHES=( "${FILESDIR}/${PN}-4.13.1-freerdp.patch" ) |
232 |
+ |
233 |
src_configure() { |
234 |
mycmakeargs=( |
235 |
$(cmake-utils_use_with jpeg) |