From nobody Wed Feb 15 11:40:29 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGx320SgDz3py8r; Wed, 15 Feb 2023 11:40:30 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGx3170DWz4CwS; Wed, 15 Feb 2023 11:40:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676461230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cJ/saEfOb9j86aknN1rNKcHiedIb0Uz5SkZ2fJrlPxE=; b=WIt8j/yB927InEO0HbhUhBTodSCTXBOSynYLOk396pH6l16OcLpma/zCEl8MG1yC17P7pf +oEnQjeUel3Ar3FrxOUNvyCWGMwvW9Fa+JDzhWiSrB1b8VH2UZ+wHbUn3kTC+oFlC1GeXL g0m90QgSupIQpS2u7Y9pf0iqwX+niFsbqAcB1XR2sMdvW/gAdIMT/yuv23aB90FPFVbpnR OGbBdqi4KZYTIaMYIvGHuF/UaE2psMV5z4kbFLW3wpi+8zlKbLIelzmrV4pxJ/6bHGrGnl yZvPBbQNRDxicpeSHW33OaXBpqTmLLXflayHO9/X3w/53lP+jvWqV0ErYI8aXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676461230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cJ/saEfOb9j86aknN1rNKcHiedIb0Uz5SkZ2fJrlPxE=; b=WW88H1iyTML6bHblA51xS4jmHTH80mrwX+h+34CnZXPCiLxXSuBIjVOIWlRmSJInC+RQKR /GqvPxrd4lkg3Ve4pY80/IYuyv7KqKFi59c+cHrkiN2W7JEiuTHr2kIvFFkortP0o5C3ZA n1+ObJFYNuS95wqwPYbeB6G1FdcdmoaoW0NV5j4ISCEtMjBgZwc3MKVJZ3jIAXgFFjA2uB ZV1pZlWTBdJce83s6Fk3I65/kPVoEmNEfkmSoUFQ+OaNKP1Pb4rM14fTn2ct/fmOzO2uGj c8Lgj9D/WXArcBpFvj3MRL2d2f9OUTEBWRr3dMYfPKXmYyFdO/8IT3kzmZiPEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676461230; a=rsa-sha256; cv=none; b=SlENtyKfK1d4YWaaIOGE6PPH2YPoOgokck9UTBK2YiCEXUgE33t99Ee4mPEb0Fg0dG2p+u e+11n6JZ2CmY84SXcTDPMzh1bJ+JwhNCKtAKM4J55AkuuSaujt1CZBGWIZBq+vrXTGMMHo elolP/RFZ4pTqfKvxhW2C2x8YTZD72f9z6sok2sWfGg7owStxLHQCX30q1iowCpZ2ElucB tydFwWqjYa+udUSnaMgtux8WzbbkFBd/+/V0i+u5b1x7aI1Y9Omg71y5yWU9HxIPmxJTAF x9OPguYZzN6GTagwNAix8Sr+bHTzI0/ceZf3pAlKW1Q04PLtIVvH6xLb6FQjpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGx31667yzND4; Wed, 15 Feb 2023 11:40:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31FBeT6s069196; Wed, 15 Feb 2023 11:40:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31FBeTgc069195; Wed, 15 Feb 2023 11:40:29 GMT (envelope-from git) Date: Wed, 15 Feb 2023 11:40:29 GMT Message-Id: <202302151140.31FBeTgc069195@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Matthew Seaman Subject: git: 9f3a6591c599 - main - databases/pg_citus: fix build with recent postgresql versions List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: matthew X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f3a6591c599ae3deb72c5e02f29b4457f0fecc4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by matthew: URL: https://cgit.FreeBSD.org/ports/commit/?id=9f3a6591c599ae3deb72c5e02f29b4457f0fecc4 commit 9f3a6591c599ae3deb72c5e02f29b4457f0fecc4 Author: Matthew Seaman AuthorDate: 2023-02-15 11:35:58 +0000 Commit: Matthew Seaman CommitDate: 2023-02-15 11:40:25 +0000 databases/pg_citus: fix build with recent postgresql versions Partially import commit https://github.com/citusdata/citus/commit/341fdb32fc07a3aea2dda2fa33a70d22819be37b from upstream (issue https://github.com/citusdata/citus/pull/6711) PG13 and PG14 have now backported the `RelationGetSmgr` function that Citus already backported, so on those PG versions use the function from the PG sources. Reported by: pkg-fallout --- databases/pg_citus/Makefile | 1 + ...-src_backend_distributed_commands_multi__copy.c | 4 ++-- .../files/patch-src_include_pg__version__compat.h | 28 ++++++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/databases/pg_citus/Makefile b/databases/pg_citus/Makefile index e178094273e7..b45d5a4d83fd 100644 --- a/databases/pg_citus/Makefile +++ b/databases/pg_citus/Makefile @@ -1,5 +1,6 @@ PORTNAME= citus PORTVERSION= 11.2.0 +PORTREVISION= 1 DISTVERSIONPREFIX= v CATEGORIES= databases PKGNAMEPREFIX= pg_ diff --git a/databases/pg_citus/files/patch-src_backend_distributed_commands_multi__copy.c b/databases/pg_citus/files/patch-src_backend_distributed_commands_multi__copy.c index 790a9981cf97..01041d008b54 100644 --- a/databases/pg_citus/files/patch-src_backend_distributed_commands_multi__copy.c +++ b/databases/pg_citus/files/patch-src_backend_distributed_commands_multi__copy.c @@ -1,6 +1,6 @@ ---- src/backend/distributed/commands/multi_copy.c.orig 2021-03-09 08:26:53 UTC +--- src/backend/distributed/commands/multi_copy.c.orig 2023-02-03 08:13:35 UTC +++ src/backend/distributed/commands/multi_copy.c -@@ -53,6 +53,7 @@ +@@ -50,6 +50,7 @@ #include /* for htons */ #include /* for htons */ diff --git a/databases/pg_citus/files/patch-src_include_pg__version__compat.h b/databases/pg_citus/files/patch-src_include_pg__version__compat.h new file mode 100644 index 000000000000..a421c728c951 --- /dev/null +++ b/databases/pg_citus/files/patch-src_include_pg__version__compat.h @@ -0,0 +1,28 @@ +--- src/include/pg_version_compat.h.orig 2023-02-15 11:30:17 UTC ++++ src/include/pg_version_compat.h +@@ -54,7 +54,14 @@ pg_strtoint64(char *s) + return result; + } + +- ++/* ++ * RelationGetSmgr got backported in 13.10 and 14.7 so redefining it for any ++ * version higher causes compilation errors due to redefining of the function. ++ * We want to use it in all versions. So we backport it ourselves in earlier ++ * versions, and rely on the Postgres provided version in the later versions. ++ */ ++#if PG_VERSION_NUM >= PG_VERSION_13 && PG_VERSION_NUM < 130010 \ ++ || PG_VERSION_NUM >= PG_VERSION_14 && PG_VERSION_NUM < 140007 + static inline SMgrRelation + RelationGetSmgr(Relation rel) + { +@@ -64,6 +71,9 @@ RelationGetSmgr(Relation rel) + } + return rel->rd_smgr; + } ++ ++ ++#endif + + + #define CREATE_SEQUENCE_COMMAND \