forked from Geoportail-Luxembourg/geoportailv3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CONST_CHANGELOG.txt
452 lines (337 loc) · 17.1 KB
/
CONST_CHANGELOG.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
This file includes migration steps for each release of c2cgeoportal.
Version 1.6.3
=============
1. To use the MapFish print v3 protocol from the CGXP client add the following config
lines in the `cgxp_print` plugin in the `geoportailv3/templates/viewer.js` file:
+ version: 3
2. To still use Mapfish Print v2 you should:
* In the `vars_geoportailv3.yaml` file, add the following variable
print_url: http://localhost:8080/print-{instanceid}/pdf/
* Add also in the `check_collector` variable the following variable:
check_collector:
+ disabled: [checker_print3capabilities, checker_pdf3]
* Add the following line in your geoportailv3.mk file:
PRINT_VERSION = 2
* Be sure that you moved your file `print/templates/print.mako.in`
to `print/config.yaml.mako` and did the required changes.
3. In all `mapserver/*.map` or `mapserver/*.map.mako` files, convert all SRS
codes in METADATA sections to uppercase.
Lowercase SRS codes may cause incompatibility problems with some client
tools including CGXP WMSBrowser plugin.
Exemple:
METADATA
...
"wms_srs" "epsg:21781 epsg:3857"
...
END
should be converted to:
METADATA
...
"wms_srs" "EPSG:21781 EPSG:3857"
...
END
Note that “epsg” has to be in lowercase when used in the PROJ4 ‘init’ directive.
PROJECTION
"init=epsg:21781"
END
4. In all `mapserver/*.map` or `mapserver/*.map.mako` files, adding an EXTENT to all
LAYER definitions will be a great performance improvement, see:
http://docs.camptocamp.net/c2cgeoportal/1.6/administrator/mapfile.html#performance-improvement
5. In `vars_geoportailv3.yaml` file add `admin_interface` key in `update_paths`:
update_paths:
- authtkt
- checker
- check_collector.hosts
+ - admin_interface
6. In the `geoportailv3/templates/index.html`, `geoportailv3/templates/edit.html`
and `geoportailv3/templates/routing.html` do the following changes to use IE11 when available :
- <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9; IE=EmulateIE10">
+ <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9; IE=EmulateIE11">
7. Remove the `lang_files` from the `vars/checker` in the file `vars_geoportailv3.yaml`.
8. If in your `vars_geoportailv3.yaml` file you have the following `available_functionalities` they can be removed
because they are the default settings:
# The list of functionalities that can be configured
# through the admin interface.
available_functionalities:
- default_basemap
- print_template
- mapserver_substitution
9. In the Mapfish print v3 configuration do the following change ([htps] => https?):
- !configureHttpRequests
httpProcessors:
- !mapUri
mapping:
- ([htps])://${host}/(.*): "$1://127.0.0.1/$2"
+ (https?)://${host}/(.*): "$1://127.0.0.1/$2"
10. In the Mapfish print v3 configuration do the following change:
- !configureHttpRequests
httpProcessors:
...
- !forwardHeaders
headers:
- Cookie
- Host
- - Referrer
+ - Referer
11. In the `apache/application.wsgi.mako` add the following lines:
import site
+import sys
+import re
site.addsitedir("${python_path}")
+# Remove site packages
+regex = re.compile("^/usr/lib/python.\../dist-packages$")
+sys.path = [p for p in sys.path if regex.match(p) is None]
+
from pyramid.paster import get_app, setup_logging
configfile = "${directory}/${'development' if development == 'TRUE' else 'production'}.ini"
12. On deploy the post-restore-code will be moved to pre-restore-code and deeply modified.
If you did not modify it you can just copy the new version with the following:
mv deploy/hooks/post-restore-code deploy/hooks/pre-restore-code
cp /tmp/geoportailv3/deploy/hooks/pre-restore-code deploy/hooks
chmod +x deploy/hooks/pre-restore-code
and the `.gitignore` file should also be adapted:
- /deploy/hooks/post-restore-database
+ /deploy/hooks/pre-restore-database
Version 1.6.2
=============
1. In the `geoportailv3/models.py` add the following lines:
from pyramid.security import DENY_ALL
LayerInternalWMS.__acl__ = [DENY_ALL]
LayerExternalWMS.__acl__ = [DENY_ALL]
LayerWMTS.__acl__ = [DENY_ALL]
WMTSDimension.__acl__ = [DENY_ALL]
2. If you still use version 2 of the print the `.war` file should be updated to the latest version.
cd print
wget http://pypi.camptocamp.net/print-servlet-2.1-SNAPSHOT-IMG-MAGICK-daeea96d2d3b33d6ccf02fe62d81b9c7aa2574a2.war
mv print-servlet-2.1-SNAPSHOT-IMG-MAGICK-daeea96d2d3b33d6ccf02fe62d81b9c7aa2574a2.war print-servlet-2.1-SNAPSHOT-IMG-MAGICK.war
touch print-servlet-2.1-SNAPSHOT-IMG-MAGICK.war
3. In the `geoportailv3/__init__.py` file remove all the `config.add_settings({ ... })`, they should be in the `vars_*.yaml` files.
Version 1.6
===========
1. Warning about .in and .mako files
In c2cgeoportal 1.6, the .in are globally replaced by .mako
.in STILL WORK!
You can keep the .in, the system is backward compatible,
or you can choose to replace your .in by .mako, to stick to c2cgeoportal
evolution.
.mako offer more flexibility, so it is advised to replace the .in
by .mako
Please note the following syntax changes:
- a variable named ${vars:<varname>} in a .in will be written ${<varname>} in
a .mako.
- ${buildout:directory} must be replaced by ${directory}.
Also, in all the CHANGELOG points specifying both .in/.mako files, it means
you need to modify the file you have (either the .in or the .mako), you MUST
NOT have both files.
2. Follow the instructions explained in this documentation chapter:
http://docs.camptocamp.net/c2cgeoportal/1.6/integrator/upgrade_application.html#easy-upgrading-an-application-from-1-5-to-1-6
3. Get the new and heavily modified files:
at that point, the following folder should exist: /tmp/geoportailv3/
cp /tmp/geoportailv3/.gitignore .
cp /tmp/geoportailv3/.jshintrc .
cp /tmp/geoportailv3/.travis.yml .
cp /tmp/geoportailv3/travis.mk .
cp /tmp/geoportailv3/geoportailv3.mk .
cp /tmp/geoportailv3/README.rst .
cp /tmp/geoportailv3/alembic.ini.mako .
cp /tmp/geoportailv3/alembic_static.ini.mako .
cp /tmp/geoportailv3/build.json .
cp /tmp/geoportailv3/development.ini.mako .
cp /tmp/geoportailv3/lingua.cfg .
cp /tmp/geoportailv3/package.json .
cp /tmp/geoportailv3/production.ini.mako .
cp /tmp/geoportailv3/vars_geoportailv3.yaml .
cp /tmp/geoportailv3/deploy/hooks/post-restore-code deploy/hooks
cp /tmp/geoportailv3/apache/application.wsgi.mako apache/
chmod +x deploy/hooks/post-restore-code
4. Starting from version 1.6 we use a new build system based on Make that will change
many of your habits, information are given at:
http://docs.camptocamp.net/c2cgeoportal/1.6/integrator/make.html
Main things to do:
- Move your old `config.yaml` and your `[vars]` section of the old
`buildout.cfg` file to the new `vars_geoportailv3.yaml` file in the `vars:` parameter.
- Move your special task from your old `buildout.cfg` file to your new
`geoportailv3.mk` file
- The `README.rst`, `.gitignore` files will be overwritten.
Please make sure to back your changes up before proceeding.
- The `development.ini.in`, `production.ini.in` files will be replaced by
the `development.ini.mako`, `production.ini.mako` files. If you lost
something it should probably be moved in the `vars_geoportailv3.yaml` file.
- The `print/template/print.mako.in` file should be moved to
`print/config.yaml.mako`. The paths provided in `print/config.yaml.mako`
must be adapted accordingly. For instance:
`<%include file="/A4_portrait.mako" />` should be changed to
`<%include file="templates/A4_portrait.mako" />`.
- The build environments (`<user>.mk` files) must be recreated.
For multi project mode have a look at the documentation:
http://docs.camptocamp.net/c2cgeoportal/master/integrator/create_application.html
5. In the `setup.cfg` file you should remove all the `[compile_catalog]`,
`[extract_messages]`, `[init_catalog]`, `[update_catalog]` sections.
6. In the `setup.py` file you should remove the `message_extractors`
argument.
7. In the geoportailv3/__init__.py file do the following changes:
-from c2cgeoportal import locale_negotiator
+from c2cgeoportal import locale_negotiator, add_interface, INTERFACE_TYPE_SENCHA_TOUCH
Replace all the mobile view configuration (all the `config.add_route ...`,
`config.add_view ...` under the line "# mobile views and routes") by the
following lines:
+ add_interface(config)
+ add_interface(config, 'edit')
+ add_interface(config, 'routing')
+ add_interface(config, 'mobile', INTERFACE_TYPE_SENCHA_TOUCH)
Remove the activation of the static view (now done directly in c2cgeoportal):
- # add the main static view
- config.add_static_view(
- name='proj',
- path='geoportailv3:static',
- cachebust=True,
- )
Remove the activation of the admin interface (now done directly in c2cgeoportal):
- if asbool(config.get_settings().get('enable_admin_interface')):
- config.formalchemy_admin(
- 'admin', package='geoportailv3',
- view='fa.jquery.pyramid.ModelView', factory=FAModels
- )
Remove the activation of the checkers (now done directly in c2cgeoportal):
- config.add_route('checker_all', '/checker_all')
8. In the `geoportailv3/templates/*.html` files you should do the following
changes:
- jsbuild_cfg = request.registry.settings.get('jsbuild_cfg')
- jsbuild_root_dir = request.registry.settings.get('jsbuild_root_dir')
+ jsbuild_settings = request.registry.settings.get('jsbuild', {})
+ jsbuild_cfg = jsbuild_settings.get('config')
+ jsbuild_root_dir = jsbuild_settings.get('root_dir')
Remove the no more needed `_query=url_params` argument of the
`static_url` calls.
9. In the `geoportailv3/templates/*.js` files do the following changes:
- <% json_extent = user.role.json_extent if user else None %>
- % if json_extent:
- var INITIAL_EXTENT = ${json_extent};
+ <% bounds = user.role.bounds if user else None %>
+ % if bounds:
+ var INITIAL_EXTENT = ${dumps(bounds)};
replace `url_role_params` by `version_role_params` in all the file.
in the WMTS_OPTIONS add the following lines:
+ getURL: function() {
+ var url = OpenLayers.Layer.WMTS.prototype.getURL.apply(this, arguments);
+ return url + "?${'&'.join(["%s=%s" % p for p in version_params.items()]) | n}";
+ },
10. In the `geoportailv3/templates/*.js`, `geoportailv3/templates/api/*.js`,
`geoportailv3/static/mobile/config.js`, `geoportailv3/static/mobile/index.html`
files add ` | n` after all the `static_url` and `route_url` call, like:
- "${request.static_url('...')}"
+ "${request.static_url('...') | n}"
11. In the `geoportailv3/templates/edit.js` file
add the following attribute to the `cgxp_editing` plugin:
+ metadataParams: ${dumps(version_role_params) | n}
12. In the mapfile add the following lines to all restricted layers:
VALIDATION
${mapserver_layer_validation}
END
13. Remove the deprecated versioning table:
sudo -u postgres psql -c "DROP TABLE version_geoportailv3" <database>
14. For non Apt/Dpkg based OS, disable the package checking:
In the ``buildout.cfg`` section ``[buildout]`` add:
parts -=
test-packages
test-packages-mobile
test-packages-tilecloud-chain
15. In the `geoportailv3/static/mobile/config.js` add the following line at the top of the file:
+OpenLayers.ImgPath = "${request.static_url('geoportailv3:static/lib/cgxp/core/src/theme/img/ol/') | n}";
16. Move the `jsbuild/app.cfg` file to `jsbuild/app.cfg.mako`.
Add the following lines in the start of the file:
<%
root = [
"geoportailv3/static/lib/cgxp/core/src/script",
"geoportailv3/static/lib/cgxp/ext",
"geoportailv3/static/lib/cgxp/geoext/lib",
"geoportailv3/static/lib/cgxp/openlayers/lib",
"geoportailv3/static/lib/cgxp/openlayers.addins/GoogleEarthView/lib",
"geoportailv3/static/lib/cgxp/openlayers.addins/Spherical/lib",
"geoportailv3/static/lib/cgxp/openlayers.addins/URLCompressed/lib",
"geoportailv3/static/lib/cgxp/openlayers.addins/DynamicMeasure/lib",
"geoportailv3/static/lib/cgxp/openlayers.addins/AddViaPoint/lib",
"geoportailv3/static/lib/cgxp/openlayers.addins/AutoProjection/lib",
"geoportailv3/static/lib/cgxp/gxp/src/script",
"geoportailv3/static/lib/cgxp/proj4js",
"geoportailv3/static/lib/cgxp/geoext.ux/ux/Measure/lib",
"geoportailv3/static/lib/cgxp/geoext.ux/ux/SimplePrint/lib",
"geoportailv3/static/lib/cgxp/geoext.ux/ux/FeatureEditing/lib",
"geoportailv3/static/lib/cgxp/geoext.ux/ux/FeatureSelectionModel/lib",
"geoportailv3/static/lib/cgxp/geoext.ux/ux/WMSBrowser/lib",
"geoportailv3/static/lib/cgxp/geoext.ux/ux/StreetViewPanel",
"geoportailv3/static/lib/cgxp/sandbox",
"geoportailv3/static/lib/cgxp/styler/lib",
"geoportailv3/static/lib/cgxp/ext.ux/TwinTriggerComboBox",
"geoportailv3/static/lib/cgxp/ext.ux/GroupComboBox",
"geoportailv3/static/lib/cgxp/ext.ux/ColorPicker",
"geoportailv3/static/lib/cgxp/ext.ux/base64",
"geoportailv3/static/lib/cgxp/ext.overrides",
"geoportailv3/static/lib/cgxp/dygraphs",
"geoportailv3/static/js",
]
%>
Replace all the root sections (for all built files) by:
root =
${"\n ".join(root)}
17. Remove your Apache configuration file, probably in
`/var/www/vhost/geoportailv3/conf`. Now it will be automatically created.
To define a customized path, set the variables APACHE_VHOST and/or
APACHE_CONF_DIR in your `<user>.mk` file.
18. Notes on database changes:
* In prevision of GeoMapFish 2.0 some tables were added and some fields updated.
* Table ``user`` has been moved to schema ``main_static`` in order to store all
data modified by the web application in the same schema.
As a result the passwords no longer need to be synchronised among the various instances
of the application and the password replication tool has been removed.
19. Add at the end of the `deploy/hooks/post-restore-database.mako` or
`deploy/hooks/post-restore-database.in` file the following line:
+ .build/venv/bin/alembic -c alembic_static.ini upgrade head
20. In your `apache/wsgi.conf.mako` or `apache/wsgi.conf.in` file replace all the
`apache-entry-point` by `apache_entry_point`
21. In your `apache/frontend.conf.mako` or `apache/frontend.conf.in` file in the
`<LocationMatch /${instanceid}/wsgi/>` section,
add the following mimetypes to the existing list:
... application/vnd.ogc.wms_xml application/vnd.ogc.gml application/vnd.ogc.se_xml
and in the `<LocationMatch /${instanceid}/tiles/>` section,
add the following lines:
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript application/javascript application/xml
Header add Access-Control-Allow-Headers "X-Requested-With, Content-Type"
22. In the `geoportailv3/subscribers.py`, `geoportailv3/models.py`, `geoportailv3/forms.py` files do the following changes:
-... = TranslationStringFactory('geoportailv3')
+... = TranslationStringFactory("geoportailv3-server")
23. In the `geoportailv3/subscribers.py` file do the following change:
- return localizer.translate(tsf2(localizer.translate(tsf1(string))))
+ result = localizer.translate(tsf1(string))
+ return localizer.translate(tsf2(string)) if result == string else result
24. Add the `print_spec` in the `checker` config `vars_geoportailv3.yaml` file:
checker:
...
print_spec:
layout: "A4 portrait"
outputFormat: "pdf"
attributes:
title: ""
comments: ""
datasource: []
map:
projection: "EPSG:21781"
dpi: 254
rotation: 0
center: [600000, 200000]
scale: 100000
longitudeFirst: true
layers: []
legend: {}
25. Remove the deprecated files:
git rm -r geoportailv3/CONST_migration
git rm -r geoportailv3/static/build
git rm config.yaml.in
git rm bootstrap.py
git rm -r *buildout*
git rm development.ini.in production.ini.in
git rm versions.cfg
26. In your `apache/wsgi.conf.in` or `apache/wsgi.conf.mako` file, do the
following change:
- WSGIScriptAlias /${vars:instanceid}/wsgi ${buildout:directory/buildout/parts/modwsgi/wsgi}
+ WSGIScriptAlias /${instanceid}/wsgi ${directory}/apache/application.wsgi