[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#688495: unblock: osm2pgsql/0.80.0+r27899-3



On Sun, 23 Sep 2012 18:07:58 +0100, Adam D. Barratt wrote:

> On Sun, 2012-09-23 at 18:43 +0200, David Paleino wrote:
> > Should I upload a new version with a notice about the database migration?
> 
> If there's not a sane way to avoid users having to fix things up, yes
> please.

There you go, -4 uploaded to sid, diff attached.

Thanks!
David

-- 
 . ''`.   Debian developer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://deb.li/dapal
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
diff --git a/debian/NEWS.Debian b/debian/NEWS.Debian
new file mode 100644
index 0000000..9d87413
--- /dev/null
+++ b/debian/NEWS.Debian
@@ -0,0 +1,20 @@
+osm2pgsql (0.80.0+r27899-4) unstable; urgency=low
+
+  Since version 0.80.0+r27899-3, osm2pgsql supports 64-bit OSM IDs. This
+  means that the column "osm_id" in created tables changed its type from
+  INTEGER (int4) to BIGINT (int8). This change will allow storing new
+  OSM objects, as the OSM database gets larger.
+
+  Databases created before this version should be migrated. Remember to do
+  a BACKUP before attempting anything.
+
+  You can either recreate the database from scratch using osm2pgsql, or
+  issue the following SQL statement on each table containing a osm_id
+  column:
+
+    ALTER TABLE <table> COLUMN osm_id TYPE bigint;
+
+  Remember to make PROPER BACKUPS before attempting any such operation on
+  your database.
+
+ -- David Paleino <dapal@debian.org>  Sun, 23 Sep 2012 21:52:38 +0200
diff --git a/debian/changelog b/debian/changelog
index 13a19fd..87b5e30 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,17 @@
+osm2pgsql (0.80.0+r27899-4) unstable; urgency=low
+
+  * Added debian/NEWS.Debian explaining what changes from the 32-bit
+    version.
+
+ -- David Paleino <dapal@debian.org>  Sun, 23 Sep 2012 21:57:34 +0200
+
+osm2pgsql (0.80.0+r27899-3) unstable; urgency=low
+
+  * Update Recommends of postgresql-8.4-postgis to -9.1
+  * Backport support for 64-bit IDs (Closes: #687965)
+
+ -- David Paleino <dapal@debian.org>  Sun, 23 Sep 2012 09:14:15 +0200
+
 osm2pgsql (0.80.0+r27899-1) unstable; urgency=low
 
   * New SVN snapshot
diff --git a/debian/control b/debian/control
index e616531..21e9d9f 100644
--- a/debian/control
+++ b/debian/control
@@ -31,7 +31,7 @@ Depends:
  , ${misc:Depends}
 Recommends:
  postgis
- , postgresql-8.4-postgis
+ , postgresql-9.1-postgis
 Suggests:
  josm
  , gosmore 
diff --git a/debian/patches/02-backport_64bit_ids_support.patch b/debian/patches/02-backport_64bit_ids_support.patch
new file mode 100644
index 0000000..e135d06
--- /dev/null
+++ b/debian/patches/02-backport_64bit_ids_support.patch
@@ -0,0 +1,43 @@
+From: David Paleino <dapal@debian.org>
+Subject: backport support for 64-bit IDs
+Forwarded: not-needed
+Origin: vendor
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=687965
+
+---
+ osmtypes.h         |    3 +--
+ output-gazetteer.c |    4 ++--
+ 2 files changed, 3 insertions(+), 4 deletions(-)
+
+--- osm2pgsql.orig/osmtypes.h
++++ osm2pgsql/osmtypes.h
+@@ -6,8 +6,7 @@
+ #include <inttypes.h>
+ #include <time.h>
+ 
+-// uncomment the following to build a version that supports 64bit IDs.
+-// #define OSMID64
++#define OSMID64
+ 
+ #ifdef OSMID64
+ typedef int64_t osmid_t;
+--- osm2pgsql.orig/output-gazetteer.c
++++ osm2pgsql/output-gazetteer.c
+@@ -32,7 +32,7 @@
+    "CREATE TABLE place ("                       \
+    "  place_id BIGINT,"                         \
+    "  osm_type CHAR(1) NOT NULL,"               \
+-   "  osm_id BIGINT NOT NULL,"                  \
++   "  osm_id " POSTGRES_OSMID_TYPE " NOT NULL," \
+    "  class TEXT NOT NULL,"                     \
+    "  type TEXT NOT NULL,"                      \
+    "  name keyvalue[],"                         \
+@@ -51,7 +51,7 @@
+ #define V2_CREATE_PLACE_TABLE                   \
+    "CREATE TABLE place ("                       \
+    "  osm_type CHAR(1) NOT NULL,"               \
+-   "  osm_id BIGINT NOT NULL,"                  \
++   "  osm_id " POSTGRES_OSMID_TYPE " NOT NULL," \
+    "  class TEXT NOT NULL,"                     \
+    "  type TEXT NOT NULL,"                      \
+    "  name HSTORE,"                             \
diff --git a/debian/patches/series b/debian/patches/series
index dde124e..be78265 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 00-fix_build.patch
 01-disable_gazetteer.patch
+02-backport_64bit_ids_support.patch

Attachment: signature.asc
Description: PGP signature


Reply to: