Merge lp:~gesha/linaro-license-protection/improve-eula into lp:~linaro-automation/linaro-license-protection/trunk
- improve-eula
- Merge into trunk
Proposed by
Georgy Redkozubov
Status: | Merged |
---|---|
Approved by: | James Tunnicliffe |
Approved revision: | 52 |
Merged at revision: | 54 |
Proposed branch: | lp:~gesha/linaro-license-protection/improve-eula |
Merge into: | lp:~linaro-automation/linaro-license-protection/trunk |
Diff against target: |
953 lines (+398/-350) 17 files modified
.htaccess (+70/-44) android/~linaro-android/staging-imx53/test.txt (+1/-0) android/~linaro-android/staging-origen/EULA.txt (+1/-0) android/~linaro-android/staging-panda/EULA.txt (+1/-0) android/~linaro-android/staging-panda/test.txt (+1/-1) android/~linaro-android/staging-snowball/173/target/product/snowball/EULA.txt (+1/-0) android/~linaro-android/staging-snowball/173/target/product/snowball/test.txt (+1/-0) android/~linaro-android/staging-snowball/test.txt (+0/-1) android/~linaro-android/staging-vexpress-a9/OPEN-EULA.txt (+1/-0) android/~linaro-android/staging-vexpress-a9/test.txt (+1/-0) licenses/license.php (+25/-0) licenses/linaro.html (+120/-0) licenses/samsung.html (+120/-0) licenses/ste.html (+6/-298) testing/apache2.conf.tmpl (+13/-0) testing/mime.types (+6/-1) testing/test_click_through_license.py (+30/-5) |
To merge this branch: | bzr merge lp:~gesha/linaro-license-protection/improve-eula |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Tunnicliffe (community) | Approve | ||
Review via email: mp+100379@code.launchpad.net |
Commit message
Description of the change
This branch adds build-based EULA support. EULA/no-EULA handling is implemented by checking the presence of EULA.txt/
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.htaccess' |
2 | --- .htaccess 2012-01-13 16:33:03 +0000 |
3 | +++ .htaccess 2012-04-02 10:19:19 +0000 |
4 | @@ -1,8 +1,14 @@ |
5 | -IndexIgnore HEADER* licenses |
6 | +IndexIgnore HEADER* licenses *EULA* |
7 | IndexOptions FancyIndexing HTMLTable |
8 | |
9 | RewriteEngine On |
10 | |
11 | +## LP_DOWNLOAD_DIR is set to the dir from REQUEST_URI |
12 | +## or to the dir containig file form REQUEST_URI |
13 | +RewriteCond %{REQUEST_FILENAME} !.*/licenses/.* |
14 | +RewriteCond %{REQUEST_FILENAME} (.*\/)(.*)$ |
15 | +RewriteRule (.*\/)(.*) - [E=LP_DOWNLOAD_DIR:%1] |
16 | + |
17 | ## CO_DOMAIN is set to host name or host address |
18 | ## without port number for use in cookie domain |
19 | RewriteCond %{SERVER_PORT} !^80$ |
20 | @@ -22,64 +28,84 @@ |
21 | |
22 | ## If license file is requested, and a download has been requested previously, |
23 | ## pass through to the license file. |
24 | -# Samsung. |
25 | -RewriteCond %{REQUEST_URI} /licenses/samsung-v2.html$ |
26 | -RewriteCond %{HTTP_COOKIE} downloadrequested |
27 | -RewriteCond %{HTTP_COOKIE} !samsunglicenseaccepted-v1=true |
28 | -RewriteRule .* - [L] |
29 | -# ST-E. |
30 | -RewriteCond %{REQUEST_URI} /licenses/ste.html$ |
31 | -RewriteCond %{HTTP_COOKIE} downloadrequested |
32 | -RewriteCond %{HTTP_COOKIE} !stelicenseaccepted-v1=true |
33 | +RewriteCond %{REQUEST_URI} /licenses/ste.html$ [OR] |
34 | +RewriteCond %{REQUEST_URI} /licenses/samsung.html$ [OR] |
35 | +RewriteCond %{REQUEST_URI} /licenses/linaro.html$ [OR] |
36 | +RewriteCond %{REQUEST_URI} /licenses/license.php$ |
37 | +RewriteCond %{HTTP_COOKIE} downloadrequested |
38 | +RewriteCond %{HTTP_COOKIE} !licenseaccepted=true |
39 | RewriteRule .* - [L] |
40 | |
41 | ## When license files are requested directly, forward to |
42 | ## the snapshots.l.o site itself. |
43 | -RewriteCond %{REQUEST_URI} /licenses/samsung-v2.html$ [OR] |
44 | +RewriteCond %{REQUEST_URI} /licenses/linaro.html$ [OR] |
45 | +RewriteCond %{REQUEST_URI} /licenses/samsung.html$ [OR] |
46 | RewriteCond %{REQUEST_URI} /licenses/ste.html$ [OR] |
47 | -RewriteCond %{REQUEST_URI} /licenses/nolicense.html$ |
48 | +RewriteCond %{REQUEST_URI} /licenses/license.php$ |
49 | RewriteCond %{HTTP_COOKIE} !downloadrequested=(.*) |
50 | RewriteRule .* / [R,L] |
51 | |
52 | +## Exception for <iframe> |
53 | +RewriteCond %{REQUEST_URI} ^.*/EULA.txt$ |
54 | +RewriteRule .* - [L] |
55 | + |
56 | ## If there is a cookie indicating license has been accepted, pass through. |
57 | -# Samsung. |
58 | -RewriteCond %{HTTP_COOKIE} samsunglicenseaccepted-v1=true |
59 | -RewriteCond %{REQUEST_URI} ^/.*origen.* |
60 | -RewriteRule .* - [L] |
61 | -# ST-E. |
62 | -RewriteCond %{HTTP_COOKIE} stelicenseaccepted-v1=true |
63 | -RewriteCond %{REQUEST_URI} ^/.*snowball.* |
64 | +RewriteCond %{HTTP_COOKIE} licenseaccepted=true |
65 | RewriteRule .* - [L] |
66 | |
67 | ## When license is accepted, set the cookie. |
68 | -# Samsung. |
69 | -RewriteCond %{REQUEST_URI} licenses/samsung-accepted.html$ |
70 | -RewriteCond %{HTTP_COOKIE} downloadrequested=([^\;]*\/)([^/\;]*) |
71 | -RewriteRule .* %1%2 [CO=samsunglicenseaccepted-v1:true:.%{ENV:CO_DOMAIN}:5:%1,R,L] |
72 | -# ST-E. |
73 | -RewriteCond %{REQUEST_URI} licenses/ste-accepted.html$ |
74 | -RewriteCond %{HTTP_COOKIE} downloadrequested=([^\;]*\/)([^/\;]*) |
75 | -RewriteRule .* %1%2 [CO=stelicenseaccepted-v1:true:.%{ENV:CO_DOMAIN}:60:%1,R,L] |
76 | +RewriteCond %{REQUEST_URI} licenses/.*-accepted.html$ |
77 | +RewriteCond %{HTTP_COOKIE} downloadrequested=([^\;]*\/)([^/\;]*) |
78 | +RewriteRule .* %1%2 [CO=licenseaccepted:true:.%{ENV:CO_DOMAIN}:5:%1,R,L] |
79 | |
80 | ## When license is being declined, show the notice that you have to accept it. |
81 | -# Samsung. |
82 | -RewriteCond %{REQUEST_URI} licenses/samsung-declined.html$ |
83 | -RewriteCond %{HTTP_COOKIE} downloadrequested=(.*) |
84 | -RewriteRule .* /licenses/nolicense.html [L] |
85 | -# ST-E. |
86 | -RewriteCond %{REQUEST_URI} licenses/ste-declined.html$ |
87 | +RewriteCond %{REQUEST_URI} licenses/.*-declined.html$ |
88 | RewriteCond %{HTTP_COOKIE} downloadrequested=(.*) |
89 | RewriteRule .* /licenses/nolicense.html [L] |
90 | |
91 | ## Pass through any non-protected dirs. |
92 | -RewriteCond %{REQUEST_URI} !^/.*origen.* |
93 | -RewriteCond %{REQUEST_URI} !^/.*snowball.* |
94 | -RewriteRule .* - [L] |
95 | - |
96 | -## Redirect to the license file protected builds. |
97 | -# Samsung. |
98 | -RewriteCond %{REQUEST_URI} ^/.*origen.*$ |
99 | -RewriteRule .* /licenses/samsung-v2.html [CO=downloadrequested:%{REQUEST_URI}:.%{ENV:CO_DOMAIN},R,L] |
100 | -# ST-E. |
101 | -RewriteCond %{REQUEST_URI} ^/.*snowball.* |
102 | -RewriteRule .* /licenses/ste.html [CO=downloadrequested:%{REQUEST_URI}:.%{ENV:CO_DOMAIN},R,L] |
103 | +RewriteCond %{REQUEST_FILENAME} -d |
104 | +RewriteCond %{REQUEST_FILENAME}/OPEN-EULA.txt -f |
105 | +RewriteRule .* - [L] |
106 | + |
107 | +RewriteCond %{REQUEST_FILENAME} -f |
108 | +RewriteCond %{ENV:LP_DOWNLOAD_DIR}/OPEN-EULA.txt -f |
109 | +RewriteRule .* - [L] |
110 | + |
111 | +## Redirect to the Samsung license file protected builds. |
112 | +RewriteCond %{REQUEST_FILENAME} -d |
113 | +RewriteCond %{REQUEST_FILENAME} .*origen.* |
114 | +RewriteCond %{REQUEST_FILENAME}/EULA.txt -f |
115 | +RewriteRule .* /licenses/license.php?samsung [CO=downloadrequested:%{REQUEST_URI}:.%{ENV:CO_DOMAIN},R,L] |
116 | + |
117 | +RewriteCond %{REQUEST_FILENAME} -f |
118 | +RewriteCond %{REQUEST_FILENAME} .*origen.* |
119 | +RewriteCond %{ENV:LP_DOWNLOAD_DIR}/EULA.txt -f |
120 | +RewriteRule .* /licenses/license.php?samsung [CO=downloadrequested:%{REQUEST_URI}:.%{ENV:CO_DOMAIN},R,L] |
121 | + |
122 | +## Redirect to the ST-E license file protected builds. |
123 | +RewriteCond %{REQUEST_FILENAME} -d |
124 | +RewriteCond %{REQUEST_FILENAME} .*snowball.* |
125 | +RewriteCond %{REQUEST_FILENAME}/EULA.txt -f |
126 | +RewriteRule .* /licenses/license.php?ste [CO=downloadrequested:%{REQUEST_URI}:.%{ENV:CO_DOMAIN},R,L] |
127 | + |
128 | +RewriteCond %{REQUEST_FILENAME} -f |
129 | +RewriteCond %{REQUEST_FILENAME} .*snowball.* |
130 | +RewriteCond %{ENV:LP_DOWNLOAD_DIR}/EULA.txt -f |
131 | +RewriteRule .* /licenses/license.php?ste [CO=downloadrequested:%{REQUEST_URI}:.%{ENV:CO_DOMAIN},R,L] |
132 | + |
133 | +## Redirect to the Linaro license file protected builds. |
134 | +RewriteCond %{REQUEST_FILENAME} -d |
135 | +RewriteCond %{REQUEST_FILENAME}/EULA.txt -f |
136 | +RewriteRule .* /licenses/license.php?linaro [CO=downloadrequested:%{REQUEST_URI}:.%{ENV:CO_DOMAIN},R,L] |
137 | + |
138 | +RewriteCond %{REQUEST_FILENAME} -f |
139 | +RewriteCond %{ENV:LP_DOWNLOAD_DIR}/EULA.txt -f |
140 | +RewriteRule .* /licenses/license.php?linaro [CO=downloadrequested:%{REQUEST_URI}:.%{ENV:CO_DOMAIN},R,L] |
141 | + |
142 | +## Return "Permission denied" if no EULA/OPEN-EULA exists |
143 | +RewriteCond %{REQUEST_URI} !^/$ |
144 | +RewriteCond %{REQUEST_URI} !^/licenses/.*$ |
145 | +RewriteCond %{ENV:LP_DOWNLOAD_DIR}/EULA.txt !-f |
146 | +RewriteCond %{ENV:LP_DOWNLOAD_DIR}/OPEN-EULA.txt !-f |
147 | +RewriteRule .* - [R=403,L] |
148 | |
149 | === added directory 'android/~linaro-android/staging-imx53' |
150 | === added file 'android/~linaro-android/staging-imx53/test.txt' |
151 | --- android/~linaro-android/staging-imx53/test.txt 1970-01-01 00:00:00 +0000 |
152 | +++ android/~linaro-android/staging-imx53/test.txt 2012-04-02 10:19:19 +0000 |
153 | @@ -0,0 +1,1 @@ |
154 | +This is never available. |
155 | |
156 | === added file 'android/~linaro-android/staging-origen/EULA.txt' |
157 | --- android/~linaro-android/staging-origen/EULA.txt 1970-01-01 00:00:00 +0000 |
158 | +++ android/~linaro-android/staging-origen/EULA.txt 2012-04-02 10:19:19 +0000 |
159 | @@ -0,0 +1,1 @@ |
160 | +Samsung EULA goes here |
161 | \ No newline at end of file |
162 | |
163 | === added file 'android/~linaro-android/staging-panda/EULA.txt' |
164 | --- android/~linaro-android/staging-panda/EULA.txt 1970-01-01 00:00:00 +0000 |
165 | +++ android/~linaro-android/staging-panda/EULA.txt 2012-04-02 10:19:19 +0000 |
166 | @@ -0,0 +1,1 @@ |
167 | +Linaro EULA goes here |
168 | \ No newline at end of file |
169 | |
170 | === modified file 'android/~linaro-android/staging-panda/test.txt' |
171 | --- android/~linaro-android/staging-panda/test.txt 2011-12-09 14:49:04 +0000 |
172 | +++ android/~linaro-android/staging-panda/test.txt 2012-04-02 10:19:19 +0000 |
173 | @@ -1,1 +1,1 @@ |
174 | -This is always available. |
175 | +This is a protected with click-through Linaro license. |
176 | |
177 | === added directory 'android/~linaro-android/staging-snowball/173' |
178 | === added directory 'android/~linaro-android/staging-snowball/173/target' |
179 | === added directory 'android/~linaro-android/staging-snowball/173/target/product' |
180 | === added directory 'android/~linaro-android/staging-snowball/173/target/product/snowball' |
181 | === added file 'android/~linaro-android/staging-snowball/173/target/product/snowball/EULA.txt' |
182 | --- android/~linaro-android/staging-snowball/173/target/product/snowball/EULA.txt 1970-01-01 00:00:00 +0000 |
183 | +++ android/~linaro-android/staging-snowball/173/target/product/snowball/EULA.txt 2012-04-02 10:19:19 +0000 |
184 | @@ -0,0 +1,1 @@ |
185 | +STE license goes here |
186 | \ No newline at end of file |
187 | |
188 | === added file 'android/~linaro-android/staging-snowball/173/target/product/snowball/test.txt' |
189 | --- android/~linaro-android/staging-snowball/173/target/product/snowball/test.txt 1970-01-01 00:00:00 +0000 |
190 | +++ android/~linaro-android/staging-snowball/173/target/product/snowball/test.txt 2012-04-02 10:19:19 +0000 |
191 | @@ -0,0 +1,1 @@ |
192 | +This is a protected with click-through ST-E license. |
193 | |
194 | === removed file 'android/~linaro-android/staging-snowball/test.txt' |
195 | --- android/~linaro-android/staging-snowball/test.txt 2011-12-09 16:08:16 +0000 |
196 | +++ android/~linaro-android/staging-snowball/test.txt 1970-01-01 00:00:00 +0000 |
197 | @@ -1,1 +0,0 @@ |
198 | -This is a protected with click-through ST-E license. |
199 | |
200 | === added directory 'android/~linaro-android/staging-vexpress-a9' |
201 | === added file 'android/~linaro-android/staging-vexpress-a9/OPEN-EULA.txt' |
202 | --- android/~linaro-android/staging-vexpress-a9/OPEN-EULA.txt 1970-01-01 00:00:00 +0000 |
203 | +++ android/~linaro-android/staging-vexpress-a9/OPEN-EULA.txt 2012-04-02 10:19:19 +0000 |
204 | @@ -0,0 +1,1 @@ |
205 | +OPEN-EULA goes here |
206 | \ No newline at end of file |
207 | |
208 | === added file 'android/~linaro-android/staging-vexpress-a9/test.txt' |
209 | --- android/~linaro-android/staging-vexpress-a9/test.txt 1970-01-01 00:00:00 +0000 |
210 | +++ android/~linaro-android/staging-vexpress-a9/test.txt 2012-04-02 10:19:19 +0000 |
211 | @@ -0,0 +1,1 @@ |
212 | +This is always available. |
213 | |
214 | === added file 'licenses/license.php' |
215 | --- licenses/license.php 1970-01-01 00:00:00 +0000 |
216 | +++ licenses/license.php 2012-04-02 10:19:19 +0000 |
217 | @@ -0,0 +1,25 @@ |
218 | +<?php |
219 | + $down = $_COOKIE["downloadrequested"]; |
220 | + $lic = $_SERVER["QUERY_STRING"]; |
221 | + $host = $_SERVER["HTTP_HOST"]; |
222 | + $doc = $_SERVER["DOCUMENT_ROOT"]; |
223 | + $eula = $_COOKIE["eula"]; |
224 | + $fn = $doc.$down; |
225 | + if (file_exists($fn) and is_file($fn)) { |
226 | + $repl = dirname($down); |
227 | + } else { |
228 | + $repl = $down; |
229 | + } |
230 | + |
231 | + $handle = @fopen($doc."/licenses/".$lic.".html", "r"); |
232 | + if ($handle) { |
233 | + while (($buffer = fgets($handle, 4096)) !== false) { |
234 | + $eula = str_replace("src=\"EULA.txt\"", "src=".$repl."/EULA.txt", $buffer); |
235 | + echo $eula; |
236 | + } |
237 | + if (!feof($handle)) { |
238 | + echo "Error: unexpected fgets() fail\n"; |
239 | + } |
240 | + fclose($handle); |
241 | + } |
242 | +?> |
243 | |
244 | === added file 'licenses/linaro.html' |
245 | --- licenses/linaro.html 1970-01-01 00:00:00 +0000 |
246 | +++ licenses/linaro.html 2012-04-02 10:19:19 +0000 |
247 | @@ -0,0 +1,120 @@ |
248 | +<html> |
249 | +<head> |
250 | +<title>License Agreement</title> |
251 | +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
252 | +<style language="text/css"> |
253 | + html, body { |
254 | +// background: #aaa; |
255 | + color: black; |
256 | + margin: 0; |
257 | + padding: 0; |
258 | + font-size: 11pt; |
259 | + font-family: Sans; |
260 | + } |
261 | + |
262 | + div#head { |
263 | + height: 110px; |
264 | + background: white; |
265 | + padding: 2em; |
266 | + } |
267 | + |
268 | + h1 { |
269 | + padding-left: 200px; |
270 | + margin: 0; |
271 | + color: #444; |
272 | + font-size: 140%; |
273 | + font-weight: bold; |
274 | + text-align: center; |
275 | + background-image: url(/licenses/linaro.png); |
276 | + background-repeat: no-repeat; |
277 | + height: 110px; |
278 | + } |
279 | + |
280 | + #content { |
281 | + margin: 0 auto; |
282 | + min-width: 600px; |
283 | + max-width: 920px; |
284 | + } |
285 | + |
286 | + h2 { |
287 | + font-size: 120%; |
288 | + } |
289 | + |
290 | + #license-text { |
291 | + background: white; |
292 | + color: black; |
293 | + margin: 2em; |
294 | + padding: 2em; |
295 | + text-align: left; |
296 | + -moz-border-radius: 10px; |
297 | + -webkit-border-radius: 10px; |
298 | + border-radius: 10px; |
299 | + } |
300 | + |
301 | + #actions { |
302 | + padding: 2em; |
303 | + font-size: 80%; |
304 | + margin-bottom: 4em; |
305 | + } |
306 | + |
307 | + #actions .button { |
308 | + background: #e80; |
309 | + color: white; |
310 | + text-decoration: none; |
311 | + font-weight: bold; |
312 | + padding: 10px; |
313 | + margin-left: 10px; |
314 | + float: right; |
315 | + font-size: 110%; |
316 | + -moz-border-radius: 4px; |
317 | + -webkit-border-radius: 4px; |
318 | + border-radius: 4px; |
319 | + } |
320 | + |
321 | + #actions .button-decline:hover { |
322 | + background: #f90; |
323 | + } |
324 | + |
325 | + #actions .button-accept { |
326 | + background: #8b4; |
327 | + } |
328 | + |
329 | + #actions .button-accept:hover { |
330 | + background: #9c5; |
331 | + } |
332 | + iframe#eula { |
333 | + width: 100%; |
334 | + height: 100%; |
335 | + scrolling: auto; |
336 | + } |
337 | +</style> |
338 | +</head> |
339 | +<body> |
340 | + |
341 | +<div id="head"> |
342 | +<h1> |
343 | + END-USER LICENSE AGREEMENT<br> |
344 | + FOR LINARO DEVELOPERS (“Agreement”) |
345 | +</h1> |
346 | +</div> |
347 | + |
348 | +<div id="content"> |
349 | + |
350 | +<div id="license-text"> |
351 | +<iframe id="eula" frameborder=0 src="EULA.txt"></iframe> |
352 | +</div><!-- license-text --> |
353 | + |
354 | +<div id="actions"> |
355 | + |
356 | +<div style="float: left;">If accepting the license doesn't work, enable |
357 | +cookies in your browser.</div> |
358 | + |
359 | +<a class="button button-accept" href="linaro-accepted.html">Accept the license</a> |
360 | +<a class="button button-decline" href="linaro-declined.html">Decline the license</a> |
361 | + |
362 | +</div> |
363 | + |
364 | +</div><!-- content --> |
365 | + |
366 | +</body> |
367 | +</html> |
368 | |
369 | === added file 'licenses/linaro.png' |
370 | Binary files licenses/linaro.png 1970-01-01 00:00:00 +0000 and licenses/linaro.png 2012-04-02 10:19:19 +0000 differ |
371 | === added file 'licenses/samsung.html' |
372 | --- licenses/samsung.html 1970-01-01 00:00:00 +0000 |
373 | +++ licenses/samsung.html 2012-04-02 10:19:19 +0000 |
374 | @@ -0,0 +1,120 @@ |
375 | +<html> |
376 | +<head> |
377 | +<title>License Agreement</title> |
378 | +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
379 | +<style language="text/css"> |
380 | + html, body { |
381 | + background: #aaa; |
382 | + color: black; |
383 | + margin: 0; |
384 | + padding: 0; |
385 | + font-size: 11pt; |
386 | + font-family: Sans; |
387 | + } |
388 | + |
389 | + div#head { |
390 | + height: 120px; |
391 | + background: #e80; |
392 | + padding: 2em; |
393 | + } |
394 | + |
395 | + h1 { |
396 | + padding-left: 200px; |
397 | + margin: 0; |
398 | + color: white; |
399 | + font-size: 140%; |
400 | + font-weight: bold; |
401 | + text-align: center; |
402 | + background-image: url(/licenses/exynos.png); |
403 | + background-repeat: no-repeat; |
404 | + height: 109px; |
405 | + } |
406 | + |
407 | + #content { |
408 | + margin: 0 auto; |
409 | + min-width: 600px; |
410 | + max-width: 920px; |
411 | + } |
412 | + |
413 | + h2 { |
414 | + font-size: 120%; |
415 | + } |
416 | + |
417 | + #license-text { |
418 | + background: white; |
419 | + color: black; |
420 | + margin: 2em; |
421 | + padding: 2em; |
422 | + text-align: left; |
423 | + -moz-border-radius: 10px; |
424 | + -webkit-border-radius: 10px; |
425 | + border-radius: 10px; |
426 | + } |
427 | + |
428 | + #actions { |
429 | + padding: 2em; |
430 | + font-size: 80%; |
431 | + margin-bottom: 4em; |
432 | + } |
433 | + |
434 | + #actions .button { |
435 | + background: #e80; |
436 | + color: white; |
437 | + text-decoration: none; |
438 | + font-weight: bold; |
439 | + padding: 10px; |
440 | + margin-left: 10px; |
441 | + float: right; |
442 | + font-size: 110%; |
443 | + -moz-border-radius: 4px; |
444 | + -webkit-border-radius: 4px; |
445 | + border-radius: 4px; |
446 | + } |
447 | + |
448 | + #actions .button-decline:hover { |
449 | + background: #f90; |
450 | + } |
451 | + |
452 | + #actions .button-accept { |
453 | + background: #8b4; |
454 | + } |
455 | + |
456 | + #actions .button-accept:hover { |
457 | + background: #9c5; |
458 | + } |
459 | + iframe#eula { |
460 | + width: 100%; |
461 | + height: 100%; |
462 | + scrolling: auto; |
463 | + } |
464 | +</style> |
465 | +</head> |
466 | +<body> |
467 | + |
468 | +<div id="head"> |
469 | +<h1> |
470 | + SAMSUNG DEVELOPMENT TOOL KIT END-USER LICENSE AGREEMENT FOR LINARO |
471 | + DEVELOPERS (“Agreement”) |
472 | +</h1> |
473 | +</div> |
474 | + |
475 | +<div id="content"> |
476 | + |
477 | +<div id="license-text"> |
478 | +<iframe id="eula" frameborder=0 src="EULA.txt"></iframe> |
479 | +</div><!-- license-text --> |
480 | + |
481 | +<div id="actions"> |
482 | + |
483 | +<div style="float: left;">If accepting the license doesn't work, enable |
484 | +cookies in your browser.</div> |
485 | + |
486 | +<a class="button button-accept" href="samsung-accepted.html">Accept the license</a> |
487 | +<a class="button button-decline" href="samsung-declined.html">Decline the license</a> |
488 | + |
489 | +</div> |
490 | + |
491 | +</div><!-- content --> |
492 | + |
493 | +</body> |
494 | +</html> |
495 | |
496 | === modified file 'licenses/ste.html' |
497 | --- licenses/ste.html 2012-03-09 13:01:23 +0000 |
498 | +++ licenses/ste.html 2012-04-02 10:19:19 +0000 |
499 | @@ -88,6 +88,11 @@ |
500 | #actions .button-accept:hover { |
501 | background: #9c5; |
502 | } |
503 | + iframe#eula { |
504 | + width: 100%; |
505 | + height: 100%; |
506 | + scrolling: auto; |
507 | + } |
508 | </style> |
509 | </head> |
510 | <body> |
511 | @@ -105,304 +110,7 @@ |
512 | <div id="content"> |
513 | |
514 | <div id="license-text"> |
515 | - |
516 | -<div> |
517 | - This Agreement is a legally binding contract between you - either an |
518 | - individual or a legal entity - (hereinafter referred to as "Licensee") |
519 | - and ST-Ericsson SA, a company incorporated under the laws of |
520 | - Switzerland (hereinafter referred to as "ST-Ericsson"). |
521 | -</p> |
522 | - |
523 | -<p> |
524 | - IMPORTANT - PLEASE READ THE FOLLOWING AGREEMENT CAREFULLY. THIS IS A |
525 | - LEGALLY BINDING AGREEMENT. BY CLICKING THE "ACCEPT" BUTTON BELOW, OR |
526 | - BY DOWNLOADING OR INSTALLING OR OTHERWISE USING THE SOFTWARE, YOU |
527 | - AGREE TO BE BOUND BY THE TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE |
528 | - TO THE TERMS OF THIS AGREEMENT OR ARE NOT AUTHORISED TO ACCEPT AND |
529 | - AGREE TO THE TERMS OF THE AGREEMENT, DO NOT DOWNLOAD, INSTALL OR |
530 | - OTHERWISE USE THE SOFTWARE. |
531 | -</p> |
532 | - |
533 | -<p> |
534 | - ST-Ericsson and Licensee are each hereinafter also referred to as the |
535 | - "Party" and, collectively, as the "Parties." |
536 | -</p> |
537 | - |
538 | -<h2> |
539 | - 1 DEFINITIONS |
540 | -</h2> |
541 | - |
542 | -<p> |
543 | - 1.1 Wherever used in this Agreement, the following terms shall have |
544 | - the meanings set forth below: |
545 | -</p> |
546 | - |
547 | -<p> |
548 | - "Licensee's Applications" means applications and other software |
549 | - developed by Licensee which are intended to interface with and/or run |
550 | - on the Snowball Kit. |
551 | -</p> |
552 | - |
553 | -<p> |
554 | - "Limited License Purpose" shall mean the limited license granted under Article 2.1 below. |
555 | -</p> |
556 | - |
557 | -<p> |
558 | - "Snowball Kit" means the hardware products "SKY-S9500-ULP-Cxy" |
559 | - where x and y are integers between "0" and "9". |
560 | -</p> |
561 | - |
562 | -<p> |
563 | - "Software" shall mean the ST-Ericsson's software for the A9500 |
564 | - platform delivered in binary or in source for the related header |
565 | - files, including any copies and new releases thereof. |
566 | -</p> |
567 | - |
568 | -<p> |
569 | - 1.2 Other capitalized expressions used in this Agreement shall have |
570 | - the meanings respectively assigned to them elsewhere in this |
571 | - Agreement. |
572 | -</p> |
573 | - |
574 | -<p> |
575 | - 1.3 Words indicating the singular only also include the plural and |
576 | - vice-versa, where the context so requires. |
577 | -</p> |
578 | - |
579 | -<p> |
580 | - 1.4 The headings of the Articles in this Agreement are for convenience |
581 | - only and shall not affect the interpretation of this Agreement. |
582 | -</p> |
583 | - |
584 | -<h2>2 LICENSE GRANT</h2> |
585 | - |
586 | -<p> |
587 | - 2.1 Subject to the terms and conditions in this Agreement, STEricsson |
588 | - hereby grants to Licensee a non-exclusive, non-transferable, limited |
589 | - license to use and reproduce the Software solely to the extent |
590 | - required in order to (i) develop Licensee's Applications that |
591 | - interface with and/or run with the Snowball Kit; and (ii) integrate |
592 | - the Software with Licensee Application and/or third party software; |
593 | - and (iii) conduct development testing of the Licensee's Applications' |
594 | - or third party software operation in conjunction with the Snowball Kit |
595 | - and/or Licensee's demonstration of such Licensee's Applications in |
596 | - conjunction with the Snowball Kit (hereinafter "Limited License |
597 | - Purpose"). The Licensee is entitled to flash the Software on a |
598 | - commercial product containg the Snowball Kit. The aforesaid license to |
599 | - the Software is provided that all and any use of the Software is |
600 | - solely and exclusively used on the Snowball Kit. |
601 | -</p> |
602 | - |
603 | -<p> |
604 | - 2.2 Some portion of the Software might contain Open Source |
605 | - Software. Such Open Source Software might be subject to Open Source |
606 | - Terms applicable for each such portion, as further specified in the |
607 | - Software. Such Open Source Software is supplied to Licensee solely |
608 | - under the applicable Open Source Terms and is not subject to the terms |
609 | - of this Agreement. |
610 | -</p> |
611 | - |
612 | -<p> |
613 | - 2.3 Licensee shall not, and shall not permit any third party to alter, |
614 | - change, modify, adapt, decompile, disassemble, compile or reverse |
615 | - engineer or remove or circumvent any protection or other restrictive |
616 | - technology mechanism of the the Software and/or any and all parts |
617 | - thereof, or otherwise use, sub-license, assign or pledge the Software |
618 | - and/or any and all parts thereof other than what is expressly |
619 | - permitted in accordance with this Agreement. |
620 | -</p> |
621 | - |
622 | -<p> |
623 | - 2.4 ST-Ericsson shall retain on behalf of itself or the original owner |
624 | - all right title and interest to any ST-Ericsson Intellectual Property |
625 | - Rights, including but not limited to any patents, trademarks, |
626 | - copyrights, and trade secret rights, and title to copies of any and |
627 | - all media bearing the Software or the Snowball Kit and/or any and all |
628 | - parts thereof, and the Licensee acquires no interest under this |
629 | - Agreement to any ST-Ericsson Intellectual Property Rights or other |
630 | - rights other than the Limited License Purpose expressly set forth in |
631 | - this Article 2. |
632 | -</p> |
633 | - |
634 | -<p> |
635 | - 2.5 Notwithstanding anything to the contrary herein, nothing contained |
636 | - hereunder shall be construed as conferring any right, license or |
637 | - immunity, either directly or by implication, estoppel or otherwise to |
638 | - Licensee or any third party: (i) under any intellectual property |
639 | - rights of any third party; specifically, without limiting the |
640 | - generality of the foregoing, the sale and use of the Products are not |
641 | - licensed under any patents of Telefonaktiebolaget LM Ericsson, or any |
642 | - affiliates of such company; (ii) under any intellectual property |
643 | - rights of STEricsson other than explicitly granted under in this |
644 | - Agreement; or (iii) with respect to any trademark, trade or brand |
645 | - name, a corporate name of ST-Ericsson, or any other name or mark, or |
646 | - contraction abbreviation or simulation thereof. |
647 | -</p> |
648 | - |
649 | - |
650 | -<h2>3 DELIVERY</h2> |
651 | - |
652 | -<p> |
653 | - 3.1 All deliveries of the Software are EX-WORKS (Incoterms 2000) at |
654 | - ST-Ericsson's indicated facility. |
655 | -</p> |
656 | - |
657 | - |
658 | -<h2>4 NO REPRESENTATIONS OR WARRANTIES</h2> |
659 | - |
660 | -<p> |
661 | - 4.1 The Software is delivered "as is" and all representations and |
662 | - warranties, express or implied, are hereby disclaimed, including, but |
663 | - not limited to that: |
664 | -</p> |
665 | - |
666 | -<p> |
667 | - a) the Software or any part thereof is accurate or reliable for any |
668 | - purposes whatsoever; and |
669 | -</p> |
670 | - |
671 | -<p> |
672 | - b) the use of the Software does not infringe any rights that may be |
673 | - held by a third party in respect of any such information. |
674 | -</p> |
675 | - |
676 | -<p> |
677 | - 4.2 Licensee acknowledges and agrees that any use of the Software |
678 | - and/or the Snowball Kit, or any other part thereof, or any use of |
679 | - Licensee's Applications is at Licensee's sole risk. |
680 | -</p> |
681 | - |
682 | -<h2>5 WARRANTY DISCLAIMER AND GENERAL LIMITATION OF LIABILITY</h2> |
683 | - |
684 | -<p> |
685 | - 5.1 THE SOFTWARE AND/OR SNOWBALL KIT AND ANY AND ALL PARTS THEREOF ARE |
686 | - PROVIDED "AS IS". ST-ERICSSON MAKES NO REPRESENTATIONS OR WARRANTIES |
687 | - WITH RESPECT TO THE SOFTWARE AND/OR SNOWBALL KIT AND OR PARTS THEREOF |
688 | - WHETHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, IMPLIED |
689 | - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
690 | - PURPOSE. SPECIFICALLY, WITHOUT LIMITING THE GENERALITY OF THE |
691 | - FOREGOING, ST-ERICSSON MAKES NO REPRESENTATION OR WARRANTY THAT (I) |
692 | - THE USE OF THE SOFTWARE AND/OR SNOWBALL KIT AND OR PARTS THEREOF WILL |
693 | - BE UNINTERRUPTED OR ERROR FREE, AND OR (II) ANY USE AND OR |
694 | - DISTRIBUTION OF THE SOFTWARE AND/OR SNOWBALL KIT AND OR PARTS THEREOF, |
695 | - WHETHER INTEGRATED INTO OTHER EQUIPMENT OR NOT, ARE FREE FROM |
696 | - INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHTS, AND IT |
697 | - SHALL BE THE SOLE RESPONSIBILITY OF LICENSEE TO MAKE SUCH |
698 | - DETERMINATION AS IS NECESSARY WITH RESPECT TO THE ACQUISITION OF |
699 | - LICENSES UNDER PATENTS AND OTHER INTELLECTUAL PROPERTY RIGHTS OF THIRD |
700 | - PARTIES. CONSEQUENTLY, IN NO EVENT SHALL ST-ERICSSON, ITS AFFILIATES |
701 | - OR THEIR SUPPLIERS BE LIABLE TO LICENSEE FOR ANY LOSS OR DAMAGES |
702 | - (WHETHER DIRECT, INDRECT OR CONSEQUENTIAL) ARISING FROM ANY USE AND OR |
703 | - DISTRIBUTION OF THE SOFTWARE AND/OR SNOWBALL KIT AND OR PARTS THEREOF, |
704 | - WHETHER INTEGRATED INTO OTHER EQUIPMENT OR NOT, AND OR ARISING BY |
705 | - REASON OF THE FACT THAT THE SOFTWARE AND/OR SNOWBALL KIT AND OR ANY |
706 | - PARTS THEREOF ARE DEFECTIVE OR NON-CONFORMING AND OR ARISING FROM THIS |
707 | - AGREEMENT AND OR ANY BREACH THEREOF. |
708 | -</p> |
709 | - |
710 | -<p> |
711 | - 5.2 THE PARTIES AGREE THAT ANY RIGHTS AND REMEDIES THE LICENSEE MAY |
712 | - HAVE AND OR ANY OBLIGATIONS THAT ST-ERICSSON MAY HAVE ACCORDING TO LAW |
713 | - OR OTHERWISE WITH RESPECT TO ERRORS AND DEFECTS IN THE SOFTWARE AND/OR |
714 | - OTHER DELIVERABLES AND/OR IN ANY PART THEREOF SHALL HEREBY BE |
715 | - DISCLAIMED. |
716 | -</p> |
717 | - |
718 | -<h2> |
719 | - 6 TERMINATION |
720 | -</h2> |
721 | - |
722 | -<p> |
723 | - 6.1 The license and this Agreement are effective until terminated. |
724 | -</p> |
725 | - |
726 | -<p> |
727 | - 6.2 Licensee agrees that each of the terms and conditions set out in |
728 | - this Agreement are material and that failure of Licensee to comply |
729 | - with these terms and conditions shall constitute sufficient cause for |
730 | - ST-Ericsson to terminate this Agreement. The aforesaid is without any |
731 | - prejudice to other rights ST-Ericsson may have in case of breach of |
732 | - this Agreement. |
733 | -</p> |
734 | - |
735 | -<p> |
736 | - 6.3 In the event of termination of this Agreement Licensee shall |
737 | - immediately destroy all copies of the Software, including all portions |
738 | - and derivatives thereof. |
739 | -</p> |
740 | - |
741 | -<h2> |
742 | - 7 EXPORT CONTROL |
743 | -</h2> |
744 | - |
745 | -<p> |
746 | - 7.1 Licensee recognizes that the Software or any parts thereof may be |
747 | - subject to import and export regulations in certain |
748 | - countries. Licensee agrees that it will not knowingly export, |
749 | - re-export or import products, technology or Software, or any parts |
750 | - thereof, of ST-Ericsson, directly or indirectly, to any country to the |
751 | - extent export to such country at the time of export requires an export |
752 | - license or other governmental approval under any export control laws |
753 | - and regulations, without first obtaining such license or approval. |
754 | -</p> |
755 | - |
756 | -<h2> |
757 | - 8 COMPLIANCE WITH LAWS |
758 | -</h2> |
759 | - |
760 | -<p> |
761 | - 8.1 Licensee agrees not to use the Software in violation of, and to |
762 | - comply with any and all applicable law, statute, ordinance or other |
763 | - regulation. |
764 | -</p> |
765 | - |
766 | -<h2> |
767 | - 9 ENTIRE AGREEMENT |
768 | -</h2> |
769 | - |
770 | -<p> |
771 | - 9.1 This is the entire agreement between Licensee and ST-Ericsson on |
772 | - the subject matter of this Agreement, and supersedes all |
773 | - representations, undertakings and agreements previously made between |
774 | - the Parties with respect to the subject matter of this Agreement. |
775 | -</p> |
776 | - |
777 | -<h2> |
778 | - 10 SEVERABILITY |
779 | -</h2> |
780 | - |
781 | -<p> |
782 | - 10.1 If a court or agency of competent jurisdiction holds any term of |
783 | - this Agreement invalid, illegal, or unenforceable for any reason, the |
784 | - remainder of this Agreement shall be valid and enforceable and such |
785 | - term shall be substituted by a valid and enforceable provision so as |
786 | - to the best accomplish the objectives of such provision in this |
787 | - Agreement. |
788 | -</p> |
789 | - |
790 | -<h2> |
791 | - 11 GOVERNING LAW AND JURISDICTION |
792 | -</h2> |
793 | - |
794 | -<p> |
795 | - 11.1 This Agreement shall be governed by and construed in accordance |
796 | - with the laws of Switzerland, without regard to its conflict of laws |
797 | - rules. The application of The United Nations Convention of Contracts |
798 | - for the International Sale of Goods is explicitly excluded. |
799 | -</p> |
800 | - |
801 | -<p> |
802 | - 11.2 Any and all disputes, differences or questions arising out of or |
803 | - in connection with this Agreement shall be under the exclusive |
804 | - jurisdiction of the Swiss courts and the venue shall be Geneva. |
805 | -</p> |
806 | - |
807 | -<p> |
808 | - 11.3 Notwithstanding the aforesaid, nothing in this Article 11 shall |
809 | - prevent the Parties from seeking any interim or final injunctive or |
810 | - equitable relief by a court of competent jurisdiction. |
811 | -</p> |
812 | - |
813 | +<iframe id="eula" frameborder=0 src="EULA.txt"></iframe> |
814 | </div><!-- license-text --> |
815 | |
816 | </div><!-- content --> |
817 | |
818 | === modified file 'testing/apache2.conf.tmpl' |
819 | --- testing/apache2.conf.tmpl 2012-01-12 14:17:32 +0000 |
820 | +++ testing/apache2.conf.tmpl 2012-04-02 10:19:19 +0000 |
821 | @@ -17,6 +17,9 @@ |
822 | |
823 | DocumentRoot "" |
824 | |
825 | +RewriteLog rewrite.log |
826 | +RewriteLogLevel 7 |
827 | + |
828 | AccessFileName .htaccess |
829 | |
830 | LoadModule authz_host_module /usr/lib/apache2/modules/mod_authz_host.so |
831 | @@ -24,6 +27,7 @@ |
832 | LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so |
833 | LoadModule autoindex_module /usr/lib/apache2/modules/mod_autoindex.so |
834 | LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so |
835 | +LoadModule php5_module /usr/lib/apache2/modules/libphp5.so |
836 | |
837 | User daemon |
838 | Group daemon |
839 | @@ -96,6 +100,15 @@ |
840 | |
841 | </IfModule> |
842 | |
843 | +<IfModule mod_php5.c> |
844 | + <FilesMatch "\.ph(p3?|tml)$"> |
845 | + SetHandler application/x-httpd-php |
846 | + </FilesMatch> |
847 | + <FilesMatch "\.phps$"> |
848 | + SetHandler application/x-httpd-php-source |
849 | + </FilesMatch> |
850 | +</IfModule> |
851 | + |
852 | DefaultType text/plain |
853 | |
854 | IndexOptions FancyIndexing VersionSort HTMLTable NameWidth=* DescriptionWidth=* Charset=UTF-8 |
855 | |
856 | === modified file 'testing/mime.types' |
857 | --- testing/mime.types 2012-01-12 07:15:28 +0000 |
858 | +++ testing/mime.types 2012-04-02 10:19:19 +0000 |
859 | @@ -3,4 +3,9 @@ |
860 | text/html html htm shtml |
861 | text/plain asc txt text pot brf |
862 | text/uri-list |
863 | - |
864 | +application/x-httpd-php phtml pht php |
865 | +application/x-httpd-php-source phps |
866 | +application/x-httpd-php3 php3 |
867 | +application/x-httpd-php3-preprocessed php3p |
868 | +application/x-httpd-php4 php4 |
869 | +application/x-httpd-php5 php5 |
870 | |
871 | === modified file 'testing/test_click_through_license.py' |
872 | --- testing/test_click_through_license.py 2012-01-13 11:48:16 +0000 |
873 | +++ testing/test_click_through_license.py 2012-04-02 10:19:19 +0000 |
874 | @@ -19,11 +19,14 @@ |
875 | |
876 | host = 'http://127.0.0.1' |
877 | port = '0' # 0 == Pick a free port. |
878 | -samsung_license_path = '/licenses/samsung-v2.html' |
879 | +samsung_license_path = '/licenses/samsung.html' |
880 | ste_license_path = '/licenses/ste.html' |
881 | +linaro_license_path = '/licenses/linaro.html' |
882 | samsung_test_file = '/android/~linaro-android/staging-origen/test.txt' |
883 | -ste_test_file = '/android/~linaro-android/staging-snowball/test.txt' |
884 | -not_protected_test_file = '/android/~linaro-android/staging-panda/test.txt' |
885 | +ste_test_file = '/android/~linaro-android/staging-snowball/173/target/product/snowball/test.txt' |
886 | +never_available = '/android/~linaro-android/staging-imx53/test.txt' |
887 | +linaro_test_file = '/android/~linaro-android/staging-panda/test.txt' |
888 | +not_protected_test_file = '/android/~linaro-android/staging-vexpress-a9/test.txt' |
889 | |
890 | |
891 | class Contains(object): |
892 | @@ -105,6 +108,8 @@ |
893 | os.unlink("%s/click_through_license_access.log" % srvroot) |
894 | if os.path.exists("%s/click_through_license_error.log" % srvroot): |
895 | os.unlink("%s/click_through_license_error.log" % srvroot) |
896 | + if os.path.exists("%s/rewrite.log" % srvroot): |
897 | + os.unlink("%s/rewrite.log" % srvroot) |
898 | os.rename("%s/dothtaccess" % docroot, "%s/.htaccess" % docroot) |
899 | |
900 | def setUp(self): |
901 | @@ -129,16 +134,26 @@ |
902 | testfile = fetcher.get(host + ste_license_path) |
903 | self.assertThat(testfile, Contains(search)) |
904 | |
905 | + def test_licensefile_directly_linaro(self): |
906 | + search = "Index of /" |
907 | + testfile = fetcher.get(host + linaro_license_path) |
908 | + self.assertThat(testfile, Contains(search)) |
909 | + |
910 | def test_redirect_to_license_samsung(self): |
911 | - search = "SAMSUNG DEVELOPMENT TOOL KIT END-USER LICENSE AGREEMENT" |
912 | + search = "LICENSE AGREEMENT" |
913 | testfile = fetcher.get(host + samsung_test_file, ignore_license=True) |
914 | self.assertThat(testfile, Contains(search)) |
915 | |
916 | def test_redirect_to_license_ste(self): |
917 | - search = "LIMITED LICENSE AGREEMENT FOR APPLICATION DEVELOPERS" |
918 | + search = "LICENSE AGREEMENT" |
919 | testfile = fetcher.get(host + ste_test_file, ignore_license=True) |
920 | self.assertThat(testfile, Contains(search)) |
921 | |
922 | + def test_redirect_to_license_linaro(self): |
923 | + search = "LICENSE AGREEMENT" |
924 | + testfile = fetcher.get(host + linaro_test_file, ignore_license=True) |
925 | + self.assertThat(testfile, Contains(search)) |
926 | + |
927 | def test_decline_license_samsung(self): |
928 | search = "License has not been accepted" |
929 | testfile = fetcher.get(host + samsung_test_file, accept_license=False) |
930 | @@ -149,11 +164,21 @@ |
931 | testfile = fetcher.get(host + ste_test_file, accept_license=False) |
932 | self.assertThat(testfile, Contains(search)) |
933 | |
934 | + def test_decline_license_linaro(self): |
935 | + search = "License has not been accepted" |
936 | + testfile = fetcher.get(host + linaro_test_file, accept_license=False) |
937 | + self.assertThat(testfile, Contains(search)) |
938 | + |
939 | def test_non_protected_dirs(self): |
940 | search = "This is always available." |
941 | testfile = fetcher.get(host + not_protected_test_file) |
942 | self.assertThat(testfile, Contains(search)) |
943 | |
944 | + def test_never_available_dirs(self): |
945 | + search = "Forbidden" |
946 | + testfile = fetcher.get(host + never_available) |
947 | + self.assertThat(testfile, Contains(search)) |
948 | + |
949 | def test_accept_license_samsung_file(self): |
950 | search = "This is a protected with click-through Samsung license." |
951 | testfile = fetcher.get(host + samsung_test_file) |
952 | |
953 | === added directory 'uploads' |
This looks fine and should work with the scripts that we have to automatically accept licenses.