Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jul 2014 18:21:47 +0000 (UTC)
From:      Chris Rees <crees@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r363500 - in head/databases: postgresql84-server postgresql84-server/files postgresql90-server postgresql90-server/files postgresql91-server postgresql91-server/files postgresql92-serve...
Message-ID:  <201407301821.s6UILlsu062077@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: crees
Date: Wed Jul 30 18:21:47 2014
New Revision: 363500
URL: http://svnweb.freebsd.org/changeset/ports/363500
QAT: https://qat.redports.org/buildarchive/r363500/

Log:
  Update to the latest snapshots.
  
  uuid-ossp patch has been outdated with irrelevant changes (for us),
  so massage back in.
  
  In head of postgresql, this is handled properly, so eventually the ossp patches
  can go.

Modified:
  head/databases/postgresql84-server/Makefile
  head/databases/postgresql84-server/distinfo
  head/databases/postgresql84-server/files/patch-contrib-uuid
  head/databases/postgresql84-server/pkg-plist-server
  head/databases/postgresql90-server/Makefile
  head/databases/postgresql90-server/distinfo
  head/databases/postgresql90-server/files/patch-contrib-uuid
  head/databases/postgresql90-server/pkg-plist-server
  head/databases/postgresql91-server/Makefile
  head/databases/postgresql91-server/distinfo
  head/databases/postgresql91-server/files/patch-contrib-uuid
  head/databases/postgresql91-server/pkg-plist-server
  head/databases/postgresql92-server/Makefile
  head/databases/postgresql92-server/distinfo
  head/databases/postgresql92-server/files/patch-contrib-uuid
  head/databases/postgresql92-server/pkg-plist-server
  head/databases/postgresql93-server/Makefile
  head/databases/postgresql93-server/distinfo
  head/databases/postgresql93-server/files/patch-contrib-uuid
  head/databases/postgresql93-server/pkg-plist-server

Modified: head/databases/postgresql84-server/Makefile
==============================================================================
--- head/databases/postgresql84-server/Makefile	Wed Jul 30 18:09:39 2014	(r363499)
+++ head/databases/postgresql84-server/Makefile	Wed Jul 30 18:21:47 2014	(r363500)
@@ -2,8 +2,8 @@
 # $FreeBSD$
 
 PORTNAME?=	postgresql
-DISTVERSION?=	8.4.21
-PORTREVISION?=	2
+DISTVERSION?=	8.4.22
+PORTREVISION?=	0
 CATEGORIES?=	databases
 MASTER_SITES=	PGSQL
 MASTER_SITE_SUBDIR=	source/v${DISTVERSION}
@@ -25,7 +25,7 @@ ICU_PATCHFILE?=	pg-8421-icu-2014-06-09.d
 UNIQUENAME?=	${PORTNAME}${DISTVERSION:R:S/.//}
 
 PKGINSTALL?=	${PKGDIR}/pkg-install${COMPONENT}
-USE_BZIP2=	yes
+USES+=		tar:bzip2
 .if !defined(NO_BUILD)
 USES+=	gmake
 GNU_CONFIGURE=	yes

Modified: head/databases/postgresql84-server/distinfo
==============================================================================
--- head/databases/postgresql84-server/distinfo	Wed Jul 30 18:09:39 2014	(r363499)
+++ head/databases/postgresql84-server/distinfo	Wed Jul 30 18:21:47 2014	(r363500)
@@ -1,4 +1,4 @@
-SHA256 (postgresql/postgresql-8.4.21.tar.bz2) = 388f67e59f2a16c27e84f50656f5d755adf3d0a883138366d091aa0c727c1e2c
-SIZE (postgresql/postgresql-8.4.21.tar.bz2) = 14645050
+SHA256 (postgresql/postgresql-8.4.22.tar.bz2) = 5c1d56ce77448706d9dd03b2896af19d9ab1b9b8dcdb96c39707c74675ca3826
+SIZE (postgresql/postgresql-8.4.22.tar.bz2) = 14651732
 SHA256 (postgresql/pg-8421-icu-2014-06-09.diff.gz) = 39b88088adbe4cbfa207db0dd0ed0411a34af762ac9fa967e84eef6bcf8821ad
 SIZE (postgresql/pg-8421-icu-2014-06-09.diff.gz) = 4380

Modified: head/databases/postgresql84-server/files/patch-contrib-uuid
==============================================================================
--- head/databases/postgresql84-server/files/patch-contrib-uuid	Wed Jul 30 18:09:39 2014	(r363499)
+++ head/databases/postgresql84-server/files/patch-contrib-uuid	Wed Jul 30 18:21:47 2014	(r363500)
@@ -10,11 +10,21 @@
  ifdef USE_PGXS
  PG_CONFIG = pg_config
  PGXS := $(shell $(PG_CONFIG) --pgxs)
---- contrib/uuid-ossp/uuid-ossp.c.orig	2014-03-17 20:38:14.000000000 +0100
-+++ contrib/uuid-ossp/uuid-ossp.c	2014-03-19 23:01:59.000000000 +0100
+--- contrib/Makefile.orig      2014-03-21 09:09:12.000000000 +0100
++++ contrib/Makefile   2014-03-21 09:09:28.000000000 +0100
+@@ -39,6 +39,7 @@
+ 		tablefunc	\
+ 		test_parser	\
+ 		tsearch2	\
++		uuid-ossp	\
+ 		vacuumlo
+
+ ifeq ($(with_openssl),yes)
+--- contrib/uuid-ossp/uuid-ossp.c.orig	2014-07-21 20:18:03.000000000 +0100
++++ contrib/uuid-ossp/uuid-ossp.c	2014-07-30 17:35:22.872934812 +0100
 @@ -6,6 +6,10 @@
   *
-  * $PostgreSQL: pgsql/contrib/uuid-ossp/uuid-ossp.c,v 1.12 2010/01/02 16:57:33 momjian Exp $
+  * $PostgreSQL: pgsql/contrib/uuid-ossp/uuid-ossp.c,v 1.11 2009/06/11 14:48:53 momjian Exp $
   *
 + * Modified to use FreeBSD's built in uuid instead of ossp:
 + * Copyright (c) 2009 Andrew Gierth
@@ -58,7 +68,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);
  
@@ -81,41 +91,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",
@@ -126,23 +140,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
@@ -155,23 +183,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,
@@ -181,7 +192,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 */
@@ -201,7 +216,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;
 +	}
 +
@@ -209,7 +228,7 @@
 +	{
 +		SHA_CTX ctx;
 +		unsigned char buf[20];
-+
+ 
 +		SHA1_Init(&ctx);
 +		SHA1_Update(&ctx, ns, 16);
 +		SHA1_Update(&ctx, (unsigned char *)ptr, len);
@@ -223,7 +242,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;
 +		}
 +	}
@@ -275,20 +305,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);
@@ -313,26 +337,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 */
@@ -343,7 +357,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);
  
@@ -361,7 +375,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);
  
@@ -369,13 +383,3 @@
 +	return internal_uuid_create(5, (unsigned char *)ns,
 +				VARDATA(name), VARSIZE(name) - VARHDRSZ);
  }
---- contrib/Makefile.orig	2014-03-21 09:09:12.000000000 +0100
-+++ contrib/Makefile	2014-03-21 09:09:28.000000000 +0100
-@@ -39,6 +39,7 @@
- 		tablefunc	\
- 		test_parser	\
- 		tsearch2	\
-+		uuid-ossp	\
- 		vacuumlo
- 
- ifeq ($(with_openssl),yes)

Modified: head/databases/postgresql84-server/pkg-plist-server
==============================================================================
--- head/databases/postgresql84-server/pkg-plist-server	Wed Jul 30 18:09:39 2014	(r363499)
+++ head/databases/postgresql84-server/pkg-plist-server	Wed Jul 30 18:21:47 2014	(r363500)
@@ -357,6 +357,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

Modified: head/databases/postgresql90-server/Makefile
==============================================================================
--- head/databases/postgresql90-server/Makefile	Wed Jul 30 18:09:39 2014	(r363499)
+++ head/databases/postgresql90-server/Makefile	Wed Jul 30 18:21:47 2014	(r363500)
@@ -1,7 +1,7 @@
 # Created by: Marc G. Fournier <scrappy@FreeBSD.org>
 # $FreeBSD$
 
-DISTVERSION?=	9.0.17
+DISTVERSION?=	9.0.18
 PORTREVISION=	0
 PKGNAMESUFFIX?=	${DISTVERSION:R:S/.//}${COMPONENT}
 

Modified: head/databases/postgresql90-server/distinfo
==============================================================================
--- head/databases/postgresql90-server/distinfo	Wed Jul 30 18:09:39 2014	(r363499)
+++ head/databases/postgresql90-server/distinfo	Wed Jul 30 18:21:47 2014	(r363500)
@@ -1,4 +1,4 @@
-SHA256 (postgresql/postgresql-9.0.17.tar.bz2) = d2f6d09cf941e7cbab6ee399f14080dbe822af58fda9fd132efb05c2b7d160ad
-SIZE (postgresql/postgresql-9.0.17.tar.bz2) = 14961682
+SHA256 (postgresql/postgresql-9.0.18.tar.bz2) = 7c8a07d0ab78fe39522c6bb268a7b357f456d9d4796f57d7b43a004e4a9d3003
+SIZE (postgresql/postgresql-9.0.18.tar.bz2) = 14984096
 SHA256 (postgresql/pg-9017-icu-2014-06-09.diff.gz) = a28988885b532e73c2d6e67c6d2d9593f34d4360f2b4c9f6c419a373e16f149f
 SIZE (postgresql/pg-9017-icu-2014-06-09.diff.gz) = 4395

Modified: head/databases/postgresql90-server/files/patch-contrib-uuid
==============================================================================
--- head/databases/postgresql90-server/files/patch-contrib-uuid	Wed Jul 30 18:09:39 2014	(r363499)
+++ head/databases/postgresql90-server/files/patch-contrib-uuid	Wed Jul 30 18:21:47 2014	(r363500)
@@ -1,17 +1,15 @@
---- contrib/uuid-ossp/Makefile.orig	2014-03-17 20:38:14.000000000 +0100
-+++ contrib/uuid-ossp/Makefile	2014-03-19 23:02:37.000000000 +0100
-@@ -5,8 +5,8 @@
- DATA_built = uuid-ossp.sql
- DATA = uninstall_uuid-ossp.sql
+--- contrib/Makefile.orig	2014-07-21 20:16:01.000000000 +0100
++++ contrib/Makefile	2014-07-30 17:59:54.904934814 +0100
+@@ -43,6 +43,7 @@
+ 		tablefunc	\
+ 		test_parser	\
+ 		tsearch2	\
++		uuid-ossp	\
+ 		unaccent	\
+ 		vacuumlo
  
--SHLIB_LINK += $(OSSP_UUID_LIBS)
-+SHLIB_LINK += -lmd
-
- ifdef USE_PGXS
- PG_CONFIG = pg_config
- PGXS := $(shell $(PG_CONFIG) --pgxs)
---- contrib/uuid-ossp/uuid-ossp.c.orig	2014-03-17 20:38:14.000000000 +0100
-+++ contrib/uuid-ossp/uuid-ossp.c	2014-03-19 23:01:59.000000000 +0100
+--- contrib/uuid-ossp/uuid-ossp.c.orig	2014-07-21 20:16:01.000000000 +0100
++++ contrib/uuid-ossp/uuid-ossp.c	2014-07-30 18:00:21.427935273 +0100
 @@ -6,6 +6,10 @@
   *
   * $PostgreSQL: pgsql/contrib/uuid-ossp/uuid-ossp.c,v 1.12 2010/01/02 16:57:33 momjian Exp $
@@ -58,7 +56,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);
  
@@ -81,41 +79,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",
@@ -126,23 +128,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
@@ -155,23 +171,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,
@@ -181,7 +180,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 */
@@ -201,7 +204,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;
 +	}
 +
@@ -209,7 +216,7 @@
 +	{
 +		SHA_CTX ctx;
 +		unsigned char buf[20];
-+
+ 
 +		SHA1_Init(&ctx);
 +		SHA1_Update(&ctx, ns, 16);
 +		SHA1_Update(&ctx, (unsigned char *)ptr, len);
@@ -223,7 +230,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;
 +		}
 +	}
@@ -275,20 +293,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);
@@ -313,26 +325,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 */
@@ -343,7 +345,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);
  
@@ -361,7 +363,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);
  
@@ -369,13 +371,14 @@
 +	return internal_uuid_create(5, (unsigned char *)ns,
 +				VARDATA(name), VARSIZE(name) - VARHDRSZ);
  }
---- contrib/Makefile.orig	2014-03-21 08:54:03.000000000 +0100
-+++ contrib/Makefile	2014-03-21 08:54:08.000000000 +0100
-@@ -43,6 +43,7 @@
- 		tablefunc	\
- 		test_parser	\
- 		tsearch2	\
-+		uuid-ossp	\
- 		unaccent	\
- 		vacuumlo
+--- contrib/uuid-ossp/Makefile.orig	2014-07-21 20:16:01.000000000 +0100
++++ contrib/uuid-ossp/Makefile	2014-07-30 18:00:13.141935988 +0100
+@@ -5,7 +5,7 @@
+ DATA_built = uuid-ossp.sql
+ DATA = uninstall_uuid-ossp.sql
  
+-SHLIB_LINK += $(OSSP_UUID_LIBS)
++SHLIB_LINK += -lmd
+ 
+ ifdef USE_PGXS
+ PG_CONFIG = pg_config

Modified: head/databases/postgresql90-server/pkg-plist-server
==============================================================================
--- head/databases/postgresql90-server/pkg-plist-server	Wed Jul 30 18:09:39 2014	(r363499)
+++ head/databases/postgresql90-server/pkg-plist-server	Wed Jul 30 18:21:47 2014	(r363500)
@@ -365,6 +365,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

Modified: head/databases/postgresql91-server/Makefile
==============================================================================
--- head/databases/postgresql91-server/Makefile	Wed Jul 30 18:09:39 2014	(r363499)
+++ head/databases/postgresql91-server/Makefile	Wed Jul 30 18:21:47 2014	(r363500)
@@ -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:
 .endif
 
 PKGINSTALL?=	${PKGDIR}/pkg-install${COMPONENT}
-USE_BZIP2=	yes
+USES+=		tar:bzip2
 .if !defined(NO_BUILD)
 USES+=	gmake
 GNU_CONFIGURE=	yes

Modified: head/databases/postgresql91-server/distinfo
==============================================================================
--- head/databases/postgresql91-server/distinfo	Wed Jul 30 18:09:39 2014	(r363499)
+++ head/databases/postgresql91-server/distinfo	Wed Jul 30 18:21:47 2014	(r363500)
@@ -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

Modified: head/databases/postgresql91-server/files/patch-contrib-uuid
==============================================================================
--- head/databases/postgresql91-server/files/patch-contrib-uuid	Wed Jul 30 18:09:39 2014	(r363499)
+++ head/databases/postgresql91-server/files/patch-contrib-uuid	Wed Jul 30 18:21:47 2014	(r363500)
@@ -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)
 -{

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407301821.s6UILlsu062077>