Opened 4 years ago

Closed 4 years ago

#2329 closed defect (fixed)

Latest MapServer patch breaks GeoMoose

Reported by: kalxas Owned by: osgeolive@…
Priority: blocker Milestone: OSGeoLive14.0
Component: OSGeoLive Keywords: mapserver, geomoose
Cc: osgeolive@…

Description

For rc3 a mapserver patch was introduced:

https://github.com/OSGeo/OSGeoLive/commit/5ddf0302b29a4868d7352cfed114ad46e84ea4b1

This patch is breaking GeoMoose (see attachment)

Attachments (3)

Screenshot_20210430_134741.png (137.8 KB ) - added by kalxas 4 years ago.
Screenshot_20210504_173138.png (72.0 KB ) - added by kalxas 4 years ago.
Screenshot_20210504_173154.png (63.0 KB ) - added by kalxas 4 years ago.

Download all attachments as: .zip

Change History (22)

by kalxas, 4 years ago

comment:1 by sdlime, 4 years ago

Need to generalize the value for MS_MAP_PATTERN in Apache. What's the path to all the GeoMoose mapfiles?

comment:2 by kalxas, 4 years ago

Files are available in various sub-folders of /usr/local/geomoose/gm3-demo-data/

comment:3 by jimk, 4 years ago

/usr/local/geomoose/gm3-demo-data/

And actually, I think the only mapfiles called directly are in

/usr/local/geomoose/gm3-demo-data/*/*.map

The top level ones are only referenced by INCLUDE statements.

comment:4 by sdlime, 4 years ago

I'll supply a patch to the MapServer install script ASAP.

by kalxas, 4 years ago

by kalxas, 4 years ago

comment:5 by kalxas, 4 years ago

Pull request merged:

https://github.com/OSGeo/OSGeoLive/pull/313

but problem persists

comment:6 by sdlime, 4 years ago

Ugh... Looking at the screenshots the problem is the /./ in the mapfile path. The value for MS_MAP_PATTERN is explicitly blocking that (and so will subsequent versions of MapServer by default).

  • /usr/local/geomoose/gm3-demo-data/demo/./parcels/parcels.map - FAILS
  • /usr/local/geomoose/gm3-demo-data/demo/parcels/parcels.map - WORKS

I don't know how those paths are built within GeoMoose.

kalxas, what's the easiest way for me to fire up a local version of OSGeoLive with this issue?

--Steve

comment:7 by jimk, 4 years ago

This is coming from the GeoMoose Mapbooks:

/usr/local/geomoose/gm3-examples/htdocs/desktop/mapbook.xml
/usr/local/geomoose/gm3-examples/htdocs/mobile/mapbook.xml

Lines like:

<file>./demo/scalebars/scalebar_miles.map</file>

comment:8 by sdlime, 4 years ago

Is it reasonable to remove the ./ or do I need to figure out a different expression that allows /./ in the path?

comment:9 by jimk, 4 years ago

With this change in MapServer, I really want to move the GeoMoose to the /datasets/scalebar_miles.map?... style URLs (which can protect files and set the environment variables properly for each file using Apache directives) instead of /cgi-bin/mapserv?map=..., but I don't have time to do that before the OL14 release.

comment:10 by jimk, 4 years ago

I think the ./ can be removed from the mapbooks (sed???).

comment:11 by jimk, 4 years ago

I'm not sure if this misses something, but this is what I used on demo.geomoose.org.

SetEnv MS_MAP_PATTERN "^\/srv\/demo\/src\/3\.0\/gm3-demo-data\/(\./){0,1}([^\.][_A-Za-z0-9\-\.]+\/{1})*([_A-Za-z0-9\-\.]+\.(map))$"

comment:12 by sdlime, 4 years ago

Reasonable hint. I think I can just do something like:

"/usr/local/(mapserver specific path)|(geomoose specific path)/([\.][_A-Za-z0-9\-\.]+\/{1})*([_A-Za-z0-9\-\.]+\.(map))$"

So much easier in recently released version(s). More soon...

--Steve

Version 0, edited 4 years ago by sdlime (next)

comment:13 by sdlime, 4 years ago

Just submitted another pull request that should allow /./ in paths. --Steve

https://github.com/OSGeo/OSGeoLive/pull/314

comment:14 by kalxas, 4 years ago

Thanks, building a new iso to test and will provide feedback.

comment:16 by sdlime, 4 years ago

Have latest ISO running locally as a VM. Will give it another shot...

comment:17 by sdlime, 4 years ago

Ok, one more try. See https://github.com/OSGeo/OSGeoLive/pull/315. Tested against the nightly ISO... --Steve

comment:18 by kalxas, 4 years ago

Confirmed fixed in build 287

Thanks all!

comment:19 by kalxas, 4 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.