From 4ac52e0c203ea1ac3cd4dd51dd6dcc89678fe4ac Mon Sep 17 00:00:00 2001 From: Palle Girgensohn Date: Sat, 15 May 2021 11:11:12 +0200 Subject: databases/postgresql??-*: Upgrade to latest version PostgreSQL 13.3, 12.7, 11.12, 10.17, and 9.6.22 Released! The PostgreSQL Global Development Group has released an update to all supported versions of our database system, including 13.3, 12.7, 11.12, 10.17, and 9.6.22. This release closes three security vulnerabilities and fixes over 45 bugs reported over the last three months. Security fixes in this release: CVE-2021-32027: Buffer overrun from integer overflow in array subscripting calculations CVE-2021-32028: Memory disclosure in INSERT ... ON CONFLICT ... DO UPDATE CVE-2021-32029: Memory disclosure in partitioned-table UPDATE ... RETURNING Also plenty of bug fixes. See the release note for details. Changes to the port: Make sure we use the matching version of llvm. This fixes a problem with the llvm version string not being monotonically increasing with the version number. [1] Better pkg message about checksums for postgresql 12+. [2] [4] Adjust login class parameter to adhere to the documentation in rc.subr(8) [3]: The rc.conf parameter for the login class of the postgresql daemon has changed name from postgresql_class to postgresql_login_class, since rc.subr(8) states that the parameter should be named ${name}_login_class. Allow parallel builds. [5] Correct the directory name for the user postgres in pkg message. [6] PR: 250824 [1], 253558 [2], 236060 [3], 233106 [4], 230656 [5] PR: 226674 [6] Submitted by: Michael Zhilin [2], Michael Zhilin [3], Dmitry Chestnykh [4] Submitted by: Steve Wills [5], knezour [6] Security: 76e0bb86-b4cb-11eb-b9c9-6cc21735f730 Security: 62da9702-b4cc-11eb-b9c9-6cc21735f730 Release notes: https://www.postgresql.org/docs/release/ (cherry picked from commit ab83f2b4bb78a718efa5c43247ba1e1d207f99b6) --- databases/postgresql13-server/Makefile | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'databases/postgresql13-server/Makefile') diff --git a/databases/postgresql13-server/Makefile b/databases/postgresql13-server/Makefile index 359ee8252b84..a480ca004546 100644 --- a/databases/postgresql13-server/Makefile +++ b/databases/postgresql13-server/Makefile @@ -1,7 +1,7 @@ # Created by: Marc G. Fournier PORTNAME?= postgresql -DISTVERSION?= 13.2 +DISTVERSION?= 13.3 # PORTREVISION must be ?= otherwise, all slave ports get this PORTREVISION and # not their own. Probably best to keep it at ?=0 when reset here too. PORTREVISION?= 0 @@ -240,26 +240,39 @@ RUN_DEPENDS+= llvm-config${PG_LLVM_VERSION}:devel/llvm${PG_LLVM_VERSION} CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${PG_LLVM_VERSION} .endif +# Convert LLVM_DEFAULT to COMPILER_VERSION format to make it +# suitable for version comparison. +.if ${LLVM_DEFAULT} >= 70 && ${LLVM_DEFAULT} <= 90 +LLVM_DEFAULT_VERSION= ${LLVM_DEFAULT} +.else +LLVM_DEFAULT_VERSION= ${LLVM_DEFAULT}0 +.endif + +# Convert COMPILER_VERSION to LLVM_DEFAULT format to make it +# suitable for LLVM port name. +# All supported FreeBSD versions have Clang 10.0.1 or later. +LLVM_PORT_SUFFIX= ${COMPILER_VERSION:C/.$//} + # sync LLVM to the preferred compiler if possible # or else use a lower version compiler that is compatible -.if ${COMPILER_VERSION} > ${LLVM_DEFAULT} +.if ${COMPILER_VERSION} > ${LLVM_DEFAULT_VERSION} # Highest LLVM version in ports: -. if ${COMPILER_VERSION} <= 11 -PG_LLVM_VERSION=${COMPILER_VERSION} -PG_COMPILER_VERSION=${COMPILER_VERSION} +. if ${LLVM_PORT_SUFFIX} <= 11 +PG_LLVM_VERSION=${LLVM_PORT_SUFFIX} +PG_COMPILER_VERSION=${LLVM_PORT_SUFFIX} . else PG_LLVM_VERSION=11 PG_COMPILER_VERSION=11 . endif .else -PG_COMPILER_VERSION=${COMPILER_VERSION} PG_LLVM_VERSION=${LLVM_DEFAULT} +PG_COMPILER_VERSION=${LLVM_PORT_SUFFIX} .endif .if ${DISTVERSION:C/([0-9]*).*/\1/} >= 11 . if defined(SERVER_ONLY) && ${PORT_OPTIONS:MLLVM} INSTALL_DIRS+= src/backend/jit/llvm -. if ${COMPILER_VERSION} != ${PG_COMPILER_VERSION} +. if ${LLVM_PORT_SUFFIX} != ${PG_COMPILER_VERSION} LLVM_CONFIGURE_ARGS?= CC=${LOCALBASE}/bin/clang${PG_COMPILER_VERSION} . endif . endif @@ -275,7 +288,7 @@ pre-build: do-build: @ cd ${WRKSRC}/src/backend && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} symlinks @ for dir in ${BUILD_DIRS}; do \ - cd ${WRKSRC}/$${dir} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD}; \ + cd ${WRKSRC}/$${dir} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS}; \ done . if exists(${FILESDIR}/pkg-message${COMPONENT}.in) -- cgit v1.2.3