Bug 984703

Summary: Add PostGIS 2.0.x support
Product: OpenShift Online Reporter: Hiro Asari <hasari>
Component: ContainersAssignee: Adam Miller <admiller>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.xCC: admiller, dmcphers, hasari, jkeck, spousty, xtian, yadu
Target Milestone: ---Keywords: UpcomingRelease
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-07 22:55:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hiro Asari 2013-07-15 17:53:36 UTC
Description of problem:
SCL PostgreSQL 9.2 installs, but there is no PostGIS[1] support.

RHEL has postgis package already, but naturally it is for the postgresql package, and does not work with SCL.

[1]http://postgis.net/

Version-Release number of selected component (if applicable):
RHEL 6


How reproducible:
always

Steps to Reproduce:
1. scl enable postgresql92 psql

2. At psql prompt, run:
# create extension postgis;
# create extension postgis_topology;

Actual results:
railspg=# create extension postgis;
railspg=# \q
ERROR:  could not open extension control file "/opt/rh/postgresql92/root/usr/share/pgsql/extension/postgis.control": No such file or directory


Expected results:

foo=# create extension postgis;
CREATE EXTENSION
foo=# create extension postgis_topology;
CREATE EXTENSION


Additional info:
The latest version is 2.0.3.

We may be able to modify existing yum packages to suit our needs: http://yum.postgresql.org/repopackages.php#pg92

Comment 4 Hiro Asari 2013-07-19 17:50:04 UTC
Moving to OpenShift.

Comment 5 Steven Citron-Pousty 2013-07-22 15:18:37 UTC
Please make sure we enable Raster support as well for PostGIS, this was huge with the 2.x release cycle.

Given our timetable I also think we should maybe wait for 2.1
http://postgis.net/2013/07/10/postgis-2-1-0rc1

I will try to get a better idea on the timing for 2.1. I know they have rpms for PostGIS 

http://yum.postgresql.org/

Hope that helps....
Steve

Comment 6 Hiro Asari 2013-07-22 20:54:30 UTC
Note that the packages on yum.postgresql.org are differently named, and are completely separate from RHEL and SCL. See http://yum.postgresql.org/9.2/redhat/rhel-6-x86_64/

It is not clear if we can fold this into OpenShift as a matter of policy.

FYI: their postgis package conflicts with the existent 1.5.3 package:

[root@ip-10-33-6-153 ~]# yum install postgis2_92-2.0.3
Loaded plugins: amazon-id, priorities, rhui-lb, security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package postgis2_92.x86_64 0:2.0.3-2.rhel6 will be installed
--> Processing Dependency: json-c for package: postgis2_92-2.0.3-2.rhel6.x86_64
--> Processing Dependency: libjson.so.0()(64bit) for package: postgis2_92-2.0.3-2.rhel6.x86_64
--> Running transaction check
---> Package json-c.x86_64 0:0.10-2.el6 will be installed
--> Processing Conflict: postgis2_92-2.0.3-2.rhel6.x86_64 conflicts postgis <= 2.0.0
--> Finished Dependency Resolution
Error: postgis2_92 conflicts with postgis-1.5.3-1.el6_2.x86_64

Comment 7 Adam Miller 2013-07-29 18:12:04 UTC
This has been added to the devenv repositories as of this morning, build info here: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6097447

This has however been pushed out to Sprint 32 since it missed DCUT for Sprint 31.

Comment 8 Yan Du 2013-07-30 10:42:32 UTC
test on devenv_3583, issue still can be reproduced

steps:
1. rhc app create foo jbossas-7 postgresql-9.2
2. ssh into app

[foo-111.dev.rhcloud.com 394780915938192514875392]\> scl enable postgresql92 psql
psql (9.2.4)
Type "help" for help.

foo=# create extension postgis;
ERROR:  could not open extension control file "/opt/rh/postgresql92/root/usr/share/pgsql/extension/postgis.control": No such file or directory
foo=# create extension postgis_topology;
ERROR:  could not open extension control file "/opt/rh/postgresql92/root/usr/share/pgsql/extension/postgis_topology.control": No such file or directory

Comment 9 Xiaoli Tian 2013-07-30 10:54:27 UTC
Back to ON_QA to re-test since comment 8 lack steps to install  postgresql92-postgis manually since it's not installed in default.

Comment 10 Xiaoli Tian 2013-07-30 10:54:27 UTC
Back to ON_QA to re-test since comment 8 lack steps to install  postgresql92-postgis manually since it's not installed in default.

Comment 11 Yan Du 2013-07-30 11:01:26 UTC
pls. just ignore #Comment 8

verified on devenv_3583

steps:
1. ssh into instance and run yum install postgresql92-postgis
2. create an app: rhc app create foo jbossas-7 postgresql-9.2
3. ssh into app

[foo-111.dev.rhcloud.com 8be509b0f90611e294ed22000a9ab9d0]\> scl enable postgresql92 psql
psql (9.2.4)
Type "help" for help.

foo=# create extension postgis;
CREATE EXTENSION
foo=# create extension postgis_topology;
CREATE EXTENSION

move to verified