Bug 1323025

Summary: shp2pgsql does not work
Product: [Fedora] Fedora EPEL Reporter: Dave Johansen <davejohansen>
Component: postgisAssignee: Devrim Gündüz <devrim>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: admiller, danny.smit.0, devrim, dkelson, extras-qa, hhorak, jmlich83, jmlich, kms, p.kwarts, praiskup
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: postgis-2.0.7-2.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 997191 Environment:
Last Closed: 2018-06-11 11:07:53 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:
Bug Depends On: 997191    
Bug Blocks:    
Attachments:
Description Flags
Fix for shp2pgsql none

Description Dave Johansen 2016-04-01 03:08:04 UTC
+++ This bug was initially created as a clone of Bug #997191 +++

Description of problem:
For some reason upstream changed the loader/shp2pgsql to be the libtool script and landed the binary in loader/.libs/shp2pgsql and as a side effect it doesn't currently work in Fedora


Version-Release number of selected component (if applicable):
postgis-2.0.3-1.fc19.x86_64


How reproducible:
Every time


Steps to Reproduce:
1. yum install postgis
2. shp2pgsql

Actual results:
$ shp2pgsql
mkdir: cannot create directory ‘/usr/bin/.libs’: Permission denied
/usr/bin/shp2pgsql: line 202: cd: /builddir/build/BUILD/postgis-2.0.3/loader: No such file or directory
gcc: error: shpopen.o: No such file or directory
gcc: error: dbfopen.o: No such file or directory
gcc: error: getopt.o: No such file or directory
gcc: error: shpcommon.o: No such file or directory
gcc: error: safileio.o: No such file or directory
gcc: error: shp2pgsql-core.o: No such file or directory
gcc: error: shp2pgsql-cli.o: No such file or directory



Expected results:
$ shp2pgsql
RELEASE: 2.0.3 (r11128)
USAGE: shp2pgsql [<options>] <shapefile> [[<schema>.]<table>]
OPTIONS:
  -s [<from>:]<srid> Set the SRID field. Defaults to 0.
      Optionally reprojects from given SRID (cannot be used with -D).
 (-d|a|c|p) These are mutually exclusive options:
     -d  Drops the table, then recreates it and populates
         it with current shape file data.
     -a  Appends shape file into current table, must be
         exactly the same table schema.
     -c  Creates a new table and populates it, this is the
         default if you do not specify any options.
     -p  Prepare mode, only creates the table.
  -g <geocolumn> Specify the name of the geometry/geography column
      (mostly useful in append mode).
  -D  Use postgresql dump format (defaults to SQL insert statements).
  -e  Execute each statement individually, do not use a transaction.
      Not compatible with -D.
  -G  Use geography type (requires lon/lat data or -s to reproject).
  -k  Keep postgresql identifiers case.
  -i  Use int4 type for all integer dbf fields.
  -I  Create a spatial index on the geocolumn.
  -S  Generate simple geometries instead of MULTI geometries.
  -t <dimensionality> Force geometry to be one of '2D', '3DZ', '3DM', or '4D'
  -w  Output WKT instead of WKB.  Note that this can result in
      coordinate drift.
  -W <encoding> Specify the character encoding of Shape's
      attribute column. (default: "UTF-8")
  -N <policy> NULL geometries handling policy (insert*,skip,abort).
  -n  Only import DBF file.
  -T <tablespace> Specify the tablespace for the new table.
      Note that indexes will still use the default tablespace unless the
      -X flag is also used.
  -X <tablespace> Specify the tablespace for the table's indexes.
      This applies to the primary key, and the spatial index if
      the -I flag is used.
  -?  Display this help screen.

Comment 1 Dave Johansen 2016-04-01 03:09:05 UTC
Created attachment 1142449 [details]
Fix for shp2pgsql

Comment 2 Fedora Update System 2016-04-02 17:28:22 UTC
postgis-2.0.7-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-b6c229157e

Comment 3 Jozef Mlich 2016-04-02 17:29:21 UTC
Thanks for reminder and the patch.

Comment 4 Fedora Update System 2016-04-03 22:21:14 UTC
postgis-2.0.7-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-b6c229157e

Comment 5 Pavel Raiskup 2018-06-11 11:07:53 UTC
Seems like the fixed package has already been shipped, thanks Jozef/Dave.

Comment 6 Danny Smit 2019-04-17 10:35:38 UTC
I'm running into this issue again, it seems this patch never made it from testing to stable. Is there any reason for that? Can we add some karma to make it official?

Comment 7 Fedora Update System 2019-04-23 18:41:42 UTC
postgis-2.0.7-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.