diff options
author | Chris Rees <crees@FreeBSD.org> | 2014-07-30 18:21:47 +0000 |
---|---|---|
committer | Chris Rees <crees@FreeBSD.org> | 2014-07-30 18:21:47 +0000 |
commit | 421b8a5f6eb19e46c05ad3aa2b47126dea7afea4 (patch) | |
tree | 82765e74dba0aec7a2d3f138c10c28b2f3adf994 /databases/postgresql91-server | |
parent | 89cdfc8da20209fe1a3b5aff32d6bb58341545a3 (diff) | |
download | ports-421b8a5f6eb19e46c05ad3aa2b47126dea7afea4.tar.gz ports-421b8a5f6eb19e46c05ad3aa2b47126dea7afea4.zip |
Notes
Diffstat (limited to 'databases/postgresql91-server')
-rw-r--r-- | databases/postgresql91-server/Makefile | 6 | ||||
-rw-r--r-- | databases/postgresql91-server/distinfo | 4 | ||||
-rw-r--r-- | databases/postgresql91-server/files/patch-contrib-uuid | 201 | ||||
-rw-r--r-- | databases/postgresql91-server/pkg-plist-server | 1 |
4 files changed, 101 insertions, 111 deletions
diff --git a/databases/postgresql91-server/Makefile b/databases/postgresql91-server/Makefile index 900877f7db59..2d53f5bb53dc 100644 --- a/databases/postgresql91-server/Makefile +++ b/databases/postgresql91-server/Makefile @@ -2,8 +2,8 @@ # $FreeBSD$ PORTNAME?= postgresql -DISTVERSION?= 9.1.13 -PORTREVISION?= 2 +DISTVERSION?= 9.1.14 +PORTREVISION?= 0 CATEGORIES?= databases MASTER_SITES= PGSQL MASTER_SITE_SUBDIR= source/v${DISTVERSION} @@ -29,7 +29,7 @@ UNIQUENAME?= ${PORTNAME}${DISTVERSION:R:S/.//}${PKGNAMESUFFIX} .endif PKGINSTALL?= ${PKGDIR}/pkg-install${COMPONENT} -USE_BZIP2= yes +USES+= tar:bzip2 .if !defined(NO_BUILD) USES+= gmake GNU_CONFIGURE= yes diff --git a/databases/postgresql91-server/distinfo b/databases/postgresql91-server/distinfo index 3ae1f933aa5f..01ffc8bfa81d 100644 --- a/databases/postgresql91-server/distinfo +++ b/databases/postgresql91-server/distinfo @@ -1,4 +1,4 @@ -SHA256 (postgresql/postgresql-9.1.13.tar.bz2) = 20f8aa5dfcb47688ca6b6c41340cac61712d9cf87c34d58b0a75bb2f85d89b7f -SIZE (postgresql/postgresql-9.1.13.tar.bz2) = 15652239 +SHA256 (postgresql/postgresql-9.1.14.tar.bz2) = d0647ce563d18ae02bf68c5dd646a4c75e8b45b3a4fada64d481371fdc16f522 +SIZE (postgresql/postgresql-9.1.14.tar.bz2) = 15666442 SHA256 (postgresql/pg-928-icu-2014-06-09.diff.gz) = 6f856ee0fd27118650f806fb674220d9851a0183ffa125e6fbe5468dfabeea5c SIZE (postgresql/pg-928-icu-2014-06-09.diff.gz) = 4449 diff --git a/databases/postgresql91-server/files/patch-contrib-uuid b/databases/postgresql91-server/files/patch-contrib-uuid index 0d4c7accbbc4..b8ff815e724f 100644 --- a/databases/postgresql91-server/files/patch-contrib-uuid +++ b/databases/postgresql91-server/files/patch-contrib-uuid @@ -1,5 +1,15 @@ ---- contrib/uuid-ossp/Makefile.orig 2014-03-17 20:36:46.000000000 +0100 -+++ contrib/uuid-ossp/Makefile 2014-03-19 21:19:28.000000000 +0100 +--- contrib/Makefile.orig 2014-07-21 20:14:13.000000000 +0100 ++++ contrib/Makefile 2014-07-30 18:07:16.305934690 +0100 +@@ -48,6 +48,7 @@ + test_parser \ + tsearch2 \ + unaccent \ ++ uuid-ossp \ + vacuumlo + + ifeq ($(with_openssl),yes) +--- contrib/uuid-ossp/Makefile.orig 2014-07-21 20:14:13.000000000 +0100 ++++ contrib/uuid-ossp/Makefile 2014-07-30 18:07:06.646935377 +0100 @@ -1,12 +1,14 @@ # contrib/uuid-ossp/Makefile +# modified using http://pgfoundry.org/projects/uuid-freebsd/ @@ -17,23 +27,8 @@ ifdef USE_PGXS PG_CONFIG = pg_config ---- contrib/uuid-ossp/uuid-ossp--1.0.sql.orig 2014-03-17 20:36:46.000000000 +0100 -+++ contrib/uuid-ossp/uuid-ossp--1.0.sql 2014-03-19 21:19:28.000000000 +0100 -@@ -1,5 +1,12 @@ - /* contrib/uuid-ossp/uuid-ossp--1.0.sql */ - -+-- this module is modified by girgen@ for FreeBSD using -+-- http://pgfoundry.org/projects/uuid-freebsd/ -+-- based on the work of Andrew Gierth. -+-- The name is still uuid-ossp to maintain verbatim compatibility -+-- with the original ossp based module, although the built-in libc -+-- routines are actually used instead, not ossp. -+ - -- complain if script is sourced in psql, rather than via CREATE EXTENSION - \echo Use '''CREATE EXTENSION "uuid-ossp"''' to load this file. \quit - ---- contrib/uuid-ossp/uuid-ossp.c.orig 2014-03-17 20:36:46.000000000 +0100 -+++ contrib/uuid-ossp/uuid-ossp.c 2014-03-19 21:20:56.000000000 +0100 +--- contrib/uuid-ossp/uuid-ossp.c.orig 2014-07-21 20:14:13.000000000 +0100 ++++ contrib/uuid-ossp/uuid-ossp.c 2014-07-30 18:07:00.309934687 +0100 @@ -6,6 +6,10 @@ * * contrib/uuid-ossp/uuid-ossp.c @@ -80,7 +75,7 @@ PG_MODULE_MAGIC; -@@ -64,163 +55,175 @@ +@@ -64,177 +55,175 @@ PG_FUNCTION_INFO_V1(uuid_generate_v4); PG_FUNCTION_INFO_V1(uuid_generate_v5); @@ -103,41 +98,45 @@ + * that pg's internal storage of uuids is the simple byte-oriented + * binary format. */ --static char * --uuid_to_string(const uuid_t *uuid) --{ -- char *buf = palloc(UUID_LEN_STR + 1); -- void *ptr = buf; -- size_t len = UUID_LEN_STR + 1; -- uuid_rc_t rc; -- -- rc = uuid_export(uuid, UUID_FMT_STR, &ptr, &len); -- if (rc != UUID_RC_OK) -- pguuid_complain(rc); -- -- return buf; --} -- -- --static void --string_to_uuid(const char *str, uuid_t *uuid) +-/* +- * We create a uuid_t object just once per session and re-use it for all +- * operations in this module. OSSP UUID caches the system MAC address and +- * other state in this object. Reusing the object has a number of benefits: +- * saving the cycles needed to fetch the system MAC address over and over, +- * reducing the amount of entropy we draw from /dev/urandom, and providing a +- * positive guarantee that successive generated V1-style UUIDs don't collide. +- * (On a machine fast enough to generate multiple UUIDs per microsecond, +- * or whatever the system's wall-clock resolution is, we'd otherwise risk +- * collisions whenever random initialization of the uuid_t's clock sequence +- * value chanced to produce duplicates.) +- * +- * However: when we're doing V3 or V5 UUID creation, uuid_make needs two +- * uuid_t objects, one holding the namespace UUID and one for the result. +- * It's unspecified whether it's safe to use the same uuid_t for both cases, +- * so let's cache a second uuid_t for use as the namespace holder object. +- */ +-static uuid_t * +-get_cached_uuid_t(int which) +static Datum +internal_uuid_create(int v, unsigned char *ns, char *ptr, int len) { -- uuid_rc_t rc; -- -- rc = uuid_import(uuid, UUID_FMT_STR, str, UUID_LEN_STR + 1); -- if (rc != UUID_RC_OK) -- pguuid_complain(rc); --} +- static uuid_t *cached_uuid[2] = {NULL, NULL}; + char strbuf[40]; +- if (cached_uuid[which] == NULL) + switch (v) -+ { + { +- uuid_rc_t rc; + case 0: /* constant-value uuids: nil, or namespace uuids */ + strlcpy(strbuf, ptr, 37); + break; -+ + +- rc = uuid_create(&cached_uuid[which]); +- if (rc != UUID_RC_OK) +- { +- cached_uuid[which] = NULL; +- pguuid_complain(rc); +- } + case 4: default: /* random uuid */ + { + sprintf(strbuf, "%08lx-%04x-%04x-%04x-%04x%08lx", @@ -148,23 +147,37 @@ + (unsigned) (arc4random() & 0xffff), + (unsigned long) arc4random()); + break; -+ } + } +- return cached_uuid[which]; +-} + + case 1: /* time/node-based uuids */ + { + uuid_t uu; + uint32_t status = uuid_s_ok; + char *str = NULL; -+ + +-static char * +-uuid_to_string(const uuid_t *uuid) +-{ +- char *buf = palloc(UUID_LEN_STR + 1); +- void *ptr = buf; +- size_t len = UUID_LEN_STR + 1; +- uuid_rc_t rc; + uuid_create(&uu, &status); -+ + +- rc = uuid_export(uuid, UUID_FMT_STR, &ptr, &len); +- if (rc != UUID_RC_OK) +- pguuid_complain(rc); + if (status == uuid_s_ok) + { + uuid_to_string(&uu, &str, &status); + if (status == uuid_s_ok) + { + strlcpy(strbuf, str, 37); -+ + +- return buf; +-} + /* PTR, if set, replaces the trailing characters of the uuid; + * this is to support v1mc, where a random multicast MAC is + * used instead of the physical one @@ -177,23 +190,6 @@ + free(str); + } --static Datum --special_uuid_value(const char *name) --{ -- uuid_t *uuid; -- char *str; -- uuid_rc_t rc; -- -- rc = uuid_create(&uuid); -- if (rc != UUID_RC_OK) -- pguuid_complain(rc); -- rc = uuid_load(uuid, name); -- if (rc != UUID_RC_OK) -- pguuid_complain(rc); -- str = uuid_to_string(uuid); -- rc = uuid_destroy(uuid); -- if (rc != UUID_RC_OK) -- pguuid_complain(rc); + if (status != uuid_s_ok) + { + ereport(ERROR, @@ -203,7 +199,11 @@ + + break; + } -+ + +-static void +-string_to_uuid(const char *str, uuid_t *uuid) +-{ +- uuid_rc_t rc; + case 3: /* namespace-based MD5 uuids */ + { + /* we could use pg's md5(), but we're already pulling in libmd */ @@ -223,7 +223,11 @@ + buf[4], buf[5], ((buf[6] & 0xf) | 0x30), buf[7], + ((buf[8] & 0x3F) | 0x80), buf[9], buf[10], buf[11], + buf[12], buf[13], buf[14], buf[15]); -+ + +- rc = uuid_import(uuid, UUID_FMT_STR, str, UUID_LEN_STR + 1); +- if (rc != UUID_RC_OK) +- pguuid_complain(rc); +-} + break; + } + @@ -231,7 +235,7 @@ + { + SHA_CTX ctx; + unsigned char buf[20]; -+ + + SHA1_Init(&ctx); + SHA1_Update(&ctx, ns, 16); + SHA1_Update(&ctx, (unsigned char *)ptr, len); @@ -245,7 +249,18 @@ + buf[4], buf[5], ((buf[6] & 0xf) | 0x30), buf[7], + ((buf[8] & 0x3F) | 0x80), buf[9], buf[10], buf[11], + buf[12], buf[13], buf[14], buf[15]); -+ + +-static Datum +-special_uuid_value(const char *name) +-{ +- uuid_t *uuid = get_cached_uuid_t(0); +- char *str; +- uuid_rc_t rc; +- +- rc = uuid_load(uuid, name); +- if (rc != UUID_RC_OK) +- pguuid_complain(rc); +- str = uuid_to_string(uuid); + break; + } + } @@ -297,20 +312,14 @@ -static Datum -uuid_generate_internal(int mode, const uuid_t *ns, const char *name) -{ -- uuid_t *uuid; +- uuid_t *uuid = get_cached_uuid_t(0); - char *str; - uuid_rc_t rc; - -- rc = uuid_create(&uuid); -- if (rc != UUID_RC_OK) -- pguuid_complain(rc); - rc = uuid_make(uuid, mode, ns, name); - if (rc != UUID_RC_OK) - pguuid_complain(rc); - str = uuid_to_string(uuid); -- rc = uuid_destroy(uuid); -- if (rc != UUID_RC_OK) -- pguuid_complain(rc); - - return DirectFunctionCall1(uuid_in, CStringGetDatum(str)); + return internal_uuid_create(0, NULL, "6ba7b814-9dad-11d1-80b4-00c04fd430c8", 36); @@ -335,26 +344,16 @@ -static Datum -uuid_generate_v35_internal(int mode, pg_uuid_t *ns, text *name) -{ -- uuid_t *ns_uuid; -- Datum result; -- uuid_rc_t rc; +- uuid_t *ns_uuid = get_cached_uuid_t(1); - -- rc = uuid_create(&ns_uuid); -- if (rc != UUID_RC_OK) -- pguuid_complain(rc); -- string_to_uuid(DatumGetCString(DirectFunctionCall1(uuid_out, UUIDPGetDatum(ns))), +- string_to_uuid(DatumGetCString(DirectFunctionCall1(uuid_out, +- UUIDPGetDatum(ns))), - ns_uuid); -- -- result = uuid_generate_internal(mode, -- ns_uuid, -- text_to_cstring(name)); -- -- rc = uuid_destroy(ns_uuid); -- if (rc != UUID_RC_OK) -- pguuid_complain(rc); + char buf[20]; -- return result; +- return uuid_generate_internal(mode, +- ns_uuid, +- text_to_cstring(name)); + sprintf(buf, "-%04x-%04x%08lx", + (unsigned)((arc4random() & 0x3FFF) | 0x8000), + /* set IEEE802 multicast and local-admin bits */ @@ -365,7 +364,7 @@ } -@@ -230,14 +233,15 @@ +@@ -244,14 +233,15 @@ pg_uuid_t *ns = PG_GETARG_UUID_P(0); text *name = PG_GETARG_TEXT_P(1); @@ -383,7 +382,7 @@ } -@@ -247,5 +251,6 @@ +@@ -261,5 +251,6 @@ pg_uuid_t *ns = PG_GETARG_UUID_P(0); text *name = PG_GETARG_TEXT_P(1); @@ -391,13 +390,3 @@ + return internal_uuid_create(5, (unsigned char *)ns, + VARDATA(name), VARSIZE(name) - VARHDRSZ); } ---- contrib/Makefile.orig 2014-03-21 09:05:11.000000000 +0100 -+++ contrib/Makefile 2014-03-21 09:05:29.000000000 +0100 -@@ -48,6 +48,7 @@ - test_parser \ - tsearch2 \ - unaccent \ -+ uuid-ossp \ - vacuumlo - - ifeq ($(with_openssl),yes) diff --git a/databases/postgresql91-server/pkg-plist-server b/databases/postgresql91-server/pkg-plist-server index 2c7bd46d7fb8..1dd1a94ce489 100644 --- a/databases/postgresql91-server/pkg-plist-server +++ b/databases/postgresql91-server/pkg-plist-server @@ -372,6 +372,7 @@ share/postgresql/snowball_create.sql %%TZDATA%%share/postgresql/timezone/Antarctica/Rothera %%TZDATA%%share/postgresql/timezone/Antarctica/South_Pole %%TZDATA%%share/postgresql/timezone/Antarctica/Syowa +%%TZDATA%%share/postgresql/timezone/Antarctica/Troll %%TZDATA%%share/postgresql/timezone/Antarctica/Vostok %%TZDATA%%share/postgresql/timezone/Arctic/Longyearbyen %%TZDATA%%share/postgresql/timezone/Asia/Aden |