Closed ccancellieri closed 2 years ago
Hi, I know this is a bit OT here but it's important to know that harvester can't work over Alpine 3.12 (default for ckan-base-2.8), the problem is related to lxml and libxml2. In short etree.find(...) returns a corrupted xml where the ending tag is not removed. Resulting in an xml like below:
<gmd:MD_Metadata xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:geonet="http://www.fao.org/geonetwork" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xsi:schemaLocation="http://www.isotc211.org/2005/gmd https://www.isotc211.org/2005/gmd/gmd.xsd http://www.isotc211.org/2005/gmx https://www.isotc211.org/2005/gmx/gmx.xsd http://www.isotc211.org/2005/srv http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd">\n
....
</gmd:MD_Metadata>\n
</csw:GetRecordByIdResponse>\n'
After getting crazy with libs and bindings for the whole day I decided to upgrade the Alpine version to 3.14 and it solved!
Now I'm able to harvest again an iso19115 and debug.
Hi I'm adding something I've had to fix to be able to install ckanext-plugin into docker-ckan.
1) has been solved downgrading some dependencies and ignoring: https://github.com/ckan/ckanext-spatial/blob/master/requirements-py2.txt
The main problem is that for some reason it's impossible to have a proj correctly installed on the machine, I tried several approaches up to build it from sources... (don't try to suggest easy solutions like
apk add proj-util
it simply won't solve)The command
which proj
will always return noneDowngrading pyproj it's not complaining anymore about native bindings (probably it won't work at runtime but at least we can go ahead...)
Also shapely is not properly working in the suggested version so I downgraded it also.
I managed to install using the following:
This can be called spatial.sh and placed under docker-entrypoint.d/
2) The db Docker file may use postgis:
Create the following file docker-entrypoint-initdb.d/30_postgis_permissions.sql:
If for some reason the initialization of the db is not properly performed login on the db machine and run the above commands manually then rebuild the ckan-dev once again so the spatial initdb can do its job.