tags 639470 + pending thanks Re: Martin Pitt 2011-08-27 <[email protected]> > Please rebuild this package against postgresql-server-dev-9.1 instead > of -8.4, or consider just using postgresql-server-dev-all.
Hi Robert, here's an NMU that uses pg_buildext to automatically build packages for all supported versions. I'll upload it to delayed/0. Btw, I'd also be willing to take over maintenance of this package under the pkg-postgresql umbrella. (Either completely or as a co-maintainer.) Christoph -- [email protected] | http://www.df7cb.de/
Control files: lines which differ (wdiff format)
------------------------------------------------
Build-Depends: debhelper (>= 5.0.0), [-postgresql-server-dev-8.4-] {+postgresql-server-dev-all (>= 122~)+}
Description: IPv4 and IPv4 range index types for PostgreSQL [-8.4-] {+9.1+}
Package: [-postgresql-8.4-ip4r-] {+postgresql-9.1-ip4r+}
Recommends: [-postgresql-8.4-] {+postgresql-9.1+}
diff -Nru ip4r-1.04/Makefile ip4r-1.05/Makefile
--- ip4r-1.04/Makefile 2011-10-08 13:40:22.000000000 +0200
+++ ip4r-1.05/Makefile 2011-10-08 13:40:22.000000000 +0200
@@ -1,11 +1,12 @@
MODULES = ip4r
DATA_built = ip4r.sql
-DOCS = README.ip4r
+#DOCS = README.ip4r
ifdef USE_PGXS
+PG_CONFIG = pg_config
PG_CPPFLAGS = -DIP4R_PGVER=$(shell echo $(VERSION) | awk -F. '{ print ($$1*1000+$$2)*1000+$$3 }')
-PGXS ?= $(shell pg_config --pgxs)
+PGXS = $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/ip4r
diff -Nru ip4r-1.04/README.ip4r ip4r-1.05/README.ip4r
--- ip4r-1.04/README.ip4r 2011-10-08 13:40:22.000000000 +0200
+++ ip4r-1.05/README.ip4r 2010-03-14 10:55:11.000000000 +0100
@@ -63,10 +63,33 @@
INSTALLATION
============
-In order to use the types in a given database, the ip4r.sql script must be
-run in that database, while connected as a database superuser. For example:
+On version 8.0 or later of PostgreSQL, ip4r can be installed via the
+pgxs mechanism. Unpack the distribution and do:
-psql -U postgres -f /usr/share/postgresql/8.4/contrib/ip4r.sql mydatabase
+make USE_PGXS=1
+make USE_PGXS=1 install
+
+(as with PostgreSQL itself, this requires GNU Make. The second command
+will usually need to be run as root.)
+
+On versions prior to 8.0, first unpack the PostgreSQL distribution
+itself, and run ./configure with the same parameters you used when
+installing PostgreSQL originally. If you installed from a binary
+package, you will have to discover what options the packager used.
+Then create a subdirectory contrib/ip4r and copy the contents of
+the ip4r distribution there, and run make install.
+
+Installing via either of the above methods creates the ip4r.so module,
+and installs an SQL script ip4r.sql in the usual place for contrib
+modules ($prefix/share/contrib by default,
+/usr/local/share/postgresql/contrib on FreeBSD, etc.). In order to use
+the types in a given database, the ip4r.sql script must be run in that
+database, while connected as a database superuser. For example:
+
+psql -U pgsql -f /usr/local/share/postgresql/contrib/ip4r.sql mydatabase
+
+(on systems other than FreeBSD, the username is usually "postgres"
+rather than "pgsql")
This installs the type and its support functions in the catalog of the
specified database. If you install it in template1, then newly-created
@@ -335,7 +358,7 @@
AUTHORS
=======
-this code by [email protected] Oct 2004 - Dec 2005
+this code by [email protected] Oct 2004 - Dec 2005
derived from 'ipr' by Steve Atkins <[email protected]> August 2003
derived from the 'seg' type distributed with PostgreSQL.
diff -Nru ip4r-1.04/debian/changelog ip4r-1.05/debian/changelog
--- ip4r-1.04/debian/changelog 2011-10-08 13:40:22.000000000 +0200
+++ ip4r-1.05/debian/changelog 2011-10-08 13:40:22.000000000 +0200
@@ -1,3 +1,12 @@
+ip4r (1.05-0.1) UNRELEASED; urgency=low
+
+ * Non-maintainer upload.
+ * New upstream version compatible with PG 9.0.
+ * Convert to use pg_buildext to build against PG 9.1;
+ closes: #605711, #639470.
+
+ -- Christoph Berg <[email protected]> Sat, 08 Oct 2011 00:10:01 +0200
+
ip4r (1.04-1) unstable; urgency=low
* New upstream release; closes: #537693.
diff -Nru ip4r-1.04/debian/control ip4r-1.05/debian/control
--- ip4r-1.04/debian/control 2011-10-08 13:40:22.000000000 +0200
+++ ip4r-1.05/debian/control 2011-10-08 13:40:22.000000000 +0200
@@ -2,15 +2,15 @@
Section: misc
Priority: extra
Maintainer: Robert S. Edmonds <[email protected]>
-Build-Depends: debhelper (>= 5.0.0), postgresql-server-dev-8.4
+Build-Depends: debhelper (>= 5.0.0), postgresql-server-dev-all (>= 122~)
Standards-Version: 3.8.3
Homepage: http://pgfoundry.org/projects/ip4r/
-Package: postgresql-8.4-ip4r
+Package: postgresql-9.1-ip4r
Architecture: any
Depends: ${shlibs:Depends}
-Recommends: postgresql-8.4
-Description: IPv4 and IPv4 range index types for PostgreSQL 8.4
+Recommends: postgresql-9.1
+Description: IPv4 and IPv4 range index types for PostgreSQL 9.1
This PostgreSQL module provides two data types, ip4 and ip4r, which can
contain a single IPv4 address or a range of IPv4 addresses,
respectively.
@@ -37,3 +37,4 @@
.
ip4 - a single IPv4 address
ip4r - an arbitrary range of IPv4 addresses
+
diff -Nru ip4r-1.04/debian/control.in ip4r-1.05/debian/control.in
--- ip4r-1.04/debian/control.in 1970-01-01 01:00:00.000000000 +0100
+++ ip4r-1.05/debian/control.in 2011-10-08 13:40:22.000000000 +0200
@@ -0,0 +1,39 @@
+Source: ip4r
+Section: misc
+Priority: extra
+Maintainer: Robert S. Edmonds <[email protected]>
+Build-Depends: debhelper (>= 5.0.0), postgresql-server-dev-all (>= 122~)
+Standards-Version: 3.8.3
+Homepage: http://pgfoundry.org/projects/ip4r/
+
+Package: postgresql-PGVERSION-ip4r
+Architecture: any
+Depends: ${shlibs:Depends}
+Recommends: postgresql-PGVERSION
+Description: IPv4 and IPv4 range index types for PostgreSQL PGVERSION
+ This PostgreSQL module provides two data types, ip4 and ip4r, which can
+ contain a single IPv4 address or a range of IPv4 addresses,
+ respectively.
+ .
+ While PostgreSQL already has built-in types 'inet' and 'cidr', the
+ authors of this module found that they had a number of requirements
+ that were not addressed by the built-in type.
+ .
+ Firstly and most importantly, the built-in types have no support for
+ index lookups of the form (column >>= parameter), i.e. where you have
+ a table of IP address ranges and wish to find which ones include a
+ given IP address. This requires an rtree or gist index to do
+ efficiently, and also requires a way to represent IP address ranges
+ that do not fall precisely on CIDR boundaries.
+ .
+ Secondly, the built-in inet/cidr are somewhat overloaded with
+ semantics, with inet combining two distinct concepts (a netblock, and
+ a specific IP within that netblock). Furthermore, they are variable
+ length types (to support IPv6) with non-trivial overheads, and the
+ authors (whose applications mainly deal in large volumes of single
+ IPv4 addresses) wanted a more lightweight representation.
+ .
+ ip4r therefore supports two distinct data types (so far):
+ .
+ ip4 - a single IPv4 address
+ ip4r - an arbitrary range of IPv4 addresses
diff -Nru ip4r-1.04/debian/pgversions ip4r-1.05/debian/pgversions
--- ip4r-1.04/debian/pgversions 1970-01-01 01:00:00.000000000 +0100
+++ ip4r-1.05/debian/pgversions 2011-10-08 13:40:22.000000000 +0200
@@ -0,0 +1,5 @@
+8.2
+8.3
+8.4
+9.0
+9.1
diff -Nru ip4r-1.04/debian/postgresql-8.4-ip4r.dirs ip4r-1.05/debian/postgresql-8.4-ip4r.dirs
--- ip4r-1.04/debian/postgresql-8.4-ip4r.dirs 2011-10-08 13:40:22.000000000 +0200
+++ ip4r-1.05/debian/postgresql-8.4-ip4r.dirs 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-usr/lib/postgresql/8.4/lib
-usr/share/postgresql/8.4/contrib
diff -Nru ip4r-1.04/debian/postgresql-8.4-ip4r.docs ip4r-1.05/debian/postgresql-8.4-ip4r.docs
--- ip4r-1.04/debian/postgresql-8.4-ip4r.docs 2011-10-08 13:40:22.000000000 +0200
+++ ip4r-1.05/debian/postgresql-8.4-ip4r.docs 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-README.ip4r
diff -Nru ip4r-1.04/debian/postgresql-8.4-ip4r.install ip4r-1.05/debian/postgresql-8.4-ip4r.install
--- ip4r-1.04/debian/postgresql-8.4-ip4r.install 2011-10-08 13:40:22.000000000 +0200
+++ ip4r-1.05/debian/postgresql-8.4-ip4r.install 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-ip4r.so usr/lib/postgresql/8.4/lib
-ip4r.sql usr/share/postgresql/8.4/contrib
diff -Nru ip4r-1.04/debian/rules ip4r-1.05/debian/rules
--- ip4r-1.04/debian/rules 2011-10-08 13:40:22.000000000 +0200
+++ ip4r-1.05/debian/rules 2011-10-08 13:40:22.000000000 +0200
@@ -1,20 +1,25 @@
#!/usr/bin/make -f
-CFLAGS = $(shell /usr/lib/postgresql/8.4/bin/pg_config --cflags)
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
-PGXS84 = $(shell /usr/lib/postgresql/8.4/bin/pg_config --pgxs)
+SRCDIR=$(CURDIR)
+include /usr/share/postgresql-common/pgxs_debian_control.mk
+clean: debian/control
+.PHONY: debian/control
+
+export USE_PGXS=1
build:
+ +pg_buildext build $(SRCDIR) build-%v "$(CFLAGS)"
clean:
dh_testdir
dh_testroot
- $(MAKE) clean USE_PGXS=1 PGXS="$(PGXS84)"
+ +pg_buildext clean $(SRCDIR) build-%v
dh_clean
install: build
@@ -22,15 +27,14 @@
dh_testroot
dh_clean -k
dh_installdirs
- $(MAKE) CFLAGS="$(CFLAGS)" USE_PGXS=1 PGXS="$(PGXS84)"
- dh_install -ppostgresql-8.4-ip4r
+ +pg_buildext install $(SRCDIR) build-%v postgresql-%v-ip4r
binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
- dh_installdocs
+ dh_installdocs --all README.ip4r
dh_link
dh_strip
dh_compress
diff -Nru ip4r-1.04/ip4r.c ip4r-1.05/ip4r.c
--- ip4r-1.04/ip4r.c 2009-06-29 17:17:54.000000000 +0200
+++ ip4r-1.05/ip4r.c 2010-03-14 10:55:11.000000000 +0100
@@ -1,10 +1,12 @@
-/* $Id: ip4r.c,v 1.9 2009/06/29 15:17:54 andrewsn Exp $ */
+/* $Id: ip4r.c,v 1.10 2010/03/14 09:55:11 andrewsn Exp $ */
/*
New type 'ip4' used to represent a single IPv4 address efficiently
New type 'ip4r' used to represent a range of IPv4 addresses, along
with support for GiST and rtree indexing of the type.
+ V1.05: updates for 9.0
+
V1.04: updates for 8.4
V1.03: fix the inet conversions which were not handling short varlenas
@@ -40,7 +42,7 @@
broken somehow; the resulting indexes are bloated with excessive
numbers of single-value leaf pages.
- this code by [email protected] Oct 2004 - Dec 2005
+ this code by [email protected] Oct 2004 - Dec 2005
[derived from 'ipr' by:
Steve Atkins <[email protected]> August 2003, derived from the 'seg'
@@ -395,10 +397,12 @@
/* PG version dependencies */
-#if !defined(IP4R_PGVER) || IP4R_PGVER >= 9000000 || IP4R_PGVER < 7003000
+#if !defined(IP4R_PGVER) || IP4R_PGVER < 7003000
#error "Unknown or unsupported postgresql version"
#endif
+/* 9.0 has no known changes from 8.4 that affect this code. */
+
/* 8.4 adds parameters to gist consistent() to support dynamic setting
* of the "recheck" flag, and defaults recheck to true (giving us some
* performance loss since we don't need recheck).
signature.asc
Description: Digital signature

