From owner-svn-ports-head@freebsd.org Sat May 23 14:01:40 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B772F2CC258; Sat, 23 May 2020 14:01:40 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49TlQX4MsXz43rg; Sat, 23 May 2020 14:01:40 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 915B010DE4; Sat, 23 May 2020 14:01:40 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04NE1eWJ099295; Sat, 23 May 2020 14:01:40 GMT (envelope-from matthew@FreeBSD.org) Received: (from matthew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04NE1d6a099292; Sat, 23 May 2020 14:01:39 GMT (envelope-from matthew@FreeBSD.org) Message-Id: <202005231401.04NE1d6a099292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: matthew set sender to matthew@FreeBSD.org using -f From: Matthew Seaman Date: Sat, 23 May 2020 14:01:39 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r536298 - in head/databases/pglogical: . files X-SVN-Group: ports-head X-SVN-Commit-Author: matthew X-SVN-Commit-Paths: in head/databases/pglogical: . files X-SVN-Commit-Revision: 536298 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2020 14:01:40 -0000 Author: matthew Date: Sat May 23 14:01:39 2020 New Revision: 536298 URL: https://svnweb.freebsd.org/changeset/ports/536298 Log: Fix build after upstream changes in postgres 9.5 -- 12 made functions AcquireDeletionLock() and ReleaseDeletionLock() extern rather than static in: https://github.com/postgres/postgres/commit/5be594caf818e0b5e33f8dec191f2707394a6d95 The function definitions in the postgresql sources are identical to those in the pglogical sources, so let's just link against the postgresql versions. postgresql-9.4 is EoL, so didn't receive the same changes in the latest round of postgresql updates. While here, fix another of the patches which should no be applied when compiling against all versions of postgresql. Plus fix the pkg-plist -- how did this port ever package previously? Added: head/databases/pglogical/files/extra-patch-pglogical__dependency.c (contents, props changed) head/databases/pglogical/files/patch-pglogical__apply__spi.c - copied unchanged from r536297, head/databases/pglogical/files/extra-patch-pglogical__apply__spi.c Deleted: head/databases/pglogical/files/extra-patch-pglogical__apply__spi.c Modified: head/databases/pglogical/Makefile head/databases/pglogical/pkg-plist Modified: head/databases/pglogical/Makefile ============================================================================== --- head/databases/pglogical/Makefile Sat May 23 13:02:35 2020 (r536297) +++ head/databases/pglogical/Makefile Sat May 23 14:01:39 2020 (r536298) @@ -4,6 +4,7 @@ PORTNAME= pglogical DISTVERSIONPREFIX= REL DISTVERSION= 2_3_1 +PORTREVISION= 1 CATEGORIES= databases MAINTAINER= matthew@FreeBSD.org @@ -35,9 +36,13 @@ PLIST_SUB+= PGSQL94="" PLIST_SUB+= PGSQL94="@comment " .endif -.if ${PGSQL_VER} >= 11 -EXTRA_PATCHES= ${PATCHDIR}/extra-patch-pglogical__apply__spi.c +.if ${PGSQL_VER} >= 9.5 +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-pglogical__dependency.c .endif + +#.if ${PGSQL_VER} >= 11 +#EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-pglogical__apply__spi.c +#.endif # FFI #TEST_DEPENDS= pg_regress:databases/postgresql${PGSQL_VER_NODOT}-pg_regress Added: head/databases/pglogical/files/extra-patch-pglogical__dependency.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/pglogical/files/extra-patch-pglogical__dependency.c Sat May 23 14:01:39 2020 (r536298) @@ -0,0 +1,63 @@ +--- pglogical_dependency.c.orig 2020-04-06 19:40:00 UTC ++++ pglogical_dependency.c +@@ -232,8 +232,6 @@ static void reportDependentObjects(const ObjectAddress + DropBehavior behavior, + int msglevel, + const ObjectAddress *origObject); +-static void AcquireDeletionLock(const ObjectAddress *object, int flags); +-static void ReleaseDeletionLock(const ObjectAddress *object); + static bool find_expr_references_walker(Node *node, + find_expr_references_context *context); + static void eliminate_duplicate_dependencies(ObjectAddresses *addrs); +@@ -926,51 +924,6 @@ reportDependentObjects(const ObjectAddresses *targetOb + + pfree(clientdetail.data); + pfree(logdetail.data); +-} +- +-/* +- * AcquireDeletionLock - acquire a suitable lock for deleting an object +- * +- * We use LockRelation for relations, LockDatabaseObject for everything +- * else. Note that dependency.c is not concerned with deleting any kind of +- * shared-across-databases object, so we have no need for LockSharedObject. +- */ +-static void +-AcquireDeletionLock(const ObjectAddress *object, int flags) +-{ +- if (object->classId == RelationRelationId) +- { +- /* +- * In DROP INDEX CONCURRENTLY, take only ShareUpdateExclusiveLock on +- * the index for the moment. index_drop() will promote the lock once +- * it's safe to do so. In all other cases we need full exclusive +- * lock. +- */ +- if (flags & PERFORM_DELETION_CONCURRENTLY) +- LockRelationOid(object->objectId, ShareUpdateExclusiveLock); +- else +- LockRelationOid(object->objectId, AccessExclusiveLock); +- } +- else +- { +- /* assume we should lock the whole object not a sub-object */ +- LockDatabaseObject(object->classId, object->objectId, 0, +- AccessExclusiveLock); +- } +-} +- +-/* +- * ReleaseDeletionLock - release an object deletion lock +- */ +-static void +-ReleaseDeletionLock(const ObjectAddress *object) +-{ +- if (object->classId == RelationRelationId) +- UnlockRelationOid(object->objectId, AccessExclusiveLock); +- else +- /* assume we should lock the whole object not a sub-object */ +- UnlockDatabaseObject(object->classId, object->objectId, 0, +- AccessExclusiveLock); + } + + /* Copied: head/databases/pglogical/files/patch-pglogical__apply__spi.c (from r536297, head/databases/pglogical/files/extra-patch-pglogical__apply__spi.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/pglogical/files/patch-pglogical__apply__spi.c Sat May 23 14:01:39 2020 (r536298, copy of r536297, head/databases/pglogical/files/extra-patch-pglogical__apply__spi.c) @@ -0,0 +1,10 @@ +--- pglogical_apply_spi.c.orig 2019-03-06 06:44:31 UTC ++++ pglogical_apply_spi.c +@@ -16,6 +16,7 @@ + */ + #include + #include ++#include + + #include "postgres.h" + Modified: head/databases/pglogical/pkg-plist ============================================================================== --- head/databases/pglogical/pkg-plist Sat May 23 13:02:35 2020 (r536297) +++ head/databases/pglogical/pkg-plist Sat May 23 14:01:39 2020 (r536298) @@ -21,8 +21,11 @@ share/postgresql/extension/pglogical--2.2.0.sql share/postgresql/extension/pglogical--2.2.1--2.2.2.sql share/postgresql/extension/pglogical--2.2.1.sql share/postgresql/extension/pglogical--2.2.2--2.3.0.sql +share/postgresql/extension/pglogical--2.2.2--2.3.1.sql share/postgresql/extension/pglogical--2.2.2.sql +share/postgresql/extension/pglogical--2.3.0--2.3.1.sql share/postgresql/extension/pglogical--2.3.0.sql +share/postgresql/extension/pglogical--2.3.1.sql share/postgresql/extension/pglogical.control share/postgresql/extension/pglogical_origin--1.0.0.sql share/postgresql/extension/pglogical_origin.control