[postgis] 01/01: Update README.Debian, add a Recommends

Markus Wanner markus_wanner-guest at moszumanska.debian.org
Wed Jan 29 12:02:11 UTC 2014


This is an automated email from the git hooks/post-receive script.

markus_wanner-guest pushed a commit to branch master
in repository postgis.

commit 5d143d2e04b327ddb448a1faa66eef71c1321380
Author: Markus Wanner <markus at bluegap.ch>
Date:   Tue Jan 28 23:01:32 2014 +0100

    Update README.Debian, add a Recommends
    
    * Recommend postgresql-contrib-M.N for the fuzzystrmatch
      extension, which postgis_tiger_decoder depends on.
    * Update README.Debian, as hinted in #724626.
---
 debian/README.Debian | 266 +++++++++++----------------------------------------
 debian/changelog     |   8 ++
 debian/control       |   2 +-
 debian/control.in    |   2 +-
 4 files changed, 66 insertions(+), 212 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
index 6019619..59f7100 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -1,180 +1,54 @@
 Debian README for Postgis
 =========================
 
-These are the PostGIS packages for Debian. PostGIS is split into three
-Debian packages:
-
-postgresql-N.M-postgis
-  This is the PostGIS module for the PostgreSQL server itself.  It contains
-  the library which is loaded by the server (postgis.so), the SQL script
-  for creating the SQL functions in a given database (postgis.sql), and an 
-  SQL script which contains the OpenGIS Spatial References 
-  (spatial_ref_sys.sql).
-
-    DIR=/usr/share/postgresql/*/contrib/postgis-*
-  	psql -d [yourdatabase] -f $DIR/postgis.sql
-  	psql -d [yourdatabase] -f $DIR/spatial_ref_sys.sql
-
-  NOTE: To install PostGIS you must run the postgis.sql script in each
-  PostgreSQL database you want PostGIS in as the PostgreSQL superuser
-  (generally the 'postgres' user)!  The Debian utilities do not do
-  this automatically as they can't be sure what state your database is in,
-  what database(s) you would want PostGIS installed in, or how to 
-  authenticate as the PostgreSQL superuser to your database.  It is likely
-  that a PostGIS user would also want the Spatial References installed and
-  so it is recommended that the spatial_ref_sys.sql also be run in each
-  database you have PostGIS installed in.
-
-  If you wish to add comments to the PostGIS functions, the final step is 
-  to load the postgis_comments.sql into your spatial database. The comments 
-  can be viewed by simply typing \dd [function_name] from a psql terminal window.
-
-  	psql -d [yourdatabase] -f postgis_comments.sql 
-
-  These scripts can be found in the /usr/share/postgresql/N.M/contrib/postgisX.Y
-  directory.
+These are the PostGIS packages for Debian. PostGIS is split into
+multiple Debian packages:
 
-postgis
-  This package contains the user-oriented PostGIS utilities for loading
-  data into and pulling data out of a PostGIS-enabled PostgreSQL database.
-  These utilities are: pgsql2shp and shp2pgsql.  These utilities can be
-  installed and used separately from the server module on client machines.
-
-libpostgis-java
-  This package contains the Java library for using JDBC with a PostGIS-
-  enabled PostgreSQL server.
-
-[
- Note that the Postgis extension could be provided also for another
- version of PostgreSQL (e.g. 8.3). All information are also valid
- in that case.
-]
-
-How to create a Postgis-enabled database
-========================================
-
-Type as root:
-
-  # Become a postgresql superuser
-  su - postgres
-
-  # Create the user (allowed to log in and with password)
-  createuser <username> -l -W
-
-  # Shall the new role be a superuser? (y/n) n
-  # Shall the new role be allowed to create databases? (y/n) n
-  # Shall the new role be allowed to create more new roles? (y/n) n
-  # Password: <type the user password>
-
-  # create database ownered by user
-  createdb <databasename> --o <username>
-
-  # Need to enable plpgsql for the database before loading the functions
-  createlang plpgsql -d <databasename>
-
-  # Finally, load the functions and reference system tables
-  psql <databasename> -f /usr/share/postgresql/*/contrib/postgis-*/postgis.sql
-  psql <databasename> -f /usr/share/postgresql/*/contrib/postgis-*/spatial_ref_sys.sql
-
-
-  # login in new database (still as superuser postgres)
-  psql <databasename>
-
-  # grant privilege on standard ogc tables to user
-  grant all on geometry_columns to <username>;
-  grant select on spatial_ref_sys to <username>;
-
-  # exit from postgres
-  \q
-
-  # log out from unix user postgres and from root. As normal user, enter
-  # in your new db:
-  psql -h <host> -U <username> -d <databasename>
-
-  # you are in your new geodb
-  # have a look of tables
-  \dt
-
-  # have a look of functions
-  \df
-
-  # have a look of spatial_ref_sys
-  select * from spatial_ref_sys;
+postgresql-N.M-postgis-X.Y
+  This is the PostGIS module for the PostgreSQL server itself.  It
+  contains the library which is loaded by the server (postgis.so), as
+  of PostGIS version X.Y and for PostgreSQL version N.M.
 
+  Once the extension is created for a database, this package usually
+  is enough to keep PostGIS running.  An upgrade may provide a newer
+  PostGIS version of this package that can be installed in parallel.
+  Therefore not touching existing installations.  You'll need to run
+  the appropriate SQL scripts to upgrade your databases to use a newer
+  PostGIS version, though.  Of course, this does not apply to patch
+  releases or bug fixes.
 
 
-How to create a Postgis-enabled template database
-=================================================
+postgresql-N.M-postgis-scripts
+  This package provides necessary scripts for creating or upgrading
+  the PostGIS extension in a given database, the extension's control
+  file, and various other SQL scripts.
 
-If you want to create a template_gis to use as template for every new
-geodatabase, type as root:
+  To install the PostGIS extension as well as its topology extension
+  in a specific database, you need to run the following SQL commands
+  from your database prompt:
 
-  # Become a postgresql superuser
-  su - postgres
+    CREATE EXTENSION postgis;
+    CREATE EXTENSION postgis_topology;        -- optional
 
-  # create database (owner:postgres)
-  createdb template_gis
+  PostGIS also ships a decoder for TIGER data in a separate extension
+  that can additionally be installed as follows:
 
-  # Need to enable plpgsql for the database beforeloading the functions
-  createlang plpgsql -d template_gis
+    CREATE EXTENSION fuzzystrmatch;
+    CREATE EXTENSION postgis_tiger_decoder;
 
-  # Finally, load the functions and reference system tables
-  psql template_gis -f /usr/share/postgresql/*/contrib/postgis-*/postgis.sql
-  psql template_gis -f /usr/share/postgresql/*/contrib/postgis-*/spatial_ref_sys.sql
 
-  # login in new database (still as superuser postgres)
-  psql template_gis
-
-  # transform new db in template
-  update pg_database SET datistemplate='true' where datname='template_gis';
-
-  # exit from postgres
-  \q
-
-
-How to create a Postgis-enabled database using the template
-===========================================================
-
-Type as root:
-
-  # Become a postgresql superuser (or another superuser if there is)
-  su - postgres
-
-  # Create the user  (allowed to log in and with password, wich must 
-  # beo wner of new db) skip if you still have your user
-  createuser <username> -l -W
-
-  # Shall the new role be a superuser? (y/n) n
-  # Shall the new role be allowed to create databases? (y/n) n
-  # Shall the new role be allowed to create more new roles? (y/n) n
-  # Password: <type the user password>
-
-  # create database (from template_gis) ownered by user
-  createdb <databasename> --o <username> - T template_gis
-
-  # login in new database (still as superuser postgres)
-  psql <databasename>
-
-  # grant privilege on standard ogc tables to user
-  grant all on geometry_columns to <username>;
-  grant select on spatial_ref_sys to <username>;
-
-  # exit from postgres
-  \q
-
-  # log out from unix user postgres and from root. As normal user, enter
-  # in your new db:
-  psql -h <host> -U <username> -d <databasename>
-
-  # you are in your new geodb
-  # have a look of tables
-  \dt
+postgis
+  This package contains the user-oriented PostGIS utilities for
+  loading data into and pulling data out of a PostGIS-enabled
+  PostgreSQL database.  These utilities are: pgsql2shp, shp2pgsql,
+  shp2pgsql-gui, and raster2pgsql.  This package can be installed
+  independent of the extension and can well be used on client
+  machines.
 
-  # have a look of functions
-  \df
 
-  # have a look of spatial_ref_sys
-  select * from spatial_ref_sys;
+libpostgis-java
+  This package contains the Java library for using JDBC with a PostGIS-
+  enabled PostgreSQL database.
 
 
 Upgrading existing spatial databases
@@ -192,58 +66,30 @@ releases, and an HARD UPGRADE procedure for major releases.
 
 --- SOFT UPGRADE ---
 
-Soft upgrade consists of sourcing the postgis_upgrade.sql
-script in your spatial database:
+Nowadays, soft upgrades are trivially handled by the Postgres
+extension mechanism.  For the manual procedure for Postgres versions
+before 9.1, please refer to the PostGIS documentation.  Using
+extensions, you simply need to run the following commands per database
+to upgrade to a new version of the extensions:
 
-  psql -f postgis_upgrade.sql -d your_spatial_database
+  ALTER EXTENSION postgis UPDATE TO "2.2.2";
+  ALTER EXTENSION postgis_topology UPDATE TO "2.2.2";
 
-If a soft upgrade is not possible the script will abort and 
-you will be warned about HARD UPGRADE being required,
-so do not hesitate to try a soft upgrade first.
+If a soft upgrade is not possible the SQL command should emit an error
+and you need to perform a HARD UPGRADE, instead.
 
 --- HARD UPGRADE ---
 
-Hard upgrade is a PostgreSQL dump/restore procedure combined 
-with a filter to selectively update PostGIS functions and 
-objects to point to a new library version.
-
 Hard upgrades are required when object definitions have changed,
 aggregates have changed or been added, and when the underlying
-PostgreSQL database itself has undergone a major update.
-
-For this purpose, PostGIS provides a utility script to restore a dump
-in "custom" format. The hard upgrade procedure is as follows:
-
-	# Create a "custom-format" dump of the database you want
-	# to upgrade (let's call it "olddb")
-	$ pg_dump -Fc olddb olddb.dump
-
-	# Restore the dump while upgrading postgis into
-	# a new database. 
-        # Note: The new database does NOT have to exist.
-	# Let's call it "newdb"
-	$ sh utils/postgis_restore.pl postgis.sql newdb olddb.dump > restore.log
-
-	# Check that all restored dump objects really had to be 
-    # restored from dump and do not conflict with the 
-    # ones defined in postgis.sql
-	$ grep ^KEEPING restore.log | less
-
-	# If upgrading from PostgreSQL < 8.0 to >= 8.0 you will want to 
-	# drop the attrelid, varattnum and stats columns in the geometry_columns
-	# table, which are no-more needed. Keeping them won't hurt.
-	# !!! DROPPING THEM WHEN REALLY NEEDED WILL DO HARM !!!!
-	$ psql newdb -c "ALTER TABLE geometry_columns DROP attrelid"
-	$ psql newdb -c "ALTER TABLE geometry_columns DROP varattnum"
-	$ psql newdb -c "ALTER TABLE geometry_columns DROP stats"
-
-	# The spatial_ref_sys table is restored from the dump, to 
-        # ensure your custom additions are kept, but the distributed 
-        # one might contain modification so you should backup your 
-        # entries, drop the table and source the new one.
-	# If you did make additions we assume you know how to backup them before
-	# upgrading the table. Replace it with the new like this:
-	$ psql newdb
-	newdb=> DELETE FROM spatial_ref_sys;
-	DROP
-	newdb=> \i spatial_ref_sys.sql
+PostgreSQL database itself has undergone a major update.  The
+procedure basically consists of a PostgreSQL dump/restore, but the
+extension needs a bit of extra care, depending on what PostGIS version
+you are upgrading from.  Please refer to the PostGIS documentation.
+
+All of the required SQL files mentioned in the documentation should be
+provided by the postgresql-M.N-postgis-scripts package and can be
+found in the following directory after its installation (replace M.N
+with the appropriate Postgres version used):
+
+  /usr/share/postgresql/M.N
diff --git a/debian/changelog b/debian/changelog
index 89eedca..b63651b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+postgis (2.1.1-6) UNRELEASED; urgency=low
+
+  * Recommend postgresql-contrib-M.N for the fuzzystrmatch
+    extension, which postgis_tiger_decoder depends on.
+  * Update README.Debian, as hinted in #724626.
+
+ -- Markus Wanner <markus at bluegap.ch>  Tue, 28 Jan 2014 22:32:14 +0100
+
 postgis (2.1.1-5) unstable; urgency=low
 
   * Use dh-autoreconf for up-to-date config.guess and config.sub.
diff --git a/debian/control b/debian/control
index 3d03e5d..f88eb90 100644
--- a/debian/control
+++ b/debian/control
@@ -105,7 +105,7 @@ Package: postgresql-9.3-postgis-2.1
 Depends: ${shlibs:Depends}, postgresql-9.3,
  postgresql-9.3-postgis-scripts, liblwgeom-2.1.1,
  ${misc:Depends}
-Recommends: postgis
+Recommends: postgis, postgresql-contrib-9.3
 Breaks: postgis (<< 1.2.1)
 Architecture: any
 Description: Geographic objects support for PostgreSQL 9.3
diff --git a/debian/control.in b/debian/control.in
index f4c1fb1..f761670 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -105,7 +105,7 @@ Package: postgresql-PGVERSION-postgis-2.1
 Depends: ${shlibs:Depends}, postgresql-PGVERSION,
  postgresql-PGVERSION-postgis-scripts, liblwgeom-2.1.1,
  ${misc:Depends}
-Recommends: postgis
+Recommends: postgis, postgresql-contrib-PGVERSION
 Breaks: postgis (<< 1.2.1)
 Architecture: any
 Description: Geographic objects support for PostgreSQL PGVERSION

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/postgis.git



More information about the Pkg-grass-devel mailing list