pkgsrc/databases/postgresql93-client/Makefile
adam e01c8df550 The PostgreSQL Global Development Group has released an update to all supported versions of our database system, including 9.5.4, 9.4.9, 9.3.14, 9.2.18 and 9.1.23. This release fixes two security issues. It also patches a number of other bugs reported over the last three months. Users who rely on security isolation between database users should update as soon as possible. Other users should plan to update at the next convenient downtime.
Security Issues
---------------
Two security holes have been closed by this release:

CVE-2016-5423: certain nested CASE expressions can cause the server to crash.
CVE-2016-5424: database and role names with embedded special characters can allow code injection during administrative operations like pg_dumpall.
The fix for the second issue also adds an option, -reuse-previous, to psql's \connect command. pg_dumpall will also refuse to handle database and role names containing line breaks after the update. For more information on these issues and how they affect backwards-compatibility, see the Release Notes.

Bug Fixes and Improvements
--------------------------
This update also fixes a number of bugs reported in the last few months. Some of these issues affect only version 9.5, but many affect all supported versions:

Fix misbehaviors of IS NULL/IS NOT NULL with composite values
Fix three areas where INSERT ... ON CONFLICT failed to work properly with other SQL features.
Make INET and CIDR data types properly reject bad IPv6 values
Prevent crash in "point ## lseg" operator for NaN input
Avoid possible crash in pg_get_expr()
Fix several one-byte buffer over-reads in to_number()
Don't needlessly plan query if WITH NO DATA is specified
Avoid crash-unsafe state in expensive heap_update() paths
Fix hint bit update during WAL replay of row locking operations
Avoid unnecessary "could not serialize access" with FOR KEY SHARE
Avoid crash in postgres -C when the specified variable is a null string
Fix two issues with logical decoding and subtransactions
Ensure that backends see up-to-date statistics for shared catalogs
Prevent possible failure when vacuuming multixact IDs in an upgraded database
When a manual ANALYZE specifies columns, don't reset changes_since_analyze
Fix ANALYZE's overestimation of n_distinct for columns with nulls
Fix bug in b-tree mark/restore processing
Fix building of large (bigger than shared_buffers) hash indexes
Prevent infinite loop in GiST index build with NaN values
Fix possible crash during a nearest-neighbor indexscan
Fix "PANIC: failed to add BRIN tuple" error
Prevent possible crash during background worker shutdown
Many fixes for issues in parallel pg_dump and pg_restore
Make pg_basebackup accept -Z 0 as no compression
Make regression tests safe for Danish and Welsh locales
2016-08-23 06:28:15 +00:00

96 lines
3 KiB
Makefile

# $NetBSD: Makefile,v 1.11 2016/08/23 06:28:16 adam Exp $
PKGNAME= ${DISTNAME:C/-/93-client-/}
COMMENT= PostgreSQL database client programs
.include "../../databases/postgresql93/Makefile.common"
USE_TOOLS+= gzip tar
CONFIGURE_ARGS+= --with-openssl
CONFIGURE_ARGS+= --with-readline
CONFIGURE_ARGS+= --with-zlib
# Override INSTALL script to avoid unprivileged user/group
# leaking into the binary package
CONFIGURE_ARGS+= INSTALL=${INSTALL:Q}\ -c
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "Cygwin"
INSTALLATION_DIRS+= bin
.endif
# 1. The thread-safety test in ${WRSRC}/src/tools/thread does not pass on
# NetBSD earlier than 4.0 or DragonFly.
# 2. configure with --enable-thread-safety fails on OpenBSD.
.if (${OPSYS} == "NetBSD" && !empty(OS_VERSION:M[0-3].*)) || \
${OPSYS} == "DragonFly" || ${OPSYS} == "OpenBSD" || ${OPSYS} == "MirBSD"
PGSQL_THREAD_SAFETY?= no
.endif
PGSQL_THREAD_SAFETY?= yes
BUILD_DEFS+= PGSQL_THREAD_SAFETY
.if !empty(PGSQL_THREAD_SAFETY:M[yY][eE][sS])
. include "../../mk/pthread.buildlink3.mk"
. if (${PTHREAD_TYPE} == "native")
CONFIGURE_ARGS+= --enable-thread-safety
. endif
.else
CONFIGURE_ARGS+= --disable-thread-safety
.endif
INSTALL_DIRS= src/include
INSTALL_DIRS+= src/common
INSTALL_DIRS+= src/interfaces
INSTALL_DIRS+= src/bin
INSTALL_DIRS+= src/port
BUILD_DIRS= ${INSTALL_DIRS}
# Without this, the Darwin build fails (related to -bundle_loader).
BUILD_DIRS+= src/backend
.for f in pg_service.conf psqlrc
CONF_FILES+= share/postgresql/${f}.sample ${PKG_SYSCONFDIR}/${f}
.endfor
# XXX work around core dumps with the native libedit
USE_GNU_READLINE= yes
.include "../../devel/readline/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
SUBST_CLASSES+= pgxs
SUBST_STAGE.pgxs= post-build
SUBST_MESSAGE.pgxs= Fixing workdir tools references in pgxs Makefile
SUBST_FILES.pgxs= src/Makefile.global
SUBST_SED.pgxs= -e 's,${TOOLS_CMD.bison},${TOOLS_PATH.bison},'
SUBST_SED.pgxs+= -e 's,${TOOLS_CMD.lex},${TOOLS_PATH.lex},'
SUBST_SED.pgxs+= -e 's,${TOOLS_CMD.mkdir},${TOOLS_PATH.mkdir},'
SUBST_SED.pgxs+= -e 's,${WRKDIR}/.wrapper/bin/ld,${LD},'
SUBST_SED.pgxs+= -e 's,${WRKDIR}/.wrapper,${PREFIX},'
SUBST_SED.pgxs+= -e 's,${WRKSRC},/dev/null,'
INSTALLATION_DIRS+= lib/postgresql/pgxs
INSTALLATION_DIRS+= lib/postgresql/pgxs/config
INSTALLATION_DIRS+= lib/postgresql/pgxs/src
INSTALLATION_DIRS+= lib/postgresql/pgxs/src/makefiles
DEST_PGXS= ${DESTDIR}${PREFIX}/lib/postgresql/pgxs
PGXS_FILES= config/install-sh
PGXS_FILES+= src/makefiles/pgxs.mk src/Makefile.global
PGXS_FILES+= src/Makefile.port src/Makefile.shlib
PGXS_FILES+= src/nls-global.mk
# On Solaris, avoid conflicts between "${SSLBASE}/include/openssl/des.h"
# and "/usr/include/crypt.h" -- we want the definitions in the former.
.if ${OPSYS} == "SunOS"
post-wrapper:
touch ${BUILDLINK_DIR}/include/crypt.h
.endif
post-install:
.for file in ${PGXS_FILES}
${INSTALL_DATA} ${WRKSRC}/${file} ${DEST_PGXS}/${file}
.endfor
.include "../../mk/bsd.pkg.mk"